1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package dfareporting provides access to the Campaign Manager 360 API.
8//
9// For product documentation, see: https://developers.google.com/doubleclick-advertisers/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/dfareporting/v3.4"
16//   ...
17//   ctx := context.Background()
18//   dfareportingService, err := dfareporting.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   dfareportingService, err := dfareporting.NewService(ctx, option.WithScopes(dfareporting.DfatraffickingScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   dfareportingService, err := dfareporting.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   dfareportingService, err := dfareporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package dfareporting // import "google.golang.org/api/dfareporting/v3.4"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "dfareporting:v3.4"
79const apiName = "dfareporting"
80const apiVersion = "v3.4"
81const basePath = "https://dfareporting.googleapis.com/dfareporting/v3.4/"
82const mtlsBasePath = "https://dfareporting.mtls.googleapis.com/dfareporting/v3.4/"
83
84// OAuth2 scopes used by this API.
85const (
86	// Manage DoubleClick Digital Marketing conversions
87	DdmconversionsScope = "https://www.googleapis.com/auth/ddmconversions"
88
89	// View and manage DoubleClick for Advertisers reports
90	DfareportingScope = "https://www.googleapis.com/auth/dfareporting"
91
92	// View and manage your DoubleClick Campaign Manager's (DCM) display ad
93	// campaigns
94	DfatraffickingScope = "https://www.googleapis.com/auth/dfatrafficking"
95)
96
97// NewService creates a new Service.
98func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
99	scopesOption := option.WithScopes(
100		"https://www.googleapis.com/auth/ddmconversions",
101		"https://www.googleapis.com/auth/dfareporting",
102		"https://www.googleapis.com/auth/dfatrafficking",
103	)
104	// NOTE: prepend, so we don't override user-specified scopes.
105	opts = append([]option.ClientOption{scopesOption}, opts...)
106	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
107	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
108	client, endpoint, err := htransport.NewClient(ctx, opts...)
109	if err != nil {
110		return nil, err
111	}
112	s, err := New(client)
113	if err != nil {
114		return nil, err
115	}
116	if endpoint != "" {
117		s.BasePath = endpoint
118	}
119	return s, nil
120}
121
122// New creates a new Service. It uses the provided http.Client for requests.
123//
124// Deprecated: please use NewService instead.
125// To provide a custom HTTP client, use option.WithHTTPClient.
126// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
127func New(client *http.Client) (*Service, error) {
128	if client == nil {
129		return nil, errors.New("client is nil")
130	}
131	s := &Service{client: client, BasePath: basePath}
132	s.AccountActiveAdSummaries = NewAccountActiveAdSummariesService(s)
133	s.AccountPermissionGroups = NewAccountPermissionGroupsService(s)
134	s.AccountPermissions = NewAccountPermissionsService(s)
135	s.AccountUserProfiles = NewAccountUserProfilesService(s)
136	s.Accounts = NewAccountsService(s)
137	s.Ads = NewAdsService(s)
138	s.AdvertiserGroups = NewAdvertiserGroupsService(s)
139	s.AdvertiserLandingPages = NewAdvertiserLandingPagesService(s)
140	s.Advertisers = NewAdvertisersService(s)
141	s.Browsers = NewBrowsersService(s)
142	s.CampaignCreativeAssociations = NewCampaignCreativeAssociationsService(s)
143	s.Campaigns = NewCampaignsService(s)
144	s.ChangeLogs = NewChangeLogsService(s)
145	s.Cities = NewCitiesService(s)
146	s.ConnectionTypes = NewConnectionTypesService(s)
147	s.ContentCategories = NewContentCategoriesService(s)
148	s.Conversions = NewConversionsService(s)
149	s.Countries = NewCountriesService(s)
150	s.CreativeAssets = NewCreativeAssetsService(s)
151	s.CreativeFieldValues = NewCreativeFieldValuesService(s)
152	s.CreativeFields = NewCreativeFieldsService(s)
153	s.CreativeGroups = NewCreativeGroupsService(s)
154	s.Creatives = NewCreativesService(s)
155	s.CustomEvents = NewCustomEventsService(s)
156	s.DimensionValues = NewDimensionValuesService(s)
157	s.DirectorySites = NewDirectorySitesService(s)
158	s.DynamicTargetingKeys = NewDynamicTargetingKeysService(s)
159	s.EventTags = NewEventTagsService(s)
160	s.Files = NewFilesService(s)
161	s.FloodlightActivities = NewFloodlightActivitiesService(s)
162	s.FloodlightActivityGroups = NewFloodlightActivityGroupsService(s)
163	s.FloodlightConfigurations = NewFloodlightConfigurationsService(s)
164	s.InventoryItems = NewInventoryItemsService(s)
165	s.Languages = NewLanguagesService(s)
166	s.Metros = NewMetrosService(s)
167	s.MobileApps = NewMobileAppsService(s)
168	s.MobileCarriers = NewMobileCarriersService(s)
169	s.OperatingSystemVersions = NewOperatingSystemVersionsService(s)
170	s.OperatingSystems = NewOperatingSystemsService(s)
171	s.OrderDocuments = NewOrderDocumentsService(s)
172	s.Orders = NewOrdersService(s)
173	s.PlacementGroups = NewPlacementGroupsService(s)
174	s.PlacementStrategies = NewPlacementStrategiesService(s)
175	s.Placements = NewPlacementsService(s)
176	s.PlatformTypes = NewPlatformTypesService(s)
177	s.PostalCodes = NewPostalCodesService(s)
178	s.Projects = NewProjectsService(s)
179	s.Regions = NewRegionsService(s)
180	s.RemarketingListShares = NewRemarketingListSharesService(s)
181	s.RemarketingLists = NewRemarketingListsService(s)
182	s.Reports = NewReportsService(s)
183	s.Sites = NewSitesService(s)
184	s.Sizes = NewSizesService(s)
185	s.Subaccounts = NewSubaccountsService(s)
186	s.TargetableRemarketingLists = NewTargetableRemarketingListsService(s)
187	s.TargetingTemplates = NewTargetingTemplatesService(s)
188	s.UserProfiles = NewUserProfilesService(s)
189	s.UserRolePermissionGroups = NewUserRolePermissionGroupsService(s)
190	s.UserRolePermissions = NewUserRolePermissionsService(s)
191	s.UserRoles = NewUserRolesService(s)
192	s.VideoFormats = NewVideoFormatsService(s)
193	return s, nil
194}
195
196type Service struct {
197	client    *http.Client
198	BasePath  string // API endpoint base URL
199	UserAgent string // optional additional User-Agent fragment
200
201	AccountActiveAdSummaries *AccountActiveAdSummariesService
202
203	AccountPermissionGroups *AccountPermissionGroupsService
204
205	AccountPermissions *AccountPermissionsService
206
207	AccountUserProfiles *AccountUserProfilesService
208
209	Accounts *AccountsService
210
211	Ads *AdsService
212
213	AdvertiserGroups *AdvertiserGroupsService
214
215	AdvertiserLandingPages *AdvertiserLandingPagesService
216
217	Advertisers *AdvertisersService
218
219	Browsers *BrowsersService
220
221	CampaignCreativeAssociations *CampaignCreativeAssociationsService
222
223	Campaigns *CampaignsService
224
225	ChangeLogs *ChangeLogsService
226
227	Cities *CitiesService
228
229	ConnectionTypes *ConnectionTypesService
230
231	ContentCategories *ContentCategoriesService
232
233	Conversions *ConversionsService
234
235	Countries *CountriesService
236
237	CreativeAssets *CreativeAssetsService
238
239	CreativeFieldValues *CreativeFieldValuesService
240
241	CreativeFields *CreativeFieldsService
242
243	CreativeGroups *CreativeGroupsService
244
245	Creatives *CreativesService
246
247	CustomEvents *CustomEventsService
248
249	DimensionValues *DimensionValuesService
250
251	DirectorySites *DirectorySitesService
252
253	DynamicTargetingKeys *DynamicTargetingKeysService
254
255	EventTags *EventTagsService
256
257	Files *FilesService
258
259	FloodlightActivities *FloodlightActivitiesService
260
261	FloodlightActivityGroups *FloodlightActivityGroupsService
262
263	FloodlightConfigurations *FloodlightConfigurationsService
264
265	InventoryItems *InventoryItemsService
266
267	Languages *LanguagesService
268
269	Metros *MetrosService
270
271	MobileApps *MobileAppsService
272
273	MobileCarriers *MobileCarriersService
274
275	OperatingSystemVersions *OperatingSystemVersionsService
276
277	OperatingSystems *OperatingSystemsService
278
279	OrderDocuments *OrderDocumentsService
280
281	Orders *OrdersService
282
283	PlacementGroups *PlacementGroupsService
284
285	PlacementStrategies *PlacementStrategiesService
286
287	Placements *PlacementsService
288
289	PlatformTypes *PlatformTypesService
290
291	PostalCodes *PostalCodesService
292
293	Projects *ProjectsService
294
295	Regions *RegionsService
296
297	RemarketingListShares *RemarketingListSharesService
298
299	RemarketingLists *RemarketingListsService
300
301	Reports *ReportsService
302
303	Sites *SitesService
304
305	Sizes *SizesService
306
307	Subaccounts *SubaccountsService
308
309	TargetableRemarketingLists *TargetableRemarketingListsService
310
311	TargetingTemplates *TargetingTemplatesService
312
313	UserProfiles *UserProfilesService
314
315	UserRolePermissionGroups *UserRolePermissionGroupsService
316
317	UserRolePermissions *UserRolePermissionsService
318
319	UserRoles *UserRolesService
320
321	VideoFormats *VideoFormatsService
322}
323
324func (s *Service) userAgent() string {
325	if s.UserAgent == "" {
326		return googleapi.UserAgent
327	}
328	return googleapi.UserAgent + " " + s.UserAgent
329}
330
331func NewAccountActiveAdSummariesService(s *Service) *AccountActiveAdSummariesService {
332	rs := &AccountActiveAdSummariesService{s: s}
333	return rs
334}
335
336type AccountActiveAdSummariesService struct {
337	s *Service
338}
339
340func NewAccountPermissionGroupsService(s *Service) *AccountPermissionGroupsService {
341	rs := &AccountPermissionGroupsService{s: s}
342	return rs
343}
344
345type AccountPermissionGroupsService struct {
346	s *Service
347}
348
349func NewAccountPermissionsService(s *Service) *AccountPermissionsService {
350	rs := &AccountPermissionsService{s: s}
351	return rs
352}
353
354type AccountPermissionsService struct {
355	s *Service
356}
357
358func NewAccountUserProfilesService(s *Service) *AccountUserProfilesService {
359	rs := &AccountUserProfilesService{s: s}
360	return rs
361}
362
363type AccountUserProfilesService struct {
364	s *Service
365}
366
367func NewAccountsService(s *Service) *AccountsService {
368	rs := &AccountsService{s: s}
369	return rs
370}
371
372type AccountsService struct {
373	s *Service
374}
375
376func NewAdsService(s *Service) *AdsService {
377	rs := &AdsService{s: s}
378	return rs
379}
380
381type AdsService struct {
382	s *Service
383}
384
385func NewAdvertiserGroupsService(s *Service) *AdvertiserGroupsService {
386	rs := &AdvertiserGroupsService{s: s}
387	return rs
388}
389
390type AdvertiserGroupsService struct {
391	s *Service
392}
393
394func NewAdvertiserLandingPagesService(s *Service) *AdvertiserLandingPagesService {
395	rs := &AdvertiserLandingPagesService{s: s}
396	return rs
397}
398
399type AdvertiserLandingPagesService struct {
400	s *Service
401}
402
403func NewAdvertisersService(s *Service) *AdvertisersService {
404	rs := &AdvertisersService{s: s}
405	return rs
406}
407
408type AdvertisersService struct {
409	s *Service
410}
411
412func NewBrowsersService(s *Service) *BrowsersService {
413	rs := &BrowsersService{s: s}
414	return rs
415}
416
417type BrowsersService struct {
418	s *Service
419}
420
421func NewCampaignCreativeAssociationsService(s *Service) *CampaignCreativeAssociationsService {
422	rs := &CampaignCreativeAssociationsService{s: s}
423	return rs
424}
425
426type CampaignCreativeAssociationsService struct {
427	s *Service
428}
429
430func NewCampaignsService(s *Service) *CampaignsService {
431	rs := &CampaignsService{s: s}
432	return rs
433}
434
435type CampaignsService struct {
436	s *Service
437}
438
439func NewChangeLogsService(s *Service) *ChangeLogsService {
440	rs := &ChangeLogsService{s: s}
441	return rs
442}
443
444type ChangeLogsService struct {
445	s *Service
446}
447
448func NewCitiesService(s *Service) *CitiesService {
449	rs := &CitiesService{s: s}
450	return rs
451}
452
453type CitiesService struct {
454	s *Service
455}
456
457func NewConnectionTypesService(s *Service) *ConnectionTypesService {
458	rs := &ConnectionTypesService{s: s}
459	return rs
460}
461
462type ConnectionTypesService struct {
463	s *Service
464}
465
466func NewContentCategoriesService(s *Service) *ContentCategoriesService {
467	rs := &ContentCategoriesService{s: s}
468	return rs
469}
470
471type ContentCategoriesService struct {
472	s *Service
473}
474
475func NewConversionsService(s *Service) *ConversionsService {
476	rs := &ConversionsService{s: s}
477	return rs
478}
479
480type ConversionsService struct {
481	s *Service
482}
483
484func NewCountriesService(s *Service) *CountriesService {
485	rs := &CountriesService{s: s}
486	return rs
487}
488
489type CountriesService struct {
490	s *Service
491}
492
493func NewCreativeAssetsService(s *Service) *CreativeAssetsService {
494	rs := &CreativeAssetsService{s: s}
495	return rs
496}
497
498type CreativeAssetsService struct {
499	s *Service
500}
501
502func NewCreativeFieldValuesService(s *Service) *CreativeFieldValuesService {
503	rs := &CreativeFieldValuesService{s: s}
504	return rs
505}
506
507type CreativeFieldValuesService struct {
508	s *Service
509}
510
511func NewCreativeFieldsService(s *Service) *CreativeFieldsService {
512	rs := &CreativeFieldsService{s: s}
513	return rs
514}
515
516type CreativeFieldsService struct {
517	s *Service
518}
519
520func NewCreativeGroupsService(s *Service) *CreativeGroupsService {
521	rs := &CreativeGroupsService{s: s}
522	return rs
523}
524
525type CreativeGroupsService struct {
526	s *Service
527}
528
529func NewCreativesService(s *Service) *CreativesService {
530	rs := &CreativesService{s: s}
531	return rs
532}
533
534type CreativesService struct {
535	s *Service
536}
537
538func NewCustomEventsService(s *Service) *CustomEventsService {
539	rs := &CustomEventsService{s: s}
540	return rs
541}
542
543type CustomEventsService struct {
544	s *Service
545}
546
547func NewDimensionValuesService(s *Service) *DimensionValuesService {
548	rs := &DimensionValuesService{s: s}
549	return rs
550}
551
552type DimensionValuesService struct {
553	s *Service
554}
555
556func NewDirectorySitesService(s *Service) *DirectorySitesService {
557	rs := &DirectorySitesService{s: s}
558	return rs
559}
560
561type DirectorySitesService struct {
562	s *Service
563}
564
565func NewDynamicTargetingKeysService(s *Service) *DynamicTargetingKeysService {
566	rs := &DynamicTargetingKeysService{s: s}
567	return rs
568}
569
570type DynamicTargetingKeysService struct {
571	s *Service
572}
573
574func NewEventTagsService(s *Service) *EventTagsService {
575	rs := &EventTagsService{s: s}
576	return rs
577}
578
579type EventTagsService struct {
580	s *Service
581}
582
583func NewFilesService(s *Service) *FilesService {
584	rs := &FilesService{s: s}
585	return rs
586}
587
588type FilesService struct {
589	s *Service
590}
591
592func NewFloodlightActivitiesService(s *Service) *FloodlightActivitiesService {
593	rs := &FloodlightActivitiesService{s: s}
594	return rs
595}
596
597type FloodlightActivitiesService struct {
598	s *Service
599}
600
601func NewFloodlightActivityGroupsService(s *Service) *FloodlightActivityGroupsService {
602	rs := &FloodlightActivityGroupsService{s: s}
603	return rs
604}
605
606type FloodlightActivityGroupsService struct {
607	s *Service
608}
609
610func NewFloodlightConfigurationsService(s *Service) *FloodlightConfigurationsService {
611	rs := &FloodlightConfigurationsService{s: s}
612	return rs
613}
614
615type FloodlightConfigurationsService struct {
616	s *Service
617}
618
619func NewInventoryItemsService(s *Service) *InventoryItemsService {
620	rs := &InventoryItemsService{s: s}
621	return rs
622}
623
624type InventoryItemsService struct {
625	s *Service
626}
627
628func NewLanguagesService(s *Service) *LanguagesService {
629	rs := &LanguagesService{s: s}
630	return rs
631}
632
633type LanguagesService struct {
634	s *Service
635}
636
637func NewMetrosService(s *Service) *MetrosService {
638	rs := &MetrosService{s: s}
639	return rs
640}
641
642type MetrosService struct {
643	s *Service
644}
645
646func NewMobileAppsService(s *Service) *MobileAppsService {
647	rs := &MobileAppsService{s: s}
648	return rs
649}
650
651type MobileAppsService struct {
652	s *Service
653}
654
655func NewMobileCarriersService(s *Service) *MobileCarriersService {
656	rs := &MobileCarriersService{s: s}
657	return rs
658}
659
660type MobileCarriersService struct {
661	s *Service
662}
663
664func NewOperatingSystemVersionsService(s *Service) *OperatingSystemVersionsService {
665	rs := &OperatingSystemVersionsService{s: s}
666	return rs
667}
668
669type OperatingSystemVersionsService struct {
670	s *Service
671}
672
673func NewOperatingSystemsService(s *Service) *OperatingSystemsService {
674	rs := &OperatingSystemsService{s: s}
675	return rs
676}
677
678type OperatingSystemsService struct {
679	s *Service
680}
681
682func NewOrderDocumentsService(s *Service) *OrderDocumentsService {
683	rs := &OrderDocumentsService{s: s}
684	return rs
685}
686
687type OrderDocumentsService struct {
688	s *Service
689}
690
691func NewOrdersService(s *Service) *OrdersService {
692	rs := &OrdersService{s: s}
693	return rs
694}
695
696type OrdersService struct {
697	s *Service
698}
699
700func NewPlacementGroupsService(s *Service) *PlacementGroupsService {
701	rs := &PlacementGroupsService{s: s}
702	return rs
703}
704
705type PlacementGroupsService struct {
706	s *Service
707}
708
709func NewPlacementStrategiesService(s *Service) *PlacementStrategiesService {
710	rs := &PlacementStrategiesService{s: s}
711	return rs
712}
713
714type PlacementStrategiesService struct {
715	s *Service
716}
717
718func NewPlacementsService(s *Service) *PlacementsService {
719	rs := &PlacementsService{s: s}
720	return rs
721}
722
723type PlacementsService struct {
724	s *Service
725}
726
727func NewPlatformTypesService(s *Service) *PlatformTypesService {
728	rs := &PlatformTypesService{s: s}
729	return rs
730}
731
732type PlatformTypesService struct {
733	s *Service
734}
735
736func NewPostalCodesService(s *Service) *PostalCodesService {
737	rs := &PostalCodesService{s: s}
738	return rs
739}
740
741type PostalCodesService struct {
742	s *Service
743}
744
745func NewProjectsService(s *Service) *ProjectsService {
746	rs := &ProjectsService{s: s}
747	return rs
748}
749
750type ProjectsService struct {
751	s *Service
752}
753
754func NewRegionsService(s *Service) *RegionsService {
755	rs := &RegionsService{s: s}
756	return rs
757}
758
759type RegionsService struct {
760	s *Service
761}
762
763func NewRemarketingListSharesService(s *Service) *RemarketingListSharesService {
764	rs := &RemarketingListSharesService{s: s}
765	return rs
766}
767
768type RemarketingListSharesService struct {
769	s *Service
770}
771
772func NewRemarketingListsService(s *Service) *RemarketingListsService {
773	rs := &RemarketingListsService{s: s}
774	return rs
775}
776
777type RemarketingListsService struct {
778	s *Service
779}
780
781func NewReportsService(s *Service) *ReportsService {
782	rs := &ReportsService{s: s}
783	rs.CompatibleFields = NewReportsCompatibleFieldsService(s)
784	rs.Files = NewReportsFilesService(s)
785	return rs
786}
787
788type ReportsService struct {
789	s *Service
790
791	CompatibleFields *ReportsCompatibleFieldsService
792
793	Files *ReportsFilesService
794}
795
796func NewReportsCompatibleFieldsService(s *Service) *ReportsCompatibleFieldsService {
797	rs := &ReportsCompatibleFieldsService{s: s}
798	return rs
799}
800
801type ReportsCompatibleFieldsService struct {
802	s *Service
803}
804
805func NewReportsFilesService(s *Service) *ReportsFilesService {
806	rs := &ReportsFilesService{s: s}
807	return rs
808}
809
810type ReportsFilesService struct {
811	s *Service
812}
813
814func NewSitesService(s *Service) *SitesService {
815	rs := &SitesService{s: s}
816	return rs
817}
818
819type SitesService struct {
820	s *Service
821}
822
823func NewSizesService(s *Service) *SizesService {
824	rs := &SizesService{s: s}
825	return rs
826}
827
828type SizesService struct {
829	s *Service
830}
831
832func NewSubaccountsService(s *Service) *SubaccountsService {
833	rs := &SubaccountsService{s: s}
834	return rs
835}
836
837type SubaccountsService struct {
838	s *Service
839}
840
841func NewTargetableRemarketingListsService(s *Service) *TargetableRemarketingListsService {
842	rs := &TargetableRemarketingListsService{s: s}
843	return rs
844}
845
846type TargetableRemarketingListsService struct {
847	s *Service
848}
849
850func NewTargetingTemplatesService(s *Service) *TargetingTemplatesService {
851	rs := &TargetingTemplatesService{s: s}
852	return rs
853}
854
855type TargetingTemplatesService struct {
856	s *Service
857}
858
859func NewUserProfilesService(s *Service) *UserProfilesService {
860	rs := &UserProfilesService{s: s}
861	return rs
862}
863
864type UserProfilesService struct {
865	s *Service
866}
867
868func NewUserRolePermissionGroupsService(s *Service) *UserRolePermissionGroupsService {
869	rs := &UserRolePermissionGroupsService{s: s}
870	return rs
871}
872
873type UserRolePermissionGroupsService struct {
874	s *Service
875}
876
877func NewUserRolePermissionsService(s *Service) *UserRolePermissionsService {
878	rs := &UserRolePermissionsService{s: s}
879	return rs
880}
881
882type UserRolePermissionsService struct {
883	s *Service
884}
885
886func NewUserRolesService(s *Service) *UserRolesService {
887	rs := &UserRolesService{s: s}
888	return rs
889}
890
891type UserRolesService struct {
892	s *Service
893}
894
895func NewVideoFormatsService(s *Service) *VideoFormatsService {
896	rs := &VideoFormatsService{s: s}
897	return rs
898}
899
900type VideoFormatsService struct {
901	s *Service
902}
903
904// Account: Contains properties of a Campaign Manager account.
905type Account struct {
906	// AccountPermissionIds: Account permissions assigned to this account.
907	AccountPermissionIds googleapi.Int64s `json:"accountPermissionIds,omitempty"`
908
909	// AccountProfile: Profile for this account. This is a read-only field
910	// that can be left blank.
911	//
912	// Possible values:
913	//   "ACCOUNT_PROFILE_BASIC"
914	//   "ACCOUNT_PROFILE_STANDARD"
915	AccountProfile string `json:"accountProfile,omitempty"`
916
917	// Active: Whether this account is active.
918	Active bool `json:"active,omitempty"`
919
920	// ActiveAdsLimitTier: Maximum number of active ads allowed for this
921	// account.
922	//
923	// Possible values:
924	//   "ACTIVE_ADS_TIER_40K"
925	//   "ACTIVE_ADS_TIER_75K"
926	//   "ACTIVE_ADS_TIER_100K"
927	//   "ACTIVE_ADS_TIER_200K"
928	//   "ACTIVE_ADS_TIER_300K"
929	//   "ACTIVE_ADS_TIER_500K"
930	//   "ACTIVE_ADS_TIER_750K"
931	//   "ACTIVE_ADS_TIER_1M"
932	ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
933
934	// ActiveViewOptOut: Whether to serve creatives with Active View tags.
935	// If disabled, viewability data will not be available for any
936	// impressions.
937	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
938
939	// AvailablePermissionIds: User role permissions available to the user
940	// roles of this account.
941	AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
942
943	// CountryId: ID of the country associated with this account.
944	CountryId int64 `json:"countryId,omitempty,string"`
945
946	// CurrencyId: ID of currency associated with this account. This is a
947	// required field. Acceptable values are: - "1" for USD - "2" for GBP -
948	// "3" for ESP - "4" for SEK - "5" for CAD - "6" for JPY - "7" for DEM -
949	// "8" for AUD - "9" for FRF - "10" for ITL - "11" for DKK - "12" for
950	// NOK - "13" for FIM - "14" for ZAR - "15" for IEP - "16" for NLG -
951	// "17" for EUR - "18" for KRW - "19" for TWD - "20" for SGD - "21" for
952	// CNY - "22" for HKD - "23" for NZD - "24" for MYR - "25" for BRL -
953	// "26" for PTE - "28" for CLP - "29" for TRY - "30" for ARS - "31" for
954	// PEN - "32" for ILS - "33" for CHF - "34" for VEF - "35" for COP -
955	// "36" for GTQ - "37" for PLN - "39" for INR - "40" for THB - "41" for
956	// IDR - "42" for CZK - "43" for RON - "44" for HUF - "45" for RUB -
957	// "46" for AED - "47" for BGN - "48" for HRK - "49" for MXN - "50" for
958	// NGN - "51" for EGP
959	CurrencyId int64 `json:"currencyId,omitempty,string"`
960
961	// DefaultCreativeSizeId: Default placement dimensions for this account.
962	DefaultCreativeSizeId int64 `json:"defaultCreativeSizeId,omitempty,string"`
963
964	// Description: Description of this account.
965	Description string `json:"description,omitempty"`
966
967	// Id: ID of this account. This is a read-only, auto-generated field.
968	Id int64 `json:"id,omitempty,string"`
969
970	// Kind: Identifies what kind of resource this is. Value: the fixed
971	// string "dfareporting#account".
972	Kind string `json:"kind,omitempty"`
973
974	// Locale: Locale of this account. Acceptable values are: - "cs" (Czech)
975	// - "de" (German) - "en" (English) - "en-GB" (English United Kingdom) -
976	// "es" (Spanish) - "fr" (French) - "it" (Italian) - "ja" (Japanese) -
977	// "ko" (Korean) - "pl" (Polish) - "pt-BR" (Portuguese Brazil) - "ru"
978	// (Russian) - "sv" (Swedish) - "tr" (Turkish) - "zh-CN" (Chinese
979	// Simplified) - "zh-TW" (Chinese Traditional)
980	Locale string `json:"locale,omitempty"`
981
982	// MaximumImageSize: Maximum image size allowed for this account, in
983	// kilobytes. Value must be greater than or equal to 1.
984	MaximumImageSize int64 `json:"maximumImageSize,omitempty,string"`
985
986	// Name: Name of this account. This is a required field, and must be
987	// less than 128 characters long and be globally unique.
988	Name string `json:"name,omitempty"`
989
990	// NielsenOcrEnabled: Whether campaigns created in this account will be
991	// enabled for Nielsen OCR reach ratings by default.
992	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
993
994	// ReportsConfiguration: Reporting configuration of this account.
995	ReportsConfiguration *ReportsConfiguration `json:"reportsConfiguration,omitempty"`
996
997	// ShareReportsWithTwitter: Share Path to Conversion reports with
998	// Twitter.
999	ShareReportsWithTwitter bool `json:"shareReportsWithTwitter,omitempty"`
1000
1001	// TeaserSizeLimit: File size limit in kilobytes of Rich Media teaser
1002	// creatives. Acceptable values are 1 to 10240, inclusive.
1003	TeaserSizeLimit int64 `json:"teaserSizeLimit,omitempty,string"`
1004
1005	// ServerResponse contains the HTTP response code and headers from the
1006	// server.
1007	googleapi.ServerResponse `json:"-"`
1008
1009	// ForceSendFields is a list of field names (e.g.
1010	// "AccountPermissionIds") to unconditionally include in API requests.
1011	// By default, fields with empty values are omitted from API requests.
1012	// However, any non-pointer, non-interface field appearing in
1013	// ForceSendFields will be sent to the server regardless of whether the
1014	// field is empty or not. This may be used to include empty fields in
1015	// Patch requests.
1016	ForceSendFields []string `json:"-"`
1017
1018	// NullFields is a list of field names (e.g. "AccountPermissionIds") to
1019	// include in API requests with the JSON null value. By default, fields
1020	// with empty values are omitted from API requests. However, any field
1021	// with an empty value appearing in NullFields will be sent to the
1022	// server as null. It is an error if a field in this list has a
1023	// non-empty value. This may be used to include null fields in Patch
1024	// requests.
1025	NullFields []string `json:"-"`
1026}
1027
1028func (s *Account) MarshalJSON() ([]byte, error) {
1029	type NoMethod Account
1030	raw := NoMethod(*s)
1031	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1032}
1033
1034// AccountActiveAdSummary: Gets a summary of active ads in an account.
1035type AccountActiveAdSummary struct {
1036	// AccountId: ID of the account.
1037	AccountId int64 `json:"accountId,omitempty,string"`
1038
1039	// ActiveAds: Ads that have been activated for the account
1040	ActiveAds int64 `json:"activeAds,omitempty,string"`
1041
1042	// ActiveAdsLimitTier: Maximum number of active ads allowed for the
1043	// account.
1044	//
1045	// Possible values:
1046	//   "ACTIVE_ADS_TIER_40K"
1047	//   "ACTIVE_ADS_TIER_75K"
1048	//   "ACTIVE_ADS_TIER_100K"
1049	//   "ACTIVE_ADS_TIER_200K"
1050	//   "ACTIVE_ADS_TIER_300K"
1051	//   "ACTIVE_ADS_TIER_500K"
1052	//   "ACTIVE_ADS_TIER_750K"
1053	//   "ACTIVE_ADS_TIER_1M"
1054	ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
1055
1056	// AvailableAds: Ads that can be activated for the account.
1057	AvailableAds int64 `json:"availableAds,omitempty,string"`
1058
1059	// Kind: Identifies what kind of resource this is. Value: the fixed
1060	// string "dfareporting#accountActiveAdSummary".
1061	Kind string `json:"kind,omitempty"`
1062
1063	// ServerResponse contains the HTTP response code and headers from the
1064	// server.
1065	googleapi.ServerResponse `json:"-"`
1066
1067	// ForceSendFields is a list of field names (e.g. "AccountId") to
1068	// unconditionally include in API requests. By default, fields with
1069	// empty values are omitted from API requests. However, any non-pointer,
1070	// non-interface field appearing in ForceSendFields will be sent to the
1071	// server regardless of whether the field is empty or not. This may be
1072	// used to include empty fields in Patch requests.
1073	ForceSendFields []string `json:"-"`
1074
1075	// NullFields is a list of field names (e.g. "AccountId") to include in
1076	// API requests with the JSON null value. By default, fields with empty
1077	// values are omitted from API requests. However, any field with an
1078	// empty value appearing in NullFields will be sent to the server as
1079	// null. It is an error if a field in this list has a non-empty value.
1080	// This may be used to include null fields in Patch requests.
1081	NullFields []string `json:"-"`
1082}
1083
1084func (s *AccountActiveAdSummary) MarshalJSON() ([]byte, error) {
1085	type NoMethod AccountActiveAdSummary
1086	raw := NoMethod(*s)
1087	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1088}
1089
1090// AccountPermission: AccountPermissions contains information about a
1091// particular account permission. Some features of Campaign Manager
1092// require an account permission to be present in the account.
1093type AccountPermission struct {
1094	// AccountProfiles: Account profiles associated with this account
1095	// permission. Possible values are: - "ACCOUNT_PROFILE_BASIC" -
1096	// "ACCOUNT_PROFILE_STANDARD"
1097	//
1098	// Possible values:
1099	//   "ACCOUNT_PROFILE_BASIC"
1100	//   "ACCOUNT_PROFILE_STANDARD"
1101	AccountProfiles []string `json:"accountProfiles,omitempty"`
1102
1103	// Id: ID of this account permission.
1104	Id int64 `json:"id,omitempty,string"`
1105
1106	// Kind: Identifies what kind of resource this is. Value: the fixed
1107	// string "dfareporting#accountPermission".
1108	Kind string `json:"kind,omitempty"`
1109
1110	// Level: Administrative level required to enable this account
1111	// permission.
1112	//
1113	// Possible values:
1114	//   "USER"
1115	//   "ADMINISTRATOR"
1116	Level string `json:"level,omitempty"`
1117
1118	// Name: Name of this account permission.
1119	Name string `json:"name,omitempty"`
1120
1121	// PermissionGroupId: Permission group of this account permission.
1122	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
1123
1124	// ServerResponse contains the HTTP response code and headers from the
1125	// server.
1126	googleapi.ServerResponse `json:"-"`
1127
1128	// ForceSendFields is a list of field names (e.g. "AccountProfiles") to
1129	// unconditionally include in API requests. By default, fields with
1130	// empty values are omitted from API requests. However, any non-pointer,
1131	// non-interface field appearing in ForceSendFields will be sent to the
1132	// server regardless of whether the field is empty or not. This may be
1133	// used to include empty fields in Patch requests.
1134	ForceSendFields []string `json:"-"`
1135
1136	// NullFields is a list of field names (e.g. "AccountProfiles") to
1137	// include in API requests with the JSON null value. By default, fields
1138	// with empty values are omitted from API requests. However, any field
1139	// with an empty value appearing in NullFields will be sent to the
1140	// server as null. It is an error if a field in this list has a
1141	// non-empty value. This may be used to include null fields in Patch
1142	// requests.
1143	NullFields []string `json:"-"`
1144}
1145
1146func (s *AccountPermission) MarshalJSON() ([]byte, error) {
1147	type NoMethod AccountPermission
1148	raw := NoMethod(*s)
1149	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1150}
1151
1152// AccountPermissionGroup: AccountPermissionGroups contains a mapping of
1153// permission group IDs to names. A permission group is a grouping of
1154// account permissions.
1155type AccountPermissionGroup struct {
1156	// Id: ID of this account permission group.
1157	Id int64 `json:"id,omitempty,string"`
1158
1159	// Kind: Identifies what kind of resource this is. Value: the fixed
1160	// string "dfareporting#accountPermissionGroup".
1161	Kind string `json:"kind,omitempty"`
1162
1163	// Name: Name of this account permission group.
1164	Name string `json:"name,omitempty"`
1165
1166	// ServerResponse contains the HTTP response code and headers from the
1167	// server.
1168	googleapi.ServerResponse `json:"-"`
1169
1170	// ForceSendFields is a list of field names (e.g. "Id") to
1171	// unconditionally include in API requests. By default, fields with
1172	// empty values are omitted from API requests. However, any non-pointer,
1173	// non-interface field appearing in ForceSendFields will be sent to the
1174	// server regardless of whether the field is empty or not. This may be
1175	// used to include empty fields in Patch requests.
1176	ForceSendFields []string `json:"-"`
1177
1178	// NullFields is a list of field names (e.g. "Id") to include in API
1179	// requests with the JSON null value. By default, fields with empty
1180	// values are omitted from API requests. However, any field with an
1181	// empty value appearing in NullFields will be sent to the server as
1182	// null. It is an error if a field in this list has a non-empty value.
1183	// This may be used to include null fields in Patch requests.
1184	NullFields []string `json:"-"`
1185}
1186
1187func (s *AccountPermissionGroup) MarshalJSON() ([]byte, error) {
1188	type NoMethod AccountPermissionGroup
1189	raw := NoMethod(*s)
1190	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1191}
1192
1193// AccountPermissionGroupsListResponse: Account Permission Group List
1194// Response
1195type AccountPermissionGroupsListResponse struct {
1196	// AccountPermissionGroups: Account permission group collection.
1197	AccountPermissionGroups []*AccountPermissionGroup `json:"accountPermissionGroups,omitempty"`
1198
1199	// Kind: Identifies what kind of resource this is. Value: the fixed
1200	// string "dfareporting#accountPermissionGroupsListResponse".
1201	Kind string `json:"kind,omitempty"`
1202
1203	// ServerResponse contains the HTTP response code and headers from the
1204	// server.
1205	googleapi.ServerResponse `json:"-"`
1206
1207	// ForceSendFields is a list of field names (e.g.
1208	// "AccountPermissionGroups") to unconditionally include in API
1209	// requests. By default, fields with empty values are omitted from API
1210	// requests. However, any non-pointer, non-interface field appearing in
1211	// ForceSendFields will be sent to the server regardless of whether the
1212	// field is empty or not. This may be used to include empty fields in
1213	// Patch requests.
1214	ForceSendFields []string `json:"-"`
1215
1216	// NullFields is a list of field names (e.g. "AccountPermissionGroups")
1217	// to include in API requests with the JSON null value. By default,
1218	// fields with empty values are omitted from API requests. However, any
1219	// field with an empty value appearing in NullFields will be sent to the
1220	// server as null. It is an error if a field in this list has a
1221	// non-empty value. This may be used to include null fields in Patch
1222	// requests.
1223	NullFields []string `json:"-"`
1224}
1225
1226func (s *AccountPermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
1227	type NoMethod AccountPermissionGroupsListResponse
1228	raw := NoMethod(*s)
1229	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1230}
1231
1232// AccountPermissionsListResponse: Account Permission List Response
1233type AccountPermissionsListResponse struct {
1234	// AccountPermissions: Account permission collection.
1235	AccountPermissions []*AccountPermission `json:"accountPermissions,omitempty"`
1236
1237	// Kind: Identifies what kind of resource this is. Value: the fixed
1238	// string "dfareporting#accountPermissionsListResponse".
1239	Kind string `json:"kind,omitempty"`
1240
1241	// ServerResponse contains the HTTP response code and headers from the
1242	// server.
1243	googleapi.ServerResponse `json:"-"`
1244
1245	// ForceSendFields is a list of field names (e.g. "AccountPermissions")
1246	// to unconditionally include in API requests. By default, fields with
1247	// empty values are omitted from API requests. However, any non-pointer,
1248	// non-interface field appearing in ForceSendFields will be sent to the
1249	// server regardless of whether the field is empty or not. This may be
1250	// used to include empty fields in Patch requests.
1251	ForceSendFields []string `json:"-"`
1252
1253	// NullFields is a list of field names (e.g. "AccountPermissions") to
1254	// include in API requests with the JSON null value. By default, fields
1255	// with empty values are omitted from API requests. However, any field
1256	// with an empty value appearing in NullFields will be sent to the
1257	// server as null. It is an error if a field in this list has a
1258	// non-empty value. This may be used to include null fields in Patch
1259	// requests.
1260	NullFields []string `json:"-"`
1261}
1262
1263func (s *AccountPermissionsListResponse) MarshalJSON() ([]byte, error) {
1264	type NoMethod AccountPermissionsListResponse
1265	raw := NoMethod(*s)
1266	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1267}
1268
1269// AccountUserProfile: AccountUserProfiles contains properties of a
1270// Campaign Manager user profile. This resource is specifically for
1271// managing user profiles, whereas UserProfiles is for accessing the
1272// API.
1273type AccountUserProfile struct {
1274	// AccountId: Account ID of the user profile. This is a read-only field
1275	// that can be left blank.
1276	AccountId int64 `json:"accountId,omitempty,string"`
1277
1278	// Active: Whether this user profile is active. This defaults to false,
1279	// and must be set true on insert for the user profile to be usable.
1280	Active bool `json:"active,omitempty"`
1281
1282	// AdvertiserFilter: Filter that describes which advertisers are visible
1283	// to the user profile.
1284	AdvertiserFilter *ObjectFilter `json:"advertiserFilter,omitempty"`
1285
1286	// CampaignFilter: Filter that describes which campaigns are visible to
1287	// the user profile.
1288	CampaignFilter *ObjectFilter `json:"campaignFilter,omitempty"`
1289
1290	// Comments: Comments for this user profile.
1291	Comments string `json:"comments,omitempty"`
1292
1293	// Email: Email of the user profile. The email addresss must be linked
1294	// to a Google Account. This field is required on insertion and is
1295	// read-only after insertion.
1296	Email string `json:"email,omitempty"`
1297
1298	// Id: ID of the user profile. This is a read-only, auto-generated
1299	// field.
1300	Id int64 `json:"id,omitempty,string"`
1301
1302	// Kind: Identifies what kind of resource this is. Value: the fixed
1303	// string "dfareporting#accountUserProfile".
1304	Kind string `json:"kind,omitempty"`
1305
1306	// Locale: Locale of the user profile. This is a required field.
1307	// Acceptable values are: - "cs" (Czech) - "de" (German) - "en"
1308	// (English) - "en-GB" (English United Kingdom) - "es" (Spanish) - "fr"
1309	// (French) - "it" (Italian) - "ja" (Japanese) - "ko" (Korean) - "pl"
1310	// (Polish) - "pt-BR" (Portuguese Brazil) - "ru" (Russian) - "sv"
1311	// (Swedish) - "tr" (Turkish) - "zh-CN" (Chinese Simplified) - "zh-TW"
1312	// (Chinese Traditional)
1313	Locale string `json:"locale,omitempty"`
1314
1315	// Name: Name of the user profile. This is a required field. Must be
1316	// less than 64 characters long, must be globally unique, and cannot
1317	// contain whitespace or any of the following characters: "&;<>"#%,".
1318	Name string `json:"name,omitempty"`
1319
1320	// SiteFilter: Filter that describes which sites are visible to the user
1321	// profile.
1322	SiteFilter *ObjectFilter `json:"siteFilter,omitempty"`
1323
1324	// SubaccountId: Subaccount ID of the user profile. This is a read-only
1325	// field that can be left blank.
1326	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1327
1328	// TraffickerType: Trafficker type of this user profile. This is a
1329	// read-only field.
1330	//
1331	// Possible values:
1332	//   "INTERNAL_NON_TRAFFICKER"
1333	//   "INTERNAL_TRAFFICKER"
1334	//   "EXTERNAL_TRAFFICKER"
1335	TraffickerType string `json:"traffickerType,omitempty"`
1336
1337	// UserAccessType: User type of the user profile. This is a read-only
1338	// field that can be left blank.
1339	//
1340	// Possible values:
1341	//   "NORMAL_USER"
1342	//   "SUPER_USER"
1343	//   "INTERNAL_ADMINISTRATOR"
1344	//   "READ_ONLY_SUPER_USER"
1345	UserAccessType string `json:"userAccessType,omitempty"`
1346
1347	// UserRoleFilter: Filter that describes which user roles are visible to
1348	// the user profile.
1349	UserRoleFilter *ObjectFilter `json:"userRoleFilter,omitempty"`
1350
1351	// UserRoleId: User role ID of the user profile. This is a required
1352	// field.
1353	UserRoleId int64 `json:"userRoleId,omitempty,string"`
1354
1355	// ServerResponse contains the HTTP response code and headers from the
1356	// server.
1357	googleapi.ServerResponse `json:"-"`
1358
1359	// ForceSendFields is a list of field names (e.g. "AccountId") to
1360	// unconditionally include in API requests. By default, fields with
1361	// empty values are omitted from API requests. However, any non-pointer,
1362	// non-interface field appearing in ForceSendFields will be sent to the
1363	// server regardless of whether the field is empty or not. This may be
1364	// used to include empty fields in Patch requests.
1365	ForceSendFields []string `json:"-"`
1366
1367	// NullFields is a list of field names (e.g. "AccountId") to include in
1368	// API requests with the JSON null value. By default, fields with empty
1369	// values are omitted from API requests. However, any field with an
1370	// empty value appearing in NullFields will be sent to the server as
1371	// null. It is an error if a field in this list has a non-empty value.
1372	// This may be used to include null fields in Patch requests.
1373	NullFields []string `json:"-"`
1374}
1375
1376func (s *AccountUserProfile) MarshalJSON() ([]byte, error) {
1377	type NoMethod AccountUserProfile
1378	raw := NoMethod(*s)
1379	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1380}
1381
1382// AccountUserProfilesListResponse: Account User Profile List Response
1383type AccountUserProfilesListResponse struct {
1384	// AccountUserProfiles: Account user profile collection.
1385	AccountUserProfiles []*AccountUserProfile `json:"accountUserProfiles,omitempty"`
1386
1387	// Kind: Identifies what kind of resource this is. Value: the fixed
1388	// string "dfareporting#accountUserProfilesListResponse".
1389	Kind string `json:"kind,omitempty"`
1390
1391	// NextPageToken: Pagination token to be used for the next list
1392	// operation.
1393	NextPageToken string `json:"nextPageToken,omitempty"`
1394
1395	// ServerResponse contains the HTTP response code and headers from the
1396	// server.
1397	googleapi.ServerResponse `json:"-"`
1398
1399	// ForceSendFields is a list of field names (e.g. "AccountUserProfiles")
1400	// to unconditionally include in API requests. By default, fields with
1401	// empty values are omitted from API requests. However, any non-pointer,
1402	// non-interface field appearing in ForceSendFields will be sent to the
1403	// server regardless of whether the field is empty or not. This may be
1404	// used to include empty fields in Patch requests.
1405	ForceSendFields []string `json:"-"`
1406
1407	// NullFields is a list of field names (e.g. "AccountUserProfiles") to
1408	// include in API requests with the JSON null value. By default, fields
1409	// with empty values are omitted from API requests. However, any field
1410	// with an empty value appearing in NullFields will be sent to the
1411	// server as null. It is an error if a field in this list has a
1412	// non-empty value. This may be used to include null fields in Patch
1413	// requests.
1414	NullFields []string `json:"-"`
1415}
1416
1417func (s *AccountUserProfilesListResponse) MarshalJSON() ([]byte, error) {
1418	type NoMethod AccountUserProfilesListResponse
1419	raw := NoMethod(*s)
1420	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1421}
1422
1423// AccountsListResponse: Account List Response
1424type AccountsListResponse struct {
1425	// Accounts: Account collection.
1426	Accounts []*Account `json:"accounts,omitempty"`
1427
1428	// Kind: Identifies what kind of resource this is. Value: the fixed
1429	// string "dfareporting#accountsListResponse".
1430	Kind string `json:"kind,omitempty"`
1431
1432	// NextPageToken: Pagination token to be used for the next list
1433	// operation.
1434	NextPageToken string `json:"nextPageToken,omitempty"`
1435
1436	// ServerResponse contains the HTTP response code and headers from the
1437	// server.
1438	googleapi.ServerResponse `json:"-"`
1439
1440	// ForceSendFields is a list of field names (e.g. "Accounts") to
1441	// unconditionally include in API requests. By default, fields with
1442	// empty values are omitted from API requests. However, any non-pointer,
1443	// non-interface field appearing in ForceSendFields will be sent to the
1444	// server regardless of whether the field is empty or not. This may be
1445	// used to include empty fields in Patch requests.
1446	ForceSendFields []string `json:"-"`
1447
1448	// NullFields is a list of field names (e.g. "Accounts") to include in
1449	// API requests with the JSON null value. By default, fields with empty
1450	// values are omitted from API requests. However, any field with an
1451	// empty value appearing in NullFields will be sent to the server as
1452	// null. It is an error if a field in this list has a non-empty value.
1453	// This may be used to include null fields in Patch requests.
1454	NullFields []string `json:"-"`
1455}
1456
1457func (s *AccountsListResponse) MarshalJSON() ([]byte, error) {
1458	type NoMethod AccountsListResponse
1459	raw := NoMethod(*s)
1460	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1461}
1462
1463// Activities: Represents an activity group.
1464type Activities struct {
1465	// Filters: List of activity filters. The dimension values need to be
1466	// all either of type "dfa:activity" or "dfa:activityGroup".
1467	Filters []*DimensionValue `json:"filters,omitempty"`
1468
1469	// Kind: The kind of resource this is, in this case
1470	// dfareporting#activities.
1471	Kind string `json:"kind,omitempty"`
1472
1473	// MetricNames: List of names of floodlight activity metrics.
1474	MetricNames []string `json:"metricNames,omitempty"`
1475
1476	// ForceSendFields is a list of field names (e.g. "Filters") to
1477	// unconditionally include in API requests. By default, fields with
1478	// empty values are omitted from API requests. However, any non-pointer,
1479	// non-interface field appearing in ForceSendFields will be sent to the
1480	// server regardless of whether the field is empty or not. This may be
1481	// used to include empty fields in Patch requests.
1482	ForceSendFields []string `json:"-"`
1483
1484	// NullFields is a list of field names (e.g. "Filters") to include in
1485	// API requests with the JSON null value. By default, fields with empty
1486	// values are omitted from API requests. However, any field with an
1487	// empty value appearing in NullFields will be sent to the server as
1488	// null. It is an error if a field in this list has a non-empty value.
1489	// This may be used to include null fields in Patch requests.
1490	NullFields []string `json:"-"`
1491}
1492
1493func (s *Activities) MarshalJSON() ([]byte, error) {
1494	type NoMethod Activities
1495	raw := NoMethod(*s)
1496	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1497}
1498
1499// Ad: Contains properties of a Campaign Manager ad.
1500type Ad struct {
1501	// AccountId: Account ID of this ad. This is a read-only field that can
1502	// be left blank.
1503	AccountId int64 `json:"accountId,omitempty,string"`
1504
1505	// Active: Whether this ad is active. When true, archived must be false.
1506	Active bool `json:"active,omitempty"`
1507
1508	// AdvertiserId: Advertiser ID of this ad. This is a required field on
1509	// insertion.
1510	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
1511
1512	// AdvertiserIdDimensionValue: Dimension value for the ID of the
1513	// advertiser. This is a read-only, auto-generated field.
1514	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
1515
1516	// Archived: Whether this ad is archived. When true, active must be
1517	// false.
1518	Archived bool `json:"archived,omitempty"`
1519
1520	// AudienceSegmentId: Audience segment ID that is being targeted for
1521	// this ad. Applicable when type is AD_SERVING_STANDARD_AD.
1522	AudienceSegmentId int64 `json:"audienceSegmentId,omitempty,string"`
1523
1524	// CampaignId: Campaign ID of this ad. This is a required field on
1525	// insertion.
1526	CampaignId int64 `json:"campaignId,omitempty,string"`
1527
1528	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
1529	// This is a read-only, auto-generated field.
1530	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
1531
1532	// ClickThroughUrl: Click-through URL for this ad. This is a required
1533	// field on insertion. Applicable when type is AD_SERVING_CLICK_TRACKER.
1534	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
1535
1536	// ClickThroughUrlSuffixProperties: Click-through URL suffix properties
1537	// for this ad. Applies to the URL in the ad or (if overriding ad
1538	// properties) the URL in the creative.
1539	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
1540
1541	// Comments: Comments for this ad.
1542	Comments string `json:"comments,omitempty"`
1543
1544	// Compatibility: Compatibility of this ad. Applicable when type is
1545	// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
1546	// either rendering on desktop or on mobile devices or in mobile apps
1547	// for regular or interstitial ads, respectively. APP and
1548	// APP_INTERSTITIAL are only used for existing default ads. New mobile
1549	// placements must be assigned DISPLAY or DISPLAY_INTERSTITIAL and
1550	// default ads created for those placements will be limited to those
1551	// compatibility types. IN_STREAM_VIDEO refers to rendering in-stream
1552	// video ads developed with the VAST standard.
1553	//
1554	// Possible values:
1555	//   "DISPLAY"
1556	//   "DISPLAY_INTERSTITIAL"
1557	//   "APP"
1558	//   "APP_INTERSTITIAL"
1559	//   "IN_STREAM_VIDEO"
1560	//   "IN_STREAM_AUDIO"
1561	Compatibility string `json:"compatibility,omitempty"`
1562
1563	// CreateInfo: Information about the creation of this ad. This is a
1564	// read-only field.
1565	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
1566
1567	// CreativeGroupAssignments: Creative group assignments for this ad.
1568	// Applicable when type is AD_SERVING_CLICK_TRACKER. Only one assignment
1569	// per creative group number is allowed for a maximum of two
1570	// assignments.
1571	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
1572
1573	// CreativeRotation: Creative rotation for this ad. Applicable when type
1574	// is AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or
1575	// AD_SERVING_TRACKING. When type is AD_SERVING_DEFAULT_AD, this field
1576	// should have exactly one creativeAssignment .
1577	CreativeRotation *CreativeRotation `json:"creativeRotation,omitempty"`
1578
1579	// DayPartTargeting: Time and day targeting information for this ad.
1580	// This field must be left blank if the ad is using a targeting
1581	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1582	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
1583
1584	// DefaultClickThroughEventTagProperties: Default click-through event
1585	// tag properties for this ad.
1586	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
1587
1588	// DeliverySchedule: Delivery schedule information for this ad.
1589	// Applicable when type is AD_SERVING_STANDARD_AD or
1590	// AD_SERVING_TRACKING. This field along with subfields priority and
1591	// impressionRatio are required on insertion when type is
1592	// AD_SERVING_STANDARD_AD.
1593	DeliverySchedule *DeliverySchedule `json:"deliverySchedule,omitempty"`
1594
1595	// DynamicClickTracker: Whether this ad is a dynamic click tracker.
1596	// Applicable when type is AD_SERVING_CLICK_TRACKER. This is a required
1597	// field on insert, and is read-only after insert.
1598	DynamicClickTracker bool `json:"dynamicClickTracker,omitempty"`
1599
1600	EndTime string `json:"endTime,omitempty"`
1601
1602	// EventTagOverrides: Event tag overrides for this ad.
1603	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
1604
1605	// GeoTargeting: Geographical targeting information for this ad. This
1606	// field must be left blank if the ad is using a targeting template.
1607	// Applicable when type is AD_SERVING_STANDARD_AD.
1608	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
1609
1610	// Id: ID of this ad. This is a read-only, auto-generated field.
1611	Id int64 `json:"id,omitempty,string"`
1612
1613	// IdDimensionValue: Dimension value for the ID of this ad. This is a
1614	// read-only, auto-generated field.
1615	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1616
1617	// KeyValueTargetingExpression: Key-value targeting information for this
1618	// ad. This field must be left blank if the ad is using a targeting
1619	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1620	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
1621
1622	// Kind: Identifies what kind of resource this is. Value: the fixed
1623	// string "dfareporting#ad".
1624	Kind string `json:"kind,omitempty"`
1625
1626	// LanguageTargeting: Language targeting information for this ad. This
1627	// field must be left blank if the ad is using a targeting template.
1628	// Applicable when type is AD_SERVING_STANDARD_AD.
1629	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
1630
1631	// LastModifiedInfo: Information about the most recent modification of
1632	// this ad. This is a read-only field.
1633	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
1634
1635	// Name: Name of this ad. This is a required field and must be less than
1636	// 256 characters long.
1637	Name string `json:"name,omitempty"`
1638
1639	// PlacementAssignments: Placement assignments for this ad.
1640	PlacementAssignments []*PlacementAssignment `json:"placementAssignments,omitempty"`
1641
1642	// RemarketingListExpression: Remarketing list targeting expression for
1643	// this ad. This field must be left blank if the ad is using a targeting
1644	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1645	RemarketingListExpression *ListTargetingExpression `json:"remarketingListExpression,omitempty"`
1646
1647	// Size: Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD.
1648	Size *Size `json:"size,omitempty"`
1649
1650	// SslCompliant: Whether this ad is ssl compliant. This is a read-only
1651	// field that is auto-generated when the ad is inserted or updated.
1652	SslCompliant bool `json:"sslCompliant,omitempty"`
1653
1654	// SslRequired: Whether this ad requires ssl. This is a read-only field
1655	// that is auto-generated when the ad is inserted or updated.
1656	SslRequired bool `json:"sslRequired,omitempty"`
1657
1658	StartTime string `json:"startTime,omitempty"`
1659
1660	// SubaccountId: Subaccount ID of this ad. This is a read-only field
1661	// that can be left blank.
1662	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1663
1664	// TargetingTemplateId: Targeting template ID, used to apply
1665	// preconfigured targeting information to this ad. This cannot be set
1666	// while any of dayPartTargeting, geoTargeting,
1667	// keyValueTargetingExpression, languageTargeting,
1668	// remarketingListExpression, or technologyTargeting are set. Applicable
1669	// when type is AD_SERVING_STANDARD_AD.
1670	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
1671
1672	// TechnologyTargeting: Technology platform targeting information for
1673	// this ad. This field must be left blank if the ad is using a targeting
1674	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1675	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
1676
1677	// Type: Type of ad. This is a required field on insertion. Note that
1678	// default ads ( AD_SERVING_DEFAULT_AD) cannot be created directly (see
1679	// Creative resource).
1680	//
1681	// Possible values:
1682	//   "AD_SERVING_STANDARD_AD"
1683	//   "AD_SERVING_DEFAULT_AD"
1684	//   "AD_SERVING_CLICK_TRACKER"
1685	//   "AD_SERVING_TRACKING"
1686	//   "AD_SERVING_BRAND_SAFE_AD"
1687	Type string `json:"type,omitempty"`
1688
1689	// ServerResponse contains the HTTP response code and headers from the
1690	// server.
1691	googleapi.ServerResponse `json:"-"`
1692
1693	// ForceSendFields is a list of field names (e.g. "AccountId") to
1694	// unconditionally include in API requests. By default, fields with
1695	// empty values are omitted from API requests. However, any non-pointer,
1696	// non-interface field appearing in ForceSendFields will be sent to the
1697	// server regardless of whether the field is empty or not. This may be
1698	// used to include empty fields in Patch requests.
1699	ForceSendFields []string `json:"-"`
1700
1701	// NullFields is a list of field names (e.g. "AccountId") to include in
1702	// API requests with the JSON null value. By default, fields with empty
1703	// values are omitted from API requests. However, any field with an
1704	// empty value appearing in NullFields will be sent to the server as
1705	// null. It is an error if a field in this list has a non-empty value.
1706	// This may be used to include null fields in Patch requests.
1707	NullFields []string `json:"-"`
1708}
1709
1710func (s *Ad) MarshalJSON() ([]byte, error) {
1711	type NoMethod Ad
1712	raw := NoMethod(*s)
1713	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1714}
1715
1716// AdBlockingConfiguration: Campaign ad blocking settings.
1717type AdBlockingConfiguration struct {
1718	// ClickThroughUrl: Click-through URL used by brand-neutral ads. This is
1719	// a required field when overrideClickThroughUrl is set to true.
1720	ClickThroughUrl string `json:"clickThroughUrl,omitempty"`
1721
1722	// CreativeBundleId: ID of a creative bundle to use for this campaign.
1723	// If set, brand-neutral ads will select creatives from this bundle.
1724	// Otherwise, a default transparent pixel will be used.
1725	CreativeBundleId int64 `json:"creativeBundleId,omitempty,string"`
1726
1727	// Enabled: Whether this campaign has enabled ad blocking. When true, ad
1728	// blocking is enabled for placements in the campaign, but this may be
1729	// overridden by site and placement settings. When false, ad blocking is
1730	// disabled for all placements under the campaign, regardless of site
1731	// and placement settings.
1732	Enabled bool `json:"enabled,omitempty"`
1733
1734	// OverrideClickThroughUrl: Whether the brand-neutral ad's click-through
1735	// URL comes from the campaign's creative bundle or the override URL.
1736	// Must be set to true if ad blocking is enabled and no creative bundle
1737	// is configured.
1738	OverrideClickThroughUrl bool `json:"overrideClickThroughUrl,omitempty"`
1739
1740	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
1741	// unconditionally include in API requests. By default, fields with
1742	// empty values are omitted from API requests. However, any non-pointer,
1743	// non-interface field appearing in ForceSendFields will be sent to the
1744	// server regardless of whether the field is empty or not. This may be
1745	// used to include empty fields in Patch requests.
1746	ForceSendFields []string `json:"-"`
1747
1748	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
1749	// include in API requests with the JSON null value. By default, fields
1750	// with empty values are omitted from API requests. However, any field
1751	// with an empty value appearing in NullFields will be sent to the
1752	// server as null. It is an error if a field in this list has a
1753	// non-empty value. This may be used to include null fields in Patch
1754	// requests.
1755	NullFields []string `json:"-"`
1756}
1757
1758func (s *AdBlockingConfiguration) MarshalJSON() ([]byte, error) {
1759	type NoMethod AdBlockingConfiguration
1760	raw := NoMethod(*s)
1761	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1762}
1763
1764// AdSlot: Ad Slot
1765type AdSlot struct {
1766	// Comment: Comment for this ad slot.
1767	Comment string `json:"comment,omitempty"`
1768
1769	// Compatibility: Ad slot compatibility. DISPLAY and
1770	// DISPLAY_INTERSTITIAL refer to rendering either on desktop, mobile
1771	// devices or in mobile apps for regular or interstitial ads
1772	// respectively. APP and APP_INTERSTITIAL are for rendering in mobile
1773	// apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads
1774	// developed with the VAST standard.
1775	//
1776	// Possible values:
1777	//   "DISPLAY"
1778	//   "DISPLAY_INTERSTITIAL"
1779	//   "APP"
1780	//   "APP_INTERSTITIAL"
1781	//   "IN_STREAM_VIDEO"
1782	//   "IN_STREAM_AUDIO"
1783	Compatibility string `json:"compatibility,omitempty"`
1784
1785	// Height: Height of this ad slot.
1786	Height int64 `json:"height,omitempty,string"`
1787
1788	// LinkedPlacementId: ID of the placement from an external platform that
1789	// is linked to this ad slot.
1790	LinkedPlacementId int64 `json:"linkedPlacementId,omitempty,string"`
1791
1792	// Name: Name of this ad slot.
1793	Name string `json:"name,omitempty"`
1794
1795	// PaymentSourceType: Payment source type of this ad slot.
1796	//
1797	// Possible values:
1798	//   "PLANNING_PAYMENT_SOURCE_TYPE_AGENCY_PAID"
1799	//   "PLANNING_PAYMENT_SOURCE_TYPE_PUBLISHER_PAID"
1800	PaymentSourceType string `json:"paymentSourceType,omitempty"`
1801
1802	// Primary: Primary ad slot of a roadblock inventory item.
1803	Primary bool `json:"primary,omitempty"`
1804
1805	// Width: Width of this ad slot.
1806	Width int64 `json:"width,omitempty,string"`
1807
1808	// ForceSendFields is a list of field names (e.g. "Comment") to
1809	// unconditionally include in API requests. By default, fields with
1810	// empty values are omitted from API requests. However, any non-pointer,
1811	// non-interface field appearing in ForceSendFields will be sent to the
1812	// server regardless of whether the field is empty or not. This may be
1813	// used to include empty fields in Patch requests.
1814	ForceSendFields []string `json:"-"`
1815
1816	// NullFields is a list of field names (e.g. "Comment") to include in
1817	// API requests with the JSON null value. By default, fields with empty
1818	// values are omitted from API requests. However, any field with an
1819	// empty value appearing in NullFields will be sent to the server as
1820	// null. It is an error if a field in this list has a non-empty value.
1821	// This may be used to include null fields in Patch requests.
1822	NullFields []string `json:"-"`
1823}
1824
1825func (s *AdSlot) MarshalJSON() ([]byte, error) {
1826	type NoMethod AdSlot
1827	raw := NoMethod(*s)
1828	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1829}
1830
1831// AdsListResponse: Ad List Response
1832type AdsListResponse struct {
1833	// Ads: Ad collection.
1834	Ads []*Ad `json:"ads,omitempty"`
1835
1836	// Kind: Identifies what kind of resource this is. Value: the fixed
1837	// string "dfareporting#adsListResponse".
1838	Kind string `json:"kind,omitempty"`
1839
1840	// NextPageToken: Pagination token to be used for the next list
1841	// operation.
1842	NextPageToken string `json:"nextPageToken,omitempty"`
1843
1844	// ServerResponse contains the HTTP response code and headers from the
1845	// server.
1846	googleapi.ServerResponse `json:"-"`
1847
1848	// ForceSendFields is a list of field names (e.g. "Ads") to
1849	// unconditionally include in API requests. By default, fields with
1850	// empty values are omitted from API requests. However, any non-pointer,
1851	// non-interface field appearing in ForceSendFields will be sent to the
1852	// server regardless of whether the field is empty or not. This may be
1853	// used to include empty fields in Patch requests.
1854	ForceSendFields []string `json:"-"`
1855
1856	// NullFields is a list of field names (e.g. "Ads") to include in API
1857	// requests with the JSON null value. By default, fields with empty
1858	// values are omitted from API requests. However, any field with an
1859	// empty value appearing in NullFields will be sent to the server as
1860	// null. It is an error if a field in this list has a non-empty value.
1861	// This may be used to include null fields in Patch requests.
1862	NullFields []string `json:"-"`
1863}
1864
1865func (s *AdsListResponse) MarshalJSON() ([]byte, error) {
1866	type NoMethod AdsListResponse
1867	raw := NoMethod(*s)
1868	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1869}
1870
1871// Advertiser: Contains properties of a Campaign Manager advertiser.
1872type Advertiser struct {
1873	// AccountId: Account ID of this advertiser.This is a read-only field
1874	// that can be left blank.
1875	AccountId int64 `json:"accountId,omitempty,string"`
1876
1877	// AdvertiserGroupId: ID of the advertiser group this advertiser belongs
1878	// to. You can group advertisers for reporting purposes, allowing you to
1879	// see aggregated information for all advertisers in each group.
1880	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
1881
1882	// ClickThroughUrlSuffix: Suffix added to click-through URL of ad
1883	// creative associations under this advertiser. Must be less than 129
1884	// characters long.
1885	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
1886
1887	// DefaultClickThroughEventTagId: ID of the click-through event tag to
1888	// apply by default to the landing pages of this advertiser's campaigns.
1889	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
1890
1891	// DefaultEmail: Default email address used in sender field for tag
1892	// emails.
1893	DefaultEmail string `json:"defaultEmail,omitempty"`
1894
1895	// FloodlightConfigurationId: Floodlight configuration ID of this
1896	// advertiser. The floodlight configuration ID will be created
1897	// automatically, so on insert this field should be left blank. This
1898	// field can be set to another advertiser's floodlight configuration ID
1899	// in order to share that advertiser's floodlight configuration with
1900	// this advertiser, so long as: - This advertiser's original floodlight
1901	// configuration is not already associated with floodlight activities or
1902	// floodlight activity groups. - This advertiser's original floodlight
1903	// configuration is not already shared with another advertiser.
1904	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
1905
1906	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
1907	// of the floodlight configuration. This is a read-only, auto-generated
1908	// field.
1909	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
1910
1911	// Id: ID of this advertiser. This is a read-only, auto-generated field.
1912	Id int64 `json:"id,omitempty,string"`
1913
1914	// IdDimensionValue: Dimension value for the ID of this advertiser. This
1915	// is a read-only, auto-generated field.
1916	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1917
1918	// Kind: Identifies what kind of resource this is. Value: the fixed
1919	// string "dfareporting#advertiser".
1920	Kind string `json:"kind,omitempty"`
1921
1922	// Name: Name of this advertiser. This is a required field and must be
1923	// less than 256 characters long and unique among advertisers of the
1924	// same account.
1925	Name string `json:"name,omitempty"`
1926
1927	// OriginalFloodlightConfigurationId: Original floodlight configuration
1928	// before any sharing occurred. Set the floodlightConfigurationId of
1929	// this advertiser to originalFloodlightConfigurationId to unshare the
1930	// advertiser's current floodlight configuration. You cannot unshare an
1931	// advertiser's floodlight configuration if the shared configuration has
1932	// activities associated with any campaign or placement.
1933	OriginalFloodlightConfigurationId int64 `json:"originalFloodlightConfigurationId,omitempty,string"`
1934
1935	// Status: Status of this advertiser.
1936	//
1937	// Possible values:
1938	//   "APPROVED"
1939	//   "ON_HOLD"
1940	Status string `json:"status,omitempty"`
1941
1942	// SubaccountId: Subaccount ID of this advertiser.This is a read-only
1943	// field that can be left blank.
1944	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1945
1946	// Suspended: Suspension status of this advertiser.
1947	Suspended bool `json:"suspended,omitempty"`
1948
1949	// ServerResponse contains the HTTP response code and headers from the
1950	// server.
1951	googleapi.ServerResponse `json:"-"`
1952
1953	// ForceSendFields is a list of field names (e.g. "AccountId") to
1954	// unconditionally include in API requests. By default, fields with
1955	// empty values are omitted from API requests. However, any non-pointer,
1956	// non-interface field appearing in ForceSendFields will be sent to the
1957	// server regardless of whether the field is empty or not. This may be
1958	// used to include empty fields in Patch requests.
1959	ForceSendFields []string `json:"-"`
1960
1961	// NullFields is a list of field names (e.g. "AccountId") to include in
1962	// API requests with the JSON null value. By default, fields with empty
1963	// values are omitted from API requests. However, any field with an
1964	// empty value appearing in NullFields will be sent to the server as
1965	// null. It is an error if a field in this list has a non-empty value.
1966	// This may be used to include null fields in Patch requests.
1967	NullFields []string `json:"-"`
1968}
1969
1970func (s *Advertiser) MarshalJSON() ([]byte, error) {
1971	type NoMethod Advertiser
1972	raw := NoMethod(*s)
1973	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1974}
1975
1976// AdvertiserGroup: Groups advertisers together so that reports can be
1977// generated for the entire group at once.
1978type AdvertiserGroup struct {
1979	// AccountId: Account ID of this advertiser group. This is a read-only
1980	// field that can be left blank.
1981	AccountId int64 `json:"accountId,omitempty,string"`
1982
1983	// Id: ID of this advertiser group. This is a read-only, auto-generated
1984	// field.
1985	Id int64 `json:"id,omitempty,string"`
1986
1987	// Kind: Identifies what kind of resource this is. Value: the fixed
1988	// string "dfareporting#advertiserGroup".
1989	Kind string `json:"kind,omitempty"`
1990
1991	// Name: Name of this advertiser group. This is a required field and
1992	// must be less than 256 characters long and unique among advertiser
1993	// groups of the same account.
1994	Name string `json:"name,omitempty"`
1995
1996	// ServerResponse contains the HTTP response code and headers from the
1997	// server.
1998	googleapi.ServerResponse `json:"-"`
1999
2000	// ForceSendFields is a list of field names (e.g. "AccountId") to
2001	// unconditionally include in API requests. By default, fields with
2002	// empty values are omitted from API requests. However, any non-pointer,
2003	// non-interface field appearing in ForceSendFields will be sent to the
2004	// server regardless of whether the field is empty or not. This may be
2005	// used to include empty fields in Patch requests.
2006	ForceSendFields []string `json:"-"`
2007
2008	// NullFields is a list of field names (e.g. "AccountId") to include in
2009	// API requests with the JSON null value. By default, fields with empty
2010	// values are omitted from API requests. However, any field with an
2011	// empty value appearing in NullFields will be sent to the server as
2012	// null. It is an error if a field in this list has a non-empty value.
2013	// This may be used to include null fields in Patch requests.
2014	NullFields []string `json:"-"`
2015}
2016
2017func (s *AdvertiserGroup) MarshalJSON() ([]byte, error) {
2018	type NoMethod AdvertiserGroup
2019	raw := NoMethod(*s)
2020	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2021}
2022
2023// AdvertiserGroupsListResponse: Advertiser Group List Response
2024type AdvertiserGroupsListResponse struct {
2025	// AdvertiserGroups: Advertiser group collection.
2026	AdvertiserGroups []*AdvertiserGroup `json:"advertiserGroups,omitempty"`
2027
2028	// Kind: Identifies what kind of resource this is. Value: the fixed
2029	// string "dfareporting#advertiserGroupsListResponse".
2030	Kind string `json:"kind,omitempty"`
2031
2032	// NextPageToken: Pagination token to be used for the next list
2033	// operation.
2034	NextPageToken string `json:"nextPageToken,omitempty"`
2035
2036	// ServerResponse contains the HTTP response code and headers from the
2037	// server.
2038	googleapi.ServerResponse `json:"-"`
2039
2040	// ForceSendFields is a list of field names (e.g. "AdvertiserGroups") to
2041	// unconditionally include in API requests. By default, fields with
2042	// empty values are omitted from API requests. However, any non-pointer,
2043	// non-interface field appearing in ForceSendFields will be sent to the
2044	// server regardless of whether the field is empty or not. This may be
2045	// used to include empty fields in Patch requests.
2046	ForceSendFields []string `json:"-"`
2047
2048	// NullFields is a list of field names (e.g. "AdvertiserGroups") to
2049	// include in API requests with the JSON null value. By default, fields
2050	// with empty values are omitted from API requests. However, any field
2051	// with an empty value appearing in NullFields will be sent to the
2052	// server as null. It is an error if a field in this list has a
2053	// non-empty value. This may be used to include null fields in Patch
2054	// requests.
2055	NullFields []string `json:"-"`
2056}
2057
2058func (s *AdvertiserGroupsListResponse) MarshalJSON() ([]byte, error) {
2059	type NoMethod AdvertiserGroupsListResponse
2060	raw := NoMethod(*s)
2061	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2062}
2063
2064// AdvertiserLandingPagesListResponse: Landing Page List Response
2065type AdvertiserLandingPagesListResponse struct {
2066	// Kind: Identifies what kind of resource this is. Value: the fixed
2067	// string "dfareporting#advertiserLandingPagesListResponse".
2068	Kind string `json:"kind,omitempty"`
2069
2070	// LandingPages: Landing page collection
2071	LandingPages []*LandingPage `json:"landingPages,omitempty"`
2072
2073	// NextPageToken: Pagination token to be used for the next list
2074	// operation.
2075	NextPageToken string `json:"nextPageToken,omitempty"`
2076
2077	// ServerResponse contains the HTTP response code and headers from the
2078	// server.
2079	googleapi.ServerResponse `json:"-"`
2080
2081	// ForceSendFields is a list of field names (e.g. "Kind") to
2082	// unconditionally include in API requests. By default, fields with
2083	// empty values are omitted from API requests. However, any non-pointer,
2084	// non-interface field appearing in ForceSendFields will be sent to the
2085	// server regardless of whether the field is empty or not. This may be
2086	// used to include empty fields in Patch requests.
2087	ForceSendFields []string `json:"-"`
2088
2089	// NullFields is a list of field names (e.g. "Kind") to include in API
2090	// requests with the JSON null value. By default, fields with empty
2091	// values are omitted from API requests. However, any field with an
2092	// empty value appearing in NullFields will be sent to the server as
2093	// null. It is an error if a field in this list has a non-empty value.
2094	// This may be used to include null fields in Patch requests.
2095	NullFields []string `json:"-"`
2096}
2097
2098func (s *AdvertiserLandingPagesListResponse) MarshalJSON() ([]byte, error) {
2099	type NoMethod AdvertiserLandingPagesListResponse
2100	raw := NoMethod(*s)
2101	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2102}
2103
2104// AdvertisersListResponse: Advertiser List Response
2105type AdvertisersListResponse struct {
2106	// Advertisers: Advertiser collection.
2107	Advertisers []*Advertiser `json:"advertisers,omitempty"`
2108
2109	// Kind: Identifies what kind of resource this is. Value: the fixed
2110	// string "dfareporting#advertisersListResponse".
2111	Kind string `json:"kind,omitempty"`
2112
2113	// NextPageToken: Pagination token to be used for the next list
2114	// operation.
2115	NextPageToken string `json:"nextPageToken,omitempty"`
2116
2117	// ServerResponse contains the HTTP response code and headers from the
2118	// server.
2119	googleapi.ServerResponse `json:"-"`
2120
2121	// ForceSendFields is a list of field names (e.g. "Advertisers") to
2122	// unconditionally include in API requests. By default, fields with
2123	// empty values are omitted from API requests. However, any non-pointer,
2124	// non-interface field appearing in ForceSendFields will be sent to the
2125	// server regardless of whether the field is empty or not. This may be
2126	// used to include empty fields in Patch requests.
2127	ForceSendFields []string `json:"-"`
2128
2129	// NullFields is a list of field names (e.g. "Advertisers") to include
2130	// in API requests with the JSON null value. By default, fields with
2131	// empty values are omitted from API requests. However, any field with
2132	// an empty value appearing in NullFields will be sent to the server as
2133	// null. It is an error if a field in this list has a non-empty value.
2134	// This may be used to include null fields in Patch requests.
2135	NullFields []string `json:"-"`
2136}
2137
2138func (s *AdvertisersListResponse) MarshalJSON() ([]byte, error) {
2139	type NoMethod AdvertisersListResponse
2140	raw := NoMethod(*s)
2141	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2142}
2143
2144// AudienceSegment: Audience Segment.
2145type AudienceSegment struct {
2146	// Allocation: Weight allocated to this segment. The weight assigned
2147	// will be understood in proportion to the weights assigned to other
2148	// segments in the same segment group. Acceptable values are 1 to 1000,
2149	// inclusive.
2150	Allocation int64 `json:"allocation,omitempty"`
2151
2152	// Id: ID of this audience segment. This is a read-only, auto-generated
2153	// field.
2154	Id int64 `json:"id,omitempty,string"`
2155
2156	// Name: Name of this audience segment. This is a required field and
2157	// must be less than 65 characters long.
2158	Name string `json:"name,omitempty"`
2159
2160	// ForceSendFields is a list of field names (e.g. "Allocation") to
2161	// unconditionally include in API requests. By default, fields with
2162	// empty values are omitted from API requests. However, any non-pointer,
2163	// non-interface field appearing in ForceSendFields will be sent to the
2164	// server regardless of whether the field is empty or not. This may be
2165	// used to include empty fields in Patch requests.
2166	ForceSendFields []string `json:"-"`
2167
2168	// NullFields is a list of field names (e.g. "Allocation") to include in
2169	// API requests with the JSON null value. By default, fields with empty
2170	// values are omitted from API requests. However, any field with an
2171	// empty value appearing in NullFields will be sent to the server as
2172	// null. It is an error if a field in this list has a non-empty value.
2173	// This may be used to include null fields in Patch requests.
2174	NullFields []string `json:"-"`
2175}
2176
2177func (s *AudienceSegment) MarshalJSON() ([]byte, error) {
2178	type NoMethod AudienceSegment
2179	raw := NoMethod(*s)
2180	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2181}
2182
2183// AudienceSegmentGroup: Audience Segment Group.
2184type AudienceSegmentGroup struct {
2185	// AudienceSegments: Audience segments assigned to this group. The
2186	// number of segments must be between 2 and 100.
2187	AudienceSegments []*AudienceSegment `json:"audienceSegments,omitempty"`
2188
2189	// Id: ID of this audience segment group. This is a read-only,
2190	// auto-generated field.
2191	Id int64 `json:"id,omitempty,string"`
2192
2193	// Name: Name of this audience segment group. This is a required field
2194	// and must be less than 65 characters long.
2195	Name string `json:"name,omitempty"`
2196
2197	// ForceSendFields is a list of field names (e.g. "AudienceSegments") to
2198	// unconditionally include in API requests. By default, fields with
2199	// empty values are omitted from API requests. However, any non-pointer,
2200	// non-interface field appearing in ForceSendFields will be sent to the
2201	// server regardless of whether the field is empty or not. This may be
2202	// used to include empty fields in Patch requests.
2203	ForceSendFields []string `json:"-"`
2204
2205	// NullFields is a list of field names (e.g. "AudienceSegments") to
2206	// include in API requests with the JSON null value. By default, fields
2207	// with empty values are omitted from API requests. However, any field
2208	// with an empty value appearing in NullFields will be sent to the
2209	// server as null. It is an error if a field in this list has a
2210	// non-empty value. This may be used to include null fields in Patch
2211	// requests.
2212	NullFields []string `json:"-"`
2213}
2214
2215func (s *AudienceSegmentGroup) MarshalJSON() ([]byte, error) {
2216	type NoMethod AudienceSegmentGroup
2217	raw := NoMethod(*s)
2218	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2219}
2220
2221// Browser: Contains information about a browser that can be targeted by
2222// ads.
2223type Browser struct {
2224	// BrowserVersionId: ID referring to this grouping of browser and
2225	// version numbers. This is the ID used for targeting.
2226	BrowserVersionId int64 `json:"browserVersionId,omitempty,string"`
2227
2228	// DartId: DART ID of this browser. This is the ID used when generating
2229	// reports.
2230	DartId int64 `json:"dartId,omitempty,string"`
2231
2232	// Kind: Identifies what kind of resource this is. Value: the fixed
2233	// string "dfareporting#browser".
2234	Kind string `json:"kind,omitempty"`
2235
2236	// MajorVersion: Major version number (leftmost number) of this browser.
2237	// For example, for Chrome 5.0.376.86 beta, this field should be set to
2238	// 5. An asterisk (*) may be used to target any version number, and a
2239	// question mark (?) may be used to target cases where the version
2240	// number cannot be identified. For example, Chrome *.* targets any
2241	// version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2242	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2243	// server knows the browser is Firefox but can't tell which version it
2244	// is.
2245	MajorVersion string `json:"majorVersion,omitempty"`
2246
2247	// MinorVersion: Minor version number (number after first dot on left)
2248	// of this browser. For example, for Chrome 5.0.375.86 beta, this field
2249	// should be set to 0. An asterisk (*) may be used to target any version
2250	// number, and a question mark (?) may be used to target cases where the
2251	// version number cannot be identified. For example, Chrome *.* targets
2252	// any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2253	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2254	// server knows the browser is Firefox but can't tell which version it
2255	// is.
2256	MinorVersion string `json:"minorVersion,omitempty"`
2257
2258	// Name: Name of this browser.
2259	Name string `json:"name,omitempty"`
2260
2261	// ForceSendFields is a list of field names (e.g. "BrowserVersionId") to
2262	// unconditionally include in API requests. By default, fields with
2263	// empty values are omitted from API requests. However, any non-pointer,
2264	// non-interface field appearing in ForceSendFields will be sent to the
2265	// server regardless of whether the field is empty or not. This may be
2266	// used to include empty fields in Patch requests.
2267	ForceSendFields []string `json:"-"`
2268
2269	// NullFields is a list of field names (e.g. "BrowserVersionId") to
2270	// include in API requests with the JSON null value. By default, fields
2271	// with empty values are omitted from API requests. However, any field
2272	// with an empty value appearing in NullFields will be sent to the
2273	// server as null. It is an error if a field in this list has a
2274	// non-empty value. This may be used to include null fields in Patch
2275	// requests.
2276	NullFields []string `json:"-"`
2277}
2278
2279func (s *Browser) MarshalJSON() ([]byte, error) {
2280	type NoMethod Browser
2281	raw := NoMethod(*s)
2282	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2283}
2284
2285// BrowsersListResponse: Browser List Response
2286type BrowsersListResponse struct {
2287	// Browsers: Browser collection.
2288	Browsers []*Browser `json:"browsers,omitempty"`
2289
2290	// Kind: Identifies what kind of resource this is. Value: the fixed
2291	// string "dfareporting#browsersListResponse".
2292	Kind string `json:"kind,omitempty"`
2293
2294	// ServerResponse contains the HTTP response code and headers from the
2295	// server.
2296	googleapi.ServerResponse `json:"-"`
2297
2298	// ForceSendFields is a list of field names (e.g. "Browsers") to
2299	// unconditionally include in API requests. By default, fields with
2300	// empty values are omitted from API requests. However, any non-pointer,
2301	// non-interface field appearing in ForceSendFields will be sent to the
2302	// server regardless of whether the field is empty or not. This may be
2303	// used to include empty fields in Patch requests.
2304	ForceSendFields []string `json:"-"`
2305
2306	// NullFields is a list of field names (e.g. "Browsers") to include in
2307	// API requests with the JSON null value. By default, fields with empty
2308	// values are omitted from API requests. However, any field with an
2309	// empty value appearing in NullFields will be sent to the server as
2310	// null. It is an error if a field in this list has a non-empty value.
2311	// This may be used to include null fields in Patch requests.
2312	NullFields []string `json:"-"`
2313}
2314
2315func (s *BrowsersListResponse) MarshalJSON() ([]byte, error) {
2316	type NoMethod BrowsersListResponse
2317	raw := NoMethod(*s)
2318	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2319}
2320
2321// Campaign: Contains properties of a Campaign Manager campaign.
2322type Campaign struct {
2323	// AccountId: Account ID of this campaign. This is a read-only field
2324	// that can be left blank.
2325	AccountId int64 `json:"accountId,omitempty,string"`
2326
2327	// AdBlockingConfiguration: Ad blocking settings for this campaign.
2328	AdBlockingConfiguration *AdBlockingConfiguration `json:"adBlockingConfiguration,omitempty"`
2329
2330	// AdditionalCreativeOptimizationConfigurations: Additional creative
2331	// optimization configurations for the campaign.
2332	AdditionalCreativeOptimizationConfigurations []*CreativeOptimizationConfiguration `json:"additionalCreativeOptimizationConfigurations,omitempty"`
2333
2334	// AdvertiserGroupId: Advertiser group ID of the associated advertiser.
2335	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
2336
2337	// AdvertiserId: Advertiser ID of this campaign. This is a required
2338	// field.
2339	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2340
2341	// AdvertiserIdDimensionValue: Dimension value for the advertiser ID of
2342	// this campaign. This is a read-only, auto-generated field.
2343	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
2344
2345	// Archived: Whether this campaign has been archived.
2346	Archived bool `json:"archived,omitempty"`
2347
2348	// AudienceSegmentGroups: Audience segment groups assigned to this
2349	// campaign. Cannot have more than 300 segment groups.
2350	AudienceSegmentGroups []*AudienceSegmentGroup `json:"audienceSegmentGroups,omitempty"`
2351
2352	// BillingInvoiceCode: Billing invoice code included in the Campaign
2353	// Manager client billing invoices associated with the campaign.
2354	BillingInvoiceCode string `json:"billingInvoiceCode,omitempty"`
2355
2356	// ClickThroughUrlSuffixProperties: Click-through URL suffix override
2357	// properties for this campaign.
2358	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
2359
2360	// Comment: Arbitrary comments about this campaign. Must be less than
2361	// 256 characters long.
2362	Comment string `json:"comment,omitempty"`
2363
2364	// CreateInfo: Information about the creation of this campaign. This is
2365	// a read-only field.
2366	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
2367
2368	// CreativeGroupIds: List of creative group IDs that are assigned to the
2369	// campaign.
2370	CreativeGroupIds googleapi.Int64s `json:"creativeGroupIds,omitempty"`
2371
2372	// CreativeOptimizationConfiguration: Creative optimization
2373	// configuration for the campaign.
2374	CreativeOptimizationConfiguration *CreativeOptimizationConfiguration `json:"creativeOptimizationConfiguration,omitempty"`
2375
2376	// DefaultClickThroughEventTagProperties: Click-through event tag ID
2377	// override properties for this campaign.
2378	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
2379
2380	// DefaultLandingPageId: The default landing page ID for this campaign.
2381	DefaultLandingPageId int64 `json:"defaultLandingPageId,omitempty,string"`
2382
2383	EndDate string `json:"endDate,omitempty"`
2384
2385	// EventTagOverrides: Overrides that can be used to activate or
2386	// deactivate advertiser event tags.
2387	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
2388
2389	// ExternalId: External ID for this campaign.
2390	ExternalId string `json:"externalId,omitempty"`
2391
2392	// Id: ID of this campaign. This is a read-only auto-generated field.
2393	Id int64 `json:"id,omitempty,string"`
2394
2395	// IdDimensionValue: Dimension value for the ID of this campaign. This
2396	// is a read-only, auto-generated field.
2397	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
2398
2399	// Kind: Identifies what kind of resource this is. Value: the fixed
2400	// string "dfareporting#campaign".
2401	Kind string `json:"kind,omitempty"`
2402
2403	// LastModifiedInfo: Information about the most recent modification of
2404	// this campaign. This is a read-only field.
2405	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
2406
2407	// Name: Name of this campaign. This is a required field and must be
2408	// less than 256 characters long and unique among campaigns of the same
2409	// advertiser.
2410	Name string `json:"name,omitempty"`
2411
2412	// NielsenOcrEnabled: Whether Nielsen reports are enabled for this
2413	// campaign.
2414	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
2415
2416	StartDate string `json:"startDate,omitempty"`
2417
2418	// SubaccountId: Subaccount ID of this campaign. This is a read-only
2419	// field that can be left blank.
2420	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2421
2422	// TraffickerEmails: Campaign trafficker contact emails.
2423	TraffickerEmails []string `json:"traffickerEmails,omitempty"`
2424
2425	// ServerResponse contains the HTTP response code and headers from the
2426	// server.
2427	googleapi.ServerResponse `json:"-"`
2428
2429	// ForceSendFields is a list of field names (e.g. "AccountId") to
2430	// unconditionally include in API requests. By default, fields with
2431	// empty values are omitted from API requests. However, any non-pointer,
2432	// non-interface field appearing in ForceSendFields will be sent to the
2433	// server regardless of whether the field is empty or not. This may be
2434	// used to include empty fields in Patch requests.
2435	ForceSendFields []string `json:"-"`
2436
2437	// NullFields is a list of field names (e.g. "AccountId") to include in
2438	// API requests with the JSON null value. By default, fields with empty
2439	// values are omitted from API requests. However, any field with an
2440	// empty value appearing in NullFields will be sent to the server as
2441	// null. It is an error if a field in this list has a non-empty value.
2442	// This may be used to include null fields in Patch requests.
2443	NullFields []string `json:"-"`
2444}
2445
2446func (s *Campaign) MarshalJSON() ([]byte, error) {
2447	type NoMethod Campaign
2448	raw := NoMethod(*s)
2449	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2450}
2451
2452// CampaignCreativeAssociation: Identifies a creative which has been
2453// associated with a given campaign.
2454type CampaignCreativeAssociation struct {
2455	// CreativeId: ID of the creative associated with the campaign. This is
2456	// a required field.
2457	CreativeId int64 `json:"creativeId,omitempty,string"`
2458
2459	// Kind: Identifies what kind of resource this is. Value: the fixed
2460	// string "dfareporting#campaignCreativeAssociation".
2461	Kind string `json:"kind,omitempty"`
2462
2463	// ServerResponse contains the HTTP response code and headers from the
2464	// server.
2465	googleapi.ServerResponse `json:"-"`
2466
2467	// ForceSendFields is a list of field names (e.g. "CreativeId") to
2468	// unconditionally include in API requests. By default, fields with
2469	// empty values are omitted from API requests. However, any non-pointer,
2470	// non-interface field appearing in ForceSendFields will be sent to the
2471	// server regardless of whether the field is empty or not. This may be
2472	// used to include empty fields in Patch requests.
2473	ForceSendFields []string `json:"-"`
2474
2475	// NullFields is a list of field names (e.g. "CreativeId") to include in
2476	// API requests with the JSON null value. By default, fields with empty
2477	// values are omitted from API requests. However, any field with an
2478	// empty value appearing in NullFields will be sent to the server as
2479	// null. It is an error if a field in this list has a non-empty value.
2480	// This may be used to include null fields in Patch requests.
2481	NullFields []string `json:"-"`
2482}
2483
2484func (s *CampaignCreativeAssociation) MarshalJSON() ([]byte, error) {
2485	type NoMethod CampaignCreativeAssociation
2486	raw := NoMethod(*s)
2487	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2488}
2489
2490// CampaignCreativeAssociationsListResponse: Campaign Creative
2491// Association List Response
2492type CampaignCreativeAssociationsListResponse struct {
2493	// CampaignCreativeAssociations: Campaign creative association
2494	// collection
2495	CampaignCreativeAssociations []*CampaignCreativeAssociation `json:"campaignCreativeAssociations,omitempty"`
2496
2497	// Kind: Identifies what kind of resource this is. Value: the fixed
2498	// string "dfareporting#campaignCreativeAssociationsListResponse".
2499	Kind string `json:"kind,omitempty"`
2500
2501	// NextPageToken: Pagination token to be used for the next list
2502	// operation.
2503	NextPageToken string `json:"nextPageToken,omitempty"`
2504
2505	// ServerResponse contains the HTTP response code and headers from the
2506	// server.
2507	googleapi.ServerResponse `json:"-"`
2508
2509	// ForceSendFields is a list of field names (e.g.
2510	// "CampaignCreativeAssociations") to unconditionally include in API
2511	// requests. By default, fields with empty values are omitted from API
2512	// requests. However, any non-pointer, non-interface field appearing in
2513	// ForceSendFields will be sent to the server regardless of whether the
2514	// field is empty or not. This may be used to include empty fields in
2515	// Patch requests.
2516	ForceSendFields []string `json:"-"`
2517
2518	// NullFields is a list of field names (e.g.
2519	// "CampaignCreativeAssociations") to include in API requests with the
2520	// JSON null value. By default, fields with empty values are omitted
2521	// from API requests. However, any field with an empty value appearing
2522	// in NullFields will be sent to the server as null. It is an error if a
2523	// field in this list has a non-empty value. This may be used to include
2524	// null fields in Patch requests.
2525	NullFields []string `json:"-"`
2526}
2527
2528func (s *CampaignCreativeAssociationsListResponse) MarshalJSON() ([]byte, error) {
2529	type NoMethod CampaignCreativeAssociationsListResponse
2530	raw := NoMethod(*s)
2531	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2532}
2533
2534// CampaignManagerIds: Campaign Manager IDs related to the custom event.
2535type CampaignManagerIds struct {
2536	// AdId: Ad ID for Campaign Manager.
2537	AdId int64 `json:"adId,omitempty,string"`
2538
2539	// CampaignId: Campaign ID for Campaign Manager.
2540	CampaignId int64 `json:"campaignId,omitempty,string"`
2541
2542	// CreativeId: Creative ID for Campaign Manager.
2543	CreativeId int64 `json:"creativeId,omitempty,string"`
2544
2545	// Kind: Identifies what kind of resource this is. Value: the fixed
2546	// string "dfareporting#campaignManagerIds".
2547	Kind string `json:"kind,omitempty"`
2548
2549	// PlacementId: Placement ID for Campaign Manager.
2550	PlacementId int64 `json:"placementId,omitempty,string"`
2551
2552	// SiteId: Site ID for Campaign Manager.
2553	SiteId int64 `json:"siteId,omitempty,string"`
2554
2555	// ForceSendFields is a list of field names (e.g. "AdId") to
2556	// unconditionally include in API requests. By default, fields with
2557	// empty values are omitted from API requests. However, any non-pointer,
2558	// non-interface field appearing in ForceSendFields will be sent to the
2559	// server regardless of whether the field is empty or not. This may be
2560	// used to include empty fields in Patch requests.
2561	ForceSendFields []string `json:"-"`
2562
2563	// NullFields is a list of field names (e.g. "AdId") to include in API
2564	// requests with the JSON null value. By default, fields with empty
2565	// values are omitted from API requests. However, any field with an
2566	// empty value appearing in NullFields will be sent to the server as
2567	// null. It is an error if a field in this list has a non-empty value.
2568	// This may be used to include null fields in Patch requests.
2569	NullFields []string `json:"-"`
2570}
2571
2572func (s *CampaignManagerIds) MarshalJSON() ([]byte, error) {
2573	type NoMethod CampaignManagerIds
2574	raw := NoMethod(*s)
2575	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2576}
2577
2578// CampaignsListResponse: Campaign List Response
2579type CampaignsListResponse struct {
2580	// Campaigns: Campaign collection.
2581	Campaigns []*Campaign `json:"campaigns,omitempty"`
2582
2583	// Kind: Identifies what kind of resource this is. Value: the fixed
2584	// string "dfareporting#campaignsListResponse".
2585	Kind string `json:"kind,omitempty"`
2586
2587	// NextPageToken: Pagination token to be used for the next list
2588	// operation.
2589	NextPageToken string `json:"nextPageToken,omitempty"`
2590
2591	// ServerResponse contains the HTTP response code and headers from the
2592	// server.
2593	googleapi.ServerResponse `json:"-"`
2594
2595	// ForceSendFields is a list of field names (e.g. "Campaigns") to
2596	// unconditionally include in API requests. By default, fields with
2597	// empty values are omitted from API requests. However, any non-pointer,
2598	// non-interface field appearing in ForceSendFields will be sent to the
2599	// server regardless of whether the field is empty or not. This may be
2600	// used to include empty fields in Patch requests.
2601	ForceSendFields []string `json:"-"`
2602
2603	// NullFields is a list of field names (e.g. "Campaigns") to include in
2604	// API requests with the JSON null value. By default, fields with empty
2605	// values are omitted from API requests. However, any field with an
2606	// empty value appearing in NullFields will be sent to the server as
2607	// null. It is an error if a field in this list has a non-empty value.
2608	// This may be used to include null fields in Patch requests.
2609	NullFields []string `json:"-"`
2610}
2611
2612func (s *CampaignsListResponse) MarshalJSON() ([]byte, error) {
2613	type NoMethod CampaignsListResponse
2614	raw := NoMethod(*s)
2615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2616}
2617
2618// ChangeLog: Describes a change that a user has made to a resource.
2619type ChangeLog struct {
2620	// AccountId: Account ID of the modified object.
2621	AccountId int64 `json:"accountId,omitempty,string"`
2622
2623	// Action: Action which caused the change.
2624	Action string `json:"action,omitempty"`
2625
2626	ChangeTime string `json:"changeTime,omitempty"`
2627
2628	// FieldName: Field name of the object which changed.
2629	FieldName string `json:"fieldName,omitempty"`
2630
2631	// Id: ID of this change log.
2632	Id int64 `json:"id,omitempty,string"`
2633
2634	// Kind: Identifies what kind of resource this is. Value: the fixed
2635	// string "dfareporting#changeLog".
2636	Kind string `json:"kind,omitempty"`
2637
2638	// NewValue: New value of the object field.
2639	NewValue string `json:"newValue,omitempty"`
2640
2641	// ObjectId: ID of the object of this change log. The object could be a
2642	// campaign, placement, ad, or other type.
2643	ObjectId int64 `json:"objectId,omitempty,string"`
2644
2645	// ObjectType: Object type of the change log.
2646	ObjectType string `json:"objectType,omitempty"`
2647
2648	// OldValue: Old value of the object field.
2649	OldValue string `json:"oldValue,omitempty"`
2650
2651	// SubaccountId: Subaccount ID of the modified object.
2652	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2653
2654	// TransactionId: Transaction ID of this change log. When a single API
2655	// call results in many changes, each change will have a separate ID in
2656	// the change log but will share the same transactionId.
2657	TransactionId int64 `json:"transactionId,omitempty,string"`
2658
2659	// UserProfileId: ID of the user who modified the object.
2660	UserProfileId int64 `json:"userProfileId,omitempty,string"`
2661
2662	// UserProfileName: User profile name of the user who modified the
2663	// object.
2664	UserProfileName string `json:"userProfileName,omitempty"`
2665
2666	// ServerResponse contains the HTTP response code and headers from the
2667	// server.
2668	googleapi.ServerResponse `json:"-"`
2669
2670	// ForceSendFields is a list of field names (e.g. "AccountId") to
2671	// unconditionally include in API requests. By default, fields with
2672	// empty values are omitted from API requests. However, any non-pointer,
2673	// non-interface field appearing in ForceSendFields will be sent to the
2674	// server regardless of whether the field is empty or not. This may be
2675	// used to include empty fields in Patch requests.
2676	ForceSendFields []string `json:"-"`
2677
2678	// NullFields is a list of field names (e.g. "AccountId") to include in
2679	// API requests with the JSON null value. By default, fields with empty
2680	// values are omitted from API requests. However, any field with an
2681	// empty value appearing in NullFields will be sent to the server as
2682	// null. It is an error if a field in this list has a non-empty value.
2683	// This may be used to include null fields in Patch requests.
2684	NullFields []string `json:"-"`
2685}
2686
2687func (s *ChangeLog) MarshalJSON() ([]byte, error) {
2688	type NoMethod ChangeLog
2689	raw := NoMethod(*s)
2690	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2691}
2692
2693// ChangeLogsListResponse: Change Log List Response
2694type ChangeLogsListResponse struct {
2695	// ChangeLogs: Change log collection.
2696	ChangeLogs []*ChangeLog `json:"changeLogs,omitempty"`
2697
2698	// Kind: Identifies what kind of resource this is. Value: the fixed
2699	// string "dfareporting#changeLogsListResponse".
2700	Kind string `json:"kind,omitempty"`
2701
2702	// NextPageToken: Pagination token to be used for the next list
2703	// operation.
2704	NextPageToken string `json:"nextPageToken,omitempty"`
2705
2706	// ServerResponse contains the HTTP response code and headers from the
2707	// server.
2708	googleapi.ServerResponse `json:"-"`
2709
2710	// ForceSendFields is a list of field names (e.g. "ChangeLogs") to
2711	// unconditionally include in API requests. By default, fields with
2712	// empty values are omitted from API requests. However, any non-pointer,
2713	// non-interface field appearing in ForceSendFields will be sent to the
2714	// server regardless of whether the field is empty or not. This may be
2715	// used to include empty fields in Patch requests.
2716	ForceSendFields []string `json:"-"`
2717
2718	// NullFields is a list of field names (e.g. "ChangeLogs") to include in
2719	// API requests with the JSON null value. By default, fields with empty
2720	// values are omitted from API requests. However, any field with an
2721	// empty value appearing in NullFields will be sent to the server as
2722	// null. It is an error if a field in this list has a non-empty value.
2723	// This may be used to include null fields in Patch requests.
2724	NullFields []string `json:"-"`
2725}
2726
2727func (s *ChangeLogsListResponse) MarshalJSON() ([]byte, error) {
2728	type NoMethod ChangeLogsListResponse
2729	raw := NoMethod(*s)
2730	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2731}
2732
2733// ChannelGrouping: Represents a DfaReporting channel grouping.
2734type ChannelGrouping struct {
2735	// FallbackName: ChannelGrouping fallback name.
2736	FallbackName string `json:"fallbackName,omitempty"`
2737
2738	// Kind: The kind of resource this is, in this case
2739	// dfareporting#channelGrouping.
2740	Kind string `json:"kind,omitempty"`
2741
2742	// Name: ChannelGrouping name.
2743	Name string `json:"name,omitempty"`
2744
2745	// Rules: The rules contained within this channel grouping.
2746	Rules []*ChannelGroupingRule `json:"rules,omitempty"`
2747
2748	// ForceSendFields is a list of field names (e.g. "FallbackName") to
2749	// unconditionally include in API requests. By default, fields with
2750	// empty values are omitted from API requests. However, any non-pointer,
2751	// non-interface field appearing in ForceSendFields will be sent to the
2752	// server regardless of whether the field is empty or not. This may be
2753	// used to include empty fields in Patch requests.
2754	ForceSendFields []string `json:"-"`
2755
2756	// NullFields is a list of field names (e.g. "FallbackName") to include
2757	// in API requests with the JSON null value. By default, fields with
2758	// empty values are omitted from API requests. However, any field with
2759	// an empty value appearing in NullFields will be sent to the server as
2760	// null. It is an error if a field in this list has a non-empty value.
2761	// This may be used to include null fields in Patch requests.
2762	NullFields []string `json:"-"`
2763}
2764
2765func (s *ChannelGrouping) MarshalJSON() ([]byte, error) {
2766	type NoMethod ChannelGrouping
2767	raw := NoMethod(*s)
2768	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2769}
2770
2771// ChannelGroupingRule: Represents a DfaReporting channel grouping rule.
2772type ChannelGroupingRule struct {
2773	// DisjunctiveMatchStatements: The disjunctive match statements
2774	// contained within this rule.
2775	DisjunctiveMatchStatements []*DisjunctiveMatchStatement `json:"disjunctiveMatchStatements,omitempty"`
2776
2777	// Kind: The kind of resource this is, in this case
2778	// dfareporting#channelGroupingRule.
2779	Kind string `json:"kind,omitempty"`
2780
2781	// Name: Rule name.
2782	Name string `json:"name,omitempty"`
2783
2784	// ForceSendFields is a list of field names (e.g.
2785	// "DisjunctiveMatchStatements") to unconditionally include in API
2786	// requests. By default, fields with empty values are omitted from API
2787	// requests. However, any non-pointer, non-interface field appearing in
2788	// ForceSendFields will be sent to the server regardless of whether the
2789	// field is empty or not. This may be used to include empty fields in
2790	// Patch requests.
2791	ForceSendFields []string `json:"-"`
2792
2793	// NullFields is a list of field names (e.g.
2794	// "DisjunctiveMatchStatements") to include in API requests with the
2795	// JSON null value. By default, fields with empty values are omitted
2796	// from API requests. However, any field with an empty value appearing
2797	// in NullFields will be sent to the server as null. It is an error if a
2798	// field in this list has a non-empty value. This may be used to include
2799	// null fields in Patch requests.
2800	NullFields []string `json:"-"`
2801}
2802
2803func (s *ChannelGroupingRule) MarshalJSON() ([]byte, error) {
2804	type NoMethod ChannelGroupingRule
2805	raw := NoMethod(*s)
2806	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2807}
2808
2809// CitiesListResponse: City List Response
2810type CitiesListResponse struct {
2811	// Cities: City collection.
2812	Cities []*City `json:"cities,omitempty"`
2813
2814	// Kind: Identifies what kind of resource this is. Value: the fixed
2815	// string "dfareporting#citiesListResponse".
2816	Kind string `json:"kind,omitempty"`
2817
2818	// ServerResponse contains the HTTP response code and headers from the
2819	// server.
2820	googleapi.ServerResponse `json:"-"`
2821
2822	// ForceSendFields is a list of field names (e.g. "Cities") to
2823	// unconditionally include in API requests. By default, fields with
2824	// empty values are omitted from API requests. However, any non-pointer,
2825	// non-interface field appearing in ForceSendFields will be sent to the
2826	// server regardless of whether the field is empty or not. This may be
2827	// used to include empty fields in Patch requests.
2828	ForceSendFields []string `json:"-"`
2829
2830	// NullFields is a list of field names (e.g. "Cities") to include in API
2831	// requests with the JSON null value. By default, fields with empty
2832	// values are omitted from API requests. However, any field with an
2833	// empty value appearing in NullFields will be sent to the server as
2834	// null. It is an error if a field in this list has a non-empty value.
2835	// This may be used to include null fields in Patch requests.
2836	NullFields []string `json:"-"`
2837}
2838
2839func (s *CitiesListResponse) MarshalJSON() ([]byte, error) {
2840	type NoMethod CitiesListResponse
2841	raw := NoMethod(*s)
2842	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2843}
2844
2845// City: Contains information about a city that can be targeted by ads.
2846type City struct {
2847	// CountryCode: Country code of the country to which this city belongs.
2848	CountryCode string `json:"countryCode,omitempty"`
2849
2850	// CountryDartId: DART ID of the country to which this city belongs.
2851	CountryDartId int64 `json:"countryDartId,omitempty,string"`
2852
2853	// DartId: DART ID of this city. This is the ID used for targeting and
2854	// generating reports.
2855	DartId int64 `json:"dartId,omitempty,string"`
2856
2857	// Kind: Identifies what kind of resource this is. Value: the fixed
2858	// string "dfareporting#city".
2859	Kind string `json:"kind,omitempty"`
2860
2861	// MetroCode: Metro region code of the metro region (DMA) to which this
2862	// city belongs.
2863	MetroCode string `json:"metroCode,omitempty"`
2864
2865	// MetroDmaId: ID of the metro region (DMA) to which this city belongs.
2866	MetroDmaId int64 `json:"metroDmaId,omitempty,string"`
2867
2868	// Name: Name of this city.
2869	Name string `json:"name,omitempty"`
2870
2871	// RegionCode: Region code of the region to which this city belongs.
2872	RegionCode string `json:"regionCode,omitempty"`
2873
2874	// RegionDartId: DART ID of the region to which this city belongs.
2875	RegionDartId int64 `json:"regionDartId,omitempty,string"`
2876
2877	// ForceSendFields is a list of field names (e.g. "CountryCode") to
2878	// unconditionally include in API requests. By default, fields with
2879	// empty values are omitted from API requests. However, any non-pointer,
2880	// non-interface field appearing in ForceSendFields will be sent to the
2881	// server regardless of whether the field is empty or not. This may be
2882	// used to include empty fields in Patch requests.
2883	ForceSendFields []string `json:"-"`
2884
2885	// NullFields is a list of field names (e.g. "CountryCode") to include
2886	// in API requests with the JSON null value. By default, fields with
2887	// empty values are omitted from API requests. However, any field with
2888	// an empty value appearing in NullFields will be sent to the server as
2889	// null. It is an error if a field in this list has a non-empty value.
2890	// This may be used to include null fields in Patch requests.
2891	NullFields []string `json:"-"`
2892}
2893
2894func (s *City) MarshalJSON() ([]byte, error) {
2895	type NoMethod City
2896	raw := NoMethod(*s)
2897	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2898}
2899
2900// ClickTag: Creative Click Tag.
2901type ClickTag struct {
2902	// ClickThroughUrl: Parameter value for the specified click tag. This
2903	// field contains a click-through url.
2904	ClickThroughUrl *CreativeClickThroughUrl `json:"clickThroughUrl,omitempty"`
2905
2906	// EventName: Advertiser event name associated with the click tag. This
2907	// field is used by DISPLAY_IMAGE_GALLERY and HTML5_BANNER creatives.
2908	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
2909	EventName string `json:"eventName,omitempty"`
2910
2911	// Name: Parameter name for the specified click tag. For
2912	// DISPLAY_IMAGE_GALLERY creative assets, this field must match the
2913	// value of the creative asset's creativeAssetId.name field.
2914	Name string `json:"name,omitempty"`
2915
2916	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
2917	// unconditionally include in API requests. By default, fields with
2918	// empty values are omitted from API requests. However, any non-pointer,
2919	// non-interface field appearing in ForceSendFields will be sent to the
2920	// server regardless of whether the field is empty or not. This may be
2921	// used to include empty fields in Patch requests.
2922	ForceSendFields []string `json:"-"`
2923
2924	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
2925	// include in API requests with the JSON null value. By default, fields
2926	// with empty values are omitted from API requests. However, any field
2927	// with an empty value appearing in NullFields will be sent to the
2928	// server as null. It is an error if a field in this list has a
2929	// non-empty value. This may be used to include null fields in Patch
2930	// requests.
2931	NullFields []string `json:"-"`
2932}
2933
2934func (s *ClickTag) MarshalJSON() ([]byte, error) {
2935	type NoMethod ClickTag
2936	raw := NoMethod(*s)
2937	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2938}
2939
2940// ClickThroughUrl: Click-through URL
2941type ClickThroughUrl struct {
2942	// ComputedClickThroughUrl: Read-only convenience field representing the
2943	// actual URL that will be used for this click-through. The URL is
2944	// computed as follows: - If defaultLandingPage is enabled then the
2945	// campaign's default landing page URL is assigned to this field. - If
2946	// defaultLandingPage is not enabled and a landingPageId is specified
2947	// then that landing page's URL is assigned to this field. - If neither
2948	// of the above cases apply, then the customClickThroughUrl is assigned
2949	// to this field.
2950	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
2951
2952	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
2953	// defaultLandingPage field is set to false and the landingPageId field
2954	// is left unset.
2955	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
2956
2957	// DefaultLandingPage: Whether the campaign default landing page is
2958	// used.
2959	DefaultLandingPage bool `json:"defaultLandingPage,omitempty"`
2960
2961	// LandingPageId: ID of the landing page for the click-through URL.
2962	// Applicable if the defaultLandingPage field is set to false.
2963	LandingPageId int64 `json:"landingPageId,omitempty,string"`
2964
2965	// ForceSendFields is a list of field names (e.g.
2966	// "ComputedClickThroughUrl") to unconditionally include in API
2967	// requests. By default, fields with empty values are omitted from API
2968	// requests. However, any non-pointer, non-interface field appearing in
2969	// ForceSendFields will be sent to the server regardless of whether the
2970	// field is empty or not. This may be used to include empty fields in
2971	// Patch requests.
2972	ForceSendFields []string `json:"-"`
2973
2974	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
2975	// to include in API requests with the JSON null value. By default,
2976	// fields with empty values are omitted from API requests. However, any
2977	// field with an empty value appearing in NullFields will be sent to the
2978	// server as null. It is an error if a field in this list has a
2979	// non-empty value. This may be used to include null fields in Patch
2980	// requests.
2981	NullFields []string `json:"-"`
2982}
2983
2984func (s *ClickThroughUrl) MarshalJSON() ([]byte, error) {
2985	type NoMethod ClickThroughUrl
2986	raw := NoMethod(*s)
2987	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2988}
2989
2990// ClickThroughUrlSuffixProperties: Click Through URL Suffix settings.
2991type ClickThroughUrlSuffixProperties struct {
2992	// ClickThroughUrlSuffix: Click-through URL suffix to apply to all ads
2993	// in this entity's scope. Must be less than 128 characters long.
2994	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
2995
2996	// OverrideInheritedSuffix: Whether this entity should override the
2997	// inherited click-through URL suffix with its own defined value.
2998	OverrideInheritedSuffix bool `json:"overrideInheritedSuffix,omitempty"`
2999
3000	// ForceSendFields is a list of field names (e.g.
3001	// "ClickThroughUrlSuffix") to unconditionally include in API requests.
3002	// By default, fields with empty values are omitted from API requests.
3003	// However, any non-pointer, non-interface field appearing in
3004	// ForceSendFields will be sent to the server regardless of whether the
3005	// field is empty or not. This may be used to include empty fields in
3006	// Patch requests.
3007	ForceSendFields []string `json:"-"`
3008
3009	// NullFields is a list of field names (e.g. "ClickThroughUrlSuffix") to
3010	// include in API requests with the JSON null value. By default, fields
3011	// with empty values are omitted from API requests. However, any field
3012	// with an empty value appearing in NullFields will be sent to the
3013	// server as null. It is an error if a field in this list has a
3014	// non-empty value. This may be used to include null fields in Patch
3015	// requests.
3016	NullFields []string `json:"-"`
3017}
3018
3019func (s *ClickThroughUrlSuffixProperties) MarshalJSON() ([]byte, error) {
3020	type NoMethod ClickThroughUrlSuffixProperties
3021	raw := NoMethod(*s)
3022	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3023}
3024
3025// CompanionClickThroughOverride: Companion Click-through override.
3026type CompanionClickThroughOverride struct {
3027	// ClickThroughUrl: Click-through URL of this companion click-through
3028	// override.
3029	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
3030
3031	// CreativeId: ID of the creative for this companion click-through
3032	// override.
3033	CreativeId int64 `json:"creativeId,omitempty,string"`
3034
3035	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
3036	// unconditionally include in API requests. By default, fields with
3037	// empty values are omitted from API requests. However, any non-pointer,
3038	// non-interface field appearing in ForceSendFields will be sent to the
3039	// server regardless of whether the field is empty or not. This may be
3040	// used to include empty fields in Patch requests.
3041	ForceSendFields []string `json:"-"`
3042
3043	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
3044	// include in API requests with the JSON null value. By default, fields
3045	// with empty values are omitted from API requests. However, any field
3046	// with an empty value appearing in NullFields will be sent to the
3047	// server as null. It is an error if a field in this list has a
3048	// non-empty value. This may be used to include null fields in Patch
3049	// requests.
3050	NullFields []string `json:"-"`
3051}
3052
3053func (s *CompanionClickThroughOverride) MarshalJSON() ([]byte, error) {
3054	type NoMethod CompanionClickThroughOverride
3055	raw := NoMethod(*s)
3056	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3057}
3058
3059// CompanionSetting: Companion Settings
3060type CompanionSetting struct {
3061	// CompanionsDisabled: Whether companions are disabled for this
3062	// placement.
3063	CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
3064
3065	// EnabledSizes: Allowlist of companion sizes to be served to this
3066	// placement. Set this list to null or empty to serve all companion
3067	// sizes.
3068	EnabledSizes []*Size `json:"enabledSizes,omitempty"`
3069
3070	// ImageOnly: Whether to serve only static images as companions.
3071	ImageOnly bool `json:"imageOnly,omitempty"`
3072
3073	// Kind: Identifies what kind of resource this is. Value: the fixed
3074	// string "dfareporting#companionSetting".
3075	Kind string `json:"kind,omitempty"`
3076
3077	// ForceSendFields is a list of field names (e.g. "CompanionsDisabled")
3078	// to unconditionally include in API requests. By default, fields with
3079	// empty values are omitted from API requests. However, any non-pointer,
3080	// non-interface field appearing in ForceSendFields will be sent to the
3081	// server regardless of whether the field is empty or not. This may be
3082	// used to include empty fields in Patch requests.
3083	ForceSendFields []string `json:"-"`
3084
3085	// NullFields is a list of field names (e.g. "CompanionsDisabled") to
3086	// include in API requests with the JSON null value. By default, fields
3087	// with empty values are omitted from API requests. However, any field
3088	// with an empty value appearing in NullFields will be sent to the
3089	// server as null. It is an error if a field in this list has a
3090	// non-empty value. This may be used to include null fields in Patch
3091	// requests.
3092	NullFields []string `json:"-"`
3093}
3094
3095func (s *CompanionSetting) MarshalJSON() ([]byte, error) {
3096	type NoMethod CompanionSetting
3097	raw := NoMethod(*s)
3098	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3099}
3100
3101// CompatibleFields: Represents a response to the queryCompatibleFields
3102// method.
3103type CompatibleFields struct {
3104	// CrossDimensionReachReportCompatibleFields: Contains items that are
3105	// compatible to be selected for a report of type
3106	// "CROSS_DIMENSION_REACH".
3107	CrossDimensionReachReportCompatibleFields *CrossDimensionReachReportCompatibleFields `json:"crossDimensionReachReportCompatibleFields,omitempty"`
3108
3109	// FloodlightReportCompatibleFields: Contains items that are compatible
3110	// to be selected for a report of type "FLOODLIGHT".
3111	FloodlightReportCompatibleFields *FloodlightReportCompatibleFields `json:"floodlightReportCompatibleFields,omitempty"`
3112
3113	// Kind: The kind of resource this is, in this case
3114	// dfareporting#compatibleFields.
3115	Kind string `json:"kind,omitempty"`
3116
3117	// PathAttributionReportCompatibleFields: Contains items that are
3118	// compatible to be selected for a report of type "PATH_ATTRIBUTION".
3119	PathAttributionReportCompatibleFields *PathReportCompatibleFields `json:"pathAttributionReportCompatibleFields,omitempty"`
3120
3121	// PathReportCompatibleFields: Contains items that are compatible to be
3122	// selected for a report of type "PATH".
3123	PathReportCompatibleFields *PathReportCompatibleFields `json:"pathReportCompatibleFields,omitempty"`
3124
3125	// PathToConversionReportCompatibleFields: Contains items that are
3126	// compatible to be selected for a report of type "PATH_TO_CONVERSION".
3127	PathToConversionReportCompatibleFields *PathToConversionReportCompatibleFields `json:"pathToConversionReportCompatibleFields,omitempty"`
3128
3129	// ReachReportCompatibleFields: Contains items that are compatible to be
3130	// selected for a report of type "REACH".
3131	ReachReportCompatibleFields *ReachReportCompatibleFields `json:"reachReportCompatibleFields,omitempty"`
3132
3133	// ReportCompatibleFields: Contains items that are compatible to be
3134	// selected for a report of type "STANDARD".
3135	ReportCompatibleFields *ReportCompatibleFields `json:"reportCompatibleFields,omitempty"`
3136
3137	// ServerResponse contains the HTTP response code and headers from the
3138	// server.
3139	googleapi.ServerResponse `json:"-"`
3140
3141	// ForceSendFields is a list of field names (e.g.
3142	// "CrossDimensionReachReportCompatibleFields") to unconditionally
3143	// include in API requests. By default, fields with empty values are
3144	// omitted from API requests. However, any non-pointer, non-interface
3145	// field appearing in ForceSendFields will be sent to the server
3146	// regardless of whether the field is empty or not. This may be used to
3147	// include empty fields in Patch requests.
3148	ForceSendFields []string `json:"-"`
3149
3150	// NullFields is a list of field names (e.g.
3151	// "CrossDimensionReachReportCompatibleFields") to include in API
3152	// requests with the JSON null value. By default, fields with empty
3153	// values are omitted from API requests. However, any field with an
3154	// empty value appearing in NullFields will be sent to the server as
3155	// null. It is an error if a field in this list has a non-empty value.
3156	// This may be used to include null fields in Patch requests.
3157	NullFields []string `json:"-"`
3158}
3159
3160func (s *CompatibleFields) MarshalJSON() ([]byte, error) {
3161	type NoMethod CompatibleFields
3162	raw := NoMethod(*s)
3163	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3164}
3165
3166// ConnectionType: Contains information about an internet connection
3167// type that can be targeted by ads. Clients can use the connection type
3168// to target mobile vs. broadband users.
3169type ConnectionType struct {
3170	// Id: ID of this connection type.
3171	Id int64 `json:"id,omitempty,string"`
3172
3173	// Kind: Identifies what kind of resource this is. Value: the fixed
3174	// string "dfareporting#connectionType".
3175	Kind string `json:"kind,omitempty"`
3176
3177	// Name: Name of this connection type.
3178	Name string `json:"name,omitempty"`
3179
3180	// ServerResponse contains the HTTP response code and headers from the
3181	// server.
3182	googleapi.ServerResponse `json:"-"`
3183
3184	// ForceSendFields is a list of field names (e.g. "Id") to
3185	// unconditionally include in API requests. By default, fields with
3186	// empty values are omitted from API requests. However, any non-pointer,
3187	// non-interface field appearing in ForceSendFields will be sent to the
3188	// server regardless of whether the field is empty or not. This may be
3189	// used to include empty fields in Patch requests.
3190	ForceSendFields []string `json:"-"`
3191
3192	// NullFields is a list of field names (e.g. "Id") to include in API
3193	// requests with the JSON null value. By default, fields with empty
3194	// values are omitted from API requests. However, any field with an
3195	// empty value appearing in NullFields will be sent to the server as
3196	// null. It is an error if a field in this list has a non-empty value.
3197	// This may be used to include null fields in Patch requests.
3198	NullFields []string `json:"-"`
3199}
3200
3201func (s *ConnectionType) MarshalJSON() ([]byte, error) {
3202	type NoMethod ConnectionType
3203	raw := NoMethod(*s)
3204	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3205}
3206
3207// ConnectionTypesListResponse: Connection Type List Response
3208type ConnectionTypesListResponse struct {
3209	// ConnectionTypes: Collection of connection types such as broadband and
3210	// mobile.
3211	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
3212
3213	// Kind: Identifies what kind of resource this is. Value: the fixed
3214	// string "dfareporting#connectionTypesListResponse".
3215	Kind string `json:"kind,omitempty"`
3216
3217	// ServerResponse contains the HTTP response code and headers from the
3218	// server.
3219	googleapi.ServerResponse `json:"-"`
3220
3221	// ForceSendFields is a list of field names (e.g. "ConnectionTypes") to
3222	// unconditionally include in API requests. By default, fields with
3223	// empty values are omitted from API requests. However, any non-pointer,
3224	// non-interface field appearing in ForceSendFields will be sent to the
3225	// server regardless of whether the field is empty or not. This may be
3226	// used to include empty fields in Patch requests.
3227	ForceSendFields []string `json:"-"`
3228
3229	// NullFields is a list of field names (e.g. "ConnectionTypes") to
3230	// include in API requests with the JSON null value. By default, fields
3231	// with empty values are omitted from API requests. However, any field
3232	// with an empty value appearing in NullFields will be sent to the
3233	// server as null. It is an error if a field in this list has a
3234	// non-empty value. This may be used to include null fields in Patch
3235	// requests.
3236	NullFields []string `json:"-"`
3237}
3238
3239func (s *ConnectionTypesListResponse) MarshalJSON() ([]byte, error) {
3240	type NoMethod ConnectionTypesListResponse
3241	raw := NoMethod(*s)
3242	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3243}
3244
3245// ContentCategoriesListResponse: Content Category List Response
3246type ContentCategoriesListResponse struct {
3247	// ContentCategories: Content category collection.
3248	ContentCategories []*ContentCategory `json:"contentCategories,omitempty"`
3249
3250	// Kind: Identifies what kind of resource this is. Value: the fixed
3251	// string "dfareporting#contentCategoriesListResponse".
3252	Kind string `json:"kind,omitempty"`
3253
3254	// NextPageToken: Pagination token to be used for the next list
3255	// operation.
3256	NextPageToken string `json:"nextPageToken,omitempty"`
3257
3258	// ServerResponse contains the HTTP response code and headers from the
3259	// server.
3260	googleapi.ServerResponse `json:"-"`
3261
3262	// ForceSendFields is a list of field names (e.g. "ContentCategories")
3263	// to unconditionally include in API requests. By default, fields with
3264	// empty values are omitted from API requests. However, any non-pointer,
3265	// non-interface field appearing in ForceSendFields will be sent to the
3266	// server regardless of whether the field is empty or not. This may be
3267	// used to include empty fields in Patch requests.
3268	ForceSendFields []string `json:"-"`
3269
3270	// NullFields is a list of field names (e.g. "ContentCategories") to
3271	// include in API requests with the JSON null value. By default, fields
3272	// with empty values are omitted from API requests. However, any field
3273	// with an empty value appearing in NullFields will be sent to the
3274	// server as null. It is an error if a field in this list has a
3275	// non-empty value. This may be used to include null fields in Patch
3276	// requests.
3277	NullFields []string `json:"-"`
3278}
3279
3280func (s *ContentCategoriesListResponse) MarshalJSON() ([]byte, error) {
3281	type NoMethod ContentCategoriesListResponse
3282	raw := NoMethod(*s)
3283	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3284}
3285
3286// ContentCategory: Organizes placements according to the contents of
3287// their associated webpages.
3288type ContentCategory struct {
3289	// AccountId: Account ID of this content category. This is a read-only
3290	// field that can be left blank.
3291	AccountId int64 `json:"accountId,omitempty,string"`
3292
3293	// Id: ID of this content category. This is a read-only, auto-generated
3294	// field.
3295	Id int64 `json:"id,omitempty,string"`
3296
3297	// Kind: Identifies what kind of resource this is. Value: the fixed
3298	// string "dfareporting#contentCategory".
3299	Kind string `json:"kind,omitempty"`
3300
3301	// Name: Name of this content category. This is a required field and
3302	// must be less than 256 characters long and unique among content
3303	// categories of the same account.
3304	Name string `json:"name,omitempty"`
3305
3306	// ServerResponse contains the HTTP response code and headers from the
3307	// server.
3308	googleapi.ServerResponse `json:"-"`
3309
3310	// ForceSendFields is a list of field names (e.g. "AccountId") to
3311	// unconditionally include in API requests. By default, fields with
3312	// empty values are omitted from API requests. However, any non-pointer,
3313	// non-interface field appearing in ForceSendFields will be sent to the
3314	// server regardless of whether the field is empty or not. This may be
3315	// used to include empty fields in Patch requests.
3316	ForceSendFields []string `json:"-"`
3317
3318	// NullFields is a list of field names (e.g. "AccountId") to include in
3319	// API requests with the JSON null value. By default, fields with empty
3320	// values are omitted from API requests. However, any field with an
3321	// empty value appearing in NullFields will be sent to the server as
3322	// null. It is an error if a field in this list has a non-empty value.
3323	// This may be used to include null fields in Patch requests.
3324	NullFields []string `json:"-"`
3325}
3326
3327func (s *ContentCategory) MarshalJSON() ([]byte, error) {
3328	type NoMethod ContentCategory
3329	raw := NoMethod(*s)
3330	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3331}
3332
3333// Conversion: A Conversion represents when a user successfully performs
3334// a desired action after seeing an ad.
3335type Conversion struct {
3336	// ChildDirectedTreatment: Whether this particular request may come from
3337	// a user under the age of 13, under COPPA compliance.
3338	ChildDirectedTreatment bool `json:"childDirectedTreatment,omitempty"`
3339
3340	// CustomVariables: Custom floodlight variables.
3341	CustomVariables []*CustomFloodlightVariable `json:"customVariables,omitempty"`
3342
3343	// Dclid: The display click ID. This field is mutually exclusive with
3344	// encryptedUserId, encryptedUserIdCandidates[], matchId, mobileDeviceId
3345	// and gclid. This or encryptedUserId or encryptedUserIdCandidates[] or
3346	// matchId or mobileDeviceId or gclid is a required field.
3347	Dclid string `json:"dclid,omitempty"`
3348
3349	// EncryptedUserId: The alphanumeric encrypted user ID. When set,
3350	// encryptionInfo should also be specified. This field is mutually
3351	// exclusive with encryptedUserIdCandidates[], matchId, mobileDeviceId,
3352	// gclid and dclid. This or encryptedUserIdCandidates[] or matchId or
3353	// mobileDeviceId or gclid or dclid is a required field.
3354	EncryptedUserId string `json:"encryptedUserId,omitempty"`
3355
3356	// EncryptedUserIdCandidates: A list of the alphanumeric encrypted user
3357	// IDs. Any user ID with exposure prior to the conversion timestamp will
3358	// be used in the inserted conversion. If no such user ID is found then
3359	// the conversion will be rejected with INVALID_ARGUMENT error. When
3360	// set, encryptionInfo should also be specified. This field may only be
3361	// used when calling batchinsert; it is not supported by batchupdate.
3362	// This field is mutually exclusive with encryptedUserId, matchId,
3363	// mobileDeviceId, gclid and dclid. This or encryptedUserId or matchId
3364	// or mobileDeviceId or gclid or dclid is a required field.
3365	EncryptedUserIdCandidates []string `json:"encryptedUserIdCandidates,omitempty"`
3366
3367	// FloodlightActivityId: Floodlight Activity ID of this conversion. This
3368	// is a required field.
3369	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
3370
3371	// FloodlightConfigurationId: Floodlight Configuration ID of this
3372	// conversion. This is a required field.
3373	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
3374
3375	// Gclid: The Google click ID. This field is mutually exclusive with
3376	// encryptedUserId, encryptedUserIdCandidates[], matchId, mobileDeviceId
3377	// and dclid. This or encryptedUserId or encryptedUserIdCandidates[] or
3378	// matchId or mobileDeviceId or dclid is a required field.
3379	Gclid string `json:"gclid,omitempty"`
3380
3381	// Kind: Identifies what kind of resource this is. Value: the fixed
3382	// string "dfareporting#conversion".
3383	Kind string `json:"kind,omitempty"`
3384
3385	// LimitAdTracking: Whether Limit Ad Tracking is enabled. When set to
3386	// true, the conversion will be used for reporting but not targeting.
3387	// This will prevent remarketing.
3388	LimitAdTracking bool `json:"limitAdTracking,omitempty"`
3389
3390	// MatchId: The match ID field. A match ID is your own first-party
3391	// identifier that has been synced with Google using the match ID
3392	// feature in Floodlight. This field is mutually exclusive with
3393	// encryptedUserId, encryptedUserIdCandidates[],mobileDeviceId, gclid
3394	// and dclid. This or encryptedUserId or encryptedUserIdCandidates[] or
3395	// mobileDeviceId or gclid or dclid is a required field.
3396	MatchId string `json:"matchId,omitempty"`
3397
3398	// MobileDeviceId: The mobile device ID. This field is mutually
3399	// exclusive with encryptedUserId, encryptedUserIdCandidates[], matchId,
3400	// gclid and dclid. This or encryptedUserId or
3401	// encryptedUserIdCandidates[] or matchId or gclid or dclid is a
3402	// required field.
3403	MobileDeviceId string `json:"mobileDeviceId,omitempty"`
3404
3405	// NonPersonalizedAd: Whether the conversion was for a non personalized
3406	// ad.
3407	NonPersonalizedAd bool `json:"nonPersonalizedAd,omitempty"`
3408
3409	// Ordinal: The ordinal of the conversion. Use this field to control how
3410	// conversions of the same user and day are de-duplicated. This is a
3411	// required field.
3412	Ordinal string `json:"ordinal,omitempty"`
3413
3414	// Quantity: The quantity of the conversion.
3415	Quantity int64 `json:"quantity,omitempty,string"`
3416
3417	// TimestampMicros: The timestamp of conversion, in Unix epoch micros.
3418	// This is a required field.
3419	TimestampMicros int64 `json:"timestampMicros,omitempty,string"`
3420
3421	// TreatmentForUnderage: Whether this particular request may come from a
3422	// user under the age of 16 (may differ by country), under compliance
3423	// with the European Union's General Data Protection Regulation (GDPR).
3424	TreatmentForUnderage bool `json:"treatmentForUnderage,omitempty"`
3425
3426	// Value: The value of the conversion.
3427	Value float64 `json:"value,omitempty"`
3428
3429	// ForceSendFields is a list of field names (e.g.
3430	// "ChildDirectedTreatment") to unconditionally include in API requests.
3431	// By default, fields with empty values are omitted from API requests.
3432	// However, any non-pointer, non-interface field appearing in
3433	// ForceSendFields will be sent to the server regardless of whether the
3434	// field is empty or not. This may be used to include empty fields in
3435	// Patch requests.
3436	ForceSendFields []string `json:"-"`
3437
3438	// NullFields is a list of field names (e.g. "ChildDirectedTreatment")
3439	// to include in API requests with the JSON null value. By default,
3440	// fields with empty values are omitted from API requests. However, any
3441	// field with an empty value appearing in NullFields will be sent to the
3442	// server as null. It is an error if a field in this list has a
3443	// non-empty value. This may be used to include null fields in Patch
3444	// requests.
3445	NullFields []string `json:"-"`
3446}
3447
3448func (s *Conversion) MarshalJSON() ([]byte, error) {
3449	type NoMethod Conversion
3450	raw := NoMethod(*s)
3451	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3452}
3453
3454func (s *Conversion) UnmarshalJSON(data []byte) error {
3455	type NoMethod Conversion
3456	var s1 struct {
3457		Value gensupport.JSONFloat64 `json:"value"`
3458		*NoMethod
3459	}
3460	s1.NoMethod = (*NoMethod)(s)
3461	if err := json.Unmarshal(data, &s1); err != nil {
3462		return err
3463	}
3464	s.Value = float64(s1.Value)
3465	return nil
3466}
3467
3468// ConversionError: The error code and description for a conversion that
3469// failed to insert or update.
3470type ConversionError struct {
3471	// Code: The error code.
3472	//
3473	// Possible values:
3474	//   "INVALID_ARGUMENT"
3475	//   "INTERNAL"
3476	//   "PERMISSION_DENIED"
3477	//   "NOT_FOUND"
3478	Code string `json:"code,omitempty"`
3479
3480	// Kind: Identifies what kind of resource this is. Value: the fixed
3481	// string "dfareporting#conversionError".
3482	Kind string `json:"kind,omitempty"`
3483
3484	// Message: A description of the error.
3485	Message string `json:"message,omitempty"`
3486
3487	// ForceSendFields is a list of field names (e.g. "Code") to
3488	// unconditionally include in API requests. By default, fields with
3489	// empty values are omitted from API requests. However, any non-pointer,
3490	// non-interface field appearing in ForceSendFields will be sent to the
3491	// server regardless of whether the field is empty or not. This may be
3492	// used to include empty fields in Patch requests.
3493	ForceSendFields []string `json:"-"`
3494
3495	// NullFields is a list of field names (e.g. "Code") to include in API
3496	// requests with the JSON null value. By default, fields with empty
3497	// values are omitted from API requests. However, any field with an
3498	// empty value appearing in NullFields will be sent to the server as
3499	// null. It is an error if a field in this list has a non-empty value.
3500	// This may be used to include null fields in Patch requests.
3501	NullFields []string `json:"-"`
3502}
3503
3504func (s *ConversionError) MarshalJSON() ([]byte, error) {
3505	type NoMethod ConversionError
3506	raw := NoMethod(*s)
3507	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3508}
3509
3510// ConversionStatus: The original conversion that was inserted or
3511// updated and whether there were any errors.
3512type ConversionStatus struct {
3513	// Conversion: The original conversion that was inserted or updated.
3514	Conversion *Conversion `json:"conversion,omitempty"`
3515
3516	// Errors: A list of errors related to this conversion.
3517	Errors []*ConversionError `json:"errors,omitempty"`
3518
3519	// Kind: Identifies what kind of resource this is. Value: the fixed
3520	// string "dfareporting#conversionStatus".
3521	Kind string `json:"kind,omitempty"`
3522
3523	// ForceSendFields is a list of field names (e.g. "Conversion") to
3524	// unconditionally include in API requests. By default, fields with
3525	// empty values are omitted from API requests. However, any non-pointer,
3526	// non-interface field appearing in ForceSendFields will be sent to the
3527	// server regardless of whether the field is empty or not. This may be
3528	// used to include empty fields in Patch requests.
3529	ForceSendFields []string `json:"-"`
3530
3531	// NullFields is a list of field names (e.g. "Conversion") to include in
3532	// API requests with the JSON null value. By default, fields with empty
3533	// values are omitted from API requests. However, any field with an
3534	// empty value appearing in NullFields will be sent to the server as
3535	// null. It is an error if a field in this list has a non-empty value.
3536	// This may be used to include null fields in Patch requests.
3537	NullFields []string `json:"-"`
3538}
3539
3540func (s *ConversionStatus) MarshalJSON() ([]byte, error) {
3541	type NoMethod ConversionStatus
3542	raw := NoMethod(*s)
3543	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3544}
3545
3546// ConversionsBatchInsertRequest: Insert Conversions Request.
3547type ConversionsBatchInsertRequest struct {
3548	// Conversions: The set of conversions to insert.
3549	Conversions []*Conversion `json:"conversions,omitempty"`
3550
3551	// EncryptionInfo: Describes how encryptedUserId or
3552	// encryptedUserIdCandidates[] is encrypted. This is a required field if
3553	// encryptedUserId or encryptedUserIdCandidates[] is used.
3554	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3555
3556	// Kind: Identifies what kind of resource this is. Value: the fixed
3557	// string "dfareporting#conversionsBatchInsertRequest".
3558	Kind string `json:"kind,omitempty"`
3559
3560	// ForceSendFields is a list of field names (e.g. "Conversions") to
3561	// unconditionally include in API requests. By default, fields with
3562	// empty values are omitted from API requests. However, any non-pointer,
3563	// non-interface field appearing in ForceSendFields will be sent to the
3564	// server regardless of whether the field is empty or not. This may be
3565	// used to include empty fields in Patch requests.
3566	ForceSendFields []string `json:"-"`
3567
3568	// NullFields is a list of field names (e.g. "Conversions") to include
3569	// in API requests with the JSON null value. By default, fields with
3570	// empty values are omitted from API requests. However, any field with
3571	// an empty value appearing in NullFields will be sent to the server as
3572	// null. It is an error if a field in this list has a non-empty value.
3573	// This may be used to include null fields in Patch requests.
3574	NullFields []string `json:"-"`
3575}
3576
3577func (s *ConversionsBatchInsertRequest) MarshalJSON() ([]byte, error) {
3578	type NoMethod ConversionsBatchInsertRequest
3579	raw := NoMethod(*s)
3580	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3581}
3582
3583// ConversionsBatchInsertResponse: Insert Conversions Response.
3584type ConversionsBatchInsertResponse struct {
3585	// HasFailures: Indicates that some or all conversions failed to insert.
3586	HasFailures bool `json:"hasFailures,omitempty"`
3587
3588	// Kind: Identifies what kind of resource this is. Value: the fixed
3589	// string "dfareporting#conversionsBatchInsertResponse".
3590	Kind string `json:"kind,omitempty"`
3591
3592	// Status: The insert status of each conversion. Statuses are returned
3593	// in the same order that conversions are inserted.
3594	Status []*ConversionStatus `json:"status,omitempty"`
3595
3596	// ServerResponse contains the HTTP response code and headers from the
3597	// server.
3598	googleapi.ServerResponse `json:"-"`
3599
3600	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3601	// unconditionally include in API requests. By default, fields with
3602	// empty values are omitted from API requests. However, any non-pointer,
3603	// non-interface field appearing in ForceSendFields will be sent to the
3604	// server regardless of whether the field is empty or not. This may be
3605	// used to include empty fields in Patch requests.
3606	ForceSendFields []string `json:"-"`
3607
3608	// NullFields is a list of field names (e.g. "HasFailures") to include
3609	// in API requests with the JSON null value. By default, fields with
3610	// empty values are omitted from API requests. However, any field with
3611	// an empty value appearing in NullFields will be sent to the server as
3612	// null. It is an error if a field in this list has a non-empty value.
3613	// This may be used to include null fields in Patch requests.
3614	NullFields []string `json:"-"`
3615}
3616
3617func (s *ConversionsBatchInsertResponse) MarshalJSON() ([]byte, error) {
3618	type NoMethod ConversionsBatchInsertResponse
3619	raw := NoMethod(*s)
3620	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3621}
3622
3623// ConversionsBatchUpdateRequest: Update Conversions Request.
3624type ConversionsBatchUpdateRequest struct {
3625	// Conversions: The set of conversions to update.
3626	Conversions []*Conversion `json:"conversions,omitempty"`
3627
3628	// EncryptionInfo: Describes how encryptedUserId is encrypted. This is a
3629	// required field if encryptedUserId is used.
3630	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3631
3632	// Kind: Identifies what kind of resource this is. Value: the fixed
3633	// string "dfareporting#conversionsBatchUpdateRequest".
3634	Kind string `json:"kind,omitempty"`
3635
3636	// ForceSendFields is a list of field names (e.g. "Conversions") to
3637	// unconditionally include in API requests. By default, fields with
3638	// empty values are omitted from API requests. However, any non-pointer,
3639	// non-interface field appearing in ForceSendFields will be sent to the
3640	// server regardless of whether the field is empty or not. This may be
3641	// used to include empty fields in Patch requests.
3642	ForceSendFields []string `json:"-"`
3643
3644	// NullFields is a list of field names (e.g. "Conversions") to include
3645	// in API requests with the JSON null value. By default, fields with
3646	// empty values are omitted from API requests. However, any field with
3647	// an empty value appearing in NullFields will be sent to the server as
3648	// null. It is an error if a field in this list has a non-empty value.
3649	// This may be used to include null fields in Patch requests.
3650	NullFields []string `json:"-"`
3651}
3652
3653func (s *ConversionsBatchUpdateRequest) MarshalJSON() ([]byte, error) {
3654	type NoMethod ConversionsBatchUpdateRequest
3655	raw := NoMethod(*s)
3656	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3657}
3658
3659// ConversionsBatchUpdateResponse: Update Conversions Response.
3660type ConversionsBatchUpdateResponse struct {
3661	// HasFailures: Indicates that some or all conversions failed to update.
3662	HasFailures bool `json:"hasFailures,omitempty"`
3663
3664	// Kind: Identifies what kind of resource this is. Value: the fixed
3665	// string "dfareporting#conversionsBatchUpdateResponse".
3666	Kind string `json:"kind,omitempty"`
3667
3668	// Status: The update status of each conversion. Statuses are returned
3669	// in the same order that conversions are updated.
3670	Status []*ConversionStatus `json:"status,omitempty"`
3671
3672	// ServerResponse contains the HTTP response code and headers from the
3673	// server.
3674	googleapi.ServerResponse `json:"-"`
3675
3676	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3677	// unconditionally include in API requests. By default, fields with
3678	// empty values are omitted from API requests. However, any non-pointer,
3679	// non-interface field appearing in ForceSendFields will be sent to the
3680	// server regardless of whether the field is empty or not. This may be
3681	// used to include empty fields in Patch requests.
3682	ForceSendFields []string `json:"-"`
3683
3684	// NullFields is a list of field names (e.g. "HasFailures") to include
3685	// in API requests with the JSON null value. By default, fields with
3686	// empty values are omitted from API requests. However, any field with
3687	// an empty value appearing in NullFields will be sent to the server as
3688	// null. It is an error if a field in this list has a non-empty value.
3689	// This may be used to include null fields in Patch requests.
3690	NullFields []string `json:"-"`
3691}
3692
3693func (s *ConversionsBatchUpdateResponse) MarshalJSON() ([]byte, error) {
3694	type NoMethod ConversionsBatchUpdateResponse
3695	raw := NoMethod(*s)
3696	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3697}
3698
3699// CountriesListResponse: Country List Response
3700type CountriesListResponse struct {
3701	// Countries: Country collection.
3702	Countries []*Country `json:"countries,omitempty"`
3703
3704	// Kind: Identifies what kind of resource this is. Value: the fixed
3705	// string "dfareporting#countriesListResponse".
3706	Kind string `json:"kind,omitempty"`
3707
3708	// ServerResponse contains the HTTP response code and headers from the
3709	// server.
3710	googleapi.ServerResponse `json:"-"`
3711
3712	// ForceSendFields is a list of field names (e.g. "Countries") to
3713	// unconditionally include in API requests. By default, fields with
3714	// empty values are omitted from API requests. However, any non-pointer,
3715	// non-interface field appearing in ForceSendFields will be sent to the
3716	// server regardless of whether the field is empty or not. This may be
3717	// used to include empty fields in Patch requests.
3718	ForceSendFields []string `json:"-"`
3719
3720	// NullFields is a list of field names (e.g. "Countries") to include in
3721	// API requests with the JSON null value. By default, fields with empty
3722	// values are omitted from API requests. However, any field with an
3723	// empty value appearing in NullFields will be sent to the server as
3724	// null. It is an error if a field in this list has a non-empty value.
3725	// This may be used to include null fields in Patch requests.
3726	NullFields []string `json:"-"`
3727}
3728
3729func (s *CountriesListResponse) MarshalJSON() ([]byte, error) {
3730	type NoMethod CountriesListResponse
3731	raw := NoMethod(*s)
3732	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3733}
3734
3735// Country: Contains information about a country that can be targeted by
3736// ads.
3737type Country struct {
3738	// CountryCode: Country code.
3739	CountryCode string `json:"countryCode,omitempty"`
3740
3741	// DartId: DART ID of this country. This is the ID used for targeting
3742	// and generating reports.
3743	DartId int64 `json:"dartId,omitempty,string"`
3744
3745	// Kind: Identifies what kind of resource this is. Value: the fixed
3746	// string "dfareporting#country".
3747	Kind string `json:"kind,omitempty"`
3748
3749	// Name: Name of this country.
3750	Name string `json:"name,omitempty"`
3751
3752	// SslEnabled: Whether ad serving supports secure servers in this
3753	// country.
3754	SslEnabled bool `json:"sslEnabled,omitempty"`
3755
3756	// ServerResponse contains the HTTP response code and headers from the
3757	// server.
3758	googleapi.ServerResponse `json:"-"`
3759
3760	// ForceSendFields is a list of field names (e.g. "CountryCode") to
3761	// unconditionally include in API requests. By default, fields with
3762	// empty values are omitted from API requests. However, any non-pointer,
3763	// non-interface field appearing in ForceSendFields will be sent to the
3764	// server regardless of whether the field is empty or not. This may be
3765	// used to include empty fields in Patch requests.
3766	ForceSendFields []string `json:"-"`
3767
3768	// NullFields is a list of field names (e.g. "CountryCode") to include
3769	// in API requests with the JSON null value. By default, fields with
3770	// empty values are omitted from API requests. However, any field with
3771	// an empty value appearing in NullFields will be sent to the server as
3772	// null. It is an error if a field in this list has a non-empty value.
3773	// This may be used to include null fields in Patch requests.
3774	NullFields []string `json:"-"`
3775}
3776
3777func (s *Country) MarshalJSON() ([]byte, error) {
3778	type NoMethod Country
3779	raw := NoMethod(*s)
3780	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3781}
3782
3783// Creative: Contains properties of a Creative.
3784type Creative struct {
3785	// AccountId: Account ID of this creative. This field, if left unset,
3786	// will be auto-generated for both insert and update operations.
3787	// Applicable to all creative types.
3788	AccountId int64 `json:"accountId,omitempty,string"`
3789
3790	// Active: Whether the creative is active. Applicable to all creative
3791	// types.
3792	Active bool `json:"active,omitempty"`
3793
3794	// AdParameters: Ad parameters user for VPAID creative. This is a
3795	// read-only field. Applicable to the following creative types: all
3796	// VPAID.
3797	AdParameters string `json:"adParameters,omitempty"`
3798
3799	// AdTagKeys: Keywords for a Rich Media creative. Keywords let you
3800	// customize the creative settings of a Rich Media ad running on your
3801	// site without having to contact the advertiser. You can use keywords
3802	// to dynamically change the look or functionality of a creative.
3803	// Applicable to the following creative types: all RICH_MEDIA, and all
3804	// VPAID.
3805	AdTagKeys []string `json:"adTagKeys,omitempty"`
3806
3807	// AdditionalSizes: Additional sizes associated with a responsive
3808	// creative. When inserting or updating a creative either the size ID
3809	// field or size width and height fields can be used. Applicable to
3810	// DISPLAY creatives when the primary asset type is HTML_IMAGE.
3811	AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
3812
3813	// AdvertiserId: Advertiser ID of this creative. This is a required
3814	// field. Applicable to all creative types.
3815	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3816
3817	// AllowScriptAccess: Whether script access is allowed for this
3818	// creative. This is a read-only and deprecated field which will
3819	// automatically be set to true on update. Applicable to the following
3820	// creative types: FLASH_INPAGE.
3821	AllowScriptAccess bool `json:"allowScriptAccess,omitempty"`
3822
3823	// Archived: Whether the creative is archived. Applicable to all
3824	// creative types.
3825	Archived bool `json:"archived,omitempty"`
3826
3827	// ArtworkType: Type of artwork used for the creative. This is a
3828	// read-only field. Applicable to the following creative types: all
3829	// RICH_MEDIA, and all VPAID.
3830	//
3831	// Possible values:
3832	//   "ARTWORK_TYPE_FLASH"
3833	//   "ARTWORK_TYPE_HTML5"
3834	//   "ARTWORK_TYPE_MIXED"
3835	//   "ARTWORK_TYPE_IMAGE"
3836	ArtworkType string `json:"artworkType,omitempty"`
3837
3838	// AuthoringSource: Source application where creative was authored.
3839	// Presently, only DBM authored creatives will have this field set.
3840	// Applicable to all creative types.
3841	//
3842	// Possible values:
3843	//   "CREATIVE_AUTHORING_SOURCE_DCM"
3844	//   "CREATIVE_AUTHORING_SOURCE_DBM"
3845	//   "CREATIVE_AUTHORING_SOURCE_STUDIO"
3846	//   "CREATIVE_AUTHORING_SOURCE_GWD"
3847	AuthoringSource string `json:"authoringSource,omitempty"`
3848
3849	// AuthoringTool: Authoring tool for HTML5 banner creatives. This is a
3850	// read-only field. Applicable to the following creative types:
3851	// HTML5_BANNER.
3852	//
3853	// Possible values:
3854	//   "NINJA"
3855	//   "SWIFFY"
3856	AuthoringTool string `json:"authoringTool,omitempty"`
3857
3858	// AutoAdvanceImages: Whether images are automatically advanced for
3859	// image gallery creatives. Applicable to the following creative types:
3860	// DISPLAY_IMAGE_GALLERY.
3861	AutoAdvanceImages bool `json:"autoAdvanceImages,omitempty"`
3862
3863	// BackgroundColor: The 6-character HTML color code, beginning with #,
3864	// for the background of the window area where the Flash file is
3865	// displayed. Default is white. Applicable to the following creative
3866	// types: FLASH_INPAGE.
3867	BackgroundColor string `json:"backgroundColor,omitempty"`
3868
3869	// BackupImageClickThroughUrl: Click-through URL for backup image.
3870	// Applicable to ENHANCED_BANNER when the primary asset type is not
3871	// HTML_IMAGE.
3872	BackupImageClickThroughUrl *CreativeClickThroughUrl `json:"backupImageClickThroughUrl,omitempty"`
3873
3874	// BackupImageFeatures: List of feature dependencies that will cause a
3875	// backup image to be served if the browser that serves the ad does not
3876	// support them. Feature dependencies are features that a browser must
3877	// be able to support in order to render your HTML5 creative asset
3878	// correctly. This field is initially auto-generated to contain all
3879	// features detected by Campaign Manager for all the assets of this
3880	// creative and can then be modified by the client. To reset this field,
3881	// copy over all the creativeAssets' detected features. Applicable to
3882	// the following creative types: HTML5_BANNER. Applicable to DISPLAY
3883	// when the primary asset type is not HTML_IMAGE.
3884	//
3885	// Possible values:
3886	//   "CSS_FONT_FACE"
3887	//   "CSS_BACKGROUND_SIZE"
3888	//   "CSS_BORDER_IMAGE"
3889	//   "CSS_BORDER_RADIUS"
3890	//   "CSS_BOX_SHADOW"
3891	//   "CSS_FLEX_BOX"
3892	//   "CSS_HSLA"
3893	//   "CSS_MULTIPLE_BGS"
3894	//   "CSS_OPACITY"
3895	//   "CSS_RGBA"
3896	//   "CSS_TEXT_SHADOW"
3897	//   "CSS_ANIMATIONS"
3898	//   "CSS_COLUMNS"
3899	//   "CSS_GENERATED_CONTENT"
3900	//   "CSS_GRADIENTS"
3901	//   "CSS_REFLECTIONS"
3902	//   "CSS_TRANSFORMS"
3903	//   "CSS_TRANSFORMS3D"
3904	//   "CSS_TRANSITIONS"
3905	//   "APPLICATION_CACHE"
3906	//   "CANVAS"
3907	//   "CANVAS_TEXT"
3908	//   "DRAG_AND_DROP"
3909	//   "HASH_CHANGE"
3910	//   "HISTORY"
3911	//   "AUDIO"
3912	//   "VIDEO"
3913	//   "INDEXED_DB"
3914	//   "INPUT_ATTR_AUTOCOMPLETE"
3915	//   "INPUT_ATTR_AUTOFOCUS"
3916	//   "INPUT_ATTR_LIST"
3917	//   "INPUT_ATTR_PLACEHOLDER"
3918	//   "INPUT_ATTR_MAX"
3919	//   "INPUT_ATTR_MIN"
3920	//   "INPUT_ATTR_MULTIPLE"
3921	//   "INPUT_ATTR_PATTERN"
3922	//   "INPUT_ATTR_REQUIRED"
3923	//   "INPUT_ATTR_STEP"
3924	//   "INPUT_TYPE_SEARCH"
3925	//   "INPUT_TYPE_TEL"
3926	//   "INPUT_TYPE_URL"
3927	//   "INPUT_TYPE_EMAIL"
3928	//   "INPUT_TYPE_DATETIME"
3929	//   "INPUT_TYPE_DATE"
3930	//   "INPUT_TYPE_MONTH"
3931	//   "INPUT_TYPE_WEEK"
3932	//   "INPUT_TYPE_TIME"
3933	//   "INPUT_TYPE_DATETIME_LOCAL"
3934	//   "INPUT_TYPE_NUMBER"
3935	//   "INPUT_TYPE_RANGE"
3936	//   "INPUT_TYPE_COLOR"
3937	//   "LOCAL_STORAGE"
3938	//   "POST_MESSAGE"
3939	//   "SESSION_STORAGE"
3940	//   "WEB_SOCKETS"
3941	//   "WEB_SQL_DATABASE"
3942	//   "WEB_WORKERS"
3943	//   "GEO_LOCATION"
3944	//   "INLINE_SVG"
3945	//   "SMIL"
3946	//   "SVG_HREF"
3947	//   "SVG_CLIP_PATHS"
3948	//   "TOUCH"
3949	//   "WEBGL"
3950	//   "SVG_FILTERS"
3951	//   "SVG_FE_IMAGE"
3952	BackupImageFeatures []string `json:"backupImageFeatures,omitempty"`
3953
3954	// BackupImageReportingLabel: Reporting label used for HTML5 banner
3955	// backup image. Applicable to the following creative types: DISPLAY
3956	// when the primary asset type is not HTML_IMAGE.
3957	BackupImageReportingLabel string `json:"backupImageReportingLabel,omitempty"`
3958
3959	// BackupImageTargetWindow: Target window for backup image. Applicable
3960	// to the following creative types: FLASH_INPAGE and HTML5_BANNER.
3961	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
3962	BackupImageTargetWindow *TargetWindow `json:"backupImageTargetWindow,omitempty"`
3963
3964	// ClickTags: Click tags of the creative. For DISPLAY, FLASH_INPAGE, and
3965	// HTML5_BANNER creatives, this is a subset of detected click tags for
3966	// the assets associated with this creative. After creating a flash
3967	// asset, detected click tags will be returned in the
3968	// creativeAssetMetadata. When inserting the creative, populate the
3969	// creative clickTags field using the creativeAssetMetadata.clickTags
3970	// field. For DISPLAY_IMAGE_GALLERY creatives, there should be exactly
3971	// one entry in this list for each image creative asset. A click tag is
3972	// matched with a corresponding creative asset by matching the
3973	// clickTag.name field with the creativeAsset.assetIdentifier.name
3974	// field. Applicable to the following creative types:
3975	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER. Applicable to
3976	// DISPLAY when the primary asset type is not HTML_IMAGE.
3977	ClickTags []*ClickTag `json:"clickTags,omitempty"`
3978
3979	// CommercialId: Industry standard ID assigned to creative for reach and
3980	// frequency. Applicable to INSTREAM_VIDEO_REDIRECT creatives.
3981	CommercialId string `json:"commercialId,omitempty"`
3982
3983	// CompanionCreatives: List of companion creatives assigned to an
3984	// in-Stream video creative. Acceptable values include IDs of existing
3985	// flash and image creatives. Applicable to the following creative
3986	// types: all VPAID, all INSTREAM_AUDIO and all INSTREAM_VIDEO with
3987	// dynamicAssetSelection set to false.
3988	CompanionCreatives googleapi.Int64s `json:"companionCreatives,omitempty"`
3989
3990	// Compatibility: Compatibilities associated with this creative. This is
3991	// a read-only field. DISPLAY and DISPLAY_INTERSTITIAL refer to
3992	// rendering either on desktop or on mobile devices or in mobile apps
3993	// for regular or interstitial ads, respectively. APP and
3994	// APP_INTERSTITIAL are for rendering in mobile apps. Only pre-existing
3995	// creatives may have these compatibilities since new creatives will
3996	// either be assigned DISPLAY or DISPLAY_INTERSTITIAL instead.
3997	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
3998	// with the VAST standard. IN_STREAM_AUDIO refers to rendering in
3999	// in-stream audio ads developed with the VAST standard. Applicable to
4000	// all creative types. Acceptable values are: - "APP" -
4001	// "APP_INTERSTITIAL" - "IN_STREAM_VIDEO" - "IN_STREAM_AUDIO" -
4002	// "DISPLAY" - "DISPLAY_INTERSTITIAL"
4003	//
4004	// Possible values:
4005	//   "DISPLAY"
4006	//   "DISPLAY_INTERSTITIAL"
4007	//   "APP"
4008	//   "APP_INTERSTITIAL"
4009	//   "IN_STREAM_VIDEO"
4010	//   "IN_STREAM_AUDIO"
4011	Compatibility []string `json:"compatibility,omitempty"`
4012
4013	// ConvertFlashToHtml5: Whether Flash assets associated with the
4014	// creative need to be automatically converted to HTML5. This flag is
4015	// enabled by default and users can choose to disable it if they don't
4016	// want the system to generate and use HTML5 asset for this creative.
4017	// Applicable to the following creative type: FLASH_INPAGE. Applicable
4018	// to DISPLAY when the primary asset type is not HTML_IMAGE.
4019	ConvertFlashToHtml5 bool `json:"convertFlashToHtml5,omitempty"`
4020
4021	// CounterCustomEvents: List of counter events configured for the
4022	// creative. For DISPLAY_IMAGE_GALLERY creatives, these are read-only
4023	// and auto-generated from clickTags. Applicable to the following
4024	// creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
4025	CounterCustomEvents []*CreativeCustomEvent `json:"counterCustomEvents,omitempty"`
4026
4027	// CreativeAssetSelection: Required if dynamicAssetSelection is true.
4028	CreativeAssetSelection *CreativeAssetSelection `json:"creativeAssetSelection,omitempty"`
4029
4030	// CreativeAssets: Assets associated with a creative. Applicable to all
4031	// but the following creative types: INTERNAL_REDIRECT,
4032	// INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT
4033	CreativeAssets []*CreativeAsset `json:"creativeAssets,omitempty"`
4034
4035	// CreativeFieldAssignments: Creative field assignments for this
4036	// creative. Applicable to all creative types.
4037	CreativeFieldAssignments []*CreativeFieldAssignment `json:"creativeFieldAssignments,omitempty"`
4038
4039	// CustomKeyValues: Custom key-values for a Rich Media creative.
4040	// Key-values let you customize the creative settings of a Rich Media ad
4041	// running on your site without having to contact the advertiser. You
4042	// can use key-values to dynamically change the look or functionality of
4043	// a creative. Applicable to the following creative types: all
4044	// RICH_MEDIA, and all VPAID.
4045	CustomKeyValues []string `json:"customKeyValues,omitempty"`
4046
4047	// DynamicAssetSelection: Set this to true to enable the use of rules to
4048	// target individual assets in this creative. When set to true
4049	// creativeAssetSelection must be set. This also controls asset-level
4050	// companions. When this is true, companion creatives should be assigned
4051	// to creative assets. Learn more. Applicable to INSTREAM_VIDEO
4052	// creatives.
4053	DynamicAssetSelection bool `json:"dynamicAssetSelection,omitempty"`
4054
4055	// ExitCustomEvents: List of exit events configured for the creative.
4056	// For DISPLAY and DISPLAY_IMAGE_GALLERY creatives, these are read-only
4057	// and auto-generated from clickTags, For DISPLAY, an event is also
4058	// created from the backupImageReportingLabel. Applicable to the
4059	// following creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and
4060	// all VPAID. Applicable to DISPLAY when the primary asset type is not
4061	// HTML_IMAGE.
4062	ExitCustomEvents []*CreativeCustomEvent `json:"exitCustomEvents,omitempty"`
4063
4064	// FsCommand: OpenWindow FSCommand of this creative. This lets the SWF
4065	// file communicate with either Flash Player or the program hosting
4066	// Flash Player, such as a web browser. This is only triggered if
4067	// allowScriptAccess field is true. Applicable to the following creative
4068	// types: FLASH_INPAGE.
4069	FsCommand *FsCommand `json:"fsCommand,omitempty"`
4070
4071	// HtmlCode: HTML code for the creative. This is a required field when
4072	// applicable. This field is ignored if htmlCodeLocked is true.
4073	// Applicable to the following creative types: all CUSTOM, FLASH_INPAGE,
4074	// and HTML5_BANNER, and all RICH_MEDIA.
4075	HtmlCode string `json:"htmlCode,omitempty"`
4076
4077	// HtmlCodeLocked: Whether HTML code is generated by Campaign Manager or
4078	// manually entered. Set to true to ignore changes to htmlCode.
4079	// Applicable to the following creative types: FLASH_INPAGE and
4080	// HTML5_BANNER.
4081	HtmlCodeLocked bool `json:"htmlCodeLocked,omitempty"`
4082
4083	// Id: ID of this creative. This is a read-only, auto-generated field.
4084	// Applicable to all creative types.
4085	Id int64 `json:"id,omitempty,string"`
4086
4087	// IdDimensionValue: Dimension value for the ID of this creative. This
4088	// is a read-only field. Applicable to all creative types.
4089	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4090
4091	// Kind: Identifies what kind of resource this is. Value: the fixed
4092	// string "dfareporting#creative".
4093	Kind string `json:"kind,omitempty"`
4094
4095	// LastModifiedInfo: Creative last modification information. This is a
4096	// read-only field. Applicable to all creative types.
4097	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
4098
4099	// LatestTraffickedCreativeId: Latest Studio trafficked creative ID
4100	// associated with rich media and VPAID creatives. This is a read-only
4101	// field. Applicable to the following creative types: all RICH_MEDIA,
4102	// and all VPAID.
4103	LatestTraffickedCreativeId int64 `json:"latestTraffickedCreativeId,omitempty,string"`
4104
4105	// MediaDescription: Description of the audio or video ad. Applicable to
4106	// the following creative types: all INSTREAM_VIDEO, INSTREAM_AUDIO, and
4107	// all VPAID.
4108	MediaDescription string `json:"mediaDescription,omitempty"`
4109
4110	// MediaDuration: Creative audio or video duration in seconds. This is a
4111	// read-only field. Applicable to the following creative types:
4112	// INSTREAM_VIDEO, INSTREAM_AUDIO, all RICH_MEDIA, and all VPAID.
4113	MediaDuration float64 `json:"mediaDuration,omitempty"`
4114
4115	// Name: Name of the creative. This is a required field and must be less
4116	// than 256 characters long. Applicable to all creative types.
4117	Name string `json:"name,omitempty"`
4118
4119	// ObaIcon: Online behavioral advertising icon to be added to the
4120	// creative. Applicable to the following creative types: all
4121	// INSTREAM_VIDEO.
4122	ObaIcon *ObaIcon `json:"obaIcon,omitempty"`
4123
4124	// OverrideCss: Override CSS value for rich media creatives. Applicable
4125	// to the following creative types: all RICH_MEDIA.
4126	OverrideCss string `json:"overrideCss,omitempty"`
4127
4128	// ProgressOffset: Amount of time to play the video before counting a
4129	// view. Applicable to the following creative types: all INSTREAM_VIDEO.
4130	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
4131
4132	// RedirectUrl: URL of hosted image or hosted video or another ad tag.
4133	// For INSTREAM_VIDEO_REDIRECT creatives this is the in-stream video
4134	// redirect URL. The standard for a VAST (Video Ad Serving Template) ad
4135	// response allows for a redirect link to another VAST 2.0 or 3.0 call.
4136	// This is a required field when applicable. Applicable to the following
4137	// creative types: DISPLAY_REDIRECT, INTERNAL_REDIRECT,
4138	// INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO_REDIRECT
4139	RedirectUrl string `json:"redirectUrl,omitempty"`
4140
4141	// RenderingId: ID of current rendering version. This is a read-only
4142	// field. Applicable to all creative types.
4143	RenderingId int64 `json:"renderingId,omitempty,string"`
4144
4145	// RenderingIdDimensionValue: Dimension value for the rendering ID of
4146	// this creative. This is a read-only field. Applicable to all creative
4147	// types.
4148	RenderingIdDimensionValue *DimensionValue `json:"renderingIdDimensionValue,omitempty"`
4149
4150	// RequiredFlashPluginVersion: The minimum required Flash plugin version
4151	// for this creative. For example, 11.2.202.235. This is a read-only
4152	// field. Applicable to the following creative types: all RICH_MEDIA,
4153	// and all VPAID.
4154	RequiredFlashPluginVersion string `json:"requiredFlashPluginVersion,omitempty"`
4155
4156	// RequiredFlashVersion: The internal Flash version for this creative as
4157	// calculated by Studio. This is a read-only field. Applicable to the
4158	// following creative types: FLASH_INPAGE all RICH_MEDIA, and all VPAID.
4159	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
4160	RequiredFlashVersion int64 `json:"requiredFlashVersion,omitempty"`
4161
4162	// Size: Size associated with this creative. When inserting or updating
4163	// a creative either the size ID field or size width and height fields
4164	// can be used. This is a required field when applicable; however for
4165	// IMAGE, FLASH_INPAGE creatives, and for DISPLAY creatives with a
4166	// primary asset of type HTML_IMAGE, if left blank, this field will be
4167	// automatically set using the actual size of the associated image
4168	// assets. Applicable to the following creative types: DISPLAY,
4169	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all
4170	// RICH_MEDIA.
4171	Size *Size `json:"size,omitempty"`
4172
4173	// SkipOffset: Amount of time to play the video before the skip button
4174	// appears. Applicable to the following creative types: all
4175	// INSTREAM_VIDEO.
4176	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
4177
4178	// Skippable: Whether the user can choose to skip the creative.
4179	// Applicable to the following creative types: all INSTREAM_VIDEO and
4180	// all VPAID.
4181	Skippable bool `json:"skippable,omitempty"`
4182
4183	// SslCompliant: Whether the creative is SSL-compliant. This is a
4184	// read-only field. Applicable to all creative types.
4185	SslCompliant bool `json:"sslCompliant,omitempty"`
4186
4187	// SslOverride: Whether creative should be treated as SSL compliant even
4188	// if the system scan shows it's not. Applicable to all creative types.
4189	SslOverride bool `json:"sslOverride,omitempty"`
4190
4191	// StudioAdvertiserId: Studio advertiser ID associated with rich media
4192	// and VPAID creatives. This is a read-only field. Applicable to the
4193	// following creative types: all RICH_MEDIA, and all VPAID.
4194	StudioAdvertiserId int64 `json:"studioAdvertiserId,omitempty,string"`
4195
4196	// StudioCreativeId: Studio creative ID associated with rich media and
4197	// VPAID creatives. This is a read-only field. Applicable to the
4198	// following creative types: all RICH_MEDIA, and all VPAID.
4199	StudioCreativeId int64 `json:"studioCreativeId,omitempty,string"`
4200
4201	// StudioTraffickedCreativeId: Studio trafficked creative ID associated
4202	// with rich media and VPAID creatives. This is a read-only field.
4203	// Applicable to the following creative types: all RICH_MEDIA, and all
4204	// VPAID.
4205	StudioTraffickedCreativeId int64 `json:"studioTraffickedCreativeId,omitempty,string"`
4206
4207	// SubaccountId: Subaccount ID of this creative. This field, if left
4208	// unset, will be auto-generated for both insert and update operations.
4209	// Applicable to all creative types.
4210	SubaccountId int64 `json:"subaccountId,omitempty,string"`
4211
4212	// ThirdPartyBackupImageImpressionsUrl: Third-party URL used to record
4213	// backup image impressions. Applicable to the following creative types:
4214	// all RICH_MEDIA.
4215	ThirdPartyBackupImageImpressionsUrl string `json:"thirdPartyBackupImageImpressionsUrl,omitempty"`
4216
4217	// ThirdPartyRichMediaImpressionsUrl: Third-party URL used to record
4218	// rich media impressions. Applicable to the following creative types:
4219	// all RICH_MEDIA.
4220	ThirdPartyRichMediaImpressionsUrl string `json:"thirdPartyRichMediaImpressionsUrl,omitempty"`
4221
4222	// ThirdPartyUrls: Third-party URLs for tracking in-stream creative
4223	// events. Applicable to the following creative types: all
4224	// INSTREAM_VIDEO, all INSTREAM_AUDIO, and all VPAID.
4225	ThirdPartyUrls []*ThirdPartyTrackingUrl `json:"thirdPartyUrls,omitempty"`
4226
4227	// TimerCustomEvents: List of timer events configured for the creative.
4228	// For DISPLAY_IMAGE_GALLERY creatives, these are read-only and
4229	// auto-generated from clickTags. Applicable to the following creative
4230	// types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
4231	// Applicable to DISPLAY when the primary asset is not HTML_IMAGE.
4232	TimerCustomEvents []*CreativeCustomEvent `json:"timerCustomEvents,omitempty"`
4233
4234	// TotalFileSize: Combined size of all creative assets. This is a
4235	// read-only field. Applicable to the following creative types: all
4236	// RICH_MEDIA, and all VPAID.
4237	TotalFileSize int64 `json:"totalFileSize,omitempty,string"`
4238
4239	// Type: Type of this creative. This is a required field. Applicable to
4240	// all creative types. *Note:* FLASH_INPAGE, HTML5_BANNER, and IMAGE are
4241	// only used for existing creatives. New creatives should use DISPLAY as
4242	// a replacement for these types.
4243	//
4244	// Possible values:
4245	//   "IMAGE"
4246	//   "DISPLAY_REDIRECT"
4247	//   "CUSTOM_DISPLAY"
4248	//   "INTERNAL_REDIRECT"
4249	//   "CUSTOM_DISPLAY_INTERSTITIAL"
4250	//   "INTERSTITIAL_INTERNAL_REDIRECT"
4251	//   "TRACKING_TEXT"
4252	//   "RICH_MEDIA_DISPLAY_BANNER"
4253	//   "RICH_MEDIA_INPAGE_FLOATING"
4254	//   "RICH_MEDIA_IM_EXPAND"
4255	//   "RICH_MEDIA_DISPLAY_EXPANDING"
4256	//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
4257	//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
4258	//   "RICH_MEDIA_MOBILE_IN_APP"
4259	//   "FLASH_INPAGE"
4260	//   "INSTREAM_VIDEO"
4261	//   "VPAID_LINEAR_VIDEO"
4262	//   "VPAID_NON_LINEAR_VIDEO"
4263	//   "INSTREAM_VIDEO_REDIRECT"
4264	//   "RICH_MEDIA_PEEL_DOWN"
4265	//   "HTML5_BANNER"
4266	//   "DISPLAY"
4267	//   "DISPLAY_IMAGE_GALLERY"
4268	//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
4269	//   "INSTREAM_AUDIO"
4270	Type string `json:"type,omitempty"`
4271
4272	// UniversalAdId: A Universal Ad ID as per the VAST 4.0 spec. Applicable
4273	// to the following creative types: INSTREAM_AUDIO and INSTREAM_VIDEO
4274	// and VPAID.
4275	UniversalAdId *UniversalAdId `json:"universalAdId,omitempty"`
4276
4277	// Version: The version number helps you keep track of multiple versions
4278	// of your creative in your reports. The version number will always be
4279	// auto-generated during insert operations to start at 1. For tracking
4280	// creatives the version cannot be incremented and will always remain at
4281	// 1. For all other creative types the version can be incremented only
4282	// by 1 during update operations. In addition, the version will be
4283	// automatically incremented by 1 when undergoing Rich Media creative
4284	// merging. Applicable to all creative types.
4285	Version int64 `json:"version,omitempty"`
4286
4287	// ServerResponse contains the HTTP response code and headers from the
4288	// server.
4289	googleapi.ServerResponse `json:"-"`
4290
4291	// ForceSendFields is a list of field names (e.g. "AccountId") to
4292	// unconditionally include in API requests. By default, fields with
4293	// empty values are omitted from API requests. However, any non-pointer,
4294	// non-interface field appearing in ForceSendFields will be sent to the
4295	// server regardless of whether the field is empty or not. This may be
4296	// used to include empty fields in Patch requests.
4297	ForceSendFields []string `json:"-"`
4298
4299	// NullFields is a list of field names (e.g. "AccountId") to include in
4300	// API requests with the JSON null value. By default, fields with empty
4301	// values are omitted from API requests. However, any field with an
4302	// empty value appearing in NullFields will be sent to the server as
4303	// null. It is an error if a field in this list has a non-empty value.
4304	// This may be used to include null fields in Patch requests.
4305	NullFields []string `json:"-"`
4306}
4307
4308func (s *Creative) MarshalJSON() ([]byte, error) {
4309	type NoMethod Creative
4310	raw := NoMethod(*s)
4311	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4312}
4313
4314func (s *Creative) UnmarshalJSON(data []byte) error {
4315	type NoMethod Creative
4316	var s1 struct {
4317		MediaDuration gensupport.JSONFloat64 `json:"mediaDuration"`
4318		*NoMethod
4319	}
4320	s1.NoMethod = (*NoMethod)(s)
4321	if err := json.Unmarshal(data, &s1); err != nil {
4322		return err
4323	}
4324	s.MediaDuration = float64(s1.MediaDuration)
4325	return nil
4326}
4327
4328// CreativeAsset: Creative Asset.
4329type CreativeAsset struct {
4330	// ActionScript3: Whether ActionScript3 is enabled for the flash asset.
4331	// This is a read-only field. Applicable to the following creative type:
4332	// FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is
4333	// not HTML_IMAGE.
4334	ActionScript3 bool `json:"actionScript3,omitempty"`
4335
4336	// Active: Whether the video or audio asset is active. This is a
4337	// read-only field for VPAID_NON_LINEAR_VIDEO assets. Applicable to the
4338	// following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and all
4339	// VPAID.
4340	Active bool `json:"active,omitempty"`
4341
4342	// AdditionalSizes: Additional sizes associated with this creative
4343	// asset. HTML5 asset generated by compatible software such as GWD will
4344	// be able to support more sizes this creative asset can render.
4345	AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
4346
4347	// Alignment: Possible alignments for an asset. This is a read-only
4348	// field. Applicable to the following creative types:
4349	// RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL .
4350	//
4351	// Possible values:
4352	//   "ALIGNMENT_TOP"
4353	//   "ALIGNMENT_RIGHT"
4354	//   "ALIGNMENT_BOTTOM"
4355	//   "ALIGNMENT_LEFT"
4356	Alignment string `json:"alignment,omitempty"`
4357
4358	// ArtworkType: Artwork type of rich media creative. This is a read-only
4359	// field. Applicable to the following creative types: all RICH_MEDIA.
4360	//
4361	// Possible values:
4362	//   "ARTWORK_TYPE_FLASH"
4363	//   "ARTWORK_TYPE_HTML5"
4364	//   "ARTWORK_TYPE_MIXED"
4365	//   "ARTWORK_TYPE_IMAGE"
4366	ArtworkType string `json:"artworkType,omitempty"`
4367
4368	// AssetIdentifier: Identifier of this asset. This is the same
4369	// identifier returned during creative asset insert operation. This is a
4370	// required field. Applicable to all but the following creative types:
4371	// all REDIRECT and TRACKING_TEXT.
4372	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4373
4374	// AudioBitRate: Audio stream bit rate in kbps. This is a read-only
4375	// field. Applicable to the following creative types: INSTREAM_AUDIO,
4376	// INSTREAM_VIDEO and all VPAID.
4377	AudioBitRate int64 `json:"audioBitRate,omitempty"`
4378
4379	// AudioSampleRate: Audio sample bit rate in hertz. This is a read-only
4380	// field. Applicable to the following creative types: INSTREAM_AUDIO,
4381	// INSTREAM_VIDEO and all VPAID.
4382	AudioSampleRate int64 `json:"audioSampleRate,omitempty"`
4383
4384	// BackupImageExit: Exit event configured for the backup image.
4385	// Applicable to the following creative types: all RICH_MEDIA.
4386	BackupImageExit *CreativeCustomEvent `json:"backupImageExit,omitempty"`
4387
4388	// BitRate: Detected bit-rate for audio or video asset. This is a
4389	// read-only field. Applicable to the following creative types:
4390	// INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
4391	BitRate int64 `json:"bitRate,omitempty"`
4392
4393	// ChildAssetType: Rich media child asset type. This is a read-only
4394	// field. Applicable to the following creative types: all VPAID.
4395	//
4396	// Possible values:
4397	//   "CHILD_ASSET_TYPE_FLASH"
4398	//   "CHILD_ASSET_TYPE_VIDEO"
4399	//   "CHILD_ASSET_TYPE_IMAGE"
4400	//   "CHILD_ASSET_TYPE_DATA"
4401	ChildAssetType string `json:"childAssetType,omitempty"`
4402
4403	// CollapsedSize: Size of an asset when collapsed. This is a read-only
4404	// field. Applicable to the following creative types: all RICH_MEDIA and
4405	// all VPAID. Additionally, applicable to assets whose displayType is
4406	// ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN.
4407	CollapsedSize *Size `json:"collapsedSize,omitempty"`
4408
4409	// CompanionCreativeIds: List of companion creatives assigned to an
4410	// in-stream video creative asset. Acceptable values include IDs of
4411	// existing flash and image creatives. Applicable to INSTREAM_VIDEO
4412	// creative type with dynamicAssetSelection set to true.
4413	CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"`
4414
4415	// CustomStartTimeValue: Custom start time in seconds for making the
4416	// asset visible. Applicable to the following creative types: all
4417	// RICH_MEDIA. Value must be greater than or equal to 0.
4418	CustomStartTimeValue int64 `json:"customStartTimeValue,omitempty"`
4419
4420	// DetectedFeatures: List of feature dependencies for the creative asset
4421	// that are detected by Campaign Manager. Feature dependencies are
4422	// features that a browser must be able to support in order to render
4423	// your HTML5 creative correctly. This is a read-only, auto-generated
4424	// field. Applicable to the following creative types: HTML5_BANNER.
4425	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
4426	//
4427	// Possible values:
4428	//   "CSS_FONT_FACE"
4429	//   "CSS_BACKGROUND_SIZE"
4430	//   "CSS_BORDER_IMAGE"
4431	//   "CSS_BORDER_RADIUS"
4432	//   "CSS_BOX_SHADOW"
4433	//   "CSS_FLEX_BOX"
4434	//   "CSS_HSLA"
4435	//   "CSS_MULTIPLE_BGS"
4436	//   "CSS_OPACITY"
4437	//   "CSS_RGBA"
4438	//   "CSS_TEXT_SHADOW"
4439	//   "CSS_ANIMATIONS"
4440	//   "CSS_COLUMNS"
4441	//   "CSS_GENERATED_CONTENT"
4442	//   "CSS_GRADIENTS"
4443	//   "CSS_REFLECTIONS"
4444	//   "CSS_TRANSFORMS"
4445	//   "CSS_TRANSFORMS3D"
4446	//   "CSS_TRANSITIONS"
4447	//   "APPLICATION_CACHE"
4448	//   "CANVAS"
4449	//   "CANVAS_TEXT"
4450	//   "DRAG_AND_DROP"
4451	//   "HASH_CHANGE"
4452	//   "HISTORY"
4453	//   "AUDIO"
4454	//   "VIDEO"
4455	//   "INDEXED_DB"
4456	//   "INPUT_ATTR_AUTOCOMPLETE"
4457	//   "INPUT_ATTR_AUTOFOCUS"
4458	//   "INPUT_ATTR_LIST"
4459	//   "INPUT_ATTR_PLACEHOLDER"
4460	//   "INPUT_ATTR_MAX"
4461	//   "INPUT_ATTR_MIN"
4462	//   "INPUT_ATTR_MULTIPLE"
4463	//   "INPUT_ATTR_PATTERN"
4464	//   "INPUT_ATTR_REQUIRED"
4465	//   "INPUT_ATTR_STEP"
4466	//   "INPUT_TYPE_SEARCH"
4467	//   "INPUT_TYPE_TEL"
4468	//   "INPUT_TYPE_URL"
4469	//   "INPUT_TYPE_EMAIL"
4470	//   "INPUT_TYPE_DATETIME"
4471	//   "INPUT_TYPE_DATE"
4472	//   "INPUT_TYPE_MONTH"
4473	//   "INPUT_TYPE_WEEK"
4474	//   "INPUT_TYPE_TIME"
4475	//   "INPUT_TYPE_DATETIME_LOCAL"
4476	//   "INPUT_TYPE_NUMBER"
4477	//   "INPUT_TYPE_RANGE"
4478	//   "INPUT_TYPE_COLOR"
4479	//   "LOCAL_STORAGE"
4480	//   "POST_MESSAGE"
4481	//   "SESSION_STORAGE"
4482	//   "WEB_SOCKETS"
4483	//   "WEB_SQL_DATABASE"
4484	//   "WEB_WORKERS"
4485	//   "GEO_LOCATION"
4486	//   "INLINE_SVG"
4487	//   "SMIL"
4488	//   "SVG_HREF"
4489	//   "SVG_CLIP_PATHS"
4490	//   "TOUCH"
4491	//   "WEBGL"
4492	//   "SVG_FILTERS"
4493	//   "SVG_FE_IMAGE"
4494	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4495
4496	// DisplayType: Type of rich media asset. This is a read-only field.
4497	// Applicable to the following creative types: all RICH_MEDIA.
4498	//
4499	// Possible values:
4500	//   "ASSET_DISPLAY_TYPE_INPAGE"
4501	//   "ASSET_DISPLAY_TYPE_FLOATING"
4502	//   "ASSET_DISPLAY_TYPE_OVERLAY"
4503	//   "ASSET_DISPLAY_TYPE_EXPANDING"
4504	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH"
4505	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH_EXPANDING"
4506	//   "ASSET_DISPLAY_TYPE_PEEL_DOWN"
4507	//   "ASSET_DISPLAY_TYPE_VPAID_LINEAR"
4508	//   "ASSET_DISPLAY_TYPE_VPAID_NON_LINEAR"
4509	//   "ASSET_DISPLAY_TYPE_BACKDROP"
4510	DisplayType string `json:"displayType,omitempty"`
4511
4512	// Duration: Duration in seconds for which an asset will be displayed.
4513	// Applicable to the following creative types: INSTREAM_AUDIO,
4514	// INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. Value must be greater than or
4515	// equal to 1.
4516	Duration int64 `json:"duration,omitempty"`
4517
4518	// DurationType: Duration type for which an asset will be displayed.
4519	// Applicable to the following creative types: all RICH_MEDIA.
4520	//
4521	// Possible values:
4522	//   "ASSET_DURATION_TYPE_AUTO"
4523	//   "ASSET_DURATION_TYPE_NONE"
4524	//   "ASSET_DURATION_TYPE_CUSTOM"
4525	DurationType string `json:"durationType,omitempty"`
4526
4527	// ExpandedDimension: Detected expanded dimension for video asset. This
4528	// is a read-only field. Applicable to the following creative types:
4529	// INSTREAM_VIDEO and all VPAID.
4530	ExpandedDimension *Size `json:"expandedDimension,omitempty"`
4531
4532	// FileSize: File size associated with this creative asset. This is a
4533	// read-only field. Applicable to all but the following creative types:
4534	// all REDIRECT and TRACKING_TEXT.
4535	FileSize int64 `json:"fileSize,omitempty,string"`
4536
4537	// FlashVersion: Flash version of the asset. This is a read-only field.
4538	// Applicable to the following creative types: FLASH_INPAGE, all
4539	// RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
4540	// asset type is not HTML_IMAGE.
4541	FlashVersion int64 `json:"flashVersion,omitempty"`
4542
4543	// FrameRate: Video frame rate for video asset in frames per second.
4544	// This is a read-only field. Applicable to the following creative
4545	// types: INSTREAM_VIDEO and all VPAID.
4546	FrameRate float64 `json:"frameRate,omitempty"`
4547
4548	// HideFlashObjects: Whether to hide Flash objects flag for an asset.
4549	// Applicable to the following creative types: all RICH_MEDIA.
4550	HideFlashObjects bool `json:"hideFlashObjects,omitempty"`
4551
4552	// HideSelectionBoxes: Whether to hide selection boxes flag for an
4553	// asset. Applicable to the following creative types: all RICH_MEDIA.
4554	HideSelectionBoxes bool `json:"hideSelectionBoxes,omitempty"`
4555
4556	// HorizontallyLocked: Whether the asset is horizontally locked. This is
4557	// a read-only field. Applicable to the following creative types: all
4558	// RICH_MEDIA.
4559	HorizontallyLocked bool `json:"horizontallyLocked,omitempty"`
4560
4561	// Id: Numeric ID of this creative asset. This is a required field and
4562	// should not be modified. Applicable to all but the following creative
4563	// types: all REDIRECT and TRACKING_TEXT.
4564	Id int64 `json:"id,omitempty,string"`
4565
4566	// IdDimensionValue: Dimension value for the ID of the asset. This is a
4567	// read-only, auto-generated field.
4568	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4569
4570	// MediaDuration: Detected duration for audio or video asset. This is a
4571	// read-only field. Applicable to the following creative types:
4572	// INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
4573	MediaDuration float64 `json:"mediaDuration,omitempty"`
4574
4575	// MimeType: Detected MIME type for audio or video asset. This is a
4576	// read-only field. Applicable to the following creative types:
4577	// INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
4578	MimeType string `json:"mimeType,omitempty"`
4579
4580	// Offset: Offset position for an asset in collapsed mode. This is a
4581	// read-only field. Applicable to the following creative types: all
4582	// RICH_MEDIA and all VPAID. Additionally, only applicable to assets
4583	// whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or
4584	// ASSET_DISPLAY_TYPE_PEEL_DOWN.
4585	Offset *OffsetPosition `json:"offset,omitempty"`
4586
4587	// Orientation: Orientation of video asset. This is a read-only,
4588	// auto-generated field.
4589	//
4590	// Possible values:
4591	//   "LANDSCAPE"
4592	//   "PORTRAIT"
4593	//   "SQUARE"
4594	Orientation string `json:"orientation,omitempty"`
4595
4596	// OriginalBackup: Whether the backup asset is original or changed by
4597	// the user in Campaign Manager. Applicable to the following creative
4598	// types: all RICH_MEDIA.
4599	OriginalBackup bool `json:"originalBackup,omitempty"`
4600
4601	// PoliteLoad: Whether this asset is used as a polite load asset.
4602	PoliteLoad bool `json:"politeLoad,omitempty"`
4603
4604	// Position: Offset position for an asset. Applicable to the following
4605	// creative types: all RICH_MEDIA.
4606	Position *OffsetPosition `json:"position,omitempty"`
4607
4608	// PositionLeftUnit: Offset left unit for an asset. This is a read-only
4609	// field. Applicable to the following creative types: all RICH_MEDIA.
4610	//
4611	// Possible values:
4612	//   "OFFSET_UNIT_PIXEL"
4613	//   "OFFSET_UNIT_PERCENT"
4614	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4615	PositionLeftUnit string `json:"positionLeftUnit,omitempty"`
4616
4617	// PositionTopUnit: Offset top unit for an asset. This is a read-only
4618	// field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY.
4619	// Applicable to the following creative types: all RICH_MEDIA.
4620	//
4621	// Possible values:
4622	//   "OFFSET_UNIT_PIXEL"
4623	//   "OFFSET_UNIT_PERCENT"
4624	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4625	PositionTopUnit string `json:"positionTopUnit,omitempty"`
4626
4627	// ProgressiveServingUrl: Progressive URL for video asset. This is a
4628	// read-only field. Applicable to the following creative types:
4629	// INSTREAM_VIDEO and all VPAID.
4630	ProgressiveServingUrl string `json:"progressiveServingUrl,omitempty"`
4631
4632	// Pushdown: Whether the asset pushes down other content. Applicable to
4633	// the following creative types: all RICH_MEDIA. Additionally, only
4634	// applicable when the asset offsets are 0, the collapsedSize.width
4635	// matches size.width, and the collapsedSize.height is less than
4636	// size.height.
4637	Pushdown bool `json:"pushdown,omitempty"`
4638
4639	// PushdownDuration: Pushdown duration in seconds for an asset.
4640	// Applicable to the following creative types: all
4641	// RICH_MEDIA.Additionally, only applicable when the asset pushdown
4642	// field is true, the offsets are 0, the collapsedSize.width matches
4643	// size.width, and the collapsedSize.height is less than size.height.
4644	// Acceptable values are 0 to 9.99, inclusive.
4645	PushdownDuration float64 `json:"pushdownDuration,omitempty"`
4646
4647	// Role: Role of the asset in relation to creative. Applicable to all
4648	// but the following creative types: all REDIRECT and TRACKING_TEXT.
4649	// This is a required field. PRIMARY applies to DISPLAY, FLASH_INPAGE,
4650	// HTML5_BANNER, IMAGE, DISPLAY_IMAGE_GALLERY, all RICH_MEDIA (which may
4651	// contain multiple primary assets), and all VPAID creatives.
4652	// BACKUP_IMAGE applies to FLASH_INPAGE, HTML5_BANNER, all RICH_MEDIA,
4653	// and all VPAID creatives. Applicable to DISPLAY when the primary asset
4654	// type is not HTML_IMAGE. ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply
4655	// to FLASH_INPAGE creatives. OTHER refers to assets from sources other
4656	// than Campaign Manager, such as Studio uploaded assets, applicable to
4657	// all RICH_MEDIA and all VPAID creatives. PARENT_VIDEO refers to videos
4658	// uploaded by the user in Campaign Manager and is applicable to
4659	// INSTREAM_VIDEO and VPAID_LINEAR_VIDEO creatives. TRANSCODED_VIDEO
4660	// refers to videos transcoded by Campaign Manager from PARENT_VIDEO
4661	// assets and is applicable to INSTREAM_VIDEO and VPAID_LINEAR_VIDEO
4662	// creatives. ALTERNATE_VIDEO refers to the Campaign Manager
4663	// representation of child asset videos from Studio, and is applicable
4664	// to VPAID_LINEAR_VIDEO creatives. These cannot be added or removed
4665	// within Campaign Manager. For VPAID_LINEAR_VIDEO creatives,
4666	// PARENT_VIDEO, TRANSCODED_VIDEO and ALTERNATE_VIDEO assets that are
4667	// marked active serve as backup in case the VPAID creative cannot be
4668	// served. Only PARENT_VIDEO assets can be added or removed for an
4669	// INSTREAM_VIDEO or VPAID_LINEAR_VIDEO creative. PARENT_AUDIO refers to
4670	// audios uploaded by the user in Campaign Manager and is applicable to
4671	// INSTREAM_AUDIO creatives. TRANSCODED_AUDIO refers to audios
4672	// transcoded by Campaign Manager from PARENT_AUDIO assets and is
4673	// applicable to INSTREAM_AUDIO creatives.
4674	//
4675	// Possible values:
4676	//   "PRIMARY"
4677	//   "BACKUP_IMAGE"
4678	//   "ADDITIONAL_IMAGE"
4679	//   "ADDITIONAL_FLASH"
4680	//   "PARENT_VIDEO"
4681	//   "TRANSCODED_VIDEO"
4682	//   "OTHER"
4683	//   "ALTERNATE_VIDEO"
4684	//   "PARENT_AUDIO"
4685	//   "TRANSCODED_AUDIO"
4686	Role string `json:"role,omitempty"`
4687
4688	// Size: Size associated with this creative asset. This is a required
4689	// field when applicable; however for IMAGE and FLASH_INPAGE, creatives
4690	// if left blank, this field will be automatically set using the actual
4691	// size of the associated image asset. Applicable to the following
4692	// creative types: DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER,
4693	// IMAGE, and all RICH_MEDIA. Applicable to DISPLAY when the primary
4694	// asset type is not HTML_IMAGE.
4695	Size *Size `json:"size,omitempty"`
4696
4697	// SslCompliant: Whether the asset is SSL-compliant. This is a read-only
4698	// field. Applicable to all but the following creative types: all
4699	// REDIRECT and TRACKING_TEXT.
4700	SslCompliant bool `json:"sslCompliant,omitempty"`
4701
4702	// StartTimeType: Initial wait time type before making the asset
4703	// visible. Applicable to the following creative types: all RICH_MEDIA.
4704	//
4705	// Possible values:
4706	//   "ASSET_START_TIME_TYPE_NONE"
4707	//   "ASSET_START_TIME_TYPE_CUSTOM"
4708	StartTimeType string `json:"startTimeType,omitempty"`
4709
4710	// StreamingServingUrl: Streaming URL for video asset. This is a
4711	// read-only field. Applicable to the following creative types:
4712	// INSTREAM_VIDEO and all VPAID.
4713	StreamingServingUrl string `json:"streamingServingUrl,omitempty"`
4714
4715	// Transparency: Whether the asset is transparent. Applicable to the
4716	// following creative types: all RICH_MEDIA. Additionally, only
4717	// applicable to HTML5 assets.
4718	Transparency bool `json:"transparency,omitempty"`
4719
4720	// VerticallyLocked: Whether the asset is vertically locked. This is a
4721	// read-only field. Applicable to the following creative types: all
4722	// RICH_MEDIA.
4723	VerticallyLocked bool `json:"verticallyLocked,omitempty"`
4724
4725	// WindowMode: Window mode options for flash assets. Applicable to the
4726	// following creative types: FLASH_INPAGE, RICH_MEDIA_DISPLAY_EXPANDING,
4727	// RICH_MEDIA_IM_EXPAND, RICH_MEDIA_DISPLAY_BANNER, and
4728	// RICH_MEDIA_INPAGE_FLOATING.
4729	//
4730	// Possible values:
4731	//   "OPAQUE"
4732	//   "WINDOW"
4733	//   "TRANSPARENT"
4734	WindowMode string `json:"windowMode,omitempty"`
4735
4736	// ZIndex: zIndex value of an asset. Applicable to the following
4737	// creative types: all RICH_MEDIA.Additionally, only applicable to
4738	// assets whose displayType is NOT one of the following types:
4739	// ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable
4740	// values are -999999999 to 999999999, inclusive.
4741	ZIndex int64 `json:"zIndex,omitempty"`
4742
4743	// ZipFilename: File name of zip file. This is a read-only field.
4744	// Applicable to the following creative types: HTML5_BANNER.
4745	ZipFilename string `json:"zipFilename,omitempty"`
4746
4747	// ZipFilesize: Size of zip file. This is a read-only field. Applicable
4748	// to the following creative types: HTML5_BANNER.
4749	ZipFilesize string `json:"zipFilesize,omitempty"`
4750
4751	// ForceSendFields is a list of field names (e.g. "ActionScript3") to
4752	// unconditionally include in API requests. By default, fields with
4753	// empty values are omitted from API requests. However, any non-pointer,
4754	// non-interface field appearing in ForceSendFields will be sent to the
4755	// server regardless of whether the field is empty or not. This may be
4756	// used to include empty fields in Patch requests.
4757	ForceSendFields []string `json:"-"`
4758
4759	// NullFields is a list of field names (e.g. "ActionScript3") to include
4760	// in API requests with the JSON null value. By default, fields with
4761	// empty values are omitted from API requests. However, any field with
4762	// an empty value appearing in NullFields will be sent to the server as
4763	// null. It is an error if a field in this list has a non-empty value.
4764	// This may be used to include null fields in Patch requests.
4765	NullFields []string `json:"-"`
4766}
4767
4768func (s *CreativeAsset) MarshalJSON() ([]byte, error) {
4769	type NoMethod CreativeAsset
4770	raw := NoMethod(*s)
4771	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4772}
4773
4774func (s *CreativeAsset) UnmarshalJSON(data []byte) error {
4775	type NoMethod CreativeAsset
4776	var s1 struct {
4777		FrameRate        gensupport.JSONFloat64 `json:"frameRate"`
4778		MediaDuration    gensupport.JSONFloat64 `json:"mediaDuration"`
4779		PushdownDuration gensupport.JSONFloat64 `json:"pushdownDuration"`
4780		*NoMethod
4781	}
4782	s1.NoMethod = (*NoMethod)(s)
4783	if err := json.Unmarshal(data, &s1); err != nil {
4784		return err
4785	}
4786	s.FrameRate = float64(s1.FrameRate)
4787	s.MediaDuration = float64(s1.MediaDuration)
4788	s.PushdownDuration = float64(s1.PushdownDuration)
4789	return nil
4790}
4791
4792// CreativeAssetId: Creative Asset ID.
4793type CreativeAssetId struct {
4794	// Name: Name of the creative asset. This is a required field while
4795	// inserting an asset. After insertion, this assetIdentifier is used to
4796	// identify the uploaded asset. Characters in the name must be
4797	// alphanumeric or one of the following: ".-_ ". Spaces are allowed.
4798	Name string `json:"name,omitempty"`
4799
4800	// Type: Type of asset to upload. This is a required field. FLASH and
4801	// IMAGE are no longer supported for new uploads. All image assets
4802	// should use HTML_IMAGE.
4803	//
4804	// Possible values:
4805	//   "IMAGE"
4806	//   "FLASH"
4807	//   "VIDEO"
4808	//   "HTML"
4809	//   "HTML_IMAGE"
4810	//   "AUDIO"
4811	Type string `json:"type,omitempty"`
4812
4813	// ForceSendFields is a list of field names (e.g. "Name") to
4814	// unconditionally include in API requests. By default, fields with
4815	// empty values are omitted from API requests. However, any non-pointer,
4816	// non-interface field appearing in ForceSendFields will be sent to the
4817	// server regardless of whether the field is empty or not. This may be
4818	// used to include empty fields in Patch requests.
4819	ForceSendFields []string `json:"-"`
4820
4821	// NullFields is a list of field names (e.g. "Name") to include in API
4822	// requests with the JSON null value. By default, fields with empty
4823	// values are omitted from API requests. However, any field with an
4824	// empty value appearing in NullFields will be sent to the server as
4825	// null. It is an error if a field in this list has a non-empty value.
4826	// This may be used to include null fields in Patch requests.
4827	NullFields []string `json:"-"`
4828}
4829
4830func (s *CreativeAssetId) MarshalJSON() ([]byte, error) {
4831	type NoMethod CreativeAssetId
4832	raw := NoMethod(*s)
4833	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4834}
4835
4836// CreativeAssetMetadata: CreativeAssets contains properties of a
4837// creative asset file which will be uploaded or has already been
4838// uploaded. Refer to the creative sample code for how to upload assets
4839// and insert a creative.
4840type CreativeAssetMetadata struct {
4841	// AssetIdentifier: ID of the creative asset. This is a required field.
4842	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4843
4844	// ClickTags: List of detected click tags for assets. This is a
4845	// read-only, auto-generated field. This field is empty for a rich media
4846	// asset.
4847	ClickTags []*ClickTag `json:"clickTags,omitempty"`
4848
4849	// CounterCustomEvents: List of counter events configured for the asset.
4850	// This is a read-only, auto-generated field and only applicable to a
4851	// rich media asset.
4852	CounterCustomEvents []*CreativeCustomEvent `json:"counterCustomEvents,omitempty"`
4853
4854	// DetectedFeatures: List of feature dependencies for the creative asset
4855	// that are detected by Campaign Manager. Feature dependencies are
4856	// features that a browser must be able to support in order to render
4857	// your HTML5 creative correctly. This is a read-only, auto-generated
4858	// field.
4859	//
4860	// Possible values:
4861	//   "CSS_FONT_FACE"
4862	//   "CSS_BACKGROUND_SIZE"
4863	//   "CSS_BORDER_IMAGE"
4864	//   "CSS_BORDER_RADIUS"
4865	//   "CSS_BOX_SHADOW"
4866	//   "CSS_FLEX_BOX"
4867	//   "CSS_HSLA"
4868	//   "CSS_MULTIPLE_BGS"
4869	//   "CSS_OPACITY"
4870	//   "CSS_RGBA"
4871	//   "CSS_TEXT_SHADOW"
4872	//   "CSS_ANIMATIONS"
4873	//   "CSS_COLUMNS"
4874	//   "CSS_GENERATED_CONTENT"
4875	//   "CSS_GRADIENTS"
4876	//   "CSS_REFLECTIONS"
4877	//   "CSS_TRANSFORMS"
4878	//   "CSS_TRANSFORMS3D"
4879	//   "CSS_TRANSITIONS"
4880	//   "APPLICATION_CACHE"
4881	//   "CANVAS"
4882	//   "CANVAS_TEXT"
4883	//   "DRAG_AND_DROP"
4884	//   "HASH_CHANGE"
4885	//   "HISTORY"
4886	//   "AUDIO"
4887	//   "VIDEO"
4888	//   "INDEXED_DB"
4889	//   "INPUT_ATTR_AUTOCOMPLETE"
4890	//   "INPUT_ATTR_AUTOFOCUS"
4891	//   "INPUT_ATTR_LIST"
4892	//   "INPUT_ATTR_PLACEHOLDER"
4893	//   "INPUT_ATTR_MAX"
4894	//   "INPUT_ATTR_MIN"
4895	//   "INPUT_ATTR_MULTIPLE"
4896	//   "INPUT_ATTR_PATTERN"
4897	//   "INPUT_ATTR_REQUIRED"
4898	//   "INPUT_ATTR_STEP"
4899	//   "INPUT_TYPE_SEARCH"
4900	//   "INPUT_TYPE_TEL"
4901	//   "INPUT_TYPE_URL"
4902	//   "INPUT_TYPE_EMAIL"
4903	//   "INPUT_TYPE_DATETIME"
4904	//   "INPUT_TYPE_DATE"
4905	//   "INPUT_TYPE_MONTH"
4906	//   "INPUT_TYPE_WEEK"
4907	//   "INPUT_TYPE_TIME"
4908	//   "INPUT_TYPE_DATETIME_LOCAL"
4909	//   "INPUT_TYPE_NUMBER"
4910	//   "INPUT_TYPE_RANGE"
4911	//   "INPUT_TYPE_COLOR"
4912	//   "LOCAL_STORAGE"
4913	//   "POST_MESSAGE"
4914	//   "SESSION_STORAGE"
4915	//   "WEB_SOCKETS"
4916	//   "WEB_SQL_DATABASE"
4917	//   "WEB_WORKERS"
4918	//   "GEO_LOCATION"
4919	//   "INLINE_SVG"
4920	//   "SMIL"
4921	//   "SVG_HREF"
4922	//   "SVG_CLIP_PATHS"
4923	//   "TOUCH"
4924	//   "WEBGL"
4925	//   "SVG_FILTERS"
4926	//   "SVG_FE_IMAGE"
4927	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4928
4929	// ExitCustomEvents: List of exit events configured for the asset. This
4930	// is a read-only, auto-generated field and only applicable to a rich
4931	// media asset.
4932	ExitCustomEvents []*CreativeCustomEvent `json:"exitCustomEvents,omitempty"`
4933
4934	// Id: Numeric ID of the asset. This is a read-only, auto-generated
4935	// field.
4936	Id int64 `json:"id,omitempty,string"`
4937
4938	// IdDimensionValue: Dimension value for the numeric ID of the asset.
4939	// This is a read-only, auto-generated field.
4940	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4941
4942	// Kind: Identifies what kind of resource this is. Value: the fixed
4943	// string "dfareporting#creativeAssetMetadata".
4944	Kind string `json:"kind,omitempty"`
4945
4946	// RichMedia: True if the uploaded asset is a rich media asset. This is
4947	// a read-only, auto-generated field.
4948	RichMedia bool `json:"richMedia,omitempty"`
4949
4950	// TimerCustomEvents: List of timer events configured for the asset.
4951	// This is a read-only, auto-generated field and only applicable to a
4952	// rich media asset.
4953	TimerCustomEvents []*CreativeCustomEvent `json:"timerCustomEvents,omitempty"`
4954
4955	// WarnedValidationRules: Rules validated during code generation that
4956	// generated a warning. This is a read-only, auto-generated field.
4957	// Possible values are: - "ADMOB_REFERENCED" -
4958	// "ASSET_FORMAT_UNSUPPORTED_DCM" - "ASSET_INVALID" -
4959	// "CLICK_TAG_HARD_CODED" - "CLICK_TAG_INVALID" - "CLICK_TAG_IN_GWD" -
4960	// "CLICK_TAG_MISSING" - "CLICK_TAG_MORE_THAN_ONE" -
4961	// "CLICK_TAG_NON_TOP_LEVEL" - "COMPONENT_UNSUPPORTED_DCM" -
4962	// "ENABLER_UNSUPPORTED_METHOD_DCM" - "EXTERNAL_FILE_REFERENCED" -
4963	// "FILE_DETAIL_EMPTY" - "FILE_TYPE_INVALID" - "GWD_PROPERTIES_INVALID"
4964	// - "HTML5_FEATURE_UNSUPPORTED" - "LINKED_FILE_NOT_FOUND" -
4965	// "MAX_FLASH_VERSION_11" - "MRAID_REFERENCED" - "NOT_SSL_COMPLIANT" -
4966	// "ORPHANED_ASSET" - "PRIMARY_HTML_MISSING" - "SVG_INVALID" -
4967	// "ZIP_INVALID"
4968	//
4969	// Possible values:
4970	//   "CLICK_TAG_NON_TOP_LEVEL"
4971	//   "CLICK_TAG_MISSING"
4972	//   "CLICK_TAG_MORE_THAN_ONE"
4973	//   "CLICK_TAG_INVALID"
4974	//   "ORPHANED_ASSET"
4975	//   "PRIMARY_HTML_MISSING"
4976	//   "EXTERNAL_FILE_REFERENCED"
4977	//   "MRAID_REFERENCED"
4978	//   "ADMOB_REFERENCED"
4979	//   "FILE_TYPE_INVALID"
4980	//   "ZIP_INVALID"
4981	//   "LINKED_FILE_NOT_FOUND"
4982	//   "MAX_FLASH_VERSION_11"
4983	//   "NOT_SSL_COMPLIANT"
4984	//   "FILE_DETAIL_EMPTY"
4985	//   "ASSET_INVALID"
4986	//   "GWD_PROPERTIES_INVALID"
4987	//   "ENABLER_UNSUPPORTED_METHOD_DCM"
4988	//   "ASSET_FORMAT_UNSUPPORTED_DCM"
4989	//   "COMPONENT_UNSUPPORTED_DCM"
4990	//   "HTML5_FEATURE_UNSUPPORTED"
4991	//   "CLICK_TAG_IN_GWD"
4992	//   "CLICK_TAG_HARD_CODED"
4993	//   "SVG_INVALID"
4994	WarnedValidationRules []string `json:"warnedValidationRules,omitempty"`
4995
4996	// ServerResponse contains the HTTP response code and headers from the
4997	// server.
4998	googleapi.ServerResponse `json:"-"`
4999
5000	// ForceSendFields is a list of field names (e.g. "AssetIdentifier") to
5001	// unconditionally include in API requests. By default, fields with
5002	// empty values are omitted from API requests. However, any non-pointer,
5003	// non-interface field appearing in ForceSendFields will be sent to the
5004	// server regardless of whether the field is empty or not. This may be
5005	// used to include empty fields in Patch requests.
5006	ForceSendFields []string `json:"-"`
5007
5008	// NullFields is a list of field names (e.g. "AssetIdentifier") to
5009	// include in API requests with the JSON null value. By default, fields
5010	// with empty values are omitted from API requests. However, any field
5011	// with an empty value appearing in NullFields will be sent to the
5012	// server as null. It is an error if a field in this list has a
5013	// non-empty value. This may be used to include null fields in Patch
5014	// requests.
5015	NullFields []string `json:"-"`
5016}
5017
5018func (s *CreativeAssetMetadata) MarshalJSON() ([]byte, error) {
5019	type NoMethod CreativeAssetMetadata
5020	raw := NoMethod(*s)
5021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5022}
5023
5024// CreativeAssetSelection: Encapsulates the list of rules for asset
5025// selection and a default asset in case none of the rules match.
5026// Applicable to INSTREAM_VIDEO creatives.
5027type CreativeAssetSelection struct {
5028	// DefaultAssetId: A creativeAssets[].id. This should refer to one of
5029	// the parent assets in this creative, and will be served if none of the
5030	// rules match. This is a required field.
5031	DefaultAssetId int64 `json:"defaultAssetId,omitempty,string"`
5032
5033	// Rules: Rules determine which asset will be served to a viewer. Rules
5034	// will be evaluated in the order in which they are stored in this list.
5035	// This list must contain at least one rule. Applicable to
5036	// INSTREAM_VIDEO creatives.
5037	Rules []*Rule `json:"rules,omitempty"`
5038
5039	// ForceSendFields is a list of field names (e.g. "DefaultAssetId") to
5040	// unconditionally include in API requests. By default, fields with
5041	// empty values are omitted from API requests. However, any non-pointer,
5042	// non-interface field appearing in ForceSendFields will be sent to the
5043	// server regardless of whether the field is empty or not. This may be
5044	// used to include empty fields in Patch requests.
5045	ForceSendFields []string `json:"-"`
5046
5047	// NullFields is a list of field names (e.g. "DefaultAssetId") to
5048	// include in API requests with the JSON null value. By default, fields
5049	// with empty values are omitted from API requests. However, any field
5050	// with an empty value appearing in NullFields will be sent to the
5051	// server as null. It is an error if a field in this list has a
5052	// non-empty value. This may be used to include null fields in Patch
5053	// requests.
5054	NullFields []string `json:"-"`
5055}
5056
5057func (s *CreativeAssetSelection) MarshalJSON() ([]byte, error) {
5058	type NoMethod CreativeAssetSelection
5059	raw := NoMethod(*s)
5060	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5061}
5062
5063// CreativeAssignment: Creative Assignment.
5064type CreativeAssignment struct {
5065	// Active: Whether this creative assignment is active. When true, the
5066	// creative will be included in the ad's rotation.
5067	Active bool `json:"active,omitempty"`
5068
5069	// ApplyEventTags: Whether applicable event tags should fire when this
5070	// creative assignment is rendered. If this value is unset when the ad
5071	// is inserted or updated, it will default to true for all creative
5072	// types EXCEPT for INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT,
5073	// and INSTREAM_VIDEO.
5074	ApplyEventTags bool `json:"applyEventTags,omitempty"`
5075
5076	// ClickThroughUrl: Click-through URL of the creative assignment.
5077	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
5078
5079	// CompanionCreativeOverrides: Companion creative overrides for this
5080	// creative assignment. Applicable to video ads.
5081	CompanionCreativeOverrides []*CompanionClickThroughOverride `json:"companionCreativeOverrides,omitempty"`
5082
5083	// CreativeGroupAssignments: Creative group assignments for this
5084	// creative assignment. Only one assignment per creative group number is
5085	// allowed for a maximum of two assignments.
5086	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
5087
5088	// CreativeId: ID of the creative to be assigned. This is a required
5089	// field.
5090	CreativeId int64 `json:"creativeId,omitempty,string"`
5091
5092	// CreativeIdDimensionValue: Dimension value for the ID of the creative.
5093	// This is a read-only, auto-generated field.
5094	CreativeIdDimensionValue *DimensionValue `json:"creativeIdDimensionValue,omitempty"`
5095
5096	EndTime string `json:"endTime,omitempty"`
5097
5098	// RichMediaExitOverrides: Rich media exit overrides for this creative
5099	// assignment. Applicable when the creative type is any of the
5100	// following: - DISPLAY - RICH_MEDIA_INPAGE - RICH_MEDIA_INPAGE_FLOATING
5101	// - RICH_MEDIA_IM_EXPAND - RICH_MEDIA_EXPANDING -
5102	// RICH_MEDIA_INTERSTITIAL_FLOAT - RICH_MEDIA_MOBILE_IN_APP -
5103	// RICH_MEDIA_MULTI_FLOATING - RICH_MEDIA_PEEL_DOWN - VPAID_LINEAR -
5104	// VPAID_NON_LINEAR
5105	RichMediaExitOverrides []*RichMediaExitOverride `json:"richMediaExitOverrides,omitempty"`
5106
5107	// Sequence: Sequence number of the creative assignment, applicable when
5108	// the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable
5109	// values are 1 to 65535, inclusive.
5110	Sequence int64 `json:"sequence,omitempty"`
5111
5112	// SslCompliant: Whether the creative to be assigned is SSL-compliant.
5113	// This is a read-only field that is auto-generated when the ad is
5114	// inserted or updated.
5115	SslCompliant bool `json:"sslCompliant,omitempty"`
5116
5117	StartTime string `json:"startTime,omitempty"`
5118
5119	// Weight: Weight of the creative assignment, applicable when the
5120	// rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater
5121	// than or equal to 1.
5122	Weight int64 `json:"weight,omitempty"`
5123
5124	// ForceSendFields is a list of field names (e.g. "Active") to
5125	// unconditionally include in API requests. By default, fields with
5126	// empty values are omitted from API requests. However, any non-pointer,
5127	// non-interface field appearing in ForceSendFields will be sent to the
5128	// server regardless of whether the field is empty or not. This may be
5129	// used to include empty fields in Patch requests.
5130	ForceSendFields []string `json:"-"`
5131
5132	// NullFields is a list of field names (e.g. "Active") to include in API
5133	// requests with the JSON null value. By default, fields with empty
5134	// values are omitted from API requests. However, any field with an
5135	// empty value appearing in NullFields will be sent to the server as
5136	// null. It is an error if a field in this list has a non-empty value.
5137	// This may be used to include null fields in Patch requests.
5138	NullFields []string `json:"-"`
5139}
5140
5141func (s *CreativeAssignment) MarshalJSON() ([]byte, error) {
5142	type NoMethod CreativeAssignment
5143	raw := NoMethod(*s)
5144	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5145}
5146
5147// CreativeClickThroughUrl: Click-through URL
5148type CreativeClickThroughUrl struct {
5149	// ComputedClickThroughUrl: Read-only convenience field representing the
5150	// actual URL that will be used for this click-through. The URL is
5151	// computed as follows: - If landingPageId is specified then that
5152	// landing page's URL is assigned to this field. - Otherwise, the
5153	// customClickThroughUrl is assigned to this field.
5154	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
5155
5156	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
5157	// landingPageId field is left unset.
5158	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
5159
5160	// LandingPageId: ID of the landing page for the click-through URL.
5161	LandingPageId int64 `json:"landingPageId,omitempty,string"`
5162
5163	// ForceSendFields is a list of field names (e.g.
5164	// "ComputedClickThroughUrl") to unconditionally include in API
5165	// requests. By default, fields with empty values are omitted from API
5166	// requests. However, any non-pointer, non-interface field appearing in
5167	// ForceSendFields will be sent to the server regardless of whether the
5168	// field is empty or not. This may be used to include empty fields in
5169	// Patch requests.
5170	ForceSendFields []string `json:"-"`
5171
5172	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
5173	// to include in API requests with the JSON null value. By default,
5174	// fields with empty values are omitted from API requests. However, any
5175	// field with an empty value appearing in NullFields will be sent to the
5176	// server as null. It is an error if a field in this list has a
5177	// non-empty value. This may be used to include null fields in Patch
5178	// requests.
5179	NullFields []string `json:"-"`
5180}
5181
5182func (s *CreativeClickThroughUrl) MarshalJSON() ([]byte, error) {
5183	type NoMethod CreativeClickThroughUrl
5184	raw := NoMethod(*s)
5185	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5186}
5187
5188// CreativeCustomEvent: Creative Custom Event.
5189type CreativeCustomEvent struct {
5190	// AdvertiserCustomEventId: Unique ID of this event used by Reporting
5191	// and Data Transfer. This is a read-only field.
5192	AdvertiserCustomEventId int64 `json:"advertiserCustomEventId,omitempty,string"`
5193
5194	// AdvertiserCustomEventName: User-entered name for the event.
5195	AdvertiserCustomEventName string `json:"advertiserCustomEventName,omitempty"`
5196
5197	// AdvertiserCustomEventType: Type of the event. This is a read-only
5198	// field.
5199	//
5200	// Possible values:
5201	//   "ADVERTISER_EVENT_TIMER"
5202	//   "ADVERTISER_EVENT_EXIT"
5203	//   "ADVERTISER_EVENT_COUNTER"
5204	AdvertiserCustomEventType string `json:"advertiserCustomEventType,omitempty"`
5205
5206	// ArtworkLabel: Artwork label column, used to link events in Campaign
5207	// Manager back to events in Studio. This is a required field and should
5208	// not be modified after insertion.
5209	ArtworkLabel string `json:"artworkLabel,omitempty"`
5210
5211	// ArtworkType: Artwork type used by the creative.This is a read-only
5212	// field.
5213	//
5214	// Possible values:
5215	//   "ARTWORK_TYPE_FLASH"
5216	//   "ARTWORK_TYPE_HTML5"
5217	//   "ARTWORK_TYPE_MIXED"
5218	//   "ARTWORK_TYPE_IMAGE"
5219	ArtworkType string `json:"artworkType,omitempty"`
5220
5221	// ExitClickThroughUrl: Exit click-through URL for the event. This field
5222	// is used only for exit events.
5223	ExitClickThroughUrl *CreativeClickThroughUrl `json:"exitClickThroughUrl,omitempty"`
5224
5225	// Id: ID of this event. This is a required field and should not be
5226	// modified after insertion.
5227	Id int64 `json:"id,omitempty,string"`
5228
5229	// PopupWindowProperties: Properties for rich media popup windows. This
5230	// field is used only for exit events.
5231	PopupWindowProperties *PopupWindowProperties `json:"popupWindowProperties,omitempty"`
5232
5233	// TargetType: Target type used by the event.
5234	//
5235	// Possible values:
5236	//   "TARGET_BLANK"
5237	//   "TARGET_TOP"
5238	//   "TARGET_SELF"
5239	//   "TARGET_PARENT"
5240	//   "TARGET_POPUP"
5241	TargetType string `json:"targetType,omitempty"`
5242
5243	// VideoReportingId: Video reporting ID, used to differentiate multiple
5244	// videos in a single creative. This is a read-only field.
5245	VideoReportingId string `json:"videoReportingId,omitempty"`
5246
5247	// ForceSendFields is a list of field names (e.g.
5248	// "AdvertiserCustomEventId") to unconditionally include in API
5249	// requests. By default, fields with empty values are omitted from API
5250	// requests. However, any non-pointer, non-interface field appearing in
5251	// ForceSendFields will be sent to the server regardless of whether the
5252	// field is empty or not. This may be used to include empty fields in
5253	// Patch requests.
5254	ForceSendFields []string `json:"-"`
5255
5256	// NullFields is a list of field names (e.g. "AdvertiserCustomEventId")
5257	// to include in API requests with the JSON null value. By default,
5258	// fields with empty values are omitted from API requests. However, any
5259	// field with an empty value appearing in NullFields will be sent to the
5260	// server as null. It is an error if a field in this list has a
5261	// non-empty value. This may be used to include null fields in Patch
5262	// requests.
5263	NullFields []string `json:"-"`
5264}
5265
5266func (s *CreativeCustomEvent) MarshalJSON() ([]byte, error) {
5267	type NoMethod CreativeCustomEvent
5268	raw := NoMethod(*s)
5269	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5270}
5271
5272// CreativeField: Contains properties of a creative field.
5273type CreativeField struct {
5274	// AccountId: Account ID of this creative field. This is a read-only
5275	// field that can be left blank.
5276	AccountId int64 `json:"accountId,omitempty,string"`
5277
5278	// AdvertiserId: Advertiser ID of this creative field. This is a
5279	// required field on insertion.
5280	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5281
5282	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5283	// advertiser. This is a read-only, auto-generated field.
5284	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5285
5286	// Id: ID of this creative field. This is a read-only, auto-generated
5287	// field.
5288	Id int64 `json:"id,omitempty,string"`
5289
5290	// Kind: Identifies what kind of resource this is. Value: the fixed
5291	// string "dfareporting#creativeField".
5292	Kind string `json:"kind,omitempty"`
5293
5294	// Name: Name of this creative field. This is a required field and must
5295	// be less than 256 characters long and unique among creative fields of
5296	// the same advertiser.
5297	Name string `json:"name,omitempty"`
5298
5299	// SubaccountId: Subaccount ID of this creative field. This is a
5300	// read-only field that can be left blank.
5301	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5302
5303	// ServerResponse contains the HTTP response code and headers from the
5304	// server.
5305	googleapi.ServerResponse `json:"-"`
5306
5307	// ForceSendFields is a list of field names (e.g. "AccountId") to
5308	// unconditionally include in API requests. By default, fields with
5309	// empty values are omitted from API requests. However, any non-pointer,
5310	// non-interface field appearing in ForceSendFields will be sent to the
5311	// server regardless of whether the field is empty or not. This may be
5312	// used to include empty fields in Patch requests.
5313	ForceSendFields []string `json:"-"`
5314
5315	// NullFields is a list of field names (e.g. "AccountId") to include in
5316	// API requests with the JSON null value. By default, fields with empty
5317	// values are omitted from API requests. However, any field with an
5318	// empty value appearing in NullFields will be sent to the server as
5319	// null. It is an error if a field in this list has a non-empty value.
5320	// This may be used to include null fields in Patch requests.
5321	NullFields []string `json:"-"`
5322}
5323
5324func (s *CreativeField) MarshalJSON() ([]byte, error) {
5325	type NoMethod CreativeField
5326	raw := NoMethod(*s)
5327	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5328}
5329
5330// CreativeFieldAssignment: Creative Field Assignment.
5331type CreativeFieldAssignment struct {
5332	// CreativeFieldId: ID of the creative field.
5333	CreativeFieldId int64 `json:"creativeFieldId,omitempty,string"`
5334
5335	// CreativeFieldValueId: ID of the creative field value.
5336	CreativeFieldValueId int64 `json:"creativeFieldValueId,omitempty,string"`
5337
5338	// ForceSendFields is a list of field names (e.g. "CreativeFieldId") to
5339	// unconditionally include in API requests. By default, fields with
5340	// empty values are omitted from API requests. However, any non-pointer,
5341	// non-interface field appearing in ForceSendFields will be sent to the
5342	// server regardless of whether the field is empty or not. This may be
5343	// used to include empty fields in Patch requests.
5344	ForceSendFields []string `json:"-"`
5345
5346	// NullFields is a list of field names (e.g. "CreativeFieldId") to
5347	// include in API requests with the JSON null value. By default, fields
5348	// with empty values are omitted from API requests. However, any field
5349	// with an empty value appearing in NullFields will be sent to the
5350	// server as null. It is an error if a field in this list has a
5351	// non-empty value. This may be used to include null fields in Patch
5352	// requests.
5353	NullFields []string `json:"-"`
5354}
5355
5356func (s *CreativeFieldAssignment) MarshalJSON() ([]byte, error) {
5357	type NoMethod CreativeFieldAssignment
5358	raw := NoMethod(*s)
5359	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5360}
5361
5362// CreativeFieldValue: Contains properties of a creative field value.
5363type CreativeFieldValue struct {
5364	// Id: ID of this creative field value. This is a read-only,
5365	// auto-generated field.
5366	Id int64 `json:"id,omitempty,string"`
5367
5368	// Kind: Identifies what kind of resource this is. Value: the fixed
5369	// string "dfareporting#creativeFieldValue".
5370	Kind string `json:"kind,omitempty"`
5371
5372	// Value: Value of this creative field value. It needs to be less than
5373	// 256 characters in length and unique per creative field.
5374	Value string `json:"value,omitempty"`
5375
5376	// ServerResponse contains the HTTP response code and headers from the
5377	// server.
5378	googleapi.ServerResponse `json:"-"`
5379
5380	// ForceSendFields is a list of field names (e.g. "Id") to
5381	// unconditionally include in API requests. By default, fields with
5382	// empty values are omitted from API requests. However, any non-pointer,
5383	// non-interface field appearing in ForceSendFields will be sent to the
5384	// server regardless of whether the field is empty or not. This may be
5385	// used to include empty fields in Patch requests.
5386	ForceSendFields []string `json:"-"`
5387
5388	// NullFields is a list of field names (e.g. "Id") to include in API
5389	// requests with the JSON null value. By default, fields with empty
5390	// values are omitted from API requests. However, any field with an
5391	// empty value appearing in NullFields will be sent to the server as
5392	// null. It is an error if a field in this list has a non-empty value.
5393	// This may be used to include null fields in Patch requests.
5394	NullFields []string `json:"-"`
5395}
5396
5397func (s *CreativeFieldValue) MarshalJSON() ([]byte, error) {
5398	type NoMethod CreativeFieldValue
5399	raw := NoMethod(*s)
5400	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5401}
5402
5403// CreativeFieldValuesListResponse: Creative Field Value List Response
5404type CreativeFieldValuesListResponse struct {
5405	// CreativeFieldValues: Creative field value collection.
5406	CreativeFieldValues []*CreativeFieldValue `json:"creativeFieldValues,omitempty"`
5407
5408	// Kind: Identifies what kind of resource this is. Value: the fixed
5409	// string "dfareporting#creativeFieldValuesListResponse".
5410	Kind string `json:"kind,omitempty"`
5411
5412	// NextPageToken: Pagination token to be used for the next list
5413	// operation.
5414	NextPageToken string `json:"nextPageToken,omitempty"`
5415
5416	// ServerResponse contains the HTTP response code and headers from the
5417	// server.
5418	googleapi.ServerResponse `json:"-"`
5419
5420	// ForceSendFields is a list of field names (e.g. "CreativeFieldValues")
5421	// to unconditionally include in API requests. By default, fields with
5422	// empty values are omitted from API requests. However, any non-pointer,
5423	// non-interface field appearing in ForceSendFields will be sent to the
5424	// server regardless of whether the field is empty or not. This may be
5425	// used to include empty fields in Patch requests.
5426	ForceSendFields []string `json:"-"`
5427
5428	// NullFields is a list of field names (e.g. "CreativeFieldValues") to
5429	// include in API requests with the JSON null value. By default, fields
5430	// with empty values are omitted from API requests. However, any field
5431	// with an empty value appearing in NullFields will be sent to the
5432	// server as null. It is an error if a field in this list has a
5433	// non-empty value. This may be used to include null fields in Patch
5434	// requests.
5435	NullFields []string `json:"-"`
5436}
5437
5438func (s *CreativeFieldValuesListResponse) MarshalJSON() ([]byte, error) {
5439	type NoMethod CreativeFieldValuesListResponse
5440	raw := NoMethod(*s)
5441	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5442}
5443
5444// CreativeFieldsListResponse: Creative Field List Response
5445type CreativeFieldsListResponse struct {
5446	// CreativeFields: Creative field collection.
5447	CreativeFields []*CreativeField `json:"creativeFields,omitempty"`
5448
5449	// Kind: Identifies what kind of resource this is. Value: the fixed
5450	// string "dfareporting#creativeFieldsListResponse".
5451	Kind string `json:"kind,omitempty"`
5452
5453	// NextPageToken: Pagination token to be used for the next list
5454	// operation.
5455	NextPageToken string `json:"nextPageToken,omitempty"`
5456
5457	// ServerResponse contains the HTTP response code and headers from the
5458	// server.
5459	googleapi.ServerResponse `json:"-"`
5460
5461	// ForceSendFields is a list of field names (e.g. "CreativeFields") to
5462	// unconditionally include in API requests. By default, fields with
5463	// empty values are omitted from API requests. However, any non-pointer,
5464	// non-interface field appearing in ForceSendFields will be sent to the
5465	// server regardless of whether the field is empty or not. This may be
5466	// used to include empty fields in Patch requests.
5467	ForceSendFields []string `json:"-"`
5468
5469	// NullFields is a list of field names (e.g. "CreativeFields") to
5470	// include in API requests with the JSON null value. By default, fields
5471	// with empty values are omitted from API requests. However, any field
5472	// with an empty value appearing in NullFields will be sent to the
5473	// server as null. It is an error if a field in this list has a
5474	// non-empty value. This may be used to include null fields in Patch
5475	// requests.
5476	NullFields []string `json:"-"`
5477}
5478
5479func (s *CreativeFieldsListResponse) MarshalJSON() ([]byte, error) {
5480	type NoMethod CreativeFieldsListResponse
5481	raw := NoMethod(*s)
5482	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5483}
5484
5485// CreativeGroup: Contains properties of a creative group.
5486type CreativeGroup struct {
5487	// AccountId: Account ID of this creative group. This is a read-only
5488	// field that can be left blank.
5489	AccountId int64 `json:"accountId,omitempty,string"`
5490
5491	// AdvertiserId: Advertiser ID of this creative group. This is a
5492	// required field on insertion.
5493	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5494
5495	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5496	// advertiser. This is a read-only, auto-generated field.
5497	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5498
5499	// GroupNumber: Subgroup of the creative group. Assign your creative
5500	// groups to a subgroup in order to filter or manage them more easily.
5501	// This field is required on insertion and is read-only after insertion.
5502	// Acceptable values are 1 to 2, inclusive.
5503	GroupNumber int64 `json:"groupNumber,omitempty"`
5504
5505	// Id: ID of this creative group. This is a read-only, auto-generated
5506	// field.
5507	Id int64 `json:"id,omitempty,string"`
5508
5509	// Kind: Identifies what kind of resource this is. Value: the fixed
5510	// string "dfareporting#creativeGroup".
5511	Kind string `json:"kind,omitempty"`
5512
5513	// Name: Name of this creative group. This is a required field and must
5514	// be less than 256 characters long and unique among creative groups of
5515	// the same advertiser.
5516	Name string `json:"name,omitempty"`
5517
5518	// SubaccountId: Subaccount ID of this creative group. This is a
5519	// read-only field that can be left blank.
5520	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5521
5522	// ServerResponse contains the HTTP response code and headers from the
5523	// server.
5524	googleapi.ServerResponse `json:"-"`
5525
5526	// ForceSendFields is a list of field names (e.g. "AccountId") to
5527	// unconditionally include in API requests. By default, fields with
5528	// empty values are omitted from API requests. However, any non-pointer,
5529	// non-interface field appearing in ForceSendFields will be sent to the
5530	// server regardless of whether the field is empty or not. This may be
5531	// used to include empty fields in Patch requests.
5532	ForceSendFields []string `json:"-"`
5533
5534	// NullFields is a list of field names (e.g. "AccountId") to include in
5535	// API requests with the JSON null value. By default, fields with empty
5536	// values are omitted from API requests. However, any field with an
5537	// empty value appearing in NullFields will be sent to the server as
5538	// null. It is an error if a field in this list has a non-empty value.
5539	// This may be used to include null fields in Patch requests.
5540	NullFields []string `json:"-"`
5541}
5542
5543func (s *CreativeGroup) MarshalJSON() ([]byte, error) {
5544	type NoMethod CreativeGroup
5545	raw := NoMethod(*s)
5546	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5547}
5548
5549// CreativeGroupAssignment: Creative Group Assignment.
5550type CreativeGroupAssignment struct {
5551	// CreativeGroupId: ID of the creative group to be assigned.
5552	CreativeGroupId int64 `json:"creativeGroupId,omitempty,string"`
5553
5554	// CreativeGroupNumber: Creative group number of the creative group
5555	// assignment.
5556	//
5557	// Possible values:
5558	//   "CREATIVE_GROUP_ONE"
5559	//   "CREATIVE_GROUP_TWO"
5560	CreativeGroupNumber string `json:"creativeGroupNumber,omitempty"`
5561
5562	// ForceSendFields is a list of field names (e.g. "CreativeGroupId") to
5563	// unconditionally include in API requests. By default, fields with
5564	// empty values are omitted from API requests. However, any non-pointer,
5565	// non-interface field appearing in ForceSendFields will be sent to the
5566	// server regardless of whether the field is empty or not. This may be
5567	// used to include empty fields in Patch requests.
5568	ForceSendFields []string `json:"-"`
5569
5570	// NullFields is a list of field names (e.g. "CreativeGroupId") to
5571	// include in API requests with the JSON null value. By default, fields
5572	// with empty values are omitted from API requests. However, any field
5573	// with an empty value appearing in NullFields will be sent to the
5574	// server as null. It is an error if a field in this list has a
5575	// non-empty value. This may be used to include null fields in Patch
5576	// requests.
5577	NullFields []string `json:"-"`
5578}
5579
5580func (s *CreativeGroupAssignment) MarshalJSON() ([]byte, error) {
5581	type NoMethod CreativeGroupAssignment
5582	raw := NoMethod(*s)
5583	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5584}
5585
5586// CreativeGroupsListResponse: Creative Group List Response
5587type CreativeGroupsListResponse struct {
5588	// CreativeGroups: Creative group collection.
5589	CreativeGroups []*CreativeGroup `json:"creativeGroups,omitempty"`
5590
5591	// Kind: Identifies what kind of resource this is. Value: the fixed
5592	// string "dfareporting#creativeGroupsListResponse".
5593	Kind string `json:"kind,omitempty"`
5594
5595	// NextPageToken: Pagination token to be used for the next list
5596	// operation.
5597	NextPageToken string `json:"nextPageToken,omitempty"`
5598
5599	// ServerResponse contains the HTTP response code and headers from the
5600	// server.
5601	googleapi.ServerResponse `json:"-"`
5602
5603	// ForceSendFields is a list of field names (e.g. "CreativeGroups") to
5604	// unconditionally include in API requests. By default, fields with
5605	// empty values are omitted from API requests. However, any non-pointer,
5606	// non-interface field appearing in ForceSendFields will be sent to the
5607	// server regardless of whether the field is empty or not. This may be
5608	// used to include empty fields in Patch requests.
5609	ForceSendFields []string `json:"-"`
5610
5611	// NullFields is a list of field names (e.g. "CreativeGroups") to
5612	// include in API requests with the JSON null value. By default, fields
5613	// with empty values are omitted from API requests. However, any field
5614	// with an empty value appearing in NullFields will be sent to the
5615	// server as null. It is an error if a field in this list has a
5616	// non-empty value. This may be used to include null fields in Patch
5617	// requests.
5618	NullFields []string `json:"-"`
5619}
5620
5621func (s *CreativeGroupsListResponse) MarshalJSON() ([]byte, error) {
5622	type NoMethod CreativeGroupsListResponse
5623	raw := NoMethod(*s)
5624	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5625}
5626
5627// CreativeOptimizationConfiguration: Creative optimization settings.
5628type CreativeOptimizationConfiguration struct {
5629	// Id: ID of this creative optimization config. This field is
5630	// auto-generated when the campaign is inserted or updated. It can be
5631	// null for existing campaigns.
5632	Id int64 `json:"id,omitempty,string"`
5633
5634	// Name: Name of this creative optimization config. This is a required
5635	// field and must be less than 129 characters long.
5636	Name string `json:"name,omitempty"`
5637
5638	// OptimizationActivitys: List of optimization activities associated
5639	// with this configuration.
5640	OptimizationActivitys []*OptimizationActivity `json:"optimizationActivitys,omitempty"`
5641
5642	// OptimizationModel: Optimization model for this configuration.
5643	//
5644	// Possible values:
5645	//   "CLICK"
5646	//   "POST_CLICK"
5647	//   "POST_IMPRESSION"
5648	//   "POST_CLICK_AND_IMPRESSION"
5649	//   "VIDEO_COMPLETION"
5650	OptimizationModel string `json:"optimizationModel,omitempty"`
5651
5652	// ForceSendFields is a list of field names (e.g. "Id") to
5653	// unconditionally include in API requests. By default, fields with
5654	// empty values are omitted from API requests. However, any non-pointer,
5655	// non-interface field appearing in ForceSendFields will be sent to the
5656	// server regardless of whether the field is empty or not. This may be
5657	// used to include empty fields in Patch requests.
5658	ForceSendFields []string `json:"-"`
5659
5660	// NullFields is a list of field names (e.g. "Id") to include in API
5661	// requests with the JSON null value. By default, fields with empty
5662	// values are omitted from API requests. However, any field with an
5663	// empty value appearing in NullFields will be sent to the server as
5664	// null. It is an error if a field in this list has a non-empty value.
5665	// This may be used to include null fields in Patch requests.
5666	NullFields []string `json:"-"`
5667}
5668
5669func (s *CreativeOptimizationConfiguration) MarshalJSON() ([]byte, error) {
5670	type NoMethod CreativeOptimizationConfiguration
5671	raw := NoMethod(*s)
5672	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5673}
5674
5675// CreativeRotation: Creative Rotation.
5676type CreativeRotation struct {
5677	// CreativeAssignments: Creative assignments in this creative rotation.
5678	CreativeAssignments []*CreativeAssignment `json:"creativeAssignments,omitempty"`
5679
5680	// CreativeOptimizationConfigurationId: Creative optimization
5681	// configuration that is used by this ad. It should refer to one of the
5682	// existing optimization configurations in the ad's campaign. If it is
5683	// unset or set to 0, then the campaign's default optimization
5684	// configuration will be used for this ad.
5685	CreativeOptimizationConfigurationId int64 `json:"creativeOptimizationConfigurationId,omitempty,string"`
5686
5687	// Type: Type of creative rotation. Can be used to specify whether to
5688	// use sequential or random rotation.
5689	//
5690	// Possible values:
5691	//   "CREATIVE_ROTATION_TYPE_SEQUENTIAL"
5692	//   "CREATIVE_ROTATION_TYPE_RANDOM"
5693	Type string `json:"type,omitempty"`
5694
5695	// WeightCalculationStrategy: Strategy for calculating weights. Used
5696	// with CREATIVE_ROTATION_TYPE_RANDOM.
5697	//
5698	// Possible values:
5699	//   "WEIGHT_STRATEGY_EQUAL"
5700	//   "WEIGHT_STRATEGY_CUSTOM"
5701	//   "WEIGHT_STRATEGY_HIGHEST_CTR"
5702	//   "WEIGHT_STRATEGY_OPTIMIZED"
5703	WeightCalculationStrategy string `json:"weightCalculationStrategy,omitempty"`
5704
5705	// ForceSendFields is a list of field names (e.g. "CreativeAssignments")
5706	// to unconditionally include in API requests. By default, fields with
5707	// empty values are omitted from API requests. However, any non-pointer,
5708	// non-interface field appearing in ForceSendFields will be sent to the
5709	// server regardless of whether the field is empty or not. This may be
5710	// used to include empty fields in Patch requests.
5711	ForceSendFields []string `json:"-"`
5712
5713	// NullFields is a list of field names (e.g. "CreativeAssignments") to
5714	// include in API requests with the JSON null value. By default, fields
5715	// with empty values are omitted from API requests. However, any field
5716	// with an empty value appearing in NullFields will be sent to the
5717	// server as null. It is an error if a field in this list has a
5718	// non-empty value. This may be used to include null fields in Patch
5719	// requests.
5720	NullFields []string `json:"-"`
5721}
5722
5723func (s *CreativeRotation) MarshalJSON() ([]byte, error) {
5724	type NoMethod CreativeRotation
5725	raw := NoMethod(*s)
5726	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5727}
5728
5729// CreativesListResponse: Creative List Response
5730type CreativesListResponse struct {
5731	// Creatives: Creative collection.
5732	Creatives []*Creative `json:"creatives,omitempty"`
5733
5734	// Kind: Identifies what kind of resource this is. Value: the fixed
5735	// string "dfareporting#creativesListResponse".
5736	Kind string `json:"kind,omitempty"`
5737
5738	// NextPageToken: Pagination token to be used for the next list
5739	// operation.
5740	NextPageToken string `json:"nextPageToken,omitempty"`
5741
5742	// ServerResponse contains the HTTP response code and headers from the
5743	// server.
5744	googleapi.ServerResponse `json:"-"`
5745
5746	// ForceSendFields is a list of field names (e.g. "Creatives") to
5747	// unconditionally include in API requests. By default, fields with
5748	// empty values are omitted from API requests. However, any non-pointer,
5749	// non-interface field appearing in ForceSendFields will be sent to the
5750	// server regardless of whether the field is empty or not. This may be
5751	// used to include empty fields in Patch requests.
5752	ForceSendFields []string `json:"-"`
5753
5754	// NullFields is a list of field names (e.g. "Creatives") to include in
5755	// API requests with the JSON null value. By default, fields with empty
5756	// values are omitted from API requests. However, any field with an
5757	// empty value appearing in NullFields will be sent to the server as
5758	// null. It is an error if a field in this list has a non-empty value.
5759	// This may be used to include null fields in Patch requests.
5760	NullFields []string `json:"-"`
5761}
5762
5763func (s *CreativesListResponse) MarshalJSON() ([]byte, error) {
5764	type NoMethod CreativesListResponse
5765	raw := NoMethod(*s)
5766	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5767}
5768
5769// CrossDimensionReachReportCompatibleFields: Represents fields that are
5770// compatible to be selected for a report of type
5771// "CROSS_DIMENSION_REACH".
5772type CrossDimensionReachReportCompatibleFields struct {
5773	// Breakdown: Dimensions which are compatible to be selected in the
5774	// "breakdown" section of the report.
5775	Breakdown []*Dimension `json:"breakdown,omitempty"`
5776
5777	// DimensionFilters: Dimensions which are compatible to be selected in
5778	// the "dimensionFilters" section of the report.
5779	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
5780
5781	// Kind: The kind of resource this is, in this case
5782	// dfareporting#crossDimensionReachReportCompatibleFields.
5783	Kind string `json:"kind,omitempty"`
5784
5785	// Metrics: Metrics which are compatible to be selected in the
5786	// "metricNames" section of the report.
5787	Metrics []*Metric `json:"metrics,omitempty"`
5788
5789	// OverlapMetrics: Metrics which are compatible to be selected in the
5790	// "overlapMetricNames" section of the report.
5791	OverlapMetrics []*Metric `json:"overlapMetrics,omitempty"`
5792
5793	// ForceSendFields is a list of field names (e.g. "Breakdown") to
5794	// unconditionally include in API requests. By default, fields with
5795	// empty values are omitted from API requests. However, any non-pointer,
5796	// non-interface field appearing in ForceSendFields will be sent to the
5797	// server regardless of whether the field is empty or not. This may be
5798	// used to include empty fields in Patch requests.
5799	ForceSendFields []string `json:"-"`
5800
5801	// NullFields is a list of field names (e.g. "Breakdown") to include in
5802	// API requests with the JSON null value. By default, fields with empty
5803	// values are omitted from API requests. However, any field with an
5804	// empty value appearing in NullFields will be sent to the server as
5805	// null. It is an error if a field in this list has a non-empty value.
5806	// This may be used to include null fields in Patch requests.
5807	NullFields []string `json:"-"`
5808}
5809
5810func (s *CrossDimensionReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
5811	type NoMethod CrossDimensionReachReportCompatibleFields
5812	raw := NoMethod(*s)
5813	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5814}
5815
5816// CustomEvent: Experimental feature (no support provided) A custom
5817// event represents a third party impression, a third party click, an
5818// annotation on a first party impression, or an annotation on a first
5819// party click.
5820type CustomEvent struct {
5821	// AnnotateClickEvent: Annotate a click event. This field is mutually
5822	// exclusive with insertEvent and annotateImpressionEvent. This or
5823	// insertEvent and annotateImpressionEvent is a required field.
5824	AnnotateClickEvent *CustomEventClickAnnotation `json:"annotateClickEvent,omitempty"`
5825
5826	// AnnotateImpressionEvent: Annotate an impression. This field is
5827	// mutually exclusive with insertEvent and annotateClickEvent. This or
5828	// insertEvent and annotateClickEvent is a required field.
5829	AnnotateImpressionEvent *CustomEventImpressionAnnotation `json:"annotateImpressionEvent,omitempty"`
5830
5831	// CustomVariables: Custom variables associated with the event.
5832	CustomVariables []*CustomVariable `json:"customVariables,omitempty"`
5833
5834	// EventType: The type of event. If INSERT, the fields in insertEvent
5835	// need to be populated. If ANNOTATE, the fields in either
5836	// annotateClickEvent or annotateImpressionEvent need to be populated.
5837	//
5838	// Possible values:
5839	//   "UNKNOWN"
5840	//   "INSERT"
5841	//   "ANNOTATE"
5842	EventType string `json:"eventType,omitempty"`
5843
5844	// FloodlightConfigurationId: Floodlight configuration ID of the
5845	// advertiser the event is linked to. This is a required field.
5846	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
5847
5848	// InsertEvent: Insert custom event. This field is mutually exclusive
5849	// with annotateClickEvent and annotateImpressionEvent. This or
5850	// annotateClickEvent and annotateImpressionEvent is a required field.
5851	InsertEvent *CustomEventInsert `json:"insertEvent,omitempty"`
5852
5853	// Kind: Identifies what kind of resource this is. Value: the fixed
5854	// string "dfareporting#customEvent".
5855	Kind string `json:"kind,omitempty"`
5856
5857	// Ordinal: The ordinal of this custom event. This is a required field.
5858	Ordinal string `json:"ordinal,omitempty"`
5859
5860	// TimestampMicros: The timestamp of this custom event, in Unix epoch
5861	// micros. This is a required field.
5862	TimestampMicros int64 `json:"timestampMicros,omitempty,string"`
5863
5864	// ForceSendFields is a list of field names (e.g. "AnnotateClickEvent")
5865	// to unconditionally include in API requests. By default, fields with
5866	// empty values are omitted from API requests. However, any non-pointer,
5867	// non-interface field appearing in ForceSendFields will be sent to the
5868	// server regardless of whether the field is empty or not. This may be
5869	// used to include empty fields in Patch requests.
5870	ForceSendFields []string `json:"-"`
5871
5872	// NullFields is a list of field names (e.g. "AnnotateClickEvent") to
5873	// include in API requests with the JSON null value. By default, fields
5874	// with empty values are omitted from API requests. However, any field
5875	// with an empty value appearing in NullFields will be sent to the
5876	// server as null. It is an error if a field in this list has a
5877	// non-empty value. This may be used to include null fields in Patch
5878	// requests.
5879	NullFields []string `json:"-"`
5880}
5881
5882func (s *CustomEvent) MarshalJSON() ([]byte, error) {
5883	type NoMethod CustomEvent
5884	raw := NoMethod(*s)
5885	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5886}
5887
5888// CustomEventClickAnnotation: Annotate a click event.
5889type CustomEventClickAnnotation struct {
5890	// Gclid: The Google click ID. Use this field to annotate the click
5891	// associated with the gclid.
5892	Gclid string `json:"gclid,omitempty"`
5893
5894	// Kind: Identifies what kind of resource this is. Value: the fixed
5895	// string "dfareporting#customEventClickAnnotation".
5896	Kind string `json:"kind,omitempty"`
5897
5898	// ForceSendFields is a list of field names (e.g. "Gclid") to
5899	// unconditionally include in API requests. By default, fields with
5900	// empty values are omitted from API requests. However, any non-pointer,
5901	// non-interface field appearing in ForceSendFields will be sent to the
5902	// server regardless of whether the field is empty or not. This may be
5903	// used to include empty fields in Patch requests.
5904	ForceSendFields []string `json:"-"`
5905
5906	// NullFields is a list of field names (e.g. "Gclid") to include in API
5907	// requests with the JSON null value. By default, fields with empty
5908	// values are omitted from API requests. However, any field with an
5909	// empty value appearing in NullFields will be sent to the server as
5910	// null. It is an error if a field in this list has a non-empty value.
5911	// This may be used to include null fields in Patch requests.
5912	NullFields []string `json:"-"`
5913}
5914
5915func (s *CustomEventClickAnnotation) MarshalJSON() ([]byte, error) {
5916	type NoMethod CustomEventClickAnnotation
5917	raw := NoMethod(*s)
5918	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5919}
5920
5921// CustomEventError: The error code and description for a custom event
5922// that failed to insert.
5923type CustomEventError struct {
5924	// Code: The error code.
5925	//
5926	// Possible values:
5927	//   "UNKNOWN"
5928	//   "INVALID_ARGUMENT"
5929	//   "INTERNAL"
5930	//   "PERMISSION_DENIED"
5931	//   "NOT_FOUND"
5932	Code string `json:"code,omitempty"`
5933
5934	// Kind: Identifies what kind of resource this is. Value: the fixed
5935	// string "dfareporting#customEventError".
5936	Kind string `json:"kind,omitempty"`
5937
5938	// Message: A description of the error.
5939	Message string `json:"message,omitempty"`
5940
5941	// ForceSendFields is a list of field names (e.g. "Code") to
5942	// unconditionally include in API requests. By default, fields with
5943	// empty values are omitted from API requests. However, any non-pointer,
5944	// non-interface field appearing in ForceSendFields will be sent to the
5945	// server regardless of whether the field is empty or not. This may be
5946	// used to include empty fields in Patch requests.
5947	ForceSendFields []string `json:"-"`
5948
5949	// NullFields is a list of field names (e.g. "Code") to include in API
5950	// requests with the JSON null value. By default, fields with empty
5951	// values are omitted from API requests. However, any field with an
5952	// empty value appearing in NullFields will be sent to the server as
5953	// null. It is an error if a field in this list has a non-empty value.
5954	// This may be used to include null fields in Patch requests.
5955	NullFields []string `json:"-"`
5956}
5957
5958func (s *CustomEventError) MarshalJSON() ([]byte, error) {
5959	type NoMethod CustomEventError
5960	raw := NoMethod(*s)
5961	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5962}
5963
5964// CustomEventImpressionAnnotation: Annotate an impression.
5965type CustomEventImpressionAnnotation struct {
5966	// Kind: Identifies what kind of resource this is. Value: the fixed
5967	// string "dfareporting#customEventImpressionAnnotation".
5968	Kind string `json:"kind,omitempty"`
5969
5970	// PathImpressionId: The path impression ID. Use this field to annotate
5971	// the impression associated with the pathImpressionId.
5972	PathImpressionId string `json:"pathImpressionId,omitempty"`
5973
5974	// ForceSendFields is a list of field names (e.g. "Kind") to
5975	// unconditionally include in API requests. By default, fields with
5976	// empty values are omitted from API requests. However, any non-pointer,
5977	// non-interface field appearing in ForceSendFields will be sent to the
5978	// server regardless of whether the field is empty or not. This may be
5979	// used to include empty fields in Patch requests.
5980	ForceSendFields []string `json:"-"`
5981
5982	// NullFields is a list of field names (e.g. "Kind") to include in API
5983	// requests with the JSON null value. By default, fields with empty
5984	// values are omitted from API requests. However, any field with an
5985	// empty value appearing in NullFields will be sent to the server as
5986	// null. It is an error if a field in this list has a non-empty value.
5987	// This may be used to include null fields in Patch requests.
5988	NullFields []string `json:"-"`
5989}
5990
5991func (s *CustomEventImpressionAnnotation) MarshalJSON() ([]byte, error) {
5992	type NoMethod CustomEventImpressionAnnotation
5993	raw := NoMethod(*s)
5994	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5995}
5996
5997// CustomEventInsert: Custom event to be inserted.
5998type CustomEventInsert struct {
5999	// CmDimensions: Campaign Manager dimensions associated with the event.
6000	CmDimensions *CampaignManagerIds `json:"cmDimensions,omitempty"`
6001
6002	// Dv3Dimensions: DV360 dimensions associated with the event.
6003	Dv3Dimensions *DV3Ids `json:"dv3Dimensions,omitempty"`
6004
6005	// InsertEventType: The type of event to insert.
6006	//
6007	// Possible values:
6008	//   "UNKNOWN"
6009	//   "IMPRESSION"
6010	//   "CLICK"
6011	InsertEventType string `json:"insertEventType,omitempty"`
6012
6013	// Kind: Identifies what kind of resource this is. Value: the fixed
6014	// string "dfareporting#customEventInsert".
6015	Kind string `json:"kind,omitempty"`
6016
6017	// MatchId: The match ID field. A match ID is your own first-party
6018	// identifier that has been synced with Google using the match ID
6019	// feature in Floodlight. This field is mutually exclusive with
6020	// mobileDeviceId, and at least one of the two fields is required.
6021	MatchId string `json:"matchId,omitempty"`
6022
6023	// MobileDeviceId: The mobile device ID. This field is mutually
6024	// exclusive with matchId, and at least one of the two fields is
6025	// required.
6026	MobileDeviceId string `json:"mobileDeviceId,omitempty"`
6027
6028	// ForceSendFields is a list of field names (e.g. "CmDimensions") to
6029	// unconditionally include in API requests. By default, fields with
6030	// empty values are omitted from API requests. However, any non-pointer,
6031	// non-interface field appearing in ForceSendFields will be sent to the
6032	// server regardless of whether the field is empty or not. This may be
6033	// used to include empty fields in Patch requests.
6034	ForceSendFields []string `json:"-"`
6035
6036	// NullFields is a list of field names (e.g. "CmDimensions") to include
6037	// in API requests with the JSON null value. By default, fields with
6038	// empty values are omitted from API requests. However, any field with
6039	// an empty value appearing in NullFields will be sent to the server as
6040	// null. It is an error if a field in this list has a non-empty value.
6041	// This may be used to include null fields in Patch requests.
6042	NullFields []string `json:"-"`
6043}
6044
6045func (s *CustomEventInsert) MarshalJSON() ([]byte, error) {
6046	type NoMethod CustomEventInsert
6047	raw := NoMethod(*s)
6048	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6049}
6050
6051// CustomEventStatus: The original custom event that was inserted and
6052// whether there were any errors.
6053type CustomEventStatus struct {
6054	// CustomEvent: The original custom event that was inserted.
6055	CustomEvent *CustomEvent `json:"customEvent,omitempty"`
6056
6057	// Errors: A list of errors related to this custom event.
6058	Errors []*CustomEventError `json:"errors,omitempty"`
6059
6060	// Kind: Identifies what kind of resource this is. Value: the fixed
6061	// string "dfareporting#customEventStatus".
6062	Kind string `json:"kind,omitempty"`
6063
6064	// ForceSendFields is a list of field names (e.g. "CustomEvent") to
6065	// unconditionally include in API requests. By default, fields with
6066	// empty values are omitted from API requests. However, any non-pointer,
6067	// non-interface field appearing in ForceSendFields will be sent to the
6068	// server regardless of whether the field is empty or not. This may be
6069	// used to include empty fields in Patch requests.
6070	ForceSendFields []string `json:"-"`
6071
6072	// NullFields is a list of field names (e.g. "CustomEvent") to include
6073	// in API requests with the JSON null value. By default, fields with
6074	// empty values are omitted from API requests. However, any field with
6075	// an empty value appearing in NullFields will be sent to the server as
6076	// null. It is an error if a field in this list has a non-empty value.
6077	// This may be used to include null fields in Patch requests.
6078	NullFields []string `json:"-"`
6079}
6080
6081func (s *CustomEventStatus) MarshalJSON() ([]byte, error) {
6082	type NoMethod CustomEventStatus
6083	raw := NoMethod(*s)
6084	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6085}
6086
6087// CustomEventsBatchInsertRequest: Insert Custom Events Request.
6088type CustomEventsBatchInsertRequest struct {
6089	// CustomEvents: The set of custom events to insert.
6090	CustomEvents []*CustomEvent `json:"customEvents,omitempty"`
6091
6092	// Kind: Identifies what kind of resource this is. Value: the fixed
6093	// string "dfareporting#customEventsBatchInsertRequest".
6094	Kind string `json:"kind,omitempty"`
6095
6096	// ForceSendFields is a list of field names (e.g. "CustomEvents") to
6097	// unconditionally include in API requests. By default, fields with
6098	// empty values are omitted from API requests. However, any non-pointer,
6099	// non-interface field appearing in ForceSendFields will be sent to the
6100	// server regardless of whether the field is empty or not. This may be
6101	// used to include empty fields in Patch requests.
6102	ForceSendFields []string `json:"-"`
6103
6104	// NullFields is a list of field names (e.g. "CustomEvents") to include
6105	// in API requests with the JSON null value. By default, fields with
6106	// empty values are omitted from API requests. However, any field with
6107	// an empty value appearing in NullFields will be sent to the server as
6108	// null. It is an error if a field in this list has a non-empty value.
6109	// This may be used to include null fields in Patch requests.
6110	NullFields []string `json:"-"`
6111}
6112
6113func (s *CustomEventsBatchInsertRequest) MarshalJSON() ([]byte, error) {
6114	type NoMethod CustomEventsBatchInsertRequest
6115	raw := NoMethod(*s)
6116	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6117}
6118
6119// CustomEventsBatchInsertResponse: Insert Custom Events Response.
6120type CustomEventsBatchInsertResponse struct {
6121	// HasFailures: Indicates that some or all custom events failed to
6122	// insert.
6123	HasFailures bool `json:"hasFailures,omitempty"`
6124
6125	// Kind: Identifies what kind of resource this is. Value: the fixed
6126	// string "dfareporting#customEventsBatchInsertResponse".
6127	Kind string `json:"kind,omitempty"`
6128
6129	// Status: The insert status of each custom event. Statuses are returned
6130	// in the same order that conversions are inserted.
6131	Status []*CustomEventStatus `json:"status,omitempty"`
6132
6133	// ServerResponse contains the HTTP response code and headers from the
6134	// server.
6135	googleapi.ServerResponse `json:"-"`
6136
6137	// ForceSendFields is a list of field names (e.g. "HasFailures") to
6138	// unconditionally include in API requests. By default, fields with
6139	// empty values are omitted from API requests. However, any non-pointer,
6140	// non-interface field appearing in ForceSendFields will be sent to the
6141	// server regardless of whether the field is empty or not. This may be
6142	// used to include empty fields in Patch requests.
6143	ForceSendFields []string `json:"-"`
6144
6145	// NullFields is a list of field names (e.g. "HasFailures") to include
6146	// in API requests with the JSON null value. By default, fields with
6147	// empty values are omitted from API requests. However, any field with
6148	// an empty value appearing in NullFields will be sent to the server as
6149	// null. It is an error if a field in this list has a non-empty value.
6150	// This may be used to include null fields in Patch requests.
6151	NullFields []string `json:"-"`
6152}
6153
6154func (s *CustomEventsBatchInsertResponse) MarshalJSON() ([]byte, error) {
6155	type NoMethod CustomEventsBatchInsertResponse
6156	raw := NoMethod(*s)
6157	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6158}
6159
6160// CustomFloodlightVariable: A custom floodlight variable.
6161type CustomFloodlightVariable struct {
6162	// Kind: Identifies what kind of resource this is. Value: the fixed
6163	// string "dfareporting#customFloodlightVariable".
6164	Kind string `json:"kind,omitempty"`
6165
6166	// Type: The type of custom floodlight variable to supply a value for.
6167	// These map to the "u[1-20]=" in the tags.
6168	//
6169	// Possible values:
6170	//   "U1"
6171	//   "U2"
6172	//   "U3"
6173	//   "U4"
6174	//   "U5"
6175	//   "U6"
6176	//   "U7"
6177	//   "U8"
6178	//   "U9"
6179	//   "U10"
6180	//   "U11"
6181	//   "U12"
6182	//   "U13"
6183	//   "U14"
6184	//   "U15"
6185	//   "U16"
6186	//   "U17"
6187	//   "U18"
6188	//   "U19"
6189	//   "U20"
6190	//   "U21"
6191	//   "U22"
6192	//   "U23"
6193	//   "U24"
6194	//   "U25"
6195	//   "U26"
6196	//   "U27"
6197	//   "U28"
6198	//   "U29"
6199	//   "U30"
6200	//   "U31"
6201	//   "U32"
6202	//   "U33"
6203	//   "U34"
6204	//   "U35"
6205	//   "U36"
6206	//   "U37"
6207	//   "U38"
6208	//   "U39"
6209	//   "U40"
6210	//   "U41"
6211	//   "U42"
6212	//   "U43"
6213	//   "U44"
6214	//   "U45"
6215	//   "U46"
6216	//   "U47"
6217	//   "U48"
6218	//   "U49"
6219	//   "U50"
6220	//   "U51"
6221	//   "U52"
6222	//   "U53"
6223	//   "U54"
6224	//   "U55"
6225	//   "U56"
6226	//   "U57"
6227	//   "U58"
6228	//   "U59"
6229	//   "U60"
6230	//   "U61"
6231	//   "U62"
6232	//   "U63"
6233	//   "U64"
6234	//   "U65"
6235	//   "U66"
6236	//   "U67"
6237	//   "U68"
6238	//   "U69"
6239	//   "U70"
6240	//   "U71"
6241	//   "U72"
6242	//   "U73"
6243	//   "U74"
6244	//   "U75"
6245	//   "U76"
6246	//   "U77"
6247	//   "U78"
6248	//   "U79"
6249	//   "U80"
6250	//   "U81"
6251	//   "U82"
6252	//   "U83"
6253	//   "U84"
6254	//   "U85"
6255	//   "U86"
6256	//   "U87"
6257	//   "U88"
6258	//   "U89"
6259	//   "U90"
6260	//   "U91"
6261	//   "U92"
6262	//   "U93"
6263	//   "U94"
6264	//   "U95"
6265	//   "U96"
6266	//   "U97"
6267	//   "U98"
6268	//   "U99"
6269	//   "U100"
6270	Type string `json:"type,omitempty"`
6271
6272	// Value: The value of the custom floodlight variable. The length of
6273	// string must not exceed 100 characters.
6274	Value string `json:"value,omitempty"`
6275
6276	// ForceSendFields is a list of field names (e.g. "Kind") to
6277	// unconditionally include in API requests. By default, fields with
6278	// empty values are omitted from API requests. However, any non-pointer,
6279	// non-interface field appearing in ForceSendFields will be sent to the
6280	// server regardless of whether the field is empty or not. This may be
6281	// used to include empty fields in Patch requests.
6282	ForceSendFields []string `json:"-"`
6283
6284	// NullFields is a list of field names (e.g. "Kind") to include in API
6285	// requests with the JSON null value. By default, fields with empty
6286	// values are omitted from API requests. However, any field with an
6287	// empty value appearing in NullFields will be sent to the server as
6288	// null. It is an error if a field in this list has a non-empty value.
6289	// This may be used to include null fields in Patch requests.
6290	NullFields []string `json:"-"`
6291}
6292
6293func (s *CustomFloodlightVariable) MarshalJSON() ([]byte, error) {
6294	type NoMethod CustomFloodlightVariable
6295	raw := NoMethod(*s)
6296	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6297}
6298
6299// CustomRichMediaEvents: Represents a Custom Rich Media Events group.
6300type CustomRichMediaEvents struct {
6301	// FilteredEventIds: List of custom rich media event IDs. Dimension
6302	// values must be all of type dfa:richMediaEventTypeIdAndName.
6303	FilteredEventIds []*DimensionValue `json:"filteredEventIds,omitempty"`
6304
6305	// Kind: The kind of resource this is, in this case
6306	// dfareporting#customRichMediaEvents.
6307	Kind string `json:"kind,omitempty"`
6308
6309	// ForceSendFields is a list of field names (e.g. "FilteredEventIds") to
6310	// unconditionally include in API requests. By default, fields with
6311	// empty values are omitted from API requests. However, any non-pointer,
6312	// non-interface field appearing in ForceSendFields will be sent to the
6313	// server regardless of whether the field is empty or not. This may be
6314	// used to include empty fields in Patch requests.
6315	ForceSendFields []string `json:"-"`
6316
6317	// NullFields is a list of field names (e.g. "FilteredEventIds") to
6318	// include in API requests with the JSON null value. By default, fields
6319	// with empty values are omitted from API requests. However, any field
6320	// with an empty value appearing in NullFields will be sent to the
6321	// server as null. It is an error if a field in this list has a
6322	// non-empty value. This may be used to include null fields in Patch
6323	// requests.
6324	NullFields []string `json:"-"`
6325}
6326
6327func (s *CustomRichMediaEvents) MarshalJSON() ([]byte, error) {
6328	type NoMethod CustomRichMediaEvents
6329	raw := NoMethod(*s)
6330	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6331}
6332
6333// CustomVariable: Custom variable.
6334type CustomVariable struct {
6335	// Index: The index of the custom variable.
6336	Index int64 `json:"index,omitempty,string"`
6337
6338	// Kind: Identifies what kind of resource this is. Value: the fixed
6339	// string "dfareporting#customVariable".
6340	Kind string `json:"kind,omitempty"`
6341
6342	// Value: The value of the custom variable. The length of string must
6343	// not exceed 50 characters.
6344	Value string `json:"value,omitempty"`
6345
6346	// ForceSendFields is a list of field names (e.g. "Index") to
6347	// unconditionally include in API requests. By default, fields with
6348	// empty values are omitted from API requests. However, any non-pointer,
6349	// non-interface field appearing in ForceSendFields will be sent to the
6350	// server regardless of whether the field is empty or not. This may be
6351	// used to include empty fields in Patch requests.
6352	ForceSendFields []string `json:"-"`
6353
6354	// NullFields is a list of field names (e.g. "Index") to include in API
6355	// requests with the JSON null value. By default, fields with empty
6356	// values are omitted from API requests. However, any field with an
6357	// empty value appearing in NullFields will be sent to the server as
6358	// null. It is an error if a field in this list has a non-empty value.
6359	// This may be used to include null fields in Patch requests.
6360	NullFields []string `json:"-"`
6361}
6362
6363func (s *CustomVariable) MarshalJSON() ([]byte, error) {
6364	type NoMethod CustomVariable
6365	raw := NoMethod(*s)
6366	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6367}
6368
6369// CustomViewabilityMetric: Custom Viewability Metric
6370type CustomViewabilityMetric struct {
6371	// Configuration: Configuration of the custom viewability metric.
6372	Configuration *CustomViewabilityMetricConfiguration `json:"configuration,omitempty"`
6373
6374	// Id: ID of the custom viewability metric.
6375	Id int64 `json:"id,omitempty,string"`
6376
6377	// Name: Name of the custom viewability metric.
6378	Name string `json:"name,omitempty"`
6379
6380	// ForceSendFields is a list of field names (e.g. "Configuration") to
6381	// unconditionally include in API requests. By default, fields with
6382	// empty values are omitted from API requests. However, any non-pointer,
6383	// non-interface field appearing in ForceSendFields will be sent to the
6384	// server regardless of whether the field is empty or not. This may be
6385	// used to include empty fields in Patch requests.
6386	ForceSendFields []string `json:"-"`
6387
6388	// NullFields is a list of field names (e.g. "Configuration") to include
6389	// in API requests with the JSON null value. By default, fields with
6390	// empty values are omitted from API requests. However, any field with
6391	// an empty value appearing in NullFields will be sent to the server as
6392	// null. It is an error if a field in this list has a non-empty value.
6393	// This may be used to include null fields in Patch requests.
6394	NullFields []string `json:"-"`
6395}
6396
6397func (s *CustomViewabilityMetric) MarshalJSON() ([]byte, error) {
6398	type NoMethod CustomViewabilityMetric
6399	raw := NoMethod(*s)
6400	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6401}
6402
6403// CustomViewabilityMetricConfiguration: The attributes, like playtime
6404// and percent onscreen, that define the Custom Viewability Metric.
6405type CustomViewabilityMetricConfiguration struct {
6406	// Audible: Whether the video must be audible to count an impression.
6407	Audible bool `json:"audible,omitempty"`
6408
6409	// TimeMillis: The time in milliseconds the video must play for the
6410	// Custom Viewability Metric to count an impression. If both this and
6411	// timePercent are specified, the earlier of the two will be used.
6412	TimeMillis int64 `json:"timeMillis,omitempty"`
6413
6414	// TimePercent: The percentage of video that must play for the Custom
6415	// Viewability Metric to count an impression. If both this and
6416	// timeMillis are specified, the earlier of the two will be used.
6417	TimePercent int64 `json:"timePercent,omitempty"`
6418
6419	// ViewabilityPercent: The percentage of video that must be on screen
6420	// for the Custom Viewability Metric to count an impression.
6421	ViewabilityPercent int64 `json:"viewabilityPercent,omitempty"`
6422
6423	// ForceSendFields is a list of field names (e.g. "Audible") to
6424	// unconditionally include in API requests. By default, fields with
6425	// empty values are omitted from API requests. However, any non-pointer,
6426	// non-interface field appearing in ForceSendFields will be sent to the
6427	// server regardless of whether the field is empty or not. This may be
6428	// used to include empty fields in Patch requests.
6429	ForceSendFields []string `json:"-"`
6430
6431	// NullFields is a list of field names (e.g. "Audible") to include in
6432	// API requests with the JSON null value. By default, fields with empty
6433	// values are omitted from API requests. However, any field with an
6434	// empty value appearing in NullFields will be sent to the server as
6435	// null. It is an error if a field in this list has a non-empty value.
6436	// This may be used to include null fields in Patch requests.
6437	NullFields []string `json:"-"`
6438}
6439
6440func (s *CustomViewabilityMetricConfiguration) MarshalJSON() ([]byte, error) {
6441	type NoMethod CustomViewabilityMetricConfiguration
6442	raw := NoMethod(*s)
6443	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6444}
6445
6446// DV3Ids: DV360 IDs related to the custom event.
6447type DV3Ids struct {
6448	// DvCampaignId: Campaign ID for DV360.
6449	DvCampaignId int64 `json:"dvCampaignId,omitempty,string"`
6450
6451	// DvCreativeId: Creative ID for DV360.
6452	DvCreativeId int64 `json:"dvCreativeId,omitempty,string"`
6453
6454	// DvInsertionOrderId: Insertion Order ID for DV360.
6455	DvInsertionOrderId int64 `json:"dvInsertionOrderId,omitempty,string"`
6456
6457	// DvLineItemId: Line Item ID for DV360.
6458	DvLineItemId int64 `json:"dvLineItemId,omitempty,string"`
6459
6460	// DvSiteId: Site ID for DV360.
6461	DvSiteId int64 `json:"dvSiteId,omitempty,string"`
6462
6463	// Kind: Identifies what kind of resource this is. Value: the fixed
6464	// string "dfareporting#dV3Ids".
6465	Kind string `json:"kind,omitempty"`
6466
6467	// ForceSendFields is a list of field names (e.g. "DvCampaignId") to
6468	// unconditionally include in API requests. By default, fields with
6469	// empty values are omitted from API requests. However, any non-pointer,
6470	// non-interface field appearing in ForceSendFields will be sent to the
6471	// server regardless of whether the field is empty or not. This may be
6472	// used to include empty fields in Patch requests.
6473	ForceSendFields []string `json:"-"`
6474
6475	// NullFields is a list of field names (e.g. "DvCampaignId") to include
6476	// in API requests with the JSON null value. By default, fields with
6477	// empty values are omitted from API requests. However, any field with
6478	// an empty value appearing in NullFields will be sent to the server as
6479	// null. It is an error if a field in this list has a non-empty value.
6480	// This may be used to include null fields in Patch requests.
6481	NullFields []string `json:"-"`
6482}
6483
6484func (s *DV3Ids) MarshalJSON() ([]byte, error) {
6485	type NoMethod DV3Ids
6486	raw := NoMethod(*s)
6487	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6488}
6489
6490// DateRange: Represents a date range.
6491type DateRange struct {
6492	EndDate string `json:"endDate,omitempty"`
6493
6494	// Kind: The kind of resource this is, in this case
6495	// dfareporting#dateRange.
6496	Kind string `json:"kind,omitempty"`
6497
6498	// RelativeDateRange: The date range relative to the date of when the
6499	// report is run.
6500	//
6501	// Possible values:
6502	//   "TODAY"
6503	//   "YESTERDAY"
6504	//   "WEEK_TO_DATE"
6505	//   "MONTH_TO_DATE"
6506	//   "QUARTER_TO_DATE"
6507	//   "YEAR_TO_DATE"
6508	//   "PREVIOUS_WEEK"
6509	//   "PREVIOUS_MONTH"
6510	//   "PREVIOUS_QUARTER"
6511	//   "PREVIOUS_YEAR"
6512	//   "LAST_7_DAYS"
6513	//   "LAST_30_DAYS"
6514	//   "LAST_90_DAYS"
6515	//   "LAST_365_DAYS"
6516	//   "LAST_24_MONTHS"
6517	//   "LAST_14_DAYS"
6518	//   "LAST_60_DAYS"
6519	RelativeDateRange string `json:"relativeDateRange,omitempty"`
6520
6521	StartDate string `json:"startDate,omitempty"`
6522
6523	// ForceSendFields is a list of field names (e.g. "EndDate") to
6524	// unconditionally include in API requests. By default, fields with
6525	// empty values are omitted from API requests. However, any non-pointer,
6526	// non-interface field appearing in ForceSendFields will be sent to the
6527	// server regardless of whether the field is empty or not. This may be
6528	// used to include empty fields in Patch requests.
6529	ForceSendFields []string `json:"-"`
6530
6531	// NullFields is a list of field names (e.g. "EndDate") to include in
6532	// API requests with the JSON null value. By default, fields with empty
6533	// values are omitted from API requests. However, any field with an
6534	// empty value appearing in NullFields will be sent to the server as
6535	// null. It is an error if a field in this list has a non-empty value.
6536	// This may be used to include null fields in Patch requests.
6537	NullFields []string `json:"-"`
6538}
6539
6540func (s *DateRange) MarshalJSON() ([]byte, error) {
6541	type NoMethod DateRange
6542	raw := NoMethod(*s)
6543	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6544}
6545
6546// DayPartTargeting: Day Part Targeting.
6547type DayPartTargeting struct {
6548	// DaysOfWeek: Days of the week when the ad will serve. Acceptable
6549	// values are: - "SUNDAY" - "MONDAY" - "TUESDAY" - "WEDNESDAY" -
6550	// "THURSDAY" - "FRIDAY" - "SATURDAY"
6551	//
6552	// Possible values:
6553	//   "MONDAY"
6554	//   "TUESDAY"
6555	//   "WEDNESDAY"
6556	//   "THURSDAY"
6557	//   "FRIDAY"
6558	//   "SATURDAY"
6559	//   "SUNDAY"
6560	DaysOfWeek []string `json:"daysOfWeek,omitempty"`
6561
6562	// HoursOfDay: Hours of the day when the ad will serve, where 0 is
6563	// midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with
6564	// days of week, in which case the ad would serve during these hours on
6565	// the specified days. For example if Monday, Wednesday, Friday are the
6566	// days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is
6567	// specified, the ad would serve Monday, Wednesdays, and Fridays at
6568	// 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive.
6569	HoursOfDay []int64 `json:"hoursOfDay,omitempty"`
6570
6571	// UserLocalTime: Whether or not to use the user's local time. If false,
6572	// the America/New York time zone applies.
6573	UserLocalTime bool `json:"userLocalTime,omitempty"`
6574
6575	// ForceSendFields is a list of field names (e.g. "DaysOfWeek") to
6576	// unconditionally include in API requests. By default, fields with
6577	// empty values are omitted from API requests. However, any non-pointer,
6578	// non-interface field appearing in ForceSendFields will be sent to the
6579	// server regardless of whether the field is empty or not. This may be
6580	// used to include empty fields in Patch requests.
6581	ForceSendFields []string `json:"-"`
6582
6583	// NullFields is a list of field names (e.g. "DaysOfWeek") to include in
6584	// API requests with the JSON null value. By default, fields with empty
6585	// values are omitted from API requests. However, any field with an
6586	// empty value appearing in NullFields will be sent to the server as
6587	// null. It is an error if a field in this list has a non-empty value.
6588	// This may be used to include null fields in Patch requests.
6589	NullFields []string `json:"-"`
6590}
6591
6592func (s *DayPartTargeting) MarshalJSON() ([]byte, error) {
6593	type NoMethod DayPartTargeting
6594	raw := NoMethod(*s)
6595	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6596}
6597
6598// DeepLink: Contains information about a landing page deep link.
6599type DeepLink struct {
6600	// AppUrl: The URL of the mobile app being linked to.
6601	AppUrl string `json:"appUrl,omitempty"`
6602
6603	// FallbackUrl: The fallback URL. This URL will be served to users who
6604	// do not have the mobile app installed.
6605	FallbackUrl string `json:"fallbackUrl,omitempty"`
6606
6607	// Kind: Identifies what kind of resource this is. Value: the fixed
6608	// string "dfareporting#deepLink".
6609	Kind string `json:"kind,omitempty"`
6610
6611	// MobileApp: The mobile app targeted by this deep link.
6612	MobileApp *MobileApp `json:"mobileApp,omitempty"`
6613
6614	// RemarketingListIds: Ads served to users on these remarketing lists
6615	// will use this deep link. Applicable when mobileApp.directory is
6616	// APPLE_APP_STORE.
6617	RemarketingListIds googleapi.Int64s `json:"remarketingListIds,omitempty"`
6618
6619	// ForceSendFields is a list of field names (e.g. "AppUrl") to
6620	// unconditionally include in API requests. By default, fields with
6621	// empty values are omitted from API requests. However, any non-pointer,
6622	// non-interface field appearing in ForceSendFields will be sent to the
6623	// server regardless of whether the field is empty or not. This may be
6624	// used to include empty fields in Patch requests.
6625	ForceSendFields []string `json:"-"`
6626
6627	// NullFields is a list of field names (e.g. "AppUrl") to include in API
6628	// requests with the JSON null value. By default, fields with empty
6629	// values are omitted from API requests. However, any field with an
6630	// empty value appearing in NullFields will be sent to the server as
6631	// null. It is an error if a field in this list has a non-empty value.
6632	// This may be used to include null fields in Patch requests.
6633	NullFields []string `json:"-"`
6634}
6635
6636func (s *DeepLink) MarshalJSON() ([]byte, error) {
6637	type NoMethod DeepLink
6638	raw := NoMethod(*s)
6639	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6640}
6641
6642// DefaultClickThroughEventTagProperties: Properties of inheriting and
6643// overriding the default click-through event tag. A campaign may
6644// override the event tag defined at the advertiser level, and an ad may
6645// also override the campaign's setting further.
6646type DefaultClickThroughEventTagProperties struct {
6647	// DefaultClickThroughEventTagId: ID of the click-through event tag to
6648	// apply to all ads in this entity's scope.
6649	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
6650
6651	// OverrideInheritedEventTag: Whether this entity should override the
6652	// inherited default click-through event tag with its own defined value.
6653	OverrideInheritedEventTag bool `json:"overrideInheritedEventTag,omitempty"`
6654
6655	// ForceSendFields is a list of field names (e.g.
6656	// "DefaultClickThroughEventTagId") to unconditionally include in API
6657	// requests. By default, fields with empty values are omitted from API
6658	// requests. However, any non-pointer, non-interface field appearing in
6659	// ForceSendFields will be sent to the server regardless of whether the
6660	// field is empty or not. This may be used to include empty fields in
6661	// Patch requests.
6662	ForceSendFields []string `json:"-"`
6663
6664	// NullFields is a list of field names (e.g.
6665	// "DefaultClickThroughEventTagId") to include in API requests with the
6666	// JSON null value. By default, fields with empty values are omitted
6667	// from API requests. However, any field with an empty value appearing
6668	// in NullFields will be sent to the server as null. It is an error if a
6669	// field in this list has a non-empty value. This may be used to include
6670	// null fields in Patch requests.
6671	NullFields []string `json:"-"`
6672}
6673
6674func (s *DefaultClickThroughEventTagProperties) MarshalJSON() ([]byte, error) {
6675	type NoMethod DefaultClickThroughEventTagProperties
6676	raw := NoMethod(*s)
6677	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6678}
6679
6680// DeliverySchedule: Delivery Schedule.
6681type DeliverySchedule struct {
6682	// FrequencyCap: Limit on the number of times an individual user can be
6683	// served the ad within a specified period of time.
6684	FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
6685
6686	// HardCutoff: Whether or not hard cutoff is enabled. If true, the ad
6687	// will not serve after the end date and time. Otherwise the ad will
6688	// continue to be served until it has reached its delivery goals.
6689	HardCutoff bool `json:"hardCutoff,omitempty"`
6690
6691	// ImpressionRatio: Impression ratio for this ad. This ratio determines
6692	// how often each ad is served relative to the others. For example, if
6693	// ad A has an impression ratio of 1 and ad B has an impression ratio of
6694	// 3, then Campaign Manager will serve ad B three times as often as ad
6695	// A. Acceptable values are 1 to 10, inclusive.
6696	ImpressionRatio int64 `json:"impressionRatio,omitempty,string"`
6697
6698	// Priority: Serving priority of an ad, with respect to other ads. The
6699	// lower the priority number, the greater the priority with which it is
6700	// served.
6701	//
6702	// Possible values:
6703	//   "AD_PRIORITY_01"
6704	//   "AD_PRIORITY_02"
6705	//   "AD_PRIORITY_03"
6706	//   "AD_PRIORITY_04"
6707	//   "AD_PRIORITY_05"
6708	//   "AD_PRIORITY_06"
6709	//   "AD_PRIORITY_07"
6710	//   "AD_PRIORITY_08"
6711	//   "AD_PRIORITY_09"
6712	//   "AD_PRIORITY_10"
6713	//   "AD_PRIORITY_11"
6714	//   "AD_PRIORITY_12"
6715	//   "AD_PRIORITY_13"
6716	//   "AD_PRIORITY_14"
6717	//   "AD_PRIORITY_15"
6718	//   "AD_PRIORITY_16"
6719	Priority string `json:"priority,omitempty"`
6720
6721	// ForceSendFields is a list of field names (e.g. "FrequencyCap") to
6722	// unconditionally include in API requests. By default, fields with
6723	// empty values are omitted from API requests. However, any non-pointer,
6724	// non-interface field appearing in ForceSendFields will be sent to the
6725	// server regardless of whether the field is empty or not. This may be
6726	// used to include empty fields in Patch requests.
6727	ForceSendFields []string `json:"-"`
6728
6729	// NullFields is a list of field names (e.g. "FrequencyCap") to include
6730	// in API requests with the JSON null value. By default, fields with
6731	// empty values are omitted from API requests. However, any field with
6732	// an empty value appearing in NullFields will be sent to the server as
6733	// null. It is an error if a field in this list has a non-empty value.
6734	// This may be used to include null fields in Patch requests.
6735	NullFields []string `json:"-"`
6736}
6737
6738func (s *DeliverySchedule) MarshalJSON() ([]byte, error) {
6739	type NoMethod DeliverySchedule
6740	raw := NoMethod(*s)
6741	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6742}
6743
6744// DfpSettings: Google Ad Manager Settings
6745type DfpSettings struct {
6746	// DfpNetworkCode: Ad Manager network code for this directory site.
6747	DfpNetworkCode string `json:"dfpNetworkCode,omitempty"`
6748
6749	// DfpNetworkName: Ad Manager network name for this directory site.
6750	DfpNetworkName string `json:"dfpNetworkName,omitempty"`
6751
6752	// ProgrammaticPlacementAccepted: Whether this directory site accepts
6753	// programmatic placements.
6754	ProgrammaticPlacementAccepted bool `json:"programmaticPlacementAccepted,omitempty"`
6755
6756	// PubPaidPlacementAccepted: Whether this directory site accepts
6757	// publisher-paid tags.
6758	PubPaidPlacementAccepted bool `json:"pubPaidPlacementAccepted,omitempty"`
6759
6760	// PublisherPortalOnly: Whether this directory site is available only
6761	// via Publisher Portal.
6762	PublisherPortalOnly bool `json:"publisherPortalOnly,omitempty"`
6763
6764	// ForceSendFields is a list of field names (e.g. "DfpNetworkCode") to
6765	// unconditionally include in API requests. By default, fields with
6766	// empty values are omitted from API requests. However, any non-pointer,
6767	// non-interface field appearing in ForceSendFields will be sent to the
6768	// server regardless of whether the field is empty or not. This may be
6769	// used to include empty fields in Patch requests.
6770	ForceSendFields []string `json:"-"`
6771
6772	// NullFields is a list of field names (e.g. "DfpNetworkCode") to
6773	// include in API requests with the JSON null value. By default, fields
6774	// with empty values are omitted from API requests. However, any field
6775	// with an empty value appearing in NullFields will be sent to the
6776	// server as null. It is an error if a field in this list has a
6777	// non-empty value. This may be used to include null fields in Patch
6778	// requests.
6779	NullFields []string `json:"-"`
6780}
6781
6782func (s *DfpSettings) MarshalJSON() ([]byte, error) {
6783	type NoMethod DfpSettings
6784	raw := NoMethod(*s)
6785	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6786}
6787
6788// Dimension: Represents a dimension.
6789type Dimension struct {
6790	// Kind: The kind of resource this is, in this case
6791	// dfareporting#dimension.
6792	Kind string `json:"kind,omitempty"`
6793
6794	// Name: The dimension name, e.g. dfa:advertiser
6795	Name string `json:"name,omitempty"`
6796
6797	// ForceSendFields is a list of field names (e.g. "Kind") to
6798	// unconditionally include in API requests. By default, fields with
6799	// empty values are omitted from API requests. However, any non-pointer,
6800	// non-interface field appearing in ForceSendFields will be sent to the
6801	// server regardless of whether the field is empty or not. This may be
6802	// used to include empty fields in Patch requests.
6803	ForceSendFields []string `json:"-"`
6804
6805	// NullFields is a list of field names (e.g. "Kind") to include in API
6806	// requests with the JSON null value. By default, fields with empty
6807	// values are omitted from API requests. However, any field with an
6808	// empty value appearing in NullFields will be sent to the server as
6809	// null. It is an error if a field in this list has a non-empty value.
6810	// This may be used to include null fields in Patch requests.
6811	NullFields []string `json:"-"`
6812}
6813
6814func (s *Dimension) MarshalJSON() ([]byte, error) {
6815	type NoMethod Dimension
6816	raw := NoMethod(*s)
6817	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6818}
6819
6820// DimensionFilter: Represents a dimension filter.
6821type DimensionFilter struct {
6822	// DimensionName: The name of the dimension to filter.
6823	DimensionName string `json:"dimensionName,omitempty"`
6824
6825	// Kind: The kind of resource this is, in this case
6826	// dfareporting#dimensionFilter.
6827	Kind string `json:"kind,omitempty"`
6828
6829	// Value: The value of the dimension to filter.
6830	Value string `json:"value,omitempty"`
6831
6832	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6833	// unconditionally include in API requests. By default, fields with
6834	// empty values are omitted from API requests. However, any non-pointer,
6835	// non-interface field appearing in ForceSendFields will be sent to the
6836	// server regardless of whether the field is empty or not. This may be
6837	// used to include empty fields in Patch requests.
6838	ForceSendFields []string `json:"-"`
6839
6840	// NullFields is a list of field names (e.g. "DimensionName") to include
6841	// in API requests with the JSON null value. By default, fields with
6842	// empty values are omitted from API requests. However, any field with
6843	// an empty value appearing in NullFields will be sent to the server as
6844	// null. It is an error if a field in this list has a non-empty value.
6845	// This may be used to include null fields in Patch requests.
6846	NullFields []string `json:"-"`
6847}
6848
6849func (s *DimensionFilter) MarshalJSON() ([]byte, error) {
6850	type NoMethod DimensionFilter
6851	raw := NoMethod(*s)
6852	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6853}
6854
6855// DimensionValue: Represents a DimensionValue resource.
6856type DimensionValue struct {
6857	// DimensionName: The name of the dimension.
6858	DimensionName string `json:"dimensionName,omitempty"`
6859
6860	// Etag: The eTag of this response for caching purposes.
6861	Etag string `json:"etag,omitempty"`
6862
6863	// Id: The ID associated with the value if available.
6864	Id string `json:"id,omitempty"`
6865
6866	// Kind: The kind of resource this is, in this case
6867	// dfareporting#dimensionValue.
6868	Kind string `json:"kind,omitempty"`
6869
6870	// MatchType: Determines how the 'value' field is matched when
6871	// filtering. If not specified, defaults to EXACT. If set to
6872	// WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable
6873	// length character sequences, and it can be escaped with a backslash.
6874	// Note, only paid search dimensions ('dfa:paidSearch*') allow a
6875	// matchType other than EXACT.
6876	//
6877	// Possible values:
6878	//   "EXACT"
6879	//   "BEGINS_WITH"
6880	//   "CONTAINS"
6881	//   "WILDCARD_EXPRESSION"
6882	MatchType string `json:"matchType,omitempty"`
6883
6884	// Value: The value of the dimension.
6885	Value string `json:"value,omitempty"`
6886
6887	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6888	// unconditionally include in API requests. By default, fields with
6889	// empty values are omitted from API requests. However, any non-pointer,
6890	// non-interface field appearing in ForceSendFields will be sent to the
6891	// server regardless of whether the field is empty or not. This may be
6892	// used to include empty fields in Patch requests.
6893	ForceSendFields []string `json:"-"`
6894
6895	// NullFields is a list of field names (e.g. "DimensionName") to include
6896	// in API requests with the JSON null value. By default, fields with
6897	// empty values are omitted from API requests. However, any field with
6898	// an empty value appearing in NullFields will be sent to the server as
6899	// null. It is an error if a field in this list has a non-empty value.
6900	// This may be used to include null fields in Patch requests.
6901	NullFields []string `json:"-"`
6902}
6903
6904func (s *DimensionValue) MarshalJSON() ([]byte, error) {
6905	type NoMethod DimensionValue
6906	raw := NoMethod(*s)
6907	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6908}
6909
6910// DimensionValueList: Represents the list of DimensionValue resources.
6911type DimensionValueList struct {
6912	// Etag: The eTag of this response for caching purposes.
6913	Etag string `json:"etag,omitempty"`
6914
6915	// Items: The dimension values returned in this response.
6916	Items []*DimensionValue `json:"items,omitempty"`
6917
6918	// Kind: The kind of list this is, in this case
6919	// dfareporting#dimensionValueList.
6920	Kind string `json:"kind,omitempty"`
6921
6922	// NextPageToken: Continuation token used to page through dimension
6923	// values. To retrieve the next page of results, set the next request's
6924	// "pageToken" to the value of this field. The page token is only valid
6925	// for a limited amount of time and should not be persisted.
6926	NextPageToken string `json:"nextPageToken,omitempty"`
6927
6928	// ServerResponse contains the HTTP response code and headers from the
6929	// server.
6930	googleapi.ServerResponse `json:"-"`
6931
6932	// ForceSendFields is a list of field names (e.g. "Etag") to
6933	// unconditionally include in API requests. By default, fields with
6934	// empty values are omitted from API requests. However, any non-pointer,
6935	// non-interface field appearing in ForceSendFields will be sent to the
6936	// server regardless of whether the field is empty or not. This may be
6937	// used to include empty fields in Patch requests.
6938	ForceSendFields []string `json:"-"`
6939
6940	// NullFields is a list of field names (e.g. "Etag") to include in API
6941	// requests with the JSON null value. By default, fields with empty
6942	// values are omitted from API requests. However, any field with an
6943	// empty value appearing in NullFields will be sent to the server as
6944	// null. It is an error if a field in this list has a non-empty value.
6945	// This may be used to include null fields in Patch requests.
6946	NullFields []string `json:"-"`
6947}
6948
6949func (s *DimensionValueList) MarshalJSON() ([]byte, error) {
6950	type NoMethod DimensionValueList
6951	raw := NoMethod(*s)
6952	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6953}
6954
6955// DimensionValueRequest: Represents a DimensionValuesRequest.
6956type DimensionValueRequest struct {
6957	// DimensionName: The name of the dimension for which values should be
6958	// requested.
6959	DimensionName string `json:"dimensionName,omitempty"`
6960
6961	EndDate string `json:"endDate,omitempty"`
6962
6963	// Filters: The list of filters by which to filter values. The filters
6964	// are ANDed.
6965	Filters []*DimensionFilter `json:"filters,omitempty"`
6966
6967	// Kind: The kind of request this is, in this case
6968	// dfareporting#dimensionValueRequest .
6969	Kind string `json:"kind,omitempty"`
6970
6971	StartDate string `json:"startDate,omitempty"`
6972
6973	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6974	// unconditionally include in API requests. By default, fields with
6975	// empty values are omitted from API requests. However, any non-pointer,
6976	// non-interface field appearing in ForceSendFields will be sent to the
6977	// server regardless of whether the field is empty or not. This may be
6978	// used to include empty fields in Patch requests.
6979	ForceSendFields []string `json:"-"`
6980
6981	// NullFields is a list of field names (e.g. "DimensionName") to include
6982	// in API requests with the JSON null value. By default, fields with
6983	// empty values are omitted from API requests. However, any field with
6984	// an empty value appearing in NullFields will be sent to the server as
6985	// null. It is an error if a field in this list has a non-empty value.
6986	// This may be used to include null fields in Patch requests.
6987	NullFields []string `json:"-"`
6988}
6989
6990func (s *DimensionValueRequest) MarshalJSON() ([]byte, error) {
6991	type NoMethod DimensionValueRequest
6992	raw := NoMethod(*s)
6993	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6994}
6995
6996// DirectorySite: DirectorySites contains properties of a website from
6997// the Site Directory. Sites need to be added to an account via the
6998// Sites resource before they can be assigned to a placement.
6999type DirectorySite struct {
7000	// Id: ID of this directory site. This is a read-only, auto-generated
7001	// field.
7002	Id int64 `json:"id,omitempty,string"`
7003
7004	// IdDimensionValue: Dimension value for the ID of this directory site.
7005	// This is a read-only, auto-generated field.
7006	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7007
7008	// InpageTagFormats: Tag types for regular placements. Acceptable values
7009	// are: - "STANDARD" - "IFRAME_JAVASCRIPT_INPAGE" -
7010	// "INTERNAL_REDIRECT_INPAGE" - "JAVASCRIPT_INPAGE"
7011	//
7012	// Possible values:
7013	//   "STANDARD"
7014	//   "IFRAME_JAVASCRIPT_INPAGE"
7015	//   "INTERNAL_REDIRECT_INPAGE"
7016	//   "JAVASCRIPT_INPAGE"
7017	InpageTagFormats []string `json:"inpageTagFormats,omitempty"`
7018
7019	// InterstitialTagFormats: Tag types for interstitial placements.
7020	// Acceptable values are: - "IFRAME_JAVASCRIPT_INTERSTITIAL" -
7021	// "INTERNAL_REDIRECT_INTERSTITIAL" - "JAVASCRIPT_INTERSTITIAL"
7022	//
7023	// Possible values:
7024	//   "IFRAME_JAVASCRIPT_INTERSTITIAL"
7025	//   "INTERNAL_REDIRECT_INTERSTITIAL"
7026	//   "JAVASCRIPT_INTERSTITIAL"
7027	InterstitialTagFormats []string `json:"interstitialTagFormats,omitempty"`
7028
7029	// Kind: Identifies what kind of resource this is. Value: the fixed
7030	// string "dfareporting#directorySite".
7031	Kind string `json:"kind,omitempty"`
7032
7033	// Name: Name of this directory site.
7034	Name string `json:"name,omitempty"`
7035
7036	// Settings: Directory site settings.
7037	Settings *DirectorySiteSettings `json:"settings,omitempty"`
7038
7039	// Url: URL of this directory site.
7040	Url string `json:"url,omitempty"`
7041
7042	// ServerResponse contains the HTTP response code and headers from the
7043	// server.
7044	googleapi.ServerResponse `json:"-"`
7045
7046	// ForceSendFields is a list of field names (e.g. "Id") to
7047	// unconditionally include in API requests. By default, fields with
7048	// empty values are omitted from API requests. However, any non-pointer,
7049	// non-interface field appearing in ForceSendFields will be sent to the
7050	// server regardless of whether the field is empty or not. This may be
7051	// used to include empty fields in Patch requests.
7052	ForceSendFields []string `json:"-"`
7053
7054	// NullFields is a list of field names (e.g. "Id") to include in API
7055	// requests with the JSON null value. By default, fields with empty
7056	// values are omitted from API requests. However, any field with an
7057	// empty value appearing in NullFields will be sent to the server as
7058	// null. It is an error if a field in this list has a non-empty value.
7059	// This may be used to include null fields in Patch requests.
7060	NullFields []string `json:"-"`
7061}
7062
7063func (s *DirectorySite) MarshalJSON() ([]byte, error) {
7064	type NoMethod DirectorySite
7065	raw := NoMethod(*s)
7066	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7067}
7068
7069// DirectorySiteSettings: Directory Site Settings
7070type DirectorySiteSettings struct {
7071	// ActiveViewOptOut: Whether this directory site has disabled active
7072	// view creatives.
7073	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
7074
7075	// DfpSettings: Directory site Ad Manager settings.
7076	DfpSettings *DfpSettings `json:"dfpSettings,omitempty"`
7077
7078	// InstreamVideoPlacementAccepted: Whether this site accepts in-stream
7079	// video ads.
7080	InstreamVideoPlacementAccepted bool `json:"instreamVideoPlacementAccepted,omitempty"`
7081
7082	// InterstitialPlacementAccepted: Whether this site accepts interstitial
7083	// ads.
7084	InterstitialPlacementAccepted bool `json:"interstitialPlacementAccepted,omitempty"`
7085
7086	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
7087	// unconditionally include in API requests. By default, fields with
7088	// empty values are omitted from API requests. However, any non-pointer,
7089	// non-interface field appearing in ForceSendFields will be sent to the
7090	// server regardless of whether the field is empty or not. This may be
7091	// used to include empty fields in Patch requests.
7092	ForceSendFields []string `json:"-"`
7093
7094	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
7095	// include in API requests with the JSON null value. By default, fields
7096	// with empty values are omitted from API requests. However, any field
7097	// with an empty value appearing in NullFields will be sent to the
7098	// server as null. It is an error if a field in this list has a
7099	// non-empty value. This may be used to include null fields in Patch
7100	// requests.
7101	NullFields []string `json:"-"`
7102}
7103
7104func (s *DirectorySiteSettings) MarshalJSON() ([]byte, error) {
7105	type NoMethod DirectorySiteSettings
7106	raw := NoMethod(*s)
7107	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7108}
7109
7110// DirectorySitesListResponse: Directory Site List Response
7111type DirectorySitesListResponse struct {
7112	// DirectorySites: Directory site collection.
7113	DirectorySites []*DirectorySite `json:"directorySites,omitempty"`
7114
7115	// Kind: Identifies what kind of resource this is. Value: the fixed
7116	// string "dfareporting#directorySitesListResponse".
7117	Kind string `json:"kind,omitempty"`
7118
7119	// NextPageToken: Pagination token to be used for the next list
7120	// operation.
7121	NextPageToken string `json:"nextPageToken,omitempty"`
7122
7123	// ServerResponse contains the HTTP response code and headers from the
7124	// server.
7125	googleapi.ServerResponse `json:"-"`
7126
7127	// ForceSendFields is a list of field names (e.g. "DirectorySites") to
7128	// unconditionally include in API requests. By default, fields with
7129	// empty values are omitted from API requests. However, any non-pointer,
7130	// non-interface field appearing in ForceSendFields will be sent to the
7131	// server regardless of whether the field is empty or not. This may be
7132	// used to include empty fields in Patch requests.
7133	ForceSendFields []string `json:"-"`
7134
7135	// NullFields is a list of field names (e.g. "DirectorySites") to
7136	// include in API requests with the JSON null value. By default, fields
7137	// with empty values are omitted from API requests. However, any field
7138	// with an empty value appearing in NullFields will be sent to the
7139	// server as null. It is an error if a field in this list has a
7140	// non-empty value. This may be used to include null fields in Patch
7141	// requests.
7142	NullFields []string `json:"-"`
7143}
7144
7145func (s *DirectorySitesListResponse) MarshalJSON() ([]byte, error) {
7146	type NoMethod DirectorySitesListResponse
7147	raw := NoMethod(*s)
7148	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7149}
7150
7151// DisjunctiveMatchStatement: Represents a Disjunctive Match Statement
7152// resource, which is a conjunction (and) of disjunctive (or) boolean
7153// statements.
7154type DisjunctiveMatchStatement struct {
7155	// EventFilters: The event filters contained within this disjunctive
7156	// match statement.
7157	EventFilters []*EventFilter `json:"eventFilters,omitempty"`
7158
7159	// Kind: The kind of resource this is, in this case
7160	// dfareporting#disjunctiveMatchStatement.
7161	Kind string `json:"kind,omitempty"`
7162
7163	// ForceSendFields is a list of field names (e.g. "EventFilters") to
7164	// unconditionally include in API requests. By default, fields with
7165	// empty values are omitted from API requests. However, any non-pointer,
7166	// non-interface field appearing in ForceSendFields will be sent to the
7167	// server regardless of whether the field is empty or not. This may be
7168	// used to include empty fields in Patch requests.
7169	ForceSendFields []string `json:"-"`
7170
7171	// NullFields is a list of field names (e.g. "EventFilters") to include
7172	// in API requests with the JSON null value. By default, fields with
7173	// empty values are omitted from API requests. However, any field with
7174	// an empty value appearing in NullFields will be sent to the server as
7175	// null. It is an error if a field in this list has a non-empty value.
7176	// This may be used to include null fields in Patch requests.
7177	NullFields []string `json:"-"`
7178}
7179
7180func (s *DisjunctiveMatchStatement) MarshalJSON() ([]byte, error) {
7181	type NoMethod DisjunctiveMatchStatement
7182	raw := NoMethod(*s)
7183	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7184}
7185
7186// DynamicTargetingKey: Contains properties of a dynamic targeting key.
7187// Dynamic targeting keys are unique, user-friendly labels, created at
7188// the advertiser level in DCM, that can be assigned to ads, creatives,
7189// and placements and used for targeting with Studio dynamic creatives.
7190// Use these labels instead of numeric Campaign Manager IDs (such as
7191// placement IDs) to save time and avoid errors in your dynamic feeds.
7192type DynamicTargetingKey struct {
7193	// Kind: Identifies what kind of resource this is. Value: the fixed
7194	// string "dfareporting#dynamicTargetingKey".
7195	Kind string `json:"kind,omitempty"`
7196
7197	// Name: Name of this dynamic targeting key. This is a required field.
7198	// Must be less than 256 characters long and cannot contain commas. All
7199	// characters are converted to lowercase.
7200	Name string `json:"name,omitempty"`
7201
7202	// ObjectId: ID of the object of this dynamic targeting key. This is a
7203	// required field.
7204	ObjectId int64 `json:"objectId,omitempty,string"`
7205
7206	// ObjectType: Type of the object of this dynamic targeting key. This is
7207	// a required field.
7208	//
7209	// Possible values:
7210	//   "OBJECT_ADVERTISER"
7211	//   "OBJECT_AD"
7212	//   "OBJECT_CREATIVE"
7213	//   "OBJECT_PLACEMENT"
7214	ObjectType string `json:"objectType,omitempty"`
7215
7216	// ServerResponse contains the HTTP response code and headers from the
7217	// server.
7218	googleapi.ServerResponse `json:"-"`
7219
7220	// ForceSendFields is a list of field names (e.g. "Kind") to
7221	// unconditionally include in API requests. By default, fields with
7222	// empty values are omitted from API requests. However, any non-pointer,
7223	// non-interface field appearing in ForceSendFields will be sent to the
7224	// server regardless of whether the field is empty or not. This may be
7225	// used to include empty fields in Patch requests.
7226	ForceSendFields []string `json:"-"`
7227
7228	// NullFields is a list of field names (e.g. "Kind") to include in API
7229	// requests with the JSON null value. By default, fields with empty
7230	// values are omitted from API requests. However, any field with an
7231	// empty value appearing in NullFields will be sent to the server as
7232	// null. It is an error if a field in this list has a non-empty value.
7233	// This may be used to include null fields in Patch requests.
7234	NullFields []string `json:"-"`
7235}
7236
7237func (s *DynamicTargetingKey) MarshalJSON() ([]byte, error) {
7238	type NoMethod DynamicTargetingKey
7239	raw := NoMethod(*s)
7240	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7241}
7242
7243// DynamicTargetingKeysListResponse: Dynamic Targeting Key List Response
7244type DynamicTargetingKeysListResponse struct {
7245	// DynamicTargetingKeys: Dynamic targeting key collection.
7246	DynamicTargetingKeys []*DynamicTargetingKey `json:"dynamicTargetingKeys,omitempty"`
7247
7248	// Kind: Identifies what kind of resource this is. Value: the fixed
7249	// string "dfareporting#dynamicTargetingKeysListResponse".
7250	Kind string `json:"kind,omitempty"`
7251
7252	// ServerResponse contains the HTTP response code and headers from the
7253	// server.
7254	googleapi.ServerResponse `json:"-"`
7255
7256	// ForceSendFields is a list of field names (e.g.
7257	// "DynamicTargetingKeys") to unconditionally include in API requests.
7258	// By default, fields with empty values are omitted from API requests.
7259	// However, any non-pointer, non-interface field appearing in
7260	// ForceSendFields will be sent to the server regardless of whether the
7261	// field is empty or not. This may be used to include empty fields in
7262	// Patch requests.
7263	ForceSendFields []string `json:"-"`
7264
7265	// NullFields is a list of field names (e.g. "DynamicTargetingKeys") to
7266	// include in API requests with the JSON null value. By default, fields
7267	// with empty values are omitted from API requests. However, any field
7268	// with an empty value appearing in NullFields will be sent to the
7269	// server as null. It is an error if a field in this list has a
7270	// non-empty value. This may be used to include null fields in Patch
7271	// requests.
7272	NullFields []string `json:"-"`
7273}
7274
7275func (s *DynamicTargetingKeysListResponse) MarshalJSON() ([]byte, error) {
7276	type NoMethod DynamicTargetingKeysListResponse
7277	raw := NoMethod(*s)
7278	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7279}
7280
7281// EncryptionInfo: A description of how user IDs are encrypted.
7282type EncryptionInfo struct {
7283	// EncryptionEntityId: The encryption entity ID. This should match the
7284	// encryption configuration for ad serving or Data Transfer.
7285	EncryptionEntityId int64 `json:"encryptionEntityId,omitempty,string"`
7286
7287	// EncryptionEntityType: The encryption entity type. This should match
7288	// the encryption configuration for ad serving or Data Transfer.
7289	//
7290	// Possible values:
7291	//   "ENCRYPTION_ENTITY_TYPE_UNKNOWN"
7292	//   "DCM_ACCOUNT"
7293	//   "DCM_ADVERTISER"
7294	//   "DBM_PARTNER"
7295	//   "DBM_ADVERTISER"
7296	//   "ADWORDS_CUSTOMER"
7297	//   "DFP_NETWORK_CODE"
7298	EncryptionEntityType string `json:"encryptionEntityType,omitempty"`
7299
7300	// EncryptionSource: Describes whether the encrypted cookie was received
7301	// from ad serving (the %m macro) or from Data Transfer.
7302	//
7303	// Possible values:
7304	//   "ENCRYPTION_SCOPE_UNKNOWN"
7305	//   "AD_SERVING"
7306	//   "DATA_TRANSFER"
7307	EncryptionSource string `json:"encryptionSource,omitempty"`
7308
7309	// Kind: Identifies what kind of resource this is. Value: the fixed
7310	// string "dfareporting#encryptionInfo".
7311	Kind string `json:"kind,omitempty"`
7312
7313	// ForceSendFields is a list of field names (e.g. "EncryptionEntityId")
7314	// to unconditionally include in API requests. By default, fields with
7315	// empty values are omitted from API requests. However, any non-pointer,
7316	// non-interface field appearing in ForceSendFields will be sent to the
7317	// server regardless of whether the field is empty or not. This may be
7318	// used to include empty fields in Patch requests.
7319	ForceSendFields []string `json:"-"`
7320
7321	// NullFields is a list of field names (e.g. "EncryptionEntityId") to
7322	// include in API requests with the JSON null value. By default, fields
7323	// with empty values are omitted from API requests. However, any field
7324	// with an empty value appearing in NullFields will be sent to the
7325	// server as null. It is an error if a field in this list has a
7326	// non-empty value. This may be used to include null fields in Patch
7327	// requests.
7328	NullFields []string `json:"-"`
7329}
7330
7331func (s *EncryptionInfo) MarshalJSON() ([]byte, error) {
7332	type NoMethod EncryptionInfo
7333	raw := NoMethod(*s)
7334	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7335}
7336
7337// EventFilter: Represents a DfaReporting event filter.
7338type EventFilter struct {
7339	// DimensionFilter: The dimension filter contained within this
7340	// EventFilter.
7341	DimensionFilter *PathReportDimensionValue `json:"dimensionFilter,omitempty"`
7342
7343	// Kind: The kind of resource this is, in this case
7344	// dfareporting#eventFilter.
7345	Kind string `json:"kind,omitempty"`
7346
7347	// ForceSendFields is a list of field names (e.g. "DimensionFilter") to
7348	// unconditionally include in API requests. By default, fields with
7349	// empty values are omitted from API requests. However, any non-pointer,
7350	// non-interface field appearing in ForceSendFields will be sent to the
7351	// server regardless of whether the field is empty or not. This may be
7352	// used to include empty fields in Patch requests.
7353	ForceSendFields []string `json:"-"`
7354
7355	// NullFields is a list of field names (e.g. "DimensionFilter") to
7356	// include in API requests with the JSON null value. By default, fields
7357	// with empty values are omitted from API requests. However, any field
7358	// with an empty value appearing in NullFields will be sent to the
7359	// server as null. It is an error if a field in this list has a
7360	// non-empty value. This may be used to include null fields in Patch
7361	// requests.
7362	NullFields []string `json:"-"`
7363}
7364
7365func (s *EventFilter) MarshalJSON() ([]byte, error) {
7366	type NoMethod EventFilter
7367	raw := NoMethod(*s)
7368	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7369}
7370
7371// EventTag: Contains properties of an event tag.
7372type EventTag struct {
7373	// AccountId: Account ID of this event tag. This is a read-only field
7374	// that can be left blank.
7375	AccountId int64 `json:"accountId,omitempty,string"`
7376
7377	// AdvertiserId: Advertiser ID of this event tag. This field or the
7378	// campaignId field is required on insertion.
7379	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7380
7381	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7382	// advertiser. This is a read-only, auto-generated field.
7383	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7384
7385	// CampaignId: Campaign ID of this event tag. This field or the
7386	// advertiserId field is required on insertion.
7387	CampaignId int64 `json:"campaignId,omitempty,string"`
7388
7389	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
7390	// This is a read-only, auto-generated field.
7391	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
7392
7393	// EnabledByDefault: Whether this event tag should be automatically
7394	// enabled for all of the advertiser's campaigns and ads.
7395	EnabledByDefault bool `json:"enabledByDefault,omitempty"`
7396
7397	// ExcludeFromAdxRequests: Whether to remove this event tag from ads
7398	// that are trafficked through Display & Video 360 to Ad Exchange. This
7399	// may be useful if the event tag uses a pixel that is unapproved for Ad
7400	// Exchange bids on one or more networks, such as the Google Display
7401	// Network.
7402	ExcludeFromAdxRequests bool `json:"excludeFromAdxRequests,omitempty"`
7403
7404	// Id: ID of this event tag. This is a read-only, auto-generated field.
7405	Id int64 `json:"id,omitempty,string"`
7406
7407	// Kind: Identifies what kind of resource this is. Value: the fixed
7408	// string "dfareporting#eventTag".
7409	Kind string `json:"kind,omitempty"`
7410
7411	// Name: Name of this event tag. This is a required field and must be
7412	// less than 256 characters long.
7413	Name string `json:"name,omitempty"`
7414
7415	// SiteFilterType: Site filter type for this event tag. If no type is
7416	// specified then the event tag will be applied to all sites.
7417	//
7418	// Possible values:
7419	//   "WHITELIST"
7420	//   "BLACKLIST"
7421	SiteFilterType string `json:"siteFilterType,omitempty"`
7422
7423	// SiteIds: Filter list of site IDs associated with this event tag. The
7424	// siteFilterType determines whether this is a allowlist or blocklist
7425	// filter.
7426	SiteIds googleapi.Int64s `json:"siteIds,omitempty"`
7427
7428	// SslCompliant: Whether this tag is SSL-compliant or not. This is a
7429	// read-only field.
7430	SslCompliant bool `json:"sslCompliant,omitempty"`
7431
7432	// Status: Status of this event tag. Must be ENABLED for this event tag
7433	// to fire. This is a required field.
7434	//
7435	// Possible values:
7436	//   "ENABLED"
7437	//   "DISABLED"
7438	Status string `json:"status,omitempty"`
7439
7440	// SubaccountId: Subaccount ID of this event tag. This is a read-only
7441	// field that can be left blank.
7442	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7443
7444	// Type: Event tag type. Can be used to specify whether to use a
7445	// third-party pixel, a third-party JavaScript URL, or a third-party
7446	// click-through URL for either impression or click tracking. This is a
7447	// required field.
7448	//
7449	// Possible values:
7450	//   "IMPRESSION_IMAGE_EVENT_TAG"
7451	//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
7452	//   "CLICK_THROUGH_EVENT_TAG"
7453	Type string `json:"type,omitempty"`
7454
7455	// Url: Payload URL for this event tag. The URL on a click-through event
7456	// tag should have a landing page URL appended to the end of it. This
7457	// field is required on insertion.
7458	Url string `json:"url,omitempty"`
7459
7460	// UrlEscapeLevels: Number of times the landing page URL should be
7461	// URL-escaped before being appended to the click-through event tag URL.
7462	// Only applies to click-through event tags as specified by the event
7463	// tag type.
7464	UrlEscapeLevels int64 `json:"urlEscapeLevels,omitempty"`
7465
7466	// ServerResponse contains the HTTP response code and headers from the
7467	// server.
7468	googleapi.ServerResponse `json:"-"`
7469
7470	// ForceSendFields is a list of field names (e.g. "AccountId") to
7471	// unconditionally include in API requests. By default, fields with
7472	// empty values are omitted from API requests. However, any non-pointer,
7473	// non-interface field appearing in ForceSendFields will be sent to the
7474	// server regardless of whether the field is empty or not. This may be
7475	// used to include empty fields in Patch requests.
7476	ForceSendFields []string `json:"-"`
7477
7478	// NullFields is a list of field names (e.g. "AccountId") to include in
7479	// API requests with the JSON null value. By default, fields with empty
7480	// values are omitted from API requests. However, any field with an
7481	// empty value appearing in NullFields will be sent to the server as
7482	// null. It is an error if a field in this list has a non-empty value.
7483	// This may be used to include null fields in Patch requests.
7484	NullFields []string `json:"-"`
7485}
7486
7487func (s *EventTag) MarshalJSON() ([]byte, error) {
7488	type NoMethod EventTag
7489	raw := NoMethod(*s)
7490	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7491}
7492
7493// EventTagOverride: Event tag override information.
7494type EventTagOverride struct {
7495	// Enabled: Whether this override is enabled.
7496	Enabled bool `json:"enabled,omitempty"`
7497
7498	// Id: ID of this event tag override. This is a read-only,
7499	// auto-generated field.
7500	Id int64 `json:"id,omitempty,string"`
7501
7502	// ForceSendFields is a list of field names (e.g. "Enabled") to
7503	// unconditionally include in API requests. By default, fields with
7504	// empty values are omitted from API requests. However, any non-pointer,
7505	// non-interface field appearing in ForceSendFields will be sent to the
7506	// server regardless of whether the field is empty or not. This may be
7507	// used to include empty fields in Patch requests.
7508	ForceSendFields []string `json:"-"`
7509
7510	// NullFields is a list of field names (e.g. "Enabled") to include in
7511	// API requests with the JSON null value. By default, fields with empty
7512	// values are omitted from API requests. However, any field with an
7513	// empty value appearing in NullFields will be sent to the server as
7514	// null. It is an error if a field in this list has a non-empty value.
7515	// This may be used to include null fields in Patch requests.
7516	NullFields []string `json:"-"`
7517}
7518
7519func (s *EventTagOverride) MarshalJSON() ([]byte, error) {
7520	type NoMethod EventTagOverride
7521	raw := NoMethod(*s)
7522	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7523}
7524
7525// EventTagsListResponse: Event Tag List Response
7526type EventTagsListResponse struct {
7527	// EventTags: Event tag collection.
7528	EventTags []*EventTag `json:"eventTags,omitempty"`
7529
7530	// Kind: Identifies what kind of resource this is. Value: the fixed
7531	// string "dfareporting#eventTagsListResponse".
7532	Kind string `json:"kind,omitempty"`
7533
7534	// ServerResponse contains the HTTP response code and headers from the
7535	// server.
7536	googleapi.ServerResponse `json:"-"`
7537
7538	// ForceSendFields is a list of field names (e.g. "EventTags") to
7539	// unconditionally include in API requests. By default, fields with
7540	// empty values are omitted from API requests. However, any non-pointer,
7541	// non-interface field appearing in ForceSendFields will be sent to the
7542	// server regardless of whether the field is empty or not. This may be
7543	// used to include empty fields in Patch requests.
7544	ForceSendFields []string `json:"-"`
7545
7546	// NullFields is a list of field names (e.g. "EventTags") to include in
7547	// API requests with the JSON null value. By default, fields with empty
7548	// values are omitted from API requests. However, any field with an
7549	// empty value appearing in NullFields will be sent to the server as
7550	// null. It is an error if a field in this list has a non-empty value.
7551	// This may be used to include null fields in Patch requests.
7552	NullFields []string `json:"-"`
7553}
7554
7555func (s *EventTagsListResponse) MarshalJSON() ([]byte, error) {
7556	type NoMethod EventTagsListResponse
7557	raw := NoMethod(*s)
7558	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7559}
7560
7561// File: Represents a File resource. A file contains the metadata for a
7562// report run. It shows the status of the run and holds the URLs to the
7563// generated report data if the run is finished and the status is
7564// "REPORT_AVAILABLE".
7565type File struct {
7566	// DateRange: The date range for which the file has report data. The
7567	// date range will always be the absolute date range for which the
7568	// report is run.
7569	DateRange *DateRange `json:"dateRange,omitempty"`
7570
7571	// Etag: Etag of this resource.
7572	Etag string `json:"etag,omitempty"`
7573
7574	// FileName: The filename of the file.
7575	FileName string `json:"fileName,omitempty"`
7576
7577	// Format: The output format of the report. Only available once the file
7578	// is available.
7579	//
7580	// Possible values:
7581	//   "CSV"
7582	//   "EXCEL"
7583	Format string `json:"format,omitempty"`
7584
7585	// Id: The unique ID of this report file.
7586	Id int64 `json:"id,omitempty,string"`
7587
7588	// Kind: Identifies what kind of resource this is. Value: the fixed
7589	// string "dfareporting#file".
7590	Kind string `json:"kind,omitempty"`
7591
7592	// LastModifiedTime: The timestamp in milliseconds since epoch when this
7593	// file was last modified.
7594	LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"`
7595
7596	// ReportId: The ID of the report this file was generated from.
7597	ReportId int64 `json:"reportId,omitempty,string"`
7598
7599	// Status: The status of the report file.
7600	//
7601	// Possible values:
7602	//   "PROCESSING"
7603	//   "REPORT_AVAILABLE"
7604	//   "FAILED"
7605	//   "CANCELLED"
7606	Status string `json:"status,omitempty"`
7607
7608	// Urls: The URLs where the completed report file can be downloaded.
7609	Urls *FileUrls `json:"urls,omitempty"`
7610
7611	// ServerResponse contains the HTTP response code and headers from the
7612	// server.
7613	googleapi.ServerResponse `json:"-"`
7614
7615	// ForceSendFields is a list of field names (e.g. "DateRange") to
7616	// unconditionally include in API requests. By default, fields with
7617	// empty values are omitted from API requests. However, any non-pointer,
7618	// non-interface field appearing in ForceSendFields will be sent to the
7619	// server regardless of whether the field is empty or not. This may be
7620	// used to include empty fields in Patch requests.
7621	ForceSendFields []string `json:"-"`
7622
7623	// NullFields is a list of field names (e.g. "DateRange") to include in
7624	// API requests with the JSON null value. By default, fields with empty
7625	// values are omitted from API requests. However, any field with an
7626	// empty value appearing in NullFields will be sent to the server as
7627	// null. It is an error if a field in this list has a non-empty value.
7628	// This may be used to include null fields in Patch requests.
7629	NullFields []string `json:"-"`
7630}
7631
7632func (s *File) MarshalJSON() ([]byte, error) {
7633	type NoMethod File
7634	raw := NoMethod(*s)
7635	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7636}
7637
7638// FileUrls: The URLs where the completed report file can be downloaded.
7639type FileUrls struct {
7640	// ApiUrl: The URL for downloading the report data through the API.
7641	ApiUrl string `json:"apiUrl,omitempty"`
7642
7643	// BrowserUrl: The URL for downloading the report data through a
7644	// browser.
7645	BrowserUrl string `json:"browserUrl,omitempty"`
7646
7647	// ForceSendFields is a list of field names (e.g. "ApiUrl") to
7648	// unconditionally include in API requests. By default, fields with
7649	// empty values are omitted from API requests. However, any non-pointer,
7650	// non-interface field appearing in ForceSendFields will be sent to the
7651	// server regardless of whether the field is empty or not. This may be
7652	// used to include empty fields in Patch requests.
7653	ForceSendFields []string `json:"-"`
7654
7655	// NullFields is a list of field names (e.g. "ApiUrl") to include in API
7656	// requests with the JSON null value. By default, fields with empty
7657	// values are omitted from API requests. However, any field with an
7658	// empty value appearing in NullFields will be sent to the server as
7659	// null. It is an error if a field in this list has a non-empty value.
7660	// This may be used to include null fields in Patch requests.
7661	NullFields []string `json:"-"`
7662}
7663
7664func (s *FileUrls) MarshalJSON() ([]byte, error) {
7665	type NoMethod FileUrls
7666	raw := NoMethod(*s)
7667	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7668}
7669
7670// FileList: List of files for a report.
7671type FileList struct {
7672	// Etag: Etag of this resource.
7673	Etag string `json:"etag,omitempty"`
7674
7675	// Items: The files returned in this response.
7676	Items []*File `json:"items,omitempty"`
7677
7678	// Kind: Identifies what kind of resource this is. Value: the fixed
7679	// string "dfareporting#fileList".
7680	Kind string `json:"kind,omitempty"`
7681
7682	// NextPageToken: Continuation token used to page through files. To
7683	// retrieve the next page of results, set the next request's "pageToken"
7684	// to the value of this field. The page token is only valid for a
7685	// limited amount of time and should not be persisted.
7686	NextPageToken string `json:"nextPageToken,omitempty"`
7687
7688	// ServerResponse contains the HTTP response code and headers from the
7689	// server.
7690	googleapi.ServerResponse `json:"-"`
7691
7692	// ForceSendFields is a list of field names (e.g. "Etag") to
7693	// unconditionally include in API requests. By default, fields with
7694	// empty values are omitted from API requests. However, any non-pointer,
7695	// non-interface field appearing in ForceSendFields will be sent to the
7696	// server regardless of whether the field is empty or not. This may be
7697	// used to include empty fields in Patch requests.
7698	ForceSendFields []string `json:"-"`
7699
7700	// NullFields is a list of field names (e.g. "Etag") to include in API
7701	// requests with the JSON null value. By default, fields with empty
7702	// values are omitted from API requests. However, any field with an
7703	// empty value appearing in NullFields will be sent to the server as
7704	// null. It is an error if a field in this list has a non-empty value.
7705	// This may be used to include null fields in Patch requests.
7706	NullFields []string `json:"-"`
7707}
7708
7709func (s *FileList) MarshalJSON() ([]byte, error) {
7710	type NoMethod FileList
7711	raw := NoMethod(*s)
7712	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7713}
7714
7715// Flight: Flight
7716type Flight struct {
7717	EndDate string `json:"endDate,omitempty"`
7718
7719	// RateOrCost: Rate or cost of this flight.
7720	RateOrCost int64 `json:"rateOrCost,omitempty,string"`
7721
7722	StartDate string `json:"startDate,omitempty"`
7723
7724	// Units: Units of this flight.
7725	Units int64 `json:"units,omitempty,string"`
7726
7727	// ForceSendFields is a list of field names (e.g. "EndDate") to
7728	// unconditionally include in API requests. By default, fields with
7729	// empty values are omitted from API requests. However, any non-pointer,
7730	// non-interface field appearing in ForceSendFields will be sent to the
7731	// server regardless of whether the field is empty or not. This may be
7732	// used to include empty fields in Patch requests.
7733	ForceSendFields []string `json:"-"`
7734
7735	// NullFields is a list of field names (e.g. "EndDate") to include in
7736	// API requests with the JSON null value. By default, fields with empty
7737	// values are omitted from API requests. However, any field with an
7738	// empty value appearing in NullFields will be sent to the server as
7739	// null. It is an error if a field in this list has a non-empty value.
7740	// This may be used to include null fields in Patch requests.
7741	NullFields []string `json:"-"`
7742}
7743
7744func (s *Flight) MarshalJSON() ([]byte, error) {
7745	type NoMethod Flight
7746	raw := NoMethod(*s)
7747	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7748}
7749
7750// FloodlightActivitiesGenerateTagResponse: Floodlight Activity
7751// GenerateTag Response
7752type FloodlightActivitiesGenerateTagResponse struct {
7753	// FloodlightActivityTag: Generated tag for this Floodlight activity.
7754	// For global site tags, this is the event snippet.
7755	FloodlightActivityTag string `json:"floodlightActivityTag,omitempty"`
7756
7757	// GlobalSiteTagGlobalSnippet: The global snippet section of a global
7758	// site tag. The global site tag sets new cookies on your domain, which
7759	// will store a unique identifier for a user or the ad click that
7760	// brought the user to your site. Learn more.
7761	GlobalSiteTagGlobalSnippet string `json:"globalSiteTagGlobalSnippet,omitempty"`
7762
7763	// Kind: Identifies what kind of resource this is. Value: the fixed
7764	// string "dfareporting#floodlightActivitiesGenerateTagResponse".
7765	Kind string `json:"kind,omitempty"`
7766
7767	// ServerResponse contains the HTTP response code and headers from the
7768	// server.
7769	googleapi.ServerResponse `json:"-"`
7770
7771	// ForceSendFields is a list of field names (e.g.
7772	// "FloodlightActivityTag") to unconditionally include in API requests.
7773	// By default, fields with empty values are omitted from API requests.
7774	// However, any non-pointer, non-interface field appearing in
7775	// ForceSendFields will be sent to the server regardless of whether the
7776	// field is empty or not. This may be used to include empty fields in
7777	// Patch requests.
7778	ForceSendFields []string `json:"-"`
7779
7780	// NullFields is a list of field names (e.g. "FloodlightActivityTag") to
7781	// include in API requests with the JSON null value. By default, fields
7782	// with empty values are omitted from API requests. However, any field
7783	// with an empty value appearing in NullFields will be sent to the
7784	// server as null. It is an error if a field in this list has a
7785	// non-empty value. This may be used to include null fields in Patch
7786	// requests.
7787	NullFields []string `json:"-"`
7788}
7789
7790func (s *FloodlightActivitiesGenerateTagResponse) MarshalJSON() ([]byte, error) {
7791	type NoMethod FloodlightActivitiesGenerateTagResponse
7792	raw := NoMethod(*s)
7793	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7794}
7795
7796// FloodlightActivitiesListResponse: Floodlight Activity List Response
7797type FloodlightActivitiesListResponse struct {
7798	// FloodlightActivities: Floodlight activity collection.
7799	FloodlightActivities []*FloodlightActivity `json:"floodlightActivities,omitempty"`
7800
7801	// Kind: Identifies what kind of resource this is. Value: the fixed
7802	// string "dfareporting#floodlightActivitiesListResponse".
7803	Kind string `json:"kind,omitempty"`
7804
7805	// NextPageToken: Pagination token to be used for the next list
7806	// operation.
7807	NextPageToken string `json:"nextPageToken,omitempty"`
7808
7809	// ServerResponse contains the HTTP response code and headers from the
7810	// server.
7811	googleapi.ServerResponse `json:"-"`
7812
7813	// ForceSendFields is a list of field names (e.g.
7814	// "FloodlightActivities") to unconditionally include in API requests.
7815	// By default, fields with empty values are omitted from API requests.
7816	// However, any non-pointer, non-interface field appearing in
7817	// ForceSendFields will be sent to the server regardless of whether the
7818	// field is empty or not. This may be used to include empty fields in
7819	// Patch requests.
7820	ForceSendFields []string `json:"-"`
7821
7822	// NullFields is a list of field names (e.g. "FloodlightActivities") to
7823	// include in API requests with the JSON null value. By default, fields
7824	// with empty values are omitted from API requests. However, any field
7825	// with an empty value appearing in NullFields will be sent to the
7826	// server as null. It is an error if a field in this list has a
7827	// non-empty value. This may be used to include null fields in Patch
7828	// requests.
7829	NullFields []string `json:"-"`
7830}
7831
7832func (s *FloodlightActivitiesListResponse) MarshalJSON() ([]byte, error) {
7833	type NoMethod FloodlightActivitiesListResponse
7834	raw := NoMethod(*s)
7835	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7836}
7837
7838// FloodlightActivity: Contains properties of a Floodlight activity.
7839type FloodlightActivity struct {
7840	// AccountId: Account ID of this floodlight activity. This is a
7841	// read-only field that can be left blank.
7842	AccountId int64 `json:"accountId,omitempty,string"`
7843
7844	// AdvertiserId: Advertiser ID of this floodlight activity. If this
7845	// field is left blank, the value will be copied over either from the
7846	// activity group's advertiser or the existing activity's advertiser.
7847	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7848
7849	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7850	// advertiser. This is a read-only, auto-generated field.
7851	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7852
7853	// AttributionEnabled: Whether the activity is enabled for attribution.
7854	AttributionEnabled bool `json:"attributionEnabled,omitempty"`
7855
7856	// CacheBustingType: Code type used for cache busting in the generated
7857	// tag. Applicable only when floodlightActivityGroupType is COUNTER and
7858	// countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING.
7859	//
7860	// Possible values:
7861	//   "JAVASCRIPT"
7862	//   "ACTIVE_SERVER_PAGE"
7863	//   "JSP"
7864	//   "PHP"
7865	//   "COLD_FUSION"
7866	CacheBustingType string `json:"cacheBustingType,omitempty"`
7867
7868	// CountingMethod: Counting method for conversions for this floodlight
7869	// activity. This is a required field.
7870	//
7871	// Possible values:
7872	//   "STANDARD_COUNTING"
7873	//   "UNIQUE_COUNTING"
7874	//   "SESSION_COUNTING"
7875	//   "TRANSACTIONS_COUNTING"
7876	//   "ITEMS_SOLD_COUNTING"
7877	CountingMethod string `json:"countingMethod,omitempty"`
7878
7879	// DefaultTags: Dynamic floodlight tags.
7880	DefaultTags []*FloodlightActivityDynamicTag `json:"defaultTags,omitempty"`
7881
7882	// ExpectedUrl: URL where this tag will be deployed. If specified, must
7883	// be less than 256 characters long.
7884	ExpectedUrl string `json:"expectedUrl,omitempty"`
7885
7886	// FloodlightActivityGroupId: Floodlight activity group ID of this
7887	// floodlight activity. This is a required field.
7888	FloodlightActivityGroupId int64 `json:"floodlightActivityGroupId,omitempty,string"`
7889
7890	// FloodlightActivityGroupName: Name of the associated floodlight
7891	// activity group. This is a read-only field.
7892	FloodlightActivityGroupName string `json:"floodlightActivityGroupName,omitempty"`
7893
7894	// FloodlightActivityGroupTagString: Tag string of the associated
7895	// floodlight activity group. This is a read-only field.
7896	FloodlightActivityGroupTagString string `json:"floodlightActivityGroupTagString,omitempty"`
7897
7898	// FloodlightActivityGroupType: Type of the associated floodlight
7899	// activity group. This is a read-only field.
7900	//
7901	// Possible values:
7902	//   "COUNTER"
7903	//   "SALE"
7904	FloodlightActivityGroupType string `json:"floodlightActivityGroupType,omitempty"`
7905
7906	// FloodlightConfigurationId: Floodlight configuration ID of this
7907	// floodlight activity. If this field is left blank, the value will be
7908	// copied over either from the activity group's floodlight configuration
7909	// or from the existing activity's floodlight configuration.
7910	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7911
7912	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7913	// of the floodlight configuration. This is a read-only, auto-generated
7914	// field.
7915	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7916
7917	// FloodlightTagType: The type of Floodlight tag this activity will
7918	// generate. This is a required field.
7919	//
7920	// Possible values:
7921	//   "IFRAME"
7922	//   "IMAGE"
7923	//   "GLOBAL_SITE_TAG"
7924	FloodlightTagType string `json:"floodlightTagType,omitempty"`
7925
7926	// Id: ID of this floodlight activity. This is a read-only,
7927	// auto-generated field.
7928	Id int64 `json:"id,omitempty,string"`
7929
7930	// IdDimensionValue: Dimension value for the ID of this floodlight
7931	// activity. This is a read-only, auto-generated field.
7932	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7933
7934	// Kind: Identifies what kind of resource this is. Value: the fixed
7935	// string "dfareporting#floodlightActivity".
7936	Kind string `json:"kind,omitempty"`
7937
7938	// Name: Name of this floodlight activity. This is a required field.
7939	// Must be less than 129 characters long and cannot contain quotes.
7940	Name string `json:"name,omitempty"`
7941
7942	// Notes: General notes or implementation instructions for the tag.
7943	Notes string `json:"notes,omitempty"`
7944
7945	// PublisherTags: Publisher dynamic floodlight tags.
7946	PublisherTags []*FloodlightActivityPublisherDynamicTag `json:"publisherTags,omitempty"`
7947
7948	// Secure: Whether this tag should use SSL.
7949	Secure bool `json:"secure,omitempty"`
7950
7951	// SslCompliant: Whether the floodlight activity is SSL-compliant. This
7952	// is a read-only field, its value detected by the system from the
7953	// floodlight tags.
7954	SslCompliant bool `json:"sslCompliant,omitempty"`
7955
7956	// SslRequired: Whether this floodlight activity must be SSL-compliant.
7957	SslRequired bool `json:"sslRequired,omitempty"`
7958
7959	// Status: The status of the activity. This can only be set to ACTIVE or
7960	// ARCHIVED_AND_DISABLED. The ARCHIVED status is no longer supported and
7961	// cannot be set for Floodlight activities. The DISABLED_POLICY status
7962	// indicates that a Floodlight activity is violating Google policy.
7963	// Contact your account manager for more information.
7964	//
7965	// Possible values:
7966	//   "ACTIVE"
7967	//   "ARCHIVED_AND_DISABLED"
7968	//   "ARCHIVED"
7969	//   "DISABLED_POLICY"
7970	Status string `json:"status,omitempty"`
7971
7972	// SubaccountId: Subaccount ID of this floodlight activity. This is a
7973	// read-only field that can be left blank.
7974	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7975
7976	// TagFormat: Tag format type for the floodlight activity. If left
7977	// blank, the tag format will default to HTML.
7978	//
7979	// Possible values:
7980	//   "HTML"
7981	//   "XHTML"
7982	TagFormat string `json:"tagFormat,omitempty"`
7983
7984	// TagString: Value of the cat= parameter in the floodlight tag, which
7985	// the ad servers use to identify the activity. This is optional: if
7986	// empty, a new tag string will be generated for you. This string must
7987	// be 1 to 8 characters long, with valid characters being a-z0-9[ _ ].
7988	// This tag string must also be unique among activities of the same
7989	// activity group. This field is read-only after insertion.
7990	TagString string `json:"tagString,omitempty"`
7991
7992	// UserDefinedVariableTypes: List of the user-defined variables used by
7993	// this conversion tag. These map to the "u[1-100]=" in the tags. Each
7994	// of these can have a user defined type. Acceptable values are U1 to
7995	// U100, inclusive.
7996	//
7997	// Possible values:
7998	//   "U1"
7999	//   "U2"
8000	//   "U3"
8001	//   "U4"
8002	//   "U5"
8003	//   "U6"
8004	//   "U7"
8005	//   "U8"
8006	//   "U9"
8007	//   "U10"
8008	//   "U11"
8009	//   "U12"
8010	//   "U13"
8011	//   "U14"
8012	//   "U15"
8013	//   "U16"
8014	//   "U17"
8015	//   "U18"
8016	//   "U19"
8017	//   "U20"
8018	//   "U21"
8019	//   "U22"
8020	//   "U23"
8021	//   "U24"
8022	//   "U25"
8023	//   "U26"
8024	//   "U27"
8025	//   "U28"
8026	//   "U29"
8027	//   "U30"
8028	//   "U31"
8029	//   "U32"
8030	//   "U33"
8031	//   "U34"
8032	//   "U35"
8033	//   "U36"
8034	//   "U37"
8035	//   "U38"
8036	//   "U39"
8037	//   "U40"
8038	//   "U41"
8039	//   "U42"
8040	//   "U43"
8041	//   "U44"
8042	//   "U45"
8043	//   "U46"
8044	//   "U47"
8045	//   "U48"
8046	//   "U49"
8047	//   "U50"
8048	//   "U51"
8049	//   "U52"
8050	//   "U53"
8051	//   "U54"
8052	//   "U55"
8053	//   "U56"
8054	//   "U57"
8055	//   "U58"
8056	//   "U59"
8057	//   "U60"
8058	//   "U61"
8059	//   "U62"
8060	//   "U63"
8061	//   "U64"
8062	//   "U65"
8063	//   "U66"
8064	//   "U67"
8065	//   "U68"
8066	//   "U69"
8067	//   "U70"
8068	//   "U71"
8069	//   "U72"
8070	//   "U73"
8071	//   "U74"
8072	//   "U75"
8073	//   "U76"
8074	//   "U77"
8075	//   "U78"
8076	//   "U79"
8077	//   "U80"
8078	//   "U81"
8079	//   "U82"
8080	//   "U83"
8081	//   "U84"
8082	//   "U85"
8083	//   "U86"
8084	//   "U87"
8085	//   "U88"
8086	//   "U89"
8087	//   "U90"
8088	//   "U91"
8089	//   "U92"
8090	//   "U93"
8091	//   "U94"
8092	//   "U95"
8093	//   "U96"
8094	//   "U97"
8095	//   "U98"
8096	//   "U99"
8097	//   "U100"
8098	UserDefinedVariableTypes []string `json:"userDefinedVariableTypes,omitempty"`
8099
8100	// ServerResponse contains the HTTP response code and headers from the
8101	// server.
8102	googleapi.ServerResponse `json:"-"`
8103
8104	// ForceSendFields is a list of field names (e.g. "AccountId") to
8105	// unconditionally include in API requests. By default, fields with
8106	// empty values are omitted from API requests. However, any non-pointer,
8107	// non-interface field appearing in ForceSendFields will be sent to the
8108	// server regardless of whether the field is empty or not. This may be
8109	// used to include empty fields in Patch requests.
8110	ForceSendFields []string `json:"-"`
8111
8112	// NullFields is a list of field names (e.g. "AccountId") to include in
8113	// API requests with the JSON null value. By default, fields with empty
8114	// values are omitted from API requests. However, any field with an
8115	// empty value appearing in NullFields will be sent to the server as
8116	// null. It is an error if a field in this list has a non-empty value.
8117	// This may be used to include null fields in Patch requests.
8118	NullFields []string `json:"-"`
8119}
8120
8121func (s *FloodlightActivity) MarshalJSON() ([]byte, error) {
8122	type NoMethod FloodlightActivity
8123	raw := NoMethod(*s)
8124	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8125}
8126
8127// FloodlightActivityDynamicTag: Dynamic Tag
8128type FloodlightActivityDynamicTag struct {
8129	// Id: ID of this dynamic tag. This is a read-only, auto-generated
8130	// field.
8131	Id int64 `json:"id,omitempty,string"`
8132
8133	// Name: Name of this tag.
8134	Name string `json:"name,omitempty"`
8135
8136	// Tag: Tag code.
8137	Tag string `json:"tag,omitempty"`
8138
8139	// ForceSendFields is a list of field names (e.g. "Id") to
8140	// unconditionally include in API requests. By default, fields with
8141	// empty values are omitted from API requests. However, any non-pointer,
8142	// non-interface field appearing in ForceSendFields will be sent to the
8143	// server regardless of whether the field is empty or not. This may be
8144	// used to include empty fields in Patch requests.
8145	ForceSendFields []string `json:"-"`
8146
8147	// NullFields is a list of field names (e.g. "Id") to include in API
8148	// requests with the JSON null value. By default, fields with empty
8149	// values are omitted from API requests. However, any field with an
8150	// empty value appearing in NullFields will be sent to the server as
8151	// null. It is an error if a field in this list has a non-empty value.
8152	// This may be used to include null fields in Patch requests.
8153	NullFields []string `json:"-"`
8154}
8155
8156func (s *FloodlightActivityDynamicTag) MarshalJSON() ([]byte, error) {
8157	type NoMethod FloodlightActivityDynamicTag
8158	raw := NoMethod(*s)
8159	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8160}
8161
8162// FloodlightActivityGroup: Contains properties of a Floodlight activity
8163// group.
8164type FloodlightActivityGroup struct {
8165	// AccountId: Account ID of this floodlight activity group. This is a
8166	// read-only field that can be left blank.
8167	AccountId int64 `json:"accountId,omitempty,string"`
8168
8169	// AdvertiserId: Advertiser ID of this floodlight activity group. If
8170	// this field is left blank, the value will be copied over either from
8171	// the floodlight configuration's advertiser or from the existing
8172	// activity group's advertiser.
8173	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8174
8175	// AdvertiserIdDimensionValue: Dimension value for the ID of the
8176	// advertiser. This is a read-only, auto-generated field.
8177	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
8178
8179	// FloodlightConfigurationId: Floodlight configuration ID of this
8180	// floodlight activity group. This is a required field.
8181	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
8182
8183	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
8184	// of the floodlight configuration. This is a read-only, auto-generated
8185	// field.
8186	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
8187
8188	// Id: ID of this floodlight activity group. This is a read-only,
8189	// auto-generated field.
8190	Id int64 `json:"id,omitempty,string"`
8191
8192	// IdDimensionValue: Dimension value for the ID of this floodlight
8193	// activity group. This is a read-only, auto-generated field.
8194	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
8195
8196	// Kind: Identifies what kind of resource this is. Value: the fixed
8197	// string "dfareporting#floodlightActivityGroup".
8198	Kind string `json:"kind,omitempty"`
8199
8200	// Name: Name of this floodlight activity group. This is a required
8201	// field. Must be less than 65 characters long and cannot contain
8202	// quotes.
8203	Name string `json:"name,omitempty"`
8204
8205	// SubaccountId: Subaccount ID of this floodlight activity group. This
8206	// is a read-only field that can be left blank.
8207	SubaccountId int64 `json:"subaccountId,omitempty,string"`
8208
8209	// TagString: Value of the type= parameter in the floodlight tag, which
8210	// the ad servers use to identify the activity group that the activity
8211	// belongs to. This is optional: if empty, a new tag string will be
8212	// generated for you. This string must be 1 to 8 characters long, with
8213	// valid characters being a-z0-9[ _ ]. This tag string must also be
8214	// unique among activity groups of the same floodlight configuration.
8215	// This field is read-only after insertion.
8216	TagString string `json:"tagString,omitempty"`
8217
8218	// Type: Type of the floodlight activity group. This is a required field
8219	// that is read-only after insertion.
8220	//
8221	// Possible values:
8222	//   "COUNTER"
8223	//   "SALE"
8224	Type string `json:"type,omitempty"`
8225
8226	// ServerResponse contains the HTTP response code and headers from the
8227	// server.
8228	googleapi.ServerResponse `json:"-"`
8229
8230	// ForceSendFields is a list of field names (e.g. "AccountId") to
8231	// unconditionally include in API requests. By default, fields with
8232	// empty values are omitted from API requests. However, any non-pointer,
8233	// non-interface field appearing in ForceSendFields will be sent to the
8234	// server regardless of whether the field is empty or not. This may be
8235	// used to include empty fields in Patch requests.
8236	ForceSendFields []string `json:"-"`
8237
8238	// NullFields is a list of field names (e.g. "AccountId") to include in
8239	// API requests with the JSON null value. By default, fields with empty
8240	// values are omitted from API requests. However, any field with an
8241	// empty value appearing in NullFields will be sent to the server as
8242	// null. It is an error if a field in this list has a non-empty value.
8243	// This may be used to include null fields in Patch requests.
8244	NullFields []string `json:"-"`
8245}
8246
8247func (s *FloodlightActivityGroup) MarshalJSON() ([]byte, error) {
8248	type NoMethod FloodlightActivityGroup
8249	raw := NoMethod(*s)
8250	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8251}
8252
8253// FloodlightActivityGroupsListResponse: Floodlight Activity Group List
8254// Response
8255type FloodlightActivityGroupsListResponse struct {
8256	// FloodlightActivityGroups: Floodlight activity group collection.
8257	FloodlightActivityGroups []*FloodlightActivityGroup `json:"floodlightActivityGroups,omitempty"`
8258
8259	// Kind: Identifies what kind of resource this is. Value: the fixed
8260	// string "dfareporting#floodlightActivityGroupsListResponse".
8261	Kind string `json:"kind,omitempty"`
8262
8263	// NextPageToken: Pagination token to be used for the next list
8264	// operation.
8265	NextPageToken string `json:"nextPageToken,omitempty"`
8266
8267	// ServerResponse contains the HTTP response code and headers from the
8268	// server.
8269	googleapi.ServerResponse `json:"-"`
8270
8271	// ForceSendFields is a list of field names (e.g.
8272	// "FloodlightActivityGroups") to unconditionally include in API
8273	// requests. By default, fields with empty values are omitted from API
8274	// requests. However, any non-pointer, non-interface field appearing in
8275	// ForceSendFields will be sent to the server regardless of whether the
8276	// field is empty or not. This may be used to include empty fields in
8277	// Patch requests.
8278	ForceSendFields []string `json:"-"`
8279
8280	// NullFields is a list of field names (e.g. "FloodlightActivityGroups")
8281	// to include in API requests with the JSON null value. By default,
8282	// fields with empty values are omitted from API requests. However, any
8283	// field with an empty value appearing in NullFields will be sent to the
8284	// server as null. It is an error if a field in this list has a
8285	// non-empty value. This may be used to include null fields in Patch
8286	// requests.
8287	NullFields []string `json:"-"`
8288}
8289
8290func (s *FloodlightActivityGroupsListResponse) MarshalJSON() ([]byte, error) {
8291	type NoMethod FloodlightActivityGroupsListResponse
8292	raw := NoMethod(*s)
8293	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8294}
8295
8296// FloodlightActivityPublisherDynamicTag: Publisher Dynamic Tag
8297type FloodlightActivityPublisherDynamicTag struct {
8298	// ClickThrough: Whether this tag is applicable only for click-throughs.
8299	ClickThrough bool `json:"clickThrough,omitempty"`
8300
8301	// DirectorySiteId: Directory site ID of this dynamic tag. This is a
8302	// write-only field that can be used as an alternative to the siteId
8303	// field. When this resource is retrieved, only the siteId field will be
8304	// populated.
8305	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
8306
8307	// DynamicTag: Dynamic floodlight tag.
8308	DynamicTag *FloodlightActivityDynamicTag `json:"dynamicTag,omitempty"`
8309
8310	// SiteId: Site ID of this dynamic tag.
8311	SiteId int64 `json:"siteId,omitempty,string"`
8312
8313	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
8314	// a read-only, auto-generated field.
8315	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
8316
8317	// ViewThrough: Whether this tag is applicable only for view-throughs.
8318	ViewThrough bool `json:"viewThrough,omitempty"`
8319
8320	// ForceSendFields is a list of field names (e.g. "ClickThrough") to
8321	// unconditionally include in API requests. By default, fields with
8322	// empty values are omitted from API requests. However, any non-pointer,
8323	// non-interface field appearing in ForceSendFields will be sent to the
8324	// server regardless of whether the field is empty or not. This may be
8325	// used to include empty fields in Patch requests.
8326	ForceSendFields []string `json:"-"`
8327
8328	// NullFields is a list of field names (e.g. "ClickThrough") to include
8329	// in API requests with the JSON null value. By default, fields with
8330	// empty values are omitted from API requests. However, any field with
8331	// an empty value appearing in NullFields will be sent to the server as
8332	// null. It is an error if a field in this list has a non-empty value.
8333	// This may be used to include null fields in Patch requests.
8334	NullFields []string `json:"-"`
8335}
8336
8337func (s *FloodlightActivityPublisherDynamicTag) MarshalJSON() ([]byte, error) {
8338	type NoMethod FloodlightActivityPublisherDynamicTag
8339	raw := NoMethod(*s)
8340	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8341}
8342
8343// FloodlightConfiguration: Contains properties of a Floodlight
8344// configuration.
8345type FloodlightConfiguration struct {
8346	// AccountId: Account ID of this floodlight configuration. This is a
8347	// read-only field that can be left blank.
8348	AccountId int64 `json:"accountId,omitempty,string"`
8349
8350	// AdvertiserId: Advertiser ID of the parent advertiser of this
8351	// floodlight configuration.
8352	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8353
8354	// AdvertiserIdDimensionValue: Dimension value for the ID of the
8355	// advertiser. This is a read-only, auto-generated field.
8356	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
8357
8358	// AnalyticsDataSharingEnabled: Whether advertiser data is shared with
8359	// Google Analytics.
8360	AnalyticsDataSharingEnabled bool `json:"analyticsDataSharingEnabled,omitempty"`
8361
8362	// CustomViewabilityMetric: Custom Viewability metric for the floodlight
8363	// configuration.
8364	CustomViewabilityMetric *CustomViewabilityMetric `json:"customViewabilityMetric,omitempty"`
8365
8366	// ExposureToConversionEnabled: Whether the exposure-to-conversion
8367	// report is enabled. This report shows detailed pathway information on
8368	// up to 10 of the most recent ad exposures seen by a user before
8369	// converting.
8370	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
8371
8372	// FirstDayOfWeek: Day that will be counted as the first day of the week
8373	// in reports. This is a required field.
8374	//
8375	// Possible values:
8376	//   "MONDAY"
8377	//   "SUNDAY"
8378	FirstDayOfWeek string `json:"firstDayOfWeek,omitempty"`
8379
8380	// Id: ID of this floodlight configuration. This is a read-only,
8381	// auto-generated field.
8382	Id int64 `json:"id,omitempty,string"`
8383
8384	// IdDimensionValue: Dimension value for the ID of this floodlight
8385	// configuration. This is a read-only, auto-generated field.
8386	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
8387
8388	// InAppAttributionTrackingEnabled: Whether in-app attribution tracking
8389	// is enabled.
8390	InAppAttributionTrackingEnabled bool `json:"inAppAttributionTrackingEnabled,omitempty"`
8391
8392	// Kind: Identifies what kind of resource this is. Value: the fixed
8393	// string "dfareporting#floodlightConfiguration".
8394	Kind string `json:"kind,omitempty"`
8395
8396	// LookbackConfiguration: Lookback window settings for this floodlight
8397	// configuration.
8398	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
8399
8400	// NaturalSearchConversionAttributionOption: Types of attribution
8401	// options for natural search conversions.
8402	//
8403	// Possible values:
8404	//   "EXCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
8405	//   "INCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
8406	//   "INCLUDE_NATURAL_SEARCH_TIERED_CONVERSION_ATTRIBUTION"
8407	NaturalSearchConversionAttributionOption string `json:"naturalSearchConversionAttributionOption,omitempty"`
8408
8409	// OmnitureSettings: Settings for Campaign Manager Omniture integration.
8410	OmnitureSettings *OmnitureSettings `json:"omnitureSettings,omitempty"`
8411
8412	// SubaccountId: Subaccount ID of this floodlight configuration. This is
8413	// a read-only field that can be left blank.
8414	SubaccountId int64 `json:"subaccountId,omitempty,string"`
8415
8416	// TagSettings: Configuration settings for dynamic and image floodlight
8417	// tags.
8418	TagSettings *TagSettings `json:"tagSettings,omitempty"`
8419
8420	// ThirdPartyAuthenticationTokens: List of third-party authentication
8421	// tokens enabled for this configuration.
8422	ThirdPartyAuthenticationTokens []*ThirdPartyAuthenticationToken `json:"thirdPartyAuthenticationTokens,omitempty"`
8423
8424	// UserDefinedVariableConfigurations: List of user defined variables
8425	// enabled for this configuration.
8426	UserDefinedVariableConfigurations []*UserDefinedVariableConfiguration `json:"userDefinedVariableConfigurations,omitempty"`
8427
8428	// ServerResponse contains the HTTP response code and headers from the
8429	// server.
8430	googleapi.ServerResponse `json:"-"`
8431
8432	// ForceSendFields is a list of field names (e.g. "AccountId") to
8433	// unconditionally include in API requests. By default, fields with
8434	// empty values are omitted from API requests. However, any non-pointer,
8435	// non-interface field appearing in ForceSendFields will be sent to the
8436	// server regardless of whether the field is empty or not. This may be
8437	// used to include empty fields in Patch requests.
8438	ForceSendFields []string `json:"-"`
8439
8440	// NullFields is a list of field names (e.g. "AccountId") to include in
8441	// API requests with the JSON null value. By default, fields with empty
8442	// values are omitted from API requests. However, any field with an
8443	// empty value appearing in NullFields will be sent to the server as
8444	// null. It is an error if a field in this list has a non-empty value.
8445	// This may be used to include null fields in Patch requests.
8446	NullFields []string `json:"-"`
8447}
8448
8449func (s *FloodlightConfiguration) MarshalJSON() ([]byte, error) {
8450	type NoMethod FloodlightConfiguration
8451	raw := NoMethod(*s)
8452	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8453}
8454
8455// FloodlightConfigurationsListResponse: Floodlight Configuration List
8456// Response
8457type FloodlightConfigurationsListResponse struct {
8458	// FloodlightConfigurations: Floodlight configuration collection.
8459	FloodlightConfigurations []*FloodlightConfiguration `json:"floodlightConfigurations,omitempty"`
8460
8461	// Kind: Identifies what kind of resource this is. Value: the fixed
8462	// string "dfareporting#floodlightConfigurationsListResponse".
8463	Kind string `json:"kind,omitempty"`
8464
8465	// ServerResponse contains the HTTP response code and headers from the
8466	// server.
8467	googleapi.ServerResponse `json:"-"`
8468
8469	// ForceSendFields is a list of field names (e.g.
8470	// "FloodlightConfigurations") to unconditionally include in API
8471	// requests. By default, fields with empty values are omitted from API
8472	// requests. However, any non-pointer, non-interface field appearing in
8473	// ForceSendFields will be sent to the server regardless of whether the
8474	// field is empty or not. This may be used to include empty fields in
8475	// Patch requests.
8476	ForceSendFields []string `json:"-"`
8477
8478	// NullFields is a list of field names (e.g. "FloodlightConfigurations")
8479	// to include in API requests with the JSON null value. By default,
8480	// fields with empty values are omitted from API requests. However, any
8481	// field with an empty value appearing in NullFields will be sent to the
8482	// server as null. It is an error if a field in this list has a
8483	// non-empty value. This may be used to include null fields in Patch
8484	// requests.
8485	NullFields []string `json:"-"`
8486}
8487
8488func (s *FloodlightConfigurationsListResponse) MarshalJSON() ([]byte, error) {
8489	type NoMethod FloodlightConfigurationsListResponse
8490	raw := NoMethod(*s)
8491	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8492}
8493
8494// FloodlightReportCompatibleFields: Represents fields that are
8495// compatible to be selected for a report of type "FlOODLIGHT".
8496type FloodlightReportCompatibleFields struct {
8497	// DimensionFilters: Dimensions which are compatible to be selected in
8498	// the "dimensionFilters" section of the report.
8499	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
8500
8501	// Dimensions: Dimensions which are compatible to be selected in the
8502	// "dimensions" section of the report.
8503	Dimensions []*Dimension `json:"dimensions,omitempty"`
8504
8505	// Kind: The kind of resource this is, in this case
8506	// dfareporting#floodlightReportCompatibleFields.
8507	Kind string `json:"kind,omitempty"`
8508
8509	// Metrics: Metrics which are compatible to be selected in the
8510	// "metricNames" section of the report.
8511	Metrics []*Metric `json:"metrics,omitempty"`
8512
8513	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
8514	// unconditionally include in API requests. By default, fields with
8515	// empty values are omitted from API requests. However, any non-pointer,
8516	// non-interface field appearing in ForceSendFields will be sent to the
8517	// server regardless of whether the field is empty or not. This may be
8518	// used to include empty fields in Patch requests.
8519	ForceSendFields []string `json:"-"`
8520
8521	// NullFields is a list of field names (e.g. "DimensionFilters") to
8522	// include in API requests with the JSON null value. By default, fields
8523	// with empty values are omitted from API requests. However, any field
8524	// with an empty value appearing in NullFields will be sent to the
8525	// server as null. It is an error if a field in this list has a
8526	// non-empty value. This may be used to include null fields in Patch
8527	// requests.
8528	NullFields []string `json:"-"`
8529}
8530
8531func (s *FloodlightReportCompatibleFields) MarshalJSON() ([]byte, error) {
8532	type NoMethod FloodlightReportCompatibleFields
8533	raw := NoMethod(*s)
8534	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8535}
8536
8537// FrequencyCap: Frequency Cap.
8538type FrequencyCap struct {
8539	// Duration: Duration of time, in seconds, for this frequency cap. The
8540	// maximum duration is 90 days. Acceptable values are 1 to 7776000,
8541	// inclusive.
8542	Duration int64 `json:"duration,omitempty,string"`
8543
8544	// Impressions: Number of times an individual user can be served the ad
8545	// within the specified duration. Acceptable values are 1 to 15,
8546	// inclusive.
8547	Impressions int64 `json:"impressions,omitempty,string"`
8548
8549	// ForceSendFields is a list of field names (e.g. "Duration") to
8550	// unconditionally include in API requests. By default, fields with
8551	// empty values are omitted from API requests. However, any non-pointer,
8552	// non-interface field appearing in ForceSendFields will be sent to the
8553	// server regardless of whether the field is empty or not. This may be
8554	// used to include empty fields in Patch requests.
8555	ForceSendFields []string `json:"-"`
8556
8557	// NullFields is a list of field names (e.g. "Duration") to include in
8558	// API requests with the JSON null value. By default, fields with empty
8559	// values are omitted from API requests. However, any field with an
8560	// empty value appearing in NullFields will be sent to the server as
8561	// null. It is an error if a field in this list has a non-empty value.
8562	// This may be used to include null fields in Patch requests.
8563	NullFields []string `json:"-"`
8564}
8565
8566func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
8567	type NoMethod FrequencyCap
8568	raw := NoMethod(*s)
8569	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8570}
8571
8572// FsCommand: FsCommand.
8573type FsCommand struct {
8574	// Left: Distance from the left of the browser.Applicable when
8575	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
8576	Left int64 `json:"left,omitempty"`
8577
8578	// PositionOption: Position in the browser where the window will open.
8579	//
8580	// Possible values:
8581	//   "CENTERED"
8582	//   "DISTANCE_FROM_TOP_LEFT_CORNER"
8583	PositionOption string `json:"positionOption,omitempty"`
8584
8585	// Top: Distance from the top of the browser. Applicable when
8586	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
8587	Top int64 `json:"top,omitempty"`
8588
8589	// WindowHeight: Height of the window.
8590	WindowHeight int64 `json:"windowHeight,omitempty"`
8591
8592	// WindowWidth: Width of the window.
8593	WindowWidth int64 `json:"windowWidth,omitempty"`
8594
8595	// ForceSendFields is a list of field names (e.g. "Left") to
8596	// unconditionally include in API requests. By default, fields with
8597	// empty values are omitted from API requests. However, any non-pointer,
8598	// non-interface field appearing in ForceSendFields will be sent to the
8599	// server regardless of whether the field is empty or not. This may be
8600	// used to include empty fields in Patch requests.
8601	ForceSendFields []string `json:"-"`
8602
8603	// NullFields is a list of field names (e.g. "Left") to include in API
8604	// requests with the JSON null value. By default, fields with empty
8605	// values are omitted from API requests. However, any field with an
8606	// empty value appearing in NullFields will be sent to the server as
8607	// null. It is an error if a field in this list has a non-empty value.
8608	// This may be used to include null fields in Patch requests.
8609	NullFields []string `json:"-"`
8610}
8611
8612func (s *FsCommand) MarshalJSON() ([]byte, error) {
8613	type NoMethod FsCommand
8614	raw := NoMethod(*s)
8615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8616}
8617
8618// GeoTargeting: Geographical Targeting.
8619type GeoTargeting struct {
8620	// Cities: Cities to be targeted. For each city only dartId is required.
8621	// The other fields are populated automatically when the ad is inserted
8622	// or updated. If targeting a city, do not target or exclude the country
8623	// of the city, and do not target the metro or region of the city.
8624	Cities []*City `json:"cities,omitempty"`
8625
8626	// Countries: Countries to be targeted or excluded from targeting,
8627	// depending on the setting of the excludeCountries field. For each
8628	// country only dartId is required. The other fields are populated
8629	// automatically when the ad is inserted or updated. If targeting or
8630	// excluding a country, do not target regions, cities, metros, or postal
8631	// codes in the same country.
8632	Countries []*Country `json:"countries,omitempty"`
8633
8634	// ExcludeCountries: Whether or not to exclude the countries in the
8635	// countries field from targeting. If false, the countries field refers
8636	// to countries which will be targeted by the ad.
8637	ExcludeCountries bool `json:"excludeCountries,omitempty"`
8638
8639	// Metros: Metros to be targeted. For each metro only dmaId is required.
8640	// The other fields are populated automatically when the ad is inserted
8641	// or updated. If targeting a metro, do not target or exclude the
8642	// country of the metro.
8643	Metros []*Metro `json:"metros,omitempty"`
8644
8645	// PostalCodes: Postal codes to be targeted. For each postal code only
8646	// id is required. The other fields are populated automatically when the
8647	// ad is inserted or updated. If targeting a postal code, do not target
8648	// or exclude the country of the postal code.
8649	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
8650
8651	// Regions: Regions to be targeted. For each region only dartId is
8652	// required. The other fields are populated automatically when the ad is
8653	// inserted or updated. If targeting a region, do not target or exclude
8654	// the country of the region.
8655	Regions []*Region `json:"regions,omitempty"`
8656
8657	// ForceSendFields is a list of field names (e.g. "Cities") to
8658	// unconditionally include in API requests. By default, fields with
8659	// empty values are omitted from API requests. However, any non-pointer,
8660	// non-interface field appearing in ForceSendFields will be sent to the
8661	// server regardless of whether the field is empty or not. This may be
8662	// used to include empty fields in Patch requests.
8663	ForceSendFields []string `json:"-"`
8664
8665	// NullFields is a list of field names (e.g. "Cities") to include in API
8666	// requests with the JSON null value. By default, fields with empty
8667	// values are omitted from API requests. However, any field with an
8668	// empty value appearing in NullFields will be sent to the server as
8669	// null. It is an error if a field in this list has a non-empty value.
8670	// This may be used to include null fields in Patch requests.
8671	NullFields []string `json:"-"`
8672}
8673
8674func (s *GeoTargeting) MarshalJSON() ([]byte, error) {
8675	type NoMethod GeoTargeting
8676	raw := NoMethod(*s)
8677	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8678}
8679
8680// InventoryItem: Represents a buy from the Planning inventory store.
8681type InventoryItem struct {
8682	// AccountId: Account ID of this inventory item.
8683	AccountId int64 `json:"accountId,omitempty,string"`
8684
8685	// AdSlots: Ad slots of this inventory item. If this inventory item
8686	// represents a standalone placement, there will be exactly one ad slot.
8687	// If this inventory item represents a placement group, there will be
8688	// more than one ad slot, each representing one child placement in that
8689	// placement group.
8690	AdSlots []*AdSlot `json:"adSlots,omitempty"`
8691
8692	// AdvertiserId: Advertiser ID of this inventory item.
8693	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8694
8695	// ContentCategoryId: Content category ID of this inventory item.
8696	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
8697
8698	// EstimatedClickThroughRate: Estimated click-through rate of this
8699	// inventory item.
8700	EstimatedClickThroughRate int64 `json:"estimatedClickThroughRate,omitempty,string"`
8701
8702	// EstimatedConversionRate: Estimated conversion rate of this inventory
8703	// item.
8704	EstimatedConversionRate int64 `json:"estimatedConversionRate,omitempty,string"`
8705
8706	// Id: ID of this inventory item.
8707	Id int64 `json:"id,omitempty,string"`
8708
8709	// InPlan: Whether this inventory item is in plan.
8710	InPlan bool `json:"inPlan,omitempty"`
8711
8712	// Kind: Identifies what kind of resource this is. Value: the fixed
8713	// string "dfareporting#inventoryItem".
8714	Kind string `json:"kind,omitempty"`
8715
8716	// LastModifiedInfo: Information about the most recent modification of
8717	// this inventory item.
8718	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
8719
8720	// Name: Name of this inventory item. For standalone inventory items,
8721	// this is the same name as that of its only ad slot. For group
8722	// inventory items, this can differ from the name of any of its ad
8723	// slots.
8724	Name string `json:"name,omitempty"`
8725
8726	// NegotiationChannelId: Negotiation channel ID of this inventory item.
8727	NegotiationChannelId int64 `json:"negotiationChannelId,omitempty,string"`
8728
8729	// OrderId: Order ID of this inventory item.
8730	OrderId int64 `json:"orderId,omitempty,string"`
8731
8732	// PlacementStrategyId: Placement strategy ID of this inventory item.
8733	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
8734
8735	// Pricing: Pricing of this inventory item.
8736	Pricing *Pricing `json:"pricing,omitempty"`
8737
8738	// ProjectId: Project ID of this inventory item.
8739	ProjectId int64 `json:"projectId,omitempty,string"`
8740
8741	// RfpId: RFP ID of this inventory item.
8742	RfpId int64 `json:"rfpId,omitempty,string"`
8743
8744	// SiteId: ID of the site this inventory item is associated with.
8745	SiteId int64 `json:"siteId,omitempty,string"`
8746
8747	// SubaccountId: Subaccount ID of this inventory item.
8748	SubaccountId int64 `json:"subaccountId,omitempty,string"`
8749
8750	// Type: Type of inventory item.
8751	//
8752	// Possible values:
8753	//   "PLANNING_PLACEMENT_TYPE_REGULAR"
8754	//   "PLANNING_PLACEMENT_TYPE_CREDIT"
8755	Type string `json:"type,omitempty"`
8756
8757	// ServerResponse contains the HTTP response code and headers from the
8758	// server.
8759	googleapi.ServerResponse `json:"-"`
8760
8761	// ForceSendFields is a list of field names (e.g. "AccountId") to
8762	// unconditionally include in API requests. By default, fields with
8763	// empty values are omitted from API requests. However, any non-pointer,
8764	// non-interface field appearing in ForceSendFields will be sent to the
8765	// server regardless of whether the field is empty or not. This may be
8766	// used to include empty fields in Patch requests.
8767	ForceSendFields []string `json:"-"`
8768
8769	// NullFields is a list of field names (e.g. "AccountId") to include in
8770	// API requests with the JSON null value. By default, fields with empty
8771	// values are omitted from API requests. However, any field with an
8772	// empty value appearing in NullFields will be sent to the server as
8773	// null. It is an error if a field in this list has a non-empty value.
8774	// This may be used to include null fields in Patch requests.
8775	NullFields []string `json:"-"`
8776}
8777
8778func (s *InventoryItem) MarshalJSON() ([]byte, error) {
8779	type NoMethod InventoryItem
8780	raw := NoMethod(*s)
8781	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8782}
8783
8784// InventoryItemsListResponse: Inventory item List Response
8785type InventoryItemsListResponse struct {
8786	// InventoryItems: Inventory item collection
8787	InventoryItems []*InventoryItem `json:"inventoryItems,omitempty"`
8788
8789	// Kind: Identifies what kind of resource this is. Value: the fixed
8790	// string "dfareporting#inventoryItemsListResponse".
8791	Kind string `json:"kind,omitempty"`
8792
8793	// NextPageToken: Pagination token to be used for the next list
8794	// operation.
8795	NextPageToken string `json:"nextPageToken,omitempty"`
8796
8797	// ServerResponse contains the HTTP response code and headers from the
8798	// server.
8799	googleapi.ServerResponse `json:"-"`
8800
8801	// ForceSendFields is a list of field names (e.g. "InventoryItems") to
8802	// unconditionally include in API requests. By default, fields with
8803	// empty values are omitted from API requests. However, any non-pointer,
8804	// non-interface field appearing in ForceSendFields will be sent to the
8805	// server regardless of whether the field is empty or not. This may be
8806	// used to include empty fields in Patch requests.
8807	ForceSendFields []string `json:"-"`
8808
8809	// NullFields is a list of field names (e.g. "InventoryItems") to
8810	// include in API requests with the JSON null value. By default, fields
8811	// with empty values are omitted from API requests. However, any field
8812	// with an empty value appearing in NullFields will be sent to the
8813	// server as null. It is an error if a field in this list has a
8814	// non-empty value. This may be used to include null fields in Patch
8815	// requests.
8816	NullFields []string `json:"-"`
8817}
8818
8819func (s *InventoryItemsListResponse) MarshalJSON() ([]byte, error) {
8820	type NoMethod InventoryItemsListResponse
8821	raw := NoMethod(*s)
8822	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8823}
8824
8825// KeyValueTargetingExpression: Key Value Targeting Expression.
8826type KeyValueTargetingExpression struct {
8827	// Expression: Keyword expression being targeted by the ad.
8828	Expression string `json:"expression,omitempty"`
8829
8830	// ForceSendFields is a list of field names (e.g. "Expression") to
8831	// unconditionally include in API requests. By default, fields with
8832	// empty values are omitted from API requests. However, any non-pointer,
8833	// non-interface field appearing in ForceSendFields will be sent to the
8834	// server regardless of whether the field is empty or not. This may be
8835	// used to include empty fields in Patch requests.
8836	ForceSendFields []string `json:"-"`
8837
8838	// NullFields is a list of field names (e.g. "Expression") to include in
8839	// API requests with the JSON null value. By default, fields with empty
8840	// values are omitted from API requests. However, any field with an
8841	// empty value appearing in NullFields will be sent to the server as
8842	// null. It is an error if a field in this list has a non-empty value.
8843	// This may be used to include null fields in Patch requests.
8844	NullFields []string `json:"-"`
8845}
8846
8847func (s *KeyValueTargetingExpression) MarshalJSON() ([]byte, error) {
8848	type NoMethod KeyValueTargetingExpression
8849	raw := NoMethod(*s)
8850	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8851}
8852
8853// LandingPage: Contains information about where a user's browser is
8854// taken after the user clicks an ad.
8855type LandingPage struct {
8856	// AdvertiserId: Advertiser ID of this landing page. This is a required
8857	// field.
8858	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8859
8860	// Archived: Whether this landing page has been archived.
8861	Archived bool `json:"archived,omitempty"`
8862
8863	// DeepLinks: Links that will direct the user to a mobile app, if
8864	// installed.
8865	DeepLinks []*DeepLink `json:"deepLinks,omitempty"`
8866
8867	// Id: ID of this landing page. This is a read-only, auto-generated
8868	// field.
8869	Id int64 `json:"id,omitempty,string"`
8870
8871	// Kind: Identifies what kind of resource this is. Value: the fixed
8872	// string "dfareporting#landingPage".
8873	Kind string `json:"kind,omitempty"`
8874
8875	// Name: Name of this landing page. This is a required field. It must be
8876	// less than 256 characters long.
8877	Name string `json:"name,omitempty"`
8878
8879	// Url: URL of this landing page. This is a required field.
8880	Url string `json:"url,omitempty"`
8881
8882	// ServerResponse contains the HTTP response code and headers from the
8883	// server.
8884	googleapi.ServerResponse `json:"-"`
8885
8886	// ForceSendFields is a list of field names (e.g. "AdvertiserId") to
8887	// unconditionally include in API requests. By default, fields with
8888	// empty values are omitted from API requests. However, any non-pointer,
8889	// non-interface field appearing in ForceSendFields will be sent to the
8890	// server regardless of whether the field is empty or not. This may be
8891	// used to include empty fields in Patch requests.
8892	ForceSendFields []string `json:"-"`
8893
8894	// NullFields is a list of field names (e.g. "AdvertiserId") to include
8895	// in API requests with the JSON null value. By default, fields with
8896	// empty values are omitted from API requests. However, any field with
8897	// an empty value appearing in NullFields will be sent to the server as
8898	// null. It is an error if a field in this list has a non-empty value.
8899	// This may be used to include null fields in Patch requests.
8900	NullFields []string `json:"-"`
8901}
8902
8903func (s *LandingPage) MarshalJSON() ([]byte, error) {
8904	type NoMethod LandingPage
8905	raw := NoMethod(*s)
8906	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8907}
8908
8909// Language: Contains information about a language that can be targeted
8910// by ads.
8911type Language struct {
8912	// Id: Language ID of this language. This is the ID used for targeting
8913	// and generating reports.
8914	Id int64 `json:"id,omitempty,string"`
8915
8916	// Kind: Identifies what kind of resource this is. Value: the fixed
8917	// string "dfareporting#language".
8918	Kind string `json:"kind,omitempty"`
8919
8920	// LanguageCode: Format of language code is an ISO 639 two-letter
8921	// language code optionally followed by an underscore followed by an ISO
8922	// 3166 code. Examples are "en" for English or "zh_CN" for Simplified
8923	// Chinese.
8924	LanguageCode string `json:"languageCode,omitempty"`
8925
8926	// Name: Name of this language.
8927	Name string `json:"name,omitempty"`
8928
8929	// ForceSendFields is a list of field names (e.g. "Id") to
8930	// unconditionally include in API requests. By default, fields with
8931	// empty values are omitted from API requests. However, any non-pointer,
8932	// non-interface field appearing in ForceSendFields will be sent to the
8933	// server regardless of whether the field is empty or not. This may be
8934	// used to include empty fields in Patch requests.
8935	ForceSendFields []string `json:"-"`
8936
8937	// NullFields is a list of field names (e.g. "Id") to include in API
8938	// requests with the JSON null value. By default, fields with empty
8939	// values are omitted from API requests. However, any field with an
8940	// empty value appearing in NullFields will be sent to the server as
8941	// null. It is an error if a field in this list has a non-empty value.
8942	// This may be used to include null fields in Patch requests.
8943	NullFields []string `json:"-"`
8944}
8945
8946func (s *Language) MarshalJSON() ([]byte, error) {
8947	type NoMethod Language
8948	raw := NoMethod(*s)
8949	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8950}
8951
8952// LanguageTargeting: Language Targeting.
8953type LanguageTargeting struct {
8954	// Languages: Languages that this ad targets. For each language only
8955	// languageId is required. The other fields are populated automatically
8956	// when the ad is inserted or updated.
8957	Languages []*Language `json:"languages,omitempty"`
8958
8959	// ForceSendFields is a list of field names (e.g. "Languages") to
8960	// unconditionally include in API requests. By default, fields with
8961	// empty values are omitted from API requests. However, any non-pointer,
8962	// non-interface field appearing in ForceSendFields will be sent to the
8963	// server regardless of whether the field is empty or not. This may be
8964	// used to include empty fields in Patch requests.
8965	ForceSendFields []string `json:"-"`
8966
8967	// NullFields is a list of field names (e.g. "Languages") to include in
8968	// API requests with the JSON null value. By default, fields with empty
8969	// values are omitted from API requests. However, any field with an
8970	// empty value appearing in NullFields will be sent to the server as
8971	// null. It is an error if a field in this list has a non-empty value.
8972	// This may be used to include null fields in Patch requests.
8973	NullFields []string `json:"-"`
8974}
8975
8976func (s *LanguageTargeting) MarshalJSON() ([]byte, error) {
8977	type NoMethod LanguageTargeting
8978	raw := NoMethod(*s)
8979	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8980}
8981
8982// LanguagesListResponse: Language List Response
8983type LanguagesListResponse struct {
8984	// Kind: Identifies what kind of resource this is. Value: the fixed
8985	// string "dfareporting#languagesListResponse".
8986	Kind string `json:"kind,omitempty"`
8987
8988	// Languages: Language collection.
8989	Languages []*Language `json:"languages,omitempty"`
8990
8991	// ServerResponse contains the HTTP response code and headers from the
8992	// server.
8993	googleapi.ServerResponse `json:"-"`
8994
8995	// ForceSendFields is a list of field names (e.g. "Kind") to
8996	// unconditionally include in API requests. By default, fields with
8997	// empty values are omitted from API requests. However, any non-pointer,
8998	// non-interface field appearing in ForceSendFields will be sent to the
8999	// server regardless of whether the field is empty or not. This may be
9000	// used to include empty fields in Patch requests.
9001	ForceSendFields []string `json:"-"`
9002
9003	// NullFields is a list of field names (e.g. "Kind") to include in API
9004	// requests with the JSON null value. By default, fields with empty
9005	// values are omitted from API requests. However, any field with an
9006	// empty value appearing in NullFields will be sent to the server as
9007	// null. It is an error if a field in this list has a non-empty value.
9008	// This may be used to include null fields in Patch requests.
9009	NullFields []string `json:"-"`
9010}
9011
9012func (s *LanguagesListResponse) MarshalJSON() ([]byte, error) {
9013	type NoMethod LanguagesListResponse
9014	raw := NoMethod(*s)
9015	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9016}
9017
9018// LastModifiedInfo: Modification timestamp.
9019type LastModifiedInfo struct {
9020	// Time: Timestamp of the last change in milliseconds since epoch.
9021	Time int64 `json:"time,omitempty,string"`
9022
9023	// ForceSendFields is a list of field names (e.g. "Time") to
9024	// unconditionally include in API requests. By default, fields with
9025	// empty values are omitted from API requests. However, any non-pointer,
9026	// non-interface field appearing in ForceSendFields will be sent to the
9027	// server regardless of whether the field is empty or not. This may be
9028	// used to include empty fields in Patch requests.
9029	ForceSendFields []string `json:"-"`
9030
9031	// NullFields is a list of field names (e.g. "Time") to include in API
9032	// requests with the JSON null value. By default, fields with empty
9033	// values are omitted from API requests. However, any field with an
9034	// empty value appearing in NullFields will be sent to the server as
9035	// null. It is an error if a field in this list has a non-empty value.
9036	// This may be used to include null fields in Patch requests.
9037	NullFields []string `json:"-"`
9038}
9039
9040func (s *LastModifiedInfo) MarshalJSON() ([]byte, error) {
9041	type NoMethod LastModifiedInfo
9042	raw := NoMethod(*s)
9043	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9044}
9045
9046// ListPopulationClause: A group clause made up of list population terms
9047// representing constraints joined by ORs.
9048type ListPopulationClause struct {
9049	// Terms: Terms of this list population clause. Each clause is made up
9050	// of list population terms representing constraints and are joined by
9051	// ORs.
9052	Terms []*ListPopulationTerm `json:"terms,omitempty"`
9053
9054	// ForceSendFields is a list of field names (e.g. "Terms") to
9055	// unconditionally include in API requests. By default, fields with
9056	// empty values are omitted from API requests. However, any non-pointer,
9057	// non-interface field appearing in ForceSendFields will be sent to the
9058	// server regardless of whether the field is empty or not. This may be
9059	// used to include empty fields in Patch requests.
9060	ForceSendFields []string `json:"-"`
9061
9062	// NullFields is a list of field names (e.g. "Terms") to include in API
9063	// requests with the JSON null value. By default, fields with empty
9064	// values are omitted from API requests. However, any field with an
9065	// empty value appearing in NullFields will be sent to the server as
9066	// null. It is an error if a field in this list has a non-empty value.
9067	// This may be used to include null fields in Patch requests.
9068	NullFields []string `json:"-"`
9069}
9070
9071func (s *ListPopulationClause) MarshalJSON() ([]byte, error) {
9072	type NoMethod ListPopulationClause
9073	raw := NoMethod(*s)
9074	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9075}
9076
9077// ListPopulationRule: Remarketing List Population Rule.
9078type ListPopulationRule struct {
9079	// FloodlightActivityId: Floodlight activity ID associated with this
9080	// rule. This field can be left blank.
9081	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
9082
9083	// FloodlightActivityName: Name of floodlight activity associated with
9084	// this rule. This is a read-only, auto-generated field.
9085	FloodlightActivityName string `json:"floodlightActivityName,omitempty"`
9086
9087	// ListPopulationClauses: Clauses that make up this list population
9088	// rule. Clauses are joined by ANDs, and the clauses themselves are made
9089	// up of list population terms which are joined by ORs.
9090	ListPopulationClauses []*ListPopulationClause `json:"listPopulationClauses,omitempty"`
9091
9092	// ForceSendFields is a list of field names (e.g.
9093	// "FloodlightActivityId") to unconditionally include in API requests.
9094	// By default, fields with empty values are omitted from API requests.
9095	// However, any non-pointer, non-interface field appearing in
9096	// ForceSendFields will be sent to the server regardless of whether the
9097	// field is empty or not. This may be used to include empty fields in
9098	// Patch requests.
9099	ForceSendFields []string `json:"-"`
9100
9101	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
9102	// include in API requests with the JSON null value. By default, fields
9103	// with empty values are omitted from API requests. However, any field
9104	// with an empty value appearing in NullFields will be sent to the
9105	// server as null. It is an error if a field in this list has a
9106	// non-empty value. This may be used to include null fields in Patch
9107	// requests.
9108	NullFields []string `json:"-"`
9109}
9110
9111func (s *ListPopulationRule) MarshalJSON() ([]byte, error) {
9112	type NoMethod ListPopulationRule
9113	raw := NoMethod(*s)
9114	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9115}
9116
9117// ListPopulationTerm: Remarketing List Population Rule Term.
9118type ListPopulationTerm struct {
9119	// Contains: Will be true if the term should check if the user is in the
9120	// list and false if the term should check if the user is not in the
9121	// list. This field is only relevant when type is set to
9122	// LIST_MEMBERSHIP_TERM. False by default.
9123	Contains bool `json:"contains,omitempty"`
9124
9125	// Negation: Whether to negate the comparison result of this term during
9126	// rule evaluation. This field is only relevant when type is left unset
9127	// or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM.
9128	Negation bool `json:"negation,omitempty"`
9129
9130	// Operator: Comparison operator of this term. This field is only
9131	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
9132	// REFERRER_TERM.
9133	//
9134	// Possible values:
9135	//   "NUM_EQUALS"
9136	//   "NUM_LESS_THAN"
9137	//   "NUM_LESS_THAN_EQUAL"
9138	//   "NUM_GREATER_THAN"
9139	//   "NUM_GREATER_THAN_EQUAL"
9140	//   "STRING_EQUALS"
9141	//   "STRING_CONTAINS"
9142	Operator string `json:"operator,omitempty"`
9143
9144	// RemarketingListId: ID of the list in question. This field is only
9145	// relevant when type is set to LIST_MEMBERSHIP_TERM.
9146	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
9147
9148	// Type: List population term type determines the applicable fields in
9149	// this object. If left unset or set to CUSTOM_VARIABLE_TERM, then
9150	// variableName, variableFriendlyName, operator, value, and negation are
9151	// applicable. If set to LIST_MEMBERSHIP_TERM then remarketingListId and
9152	// contains are applicable. If set to REFERRER_TERM then operator,
9153	// value, and negation are applicable.
9154	//
9155	// Possible values:
9156	//   "CUSTOM_VARIABLE_TERM"
9157	//   "LIST_MEMBERSHIP_TERM"
9158	//   "REFERRER_TERM"
9159	Type string `json:"type,omitempty"`
9160
9161	// Value: Literal to compare the variable to. This field is only
9162	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
9163	// REFERRER_TERM.
9164	Value string `json:"value,omitempty"`
9165
9166	// VariableFriendlyName: Friendly name of this term's variable. This is
9167	// a read-only, auto-generated field. This field is only relevant when
9168	// type is left unset or set to CUSTOM_VARIABLE_TERM.
9169	VariableFriendlyName string `json:"variableFriendlyName,omitempty"`
9170
9171	// VariableName: Name of the variable (U1, U2, etc.) being compared in
9172	// this term. This field is only relevant when type is set to null,
9173	// CUSTOM_VARIABLE_TERM or REFERRER_TERM.
9174	VariableName string `json:"variableName,omitempty"`
9175
9176	// ForceSendFields is a list of field names (e.g. "Contains") to
9177	// unconditionally include in API requests. By default, fields with
9178	// empty values are omitted from API requests. However, any non-pointer,
9179	// non-interface field appearing in ForceSendFields will be sent to the
9180	// server regardless of whether the field is empty or not. This may be
9181	// used to include empty fields in Patch requests.
9182	ForceSendFields []string `json:"-"`
9183
9184	// NullFields is a list of field names (e.g. "Contains") to include in
9185	// API requests with the JSON null value. By default, fields with empty
9186	// values are omitted from API requests. However, any field with an
9187	// empty value appearing in NullFields will be sent to the server as
9188	// null. It is an error if a field in this list has a non-empty value.
9189	// This may be used to include null fields in Patch requests.
9190	NullFields []string `json:"-"`
9191}
9192
9193func (s *ListPopulationTerm) MarshalJSON() ([]byte, error) {
9194	type NoMethod ListPopulationTerm
9195	raw := NoMethod(*s)
9196	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9197}
9198
9199// ListTargetingExpression: Remarketing List Targeting Expression.
9200type ListTargetingExpression struct {
9201	// Expression: Expression describing which lists are being targeted by
9202	// the ad.
9203	Expression string `json:"expression,omitempty"`
9204
9205	// ForceSendFields is a list of field names (e.g. "Expression") to
9206	// unconditionally include in API requests. By default, fields with
9207	// empty values are omitted from API requests. However, any non-pointer,
9208	// non-interface field appearing in ForceSendFields will be sent to the
9209	// server regardless of whether the field is empty or not. This may be
9210	// used to include empty fields in Patch requests.
9211	ForceSendFields []string `json:"-"`
9212
9213	// NullFields is a list of field names (e.g. "Expression") to include in
9214	// API requests with the JSON null value. By default, fields with empty
9215	// values are omitted from API requests. However, any field with an
9216	// empty value appearing in NullFields will be sent to the server as
9217	// null. It is an error if a field in this list has a non-empty value.
9218	// This may be used to include null fields in Patch requests.
9219	NullFields []string `json:"-"`
9220}
9221
9222func (s *ListTargetingExpression) MarshalJSON() ([]byte, error) {
9223	type NoMethod ListTargetingExpression
9224	raw := NoMethod(*s)
9225	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9226}
9227
9228// LookbackConfiguration: Lookback configuration settings.
9229type LookbackConfiguration struct {
9230	// ClickDuration: Lookback window, in days, from the last time a given
9231	// user clicked on one of your ads. If you enter 0, clicks will not be
9232	// considered as triggering events for floodlight tracking. If you leave
9233	// this field blank, the default value for your account will be used.
9234	// Acceptable values are 0 to 90, inclusive.
9235	ClickDuration int64 `json:"clickDuration,omitempty"`
9236
9237	// PostImpressionActivitiesDuration: Lookback window, in days, from the
9238	// last time a given user viewed one of your ads. If you enter 0,
9239	// impressions will not be considered as triggering events for
9240	// floodlight tracking. If you leave this field blank, the default value
9241	// for your account will be used. Acceptable values are 0 to 90,
9242	// inclusive.
9243	PostImpressionActivitiesDuration int64 `json:"postImpressionActivitiesDuration,omitempty"`
9244
9245	// ForceSendFields is a list of field names (e.g. "ClickDuration") to
9246	// unconditionally include in API requests. By default, fields with
9247	// empty values are omitted from API requests. However, any non-pointer,
9248	// non-interface field appearing in ForceSendFields will be sent to the
9249	// server regardless of whether the field is empty or not. This may be
9250	// used to include empty fields in Patch requests.
9251	ForceSendFields []string `json:"-"`
9252
9253	// NullFields is a list of field names (e.g. "ClickDuration") to include
9254	// in API requests with the JSON null value. By default, fields with
9255	// empty values are omitted from API requests. However, any field with
9256	// an empty value appearing in NullFields will be sent to the server as
9257	// null. It is an error if a field in this list has a non-empty value.
9258	// This may be used to include null fields in Patch requests.
9259	NullFields []string `json:"-"`
9260}
9261
9262func (s *LookbackConfiguration) MarshalJSON() ([]byte, error) {
9263	type NoMethod LookbackConfiguration
9264	raw := NoMethod(*s)
9265	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9266}
9267
9268// Metric: Represents a metric.
9269type Metric struct {
9270	// Kind: The kind of resource this is, in this case dfareporting#metric.
9271	Kind string `json:"kind,omitempty"`
9272
9273	// Name: The metric name, e.g. dfa:impressions
9274	Name string `json:"name,omitempty"`
9275
9276	// ForceSendFields is a list of field names (e.g. "Kind") to
9277	// unconditionally include in API requests. By default, fields with
9278	// empty values are omitted from API requests. However, any non-pointer,
9279	// non-interface field appearing in ForceSendFields will be sent to the
9280	// server regardless of whether the field is empty or not. This may be
9281	// used to include empty fields in Patch requests.
9282	ForceSendFields []string `json:"-"`
9283
9284	// NullFields is a list of field names (e.g. "Kind") to include in API
9285	// requests with the JSON null value. By default, fields with empty
9286	// values are omitted from API requests. However, any field with an
9287	// empty value appearing in NullFields will be sent to the server as
9288	// null. It is an error if a field in this list has a non-empty value.
9289	// This may be used to include null fields in Patch requests.
9290	NullFields []string `json:"-"`
9291}
9292
9293func (s *Metric) MarshalJSON() ([]byte, error) {
9294	type NoMethod Metric
9295	raw := NoMethod(*s)
9296	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9297}
9298
9299// Metro: Contains information about a metro region that can be targeted
9300// by ads.
9301type Metro struct {
9302	// CountryCode: Country code of the country to which this metro region
9303	// belongs.
9304	CountryCode string `json:"countryCode,omitempty"`
9305
9306	// CountryDartId: DART ID of the country to which this metro region
9307	// belongs.
9308	CountryDartId int64 `json:"countryDartId,omitempty,string"`
9309
9310	// DartId: DART ID of this metro region.
9311	DartId int64 `json:"dartId,omitempty,string"`
9312
9313	// DmaId: DMA ID of this metro region. This is the ID used for targeting
9314	// and generating reports, and is equivalent to metro_code.
9315	DmaId int64 `json:"dmaId,omitempty,string"`
9316
9317	// Kind: Identifies what kind of resource this is. Value: the fixed
9318	// string "dfareporting#metro".
9319	Kind string `json:"kind,omitempty"`
9320
9321	// MetroCode: Metro code of this metro region. This is equivalent to
9322	// dma_id.
9323	MetroCode string `json:"metroCode,omitempty"`
9324
9325	// Name: Name of this metro region.
9326	Name string `json:"name,omitempty"`
9327
9328	// ForceSendFields is a list of field names (e.g. "CountryCode") to
9329	// unconditionally include in API requests. By default, fields with
9330	// empty values are omitted from API requests. However, any non-pointer,
9331	// non-interface field appearing in ForceSendFields will be sent to the
9332	// server regardless of whether the field is empty or not. This may be
9333	// used to include empty fields in Patch requests.
9334	ForceSendFields []string `json:"-"`
9335
9336	// NullFields is a list of field names (e.g. "CountryCode") to include
9337	// in API requests with the JSON null value. By default, fields with
9338	// empty values are omitted from API requests. However, any field with
9339	// an empty value appearing in NullFields will be sent to the server as
9340	// null. It is an error if a field in this list has a non-empty value.
9341	// This may be used to include null fields in Patch requests.
9342	NullFields []string `json:"-"`
9343}
9344
9345func (s *Metro) MarshalJSON() ([]byte, error) {
9346	type NoMethod Metro
9347	raw := NoMethod(*s)
9348	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9349}
9350
9351// MetrosListResponse: Metro List Response
9352type MetrosListResponse struct {
9353	// Kind: Identifies what kind of resource this is. Value: the fixed
9354	// string "dfareporting#metrosListResponse".
9355	Kind string `json:"kind,omitempty"`
9356
9357	// Metros: Metro collection.
9358	Metros []*Metro `json:"metros,omitempty"`
9359
9360	// ServerResponse contains the HTTP response code and headers from the
9361	// server.
9362	googleapi.ServerResponse `json:"-"`
9363
9364	// ForceSendFields is a list of field names (e.g. "Kind") to
9365	// unconditionally include in API requests. By default, fields with
9366	// empty values are omitted from API requests. However, any non-pointer,
9367	// non-interface field appearing in ForceSendFields will be sent to the
9368	// server regardless of whether the field is empty or not. This may be
9369	// used to include empty fields in Patch requests.
9370	ForceSendFields []string `json:"-"`
9371
9372	// NullFields is a list of field names (e.g. "Kind") to include in API
9373	// requests with the JSON null value. By default, fields with empty
9374	// values are omitted from API requests. However, any field with an
9375	// empty value appearing in NullFields will be sent to the server as
9376	// null. It is an error if a field in this list has a non-empty value.
9377	// This may be used to include null fields in Patch requests.
9378	NullFields []string `json:"-"`
9379}
9380
9381func (s *MetrosListResponse) MarshalJSON() ([]byte, error) {
9382	type NoMethod MetrosListResponse
9383	raw := NoMethod(*s)
9384	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9385}
9386
9387// MobileApp: Contains information about a mobile app. Used as a landing
9388// page deep link.
9389type MobileApp struct {
9390	// Directory: Mobile app directory.
9391	//
9392	// Possible values:
9393	//   "UNKNOWN"
9394	//   "APPLE_APP_STORE"
9395	//   "GOOGLE_PLAY_STORE"
9396	Directory string `json:"directory,omitempty"`
9397
9398	// Id: ID of this mobile app.
9399	Id string `json:"id,omitempty"`
9400
9401	// Kind: Identifies what kind of resource this is. Value: the fixed
9402	// string "dfareporting#mobileApp".
9403	Kind string `json:"kind,omitempty"`
9404
9405	// PublisherName: Publisher name.
9406	PublisherName string `json:"publisherName,omitempty"`
9407
9408	// Title: Title of this mobile app.
9409	Title string `json:"title,omitempty"`
9410
9411	// ServerResponse contains the HTTP response code and headers from the
9412	// server.
9413	googleapi.ServerResponse `json:"-"`
9414
9415	// ForceSendFields is a list of field names (e.g. "Directory") to
9416	// unconditionally include in API requests. By default, fields with
9417	// empty values are omitted from API requests. However, any non-pointer,
9418	// non-interface field appearing in ForceSendFields will be sent to the
9419	// server regardless of whether the field is empty or not. This may be
9420	// used to include empty fields in Patch requests.
9421	ForceSendFields []string `json:"-"`
9422
9423	// NullFields is a list of field names (e.g. "Directory") to include in
9424	// API requests with the JSON null value. By default, fields with empty
9425	// values are omitted from API requests. However, any field with an
9426	// empty value appearing in NullFields will be sent to the server as
9427	// null. It is an error if a field in this list has a non-empty value.
9428	// This may be used to include null fields in Patch requests.
9429	NullFields []string `json:"-"`
9430}
9431
9432func (s *MobileApp) MarshalJSON() ([]byte, error) {
9433	type NoMethod MobileApp
9434	raw := NoMethod(*s)
9435	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9436}
9437
9438// MobileAppsListResponse: Mobile app List Response
9439type MobileAppsListResponse struct {
9440	// Kind: Identifies what kind of resource this is. Value: the fixed
9441	// string "dfareporting#mobileAppsListResponse".
9442	Kind string `json:"kind,omitempty"`
9443
9444	// MobileApps: Mobile apps collection.
9445	MobileApps []*MobileApp `json:"mobileApps,omitempty"`
9446
9447	// NextPageToken: Pagination token to be used for the next list
9448	// operation.
9449	NextPageToken string `json:"nextPageToken,omitempty"`
9450
9451	// ServerResponse contains the HTTP response code and headers from the
9452	// server.
9453	googleapi.ServerResponse `json:"-"`
9454
9455	// ForceSendFields is a list of field names (e.g. "Kind") to
9456	// unconditionally include in API requests. By default, fields with
9457	// empty values are omitted from API requests. However, any non-pointer,
9458	// non-interface field appearing in ForceSendFields will be sent to the
9459	// server regardless of whether the field is empty or not. This may be
9460	// used to include empty fields in Patch requests.
9461	ForceSendFields []string `json:"-"`
9462
9463	// NullFields is a list of field names (e.g. "Kind") to include in API
9464	// requests with the JSON null value. By default, fields with empty
9465	// values are omitted from API requests. However, any field with an
9466	// empty value appearing in NullFields will be sent to the server as
9467	// null. It is an error if a field in this list has a non-empty value.
9468	// This may be used to include null fields in Patch requests.
9469	NullFields []string `json:"-"`
9470}
9471
9472func (s *MobileAppsListResponse) MarshalJSON() ([]byte, error) {
9473	type NoMethod MobileAppsListResponse
9474	raw := NoMethod(*s)
9475	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9476}
9477
9478// MobileCarrier: Contains information about a mobile carrier that can
9479// be targeted by ads.
9480type MobileCarrier struct {
9481	// CountryCode: Country code of the country to which this mobile carrier
9482	// belongs.
9483	CountryCode string `json:"countryCode,omitempty"`
9484
9485	// CountryDartId: DART ID of the country to which this mobile carrier
9486	// belongs.
9487	CountryDartId int64 `json:"countryDartId,omitempty,string"`
9488
9489	// Id: ID of this mobile carrier.
9490	Id int64 `json:"id,omitempty,string"`
9491
9492	// Kind: Identifies what kind of resource this is. Value: the fixed
9493	// string "dfareporting#mobileCarrier".
9494	Kind string `json:"kind,omitempty"`
9495
9496	// Name: Name of this mobile carrier.
9497	Name string `json:"name,omitempty"`
9498
9499	// ServerResponse contains the HTTP response code and headers from the
9500	// server.
9501	googleapi.ServerResponse `json:"-"`
9502
9503	// ForceSendFields is a list of field names (e.g. "CountryCode") to
9504	// unconditionally include in API requests. By default, fields with
9505	// empty values are omitted from API requests. However, any non-pointer,
9506	// non-interface field appearing in ForceSendFields will be sent to the
9507	// server regardless of whether the field is empty or not. This may be
9508	// used to include empty fields in Patch requests.
9509	ForceSendFields []string `json:"-"`
9510
9511	// NullFields is a list of field names (e.g. "CountryCode") to include
9512	// in API requests with the JSON null value. By default, fields with
9513	// empty values are omitted from API requests. However, any field with
9514	// an empty value appearing in NullFields will be sent to the server as
9515	// null. It is an error if a field in this list has a non-empty value.
9516	// This may be used to include null fields in Patch requests.
9517	NullFields []string `json:"-"`
9518}
9519
9520func (s *MobileCarrier) MarshalJSON() ([]byte, error) {
9521	type NoMethod MobileCarrier
9522	raw := NoMethod(*s)
9523	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9524}
9525
9526// MobileCarriersListResponse: Mobile Carrier List Response
9527type MobileCarriersListResponse struct {
9528	// Kind: Identifies what kind of resource this is. Value: the fixed
9529	// string "dfareporting#mobileCarriersListResponse".
9530	Kind string `json:"kind,omitempty"`
9531
9532	// MobileCarriers: Mobile carrier collection.
9533	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
9534
9535	// ServerResponse contains the HTTP response code and headers from the
9536	// server.
9537	googleapi.ServerResponse `json:"-"`
9538
9539	// ForceSendFields is a list of field names (e.g. "Kind") to
9540	// unconditionally include in API requests. By default, fields with
9541	// empty values are omitted from API requests. However, any non-pointer,
9542	// non-interface field appearing in ForceSendFields will be sent to the
9543	// server regardless of whether the field is empty or not. This may be
9544	// used to include empty fields in Patch requests.
9545	ForceSendFields []string `json:"-"`
9546
9547	// NullFields is a list of field names (e.g. "Kind") to include in API
9548	// requests with the JSON null value. By default, fields with empty
9549	// values are omitted from API requests. However, any field with an
9550	// empty value appearing in NullFields will be sent to the server as
9551	// null. It is an error if a field in this list has a non-empty value.
9552	// This may be used to include null fields in Patch requests.
9553	NullFields []string `json:"-"`
9554}
9555
9556func (s *MobileCarriersListResponse) MarshalJSON() ([]byte, error) {
9557	type NoMethod MobileCarriersListResponse
9558	raw := NoMethod(*s)
9559	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9560}
9561
9562// ObaIcon: Online Behavioral Advertiser icon.
9563type ObaIcon struct {
9564	// IconClickThroughUrl: URL to redirect to when an OBA icon is clicked.
9565	IconClickThroughUrl string `json:"iconClickThroughUrl,omitempty"`
9566
9567	// IconClickTrackingUrl: URL to track click when an OBA icon is clicked.
9568	IconClickTrackingUrl string `json:"iconClickTrackingUrl,omitempty"`
9569
9570	// IconViewTrackingUrl: URL to track view when an OBA icon is clicked.
9571	IconViewTrackingUrl string `json:"iconViewTrackingUrl,omitempty"`
9572
9573	// Program: Identifies the industry initiative that the icon supports.
9574	// For example, AdChoices.
9575	Program string `json:"program,omitempty"`
9576
9577	// ResourceUrl: OBA icon resource URL. Campaign Manager only supports
9578	// image and JavaScript icons. Learn more
9579	ResourceUrl string `json:"resourceUrl,omitempty"`
9580
9581	// Size: OBA icon size.
9582	Size *Size `json:"size,omitempty"`
9583
9584	// XPosition: OBA icon x coordinate position. Accepted values are left
9585	// or right.
9586	XPosition string `json:"xPosition,omitempty"`
9587
9588	// YPosition: OBA icon y coordinate position. Accepted values are top or
9589	// bottom.
9590	YPosition string `json:"yPosition,omitempty"`
9591
9592	// ForceSendFields is a list of field names (e.g. "IconClickThroughUrl")
9593	// to unconditionally include in API requests. By default, fields with
9594	// empty values are omitted from API requests. However, any non-pointer,
9595	// non-interface field appearing in ForceSendFields will be sent to the
9596	// server regardless of whether the field is empty or not. This may be
9597	// used to include empty fields in Patch requests.
9598	ForceSendFields []string `json:"-"`
9599
9600	// NullFields is a list of field names (e.g. "IconClickThroughUrl") to
9601	// include in API requests with the JSON null value. By default, fields
9602	// with empty values are omitted from API requests. However, any field
9603	// with an empty value appearing in NullFields will be sent to the
9604	// server as null. It is an error if a field in this list has a
9605	// non-empty value. This may be used to include null fields in Patch
9606	// requests.
9607	NullFields []string `json:"-"`
9608}
9609
9610func (s *ObaIcon) MarshalJSON() ([]byte, error) {
9611	type NoMethod ObaIcon
9612	raw := NoMethod(*s)
9613	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9614}
9615
9616// ObjectFilter: Object Filter.
9617type ObjectFilter struct {
9618	// Kind: Identifies what kind of resource this is. Value: the fixed
9619	// string "dfareporting#objectFilter".
9620	Kind string `json:"kind,omitempty"`
9621
9622	// ObjectIds: Applicable when status is ASSIGNED. The user has access to
9623	// objects with these object IDs.
9624	ObjectIds googleapi.Int64s `json:"objectIds,omitempty"`
9625
9626	// Status: Status of the filter. NONE means the user has access to none
9627	// of the objects. ALL means the user has access to all objects.
9628	// ASSIGNED means the user has access to the objects with IDs in the
9629	// objectIds list.
9630	//
9631	// Possible values:
9632	//   "NONE"
9633	//   "ASSIGNED"
9634	//   "ALL"
9635	Status string `json:"status,omitempty"`
9636
9637	// ForceSendFields is a list of field names (e.g. "Kind") to
9638	// unconditionally include in API requests. By default, fields with
9639	// empty values are omitted from API requests. However, any non-pointer,
9640	// non-interface field appearing in ForceSendFields will be sent to the
9641	// server regardless of whether the field is empty or not. This may be
9642	// used to include empty fields in Patch requests.
9643	ForceSendFields []string `json:"-"`
9644
9645	// NullFields is a list of field names (e.g. "Kind") to include in API
9646	// requests with the JSON null value. By default, fields with empty
9647	// values are omitted from API requests. However, any field with an
9648	// empty value appearing in NullFields will be sent to the server as
9649	// null. It is an error if a field in this list has a non-empty value.
9650	// This may be used to include null fields in Patch requests.
9651	NullFields []string `json:"-"`
9652}
9653
9654func (s *ObjectFilter) MarshalJSON() ([]byte, error) {
9655	type NoMethod ObjectFilter
9656	raw := NoMethod(*s)
9657	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9658}
9659
9660// OffsetPosition: Offset Position.
9661type OffsetPosition struct {
9662	// Left: Offset distance from left side of an asset or a window.
9663	Left int64 `json:"left,omitempty"`
9664
9665	// Top: Offset distance from top side of an asset or a window.
9666	Top int64 `json:"top,omitempty"`
9667
9668	// ForceSendFields is a list of field names (e.g. "Left") to
9669	// unconditionally include in API requests. By default, fields with
9670	// empty values are omitted from API requests. However, any non-pointer,
9671	// non-interface field appearing in ForceSendFields will be sent to the
9672	// server regardless of whether the field is empty or not. This may be
9673	// used to include empty fields in Patch requests.
9674	ForceSendFields []string `json:"-"`
9675
9676	// NullFields is a list of field names (e.g. "Left") to include in API
9677	// requests with the JSON null value. By default, fields with empty
9678	// values are omitted from API requests. However, any field with an
9679	// empty value appearing in NullFields will be sent to the server as
9680	// null. It is an error if a field in this list has a non-empty value.
9681	// This may be used to include null fields in Patch requests.
9682	NullFields []string `json:"-"`
9683}
9684
9685func (s *OffsetPosition) MarshalJSON() ([]byte, error) {
9686	type NoMethod OffsetPosition
9687	raw := NoMethod(*s)
9688	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9689}
9690
9691// OmnitureSettings: Omniture Integration Settings.
9692type OmnitureSettings struct {
9693	// OmnitureCostDataEnabled: Whether placement cost data will be sent to
9694	// Omniture. This property can be enabled only if
9695	// omnitureIntegrationEnabled is true.
9696	OmnitureCostDataEnabled bool `json:"omnitureCostDataEnabled,omitempty"`
9697
9698	// OmnitureIntegrationEnabled: Whether Omniture integration is enabled.
9699	// This property can be enabled only when the "Advanced Ad Serving"
9700	// account setting is enabled.
9701	OmnitureIntegrationEnabled bool `json:"omnitureIntegrationEnabled,omitempty"`
9702
9703	// ForceSendFields is a list of field names (e.g.
9704	// "OmnitureCostDataEnabled") to unconditionally include in API
9705	// requests. By default, fields with empty values are omitted from API
9706	// requests. However, any non-pointer, non-interface field appearing in
9707	// ForceSendFields will be sent to the server regardless of whether the
9708	// field is empty or not. This may be used to include empty fields in
9709	// Patch requests.
9710	ForceSendFields []string `json:"-"`
9711
9712	// NullFields is a list of field names (e.g. "OmnitureCostDataEnabled")
9713	// to include in API requests with the JSON null value. By default,
9714	// fields with empty values are omitted from API requests. However, any
9715	// field with an empty value appearing in NullFields will be sent to the
9716	// server as null. It is an error if a field in this list has a
9717	// non-empty value. This may be used to include null fields in Patch
9718	// requests.
9719	NullFields []string `json:"-"`
9720}
9721
9722func (s *OmnitureSettings) MarshalJSON() ([]byte, error) {
9723	type NoMethod OmnitureSettings
9724	raw := NoMethod(*s)
9725	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9726}
9727
9728// OperatingSystem: Contains information about an operating system that
9729// can be targeted by ads.
9730type OperatingSystem struct {
9731	// DartId: DART ID of this operating system. This is the ID used for
9732	// targeting.
9733	DartId int64 `json:"dartId,omitempty,string"`
9734
9735	// Desktop: Whether this operating system is for desktop.
9736	Desktop bool `json:"desktop,omitempty"`
9737
9738	// Kind: Identifies what kind of resource this is. Value: the fixed
9739	// string "dfareporting#operatingSystem".
9740	Kind string `json:"kind,omitempty"`
9741
9742	// Mobile: Whether this operating system is for mobile.
9743	Mobile bool `json:"mobile,omitempty"`
9744
9745	// Name: Name of this operating system.
9746	Name string `json:"name,omitempty"`
9747
9748	// ServerResponse contains the HTTP response code and headers from the
9749	// server.
9750	googleapi.ServerResponse `json:"-"`
9751
9752	// ForceSendFields is a list of field names (e.g. "DartId") to
9753	// unconditionally include in API requests. By default, fields with
9754	// empty values are omitted from API requests. However, any non-pointer,
9755	// non-interface field appearing in ForceSendFields will be sent to the
9756	// server regardless of whether the field is empty or not. This may be
9757	// used to include empty fields in Patch requests.
9758	ForceSendFields []string `json:"-"`
9759
9760	// NullFields is a list of field names (e.g. "DartId") to include in API
9761	// requests with the JSON null value. By default, fields with empty
9762	// values are omitted from API requests. However, any field with an
9763	// empty value appearing in NullFields will be sent to the server as
9764	// null. It is an error if a field in this list has a non-empty value.
9765	// This may be used to include null fields in Patch requests.
9766	NullFields []string `json:"-"`
9767}
9768
9769func (s *OperatingSystem) MarshalJSON() ([]byte, error) {
9770	type NoMethod OperatingSystem
9771	raw := NoMethod(*s)
9772	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9773}
9774
9775// OperatingSystemVersion: Contains information about a particular
9776// version of an operating system that can be targeted by ads.
9777type OperatingSystemVersion struct {
9778	// Id: ID of this operating system version.
9779	Id int64 `json:"id,omitempty,string"`
9780
9781	// Kind: Identifies what kind of resource this is. Value: the fixed
9782	// string "dfareporting#operatingSystemVersion".
9783	Kind string `json:"kind,omitempty"`
9784
9785	// MajorVersion: Major version (leftmost number) of this operating
9786	// system version.
9787	MajorVersion string `json:"majorVersion,omitempty"`
9788
9789	// MinorVersion: Minor version (number after the first dot) of this
9790	// operating system version.
9791	MinorVersion string `json:"minorVersion,omitempty"`
9792
9793	// Name: Name of this operating system version.
9794	Name string `json:"name,omitempty"`
9795
9796	// OperatingSystem: Operating system of this operating system version.
9797	OperatingSystem *OperatingSystem `json:"operatingSystem,omitempty"`
9798
9799	// ServerResponse contains the HTTP response code and headers from the
9800	// server.
9801	googleapi.ServerResponse `json:"-"`
9802
9803	// ForceSendFields is a list of field names (e.g. "Id") to
9804	// unconditionally include in API requests. By default, fields with
9805	// empty values are omitted from API requests. However, any non-pointer,
9806	// non-interface field appearing in ForceSendFields will be sent to the
9807	// server regardless of whether the field is empty or not. This may be
9808	// used to include empty fields in Patch requests.
9809	ForceSendFields []string `json:"-"`
9810
9811	// NullFields is a list of field names (e.g. "Id") to include in API
9812	// requests with the JSON null value. By default, fields with empty
9813	// values are omitted from API requests. However, any field with an
9814	// empty value appearing in NullFields will be sent to the server as
9815	// null. It is an error if a field in this list has a non-empty value.
9816	// This may be used to include null fields in Patch requests.
9817	NullFields []string `json:"-"`
9818}
9819
9820func (s *OperatingSystemVersion) MarshalJSON() ([]byte, error) {
9821	type NoMethod OperatingSystemVersion
9822	raw := NoMethod(*s)
9823	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9824}
9825
9826// OperatingSystemVersionsListResponse: Operating System Version List
9827// Response
9828type OperatingSystemVersionsListResponse struct {
9829	// Kind: Identifies what kind of resource this is. Value: the fixed
9830	// string "dfareporting#operatingSystemVersionsListResponse".
9831	Kind string `json:"kind,omitempty"`
9832
9833	// OperatingSystemVersions: Operating system version collection.
9834	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
9835
9836	// ServerResponse contains the HTTP response code and headers from the
9837	// server.
9838	googleapi.ServerResponse `json:"-"`
9839
9840	// ForceSendFields is a list of field names (e.g. "Kind") to
9841	// unconditionally include in API requests. By default, fields with
9842	// empty values are omitted from API requests. However, any non-pointer,
9843	// non-interface field appearing in ForceSendFields will be sent to the
9844	// server regardless of whether the field is empty or not. This may be
9845	// used to include empty fields in Patch requests.
9846	ForceSendFields []string `json:"-"`
9847
9848	// NullFields is a list of field names (e.g. "Kind") to include in API
9849	// requests with the JSON null value. By default, fields with empty
9850	// values are omitted from API requests. However, any field with an
9851	// empty value appearing in NullFields will be sent to the server as
9852	// null. It is an error if a field in this list has a non-empty value.
9853	// This may be used to include null fields in Patch requests.
9854	NullFields []string `json:"-"`
9855}
9856
9857func (s *OperatingSystemVersionsListResponse) MarshalJSON() ([]byte, error) {
9858	type NoMethod OperatingSystemVersionsListResponse
9859	raw := NoMethod(*s)
9860	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9861}
9862
9863// OperatingSystemsListResponse: Operating System List Response
9864type OperatingSystemsListResponse struct {
9865	// Kind: Identifies what kind of resource this is. Value: the fixed
9866	// string "dfareporting#operatingSystemsListResponse".
9867	Kind string `json:"kind,omitempty"`
9868
9869	// OperatingSystems: Operating system collection.
9870	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
9871
9872	// ServerResponse contains the HTTP response code and headers from the
9873	// server.
9874	googleapi.ServerResponse `json:"-"`
9875
9876	// ForceSendFields is a list of field names (e.g. "Kind") to
9877	// unconditionally include in API requests. By default, fields with
9878	// empty values are omitted from API requests. However, any non-pointer,
9879	// non-interface field appearing in ForceSendFields will be sent to the
9880	// server regardless of whether the field is empty or not. This may be
9881	// used to include empty fields in Patch requests.
9882	ForceSendFields []string `json:"-"`
9883
9884	// NullFields is a list of field names (e.g. "Kind") to include in API
9885	// requests with the JSON null value. By default, fields with empty
9886	// values are omitted from API requests. However, any field with an
9887	// empty value appearing in NullFields will be sent to the server as
9888	// null. It is an error if a field in this list has a non-empty value.
9889	// This may be used to include null fields in Patch requests.
9890	NullFields []string `json:"-"`
9891}
9892
9893func (s *OperatingSystemsListResponse) MarshalJSON() ([]byte, error) {
9894	type NoMethod OperatingSystemsListResponse
9895	raw := NoMethod(*s)
9896	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9897}
9898
9899// OptimizationActivity: Creative optimization activity.
9900type OptimizationActivity struct {
9901	// FloodlightActivityId: Floodlight activity ID of this optimization
9902	// activity. This is a required field.
9903	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
9904
9905	// FloodlightActivityIdDimensionValue: Dimension value for the ID of the
9906	// floodlight activity. This is a read-only, auto-generated field.
9907	FloodlightActivityIdDimensionValue *DimensionValue `json:"floodlightActivityIdDimensionValue,omitempty"`
9908
9909	// Weight: Weight associated with this optimization. The weight assigned
9910	// will be understood in proportion to the weights assigned to the other
9911	// optimization activities. Value must be greater than or equal to 1.
9912	Weight int64 `json:"weight,omitempty"`
9913
9914	// ForceSendFields is a list of field names (e.g.
9915	// "FloodlightActivityId") to unconditionally include in API requests.
9916	// By default, fields with empty values are omitted from API requests.
9917	// However, any non-pointer, non-interface field appearing in
9918	// ForceSendFields will be sent to the server regardless of whether the
9919	// field is empty or not. This may be used to include empty fields in
9920	// Patch requests.
9921	ForceSendFields []string `json:"-"`
9922
9923	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
9924	// include in API requests with the JSON null value. By default, fields
9925	// with empty values are omitted from API requests. However, any field
9926	// with an empty value appearing in NullFields will be sent to the
9927	// server as null. It is an error if a field in this list has a
9928	// non-empty value. This may be used to include null fields in Patch
9929	// requests.
9930	NullFields []string `json:"-"`
9931}
9932
9933func (s *OptimizationActivity) MarshalJSON() ([]byte, error) {
9934	type NoMethod OptimizationActivity
9935	raw := NoMethod(*s)
9936	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9937}
9938
9939// Order: Describes properties of a Planning order.
9940type Order struct {
9941	// AccountId: Account ID of this order.
9942	AccountId int64 `json:"accountId,omitempty,string"`
9943
9944	// AdvertiserId: Advertiser ID of this order.
9945	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9946
9947	// ApproverUserProfileIds: IDs for users that have to approve documents
9948	// created for this order.
9949	ApproverUserProfileIds googleapi.Int64s `json:"approverUserProfileIds,omitempty"`
9950
9951	// BuyerInvoiceId: Buyer invoice ID associated with this order.
9952	BuyerInvoiceId string `json:"buyerInvoiceId,omitempty"`
9953
9954	// BuyerOrganizationName: Name of the buyer organization.
9955	BuyerOrganizationName string `json:"buyerOrganizationName,omitempty"`
9956
9957	// Comments: Comments in this order.
9958	Comments string `json:"comments,omitempty"`
9959
9960	// Contacts: Contacts for this order.
9961	Contacts []*OrderContact `json:"contacts,omitempty"`
9962
9963	// Id: ID of this order. This is a read-only, auto-generated field.
9964	Id int64 `json:"id,omitempty,string"`
9965
9966	// Kind: Identifies what kind of resource this is. Value: the fixed
9967	// string "dfareporting#order".
9968	Kind string `json:"kind,omitempty"`
9969
9970	// LastModifiedInfo: Information about the most recent modification of
9971	// this order.
9972	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9973
9974	// Name: Name of this order.
9975	Name string `json:"name,omitempty"`
9976
9977	// Notes: Notes of this order.
9978	Notes string `json:"notes,omitempty"`
9979
9980	// PlanningTermId: ID of the terms and conditions template used in this
9981	// order.
9982	PlanningTermId int64 `json:"planningTermId,omitempty,string"`
9983
9984	// ProjectId: Project ID of this order.
9985	ProjectId int64 `json:"projectId,omitempty,string"`
9986
9987	// SellerOrderId: Seller order ID associated with this order.
9988	SellerOrderId string `json:"sellerOrderId,omitempty"`
9989
9990	// SellerOrganizationName: Name of the seller organization.
9991	SellerOrganizationName string `json:"sellerOrganizationName,omitempty"`
9992
9993	// SiteId: Site IDs this order is associated with.
9994	SiteId googleapi.Int64s `json:"siteId,omitempty"`
9995
9996	// SiteNames: Free-form site names this order is associated with.
9997	SiteNames []string `json:"siteNames,omitempty"`
9998
9999	// SubaccountId: Subaccount ID of this order.
10000	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10001
10002	// TermsAndConditions: Terms and conditions of this order.
10003	TermsAndConditions string `json:"termsAndConditions,omitempty"`
10004
10005	// ServerResponse contains the HTTP response code and headers from the
10006	// server.
10007	googleapi.ServerResponse `json:"-"`
10008
10009	// ForceSendFields is a list of field names (e.g. "AccountId") to
10010	// unconditionally include in API requests. By default, fields with
10011	// empty values are omitted from API requests. However, any non-pointer,
10012	// non-interface field appearing in ForceSendFields will be sent to the
10013	// server regardless of whether the field is empty or not. This may be
10014	// used to include empty fields in Patch requests.
10015	ForceSendFields []string `json:"-"`
10016
10017	// NullFields is a list of field names (e.g. "AccountId") to include in
10018	// API requests with the JSON null value. By default, fields with empty
10019	// values are omitted from API requests. However, any field with an
10020	// empty value appearing in NullFields will be sent to the server as
10021	// null. It is an error if a field in this list has a non-empty value.
10022	// This may be used to include null fields in Patch requests.
10023	NullFields []string `json:"-"`
10024}
10025
10026func (s *Order) MarshalJSON() ([]byte, error) {
10027	type NoMethod Order
10028	raw := NoMethod(*s)
10029	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10030}
10031
10032// OrderContact: Contact of an order.
10033type OrderContact struct {
10034	// ContactInfo: Free-form information about this contact. It could be
10035	// any information related to this contact in addition to type, title,
10036	// name, and signature user profile ID.
10037	ContactInfo string `json:"contactInfo,omitempty"`
10038
10039	// ContactName: Name of this contact.
10040	ContactName string `json:"contactName,omitempty"`
10041
10042	// ContactTitle: Title of this contact.
10043	ContactTitle string `json:"contactTitle,omitempty"`
10044
10045	// ContactType: Type of this contact.
10046	//
10047	// Possible values:
10048	//   "PLANNING_ORDER_CONTACT_BUYER_CONTACT"
10049	//   "PLANNING_ORDER_CONTACT_BUYER_BILLING_CONTACT"
10050	//   "PLANNING_ORDER_CONTACT_SELLER_CONTACT"
10051	ContactType string `json:"contactType,omitempty"`
10052
10053	// SignatureUserProfileId: ID of the user profile containing the
10054	// signature that will be embedded into order documents.
10055	SignatureUserProfileId int64 `json:"signatureUserProfileId,omitempty,string"`
10056
10057	// ForceSendFields is a list of field names (e.g. "ContactInfo") to
10058	// unconditionally include in API requests. By default, fields with
10059	// empty values are omitted from API requests. However, any non-pointer,
10060	// non-interface field appearing in ForceSendFields will be sent to the
10061	// server regardless of whether the field is empty or not. This may be
10062	// used to include empty fields in Patch requests.
10063	ForceSendFields []string `json:"-"`
10064
10065	// NullFields is a list of field names (e.g. "ContactInfo") to include
10066	// in API requests with the JSON null value. By default, fields with
10067	// empty values are omitted from API requests. However, any field with
10068	// an empty value appearing in NullFields will be sent to the server as
10069	// null. It is an error if a field in this list has a non-empty value.
10070	// This may be used to include null fields in Patch requests.
10071	NullFields []string `json:"-"`
10072}
10073
10074func (s *OrderContact) MarshalJSON() ([]byte, error) {
10075	type NoMethod OrderContact
10076	raw := NoMethod(*s)
10077	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10078}
10079
10080// OrderDocument: Contains properties of a Planning order document.
10081type OrderDocument struct {
10082	// AccountId: Account ID of this order document.
10083	AccountId int64 `json:"accountId,omitempty,string"`
10084
10085	// AdvertiserId: Advertiser ID of this order document.
10086	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10087
10088	// AmendedOrderDocumentId: The amended order document ID of this order
10089	// document. An order document can be created by optionally amending
10090	// another order document so that the change history can be preserved.
10091	AmendedOrderDocumentId int64 `json:"amendedOrderDocumentId,omitempty,string"`
10092
10093	// ApprovedByUserProfileIds: IDs of users who have approved this order
10094	// document.
10095	ApprovedByUserProfileIds googleapi.Int64s `json:"approvedByUserProfileIds,omitempty"`
10096
10097	// Cancelled: Whether this order document is cancelled.
10098	Cancelled bool `json:"cancelled,omitempty"`
10099
10100	// CreatedInfo: Information about the creation of this order document.
10101	CreatedInfo *LastModifiedInfo `json:"createdInfo,omitempty"`
10102
10103	EffectiveDate string `json:"effectiveDate,omitempty"`
10104
10105	// Id: ID of this order document.
10106	Id int64 `json:"id,omitempty,string"`
10107
10108	// Kind: Identifies what kind of resource this is. Value: the fixed
10109	// string "dfareporting#orderDocument".
10110	Kind string `json:"kind,omitempty"`
10111
10112	// LastSentRecipients: List of email addresses that received the last
10113	// sent document.
10114	LastSentRecipients []string `json:"lastSentRecipients,omitempty"`
10115
10116	LastSentTime string `json:"lastSentTime,omitempty"`
10117
10118	// OrderId: ID of the order from which this order document is created.
10119	OrderId int64 `json:"orderId,omitempty,string"`
10120
10121	// ProjectId: Project ID of this order document.
10122	ProjectId int64 `json:"projectId,omitempty,string"`
10123
10124	// Signed: Whether this order document has been signed.
10125	Signed bool `json:"signed,omitempty"`
10126
10127	// SubaccountId: Subaccount ID of this order document.
10128	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10129
10130	// Title: Title of this order document.
10131	Title string `json:"title,omitempty"`
10132
10133	// Type: Type of this order document
10134	//
10135	// Possible values:
10136	//   "PLANNING_ORDER_TYPE_INSERTION_ORDER"
10137	//   "PLANNING_ORDER_TYPE_CHANGE_ORDER"
10138	Type string `json:"type,omitempty"`
10139
10140	// ServerResponse contains the HTTP response code and headers from the
10141	// server.
10142	googleapi.ServerResponse `json:"-"`
10143
10144	// ForceSendFields is a list of field names (e.g. "AccountId") to
10145	// unconditionally include in API requests. By default, fields with
10146	// empty values are omitted from API requests. However, any non-pointer,
10147	// non-interface field appearing in ForceSendFields will be sent to the
10148	// server regardless of whether the field is empty or not. This may be
10149	// used to include empty fields in Patch requests.
10150	ForceSendFields []string `json:"-"`
10151
10152	// NullFields is a list of field names (e.g. "AccountId") to include in
10153	// API requests with the JSON null value. By default, fields with empty
10154	// values are omitted from API requests. However, any field with an
10155	// empty value appearing in NullFields will be sent to the server as
10156	// null. It is an error if a field in this list has a non-empty value.
10157	// This may be used to include null fields in Patch requests.
10158	NullFields []string `json:"-"`
10159}
10160
10161func (s *OrderDocument) MarshalJSON() ([]byte, error) {
10162	type NoMethod OrderDocument
10163	raw := NoMethod(*s)
10164	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10165}
10166
10167// OrderDocumentsListResponse: Order document List Response
10168type OrderDocumentsListResponse struct {
10169	// Kind: Identifies what kind of resource this is. Value: the fixed
10170	// string "dfareporting#orderDocumentsListResponse".
10171	Kind string `json:"kind,omitempty"`
10172
10173	// NextPageToken: Pagination token to be used for the next list
10174	// operation.
10175	NextPageToken string `json:"nextPageToken,omitempty"`
10176
10177	// OrderDocuments: Order document collection
10178	OrderDocuments []*OrderDocument `json:"orderDocuments,omitempty"`
10179
10180	// ServerResponse contains the HTTP response code and headers from the
10181	// server.
10182	googleapi.ServerResponse `json:"-"`
10183
10184	// ForceSendFields is a list of field names (e.g. "Kind") to
10185	// unconditionally include in API requests. By default, fields with
10186	// empty values are omitted from API requests. However, any non-pointer,
10187	// non-interface field appearing in ForceSendFields will be sent to the
10188	// server regardless of whether the field is empty or not. This may be
10189	// used to include empty fields in Patch requests.
10190	ForceSendFields []string `json:"-"`
10191
10192	// NullFields is a list of field names (e.g. "Kind") to include in API
10193	// requests with the JSON null value. By default, fields with empty
10194	// values are omitted from API requests. However, any field with an
10195	// empty value appearing in NullFields will be sent to the server as
10196	// null. It is an error if a field in this list has a non-empty value.
10197	// This may be used to include null fields in Patch requests.
10198	NullFields []string `json:"-"`
10199}
10200
10201func (s *OrderDocumentsListResponse) MarshalJSON() ([]byte, error) {
10202	type NoMethod OrderDocumentsListResponse
10203	raw := NoMethod(*s)
10204	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10205}
10206
10207// OrdersListResponse: Order List Response
10208type OrdersListResponse struct {
10209	// Kind: Identifies what kind of resource this is. Value: the fixed
10210	// string "dfareporting#ordersListResponse".
10211	Kind string `json:"kind,omitempty"`
10212
10213	// NextPageToken: Pagination token to be used for the next list
10214	// operation.
10215	NextPageToken string `json:"nextPageToken,omitempty"`
10216
10217	// Orders: Order collection.
10218	Orders []*Order `json:"orders,omitempty"`
10219
10220	// ServerResponse contains the HTTP response code and headers from the
10221	// server.
10222	googleapi.ServerResponse `json:"-"`
10223
10224	// ForceSendFields is a list of field names (e.g. "Kind") to
10225	// unconditionally include in API requests. By default, fields with
10226	// empty values are omitted from API requests. However, any non-pointer,
10227	// non-interface field appearing in ForceSendFields will be sent to the
10228	// server regardless of whether the field is empty or not. This may be
10229	// used to include empty fields in Patch requests.
10230	ForceSendFields []string `json:"-"`
10231
10232	// NullFields is a list of field names (e.g. "Kind") to include in API
10233	// requests with the JSON null value. By default, fields with empty
10234	// values are omitted from API requests. However, any field with an
10235	// empty value appearing in NullFields will be sent to the server as
10236	// null. It is an error if a field in this list has a non-empty value.
10237	// This may be used to include null fields in Patch requests.
10238	NullFields []string `json:"-"`
10239}
10240
10241func (s *OrdersListResponse) MarshalJSON() ([]byte, error) {
10242	type NoMethod OrdersListResponse
10243	raw := NoMethod(*s)
10244	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10245}
10246
10247// PathFilter: Represents a DfaReporting path filter.
10248type PathFilter struct {
10249	// EventFilters: Event filters in path report.
10250	EventFilters []*EventFilter `json:"eventFilters,omitempty"`
10251
10252	// Kind: The kind of resource this is, in this case
10253	// dfareporting#pathFilter.
10254	Kind string `json:"kind,omitempty"`
10255
10256	// PathMatchPosition: Determines how the 'value' field is matched when
10257	// filtering. If not specified, defaults to EXACT. If set to
10258	// WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable
10259	// length character sequences, and it can be escaped with a backslash.
10260	// Note, only paid search dimensions ('dfa:paidSearch*') allow a
10261	// matchType other than EXACT.
10262	//
10263	// Possible values:
10264	//   "PATH_MATCH_POSITION_UNSPECIFIED"
10265	//   "ANY"
10266	//   "FIRST"
10267	//   "LAST"
10268	PathMatchPosition string `json:"pathMatchPosition,omitempty"`
10269
10270	// ForceSendFields is a list of field names (e.g. "EventFilters") to
10271	// unconditionally include in API requests. By default, fields with
10272	// empty values are omitted from API requests. However, any non-pointer,
10273	// non-interface field appearing in ForceSendFields will be sent to the
10274	// server regardless of whether the field is empty or not. This may be
10275	// used to include empty fields in Patch requests.
10276	ForceSendFields []string `json:"-"`
10277
10278	// NullFields is a list of field names (e.g. "EventFilters") to include
10279	// in API requests with the JSON null value. By default, fields with
10280	// empty values are omitted from API requests. However, any field with
10281	// an empty value appearing in NullFields will be sent to the server as
10282	// null. It is an error if a field in this list has a non-empty value.
10283	// This may be used to include null fields in Patch requests.
10284	NullFields []string `json:"-"`
10285}
10286
10287func (s *PathFilter) MarshalJSON() ([]byte, error) {
10288	type NoMethod PathFilter
10289	raw := NoMethod(*s)
10290	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10291}
10292
10293// PathReportCompatibleFields: Represents fields that are compatible to
10294// be selected for a report of type "PATH".
10295type PathReportCompatibleFields struct {
10296	// ChannelGroupings: Dimensions which are compatible to be selected in
10297	// the "channelGroupings" section of the report.
10298	ChannelGroupings []*Dimension `json:"channelGroupings,omitempty"`
10299
10300	// Dimensions: Dimensions which are compatible to be selected in the
10301	// "dimensions" section of the report.
10302	Dimensions []*Dimension `json:"dimensions,omitempty"`
10303
10304	// Kind: The kind of resource this is, in this case
10305	// dfareporting#pathReportCompatibleFields.
10306	Kind string `json:"kind,omitempty"`
10307
10308	// Metrics: Metrics which are compatible to be selected in the
10309	// "metricNames" section of the report.
10310	Metrics []*Metric `json:"metrics,omitempty"`
10311
10312	// PathFilters: Dimensions which are compatible to be selected in the
10313	// "pathFilters" section of the report.
10314	PathFilters []*Dimension `json:"pathFilters,omitempty"`
10315
10316	// ForceSendFields is a list of field names (e.g. "ChannelGroupings") to
10317	// unconditionally include in API requests. By default, fields with
10318	// empty values are omitted from API requests. However, any non-pointer,
10319	// non-interface field appearing in ForceSendFields will be sent to the
10320	// server regardless of whether the field is empty or not. This may be
10321	// used to include empty fields in Patch requests.
10322	ForceSendFields []string `json:"-"`
10323
10324	// NullFields is a list of field names (e.g. "ChannelGroupings") to
10325	// include in API requests with the JSON null value. By default, fields
10326	// with empty values are omitted from API requests. However, any field
10327	// with an empty value appearing in NullFields will be sent to the
10328	// server as null. It is an error if a field in this list has a
10329	// non-empty value. This may be used to include null fields in Patch
10330	// requests.
10331	NullFields []string `json:"-"`
10332}
10333
10334func (s *PathReportCompatibleFields) MarshalJSON() ([]byte, error) {
10335	type NoMethod PathReportCompatibleFields
10336	raw := NoMethod(*s)
10337	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10338}
10339
10340// PathReportDimensionValue: Represents a PathReportDimensionValue
10341// resource.
10342type PathReportDimensionValue struct {
10343	// DimensionName: The name of the dimension.
10344	DimensionName string `json:"dimensionName,omitempty"`
10345
10346	// Ids: The possible ID's associated with the value if available.
10347	Ids []string `json:"ids,omitempty"`
10348
10349	// Kind: The kind of resource this is, in this case
10350	// dfareporting#pathReportDimensionValue.
10351	Kind string `json:"kind,omitempty"`
10352
10353	// MatchType: Determines how the 'value' field is matched when
10354	// filtering. If not specified, defaults to EXACT. If set to
10355	// WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable
10356	// length character sequences, and it can be escaped with a backslash.
10357	// Note, only paid search dimensions ('dfa:paidSearch*') allow a
10358	// matchType other than EXACT.
10359	//
10360	// Possible values:
10361	//   "EXACT"
10362	//   "BEGINS_WITH"
10363	//   "CONTAINS"
10364	//   "WILDCARD_EXPRESSION"
10365	MatchType string `json:"matchType,omitempty"`
10366
10367	// Values: The possible values of the dimension.
10368	Values []string `json:"values,omitempty"`
10369
10370	// ForceSendFields is a list of field names (e.g. "DimensionName") to
10371	// unconditionally include in API requests. By default, fields with
10372	// empty values are omitted from API requests. However, any non-pointer,
10373	// non-interface field appearing in ForceSendFields will be sent to the
10374	// server regardless of whether the field is empty or not. This may be
10375	// used to include empty fields in Patch requests.
10376	ForceSendFields []string `json:"-"`
10377
10378	// NullFields is a list of field names (e.g. "DimensionName") to include
10379	// in API requests with the JSON null value. By default, fields with
10380	// empty values are omitted from API requests. However, any field with
10381	// an empty value appearing in NullFields will be sent to the server as
10382	// null. It is an error if a field in this list has a non-empty value.
10383	// This may be used to include null fields in Patch requests.
10384	NullFields []string `json:"-"`
10385}
10386
10387func (s *PathReportDimensionValue) MarshalJSON() ([]byte, error) {
10388	type NoMethod PathReportDimensionValue
10389	raw := NoMethod(*s)
10390	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10391}
10392
10393// PathToConversionReportCompatibleFields: Represents fields that are
10394// compatible to be selected for a report of type "PATH_TO_CONVERSION".
10395type PathToConversionReportCompatibleFields struct {
10396	// ConversionDimensions: Conversion dimensions which are compatible to
10397	// be selected in the "conversionDimensions" section of the report.
10398	ConversionDimensions []*Dimension `json:"conversionDimensions,omitempty"`
10399
10400	// CustomFloodlightVariables: Custom floodlight variables which are
10401	// compatible to be selected in the "customFloodlightVariables" section
10402	// of the report.
10403	CustomFloodlightVariables []*Dimension `json:"customFloodlightVariables,omitempty"`
10404
10405	// Kind: The kind of resource this is, in this case
10406	// dfareporting#pathToConversionReportCompatibleFields.
10407	Kind string `json:"kind,omitempty"`
10408
10409	// Metrics: Metrics which are compatible to be selected in the
10410	// "metricNames" section of the report.
10411	Metrics []*Metric `json:"metrics,omitempty"`
10412
10413	// PerInteractionDimensions: Per-interaction dimensions which are
10414	// compatible to be selected in the "perInteractionDimensions" section
10415	// of the report.
10416	PerInteractionDimensions []*Dimension `json:"perInteractionDimensions,omitempty"`
10417
10418	// ForceSendFields is a list of field names (e.g.
10419	// "ConversionDimensions") to unconditionally include in API requests.
10420	// By default, fields with empty values are omitted from API requests.
10421	// However, any non-pointer, non-interface field appearing in
10422	// ForceSendFields will be sent to the server regardless of whether the
10423	// field is empty or not. This may be used to include empty fields in
10424	// Patch requests.
10425	ForceSendFields []string `json:"-"`
10426
10427	// NullFields is a list of field names (e.g. "ConversionDimensions") to
10428	// include in API requests with the JSON null value. By default, fields
10429	// with empty values are omitted from API requests. However, any field
10430	// with an empty value appearing in NullFields will be sent to the
10431	// server as null. It is an error if a field in this list has a
10432	// non-empty value. This may be used to include null fields in Patch
10433	// requests.
10434	NullFields []string `json:"-"`
10435}
10436
10437func (s *PathToConversionReportCompatibleFields) MarshalJSON() ([]byte, error) {
10438	type NoMethod PathToConversionReportCompatibleFields
10439	raw := NoMethod(*s)
10440	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10441}
10442
10443// Placement: Contains properties of a placement.
10444type Placement struct {
10445	// AccountId: Account ID of this placement. This field can be left
10446	// blank.
10447	AccountId int64 `json:"accountId,omitempty,string"`
10448
10449	// AdBlockingOptOut: Whether this placement opts out of ad blocking.
10450	// When true, ad blocking is disabled for this placement. When false,
10451	// the campaign and site settings take effect.
10452	AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
10453
10454	// AdditionalSizes: Additional sizes associated with this placement.
10455	// When inserting or updating a placement, only the size ID field is
10456	// used.
10457	AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
10458
10459	// AdvertiserId: Advertiser ID of this placement. This field can be left
10460	// blank.
10461	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10462
10463	// AdvertiserIdDimensionValue: Dimension value for the ID of the
10464	// advertiser. This is a read-only, auto-generated field.
10465	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
10466
10467	// Archived: Whether this placement is archived.
10468	Archived bool `json:"archived,omitempty"`
10469
10470	// CampaignId: Campaign ID of this placement. This field is a required
10471	// field on insertion.
10472	CampaignId int64 `json:"campaignId,omitempty,string"`
10473
10474	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
10475	// This is a read-only, auto-generated field.
10476	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
10477
10478	// Comment: Comments for this placement.
10479	Comment string `json:"comment,omitempty"`
10480
10481	// Compatibility: Placement compatibility. DISPLAY and
10482	// DISPLAY_INTERSTITIAL refer to rendering on desktop, on mobile devices
10483	// or in mobile apps for regular or interstitial ads respectively. APP
10484	// and APP_INTERSTITIAL are no longer allowed for new placement
10485	// insertions. Instead, use DISPLAY or DISPLAY_INTERSTITIAL.
10486	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
10487	// with the VAST standard. This field is required on insertion.
10488	//
10489	// Possible values:
10490	//   "DISPLAY"
10491	//   "DISPLAY_INTERSTITIAL"
10492	//   "APP"
10493	//   "APP_INTERSTITIAL"
10494	//   "IN_STREAM_VIDEO"
10495	//   "IN_STREAM_AUDIO"
10496	Compatibility string `json:"compatibility,omitempty"`
10497
10498	// ContentCategoryId: ID of the content category assigned to this
10499	// placement.
10500	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
10501
10502	// CreateInfo: Information about the creation of this placement. This is
10503	// a read-only field.
10504	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
10505
10506	// DirectorySiteId: Directory site ID of this placement. On insert, you
10507	// must set either this field or the siteId field to specify the site
10508	// associated with this placement. This is a required field that is
10509	// read-only after insertion.
10510	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
10511
10512	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
10513	// directory site. This is a read-only, auto-generated field.
10514	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
10515
10516	// ExternalId: External ID for this placement.
10517	ExternalId string `json:"externalId,omitempty"`
10518
10519	// Id: ID of this placement. This is a read-only, auto-generated field.
10520	Id int64 `json:"id,omitempty,string"`
10521
10522	// IdDimensionValue: Dimension value for the ID of this placement. This
10523	// is a read-only, auto-generated field.
10524	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
10525
10526	// KeyName: Key name of this placement. This is a read-only,
10527	// auto-generated field.
10528	KeyName string `json:"keyName,omitempty"`
10529
10530	// Kind: Identifies what kind of resource this is. Value: the fixed
10531	// string "dfareporting#placement".
10532	Kind string `json:"kind,omitempty"`
10533
10534	// LastModifiedInfo: Information about the most recent modification of
10535	// this placement. This is a read-only field.
10536	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10537
10538	// LookbackConfiguration: Lookback window settings for this placement.
10539	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
10540
10541	// Name: Name of this placement.This is a required field and must be
10542	// less than or equal to 256 characters long.
10543	Name string `json:"name,omitempty"`
10544
10545	// PaymentApproved: Whether payment was approved for this placement.
10546	// This is a read-only field relevant only to publisher-paid placements.
10547	PaymentApproved bool `json:"paymentApproved,omitempty"`
10548
10549	// PaymentSource: Payment source for this placement. This is a required
10550	// field that is read-only after insertion.
10551	//
10552	// Possible values:
10553	//   "PLACEMENT_AGENCY_PAID"
10554	//   "PLACEMENT_PUBLISHER_PAID"
10555	PaymentSource string `json:"paymentSource,omitempty"`
10556
10557	// PlacementGroupId: ID of this placement's group, if applicable.
10558	PlacementGroupId int64 `json:"placementGroupId,omitempty,string"`
10559
10560	// PlacementGroupIdDimensionValue: Dimension value for the ID of the
10561	// placement group. This is a read-only, auto-generated field.
10562	PlacementGroupIdDimensionValue *DimensionValue `json:"placementGroupIdDimensionValue,omitempty"`
10563
10564	// PlacementStrategyId: ID of the placement strategy assigned to this
10565	// placement.
10566	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
10567
10568	// PricingSchedule: Pricing schedule of this placement. This field is
10569	// required on insertion, specifically subfields startDate, endDate and
10570	// pricingType.
10571	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
10572
10573	// Primary: Whether this placement is the primary placement of a
10574	// roadblock (placement group). You cannot change this field from true
10575	// to false. Setting this field to true will automatically set the
10576	// primary field on the original primary placement of the roadblock to
10577	// false, and it will automatically set the roadblock's
10578	// primaryPlacementId field to the ID of this placement.
10579	Primary bool `json:"primary,omitempty"`
10580
10581	// PublisherUpdateInfo: Information about the last publisher update.
10582	// This is a read-only field.
10583	PublisherUpdateInfo *LastModifiedInfo `json:"publisherUpdateInfo,omitempty"`
10584
10585	// SiteId: Site ID associated with this placement. On insert, you must
10586	// set either this field or the directorySiteId field to specify the
10587	// site associated with this placement. This is a required field that is
10588	// read-only after insertion.
10589	SiteId int64 `json:"siteId,omitempty,string"`
10590
10591	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
10592	// a read-only, auto-generated field.
10593	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
10594
10595	// Size: Size associated with this placement. When inserting or updating
10596	// a placement, only the size ID field is used. This field is required
10597	// on insertion.
10598	Size *Size `json:"size,omitempty"`
10599
10600	// SslRequired: Whether creatives assigned to this placement must be
10601	// SSL-compliant.
10602	SslRequired bool `json:"sslRequired,omitempty"`
10603
10604	// Status: Third-party placement status.
10605	//
10606	// Possible values:
10607	//   "PENDING_REVIEW"
10608	//   "PAYMENT_ACCEPTED"
10609	//   "PAYMENT_REJECTED"
10610	//   "ACKNOWLEDGE_REJECTION"
10611	//   "ACKNOWLEDGE_ACCEPTANCE"
10612	//   "DRAFT"
10613	Status string `json:"status,omitempty"`
10614
10615	// SubaccountId: Subaccount ID of this placement. This field can be left
10616	// blank.
10617	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10618
10619	// TagFormats: Tag formats to generate for this placement. This field is
10620	// required on insertion. Acceptable values are: -
10621	// "PLACEMENT_TAG_STANDARD" - "PLACEMENT_TAG_IFRAME_JAVASCRIPT" -
10622	// "PLACEMENT_TAG_IFRAME_ILAYER" - "PLACEMENT_TAG_INTERNAL_REDIRECT" -
10623	// "PLACEMENT_TAG_JAVASCRIPT" -
10624	// "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT" -
10625	// "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT" -
10626	// "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT" -
10627	// "PLACEMENT_TAG_CLICK_COMMANDS" -
10628	// "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH" -
10629	// "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3" -
10630	// "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4" -
10631	// "PLACEMENT_TAG_TRACKING" - "PLACEMENT_TAG_TRACKING_IFRAME" -
10632	// "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
10633	//
10634	// Possible values:
10635	//   "PLACEMENT_TAG_STANDARD"
10636	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
10637	//   "PLACEMENT_TAG_IFRAME_ILAYER"
10638	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
10639	//   "PLACEMENT_TAG_JAVASCRIPT"
10640	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
10641	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
10642	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
10643	//   "PLACEMENT_TAG_CLICK_COMMANDS"
10644	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
10645	//   "PLACEMENT_TAG_TRACKING"
10646	//   "PLACEMENT_TAG_TRACKING_IFRAME"
10647	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
10648	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
10649	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
10650	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
10651	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
10652	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
10653	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
10654	TagFormats []string `json:"tagFormats,omitempty"`
10655
10656	// TagSetting: Tag settings for this placement.
10657	TagSetting *TagSetting `json:"tagSetting,omitempty"`
10658
10659	// VideoActiveViewOptOut: Whether Verification and ActiveView are
10660	// disabled for in-stream video creatives for this placement. The same
10661	// setting videoActiveViewOptOut exists on the site level -- the opt out
10662	// occurs if either of these settings are true. These settings are
10663	// distinct from DirectorySites.settings.activeViewOptOut or
10664	// Sites.siteSettings.activeViewOptOut which only apply to display ads.
10665	// However, Accounts.activeViewOptOut opts out both video traffic, as
10666	// well as display ads, from Verification and ActiveView.
10667	VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"`
10668
10669	// VideoSettings: A collection of settings which affect video creatives
10670	// served through this placement. Applicable to placements with
10671	// IN_STREAM_VIDEO compatibility.
10672	VideoSettings *VideoSettings `json:"videoSettings,omitempty"`
10673
10674	// VpaidAdapterChoice: VPAID adapter setting for this placement.
10675	// Controls which VPAID format the measurement adapter will use for
10676	// in-stream video creatives assigned to this placement. *Note:* Flash
10677	// is no longer supported. This field now defaults to HTML5 when the
10678	// following values are provided: FLASH, BOTH.
10679	//
10680	// Possible values:
10681	//   "DEFAULT"
10682	//   "FLASH"
10683	//   "HTML5"
10684	//   "BOTH"
10685	VpaidAdapterChoice string `json:"vpaidAdapterChoice,omitempty"`
10686
10687	// ServerResponse contains the HTTP response code and headers from the
10688	// server.
10689	googleapi.ServerResponse `json:"-"`
10690
10691	// ForceSendFields is a list of field names (e.g. "AccountId") to
10692	// unconditionally include in API requests. By default, fields with
10693	// empty values are omitted from API requests. However, any non-pointer,
10694	// non-interface field appearing in ForceSendFields will be sent to the
10695	// server regardless of whether the field is empty or not. This may be
10696	// used to include empty fields in Patch requests.
10697	ForceSendFields []string `json:"-"`
10698
10699	// NullFields is a list of field names (e.g. "AccountId") to include in
10700	// API requests with the JSON null value. By default, fields with empty
10701	// values are omitted from API requests. However, any field with an
10702	// empty value appearing in NullFields will be sent to the server as
10703	// null. It is an error if a field in this list has a non-empty value.
10704	// This may be used to include null fields in Patch requests.
10705	NullFields []string `json:"-"`
10706}
10707
10708func (s *Placement) MarshalJSON() ([]byte, error) {
10709	type NoMethod Placement
10710	raw := NoMethod(*s)
10711	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10712}
10713
10714// PlacementAssignment: Placement Assignment.
10715type PlacementAssignment struct {
10716	// Active: Whether this placement assignment is active. When true, the
10717	// placement will be included in the ad's rotation.
10718	Active bool `json:"active,omitempty"`
10719
10720	// PlacementId: ID of the placement to be assigned. This is a required
10721	// field.
10722	PlacementId int64 `json:"placementId,omitempty,string"`
10723
10724	// PlacementIdDimensionValue: Dimension value for the ID of the
10725	// placement. This is a read-only, auto-generated field.
10726	PlacementIdDimensionValue *DimensionValue `json:"placementIdDimensionValue,omitempty"`
10727
10728	// SslRequired: Whether the placement to be assigned requires SSL. This
10729	// is a read-only field that is auto-generated when the ad is inserted
10730	// or updated.
10731	SslRequired bool `json:"sslRequired,omitempty"`
10732
10733	// ForceSendFields is a list of field names (e.g. "Active") to
10734	// unconditionally include in API requests. By default, fields with
10735	// empty values are omitted from API requests. However, any non-pointer,
10736	// non-interface field appearing in ForceSendFields will be sent to the
10737	// server regardless of whether the field is empty or not. This may be
10738	// used to include empty fields in Patch requests.
10739	ForceSendFields []string `json:"-"`
10740
10741	// NullFields is a list of field names (e.g. "Active") to include in API
10742	// requests with the JSON null value. By default, fields with empty
10743	// values are omitted from API requests. However, any field with an
10744	// empty value appearing in NullFields will be sent to the server as
10745	// null. It is an error if a field in this list has a non-empty value.
10746	// This may be used to include null fields in Patch requests.
10747	NullFields []string `json:"-"`
10748}
10749
10750func (s *PlacementAssignment) MarshalJSON() ([]byte, error) {
10751	type NoMethod PlacementAssignment
10752	raw := NoMethod(*s)
10753	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10754}
10755
10756// PlacementGroup: Contains properties of a package or roadblock.
10757type PlacementGroup struct {
10758	// AccountId: Account ID of this placement group. This is a read-only
10759	// field that can be left blank.
10760	AccountId int64 `json:"accountId,omitempty,string"`
10761
10762	// AdvertiserId: Advertiser ID of this placement group. This is a
10763	// required field on insertion.
10764	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10765
10766	// AdvertiserIdDimensionValue: Dimension value for the ID of the
10767	// advertiser. This is a read-only, auto-generated field.
10768	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
10769
10770	// Archived: Whether this placement group is archived.
10771	Archived bool `json:"archived,omitempty"`
10772
10773	// CampaignId: Campaign ID of this placement group. This field is
10774	// required on insertion.
10775	CampaignId int64 `json:"campaignId,omitempty,string"`
10776
10777	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
10778	// This is a read-only, auto-generated field.
10779	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
10780
10781	// ChildPlacementIds: IDs of placements which are assigned to this
10782	// placement group. This is a read-only, auto-generated field.
10783	ChildPlacementIds googleapi.Int64s `json:"childPlacementIds,omitempty"`
10784
10785	// Comment: Comments for this placement group.
10786	Comment string `json:"comment,omitempty"`
10787
10788	// ContentCategoryId: ID of the content category assigned to this
10789	// placement group.
10790	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
10791
10792	// CreateInfo: Information about the creation of this placement group.
10793	// This is a read-only field.
10794	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
10795
10796	// DirectorySiteId: Directory site ID associated with this placement
10797	// group. On insert, you must set either this field or the site_id field
10798	// to specify the site associated with this placement group. This is a
10799	// required field that is read-only after insertion.
10800	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
10801
10802	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
10803	// directory site. This is a read-only, auto-generated field.
10804	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
10805
10806	// ExternalId: External ID for this placement.
10807	ExternalId string `json:"externalId,omitempty"`
10808
10809	// Id: ID of this placement group. This is a read-only, auto-generated
10810	// field.
10811	Id int64 `json:"id,omitempty,string"`
10812
10813	// IdDimensionValue: Dimension value for the ID of this placement group.
10814	// This is a read-only, auto-generated field.
10815	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
10816
10817	// Kind: Identifies what kind of resource this is. Value: the fixed
10818	// string "dfareporting#placementGroup".
10819	Kind string `json:"kind,omitempty"`
10820
10821	// LastModifiedInfo: Information about the most recent modification of
10822	// this placement group. This is a read-only field.
10823	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10824
10825	// Name: Name of this placement group. This is a required field and must
10826	// be less than 256 characters long.
10827	Name string `json:"name,omitempty"`
10828
10829	// PlacementGroupType: Type of this placement group. A package is a
10830	// simple group of placements that acts as a single pricing point for a
10831	// group of tags. A roadblock is a group of placements that not only
10832	// acts as a single pricing point, but also assumes that all the tags in
10833	// it will be served at the same time. A roadblock requires one of its
10834	// assigned placements to be marked as primary for reporting. This field
10835	// is required on insertion.
10836	//
10837	// Possible values:
10838	//   "PLACEMENT_PACKAGE"
10839	//   "PLACEMENT_ROADBLOCK"
10840	PlacementGroupType string `json:"placementGroupType,omitempty"`
10841
10842	// PlacementStrategyId: ID of the placement strategy assigned to this
10843	// placement group.
10844	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
10845
10846	// PricingSchedule: Pricing schedule of this placement group. This field
10847	// is required on insertion.
10848	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
10849
10850	// PrimaryPlacementId: ID of the primary placement, used to calculate
10851	// the media cost of a roadblock (placement group). Modifying this field
10852	// will automatically modify the primary field on all affected roadblock
10853	// child placements.
10854	PrimaryPlacementId int64 `json:"primaryPlacementId,omitempty,string"`
10855
10856	// PrimaryPlacementIdDimensionValue: Dimension value for the ID of the
10857	// primary placement. This is a read-only, auto-generated field.
10858	PrimaryPlacementIdDimensionValue *DimensionValue `json:"primaryPlacementIdDimensionValue,omitempty"`
10859
10860	// SiteId: Site ID associated with this placement group. On insert, you
10861	// must set either this field or the directorySiteId field to specify
10862	// the site associated with this placement group. This is a required
10863	// field that is read-only after insertion.
10864	SiteId int64 `json:"siteId,omitempty,string"`
10865
10866	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
10867	// a read-only, auto-generated field.
10868	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
10869
10870	// SubaccountId: Subaccount ID of this placement group. This is a
10871	// read-only field that can be left blank.
10872	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10873
10874	// ServerResponse contains the HTTP response code and headers from the
10875	// server.
10876	googleapi.ServerResponse `json:"-"`
10877
10878	// ForceSendFields is a list of field names (e.g. "AccountId") to
10879	// unconditionally include in API requests. By default, fields with
10880	// empty values are omitted from API requests. However, any non-pointer,
10881	// non-interface field appearing in ForceSendFields will be sent to the
10882	// server regardless of whether the field is empty or not. This may be
10883	// used to include empty fields in Patch requests.
10884	ForceSendFields []string `json:"-"`
10885
10886	// NullFields is a list of field names (e.g. "AccountId") to include in
10887	// API requests with the JSON null value. By default, fields with empty
10888	// values are omitted from API requests. However, any field with an
10889	// empty value appearing in NullFields will be sent to the server as
10890	// null. It is an error if a field in this list has a non-empty value.
10891	// This may be used to include null fields in Patch requests.
10892	NullFields []string `json:"-"`
10893}
10894
10895func (s *PlacementGroup) MarshalJSON() ([]byte, error) {
10896	type NoMethod PlacementGroup
10897	raw := NoMethod(*s)
10898	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10899}
10900
10901// PlacementGroupsListResponse: Placement Group List Response
10902type PlacementGroupsListResponse struct {
10903	// Kind: Identifies what kind of resource this is. Value: the fixed
10904	// string "dfareporting#placementGroupsListResponse".
10905	Kind string `json:"kind,omitempty"`
10906
10907	// NextPageToken: Pagination token to be used for the next list
10908	// operation.
10909	NextPageToken string `json:"nextPageToken,omitempty"`
10910
10911	// PlacementGroups: Placement group collection.
10912	PlacementGroups []*PlacementGroup `json:"placementGroups,omitempty"`
10913
10914	// ServerResponse contains the HTTP response code and headers from the
10915	// server.
10916	googleapi.ServerResponse `json:"-"`
10917
10918	// ForceSendFields is a list of field names (e.g. "Kind") to
10919	// unconditionally include in API requests. By default, fields with
10920	// empty values are omitted from API requests. However, any non-pointer,
10921	// non-interface field appearing in ForceSendFields will be sent to the
10922	// server regardless of whether the field is empty or not. This may be
10923	// used to include empty fields in Patch requests.
10924	ForceSendFields []string `json:"-"`
10925
10926	// NullFields is a list of field names (e.g. "Kind") to include in API
10927	// requests with the JSON null value. By default, fields with empty
10928	// values are omitted from API requests. However, any field with an
10929	// empty value appearing in NullFields will be sent to the server as
10930	// null. It is an error if a field in this list has a non-empty value.
10931	// This may be used to include null fields in Patch requests.
10932	NullFields []string `json:"-"`
10933}
10934
10935func (s *PlacementGroupsListResponse) MarshalJSON() ([]byte, error) {
10936	type NoMethod PlacementGroupsListResponse
10937	raw := NoMethod(*s)
10938	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10939}
10940
10941// PlacementStrategiesListResponse: Placement Strategy List Response
10942type PlacementStrategiesListResponse struct {
10943	// Kind: Identifies what kind of resource this is. Value: the fixed
10944	// string "dfareporting#placementStrategiesListResponse".
10945	Kind string `json:"kind,omitempty"`
10946
10947	// NextPageToken: Pagination token to be used for the next list
10948	// operation.
10949	NextPageToken string `json:"nextPageToken,omitempty"`
10950
10951	// PlacementStrategies: Placement strategy collection.
10952	PlacementStrategies []*PlacementStrategy `json:"placementStrategies,omitempty"`
10953
10954	// ServerResponse contains the HTTP response code and headers from the
10955	// server.
10956	googleapi.ServerResponse `json:"-"`
10957
10958	// ForceSendFields is a list of field names (e.g. "Kind") to
10959	// unconditionally include in API requests. By default, fields with
10960	// empty values are omitted from API requests. However, any non-pointer,
10961	// non-interface field appearing in ForceSendFields will be sent to the
10962	// server regardless of whether the field is empty or not. This may be
10963	// used to include empty fields in Patch requests.
10964	ForceSendFields []string `json:"-"`
10965
10966	// NullFields is a list of field names (e.g. "Kind") to include in API
10967	// requests with the JSON null value. By default, fields with empty
10968	// values are omitted from API requests. However, any field with an
10969	// empty value appearing in NullFields will be sent to the server as
10970	// null. It is an error if a field in this list has a non-empty value.
10971	// This may be used to include null fields in Patch requests.
10972	NullFields []string `json:"-"`
10973}
10974
10975func (s *PlacementStrategiesListResponse) MarshalJSON() ([]byte, error) {
10976	type NoMethod PlacementStrategiesListResponse
10977	raw := NoMethod(*s)
10978	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10979}
10980
10981// PlacementStrategy: Contains properties of a placement strategy.
10982type PlacementStrategy struct {
10983	// AccountId: Account ID of this placement strategy.This is a read-only
10984	// field that can be left blank.
10985	AccountId int64 `json:"accountId,omitempty,string"`
10986
10987	// Id: ID of this placement strategy. This is a read-only,
10988	// auto-generated field.
10989	Id int64 `json:"id,omitempty,string"`
10990
10991	// Kind: Identifies what kind of resource this is. Value: the fixed
10992	// string "dfareporting#placementStrategy".
10993	Kind string `json:"kind,omitempty"`
10994
10995	// Name: Name of this placement strategy. This is a required field. It
10996	// must be less than 256 characters long and unique among placement
10997	// strategies of the same account.
10998	Name string `json:"name,omitempty"`
10999
11000	// ServerResponse contains the HTTP response code and headers from the
11001	// server.
11002	googleapi.ServerResponse `json:"-"`
11003
11004	// ForceSendFields is a list of field names (e.g. "AccountId") to
11005	// unconditionally include in API requests. By default, fields with
11006	// empty values are omitted from API requests. However, any non-pointer,
11007	// non-interface field appearing in ForceSendFields will be sent to the
11008	// server regardless of whether the field is empty or not. This may be
11009	// used to include empty fields in Patch requests.
11010	ForceSendFields []string `json:"-"`
11011
11012	// NullFields is a list of field names (e.g. "AccountId") to include in
11013	// API requests with the JSON null value. By default, fields with empty
11014	// values are omitted from API requests. However, any field with an
11015	// empty value appearing in NullFields will be sent to the server as
11016	// null. It is an error if a field in this list has a non-empty value.
11017	// This may be used to include null fields in Patch requests.
11018	NullFields []string `json:"-"`
11019}
11020
11021func (s *PlacementStrategy) MarshalJSON() ([]byte, error) {
11022	type NoMethod PlacementStrategy
11023	raw := NoMethod(*s)
11024	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11025}
11026
11027// PlacementTag: Placement Tag
11028type PlacementTag struct {
11029	// PlacementId: Placement ID
11030	PlacementId int64 `json:"placementId,omitempty,string"`
11031
11032	// TagDatas: Tags generated for this placement.
11033	TagDatas []*TagData `json:"tagDatas,omitempty"`
11034
11035	// ForceSendFields is a list of field names (e.g. "PlacementId") to
11036	// unconditionally include in API requests. By default, fields with
11037	// empty values are omitted from API requests. However, any non-pointer,
11038	// non-interface field appearing in ForceSendFields will be sent to the
11039	// server regardless of whether the field is empty or not. This may be
11040	// used to include empty fields in Patch requests.
11041	ForceSendFields []string `json:"-"`
11042
11043	// NullFields is a list of field names (e.g. "PlacementId") to include
11044	// in API requests with the JSON null value. By default, fields with
11045	// empty values are omitted from API requests. However, any field with
11046	// an empty value appearing in NullFields will be sent to the server as
11047	// null. It is an error if a field in this list has a non-empty value.
11048	// This may be used to include null fields in Patch requests.
11049	NullFields []string `json:"-"`
11050}
11051
11052func (s *PlacementTag) MarshalJSON() ([]byte, error) {
11053	type NoMethod PlacementTag
11054	raw := NoMethod(*s)
11055	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11056}
11057
11058// PlacementsGenerateTagsResponse: Placement GenerateTags Response
11059type PlacementsGenerateTagsResponse struct {
11060	// Kind: Identifies what kind of resource this is. Value: the fixed
11061	// string "dfareporting#placementsGenerateTagsResponse".
11062	Kind string `json:"kind,omitempty"`
11063
11064	// PlacementTags: Set of generated tags for the specified placements.
11065	PlacementTags []*PlacementTag `json:"placementTags,omitempty"`
11066
11067	// ServerResponse contains the HTTP response code and headers from the
11068	// server.
11069	googleapi.ServerResponse `json:"-"`
11070
11071	// ForceSendFields is a list of field names (e.g. "Kind") to
11072	// unconditionally include in API requests. By default, fields with
11073	// empty values are omitted from API requests. However, any non-pointer,
11074	// non-interface field appearing in ForceSendFields will be sent to the
11075	// server regardless of whether the field is empty or not. This may be
11076	// used to include empty fields in Patch requests.
11077	ForceSendFields []string `json:"-"`
11078
11079	// NullFields is a list of field names (e.g. "Kind") to include in API
11080	// requests with the JSON null value. By default, fields with empty
11081	// values are omitted from API requests. However, any field with an
11082	// empty value appearing in NullFields will be sent to the server as
11083	// null. It is an error if a field in this list has a non-empty value.
11084	// This may be used to include null fields in Patch requests.
11085	NullFields []string `json:"-"`
11086}
11087
11088func (s *PlacementsGenerateTagsResponse) MarshalJSON() ([]byte, error) {
11089	type NoMethod PlacementsGenerateTagsResponse
11090	raw := NoMethod(*s)
11091	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11092}
11093
11094// PlacementsListResponse: Placement List Response
11095type PlacementsListResponse struct {
11096	// Kind: Identifies what kind of resource this is. Value: the fixed
11097	// string "dfareporting#placementsListResponse".
11098	Kind string `json:"kind,omitempty"`
11099
11100	// NextPageToken: Pagination token to be used for the next list
11101	// operation.
11102	NextPageToken string `json:"nextPageToken,omitempty"`
11103
11104	// Placements: Placement collection.
11105	Placements []*Placement `json:"placements,omitempty"`
11106
11107	// ServerResponse contains the HTTP response code and headers from the
11108	// server.
11109	googleapi.ServerResponse `json:"-"`
11110
11111	// ForceSendFields is a list of field names (e.g. "Kind") to
11112	// unconditionally include in API requests. By default, fields with
11113	// empty values are omitted from API requests. However, any non-pointer,
11114	// non-interface field appearing in ForceSendFields will be sent to the
11115	// server regardless of whether the field is empty or not. This may be
11116	// used to include empty fields in Patch requests.
11117	ForceSendFields []string `json:"-"`
11118
11119	// NullFields is a list of field names (e.g. "Kind") to include in API
11120	// requests with the JSON null value. By default, fields with empty
11121	// values are omitted from API requests. However, any field with an
11122	// empty value appearing in NullFields will be sent to the server as
11123	// null. It is an error if a field in this list has a non-empty value.
11124	// This may be used to include null fields in Patch requests.
11125	NullFields []string `json:"-"`
11126}
11127
11128func (s *PlacementsListResponse) MarshalJSON() ([]byte, error) {
11129	type NoMethod PlacementsListResponse
11130	raw := NoMethod(*s)
11131	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11132}
11133
11134// PlatformType: Contains information about a platform type that can be
11135// targeted by ads.
11136type PlatformType struct {
11137	// Id: ID of this platform type.
11138	Id int64 `json:"id,omitempty,string"`
11139
11140	// Kind: Identifies what kind of resource this is. Value: the fixed
11141	// string "dfareporting#platformType".
11142	Kind string `json:"kind,omitempty"`
11143
11144	// Name: Name of this platform type.
11145	Name string `json:"name,omitempty"`
11146
11147	// ServerResponse contains the HTTP response code and headers from the
11148	// server.
11149	googleapi.ServerResponse `json:"-"`
11150
11151	// ForceSendFields is a list of field names (e.g. "Id") to
11152	// unconditionally include in API requests. By default, fields with
11153	// empty values are omitted from API requests. However, any non-pointer,
11154	// non-interface field appearing in ForceSendFields will be sent to the
11155	// server regardless of whether the field is empty or not. This may be
11156	// used to include empty fields in Patch requests.
11157	ForceSendFields []string `json:"-"`
11158
11159	// NullFields is a list of field names (e.g. "Id") to include in API
11160	// requests with the JSON null value. By default, fields with empty
11161	// values are omitted from API requests. However, any field with an
11162	// empty value appearing in NullFields will be sent to the server as
11163	// null. It is an error if a field in this list has a non-empty value.
11164	// This may be used to include null fields in Patch requests.
11165	NullFields []string `json:"-"`
11166}
11167
11168func (s *PlatformType) MarshalJSON() ([]byte, error) {
11169	type NoMethod PlatformType
11170	raw := NoMethod(*s)
11171	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11172}
11173
11174// PlatformTypesListResponse: Platform Type List Response
11175type PlatformTypesListResponse struct {
11176	// Kind: Identifies what kind of resource this is. Value: the fixed
11177	// string "dfareporting#platformTypesListResponse".
11178	Kind string `json:"kind,omitempty"`
11179
11180	// PlatformTypes: Platform type collection.
11181	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
11182
11183	// ServerResponse contains the HTTP response code and headers from the
11184	// server.
11185	googleapi.ServerResponse `json:"-"`
11186
11187	// ForceSendFields is a list of field names (e.g. "Kind") to
11188	// unconditionally include in API requests. By default, fields with
11189	// empty values are omitted from API requests. However, any non-pointer,
11190	// non-interface field appearing in ForceSendFields will be sent to the
11191	// server regardless of whether the field is empty or not. This may be
11192	// used to include empty fields in Patch requests.
11193	ForceSendFields []string `json:"-"`
11194
11195	// NullFields is a list of field names (e.g. "Kind") to include in API
11196	// requests with the JSON null value. By default, fields with empty
11197	// values are omitted from API requests. However, any field with an
11198	// empty value appearing in NullFields will be sent to the server as
11199	// null. It is an error if a field in this list has a non-empty value.
11200	// This may be used to include null fields in Patch requests.
11201	NullFields []string `json:"-"`
11202}
11203
11204func (s *PlatformTypesListResponse) MarshalJSON() ([]byte, error) {
11205	type NoMethod PlatformTypesListResponse
11206	raw := NoMethod(*s)
11207	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11208}
11209
11210// PopupWindowProperties: Popup Window Properties.
11211type PopupWindowProperties struct {
11212	// Dimension: Popup dimension for a creative. This is a read-only field.
11213	// Applicable to the following creative types: all RICH_MEDIA and all
11214	// VPAID
11215	Dimension *Size `json:"dimension,omitempty"`
11216
11217	// Offset: Upper-left corner coordinates of the popup window. Applicable
11218	// if positionType is COORDINATES.
11219	Offset *OffsetPosition `json:"offset,omitempty"`
11220
11221	// PositionType: Popup window position either centered or at specific
11222	// coordinate.
11223	//
11224	// Possible values:
11225	//   "CENTER"
11226	//   "COORDINATES"
11227	PositionType string `json:"positionType,omitempty"`
11228
11229	// ShowAddressBar: Whether to display the browser address bar.
11230	ShowAddressBar bool `json:"showAddressBar,omitempty"`
11231
11232	// ShowMenuBar: Whether to display the browser menu bar.
11233	ShowMenuBar bool `json:"showMenuBar,omitempty"`
11234
11235	// ShowScrollBar: Whether to display the browser scroll bar.
11236	ShowScrollBar bool `json:"showScrollBar,omitempty"`
11237
11238	// ShowStatusBar: Whether to display the browser status bar.
11239	ShowStatusBar bool `json:"showStatusBar,omitempty"`
11240
11241	// ShowToolBar: Whether to display the browser tool bar.
11242	ShowToolBar bool `json:"showToolBar,omitempty"`
11243
11244	// Title: Title of popup window.
11245	Title string `json:"title,omitempty"`
11246
11247	// ForceSendFields is a list of field names (e.g. "Dimension") to
11248	// unconditionally include in API requests. By default, fields with
11249	// empty values are omitted from API requests. However, any non-pointer,
11250	// non-interface field appearing in ForceSendFields will be sent to the
11251	// server regardless of whether the field is empty or not. This may be
11252	// used to include empty fields in Patch requests.
11253	ForceSendFields []string `json:"-"`
11254
11255	// NullFields is a list of field names (e.g. "Dimension") to include in
11256	// API requests with the JSON null value. By default, fields with empty
11257	// values are omitted from API requests. However, any field with an
11258	// empty value appearing in NullFields will be sent to the server as
11259	// null. It is an error if a field in this list has a non-empty value.
11260	// This may be used to include null fields in Patch requests.
11261	NullFields []string `json:"-"`
11262}
11263
11264func (s *PopupWindowProperties) MarshalJSON() ([]byte, error) {
11265	type NoMethod PopupWindowProperties
11266	raw := NoMethod(*s)
11267	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11268}
11269
11270// PostalCode: Contains information about a postal code that can be
11271// targeted by ads.
11272type PostalCode struct {
11273	// Code: Postal code. This is equivalent to the id field.
11274	Code string `json:"code,omitempty"`
11275
11276	// CountryCode: Country code of the country to which this postal code
11277	// belongs.
11278	CountryCode string `json:"countryCode,omitempty"`
11279
11280	// CountryDartId: DART ID of the country to which this postal code
11281	// belongs.
11282	CountryDartId int64 `json:"countryDartId,omitempty,string"`
11283
11284	// Id: ID of this postal code.
11285	Id string `json:"id,omitempty"`
11286
11287	// Kind: Identifies what kind of resource this is. Value: the fixed
11288	// string "dfareporting#postalCode".
11289	Kind string `json:"kind,omitempty"`
11290
11291	// ServerResponse contains the HTTP response code and headers from the
11292	// server.
11293	googleapi.ServerResponse `json:"-"`
11294
11295	// ForceSendFields is a list of field names (e.g. "Code") to
11296	// unconditionally include in API requests. By default, fields with
11297	// empty values are omitted from API requests. However, any non-pointer,
11298	// non-interface field appearing in ForceSendFields will be sent to the
11299	// server regardless of whether the field is empty or not. This may be
11300	// used to include empty fields in Patch requests.
11301	ForceSendFields []string `json:"-"`
11302
11303	// NullFields is a list of field names (e.g. "Code") to include in API
11304	// requests with the JSON null value. By default, fields with empty
11305	// values are omitted from API requests. However, any field with an
11306	// empty value appearing in NullFields will be sent to the server as
11307	// null. It is an error if a field in this list has a non-empty value.
11308	// This may be used to include null fields in Patch requests.
11309	NullFields []string `json:"-"`
11310}
11311
11312func (s *PostalCode) MarshalJSON() ([]byte, error) {
11313	type NoMethod PostalCode
11314	raw := NoMethod(*s)
11315	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11316}
11317
11318// PostalCodesListResponse: Postal Code List Response
11319type PostalCodesListResponse struct {
11320	// Kind: Identifies what kind of resource this is. Value: the fixed
11321	// string "dfareporting#postalCodesListResponse".
11322	Kind string `json:"kind,omitempty"`
11323
11324	// PostalCodes: Postal code collection.
11325	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
11326
11327	// ServerResponse contains the HTTP response code and headers from the
11328	// server.
11329	googleapi.ServerResponse `json:"-"`
11330
11331	// ForceSendFields is a list of field names (e.g. "Kind") to
11332	// unconditionally include in API requests. By default, fields with
11333	// empty values are omitted from API requests. However, any non-pointer,
11334	// non-interface field appearing in ForceSendFields will be sent to the
11335	// server regardless of whether the field is empty or not. This may be
11336	// used to include empty fields in Patch requests.
11337	ForceSendFields []string `json:"-"`
11338
11339	// NullFields is a list of field names (e.g. "Kind") to include in API
11340	// requests with the JSON null value. By default, fields with empty
11341	// values are omitted from API requests. However, any field with an
11342	// empty value appearing in NullFields will be sent to the server as
11343	// null. It is an error if a field in this list has a non-empty value.
11344	// This may be used to include null fields in Patch requests.
11345	NullFields []string `json:"-"`
11346}
11347
11348func (s *PostalCodesListResponse) MarshalJSON() ([]byte, error) {
11349	type NoMethod PostalCodesListResponse
11350	raw := NoMethod(*s)
11351	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11352}
11353
11354// Pricing: Pricing Information
11355type Pricing struct {
11356	// CapCostType: Cap cost type of this inventory item.
11357	//
11358	// Possible values:
11359	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_NONE"
11360	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_MONTHLY"
11361	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_CUMULATIVE"
11362	CapCostType string `json:"capCostType,omitempty"`
11363
11364	EndDate string `json:"endDate,omitempty"`
11365
11366	// Flights: Flights of this inventory item. A flight (a.k.a. pricing
11367	// period) represents the inventory item pricing information for a
11368	// specific period of time.
11369	Flights []*Flight `json:"flights,omitempty"`
11370
11371	// GroupType: Group type of this inventory item if it represents a
11372	// placement group. Is null otherwise. There are two type of placement
11373	// groups: PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE is a simple group of
11374	// inventory items that acts as a single pricing point for a group of
11375	// tags. PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK is a group of inventory
11376	// items that not only acts as a single pricing point, but also assumes
11377	// that all the tags in it will be served at the same time. A roadblock
11378	// requires one of its assigned inventory items to be marked as primary.
11379	//
11380	// Possible values:
11381	//   "PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE"
11382	//   "PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK"
11383	GroupType string `json:"groupType,omitempty"`
11384
11385	// PricingType: Pricing type of this inventory item.
11386	//
11387	// Possible values:
11388	//   "PLANNING_PLACEMENT_PRICING_TYPE_IMPRESSIONS"
11389	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM"
11390	//   "PLANNING_PLACEMENT_PRICING_TYPE_CLICKS"
11391	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPC"
11392	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPA"
11393	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
11394	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_CLICKS"
11395	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM_ACTIVEVIEW"
11396	PricingType string `json:"pricingType,omitempty"`
11397
11398	StartDate string `json:"startDate,omitempty"`
11399
11400	// ForceSendFields is a list of field names (e.g. "CapCostType") to
11401	// unconditionally include in API requests. By default, fields with
11402	// empty values are omitted from API requests. However, any non-pointer,
11403	// non-interface field appearing in ForceSendFields will be sent to the
11404	// server regardless of whether the field is empty or not. This may be
11405	// used to include empty fields in Patch requests.
11406	ForceSendFields []string `json:"-"`
11407
11408	// NullFields is a list of field names (e.g. "CapCostType") to include
11409	// in API requests with the JSON null value. By default, fields with
11410	// empty values are omitted from API requests. However, any field with
11411	// an empty value appearing in NullFields will be sent to the server as
11412	// null. It is an error if a field in this list has a non-empty value.
11413	// This may be used to include null fields in Patch requests.
11414	NullFields []string `json:"-"`
11415}
11416
11417func (s *Pricing) MarshalJSON() ([]byte, error) {
11418	type NoMethod Pricing
11419	raw := NoMethod(*s)
11420	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11421}
11422
11423// PricingSchedule: Pricing Schedule
11424type PricingSchedule struct {
11425	// CapCostOption: Placement cap cost option.
11426	//
11427	// Possible values:
11428	//   "CAP_COST_NONE"
11429	//   "CAP_COST_MONTHLY"
11430	//   "CAP_COST_CUMULATIVE"
11431	CapCostOption string `json:"capCostOption,omitempty"`
11432
11433	EndDate string `json:"endDate,omitempty"`
11434
11435	// Flighted: Whether this placement is flighted. If true, pricing
11436	// periods will be computed automatically.
11437	Flighted bool `json:"flighted,omitempty"`
11438
11439	// FloodlightActivityId: Floodlight activity ID associated with this
11440	// placement. This field should be set when placement pricing type is
11441	// set to PRICING_TYPE_CPA.
11442	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
11443
11444	// PricingPeriods: Pricing periods for this placement.
11445	PricingPeriods []*PricingSchedulePricingPeriod `json:"pricingPeriods,omitempty"`
11446
11447	// PricingType: Placement pricing type. This field is required on
11448	// insertion.
11449	//
11450	// Possible values:
11451	//   "PRICING_TYPE_CPM"
11452	//   "PRICING_TYPE_CPC"
11453	//   "PRICING_TYPE_CPA"
11454	//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
11455	//   "PRICING_TYPE_FLAT_RATE_CLICKS"
11456	//   "PRICING_TYPE_CPM_ACTIVEVIEW"
11457	PricingType string `json:"pricingType,omitempty"`
11458
11459	StartDate string `json:"startDate,omitempty"`
11460
11461	TestingStartDate string `json:"testingStartDate,omitempty"`
11462
11463	// ForceSendFields is a list of field names (e.g. "CapCostOption") to
11464	// unconditionally include in API requests. By default, fields with
11465	// empty values are omitted from API requests. However, any non-pointer,
11466	// non-interface field appearing in ForceSendFields will be sent to the
11467	// server regardless of whether the field is empty or not. This may be
11468	// used to include empty fields in Patch requests.
11469	ForceSendFields []string `json:"-"`
11470
11471	// NullFields is a list of field names (e.g. "CapCostOption") to include
11472	// in API requests with the JSON null value. By default, fields with
11473	// empty values are omitted from API requests. However, any field with
11474	// an empty value appearing in NullFields will be sent to the server as
11475	// null. It is an error if a field in this list has a non-empty value.
11476	// This may be used to include null fields in Patch requests.
11477	NullFields []string `json:"-"`
11478}
11479
11480func (s *PricingSchedule) MarshalJSON() ([]byte, error) {
11481	type NoMethod PricingSchedule
11482	raw := NoMethod(*s)
11483	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11484}
11485
11486// PricingSchedulePricingPeriod: Pricing Period
11487type PricingSchedulePricingPeriod struct {
11488	EndDate string `json:"endDate,omitempty"`
11489
11490	// PricingComment: Comments for this pricing period.
11491	PricingComment string `json:"pricingComment,omitempty"`
11492
11493	// RateOrCostNanos: Rate or cost of this pricing period in nanos (i.e.,
11494	// multipled by 1000000000). Acceptable values are 0 to
11495	// 1000000000000000000, inclusive.
11496	RateOrCostNanos int64 `json:"rateOrCostNanos,omitempty,string"`
11497
11498	StartDate string `json:"startDate,omitempty"`
11499
11500	// Units: Units of this pricing period. Acceptable values are 0 to
11501	// 10000000000, inclusive.
11502	Units int64 `json:"units,omitempty,string"`
11503
11504	// ForceSendFields is a list of field names (e.g. "EndDate") to
11505	// unconditionally include in API requests. By default, fields with
11506	// empty values are omitted from API requests. However, any non-pointer,
11507	// non-interface field appearing in ForceSendFields will be sent to the
11508	// server regardless of whether the field is empty or not. This may be
11509	// used to include empty fields in Patch requests.
11510	ForceSendFields []string `json:"-"`
11511
11512	// NullFields is a list of field names (e.g. "EndDate") to include in
11513	// API requests with the JSON null value. By default, fields with empty
11514	// values are omitted from API requests. However, any field with an
11515	// empty value appearing in NullFields will be sent to the server as
11516	// null. It is an error if a field in this list has a non-empty value.
11517	// This may be used to include null fields in Patch requests.
11518	NullFields []string `json:"-"`
11519}
11520
11521func (s *PricingSchedulePricingPeriod) MarshalJSON() ([]byte, error) {
11522	type NoMethod PricingSchedulePricingPeriod
11523	raw := NoMethod(*s)
11524	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11525}
11526
11527// Project: Contains properties of a Planning project.
11528type Project struct {
11529	// AccountId: Account ID of this project.
11530	AccountId int64 `json:"accountId,omitempty,string"`
11531
11532	// AdvertiserId: Advertiser ID of this project.
11533	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11534
11535	// AudienceAgeGroup: Audience age group of this project.
11536	//
11537	// Possible values:
11538	//   "PLANNING_AUDIENCE_AGE_18_24"
11539	//   "PLANNING_AUDIENCE_AGE_25_34"
11540	//   "PLANNING_AUDIENCE_AGE_35_44"
11541	//   "PLANNING_AUDIENCE_AGE_45_54"
11542	//   "PLANNING_AUDIENCE_AGE_55_64"
11543	//   "PLANNING_AUDIENCE_AGE_65_OR_MORE"
11544	//   "PLANNING_AUDIENCE_AGE_UNKNOWN"
11545	AudienceAgeGroup string `json:"audienceAgeGroup,omitempty"`
11546
11547	// AudienceGender: Audience gender of this project.
11548	//
11549	// Possible values:
11550	//   "PLANNING_AUDIENCE_GENDER_MALE"
11551	//   "PLANNING_AUDIENCE_GENDER_FEMALE"
11552	AudienceGender string `json:"audienceGender,omitempty"`
11553
11554	// Budget: Budget of this project in the currency specified by the
11555	// current account. The value stored in this field represents only the
11556	// non-fractional amount. For example, for USD, the smallest value that
11557	// can be represented by this field is 1 US dollar.
11558	Budget int64 `json:"budget,omitempty,string"`
11559
11560	// ClientBillingCode: Client billing code of this project.
11561	ClientBillingCode string `json:"clientBillingCode,omitempty"`
11562
11563	// ClientName: Name of the project client.
11564	ClientName string `json:"clientName,omitempty"`
11565
11566	EndDate string `json:"endDate,omitempty"`
11567
11568	// Id: ID of this project. This is a read-only, auto-generated field.
11569	Id int64 `json:"id,omitempty,string"`
11570
11571	// Kind: Identifies what kind of resource this is. Value: the fixed
11572	// string "dfareporting#project".
11573	Kind string `json:"kind,omitempty"`
11574
11575	// LastModifiedInfo: Information about the most recent modification of
11576	// this project.
11577	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
11578
11579	// Name: Name of this project.
11580	Name string `json:"name,omitempty"`
11581
11582	// Overview: Overview of this project.
11583	Overview string `json:"overview,omitempty"`
11584
11585	StartDate string `json:"startDate,omitempty"`
11586
11587	// SubaccountId: Subaccount ID of this project.
11588	SubaccountId int64 `json:"subaccountId,omitempty,string"`
11589
11590	// TargetClicks: Number of clicks that the advertiser is targeting.
11591	TargetClicks int64 `json:"targetClicks,omitempty,string"`
11592
11593	// TargetConversions: Number of conversions that the advertiser is
11594	// targeting.
11595	TargetConversions int64 `json:"targetConversions,omitempty,string"`
11596
11597	// TargetCpaNanos: CPA that the advertiser is targeting.
11598	TargetCpaNanos int64 `json:"targetCpaNanos,omitempty,string"`
11599
11600	// TargetCpcNanos: CPC that the advertiser is targeting.
11601	TargetCpcNanos int64 `json:"targetCpcNanos,omitempty,string"`
11602
11603	// TargetCpmActiveViewNanos: vCPM from Active View that the advertiser
11604	// is targeting.
11605	TargetCpmActiveViewNanos int64 `json:"targetCpmActiveViewNanos,omitempty,string"`
11606
11607	// TargetCpmNanos: CPM that the advertiser is targeting.
11608	TargetCpmNanos int64 `json:"targetCpmNanos,omitempty,string"`
11609
11610	// TargetImpressions: Number of impressions that the advertiser is
11611	// targeting.
11612	TargetImpressions int64 `json:"targetImpressions,omitempty,string"`
11613
11614	// ServerResponse contains the HTTP response code and headers from the
11615	// server.
11616	googleapi.ServerResponse `json:"-"`
11617
11618	// ForceSendFields is a list of field names (e.g. "AccountId") to
11619	// unconditionally include in API requests. By default, fields with
11620	// empty values are omitted from API requests. However, any non-pointer,
11621	// non-interface field appearing in ForceSendFields will be sent to the
11622	// server regardless of whether the field is empty or not. This may be
11623	// used to include empty fields in Patch requests.
11624	ForceSendFields []string `json:"-"`
11625
11626	// NullFields is a list of field names (e.g. "AccountId") to include in
11627	// API requests with the JSON null value. By default, fields with empty
11628	// values are omitted from API requests. However, any field with an
11629	// empty value appearing in NullFields will be sent to the server as
11630	// null. It is an error if a field in this list has a non-empty value.
11631	// This may be used to include null fields in Patch requests.
11632	NullFields []string `json:"-"`
11633}
11634
11635func (s *Project) MarshalJSON() ([]byte, error) {
11636	type NoMethod Project
11637	raw := NoMethod(*s)
11638	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11639}
11640
11641// ProjectsListResponse: Project List Response
11642type ProjectsListResponse struct {
11643	// Kind: Identifies what kind of resource this is. Value: the fixed
11644	// string "dfareporting#projectsListResponse".
11645	Kind string `json:"kind,omitempty"`
11646
11647	// NextPageToken: Pagination token to be used for the next list
11648	// operation.
11649	NextPageToken string `json:"nextPageToken,omitempty"`
11650
11651	// Projects: Project collection.
11652	Projects []*Project `json:"projects,omitempty"`
11653
11654	// ServerResponse contains the HTTP response code and headers from the
11655	// server.
11656	googleapi.ServerResponse `json:"-"`
11657
11658	// ForceSendFields is a list of field names (e.g. "Kind") to
11659	// unconditionally include in API requests. By default, fields with
11660	// empty values are omitted from API requests. However, any non-pointer,
11661	// non-interface field appearing in ForceSendFields will be sent to the
11662	// server regardless of whether the field is empty or not. This may be
11663	// used to include empty fields in Patch requests.
11664	ForceSendFields []string `json:"-"`
11665
11666	// NullFields is a list of field names (e.g. "Kind") to include in API
11667	// requests with the JSON null value. By default, fields with empty
11668	// values are omitted from API requests. However, any field with an
11669	// empty value appearing in NullFields will be sent to the server as
11670	// null. It is an error if a field in this list has a non-empty value.
11671	// This may be used to include null fields in Patch requests.
11672	NullFields []string `json:"-"`
11673}
11674
11675func (s *ProjectsListResponse) MarshalJSON() ([]byte, error) {
11676	type NoMethod ProjectsListResponse
11677	raw := NoMethod(*s)
11678	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11679}
11680
11681// ReachReportCompatibleFields: Represents fields that are compatible to
11682// be selected for a report of type "REACH".
11683type ReachReportCompatibleFields struct {
11684	// DimensionFilters: Dimensions which are compatible to be selected in
11685	// the "dimensionFilters" section of the report.
11686	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
11687
11688	// Dimensions: Dimensions which are compatible to be selected in the
11689	// "dimensions" section of the report.
11690	Dimensions []*Dimension `json:"dimensions,omitempty"`
11691
11692	// Kind: The kind of resource this is, in this case
11693	// dfareporting#reachReportCompatibleFields.
11694	Kind string `json:"kind,omitempty"`
11695
11696	// Metrics: Metrics which are compatible to be selected in the
11697	// "metricNames" section of the report.
11698	Metrics []*Metric `json:"metrics,omitempty"`
11699
11700	// PivotedActivityMetrics: Metrics which are compatible to be selected
11701	// as activity metrics to pivot on in the "activities" section of the
11702	// report.
11703	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
11704
11705	// ReachByFrequencyMetrics: Metrics which are compatible to be selected
11706	// in the "reachByFrequencyMetricNames" section of the report.
11707	ReachByFrequencyMetrics []*Metric `json:"reachByFrequencyMetrics,omitempty"`
11708
11709	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
11710	// unconditionally include in API requests. By default, fields with
11711	// empty values are omitted from API requests. However, any non-pointer,
11712	// non-interface field appearing in ForceSendFields will be sent to the
11713	// server regardless of whether the field is empty or not. This may be
11714	// used to include empty fields in Patch requests.
11715	ForceSendFields []string `json:"-"`
11716
11717	// NullFields is a list of field names (e.g. "DimensionFilters") to
11718	// include in API requests with the JSON null value. By default, fields
11719	// with empty values are omitted from API requests. However, any field
11720	// with an empty value appearing in NullFields will be sent to the
11721	// server as null. It is an error if a field in this list has a
11722	// non-empty value. This may be used to include null fields in Patch
11723	// requests.
11724	NullFields []string `json:"-"`
11725}
11726
11727func (s *ReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
11728	type NoMethod ReachReportCompatibleFields
11729	raw := NoMethod(*s)
11730	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11731}
11732
11733// Recipient: Represents a recipient.
11734type Recipient struct {
11735	// DeliveryType: The delivery type for the recipient.
11736	//
11737	// Possible values:
11738	//   "LINK"
11739	//   "ATTACHMENT"
11740	DeliveryType string `json:"deliveryType,omitempty"`
11741
11742	// Email: The email address of the recipient.
11743	Email string `json:"email,omitempty"`
11744
11745	// Kind: The kind of resource this is, in this case
11746	// dfareporting#recipient.
11747	Kind string `json:"kind,omitempty"`
11748
11749	// ForceSendFields is a list of field names (e.g. "DeliveryType") to
11750	// unconditionally include in API requests. By default, fields with
11751	// empty values are omitted from API requests. However, any non-pointer,
11752	// non-interface field appearing in ForceSendFields will be sent to the
11753	// server regardless of whether the field is empty or not. This may be
11754	// used to include empty fields in Patch requests.
11755	ForceSendFields []string `json:"-"`
11756
11757	// NullFields is a list of field names (e.g. "DeliveryType") to include
11758	// in API requests with the JSON null value. By default, fields with
11759	// empty values are omitted from API requests. However, any field with
11760	// an empty value appearing in NullFields will be sent to the server as
11761	// null. It is an error if a field in this list has a non-empty value.
11762	// This may be used to include null fields in Patch requests.
11763	NullFields []string `json:"-"`
11764}
11765
11766func (s *Recipient) MarshalJSON() ([]byte, error) {
11767	type NoMethod Recipient
11768	raw := NoMethod(*s)
11769	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11770}
11771
11772// Region: Contains information about a region that can be targeted by
11773// ads.
11774type Region struct {
11775	// CountryCode: Country code of the country to which this region
11776	// belongs.
11777	CountryCode string `json:"countryCode,omitempty"`
11778
11779	// CountryDartId: DART ID of the country to which this region belongs.
11780	CountryDartId int64 `json:"countryDartId,omitempty,string"`
11781
11782	// DartId: DART ID of this region.
11783	DartId int64 `json:"dartId,omitempty,string"`
11784
11785	// Kind: Identifies what kind of resource this is. Value: the fixed
11786	// string "dfareporting#region".
11787	Kind string `json:"kind,omitempty"`
11788
11789	// Name: Name of this region.
11790	Name string `json:"name,omitempty"`
11791
11792	// RegionCode: Region code.
11793	RegionCode string `json:"regionCode,omitempty"`
11794
11795	// ForceSendFields is a list of field names (e.g. "CountryCode") to
11796	// unconditionally include in API requests. By default, fields with
11797	// empty values are omitted from API requests. However, any non-pointer,
11798	// non-interface field appearing in ForceSendFields will be sent to the
11799	// server regardless of whether the field is empty or not. This may be
11800	// used to include empty fields in Patch requests.
11801	ForceSendFields []string `json:"-"`
11802
11803	// NullFields is a list of field names (e.g. "CountryCode") to include
11804	// in API requests with the JSON null value. By default, fields with
11805	// empty values are omitted from API requests. However, any field with
11806	// an empty value appearing in NullFields will be sent to the server as
11807	// null. It is an error if a field in this list has a non-empty value.
11808	// This may be used to include null fields in Patch requests.
11809	NullFields []string `json:"-"`
11810}
11811
11812func (s *Region) MarshalJSON() ([]byte, error) {
11813	type NoMethod Region
11814	raw := NoMethod(*s)
11815	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11816}
11817
11818// RegionsListResponse: Region List Response
11819type RegionsListResponse struct {
11820	// Kind: Identifies what kind of resource this is. Value: the fixed
11821	// string "dfareporting#regionsListResponse".
11822	Kind string `json:"kind,omitempty"`
11823
11824	// Regions: Region collection.
11825	Regions []*Region `json:"regions,omitempty"`
11826
11827	// ServerResponse contains the HTTP response code and headers from the
11828	// server.
11829	googleapi.ServerResponse `json:"-"`
11830
11831	// ForceSendFields is a list of field names (e.g. "Kind") to
11832	// unconditionally include in API requests. By default, fields with
11833	// empty values are omitted from API requests. However, any non-pointer,
11834	// non-interface field appearing in ForceSendFields will be sent to the
11835	// server regardless of whether the field is empty or not. This may be
11836	// used to include empty fields in Patch requests.
11837	ForceSendFields []string `json:"-"`
11838
11839	// NullFields is a list of field names (e.g. "Kind") to include in API
11840	// requests with the JSON null value. By default, fields with empty
11841	// values are omitted from API requests. However, any field with an
11842	// empty value appearing in NullFields will be sent to the server as
11843	// null. It is an error if a field in this list has a non-empty value.
11844	// This may be used to include null fields in Patch requests.
11845	NullFields []string `json:"-"`
11846}
11847
11848func (s *RegionsListResponse) MarshalJSON() ([]byte, error) {
11849	type NoMethod RegionsListResponse
11850	raw := NoMethod(*s)
11851	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11852}
11853
11854// RemarketingList: Contains properties of a remarketing list.
11855// Remarketing enables you to create lists of users who have performed
11856// specific actions on a site, then target ads to members of those
11857// lists. This resource can be used to manage remarketing lists that are
11858// owned by your advertisers. To see all remarketing lists that are
11859// visible to your advertisers, including those that are shared to your
11860// advertiser or account, use the TargetableRemarketingLists resource.
11861type RemarketingList struct {
11862	// AccountId: Account ID of this remarketing list. This is a read-only,
11863	// auto-generated field that is only returned in GET requests.
11864	AccountId int64 `json:"accountId,omitempty,string"`
11865
11866	// Active: Whether this remarketing list is active.
11867	Active bool `json:"active,omitempty"`
11868
11869	// AdvertiserId: Dimension value for the advertiser ID that owns this
11870	// remarketing list. This is a required field.
11871	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11872
11873	// AdvertiserIdDimensionValue: Dimension value for the ID of the
11874	// advertiser. This is a read-only, auto-generated field.
11875	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
11876
11877	// Description: Remarketing list description.
11878	Description string `json:"description,omitempty"`
11879
11880	// Id: Remarketing list ID. This is a read-only, auto-generated field.
11881	Id int64 `json:"id,omitempty,string"`
11882
11883	// Kind: Identifies what kind of resource this is. Value: the fixed
11884	// string "dfareporting#remarketingList".
11885	Kind string `json:"kind,omitempty"`
11886
11887	// LifeSpan: Number of days that a user should remain in the remarketing
11888	// list without an impression. Acceptable values are 1 to 540,
11889	// inclusive.
11890	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
11891
11892	// ListPopulationRule: Rule used to populate the remarketing list with
11893	// users.
11894	ListPopulationRule *ListPopulationRule `json:"listPopulationRule,omitempty"`
11895
11896	// ListSize: Number of users currently in the list. This is a read-only
11897	// field.
11898	ListSize int64 `json:"listSize,omitempty,string"`
11899
11900	// ListSource: Product from which this remarketing list was originated.
11901	//
11902	// Possible values:
11903	//   "REMARKETING_LIST_SOURCE_OTHER"
11904	//   "REMARKETING_LIST_SOURCE_ADX"
11905	//   "REMARKETING_LIST_SOURCE_DFP"
11906	//   "REMARKETING_LIST_SOURCE_XFP"
11907	//   "REMARKETING_LIST_SOURCE_DFA"
11908	//   "REMARKETING_LIST_SOURCE_GA"
11909	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
11910	//   "REMARKETING_LIST_SOURCE_DBM"
11911	//   "REMARKETING_LIST_SOURCE_GPLUS"
11912	//   "REMARKETING_LIST_SOURCE_DMP"
11913	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
11914	ListSource string `json:"listSource,omitempty"`
11915
11916	// Name: Name of the remarketing list. This is a required field. Must be
11917	// no greater than 128 characters long.
11918	Name string `json:"name,omitempty"`
11919
11920	// SubaccountId: Subaccount ID of this remarketing list. This is a
11921	// read-only, auto-generated field that is only returned in GET
11922	// requests.
11923	SubaccountId int64 `json:"subaccountId,omitempty,string"`
11924
11925	// ServerResponse contains the HTTP response code and headers from the
11926	// server.
11927	googleapi.ServerResponse `json:"-"`
11928
11929	// ForceSendFields is a list of field names (e.g. "AccountId") to
11930	// unconditionally include in API requests. By default, fields with
11931	// empty values are omitted from API requests. However, any non-pointer,
11932	// non-interface field appearing in ForceSendFields will be sent to the
11933	// server regardless of whether the field is empty or not. This may be
11934	// used to include empty fields in Patch requests.
11935	ForceSendFields []string `json:"-"`
11936
11937	// NullFields is a list of field names (e.g. "AccountId") to include in
11938	// API requests with the JSON null value. By default, fields with empty
11939	// values are omitted from API requests. However, any field with an
11940	// empty value appearing in NullFields will be sent to the server as
11941	// null. It is an error if a field in this list has a non-empty value.
11942	// This may be used to include null fields in Patch requests.
11943	NullFields []string `json:"-"`
11944}
11945
11946func (s *RemarketingList) MarshalJSON() ([]byte, error) {
11947	type NoMethod RemarketingList
11948	raw := NoMethod(*s)
11949	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11950}
11951
11952// RemarketingListShare: Contains properties of a remarketing list's
11953// sharing information. Sharing allows other accounts or advertisers to
11954// target to your remarketing lists. This resource can be used to manage
11955// remarketing list sharing to other accounts and advertisers.
11956type RemarketingListShare struct {
11957	// Kind: Identifies what kind of resource this is. Value: the fixed
11958	// string "dfareporting#remarketingListShare".
11959	Kind string `json:"kind,omitempty"`
11960
11961	// RemarketingListId: Remarketing list ID. This is a read-only,
11962	// auto-generated field.
11963	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
11964
11965	// SharedAccountIds: Accounts that the remarketing list is shared with.
11966	SharedAccountIds googleapi.Int64s `json:"sharedAccountIds,omitempty"`
11967
11968	// SharedAdvertiserIds: Advertisers that the remarketing list is shared
11969	// with.
11970	SharedAdvertiserIds googleapi.Int64s `json:"sharedAdvertiserIds,omitempty"`
11971
11972	// ServerResponse contains the HTTP response code and headers from the
11973	// server.
11974	googleapi.ServerResponse `json:"-"`
11975
11976	// ForceSendFields is a list of field names (e.g. "Kind") to
11977	// unconditionally include in API requests. By default, fields with
11978	// empty values are omitted from API requests. However, any non-pointer,
11979	// non-interface field appearing in ForceSendFields will be sent to the
11980	// server regardless of whether the field is empty or not. This may be
11981	// used to include empty fields in Patch requests.
11982	ForceSendFields []string `json:"-"`
11983
11984	// NullFields is a list of field names (e.g. "Kind") to include in API
11985	// requests with the JSON null value. By default, fields with empty
11986	// values are omitted from API requests. However, any field with an
11987	// empty value appearing in NullFields will be sent to the server as
11988	// null. It is an error if a field in this list has a non-empty value.
11989	// This may be used to include null fields in Patch requests.
11990	NullFields []string `json:"-"`
11991}
11992
11993func (s *RemarketingListShare) MarshalJSON() ([]byte, error) {
11994	type NoMethod RemarketingListShare
11995	raw := NoMethod(*s)
11996	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11997}
11998
11999// RemarketingListsListResponse: Remarketing list response
12000type RemarketingListsListResponse struct {
12001	// Kind: Identifies what kind of resource this is. Value: the fixed
12002	// string "dfareporting#remarketingListsListResponse".
12003	Kind string `json:"kind,omitempty"`
12004
12005	// NextPageToken: Pagination token to be used for the next list
12006	// operation.
12007	NextPageToken string `json:"nextPageToken,omitempty"`
12008
12009	// RemarketingLists: Remarketing list collection.
12010	RemarketingLists []*RemarketingList `json:"remarketingLists,omitempty"`
12011
12012	// ServerResponse contains the HTTP response code and headers from the
12013	// server.
12014	googleapi.ServerResponse `json:"-"`
12015
12016	// ForceSendFields is a list of field names (e.g. "Kind") to
12017	// unconditionally include in API requests. By default, fields with
12018	// empty values are omitted from API requests. However, any non-pointer,
12019	// non-interface field appearing in ForceSendFields will be sent to the
12020	// server regardless of whether the field is empty or not. This may be
12021	// used to include empty fields in Patch requests.
12022	ForceSendFields []string `json:"-"`
12023
12024	// NullFields is a list of field names (e.g. "Kind") to include in API
12025	// requests with the JSON null value. By default, fields with empty
12026	// values are omitted from API requests. However, any field with an
12027	// empty value appearing in NullFields will be sent to the server as
12028	// null. It is an error if a field in this list has a non-empty value.
12029	// This may be used to include null fields in Patch requests.
12030	NullFields []string `json:"-"`
12031}
12032
12033func (s *RemarketingListsListResponse) MarshalJSON() ([]byte, error) {
12034	type NoMethod RemarketingListsListResponse
12035	raw := NoMethod(*s)
12036	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12037}
12038
12039// Report: Represents a Report resource.
12040type Report struct {
12041	// AccountId: The account ID to which this report belongs.
12042	AccountId int64 `json:"accountId,omitempty,string"`
12043
12044	// Criteria: The report criteria for a report of type "STANDARD".
12045	Criteria *ReportCriteria `json:"criteria,omitempty"`
12046
12047	// CrossDimensionReachCriteria: The report criteria for a report of type
12048	// "CROSS_DIMENSION_REACH".
12049	CrossDimensionReachCriteria *ReportCrossDimensionReachCriteria `json:"crossDimensionReachCriteria,omitempty"`
12050
12051	// Delivery: The report's email delivery settings.
12052	Delivery *ReportDelivery `json:"delivery,omitempty"`
12053
12054	// Etag: The eTag of this response for caching purposes.
12055	Etag string `json:"etag,omitempty"`
12056
12057	// FileName: The filename used when generating report files for this
12058	// report.
12059	FileName string `json:"fileName,omitempty"`
12060
12061	// FloodlightCriteria: The report criteria for a report of type
12062	// "FLOODLIGHT".
12063	FloodlightCriteria *ReportFloodlightCriteria `json:"floodlightCriteria,omitempty"`
12064
12065	// Format: The output format of the report. If not specified, default
12066	// format is "CSV". Note that the actual format in the completed report
12067	// file might differ if for instance the report's size exceeds the
12068	// format's capabilities. "CSV" will then be the fallback format.
12069	//
12070	// Possible values:
12071	//   "CSV"
12072	//   "EXCEL"
12073	Format string `json:"format,omitempty"`
12074
12075	// Id: The unique ID identifying this report resource.
12076	Id int64 `json:"id,omitempty,string"`
12077
12078	// Kind: The kind of resource this is, in this case dfareporting#report.
12079	Kind string `json:"kind,omitempty"`
12080
12081	// LastModifiedTime: The timestamp (in milliseconds since epoch) of when
12082	// this report was last modified.
12083	LastModifiedTime uint64 `json:"lastModifiedTime,omitempty,string"`
12084
12085	// Name: The name of the report.
12086	Name string `json:"name,omitempty"`
12087
12088	// OwnerProfileId: The user profile id of the owner of this report.
12089	OwnerProfileId int64 `json:"ownerProfileId,omitempty,string"`
12090
12091	// PathAttributionCriteria: The report criteria for a report of type
12092	// "PATH_ATTRIBUTION".
12093	PathAttributionCriteria *ReportPathAttributionCriteria `json:"pathAttributionCriteria,omitempty"`
12094
12095	// PathCriteria: The report criteria for a report of type "PATH".
12096	PathCriteria *ReportPathCriteria `json:"pathCriteria,omitempty"`
12097
12098	// PathToConversionCriteria: The report criteria for a report of type
12099	// "PATH_TO_CONVERSION".
12100	PathToConversionCriteria *ReportPathToConversionCriteria `json:"pathToConversionCriteria,omitempty"`
12101
12102	// ReachCriteria: The report criteria for a report of type "REACH".
12103	ReachCriteria *ReportReachCriteria `json:"reachCriteria,omitempty"`
12104
12105	// Schedule: The report's schedule. Can only be set if the report's
12106	// 'dateRange' is a relative date range and the relative date range is
12107	// not "TODAY".
12108	Schedule *ReportSchedule `json:"schedule,omitempty"`
12109
12110	// SubAccountId: The subaccount ID to which this report belongs if
12111	// applicable.
12112	SubAccountId int64 `json:"subAccountId,omitempty,string"`
12113
12114	// Type: The type of the report.
12115	//
12116	// Possible values:
12117	//   "STANDARD"
12118	//   "REACH"
12119	//   "PATH_TO_CONVERSION"
12120	//   "CROSS_DIMENSION_REACH"
12121	//   "FLOODLIGHT"
12122	//   "PATH"
12123	//   "PATH_ATTRIBUTION"
12124	Type string `json:"type,omitempty"`
12125
12126	// ServerResponse contains the HTTP response code and headers from the
12127	// server.
12128	googleapi.ServerResponse `json:"-"`
12129
12130	// ForceSendFields is a list of field names (e.g. "AccountId") to
12131	// unconditionally include in API requests. By default, fields with
12132	// empty values are omitted from API requests. However, any non-pointer,
12133	// non-interface field appearing in ForceSendFields will be sent to the
12134	// server regardless of whether the field is empty or not. This may be
12135	// used to include empty fields in Patch requests.
12136	ForceSendFields []string `json:"-"`
12137
12138	// NullFields is a list of field names (e.g. "AccountId") to include in
12139	// API requests with the JSON null value. By default, fields with empty
12140	// values are omitted from API requests. However, any field with an
12141	// empty value appearing in NullFields will be sent to the server as
12142	// null. It is an error if a field in this list has a non-empty value.
12143	// This may be used to include null fields in Patch requests.
12144	NullFields []string `json:"-"`
12145}
12146
12147func (s *Report) MarshalJSON() ([]byte, error) {
12148	type NoMethod Report
12149	raw := NoMethod(*s)
12150	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12151}
12152
12153// ReportCriteria: The report criteria for a report of type "STANDARD".
12154type ReportCriteria struct {
12155	// Activities: Activity group.
12156	Activities *Activities `json:"activities,omitempty"`
12157
12158	// CustomRichMediaEvents: Custom Rich Media Events group.
12159	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
12160
12161	// DateRange: The date range for which this report should be run.
12162	DateRange *DateRange `json:"dateRange,omitempty"`
12163
12164	// DimensionFilters: The list of filters on which dimensions are
12165	// filtered. Filters for different dimensions are ANDed, filters for the
12166	// same dimension are grouped together and ORed.
12167	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
12168
12169	// Dimensions: The list of standard dimensions the report should
12170	// include.
12171	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
12172
12173	// MetricNames: The list of names of metrics the report should include.
12174	MetricNames []string `json:"metricNames,omitempty"`
12175
12176	// ForceSendFields is a list of field names (e.g. "Activities") to
12177	// unconditionally include in API requests. By default, fields with
12178	// empty values are omitted from API requests. However, any non-pointer,
12179	// non-interface field appearing in ForceSendFields will be sent to the
12180	// server regardless of whether the field is empty or not. This may be
12181	// used to include empty fields in Patch requests.
12182	ForceSendFields []string `json:"-"`
12183
12184	// NullFields is a list of field names (e.g. "Activities") to include in
12185	// API requests with the JSON null value. By default, fields with empty
12186	// values are omitted from API requests. However, any field with an
12187	// empty value appearing in NullFields will be sent to the server as
12188	// null. It is an error if a field in this list has a non-empty value.
12189	// This may be used to include null fields in Patch requests.
12190	NullFields []string `json:"-"`
12191}
12192
12193func (s *ReportCriteria) MarshalJSON() ([]byte, error) {
12194	type NoMethod ReportCriteria
12195	raw := NoMethod(*s)
12196	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12197}
12198
12199// ReportCrossDimensionReachCriteria: The report criteria for a report
12200// of type "CROSS_DIMENSION_REACH".
12201type ReportCrossDimensionReachCriteria struct {
12202	// Breakdown: The list of dimensions the report should include.
12203	Breakdown []*SortedDimension `json:"breakdown,omitempty"`
12204
12205	// DateRange: The date range this report should be run for.
12206	DateRange *DateRange `json:"dateRange,omitempty"`
12207
12208	// Dimension: The dimension option.
12209	//
12210	// Possible values:
12211	//   "ADVERTISER"
12212	//   "CAMPAIGN"
12213	//   "SITE_BY_ADVERTISER"
12214	//   "SITE_BY_CAMPAIGN"
12215	Dimension string `json:"dimension,omitempty"`
12216
12217	// DimensionFilters: The list of filters on which dimensions are
12218	// filtered.
12219	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
12220
12221	// MetricNames: The list of names of metrics the report should include.
12222	MetricNames []string `json:"metricNames,omitempty"`
12223
12224	// OverlapMetricNames: The list of names of overlap metrics the report
12225	// should include.
12226	OverlapMetricNames []string `json:"overlapMetricNames,omitempty"`
12227
12228	// Pivoted: Whether the report is pivoted or not. Defaults to true.
12229	Pivoted bool `json:"pivoted,omitempty"`
12230
12231	// ForceSendFields is a list of field names (e.g. "Breakdown") to
12232	// unconditionally include in API requests. By default, fields with
12233	// empty values are omitted from API requests. However, any non-pointer,
12234	// non-interface field appearing in ForceSendFields will be sent to the
12235	// server regardless of whether the field is empty or not. This may be
12236	// used to include empty fields in Patch requests.
12237	ForceSendFields []string `json:"-"`
12238
12239	// NullFields is a list of field names (e.g. "Breakdown") to include in
12240	// API requests with the JSON null value. By default, fields with empty
12241	// values are omitted from API requests. However, any field with an
12242	// empty value appearing in NullFields will be sent to the server as
12243	// null. It is an error if a field in this list has a non-empty value.
12244	// This may be used to include null fields in Patch requests.
12245	NullFields []string `json:"-"`
12246}
12247
12248func (s *ReportCrossDimensionReachCriteria) MarshalJSON() ([]byte, error) {
12249	type NoMethod ReportCrossDimensionReachCriteria
12250	raw := NoMethod(*s)
12251	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12252}
12253
12254// ReportDelivery: The report's email delivery settings.
12255type ReportDelivery struct {
12256	// EmailOwner: Whether the report should be emailed to the report owner.
12257	EmailOwner bool `json:"emailOwner,omitempty"`
12258
12259	// EmailOwnerDeliveryType: The type of delivery for the owner to
12260	// receive, if enabled.
12261	//
12262	// Possible values:
12263	//   "LINK"
12264	//   "ATTACHMENT"
12265	EmailOwnerDeliveryType string `json:"emailOwnerDeliveryType,omitempty"`
12266
12267	// Message: The message to be sent with each email.
12268	Message string `json:"message,omitempty"`
12269
12270	// Recipients: The list of recipients to which to email the report.
12271	Recipients []*Recipient `json:"recipients,omitempty"`
12272
12273	// ForceSendFields is a list of field names (e.g. "EmailOwner") to
12274	// unconditionally include in API requests. By default, fields with
12275	// empty values are omitted from API requests. However, any non-pointer,
12276	// non-interface field appearing in ForceSendFields will be sent to the
12277	// server regardless of whether the field is empty or not. This may be
12278	// used to include empty fields in Patch requests.
12279	ForceSendFields []string `json:"-"`
12280
12281	// NullFields is a list of field names (e.g. "EmailOwner") to include in
12282	// API requests with the JSON null value. By default, fields with empty
12283	// values are omitted from API requests. However, any field with an
12284	// empty value appearing in NullFields will be sent to the server as
12285	// null. It is an error if a field in this list has a non-empty value.
12286	// This may be used to include null fields in Patch requests.
12287	NullFields []string `json:"-"`
12288}
12289
12290func (s *ReportDelivery) MarshalJSON() ([]byte, error) {
12291	type NoMethod ReportDelivery
12292	raw := NoMethod(*s)
12293	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12294}
12295
12296// ReportFloodlightCriteria: The report criteria for a report of type
12297// "FLOODLIGHT".
12298type ReportFloodlightCriteria struct {
12299	// CustomRichMediaEvents: The list of custom rich media events to
12300	// include.
12301	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
12302
12303	// DateRange: The date range this report should be run for.
12304	DateRange *DateRange `json:"dateRange,omitempty"`
12305
12306	// DimensionFilters: The list of filters on which dimensions are
12307	// filtered. Filters for different dimensions are ANDed, filters for the
12308	// same dimension are grouped together and ORed.
12309	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
12310
12311	// Dimensions: The list of dimensions the report should include.
12312	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
12313
12314	// FloodlightConfigId: The floodlight ID for which to show data in this
12315	// report. All advertisers associated with that ID will automatically be
12316	// added. The dimension of the value needs to be
12317	// 'dfa:floodlightConfigId'.
12318	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
12319
12320	// MetricNames: The list of names of metrics the report should include.
12321	MetricNames []string `json:"metricNames,omitempty"`
12322
12323	// ReportProperties: The properties of the report.
12324	ReportProperties *ReportFloodlightCriteriaReportProperties `json:"reportProperties,omitempty"`
12325
12326	// ForceSendFields is a list of field names (e.g.
12327	// "CustomRichMediaEvents") to unconditionally include in API requests.
12328	// By default, fields with empty values are omitted from API requests.
12329	// However, any non-pointer, non-interface field appearing in
12330	// ForceSendFields will be sent to the server regardless of whether the
12331	// field is empty or not. This may be used to include empty fields in
12332	// Patch requests.
12333	ForceSendFields []string `json:"-"`
12334
12335	// NullFields is a list of field names (e.g. "CustomRichMediaEvents") to
12336	// include in API requests with the JSON null value. By default, fields
12337	// with empty values are omitted from API requests. However, any field
12338	// with an empty value appearing in NullFields will be sent to the
12339	// server as null. It is an error if a field in this list has a
12340	// non-empty value. This may be used to include null fields in Patch
12341	// requests.
12342	NullFields []string `json:"-"`
12343}
12344
12345func (s *ReportFloodlightCriteria) MarshalJSON() ([]byte, error) {
12346	type NoMethod ReportFloodlightCriteria
12347	raw := NoMethod(*s)
12348	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12349}
12350
12351// ReportFloodlightCriteriaReportProperties: The properties of the
12352// report.
12353type ReportFloodlightCriteriaReportProperties struct {
12354	// IncludeAttributedIPConversions: Include conversions that have no
12355	// cookie, but do have an exposure path.
12356	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
12357
12358	// IncludeUnattributedCookieConversions: Include conversions of users
12359	// with a DoubleClick cookie but without an exposure. That means the
12360	// user did not click or see an ad from the advertiser within the
12361	// Floodlight group, or that the interaction happened outside the
12362	// lookback window.
12363	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
12364
12365	// IncludeUnattributedIPConversions: Include conversions that have no
12366	// associated cookies and no exposures. It’s therefore impossible to
12367	// know how the user was exposed to your ads during the lookback window
12368	// prior to a conversion.
12369	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
12370
12371	// ForceSendFields is a list of field names (e.g.
12372	// "IncludeAttributedIPConversions") to unconditionally include in API
12373	// requests. By default, fields with empty values are omitted from API
12374	// requests. However, any non-pointer, non-interface field appearing in
12375	// ForceSendFields will be sent to the server regardless of whether the
12376	// field is empty or not. This may be used to include empty fields in
12377	// Patch requests.
12378	ForceSendFields []string `json:"-"`
12379
12380	// NullFields is a list of field names (e.g.
12381	// "IncludeAttributedIPConversions") to include in API requests with the
12382	// JSON null value. By default, fields with empty values are omitted
12383	// from API requests. However, any field with an empty value appearing
12384	// in NullFields will be sent to the server as null. It is an error if a
12385	// field in this list has a non-empty value. This may be used to include
12386	// null fields in Patch requests.
12387	NullFields []string `json:"-"`
12388}
12389
12390func (s *ReportFloodlightCriteriaReportProperties) MarshalJSON() ([]byte, error) {
12391	type NoMethod ReportFloodlightCriteriaReportProperties
12392	raw := NoMethod(*s)
12393	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12394}
12395
12396// ReportPathAttributionCriteria: The report criteria for a report of
12397// type "PATH_ATTRIBUTION".
12398type ReportPathAttributionCriteria struct {
12399	// ActivityFilters: The list of 'dfa:activity' values to filter on.
12400	ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
12401
12402	// CustomChannelGrouping: Channel Grouping.
12403	CustomChannelGrouping *ChannelGrouping `json:"customChannelGrouping,omitempty"`
12404
12405	// DateRange: The date range this report should be run for.
12406	DateRange *DateRange `json:"dateRange,omitempty"`
12407
12408	// Dimensions: The list of dimensions the report should include.
12409	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
12410
12411	// FloodlightConfigId: The floodlight ID for which to show data in this
12412	// report. All advertisers associated with that ID will automatically be
12413	// added. The dimension of the value needs to be
12414	// 'dfa:floodlightConfigId'.
12415	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
12416
12417	// MetricNames: The list of names of metrics the report should include.
12418	MetricNames []string `json:"metricNames,omitempty"`
12419
12420	// PathFilters: Path Filters.
12421	PathFilters []*PathFilter `json:"pathFilters,omitempty"`
12422
12423	// ForceSendFields is a list of field names (e.g. "ActivityFilters") to
12424	// unconditionally include in API requests. By default, fields with
12425	// empty values are omitted from API requests. However, any non-pointer,
12426	// non-interface field appearing in ForceSendFields will be sent to the
12427	// server regardless of whether the field is empty or not. This may be
12428	// used to include empty fields in Patch requests.
12429	ForceSendFields []string `json:"-"`
12430
12431	// NullFields is a list of field names (e.g. "ActivityFilters") to
12432	// include in API requests with the JSON null value. By default, fields
12433	// with empty values are omitted from API requests. However, any field
12434	// with an empty value appearing in NullFields will be sent to the
12435	// server as null. It is an error if a field in this list has a
12436	// non-empty value. This may be used to include null fields in Patch
12437	// requests.
12438	NullFields []string `json:"-"`
12439}
12440
12441func (s *ReportPathAttributionCriteria) MarshalJSON() ([]byte, error) {
12442	type NoMethod ReportPathAttributionCriteria
12443	raw := NoMethod(*s)
12444	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12445}
12446
12447// ReportPathCriteria: The report criteria for a report of type "PATH".
12448type ReportPathCriteria struct {
12449	// ActivityFilters: The list of 'dfa:activity' values to filter on.
12450	ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
12451
12452	// CustomChannelGrouping: Channel Grouping.
12453	CustomChannelGrouping *ChannelGrouping `json:"customChannelGrouping,omitempty"`
12454
12455	// DateRange: The date range this report should be run for.
12456	DateRange *DateRange `json:"dateRange,omitempty"`
12457
12458	// Dimensions: The list of dimensions the report should include.
12459	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
12460
12461	// FloodlightConfigId: The floodlight ID for which to show data in this
12462	// report. All advertisers associated with that ID will automatically be
12463	// added. The dimension of the value needs to be
12464	// 'dfa:floodlightConfigId'.
12465	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
12466
12467	// MetricNames: The list of names of metrics the report should include.
12468	MetricNames []string `json:"metricNames,omitempty"`
12469
12470	// PathFilters: Path Filters.
12471	PathFilters []*PathFilter `json:"pathFilters,omitempty"`
12472
12473	// ForceSendFields is a list of field names (e.g. "ActivityFilters") to
12474	// unconditionally include in API requests. By default, fields with
12475	// empty values are omitted from API requests. However, any non-pointer,
12476	// non-interface field appearing in ForceSendFields will be sent to the
12477	// server regardless of whether the field is empty or not. This may be
12478	// used to include empty fields in Patch requests.
12479	ForceSendFields []string `json:"-"`
12480
12481	// NullFields is a list of field names (e.g. "ActivityFilters") to
12482	// include in API requests with the JSON null value. By default, fields
12483	// with empty values are omitted from API requests. However, any field
12484	// with an empty value appearing in NullFields will be sent to the
12485	// server as null. It is an error if a field in this list has a
12486	// non-empty value. This may be used to include null fields in Patch
12487	// requests.
12488	NullFields []string `json:"-"`
12489}
12490
12491func (s *ReportPathCriteria) MarshalJSON() ([]byte, error) {
12492	type NoMethod ReportPathCriteria
12493	raw := NoMethod(*s)
12494	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12495}
12496
12497// ReportPathToConversionCriteria: The report criteria for a report of
12498// type "PATH_TO_CONVERSION".
12499type ReportPathToConversionCriteria struct {
12500	// ActivityFilters: The list of 'dfa:activity' values to filter on.
12501	ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
12502
12503	// ConversionDimensions: The list of conversion dimensions the report
12504	// should include.
12505	ConversionDimensions []*SortedDimension `json:"conversionDimensions,omitempty"`
12506
12507	// CustomFloodlightVariables: The list of custom floodlight variables
12508	// the report should include.
12509	CustomFloodlightVariables []*SortedDimension `json:"customFloodlightVariables,omitempty"`
12510
12511	// CustomRichMediaEvents: The list of custom rich media events to
12512	// include.
12513	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
12514
12515	// DateRange: The date range this report should be run for.
12516	DateRange *DateRange `json:"dateRange,omitempty"`
12517
12518	// FloodlightConfigId: The floodlight ID for which to show data in this
12519	// report. All advertisers associated with that ID will automatically be
12520	// added. The dimension of the value needs to be
12521	// 'dfa:floodlightConfigId'.
12522	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
12523
12524	// MetricNames: The list of names of metrics the report should include.
12525	MetricNames []string `json:"metricNames,omitempty"`
12526
12527	// PerInteractionDimensions: The list of per interaction dimensions the
12528	// report should include.
12529	PerInteractionDimensions []*SortedDimension `json:"perInteractionDimensions,omitempty"`
12530
12531	// ReportProperties: The properties of the report.
12532	ReportProperties *ReportPathToConversionCriteriaReportProperties `json:"reportProperties,omitempty"`
12533
12534	// ForceSendFields is a list of field names (e.g. "ActivityFilters") to
12535	// unconditionally include in API requests. By default, fields with
12536	// empty values are omitted from API requests. However, any non-pointer,
12537	// non-interface field appearing in ForceSendFields will be sent to the
12538	// server regardless of whether the field is empty or not. This may be
12539	// used to include empty fields in Patch requests.
12540	ForceSendFields []string `json:"-"`
12541
12542	// NullFields is a list of field names (e.g. "ActivityFilters") to
12543	// include in API requests with the JSON null value. By default, fields
12544	// with empty values are omitted from API requests. However, any field
12545	// with an empty value appearing in NullFields will be sent to the
12546	// server as null. It is an error if a field in this list has a
12547	// non-empty value. This may be used to include null fields in Patch
12548	// requests.
12549	NullFields []string `json:"-"`
12550}
12551
12552func (s *ReportPathToConversionCriteria) MarshalJSON() ([]byte, error) {
12553	type NoMethod ReportPathToConversionCriteria
12554	raw := NoMethod(*s)
12555	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12556}
12557
12558// ReportPathToConversionCriteriaReportProperties: The properties of the
12559// report.
12560type ReportPathToConversionCriteriaReportProperties struct {
12561	// ClicksLookbackWindow: CM360 checks to see if a click interaction
12562	// occurred within the specified period of time before a conversion. By
12563	// default the value is pulled from Floodlight or you can manually enter
12564	// a custom value. Valid values: 1-90.
12565	ClicksLookbackWindow int64 `json:"clicksLookbackWindow,omitempty"`
12566
12567	// ImpressionsLookbackWindow: CM360 checks to see if an impression
12568	// interaction occurred within the specified period of time before a
12569	// conversion. By default the value is pulled from Floodlight or you can
12570	// manually enter a custom value. Valid values: 1-90.
12571	ImpressionsLookbackWindow int64 `json:"impressionsLookbackWindow,omitempty"`
12572
12573	// IncludeAttributedIPConversions: Deprecated: has no effect.
12574	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
12575
12576	// IncludeUnattributedCookieConversions: Include conversions of users
12577	// with a DoubleClick cookie but without an exposure. That means the
12578	// user did not click or see an ad from the advertiser within the
12579	// Floodlight group, or that the interaction happened outside the
12580	// lookback window.
12581	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
12582
12583	// IncludeUnattributedIPConversions: Include conversions that have no
12584	// associated cookies and no exposures. It’s therefore impossible to
12585	// know how the user was exposed to your ads during the lookback window
12586	// prior to a conversion.
12587	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
12588
12589	// MaximumClickInteractions: The maximum number of click interactions to
12590	// include in the report. Advertisers currently paying for E2C reports
12591	// get up to 200 (100 clicks, 100 impressions). If another advertiser in
12592	// your network is paying for E2C, you can have up to 5 total exposures
12593	// per report.
12594	MaximumClickInteractions int64 `json:"maximumClickInteractions,omitempty"`
12595
12596	// MaximumImpressionInteractions: The maximum number of click
12597	// interactions to include in the report. Advertisers currently paying
12598	// for E2C reports get up to 200 (100 clicks, 100 impressions). If
12599	// another advertiser in your network is paying for E2C, you can have up
12600	// to 5 total exposures per report.
12601	MaximumImpressionInteractions int64 `json:"maximumImpressionInteractions,omitempty"`
12602
12603	// MaximumInteractionGap: The maximum amount of time that can take place
12604	// between interactions (clicks or impressions) by the same user. Valid
12605	// values: 1-90.
12606	MaximumInteractionGap int64 `json:"maximumInteractionGap,omitempty"`
12607
12608	// PivotOnInteractionPath: Enable pivoting on interaction path.
12609	PivotOnInteractionPath bool `json:"pivotOnInteractionPath,omitempty"`
12610
12611	// ForceSendFields is a list of field names (e.g.
12612	// "ClicksLookbackWindow") to unconditionally include in API requests.
12613	// By default, fields with empty values are omitted from API requests.
12614	// However, any non-pointer, non-interface field appearing in
12615	// ForceSendFields will be sent to the server regardless of whether the
12616	// field is empty or not. This may be used to include empty fields in
12617	// Patch requests.
12618	ForceSendFields []string `json:"-"`
12619
12620	// NullFields is a list of field names (e.g. "ClicksLookbackWindow") to
12621	// include in API requests with the JSON null value. By default, fields
12622	// with empty values are omitted from API requests. However, any field
12623	// with an empty value appearing in NullFields will be sent to the
12624	// server as null. It is an error if a field in this list has a
12625	// non-empty value. This may be used to include null fields in Patch
12626	// requests.
12627	NullFields []string `json:"-"`
12628}
12629
12630func (s *ReportPathToConversionCriteriaReportProperties) MarshalJSON() ([]byte, error) {
12631	type NoMethod ReportPathToConversionCriteriaReportProperties
12632	raw := NoMethod(*s)
12633	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12634}
12635
12636// ReportReachCriteria: The report criteria for a report of type
12637// "REACH".
12638type ReportReachCriteria struct {
12639	// Activities: Activity group.
12640	Activities *Activities `json:"activities,omitempty"`
12641
12642	// CustomRichMediaEvents: Custom Rich Media Events group.
12643	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
12644
12645	// DateRange: The date range this report should be run for.
12646	DateRange *DateRange `json:"dateRange,omitempty"`
12647
12648	// DimensionFilters: The list of filters on which dimensions are
12649	// filtered. Filters for different dimensions are ANDed, filters for the
12650	// same dimension are grouped together and ORed.
12651	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
12652
12653	// Dimensions: The list of dimensions the report should include.
12654	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
12655
12656	// EnableAllDimensionCombinations: Whether to enable all reach dimension
12657	// combinations in the report. Defaults to false. If enabled, the date
12658	// range of the report should be within the last 42 days.
12659	EnableAllDimensionCombinations bool `json:"enableAllDimensionCombinations,omitempty"`
12660
12661	// MetricNames: The list of names of metrics the report should include.
12662	MetricNames []string `json:"metricNames,omitempty"`
12663
12664	// ReachByFrequencyMetricNames: The list of names of Reach By Frequency
12665	// metrics the report should include.
12666	ReachByFrequencyMetricNames []string `json:"reachByFrequencyMetricNames,omitempty"`
12667
12668	// ForceSendFields is a list of field names (e.g. "Activities") to
12669	// unconditionally include in API requests. By default, fields with
12670	// empty values are omitted from API requests. However, any non-pointer,
12671	// non-interface field appearing in ForceSendFields will be sent to the
12672	// server regardless of whether the field is empty or not. This may be
12673	// used to include empty fields in Patch requests.
12674	ForceSendFields []string `json:"-"`
12675
12676	// NullFields is a list of field names (e.g. "Activities") to include in
12677	// API requests with the JSON null value. By default, fields with empty
12678	// values are omitted from API requests. However, any field with an
12679	// empty value appearing in NullFields will be sent to the server as
12680	// null. It is an error if a field in this list has a non-empty value.
12681	// This may be used to include null fields in Patch requests.
12682	NullFields []string `json:"-"`
12683}
12684
12685func (s *ReportReachCriteria) MarshalJSON() ([]byte, error) {
12686	type NoMethod ReportReachCriteria
12687	raw := NoMethod(*s)
12688	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12689}
12690
12691// ReportSchedule: The report's schedule. Can only be set if the
12692// report's 'dateRange' is a relative date range and the relative date
12693// range is not "TODAY".
12694type ReportSchedule struct {
12695	// Active: Whether the schedule is active or not. Must be set to either
12696	// true or false.
12697	Active bool `json:"active,omitempty"`
12698
12699	// Every: Defines every how many days, weeks or months the report should
12700	// be run. Needs to be set when "repeats" is either "DAILY", "WEEKLY" or
12701	// "MONTHLY".
12702	Every int64 `json:"every,omitempty"`
12703
12704	ExpirationDate string `json:"expirationDate,omitempty"`
12705
12706	// Repeats: The interval for which the report is repeated. Note: -
12707	// "DAILY" also requires field "every" to be set. - "WEEKLY" also
12708	// requires fields "every" and "repeatsOnWeekDays" to be set. -
12709	// "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be
12710	// set.
12711	Repeats string `json:"repeats,omitempty"`
12712
12713	// RepeatsOnWeekDays: List of week days "WEEKLY" on which scheduled
12714	// reports should run.
12715	//
12716	// Possible values:
12717	//   "SUNDAY"
12718	//   "MONDAY"
12719	//   "TUESDAY"
12720	//   "WEDNESDAY"
12721	//   "THURSDAY"
12722	//   "FRIDAY"
12723	//   "SATURDAY"
12724	RepeatsOnWeekDays []string `json:"repeatsOnWeekDays,omitempty"`
12725
12726	// RunsOnDayOfMonth: Enum to define for "MONTHLY" scheduled reports
12727	// whether reports should be repeated on the same day of the month as
12728	// "startDate" or the same day of the week of the month. Example: If
12729	// 'startDate' is Monday, April 2nd 2012 (2012-04-02), "DAY_OF_MONTH"
12730	// would run subsequent reports on the 2nd of every Month, and
12731	// "WEEK_OF_MONTH" would run subsequent reports on the first Monday of
12732	// the month.
12733	//
12734	// Possible values:
12735	//   "DAY_OF_MONTH"
12736	//   "WEEK_OF_MONTH"
12737	RunsOnDayOfMonth string `json:"runsOnDayOfMonth,omitempty"`
12738
12739	StartDate string `json:"startDate,omitempty"`
12740
12741	// ForceSendFields is a list of field names (e.g. "Active") to
12742	// unconditionally include in API requests. By default, fields with
12743	// empty values are omitted from API requests. However, any non-pointer,
12744	// non-interface field appearing in ForceSendFields will be sent to the
12745	// server regardless of whether the field is empty or not. This may be
12746	// used to include empty fields in Patch requests.
12747	ForceSendFields []string `json:"-"`
12748
12749	// NullFields is a list of field names (e.g. "Active") to include in API
12750	// requests with the JSON null value. By default, fields with empty
12751	// values are omitted from API requests. However, any field with an
12752	// empty value appearing in NullFields will be sent to the server as
12753	// null. It is an error if a field in this list has a non-empty value.
12754	// This may be used to include null fields in Patch requests.
12755	NullFields []string `json:"-"`
12756}
12757
12758func (s *ReportSchedule) MarshalJSON() ([]byte, error) {
12759	type NoMethod ReportSchedule
12760	raw := NoMethod(*s)
12761	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12762}
12763
12764// ReportCompatibleFields: Represents fields that are compatible to be
12765// selected for a report of type "STANDARD".
12766type ReportCompatibleFields struct {
12767	// DimensionFilters: Dimensions which are compatible to be selected in
12768	// the "dimensionFilters" section of the report.
12769	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
12770
12771	// Dimensions: Dimensions which are compatible to be selected in the
12772	// "dimensions" section of the report.
12773	Dimensions []*Dimension `json:"dimensions,omitempty"`
12774
12775	// Kind: The kind of resource this is, in this case
12776	// dfareporting#reportCompatibleFields.
12777	Kind string `json:"kind,omitempty"`
12778
12779	// Metrics: Metrics which are compatible to be selected in the
12780	// "metricNames" section of the report.
12781	Metrics []*Metric `json:"metrics,omitempty"`
12782
12783	// PivotedActivityMetrics: Metrics which are compatible to be selected
12784	// as activity metrics to pivot on in the "activities" section of the
12785	// report.
12786	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
12787
12788	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
12789	// unconditionally include in API requests. By default, fields with
12790	// empty values are omitted from API requests. However, any non-pointer,
12791	// non-interface field appearing in ForceSendFields will be sent to the
12792	// server regardless of whether the field is empty or not. This may be
12793	// used to include empty fields in Patch requests.
12794	ForceSendFields []string `json:"-"`
12795
12796	// NullFields is a list of field names (e.g. "DimensionFilters") to
12797	// include in API requests with the JSON null value. By default, fields
12798	// with empty values are omitted from API requests. However, any field
12799	// with an empty value appearing in NullFields will be sent to the
12800	// server as null. It is an error if a field in this list has a
12801	// non-empty value. This may be used to include null fields in Patch
12802	// requests.
12803	NullFields []string `json:"-"`
12804}
12805
12806func (s *ReportCompatibleFields) MarshalJSON() ([]byte, error) {
12807	type NoMethod ReportCompatibleFields
12808	raw := NoMethod(*s)
12809	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12810}
12811
12812// ReportList: Represents the list of reports.
12813type ReportList struct {
12814	// Etag: The eTag of this response for caching purposes.
12815	Etag string `json:"etag,omitempty"`
12816
12817	// Items: The reports returned in this response.
12818	Items []*Report `json:"items,omitempty"`
12819
12820	// Kind: The kind of list this is, in this case dfareporting#reportList.
12821	Kind string `json:"kind,omitempty"`
12822
12823	// NextPageToken: Continuation token used to page through reports. To
12824	// retrieve the next page of results, set the next request's "pageToken"
12825	// to the value of this field. The page token is only valid for a
12826	// limited amount of time and should not be persisted.
12827	NextPageToken string `json:"nextPageToken,omitempty"`
12828
12829	// ServerResponse contains the HTTP response code and headers from the
12830	// server.
12831	googleapi.ServerResponse `json:"-"`
12832
12833	// ForceSendFields is a list of field names (e.g. "Etag") to
12834	// unconditionally include in API requests. By default, fields with
12835	// empty values are omitted from API requests. However, any non-pointer,
12836	// non-interface field appearing in ForceSendFields will be sent to the
12837	// server regardless of whether the field is empty or not. This may be
12838	// used to include empty fields in Patch requests.
12839	ForceSendFields []string `json:"-"`
12840
12841	// NullFields is a list of field names (e.g. "Etag") to include in API
12842	// requests with the JSON null value. By default, fields with empty
12843	// values are omitted from API requests. However, any field with an
12844	// empty value appearing in NullFields will be sent to the server as
12845	// null. It is an error if a field in this list has a non-empty value.
12846	// This may be used to include null fields in Patch requests.
12847	NullFields []string `json:"-"`
12848}
12849
12850func (s *ReportList) MarshalJSON() ([]byte, error) {
12851	type NoMethod ReportList
12852	raw := NoMethod(*s)
12853	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12854}
12855
12856// ReportsConfiguration: Reporting Configuration
12857type ReportsConfiguration struct {
12858	// ExposureToConversionEnabled: Whether the exposure to conversion
12859	// report is enabled. This report shows detailed pathway information on
12860	// up to 10 of the most recent ad exposures seen by a user before
12861	// converting.
12862	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
12863
12864	// LookbackConfiguration: Default lookback windows for new advertisers
12865	// in this account.
12866	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
12867
12868	// ReportGenerationTimeZoneId: Report generation time zone ID of this
12869	// account. This is a required field that can only be changed by a
12870	// superuser. Acceptable values are: - "1" for "America/New_York" - "2"
12871	// for "Europe/London" - "3" for "Europe/Paris" - "4" for
12872	// "Africa/Johannesburg" - "5" for "Asia/Jerusalem" - "6" for
12873	// "Asia/Shanghai" - "7" for "Asia/Hong_Kong" - "8" for "Asia/Tokyo" -
12874	// "9" for "Australia/Sydney" - "10" for "Asia/Dubai" - "11" for
12875	// "America/Los_Angeles" - "12" for "Pacific/Auckland" - "13" for
12876	// "America/Sao_Paulo" - "16" for "America/Asuncion" - "17" for
12877	// "America/Chicago" - "18" for "America/Denver" - "19" for
12878	// "America/St_Johns" - "20" for "Asia/Dhaka" - "21" for "Asia/Jakarta"
12879	// - "22" for "Asia/Kabul" - "23" for "Asia/Karachi" - "24" for
12880	// "Asia/Calcutta" - "25" for "Asia/Pyongyang" - "26" for "Asia/Rangoon"
12881	// - "27" for "Atlantic/Cape_Verde" - "28" for "Atlantic/South_Georgia"
12882	// - "29" for "Australia/Adelaide" - "30" for "Australia/Lord_Howe" -
12883	// "31" for "Europe/Moscow" - "32" for "Pacific/Kiritimati" - "35" for
12884	// "Pacific/Norfolk" - "36" for "Pacific/Tongatapu"
12885	ReportGenerationTimeZoneId int64 `json:"reportGenerationTimeZoneId,omitempty,string"`
12886
12887	// ForceSendFields is a list of field names (e.g.
12888	// "ExposureToConversionEnabled") to unconditionally include in API
12889	// requests. By default, fields with empty values are omitted from API
12890	// requests. However, any non-pointer, non-interface field appearing in
12891	// ForceSendFields will be sent to the server regardless of whether the
12892	// field is empty or not. This may be used to include empty fields in
12893	// Patch requests.
12894	ForceSendFields []string `json:"-"`
12895
12896	// NullFields is a list of field names (e.g.
12897	// "ExposureToConversionEnabled") to include in API requests with the
12898	// JSON null value. By default, fields with empty values are omitted
12899	// from API requests. However, any field with an empty value appearing
12900	// in NullFields will be sent to the server as null. It is an error if a
12901	// field in this list has a non-empty value. This may be used to include
12902	// null fields in Patch requests.
12903	NullFields []string `json:"-"`
12904}
12905
12906func (s *ReportsConfiguration) MarshalJSON() ([]byte, error) {
12907	type NoMethod ReportsConfiguration
12908	raw := NoMethod(*s)
12909	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12910}
12911
12912// RichMediaExitOverride: Rich Media Exit Override.
12913type RichMediaExitOverride struct {
12914	// ClickThroughUrl: Click-through URL of this rich media exit override.
12915	// Applicable if the enabled field is set to true.
12916	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
12917
12918	// Enabled: Whether to use the clickThroughUrl. If false, the
12919	// creative-level exit will be used.
12920	Enabled bool `json:"enabled,omitempty"`
12921
12922	// ExitId: ID for the override to refer to a specific exit in the
12923	// creative.
12924	ExitId int64 `json:"exitId,omitempty,string"`
12925
12926	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
12927	// unconditionally include in API requests. By default, fields with
12928	// empty values are omitted from API requests. However, any non-pointer,
12929	// non-interface field appearing in ForceSendFields will be sent to the
12930	// server regardless of whether the field is empty or not. This may be
12931	// used to include empty fields in Patch requests.
12932	ForceSendFields []string `json:"-"`
12933
12934	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
12935	// include in API requests with the JSON null value. By default, fields
12936	// with empty values are omitted from API requests. However, any field
12937	// with an empty value appearing in NullFields will be sent to the
12938	// server as null. It is an error if a field in this list has a
12939	// non-empty value. This may be used to include null fields in Patch
12940	// requests.
12941	NullFields []string `json:"-"`
12942}
12943
12944func (s *RichMediaExitOverride) MarshalJSON() ([]byte, error) {
12945	type NoMethod RichMediaExitOverride
12946	raw := NoMethod(*s)
12947	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12948}
12949
12950// Rule: A rule associates an asset with a targeting template for
12951// asset-level targeting. Applicable to INSTREAM_VIDEO creatives.
12952type Rule struct {
12953	// AssetId: A creativeAssets[].id. This should refer to one of the
12954	// parent assets in this creative. This is a required field.
12955	AssetId int64 `json:"assetId,omitempty,string"`
12956
12957	// Name: A user-friendly name for this rule. This is a required field.
12958	Name string `json:"name,omitempty"`
12959
12960	// TargetingTemplateId: A targeting template ID. The targeting from the
12961	// targeting template will be used to determine whether this asset
12962	// should be served. This is a required field.
12963	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
12964
12965	// ForceSendFields is a list of field names (e.g. "AssetId") to
12966	// unconditionally include in API requests. By default, fields with
12967	// empty values are omitted from API requests. However, any non-pointer,
12968	// non-interface field appearing in ForceSendFields will be sent to the
12969	// server regardless of whether the field is empty or not. This may be
12970	// used to include empty fields in Patch requests.
12971	ForceSendFields []string `json:"-"`
12972
12973	// NullFields is a list of field names (e.g. "AssetId") to include in
12974	// API requests with the JSON null value. By default, fields with empty
12975	// values are omitted from API requests. However, any field with an
12976	// empty value appearing in NullFields will be sent to the server as
12977	// null. It is an error if a field in this list has a non-empty value.
12978	// This may be used to include null fields in Patch requests.
12979	NullFields []string `json:"-"`
12980}
12981
12982func (s *Rule) MarshalJSON() ([]byte, error) {
12983	type NoMethod Rule
12984	raw := NoMethod(*s)
12985	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12986}
12987
12988// Site: Contains properties of a site.
12989type Site struct {
12990	// AccountId: Account ID of this site. This is a read-only field that
12991	// can be left blank.
12992	AccountId int64 `json:"accountId,omitempty,string"`
12993
12994	// Approved: Whether this site is approved.
12995	Approved bool `json:"approved,omitempty"`
12996
12997	// DirectorySiteId: Directory site associated with this site. This is a
12998	// required field that is read-only after insertion.
12999	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
13000
13001	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
13002	// directory site. This is a read-only, auto-generated field.
13003	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
13004
13005	// Id: ID of this site. This is a read-only, auto-generated field.
13006	Id int64 `json:"id,omitempty,string"`
13007
13008	// IdDimensionValue: Dimension value for the ID of this site. This is a
13009	// read-only, auto-generated field.
13010	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
13011
13012	// KeyName: Key name of this site. This is a read-only, auto-generated
13013	// field.
13014	KeyName string `json:"keyName,omitempty"`
13015
13016	// Kind: Identifies what kind of resource this is. Value: the fixed
13017	// string "dfareporting#site".
13018	Kind string `json:"kind,omitempty"`
13019
13020	// Name: Name of this site.This is a required field. Must be less than
13021	// 128 characters long. If this site is under a subaccount, the name
13022	// must be unique among sites of the same subaccount. Otherwise, this
13023	// site is a top-level site, and the name must be unique among top-level
13024	// sites of the same account.
13025	Name string `json:"name,omitempty"`
13026
13027	// SiteContacts: Site contacts.
13028	SiteContacts []*SiteContact `json:"siteContacts,omitempty"`
13029
13030	// SiteSettings: Site-wide settings.
13031	SiteSettings *SiteSettings `json:"siteSettings,omitempty"`
13032
13033	// SubaccountId: Subaccount ID of this site. This is a read-only field
13034	// that can be left blank.
13035	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13036
13037	// VideoSettings: Default video settings for new placements created
13038	// under this site. This value will be used to populate the
13039	// placements.videoSettings field, when no value is specified for the
13040	// new placement.
13041	VideoSettings *SiteVideoSettings `json:"videoSettings,omitempty"`
13042
13043	// ServerResponse contains the HTTP response code and headers from the
13044	// server.
13045	googleapi.ServerResponse `json:"-"`
13046
13047	// ForceSendFields is a list of field names (e.g. "AccountId") to
13048	// unconditionally include in API requests. By default, fields with
13049	// empty values are omitted from API requests. However, any non-pointer,
13050	// non-interface field appearing in ForceSendFields will be sent to the
13051	// server regardless of whether the field is empty or not. This may be
13052	// used to include empty fields in Patch requests.
13053	ForceSendFields []string `json:"-"`
13054
13055	// NullFields is a list of field names (e.g. "AccountId") to include in
13056	// API requests with the JSON null value. By default, fields with empty
13057	// values are omitted from API requests. However, any field with an
13058	// empty value appearing in NullFields will be sent to the server as
13059	// null. It is an error if a field in this list has a non-empty value.
13060	// This may be used to include null fields in Patch requests.
13061	NullFields []string `json:"-"`
13062}
13063
13064func (s *Site) MarshalJSON() ([]byte, error) {
13065	type NoMethod Site
13066	raw := NoMethod(*s)
13067	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13068}
13069
13070// SiteCompanionSetting: Companion Settings
13071type SiteCompanionSetting struct {
13072	// CompanionsDisabled: Whether companions are disabled for this site
13073	// template.
13074	CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
13075
13076	// EnabledSizes: Allowlist of companion sizes to be served via this site
13077	// template. Set this list to null or empty to serve all companion
13078	// sizes.
13079	EnabledSizes []*Size `json:"enabledSizes,omitempty"`
13080
13081	// ImageOnly: Whether to serve only static images as companions.
13082	ImageOnly bool `json:"imageOnly,omitempty"`
13083
13084	// Kind: Identifies what kind of resource this is. Value: the fixed
13085	// string "dfareporting#siteCompanionSetting".
13086	Kind string `json:"kind,omitempty"`
13087
13088	// ForceSendFields is a list of field names (e.g. "CompanionsDisabled")
13089	// to unconditionally include in API requests. By default, fields with
13090	// empty values are omitted from API requests. However, any non-pointer,
13091	// non-interface field appearing in ForceSendFields will be sent to the
13092	// server regardless of whether the field is empty or not. This may be
13093	// used to include empty fields in Patch requests.
13094	ForceSendFields []string `json:"-"`
13095
13096	// NullFields is a list of field names (e.g. "CompanionsDisabled") to
13097	// include in API requests with the JSON null value. By default, fields
13098	// with empty values are omitted from API requests. However, any field
13099	// with an empty value appearing in NullFields will be sent to the
13100	// server as null. It is an error if a field in this list has a
13101	// non-empty value. This may be used to include null fields in Patch
13102	// requests.
13103	NullFields []string `json:"-"`
13104}
13105
13106func (s *SiteCompanionSetting) MarshalJSON() ([]byte, error) {
13107	type NoMethod SiteCompanionSetting
13108	raw := NoMethod(*s)
13109	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13110}
13111
13112// SiteContact: Site Contact
13113type SiteContact struct {
13114	// Address: Address of this site contact.
13115	Address string `json:"address,omitempty"`
13116
13117	// ContactType: Site contact type.
13118	//
13119	// Possible values:
13120	//   "SALES_PERSON"
13121	//   "TRAFFICKER"
13122	ContactType string `json:"contactType,omitempty"`
13123
13124	// Email: Email address of this site contact. This is a required field.
13125	Email string `json:"email,omitempty"`
13126
13127	// FirstName: First name of this site contact.
13128	FirstName string `json:"firstName,omitempty"`
13129
13130	// Id: ID of this site contact. This is a read-only, auto-generated
13131	// field.
13132	Id int64 `json:"id,omitempty,string"`
13133
13134	// LastName: Last name of this site contact.
13135	LastName string `json:"lastName,omitempty"`
13136
13137	// Phone: Primary phone number of this site contact.
13138	Phone string `json:"phone,omitempty"`
13139
13140	// Title: Title or designation of this site contact.
13141	Title string `json:"title,omitempty"`
13142
13143	// ForceSendFields is a list of field names (e.g. "Address") to
13144	// unconditionally include in API requests. By default, fields with
13145	// empty values are omitted from API requests. However, any non-pointer,
13146	// non-interface field appearing in ForceSendFields will be sent to the
13147	// server regardless of whether the field is empty or not. This may be
13148	// used to include empty fields in Patch requests.
13149	ForceSendFields []string `json:"-"`
13150
13151	// NullFields is a list of field names (e.g. "Address") to include in
13152	// API requests with the JSON null value. By default, fields with empty
13153	// values are omitted from API requests. However, any field with an
13154	// empty value appearing in NullFields will be sent to the server as
13155	// null. It is an error if a field in this list has a non-empty value.
13156	// This may be used to include null fields in Patch requests.
13157	NullFields []string `json:"-"`
13158}
13159
13160func (s *SiteContact) MarshalJSON() ([]byte, error) {
13161	type NoMethod SiteContact
13162	raw := NoMethod(*s)
13163	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13164}
13165
13166// SiteSettings: Site Settings
13167type SiteSettings struct {
13168	// ActiveViewOptOut: Whether active view creatives are disabled for this
13169	// site.
13170	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
13171
13172	// AdBlockingOptOut: Whether this site opts out of ad blocking. When
13173	// true, ad blocking is disabled for all placements under the site,
13174	// regardless of the individual placement settings. When false, the
13175	// campaign and placement settings take effect.
13176	AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
13177
13178	// DisableNewCookie: Whether new cookies are disabled for this site.
13179	DisableNewCookie bool `json:"disableNewCookie,omitempty"`
13180
13181	// TagSetting: Configuration settings for dynamic and image floodlight
13182	// tags.
13183	TagSetting *TagSetting `json:"tagSetting,omitempty"`
13184
13185	// VideoActiveViewOptOutTemplate: Whether Verification and ActiveView
13186	// for in-stream video creatives are disabled by default for new
13187	// placements created under this site. This value will be used to
13188	// populate the placement.videoActiveViewOptOut field, when no value is
13189	// specified for the new placement.
13190	VideoActiveViewOptOutTemplate bool `json:"videoActiveViewOptOutTemplate,omitempty"`
13191
13192	// VpaidAdapterChoiceTemplate: Default VPAID adapter setting for new
13193	// placements created under this site. This value will be used to
13194	// populate the placements.vpaidAdapterChoice field, when no value is
13195	// specified for the new placement. Controls which VPAID format the
13196	// measurement adapter will use for in-stream video creatives assigned
13197	// to the placement. The publisher's specifications will typically
13198	// determine this setting. For VPAID creatives, the adapter format will
13199	// match the VPAID format (HTML5 VPAID creatives use the HTML5 adapter).
13200	// *Note:* Flash is no longer supported. This field now defaults to
13201	// HTML5 when the following values are provided: FLASH, BOTH.
13202	//
13203	// Possible values:
13204	//   "DEFAULT"
13205	//   "FLASH"
13206	//   "HTML5"
13207	//   "BOTH"
13208	VpaidAdapterChoiceTemplate string `json:"vpaidAdapterChoiceTemplate,omitempty"`
13209
13210	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
13211	// unconditionally include in API requests. By default, fields with
13212	// empty values are omitted from API requests. However, any non-pointer,
13213	// non-interface field appearing in ForceSendFields will be sent to the
13214	// server regardless of whether the field is empty or not. This may be
13215	// used to include empty fields in Patch requests.
13216	ForceSendFields []string `json:"-"`
13217
13218	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
13219	// include in API requests with the JSON null value. By default, fields
13220	// with empty values are omitted from API requests. However, any field
13221	// with an empty value appearing in NullFields will be sent to the
13222	// server as null. It is an error if a field in this list has a
13223	// non-empty value. This may be used to include null fields in Patch
13224	// requests.
13225	NullFields []string `json:"-"`
13226}
13227
13228func (s *SiteSettings) MarshalJSON() ([]byte, error) {
13229	type NoMethod SiteSettings
13230	raw := NoMethod(*s)
13231	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13232}
13233
13234// SiteSkippableSetting: Skippable Settings
13235type SiteSkippableSetting struct {
13236	// Kind: Identifies what kind of resource this is. Value: the fixed
13237	// string "dfareporting#siteSkippableSetting".
13238	Kind string `json:"kind,omitempty"`
13239
13240	// ProgressOffset: Amount of time to play videos served to this site
13241	// template before counting a view. Applicable when skippable is true.
13242	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
13243
13244	// SkipOffset: Amount of time to play videos served to this site before
13245	// the skip button should appear. Applicable when skippable is true.
13246	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
13247
13248	// Skippable: Whether the user can skip creatives served to this site.
13249	// This will act as default for new placements created under this site.
13250	Skippable bool `json:"skippable,omitempty"`
13251
13252	// ForceSendFields is a list of field names (e.g. "Kind") to
13253	// unconditionally include in API requests. By default, fields with
13254	// empty values are omitted from API requests. However, any non-pointer,
13255	// non-interface field appearing in ForceSendFields will be sent to the
13256	// server regardless of whether the field is empty or not. This may be
13257	// used to include empty fields in Patch requests.
13258	ForceSendFields []string `json:"-"`
13259
13260	// NullFields is a list of field names (e.g. "Kind") to include in API
13261	// requests with the JSON null value. By default, fields with empty
13262	// values are omitted from API requests. However, any field with an
13263	// empty value appearing in NullFields will be sent to the server as
13264	// null. It is an error if a field in this list has a non-empty value.
13265	// This may be used to include null fields in Patch requests.
13266	NullFields []string `json:"-"`
13267}
13268
13269func (s *SiteSkippableSetting) MarshalJSON() ([]byte, error) {
13270	type NoMethod SiteSkippableSetting
13271	raw := NoMethod(*s)
13272	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13273}
13274
13275// SiteTranscodeSetting: Transcode Settings
13276type SiteTranscodeSetting struct {
13277	// EnabledVideoFormats: Allowlist of video formats to be served to this
13278	// site template. Set this list to null or empty to serve all video
13279	// formats.
13280	EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
13281
13282	// Kind: Identifies what kind of resource this is. Value: the fixed
13283	// string "dfareporting#siteTranscodeSetting".
13284	Kind string `json:"kind,omitempty"`
13285
13286	// ForceSendFields is a list of field names (e.g. "EnabledVideoFormats")
13287	// to unconditionally include in API requests. By default, fields with
13288	// empty values are omitted from API requests. However, any non-pointer,
13289	// non-interface field appearing in ForceSendFields will be sent to the
13290	// server regardless of whether the field is empty or not. This may be
13291	// used to include empty fields in Patch requests.
13292	ForceSendFields []string `json:"-"`
13293
13294	// NullFields is a list of field names (e.g. "EnabledVideoFormats") to
13295	// include in API requests with the JSON null value. By default, fields
13296	// with empty values are omitted from API requests. However, any field
13297	// with an empty value appearing in NullFields will be sent to the
13298	// server as null. It is an error if a field in this list has a
13299	// non-empty value. This may be used to include null fields in Patch
13300	// requests.
13301	NullFields []string `json:"-"`
13302}
13303
13304func (s *SiteTranscodeSetting) MarshalJSON() ([]byte, error) {
13305	type NoMethod SiteTranscodeSetting
13306	raw := NoMethod(*s)
13307	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13308}
13309
13310// SiteVideoSettings: Video Settings
13311type SiteVideoSettings struct {
13312	// CompanionSettings: Settings for the companion creatives of video
13313	// creatives served to this site.
13314	CompanionSettings *SiteCompanionSetting `json:"companionSettings,omitempty"`
13315
13316	// Kind: Identifies what kind of resource this is. Value: the fixed
13317	// string "dfareporting#siteVideoSettings".
13318	Kind string `json:"kind,omitempty"`
13319
13320	// ObaEnabled: Whether OBA icons are enabled for this placement.
13321	ObaEnabled bool `json:"obaEnabled,omitempty"`
13322
13323	// ObaSettings: Settings for the OBA icon of video creatives served to
13324	// this site. This will act as default for new placements created under
13325	// this site.
13326	ObaSettings *ObaIcon `json:"obaSettings,omitempty"`
13327
13328	// Orientation: Orientation of a site template used for video. This will
13329	// act as default for new placements created under this site.
13330	//
13331	// Possible values:
13332	//   "ANY"
13333	//   "LANDSCAPE"
13334	//   "PORTRAIT"
13335	Orientation string `json:"orientation,omitempty"`
13336
13337	// SkippableSettings: Settings for the skippability of video creatives
13338	// served to this site. This will act as default for new placements
13339	// created under this site.
13340	SkippableSettings *SiteSkippableSetting `json:"skippableSettings,omitempty"`
13341
13342	// TranscodeSettings: Settings for the transcodes of video creatives
13343	// served to this site. This will act as default for new placements
13344	// created under this site.
13345	TranscodeSettings *SiteTranscodeSetting `json:"transcodeSettings,omitempty"`
13346
13347	// ForceSendFields is a list of field names (e.g. "CompanionSettings")
13348	// to unconditionally include in API requests. By default, fields with
13349	// empty values are omitted from API requests. However, any non-pointer,
13350	// non-interface field appearing in ForceSendFields will be sent to the
13351	// server regardless of whether the field is empty or not. This may be
13352	// used to include empty fields in Patch requests.
13353	ForceSendFields []string `json:"-"`
13354
13355	// NullFields is a list of field names (e.g. "CompanionSettings") to
13356	// include in API requests with the JSON null value. By default, fields
13357	// with empty values are omitted from API requests. However, any field
13358	// with an empty value appearing in NullFields will be sent to the
13359	// server as null. It is an error if a field in this list has a
13360	// non-empty value. This may be used to include null fields in Patch
13361	// requests.
13362	NullFields []string `json:"-"`
13363}
13364
13365func (s *SiteVideoSettings) MarshalJSON() ([]byte, error) {
13366	type NoMethod SiteVideoSettings
13367	raw := NoMethod(*s)
13368	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13369}
13370
13371// SitesListResponse: Site List Response
13372type SitesListResponse struct {
13373	// Kind: Identifies what kind of resource this is. Value: the fixed
13374	// string "dfareporting#sitesListResponse".
13375	Kind string `json:"kind,omitempty"`
13376
13377	// NextPageToken: Pagination token to be used for the next list
13378	// operation.
13379	NextPageToken string `json:"nextPageToken,omitempty"`
13380
13381	// Sites: Site collection.
13382	Sites []*Site `json:"sites,omitempty"`
13383
13384	// ServerResponse contains the HTTP response code and headers from the
13385	// server.
13386	googleapi.ServerResponse `json:"-"`
13387
13388	// ForceSendFields is a list of field names (e.g. "Kind") to
13389	// unconditionally include in API requests. By default, fields with
13390	// empty values are omitted from API requests. However, any non-pointer,
13391	// non-interface field appearing in ForceSendFields will be sent to the
13392	// server regardless of whether the field is empty or not. This may be
13393	// used to include empty fields in Patch requests.
13394	ForceSendFields []string `json:"-"`
13395
13396	// NullFields is a list of field names (e.g. "Kind") to include in API
13397	// requests with the JSON null value. By default, fields with empty
13398	// values are omitted from API requests. However, any field with an
13399	// empty value appearing in NullFields will be sent to the server as
13400	// null. It is an error if a field in this list has a non-empty value.
13401	// This may be used to include null fields in Patch requests.
13402	NullFields []string `json:"-"`
13403}
13404
13405func (s *SitesListResponse) MarshalJSON() ([]byte, error) {
13406	type NoMethod SitesListResponse
13407	raw := NoMethod(*s)
13408	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13409}
13410
13411// Size: Represents the dimensions of ads, placements, creatives, or
13412// creative assets.
13413type Size struct {
13414	// Height: Height of this size. Acceptable values are 0 to 32767,
13415	// inclusive.
13416	Height int64 `json:"height,omitempty"`
13417
13418	// Iab: IAB standard size. This is a read-only, auto-generated field.
13419	Iab bool `json:"iab,omitempty"`
13420
13421	// Id: ID of this size. This is a read-only, auto-generated field.
13422	Id int64 `json:"id,omitempty,string"`
13423
13424	// Kind: Identifies what kind of resource this is. Value: the fixed
13425	// string "dfareporting#size".
13426	Kind string `json:"kind,omitempty"`
13427
13428	// Width: Width of this size. Acceptable values are 0 to 32767,
13429	// inclusive.
13430	Width int64 `json:"width,omitempty"`
13431
13432	// ServerResponse contains the HTTP response code and headers from the
13433	// server.
13434	googleapi.ServerResponse `json:"-"`
13435
13436	// ForceSendFields is a list of field names (e.g. "Height") to
13437	// unconditionally include in API requests. By default, fields with
13438	// empty values are omitted from API requests. However, any non-pointer,
13439	// non-interface field appearing in ForceSendFields will be sent to the
13440	// server regardless of whether the field is empty or not. This may be
13441	// used to include empty fields in Patch requests.
13442	ForceSendFields []string `json:"-"`
13443
13444	// NullFields is a list of field names (e.g. "Height") to include in API
13445	// requests with the JSON null value. By default, fields with empty
13446	// values are omitted from API requests. However, any field with an
13447	// empty value appearing in NullFields will be sent to the server as
13448	// null. It is an error if a field in this list has a non-empty value.
13449	// This may be used to include null fields in Patch requests.
13450	NullFields []string `json:"-"`
13451}
13452
13453func (s *Size) MarshalJSON() ([]byte, error) {
13454	type NoMethod Size
13455	raw := NoMethod(*s)
13456	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13457}
13458
13459// SizesListResponse: Size List Response
13460type SizesListResponse struct {
13461	// Kind: Identifies what kind of resource this is. Value: the fixed
13462	// string "dfareporting#sizesListResponse".
13463	Kind string `json:"kind,omitempty"`
13464
13465	// Sizes: Size collection.
13466	Sizes []*Size `json:"sizes,omitempty"`
13467
13468	// ServerResponse contains the HTTP response code and headers from the
13469	// server.
13470	googleapi.ServerResponse `json:"-"`
13471
13472	// ForceSendFields is a list of field names (e.g. "Kind") to
13473	// unconditionally include in API requests. By default, fields with
13474	// empty values are omitted from API requests. However, any non-pointer,
13475	// non-interface field appearing in ForceSendFields will be sent to the
13476	// server regardless of whether the field is empty or not. This may be
13477	// used to include empty fields in Patch requests.
13478	ForceSendFields []string `json:"-"`
13479
13480	// NullFields is a list of field names (e.g. "Kind") to include in API
13481	// requests with the JSON null value. By default, fields with empty
13482	// values are omitted from API requests. However, any field with an
13483	// empty value appearing in NullFields will be sent to the server as
13484	// null. It is an error if a field in this list has a non-empty value.
13485	// This may be used to include null fields in Patch requests.
13486	NullFields []string `json:"-"`
13487}
13488
13489func (s *SizesListResponse) MarshalJSON() ([]byte, error) {
13490	type NoMethod SizesListResponse
13491	raw := NoMethod(*s)
13492	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13493}
13494
13495// SkippableSetting: Skippable Settings
13496type SkippableSetting struct {
13497	// Kind: Identifies what kind of resource this is. Value: the fixed
13498	// string "dfareporting#skippableSetting".
13499	Kind string `json:"kind,omitempty"`
13500
13501	// ProgressOffset: Amount of time to play videos served to this
13502	// placement before counting a view. Applicable when skippable is true.
13503	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
13504
13505	// SkipOffset: Amount of time to play videos served to this placement
13506	// before the skip button should appear. Applicable when skippable is
13507	// true.
13508	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
13509
13510	// Skippable: Whether the user can skip creatives served to this
13511	// placement.
13512	Skippable bool `json:"skippable,omitempty"`
13513
13514	// ForceSendFields is a list of field names (e.g. "Kind") to
13515	// unconditionally include in API requests. By default, fields with
13516	// empty values are omitted from API requests. However, any non-pointer,
13517	// non-interface field appearing in ForceSendFields will be sent to the
13518	// server regardless of whether the field is empty or not. This may be
13519	// used to include empty fields in Patch requests.
13520	ForceSendFields []string `json:"-"`
13521
13522	// NullFields is a list of field names (e.g. "Kind") to include in API
13523	// requests with the JSON null value. By default, fields with empty
13524	// values are omitted from API requests. However, any field with an
13525	// empty value appearing in NullFields will be sent to the server as
13526	// null. It is an error if a field in this list has a non-empty value.
13527	// This may be used to include null fields in Patch requests.
13528	NullFields []string `json:"-"`
13529}
13530
13531func (s *SkippableSetting) MarshalJSON() ([]byte, error) {
13532	type NoMethod SkippableSetting
13533	raw := NoMethod(*s)
13534	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13535}
13536
13537// SortedDimension: Represents a sorted dimension.
13538type SortedDimension struct {
13539	// Kind: The kind of resource this is, in this case
13540	// dfareporting#sortedDimension.
13541	Kind string `json:"kind,omitempty"`
13542
13543	// Name: The name of the dimension.
13544	Name string `json:"name,omitempty"`
13545
13546	// SortOrder: An optional sort order for the dimension column.
13547	//
13548	// Possible values:
13549	//   "ASCENDING"
13550	//   "DESCENDING"
13551	SortOrder string `json:"sortOrder,omitempty"`
13552
13553	// ForceSendFields is a list of field names (e.g. "Kind") to
13554	// unconditionally include in API requests. By default, fields with
13555	// empty values are omitted from API requests. However, any non-pointer,
13556	// non-interface field appearing in ForceSendFields will be sent to the
13557	// server regardless of whether the field is empty or not. This may be
13558	// used to include empty fields in Patch requests.
13559	ForceSendFields []string `json:"-"`
13560
13561	// NullFields is a list of field names (e.g. "Kind") to include in API
13562	// requests with the JSON null value. By default, fields with empty
13563	// values are omitted from API requests. However, any field with an
13564	// empty value appearing in NullFields will be sent to the server as
13565	// null. It is an error if a field in this list has a non-empty value.
13566	// This may be used to include null fields in Patch requests.
13567	NullFields []string `json:"-"`
13568}
13569
13570func (s *SortedDimension) MarshalJSON() ([]byte, error) {
13571	type NoMethod SortedDimension
13572	raw := NoMethod(*s)
13573	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13574}
13575
13576// Subaccount: Contains properties of a Campaign Manager subaccount.
13577type Subaccount struct {
13578	// AccountId: ID of the account that contains this subaccount. This is a
13579	// read-only field that can be left blank.
13580	AccountId int64 `json:"accountId,omitempty,string"`
13581
13582	// AvailablePermissionIds: IDs of the available user role permissions
13583	// for this subaccount.
13584	AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
13585
13586	// Id: ID of this subaccount. This is a read-only, auto-generated field.
13587	Id int64 `json:"id,omitempty,string"`
13588
13589	// Kind: Identifies what kind of resource this is. Value: the fixed
13590	// string "dfareporting#subaccount".
13591	Kind string `json:"kind,omitempty"`
13592
13593	// Name: Name of this subaccount. This is a required field. Must be less
13594	// than 128 characters long and be unique among subaccounts of the same
13595	// account.
13596	Name string `json:"name,omitempty"`
13597
13598	// ServerResponse contains the HTTP response code and headers from the
13599	// server.
13600	googleapi.ServerResponse `json:"-"`
13601
13602	// ForceSendFields is a list of field names (e.g. "AccountId") to
13603	// unconditionally include in API requests. By default, fields with
13604	// empty values are omitted from API requests. However, any non-pointer,
13605	// non-interface field appearing in ForceSendFields will be sent to the
13606	// server regardless of whether the field is empty or not. This may be
13607	// used to include empty fields in Patch requests.
13608	ForceSendFields []string `json:"-"`
13609
13610	// NullFields is a list of field names (e.g. "AccountId") to include in
13611	// API requests with the JSON null value. By default, fields with empty
13612	// values are omitted from API requests. However, any field with an
13613	// empty value appearing in NullFields will be sent to the server as
13614	// null. It is an error if a field in this list has a non-empty value.
13615	// This may be used to include null fields in Patch requests.
13616	NullFields []string `json:"-"`
13617}
13618
13619func (s *Subaccount) MarshalJSON() ([]byte, error) {
13620	type NoMethod Subaccount
13621	raw := NoMethod(*s)
13622	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13623}
13624
13625// SubaccountsListResponse: Subaccount List Response
13626type SubaccountsListResponse struct {
13627	// Kind: Identifies what kind of resource this is. Value: the fixed
13628	// string "dfareporting#subaccountsListResponse".
13629	Kind string `json:"kind,omitempty"`
13630
13631	// NextPageToken: Pagination token to be used for the next list
13632	// operation.
13633	NextPageToken string `json:"nextPageToken,omitempty"`
13634
13635	// Subaccounts: Subaccount collection.
13636	Subaccounts []*Subaccount `json:"subaccounts,omitempty"`
13637
13638	// ServerResponse contains the HTTP response code and headers from the
13639	// server.
13640	googleapi.ServerResponse `json:"-"`
13641
13642	// ForceSendFields is a list of field names (e.g. "Kind") to
13643	// unconditionally include in API requests. By default, fields with
13644	// empty values are omitted from API requests. However, any non-pointer,
13645	// non-interface field appearing in ForceSendFields will be sent to the
13646	// server regardless of whether the field is empty or not. This may be
13647	// used to include empty fields in Patch requests.
13648	ForceSendFields []string `json:"-"`
13649
13650	// NullFields is a list of field names (e.g. "Kind") to include in API
13651	// requests with the JSON null value. By default, fields with empty
13652	// values are omitted from API requests. However, any field with an
13653	// empty value appearing in NullFields will be sent to the server as
13654	// null. It is an error if a field in this list has a non-empty value.
13655	// This may be used to include null fields in Patch requests.
13656	NullFields []string `json:"-"`
13657}
13658
13659func (s *SubaccountsListResponse) MarshalJSON() ([]byte, error) {
13660	type NoMethod SubaccountsListResponse
13661	raw := NoMethod(*s)
13662	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13663}
13664
13665// TagData: Placement Tag Data
13666type TagData struct {
13667	// AdId: Ad associated with this placement tag. Applicable only when
13668	// format is PLACEMENT_TAG_TRACKING.
13669	AdId int64 `json:"adId,omitempty,string"`
13670
13671	// ClickTag: Tag string to record a click.
13672	ClickTag string `json:"clickTag,omitempty"`
13673
13674	// CreativeId: Creative associated with this placement tag. Applicable
13675	// only when format is PLACEMENT_TAG_TRACKING.
13676	CreativeId int64 `json:"creativeId,omitempty,string"`
13677
13678	// Format: TagData tag format of this tag.
13679	//
13680	// Possible values:
13681	//   "PLACEMENT_TAG_STANDARD"
13682	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
13683	//   "PLACEMENT_TAG_IFRAME_ILAYER"
13684	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
13685	//   "PLACEMENT_TAG_JAVASCRIPT"
13686	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
13687	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
13688	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
13689	//   "PLACEMENT_TAG_CLICK_COMMANDS"
13690	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
13691	//   "PLACEMENT_TAG_TRACKING"
13692	//   "PLACEMENT_TAG_TRACKING_IFRAME"
13693	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
13694	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
13695	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
13696	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
13697	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
13698	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
13699	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
13700	Format string `json:"format,omitempty"`
13701
13702	// ImpressionTag: Tag string for serving an ad.
13703	ImpressionTag string `json:"impressionTag,omitempty"`
13704
13705	// ForceSendFields is a list of field names (e.g. "AdId") to
13706	// unconditionally include in API requests. By default, fields with
13707	// empty values are omitted from API requests. However, any non-pointer,
13708	// non-interface field appearing in ForceSendFields will be sent to the
13709	// server regardless of whether the field is empty or not. This may be
13710	// used to include empty fields in Patch requests.
13711	ForceSendFields []string `json:"-"`
13712
13713	// NullFields is a list of field names (e.g. "AdId") to include in API
13714	// requests with the JSON null value. By default, fields with empty
13715	// values are omitted from API requests. However, any field with an
13716	// empty value appearing in NullFields will be sent to the server as
13717	// null. It is an error if a field in this list has a non-empty value.
13718	// This may be used to include null fields in Patch requests.
13719	NullFields []string `json:"-"`
13720}
13721
13722func (s *TagData) MarshalJSON() ([]byte, error) {
13723	type NoMethod TagData
13724	raw := NoMethod(*s)
13725	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13726}
13727
13728// TagSetting: Tag Settings
13729type TagSetting struct {
13730	// AdditionalKeyValues: Additional key-values to be included in tags.
13731	// Each key-value pair must be of the form key=value, and pairs must be
13732	// separated by a semicolon (;). Keys and values must not contain
13733	// commas. For example, id=2;color=red is a valid value for this field.
13734	AdditionalKeyValues string `json:"additionalKeyValues,omitempty"`
13735
13736	// IncludeClickThroughUrls: Whether static landing page URLs should be
13737	// included in the tags. This setting applies only to placements.
13738	IncludeClickThroughUrls bool `json:"includeClickThroughUrls,omitempty"`
13739
13740	// IncludeClickTracking: Whether click-tracking string should be
13741	// included in the tags.
13742	IncludeClickTracking bool `json:"includeClickTracking,omitempty"`
13743
13744	// KeywordOption: Option specifying how keywords are embedded in ad
13745	// tags. This setting can be used to specify whether keyword
13746	// placeholders are inserted in placement tags for this site. Publishers
13747	// can then add keywords to those placeholders.
13748	//
13749	// Possible values:
13750	//   "PLACEHOLDER_WITH_LIST_OF_KEYWORDS"
13751	//   "IGNORE"
13752	//   "GENERATE_SEPARATE_TAG_FOR_EACH_KEYWORD"
13753	KeywordOption string `json:"keywordOption,omitempty"`
13754
13755	// ForceSendFields is a list of field names (e.g. "AdditionalKeyValues")
13756	// to unconditionally include in API requests. By default, fields with
13757	// empty values are omitted from API requests. However, any non-pointer,
13758	// non-interface field appearing in ForceSendFields will be sent to the
13759	// server regardless of whether the field is empty or not. This may be
13760	// used to include empty fields in Patch requests.
13761	ForceSendFields []string `json:"-"`
13762
13763	// NullFields is a list of field names (e.g. "AdditionalKeyValues") to
13764	// include in API requests with the JSON null value. By default, fields
13765	// with empty values are omitted from API requests. However, any field
13766	// with an empty value appearing in NullFields will be sent to the
13767	// server as null. It is an error if a field in this list has a
13768	// non-empty value. This may be used to include null fields in Patch
13769	// requests.
13770	NullFields []string `json:"-"`
13771}
13772
13773func (s *TagSetting) MarshalJSON() ([]byte, error) {
13774	type NoMethod TagSetting
13775	raw := NoMethod(*s)
13776	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13777}
13778
13779// TagSettings: Dynamic and Image Tag Settings.
13780type TagSettings struct {
13781	// DynamicTagEnabled: Whether dynamic floodlight tags are enabled.
13782	DynamicTagEnabled bool `json:"dynamicTagEnabled,omitempty"`
13783
13784	// ImageTagEnabled: Whether image tags are enabled.
13785	ImageTagEnabled bool `json:"imageTagEnabled,omitempty"`
13786
13787	// ForceSendFields is a list of field names (e.g. "DynamicTagEnabled")
13788	// to unconditionally include in API requests. By default, fields with
13789	// empty values are omitted from API requests. However, any non-pointer,
13790	// non-interface field appearing in ForceSendFields will be sent to the
13791	// server regardless of whether the field is empty or not. This may be
13792	// used to include empty fields in Patch requests.
13793	ForceSendFields []string `json:"-"`
13794
13795	// NullFields is a list of field names (e.g. "DynamicTagEnabled") to
13796	// include in API requests with the JSON null value. By default, fields
13797	// with empty values are omitted from API requests. However, any field
13798	// with an empty value appearing in NullFields will be sent to the
13799	// server as null. It is an error if a field in this list has a
13800	// non-empty value. This may be used to include null fields in Patch
13801	// requests.
13802	NullFields []string `json:"-"`
13803}
13804
13805func (s *TagSettings) MarshalJSON() ([]byte, error) {
13806	type NoMethod TagSettings
13807	raw := NoMethod(*s)
13808	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13809}
13810
13811// TargetWindow: Target Window.
13812type TargetWindow struct {
13813	// CustomHtml: User-entered value.
13814	CustomHtml string `json:"customHtml,omitempty"`
13815
13816	// TargetWindowOption: Type of browser window for which the backup image
13817	// of the flash creative can be displayed.
13818	//
13819	// Possible values:
13820	//   "NEW_WINDOW"
13821	//   "CURRENT_WINDOW"
13822	//   "CUSTOM"
13823	TargetWindowOption string `json:"targetWindowOption,omitempty"`
13824
13825	// ForceSendFields is a list of field names (e.g. "CustomHtml") to
13826	// unconditionally include in API requests. By default, fields with
13827	// empty values are omitted from API requests. However, any non-pointer,
13828	// non-interface field appearing in ForceSendFields will be sent to the
13829	// server regardless of whether the field is empty or not. This may be
13830	// used to include empty fields in Patch requests.
13831	ForceSendFields []string `json:"-"`
13832
13833	// NullFields is a list of field names (e.g. "CustomHtml") to include in
13834	// API requests with the JSON null value. By default, fields with empty
13835	// values are omitted from API requests. However, any field with an
13836	// empty value appearing in NullFields will be sent to the server as
13837	// null. It is an error if a field in this list has a non-empty value.
13838	// This may be used to include null fields in Patch requests.
13839	NullFields []string `json:"-"`
13840}
13841
13842func (s *TargetWindow) MarshalJSON() ([]byte, error) {
13843	type NoMethod TargetWindow
13844	raw := NoMethod(*s)
13845	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13846}
13847
13848// TargetableRemarketingList: Contains properties of a targetable
13849// remarketing list. Remarketing enables you to create lists of users
13850// who have performed specific actions on a site, then target ads to
13851// members of those lists. This resource is a read-only view of a
13852// remarketing list to be used to faciliate targeting ads to specific
13853// lists. Remarketing lists that are owned by your advertisers and those
13854// that are shared to your advertisers or account are accessible via
13855// this resource. To manage remarketing lists that are owned by your
13856// advertisers, use the RemarketingLists resource.
13857type TargetableRemarketingList struct {
13858	// AccountId: Account ID of this remarketing list. This is a read-only,
13859	// auto-generated field that is only returned in GET requests.
13860	AccountId int64 `json:"accountId,omitempty,string"`
13861
13862	// Active: Whether this targetable remarketing list is active.
13863	Active bool `json:"active,omitempty"`
13864
13865	// AdvertiserId: Dimension value for the advertiser ID that owns this
13866	// targetable remarketing list.
13867	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13868
13869	// AdvertiserIdDimensionValue: Dimension value for the ID of the
13870	// advertiser.
13871	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
13872
13873	// Description: Targetable remarketing list description.
13874	Description string `json:"description,omitempty"`
13875
13876	// Id: Targetable remarketing list ID.
13877	Id int64 `json:"id,omitempty,string"`
13878
13879	// Kind: Identifies what kind of resource this is. Value: the fixed
13880	// string "dfareporting#targetableRemarketingList".
13881	Kind string `json:"kind,omitempty"`
13882
13883	// LifeSpan: Number of days that a user should remain in the targetable
13884	// remarketing list without an impression.
13885	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
13886
13887	// ListSize: Number of users currently in the list. This is a read-only
13888	// field.
13889	ListSize int64 `json:"listSize,omitempty,string"`
13890
13891	// ListSource: Product from which this targetable remarketing list was
13892	// originated.
13893	//
13894	// Possible values:
13895	//   "REMARKETING_LIST_SOURCE_OTHER"
13896	//   "REMARKETING_LIST_SOURCE_ADX"
13897	//   "REMARKETING_LIST_SOURCE_DFP"
13898	//   "REMARKETING_LIST_SOURCE_XFP"
13899	//   "REMARKETING_LIST_SOURCE_DFA"
13900	//   "REMARKETING_LIST_SOURCE_GA"
13901	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
13902	//   "REMARKETING_LIST_SOURCE_DBM"
13903	//   "REMARKETING_LIST_SOURCE_GPLUS"
13904	//   "REMARKETING_LIST_SOURCE_DMP"
13905	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
13906	ListSource string `json:"listSource,omitempty"`
13907
13908	// Name: Name of the targetable remarketing list. Is no greater than 128
13909	// characters long.
13910	Name string `json:"name,omitempty"`
13911
13912	// SubaccountId: Subaccount ID of this remarketing list. This is a
13913	// read-only, auto-generated field that is only returned in GET
13914	// requests.
13915	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13916
13917	// ServerResponse contains the HTTP response code and headers from the
13918	// server.
13919	googleapi.ServerResponse `json:"-"`
13920
13921	// ForceSendFields is a list of field names (e.g. "AccountId") to
13922	// unconditionally include in API requests. By default, fields with
13923	// empty values are omitted from API requests. However, any non-pointer,
13924	// non-interface field appearing in ForceSendFields will be sent to the
13925	// server regardless of whether the field is empty or not. This may be
13926	// used to include empty fields in Patch requests.
13927	ForceSendFields []string `json:"-"`
13928
13929	// NullFields is a list of field names (e.g. "AccountId") to include in
13930	// API requests with the JSON null value. By default, fields with empty
13931	// values are omitted from API requests. However, any field with an
13932	// empty value appearing in NullFields will be sent to the server as
13933	// null. It is an error if a field in this list has a non-empty value.
13934	// This may be used to include null fields in Patch requests.
13935	NullFields []string `json:"-"`
13936}
13937
13938func (s *TargetableRemarketingList) MarshalJSON() ([]byte, error) {
13939	type NoMethod TargetableRemarketingList
13940	raw := NoMethod(*s)
13941	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13942}
13943
13944// TargetableRemarketingListsListResponse: Targetable remarketing list
13945// response
13946type TargetableRemarketingListsListResponse struct {
13947	// Kind: Identifies what kind of resource this is. Value: the fixed
13948	// string "dfareporting#targetableRemarketingListsListResponse".
13949	Kind string `json:"kind,omitempty"`
13950
13951	// NextPageToken: Pagination token to be used for the next list
13952	// operation.
13953	NextPageToken string `json:"nextPageToken,omitempty"`
13954
13955	// TargetableRemarketingLists: Targetable remarketing list collection.
13956	TargetableRemarketingLists []*TargetableRemarketingList `json:"targetableRemarketingLists,omitempty"`
13957
13958	// ServerResponse contains the HTTP response code and headers from the
13959	// server.
13960	googleapi.ServerResponse `json:"-"`
13961
13962	// ForceSendFields is a list of field names (e.g. "Kind") to
13963	// unconditionally include in API requests. By default, fields with
13964	// empty values are omitted from API requests. However, any non-pointer,
13965	// non-interface field appearing in ForceSendFields will be sent to the
13966	// server regardless of whether the field is empty or not. This may be
13967	// used to include empty fields in Patch requests.
13968	ForceSendFields []string `json:"-"`
13969
13970	// NullFields is a list of field names (e.g. "Kind") to include in API
13971	// requests with the JSON null value. By default, fields with empty
13972	// values are omitted from API requests. However, any field with an
13973	// empty value appearing in NullFields will be sent to the server as
13974	// null. It is an error if a field in this list has a non-empty value.
13975	// This may be used to include null fields in Patch requests.
13976	NullFields []string `json:"-"`
13977}
13978
13979func (s *TargetableRemarketingListsListResponse) MarshalJSON() ([]byte, error) {
13980	type NoMethod TargetableRemarketingListsListResponse
13981	raw := NoMethod(*s)
13982	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13983}
13984
13985// TargetingTemplate: Contains properties of a targeting template. A
13986// targeting template encapsulates targeting information which can be
13987// reused across multiple ads.
13988type TargetingTemplate struct {
13989	// AccountId: Account ID of this targeting template. This field, if left
13990	// unset, will be auto-generated on insert and is read-only after
13991	// insert.
13992	AccountId int64 `json:"accountId,omitempty,string"`
13993
13994	// AdvertiserId: Advertiser ID of this targeting template. This is a
13995	// required field on insert and is read-only after insert.
13996	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13997
13998	// AdvertiserIdDimensionValue: Dimension value for the ID of the
13999	// advertiser. This is a read-only, auto-generated field.
14000	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
14001
14002	// DayPartTargeting: Time and day targeting criteria.
14003	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
14004
14005	// GeoTargeting: Geographical targeting criteria.
14006	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
14007
14008	// Id: ID of this targeting template. This is a read-only,
14009	// auto-generated field.
14010	Id int64 `json:"id,omitempty,string"`
14011
14012	// KeyValueTargetingExpression: Key-value targeting criteria.
14013	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
14014
14015	// Kind: Identifies what kind of resource this is. Value: the fixed
14016	// string "dfareporting#targetingTemplate".
14017	Kind string `json:"kind,omitempty"`
14018
14019	// LanguageTargeting: Language targeting criteria.
14020	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
14021
14022	// ListTargetingExpression: Remarketing list targeting criteria.
14023	ListTargetingExpression *ListTargetingExpression `json:"listTargetingExpression,omitempty"`
14024
14025	// Name: Name of this targeting template. This field is required. It
14026	// must be less than 256 characters long and unique within an
14027	// advertiser.
14028	Name string `json:"name,omitempty"`
14029
14030	// SubaccountId: Subaccount ID of this targeting template. This field,
14031	// if left unset, will be auto-generated on insert and is read-only
14032	// after insert.
14033	SubaccountId int64 `json:"subaccountId,omitempty,string"`
14034
14035	// TechnologyTargeting: Technology platform targeting criteria.
14036	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
14037
14038	// ServerResponse contains the HTTP response code and headers from the
14039	// server.
14040	googleapi.ServerResponse `json:"-"`
14041
14042	// ForceSendFields is a list of field names (e.g. "AccountId") to
14043	// unconditionally include in API requests. By default, fields with
14044	// empty values are omitted from API requests. However, any non-pointer,
14045	// non-interface field appearing in ForceSendFields will be sent to the
14046	// server regardless of whether the field is empty or not. This may be
14047	// used to include empty fields in Patch requests.
14048	ForceSendFields []string `json:"-"`
14049
14050	// NullFields is a list of field names (e.g. "AccountId") to include in
14051	// API requests with the JSON null value. By default, fields with empty
14052	// values are omitted from API requests. However, any field with an
14053	// empty value appearing in NullFields will be sent to the server as
14054	// null. It is an error if a field in this list has a non-empty value.
14055	// This may be used to include null fields in Patch requests.
14056	NullFields []string `json:"-"`
14057}
14058
14059func (s *TargetingTemplate) MarshalJSON() ([]byte, error) {
14060	type NoMethod TargetingTemplate
14061	raw := NoMethod(*s)
14062	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14063}
14064
14065// TargetingTemplatesListResponse: Targeting Template List Response
14066type TargetingTemplatesListResponse struct {
14067	// Kind: Identifies what kind of resource this is. Value: the fixed
14068	// string "dfareporting#targetingTemplatesListResponse".
14069	Kind string `json:"kind,omitempty"`
14070
14071	// NextPageToken: Pagination token to be used for the next list
14072	// operation.
14073	NextPageToken string `json:"nextPageToken,omitempty"`
14074
14075	// TargetingTemplates: Targeting template collection.
14076	TargetingTemplates []*TargetingTemplate `json:"targetingTemplates,omitempty"`
14077
14078	// ServerResponse contains the HTTP response code and headers from the
14079	// server.
14080	googleapi.ServerResponse `json:"-"`
14081
14082	// ForceSendFields is a list of field names (e.g. "Kind") to
14083	// unconditionally include in API requests. By default, fields with
14084	// empty values are omitted from API requests. However, any non-pointer,
14085	// non-interface field appearing in ForceSendFields will be sent to the
14086	// server regardless of whether the field is empty or not. This may be
14087	// used to include empty fields in Patch requests.
14088	ForceSendFields []string `json:"-"`
14089
14090	// NullFields is a list of field names (e.g. "Kind") to include in API
14091	// requests with the JSON null value. By default, fields with empty
14092	// values are omitted from API requests. However, any field with an
14093	// empty value appearing in NullFields will be sent to the server as
14094	// null. It is an error if a field in this list has a non-empty value.
14095	// This may be used to include null fields in Patch requests.
14096	NullFields []string `json:"-"`
14097}
14098
14099func (s *TargetingTemplatesListResponse) MarshalJSON() ([]byte, error) {
14100	type NoMethod TargetingTemplatesListResponse
14101	raw := NoMethod(*s)
14102	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14103}
14104
14105// TechnologyTargeting: Technology Targeting.
14106type TechnologyTargeting struct {
14107	// Browsers: Browsers that this ad targets. For each browser either set
14108	// browserVersionId or dartId along with the version numbers. If both
14109	// are specified, only browserVersionId will be used. The other fields
14110	// are populated automatically when the ad is inserted or updated.
14111	Browsers []*Browser `json:"browsers,omitempty"`
14112
14113	// ConnectionTypes: Connection types that this ad targets. For each
14114	// connection type only id is required. The other fields are populated
14115	// automatically when the ad is inserted or updated.
14116	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
14117
14118	// MobileCarriers: Mobile carriers that this ad targets. For each mobile
14119	// carrier only id is required, and the other fields are populated
14120	// automatically when the ad is inserted or updated. If targeting a
14121	// mobile carrier, do not set targeting for any zip codes.
14122	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
14123
14124	// OperatingSystemVersions: Operating system versions that this ad
14125	// targets. To target all versions, use operatingSystems. For each
14126	// operating system version, only id is required. The other fields are
14127	// populated automatically when the ad is inserted or updated. If
14128	// targeting an operating system version, do not set targeting for the
14129	// corresponding operating system in operatingSystems.
14130	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
14131
14132	// OperatingSystems: Operating systems that this ad targets. To target
14133	// specific versions, use operatingSystemVersions. For each operating
14134	// system only dartId is required. The other fields are populated
14135	// automatically when the ad is inserted or updated. If targeting an
14136	// operating system, do not set targeting for operating system versions
14137	// for the same operating system.
14138	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
14139
14140	// PlatformTypes: Platform types that this ad targets. For example,
14141	// desktop, mobile, or tablet. For each platform type, only id is
14142	// required, and the other fields are populated automatically when the
14143	// ad is inserted or updated.
14144	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
14145
14146	// ForceSendFields is a list of field names (e.g. "Browsers") to
14147	// unconditionally include in API requests. By default, fields with
14148	// empty values are omitted from API requests. However, any non-pointer,
14149	// non-interface field appearing in ForceSendFields will be sent to the
14150	// server regardless of whether the field is empty or not. This may be
14151	// used to include empty fields in Patch requests.
14152	ForceSendFields []string `json:"-"`
14153
14154	// NullFields is a list of field names (e.g. "Browsers") to include in
14155	// API requests with the JSON null value. By default, fields with empty
14156	// values are omitted from API requests. However, any field with an
14157	// empty value appearing in NullFields will be sent to the server as
14158	// null. It is an error if a field in this list has a non-empty value.
14159	// This may be used to include null fields in Patch requests.
14160	NullFields []string `json:"-"`
14161}
14162
14163func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) {
14164	type NoMethod TechnologyTargeting
14165	raw := NoMethod(*s)
14166	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14167}
14168
14169// ThirdPartyAuthenticationToken: Third Party Authentication Token
14170type ThirdPartyAuthenticationToken struct {
14171	// Name: Name of the third-party authentication token.
14172	Name string `json:"name,omitempty"`
14173
14174	// Value: Value of the third-party authentication token. This is a
14175	// read-only, auto-generated field.
14176	Value string `json:"value,omitempty"`
14177
14178	// ForceSendFields is a list of field names (e.g. "Name") to
14179	// unconditionally include in API requests. By default, fields with
14180	// empty values are omitted from API requests. However, any non-pointer,
14181	// non-interface field appearing in ForceSendFields will be sent to the
14182	// server regardless of whether the field is empty or not. This may be
14183	// used to include empty fields in Patch requests.
14184	ForceSendFields []string `json:"-"`
14185
14186	// NullFields is a list of field names (e.g. "Name") to include in API
14187	// requests with the JSON null value. By default, fields with empty
14188	// values are omitted from API requests. However, any field with an
14189	// empty value appearing in NullFields will be sent to the server as
14190	// null. It is an error if a field in this list has a non-empty value.
14191	// This may be used to include null fields in Patch requests.
14192	NullFields []string `json:"-"`
14193}
14194
14195func (s *ThirdPartyAuthenticationToken) MarshalJSON() ([]byte, error) {
14196	type NoMethod ThirdPartyAuthenticationToken
14197	raw := NoMethod(*s)
14198	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14199}
14200
14201// ThirdPartyTrackingUrl: Third-party Tracking URL.
14202type ThirdPartyTrackingUrl struct {
14203	// ThirdPartyUrlType: Third-party URL type for in-stream video and
14204	// in-stream audio creatives.
14205	//
14206	// Possible values:
14207	//   "IMPRESSION"
14208	//   "CLICK_TRACKING"
14209	//   "VIDEO_START"
14210	//   "VIDEO_FIRST_QUARTILE"
14211	//   "VIDEO_MIDPOINT"
14212	//   "VIDEO_THIRD_QUARTILE"
14213	//   "VIDEO_COMPLETE"
14214	//   "VIDEO_MUTE"
14215	//   "VIDEO_PAUSE"
14216	//   "VIDEO_REWIND"
14217	//   "VIDEO_FULLSCREEN"
14218	//   "VIDEO_STOP"
14219	//   "VIDEO_CUSTOM"
14220	//   "SURVEY"
14221	//   "RICH_MEDIA_IMPRESSION"
14222	//   "RICH_MEDIA_RM_IMPRESSION"
14223	//   "RICH_MEDIA_BACKUP_IMPRESSION"
14224	//   "VIDEO_SKIP"
14225	//   "VIDEO_PROGRESS"
14226	ThirdPartyUrlType string `json:"thirdPartyUrlType,omitempty"`
14227
14228	// Url: URL for the specified third-party URL type.
14229	Url string `json:"url,omitempty"`
14230
14231	// ForceSendFields is a list of field names (e.g. "ThirdPartyUrlType")
14232	// to unconditionally include in API requests. By default, fields with
14233	// empty values are omitted from API requests. However, any non-pointer,
14234	// non-interface field appearing in ForceSendFields will be sent to the
14235	// server regardless of whether the field is empty or not. This may be
14236	// used to include empty fields in Patch requests.
14237	ForceSendFields []string `json:"-"`
14238
14239	// NullFields is a list of field names (e.g. "ThirdPartyUrlType") to
14240	// include in API requests with the JSON null value. By default, fields
14241	// with empty values are omitted from API requests. However, any field
14242	// with an empty value appearing in NullFields will be sent to the
14243	// server as null. It is an error if a field in this list has a
14244	// non-empty value. This may be used to include null fields in Patch
14245	// requests.
14246	NullFields []string `json:"-"`
14247}
14248
14249func (s *ThirdPartyTrackingUrl) MarshalJSON() ([]byte, error) {
14250	type NoMethod ThirdPartyTrackingUrl
14251	raw := NoMethod(*s)
14252	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14253}
14254
14255// TranscodeSetting: Transcode Settings
14256type TranscodeSetting struct {
14257	// EnabledVideoFormats: Allowlist of video formats to be served to this
14258	// placement. Set this list to null or empty to serve all video formats.
14259	EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
14260
14261	// Kind: Identifies what kind of resource this is. Value: the fixed
14262	// string "dfareporting#transcodeSetting".
14263	Kind string `json:"kind,omitempty"`
14264
14265	// ForceSendFields is a list of field names (e.g. "EnabledVideoFormats")
14266	// to unconditionally include in API requests. By default, fields with
14267	// empty values are omitted from API requests. However, any non-pointer,
14268	// non-interface field appearing in ForceSendFields will be sent to the
14269	// server regardless of whether the field is empty or not. This may be
14270	// used to include empty fields in Patch requests.
14271	ForceSendFields []string `json:"-"`
14272
14273	// NullFields is a list of field names (e.g. "EnabledVideoFormats") to
14274	// include in API requests with the JSON null value. By default, fields
14275	// with empty values are omitted from API requests. However, any field
14276	// with an empty value appearing in NullFields will be sent to the
14277	// server as null. It is an error if a field in this list has a
14278	// non-empty value. This may be used to include null fields in Patch
14279	// requests.
14280	NullFields []string `json:"-"`
14281}
14282
14283func (s *TranscodeSetting) MarshalJSON() ([]byte, error) {
14284	type NoMethod TranscodeSetting
14285	raw := NoMethod(*s)
14286	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14287}
14288
14289// UniversalAdId: A Universal Ad ID as per the VAST 4.0 spec. Applicable
14290// to the following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and
14291// VPAID.
14292type UniversalAdId struct {
14293	// Registry: Registry used for the Ad ID value.
14294	//
14295	// Possible values:
14296	//   "OTHER"
14297	//   "AD_ID_OFFICIAL"
14298	//   "CLEARCAST"
14299	//   "DCM"
14300	Registry string `json:"registry,omitempty"`
14301
14302	// Value: ID value for this creative. Only alphanumeric characters and
14303	// the following symbols are valid: "_/\-". Maximum length is 64
14304	// characters. Read only when registry is DCM.
14305	Value string `json:"value,omitempty"`
14306
14307	// ForceSendFields is a list of field names (e.g. "Registry") to
14308	// unconditionally include in API requests. By default, fields with
14309	// empty values are omitted from API requests. However, any non-pointer,
14310	// non-interface field appearing in ForceSendFields will be sent to the
14311	// server regardless of whether the field is empty or not. This may be
14312	// used to include empty fields in Patch requests.
14313	ForceSendFields []string `json:"-"`
14314
14315	// NullFields is a list of field names (e.g. "Registry") to include in
14316	// API requests with the JSON null value. By default, fields with empty
14317	// values are omitted from API requests. However, any field with an
14318	// empty value appearing in NullFields will be sent to the server as
14319	// null. It is an error if a field in this list has a non-empty value.
14320	// This may be used to include null fields in Patch requests.
14321	NullFields []string `json:"-"`
14322}
14323
14324func (s *UniversalAdId) MarshalJSON() ([]byte, error) {
14325	type NoMethod UniversalAdId
14326	raw := NoMethod(*s)
14327	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14328}
14329
14330// UserDefinedVariableConfiguration: User Defined Variable
14331// configuration.
14332type UserDefinedVariableConfiguration struct {
14333	// DataType: Data type for the variable. This is a required field.
14334	//
14335	// Possible values:
14336	//   "STRING"
14337	//   "NUMBER"
14338	DataType string `json:"dataType,omitempty"`
14339
14340	// ReportName: User-friendly name for the variable which will appear in
14341	// reports. This is a required field, must be less than 64 characters
14342	// long, and cannot contain the following characters: ""<>".
14343	ReportName string `json:"reportName,omitempty"`
14344
14345	// VariableType: Variable name in the tag. This is a required field.
14346	//
14347	// Possible values:
14348	//   "U1"
14349	//   "U2"
14350	//   "U3"
14351	//   "U4"
14352	//   "U5"
14353	//   "U6"
14354	//   "U7"
14355	//   "U8"
14356	//   "U9"
14357	//   "U10"
14358	//   "U11"
14359	//   "U12"
14360	//   "U13"
14361	//   "U14"
14362	//   "U15"
14363	//   "U16"
14364	//   "U17"
14365	//   "U18"
14366	//   "U19"
14367	//   "U20"
14368	//   "U21"
14369	//   "U22"
14370	//   "U23"
14371	//   "U24"
14372	//   "U25"
14373	//   "U26"
14374	//   "U27"
14375	//   "U28"
14376	//   "U29"
14377	//   "U30"
14378	//   "U31"
14379	//   "U32"
14380	//   "U33"
14381	//   "U34"
14382	//   "U35"
14383	//   "U36"
14384	//   "U37"
14385	//   "U38"
14386	//   "U39"
14387	//   "U40"
14388	//   "U41"
14389	//   "U42"
14390	//   "U43"
14391	//   "U44"
14392	//   "U45"
14393	//   "U46"
14394	//   "U47"
14395	//   "U48"
14396	//   "U49"
14397	//   "U50"
14398	//   "U51"
14399	//   "U52"
14400	//   "U53"
14401	//   "U54"
14402	//   "U55"
14403	//   "U56"
14404	//   "U57"
14405	//   "U58"
14406	//   "U59"
14407	//   "U60"
14408	//   "U61"
14409	//   "U62"
14410	//   "U63"
14411	//   "U64"
14412	//   "U65"
14413	//   "U66"
14414	//   "U67"
14415	//   "U68"
14416	//   "U69"
14417	//   "U70"
14418	//   "U71"
14419	//   "U72"
14420	//   "U73"
14421	//   "U74"
14422	//   "U75"
14423	//   "U76"
14424	//   "U77"
14425	//   "U78"
14426	//   "U79"
14427	//   "U80"
14428	//   "U81"
14429	//   "U82"
14430	//   "U83"
14431	//   "U84"
14432	//   "U85"
14433	//   "U86"
14434	//   "U87"
14435	//   "U88"
14436	//   "U89"
14437	//   "U90"
14438	//   "U91"
14439	//   "U92"
14440	//   "U93"
14441	//   "U94"
14442	//   "U95"
14443	//   "U96"
14444	//   "U97"
14445	//   "U98"
14446	//   "U99"
14447	//   "U100"
14448	VariableType string `json:"variableType,omitempty"`
14449
14450	// ForceSendFields is a list of field names (e.g. "DataType") to
14451	// unconditionally include in API requests. By default, fields with
14452	// empty values are omitted from API requests. However, any non-pointer,
14453	// non-interface field appearing in ForceSendFields will be sent to the
14454	// server regardless of whether the field is empty or not. This may be
14455	// used to include empty fields in Patch requests.
14456	ForceSendFields []string `json:"-"`
14457
14458	// NullFields is a list of field names (e.g. "DataType") to include in
14459	// API requests with the JSON null value. By default, fields with empty
14460	// values are omitted from API requests. However, any field with an
14461	// empty value appearing in NullFields will be sent to the server as
14462	// null. It is an error if a field in this list has a non-empty value.
14463	// This may be used to include null fields in Patch requests.
14464	NullFields []string `json:"-"`
14465}
14466
14467func (s *UserDefinedVariableConfiguration) MarshalJSON() ([]byte, error) {
14468	type NoMethod UserDefinedVariableConfiguration
14469	raw := NoMethod(*s)
14470	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14471}
14472
14473// UserProfile: A UserProfile resource lets you list all DFA user
14474// profiles that are associated with a Google user account. The
14475// profile_id needs to be specified in other API requests.
14476type UserProfile struct {
14477	// AccountId: The account ID to which this profile belongs.
14478	AccountId int64 `json:"accountId,omitempty,string"`
14479
14480	// AccountName: The account name this profile belongs to.
14481	AccountName string `json:"accountName,omitempty"`
14482
14483	// Etag: Etag of this resource.
14484	Etag string `json:"etag,omitempty"`
14485
14486	// Kind: Identifies what kind of resource this is. Value: the fixed
14487	// string "dfareporting#userProfile".
14488	Kind string `json:"kind,omitempty"`
14489
14490	// ProfileId: The unique ID of the user profile.
14491	ProfileId int64 `json:"profileId,omitempty,string"`
14492
14493	// SubAccountId: The sub account ID this profile belongs to if
14494	// applicable.
14495	SubAccountId int64 `json:"subAccountId,omitempty,string"`
14496
14497	// SubAccountName: The sub account name this profile belongs to if
14498	// applicable.
14499	SubAccountName string `json:"subAccountName,omitempty"`
14500
14501	// UserName: The user name.
14502	UserName string `json:"userName,omitempty"`
14503
14504	// ServerResponse contains the HTTP response code and headers from the
14505	// server.
14506	googleapi.ServerResponse `json:"-"`
14507
14508	// ForceSendFields is a list of field names (e.g. "AccountId") to
14509	// unconditionally include in API requests. By default, fields with
14510	// empty values are omitted from API requests. However, any non-pointer,
14511	// non-interface field appearing in ForceSendFields will be sent to the
14512	// server regardless of whether the field is empty or not. This may be
14513	// used to include empty fields in Patch requests.
14514	ForceSendFields []string `json:"-"`
14515
14516	// NullFields is a list of field names (e.g. "AccountId") to include in
14517	// API requests with the JSON null value. By default, fields with empty
14518	// values are omitted from API requests. However, any field with an
14519	// empty value appearing in NullFields will be sent to the server as
14520	// null. It is an error if a field in this list has a non-empty value.
14521	// This may be used to include null fields in Patch requests.
14522	NullFields []string `json:"-"`
14523}
14524
14525func (s *UserProfile) MarshalJSON() ([]byte, error) {
14526	type NoMethod UserProfile
14527	raw := NoMethod(*s)
14528	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14529}
14530
14531// UserProfileList: Represents the list of user profiles.
14532type UserProfileList struct {
14533	// Etag: Etag of this resource.
14534	Etag string `json:"etag,omitempty"`
14535
14536	// Items: The user profiles returned in this response.
14537	Items []*UserProfile `json:"items,omitempty"`
14538
14539	// Kind: Identifies what kind of resource this is. Value: the fixed
14540	// string "dfareporting#userProfileList".
14541	Kind string `json:"kind,omitempty"`
14542
14543	// ServerResponse contains the HTTP response code and headers from the
14544	// server.
14545	googleapi.ServerResponse `json:"-"`
14546
14547	// ForceSendFields is a list of field names (e.g. "Etag") to
14548	// unconditionally include in API requests. By default, fields with
14549	// empty values are omitted from API requests. However, any non-pointer,
14550	// non-interface field appearing in ForceSendFields will be sent to the
14551	// server regardless of whether the field is empty or not. This may be
14552	// used to include empty fields in Patch requests.
14553	ForceSendFields []string `json:"-"`
14554
14555	// NullFields is a list of field names (e.g. "Etag") to include in API
14556	// requests with the JSON null value. By default, fields with empty
14557	// values are omitted from API requests. However, any field with an
14558	// empty value appearing in NullFields will be sent to the server as
14559	// null. It is an error if a field in this list has a non-empty value.
14560	// This may be used to include null fields in Patch requests.
14561	NullFields []string `json:"-"`
14562}
14563
14564func (s *UserProfileList) MarshalJSON() ([]byte, error) {
14565	type NoMethod UserProfileList
14566	raw := NoMethod(*s)
14567	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14568}
14569
14570// UserRole: Contains properties of auser role, which is used to manage
14571// user access.
14572type UserRole struct {
14573	// AccountId: Account ID of this user role. This is a read-only field
14574	// that can be left blank.
14575	AccountId int64 `json:"accountId,omitempty,string"`
14576
14577	// DefaultUserRole: Whether this is a default user role. Default user
14578	// roles are created by the system for the account/subaccount and cannot
14579	// be modified or deleted. Each default user role comes with a basic set
14580	// of preassigned permissions.
14581	DefaultUserRole bool `json:"defaultUserRole,omitempty"`
14582
14583	// Id: ID of this user role. This is a read-only, auto-generated field.
14584	Id int64 `json:"id,omitempty,string"`
14585
14586	// Kind: Identifies what kind of resource this is. Value: the fixed
14587	// string "dfareporting#userRole".
14588	Kind string `json:"kind,omitempty"`
14589
14590	// Name: Name of this user role. This is a required field. Must be less
14591	// than 256 characters long. If this user role is under a subaccount,
14592	// the name must be unique among sites of the same subaccount.
14593	// Otherwise, this user role is a top-level user role, and the name must
14594	// be unique among top-level user roles of the same account.
14595	Name string `json:"name,omitempty"`
14596
14597	// ParentUserRoleId: ID of the user role that this user role is based on
14598	// or copied from. This is a required field.
14599	ParentUserRoleId int64 `json:"parentUserRoleId,omitempty,string"`
14600
14601	// Permissions: List of permissions associated with this user role.
14602	Permissions []*UserRolePermission `json:"permissions,omitempty"`
14603
14604	// SubaccountId: Subaccount ID of this user role. This is a read-only
14605	// field that can be left blank.
14606	SubaccountId int64 `json:"subaccountId,omitempty,string"`
14607
14608	// ServerResponse contains the HTTP response code and headers from the
14609	// server.
14610	googleapi.ServerResponse `json:"-"`
14611
14612	// ForceSendFields is a list of field names (e.g. "AccountId") to
14613	// unconditionally include in API requests. By default, fields with
14614	// empty values are omitted from API requests. However, any non-pointer,
14615	// non-interface field appearing in ForceSendFields will be sent to the
14616	// server regardless of whether the field is empty or not. This may be
14617	// used to include empty fields in Patch requests.
14618	ForceSendFields []string `json:"-"`
14619
14620	// NullFields is a list of field names (e.g. "AccountId") to include in
14621	// API requests with the JSON null value. By default, fields with empty
14622	// values are omitted from API requests. However, any field with an
14623	// empty value appearing in NullFields will be sent to the server as
14624	// null. It is an error if a field in this list has a non-empty value.
14625	// This may be used to include null fields in Patch requests.
14626	NullFields []string `json:"-"`
14627}
14628
14629func (s *UserRole) MarshalJSON() ([]byte, error) {
14630	type NoMethod UserRole
14631	raw := NoMethod(*s)
14632	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14633}
14634
14635// UserRolePermission: Contains properties of a user role permission.
14636type UserRolePermission struct {
14637	// Availability: Levels of availability for a user role permission.
14638	//
14639	// Possible values:
14640	//   "NOT_AVAILABLE_BY_DEFAULT"
14641	//   "ACCOUNT_BY_DEFAULT"
14642	//   "SUBACCOUNT_AND_ACCOUNT_BY_DEFAULT"
14643	//   "ACCOUNT_ALWAYS"
14644	//   "SUBACCOUNT_AND_ACCOUNT_ALWAYS"
14645	Availability string `json:"availability,omitempty"`
14646
14647	// Id: ID of this user role permission.
14648	Id int64 `json:"id,omitempty,string"`
14649
14650	// Kind: Identifies what kind of resource this is. Value: the fixed
14651	// string "dfareporting#userRolePermission".
14652	Kind string `json:"kind,omitempty"`
14653
14654	// Name: Name of this user role permission.
14655	Name string `json:"name,omitempty"`
14656
14657	// PermissionGroupId: ID of the permission group that this user role
14658	// permission belongs to.
14659	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
14660
14661	// ServerResponse contains the HTTP response code and headers from the
14662	// server.
14663	googleapi.ServerResponse `json:"-"`
14664
14665	// ForceSendFields is a list of field names (e.g. "Availability") to
14666	// unconditionally include in API requests. By default, fields with
14667	// empty values are omitted from API requests. However, any non-pointer,
14668	// non-interface field appearing in ForceSendFields will be sent to the
14669	// server regardless of whether the field is empty or not. This may be
14670	// used to include empty fields in Patch requests.
14671	ForceSendFields []string `json:"-"`
14672
14673	// NullFields is a list of field names (e.g. "Availability") to include
14674	// in API requests with the JSON null value. By default, fields with
14675	// empty values are omitted from API requests. However, any field with
14676	// an empty value appearing in NullFields will be sent to the server as
14677	// null. It is an error if a field in this list has a non-empty value.
14678	// This may be used to include null fields in Patch requests.
14679	NullFields []string `json:"-"`
14680}
14681
14682func (s *UserRolePermission) MarshalJSON() ([]byte, error) {
14683	type NoMethod UserRolePermission
14684	raw := NoMethod(*s)
14685	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14686}
14687
14688// UserRolePermissionGroup: Represents a grouping of related user role
14689// permissions.
14690type UserRolePermissionGroup struct {
14691	// Id: ID of this user role permission.
14692	Id int64 `json:"id,omitempty,string"`
14693
14694	// Kind: Identifies what kind of resource this is. Value: the fixed
14695	// string "dfareporting#userRolePermissionGroup".
14696	Kind string `json:"kind,omitempty"`
14697
14698	// Name: Name of this user role permission group.
14699	Name string `json:"name,omitempty"`
14700
14701	// ServerResponse contains the HTTP response code and headers from the
14702	// server.
14703	googleapi.ServerResponse `json:"-"`
14704
14705	// ForceSendFields is a list of field names (e.g. "Id") to
14706	// unconditionally include in API requests. By default, fields with
14707	// empty values are omitted from API requests. However, any non-pointer,
14708	// non-interface field appearing in ForceSendFields will be sent to the
14709	// server regardless of whether the field is empty or not. This may be
14710	// used to include empty fields in Patch requests.
14711	ForceSendFields []string `json:"-"`
14712
14713	// NullFields is a list of field names (e.g. "Id") to include in API
14714	// requests with the JSON null value. By default, fields with empty
14715	// values are omitted from API requests. However, any field with an
14716	// empty value appearing in NullFields will be sent to the server as
14717	// null. It is an error if a field in this list has a non-empty value.
14718	// This may be used to include null fields in Patch requests.
14719	NullFields []string `json:"-"`
14720}
14721
14722func (s *UserRolePermissionGroup) MarshalJSON() ([]byte, error) {
14723	type NoMethod UserRolePermissionGroup
14724	raw := NoMethod(*s)
14725	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14726}
14727
14728// UserRolePermissionGroupsListResponse: User Role Permission Group List
14729// Response
14730type UserRolePermissionGroupsListResponse struct {
14731	// Kind: Identifies what kind of resource this is. Value: the fixed
14732	// string "dfareporting#userRolePermissionGroupsListResponse".
14733	Kind string `json:"kind,omitempty"`
14734
14735	// UserRolePermissionGroups: User role permission group collection.
14736	UserRolePermissionGroups []*UserRolePermissionGroup `json:"userRolePermissionGroups,omitempty"`
14737
14738	// ServerResponse contains the HTTP response code and headers from the
14739	// server.
14740	googleapi.ServerResponse `json:"-"`
14741
14742	// ForceSendFields is a list of field names (e.g. "Kind") to
14743	// unconditionally include in API requests. By default, fields with
14744	// empty values are omitted from API requests. However, any non-pointer,
14745	// non-interface field appearing in ForceSendFields will be sent to the
14746	// server regardless of whether the field is empty or not. This may be
14747	// used to include empty fields in Patch requests.
14748	ForceSendFields []string `json:"-"`
14749
14750	// NullFields is a list of field names (e.g. "Kind") to include in API
14751	// requests with the JSON null value. By default, fields with empty
14752	// values are omitted from API requests. However, any field with an
14753	// empty value appearing in NullFields will be sent to the server as
14754	// null. It is an error if a field in this list has a non-empty value.
14755	// This may be used to include null fields in Patch requests.
14756	NullFields []string `json:"-"`
14757}
14758
14759func (s *UserRolePermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
14760	type NoMethod UserRolePermissionGroupsListResponse
14761	raw := NoMethod(*s)
14762	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14763}
14764
14765// UserRolePermissionsListResponse: User Role Permission List Response
14766type UserRolePermissionsListResponse struct {
14767	// Kind: Identifies what kind of resource this is. Value: the fixed
14768	// string "dfareporting#userRolePermissionsListResponse".
14769	Kind string `json:"kind,omitempty"`
14770
14771	// UserRolePermissions: User role permission collection.
14772	UserRolePermissions []*UserRolePermission `json:"userRolePermissions,omitempty"`
14773
14774	// ServerResponse contains the HTTP response code and headers from the
14775	// server.
14776	googleapi.ServerResponse `json:"-"`
14777
14778	// ForceSendFields is a list of field names (e.g. "Kind") to
14779	// unconditionally include in API requests. By default, fields with
14780	// empty values are omitted from API requests. However, any non-pointer,
14781	// non-interface field appearing in ForceSendFields will be sent to the
14782	// server regardless of whether the field is empty or not. This may be
14783	// used to include empty fields in Patch requests.
14784	ForceSendFields []string `json:"-"`
14785
14786	// NullFields is a list of field names (e.g. "Kind") to include in API
14787	// requests with the JSON null value. By default, fields with empty
14788	// values are omitted from API requests. However, any field with an
14789	// empty value appearing in NullFields will be sent to the server as
14790	// null. It is an error if a field in this list has a non-empty value.
14791	// This may be used to include null fields in Patch requests.
14792	NullFields []string `json:"-"`
14793}
14794
14795func (s *UserRolePermissionsListResponse) MarshalJSON() ([]byte, error) {
14796	type NoMethod UserRolePermissionsListResponse
14797	raw := NoMethod(*s)
14798	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14799}
14800
14801// UserRolesListResponse: User Role List Response
14802type UserRolesListResponse struct {
14803	// Kind: Identifies what kind of resource this is. Value: the fixed
14804	// string "dfareporting#userRolesListResponse".
14805	Kind string `json:"kind,omitempty"`
14806
14807	// NextPageToken: Pagination token to be used for the next list
14808	// operation.
14809	NextPageToken string `json:"nextPageToken,omitempty"`
14810
14811	// UserRoles: User role collection.
14812	UserRoles []*UserRole `json:"userRoles,omitempty"`
14813
14814	// ServerResponse contains the HTTP response code and headers from the
14815	// server.
14816	googleapi.ServerResponse `json:"-"`
14817
14818	// ForceSendFields is a list of field names (e.g. "Kind") to
14819	// unconditionally include in API requests. By default, fields with
14820	// empty values are omitted from API requests. However, any non-pointer,
14821	// non-interface field appearing in ForceSendFields will be sent to the
14822	// server regardless of whether the field is empty or not. This may be
14823	// used to include empty fields in Patch requests.
14824	ForceSendFields []string `json:"-"`
14825
14826	// NullFields is a list of field names (e.g. "Kind") to include in API
14827	// requests with the JSON null value. By default, fields with empty
14828	// values are omitted from API requests. However, any field with an
14829	// empty value appearing in NullFields will be sent to the server as
14830	// null. It is an error if a field in this list has a non-empty value.
14831	// This may be used to include null fields in Patch requests.
14832	NullFields []string `json:"-"`
14833}
14834
14835func (s *UserRolesListResponse) MarshalJSON() ([]byte, error) {
14836	type NoMethod UserRolesListResponse
14837	raw := NoMethod(*s)
14838	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14839}
14840
14841// VideoFormat: Contains information about supported video formats.
14842type VideoFormat struct {
14843	// FileType: File type of the video format.
14844	//
14845	// Possible values:
14846	//   "FLV"
14847	//   "THREEGPP"
14848	//   "MP4"
14849	//   "WEBM"
14850	//   "M3U8"
14851	FileType string `json:"fileType,omitempty"`
14852
14853	// Id: ID of the video format.
14854	Id int64 `json:"id,omitempty"`
14855
14856	// Kind: Identifies what kind of resource this is. Value: the fixed
14857	// string "dfareporting#videoFormat".
14858	Kind string `json:"kind,omitempty"`
14859
14860	// Resolution: The resolution of this video format.
14861	Resolution *Size `json:"resolution,omitempty"`
14862
14863	// TargetBitRate: The target bit rate of this video format.
14864	TargetBitRate int64 `json:"targetBitRate,omitempty"`
14865
14866	// ServerResponse contains the HTTP response code and headers from the
14867	// server.
14868	googleapi.ServerResponse `json:"-"`
14869
14870	// ForceSendFields is a list of field names (e.g. "FileType") to
14871	// unconditionally include in API requests. By default, fields with
14872	// empty values are omitted from API requests. However, any non-pointer,
14873	// non-interface field appearing in ForceSendFields will be sent to the
14874	// server regardless of whether the field is empty or not. This may be
14875	// used to include empty fields in Patch requests.
14876	ForceSendFields []string `json:"-"`
14877
14878	// NullFields is a list of field names (e.g. "FileType") to include in
14879	// API requests with the JSON null value. By default, fields with empty
14880	// values are omitted from API requests. However, any field with an
14881	// empty value appearing in NullFields will be sent to the server as
14882	// null. It is an error if a field in this list has a non-empty value.
14883	// This may be used to include null fields in Patch requests.
14884	NullFields []string `json:"-"`
14885}
14886
14887func (s *VideoFormat) MarshalJSON() ([]byte, error) {
14888	type NoMethod VideoFormat
14889	raw := NoMethod(*s)
14890	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14891}
14892
14893// VideoFormatsListResponse: Video Format List Response
14894type VideoFormatsListResponse struct {
14895	// Kind: Identifies what kind of resource this is. Value: the fixed
14896	// string "dfareporting#videoFormatsListResponse".
14897	Kind string `json:"kind,omitempty"`
14898
14899	// VideoFormats: Video format collection.
14900	VideoFormats []*VideoFormat `json:"videoFormats,omitempty"`
14901
14902	// ServerResponse contains the HTTP response code and headers from the
14903	// server.
14904	googleapi.ServerResponse `json:"-"`
14905
14906	// ForceSendFields is a list of field names (e.g. "Kind") to
14907	// unconditionally include in API requests. By default, fields with
14908	// empty values are omitted from API requests. However, any non-pointer,
14909	// non-interface field appearing in ForceSendFields will be sent to the
14910	// server regardless of whether the field is empty or not. This may be
14911	// used to include empty fields in Patch requests.
14912	ForceSendFields []string `json:"-"`
14913
14914	// NullFields is a list of field names (e.g. "Kind") to include in API
14915	// requests with the JSON null value. By default, fields with empty
14916	// values are omitted from API requests. However, any field with an
14917	// empty value appearing in NullFields will be sent to the server as
14918	// null. It is an error if a field in this list has a non-empty value.
14919	// This may be used to include null fields in Patch requests.
14920	NullFields []string `json:"-"`
14921}
14922
14923func (s *VideoFormatsListResponse) MarshalJSON() ([]byte, error) {
14924	type NoMethod VideoFormatsListResponse
14925	raw := NoMethod(*s)
14926	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14927}
14928
14929// VideoOffset: Video Offset
14930type VideoOffset struct {
14931	// OffsetPercentage: Duration, as a percentage of video duration. Do not
14932	// set when offsetSeconds is set. Acceptable values are 0 to 100,
14933	// inclusive.
14934	OffsetPercentage int64 `json:"offsetPercentage,omitempty"`
14935
14936	// OffsetSeconds: Duration, in seconds. Do not set when offsetPercentage
14937	// is set. Acceptable values are 0 to 86399, inclusive.
14938	OffsetSeconds int64 `json:"offsetSeconds,omitempty"`
14939
14940	// ForceSendFields is a list of field names (e.g. "OffsetPercentage") to
14941	// unconditionally include in API requests. By default, fields with
14942	// empty values are omitted from API requests. However, any non-pointer,
14943	// non-interface field appearing in ForceSendFields will be sent to the
14944	// server regardless of whether the field is empty or not. This may be
14945	// used to include empty fields in Patch requests.
14946	ForceSendFields []string `json:"-"`
14947
14948	// NullFields is a list of field names (e.g. "OffsetPercentage") to
14949	// include in API requests with the JSON null value. By default, fields
14950	// with empty values are omitted from API requests. However, any field
14951	// with an empty value appearing in NullFields will be sent to the
14952	// server as null. It is an error if a field in this list has a
14953	// non-empty value. This may be used to include null fields in Patch
14954	// requests.
14955	NullFields []string `json:"-"`
14956}
14957
14958func (s *VideoOffset) MarshalJSON() ([]byte, error) {
14959	type NoMethod VideoOffset
14960	raw := NoMethod(*s)
14961	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14962}
14963
14964// VideoSettings: Video Settings
14965type VideoSettings struct {
14966	// CompanionSettings: Settings for the companion creatives of video
14967	// creatives served to this placement.
14968	CompanionSettings *CompanionSetting `json:"companionSettings,omitempty"`
14969
14970	// Kind: Identifies what kind of resource this is. Value: the fixed
14971	// string "dfareporting#videoSettings".
14972	Kind string `json:"kind,omitempty"`
14973
14974	// ObaEnabled: Whether OBA icons are enabled for this placement.
14975	ObaEnabled bool `json:"obaEnabled,omitempty"`
14976
14977	// ObaSettings: Settings for the OBA icon of video creatives served to
14978	// this placement. If this object is provided, the creative-level OBA
14979	// settings will be overridden.
14980	ObaSettings *ObaIcon `json:"obaSettings,omitempty"`
14981
14982	// Orientation: Orientation of a video placement. If this value is set,
14983	// placement will return assets matching the specified orientation.
14984	//
14985	// Possible values:
14986	//   "ANY"
14987	//   "LANDSCAPE"
14988	//   "PORTRAIT"
14989	Orientation string `json:"orientation,omitempty"`
14990
14991	// SkippableSettings: Settings for the skippability of video creatives
14992	// served to this placement. If this object is provided, the
14993	// creative-level skippable settings will be overridden.
14994	SkippableSettings *SkippableSetting `json:"skippableSettings,omitempty"`
14995
14996	// TranscodeSettings: Settings for the transcodes of video creatives
14997	// served to this placement. If this object is provided, the
14998	// creative-level transcode settings will be overridden.
14999	TranscodeSettings *TranscodeSetting `json:"transcodeSettings,omitempty"`
15000
15001	// ForceSendFields is a list of field names (e.g. "CompanionSettings")
15002	// to unconditionally include in API requests. By default, fields with
15003	// empty values are omitted from API requests. However, any non-pointer,
15004	// non-interface field appearing in ForceSendFields will be sent to the
15005	// server regardless of whether the field is empty or not. This may be
15006	// used to include empty fields in Patch requests.
15007	ForceSendFields []string `json:"-"`
15008
15009	// NullFields is a list of field names (e.g. "CompanionSettings") to
15010	// include in API requests with the JSON null value. By default, fields
15011	// with empty values are omitted from API requests. However, any field
15012	// with an empty value appearing in NullFields will be sent to the
15013	// server as null. It is an error if a field in this list has a
15014	// non-empty value. This may be used to include null fields in Patch
15015	// requests.
15016	NullFields []string `json:"-"`
15017}
15018
15019func (s *VideoSettings) MarshalJSON() ([]byte, error) {
15020	type NoMethod VideoSettings
15021	raw := NoMethod(*s)
15022	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15023}
15024
15025// method id "dfareporting.accountActiveAdSummaries.get":
15026
15027type AccountActiveAdSummariesGetCall struct {
15028	s                *Service
15029	profileId        int64
15030	summaryAccountId int64
15031	urlParams_       gensupport.URLParams
15032	ifNoneMatch_     string
15033	ctx_             context.Context
15034	header_          http.Header
15035}
15036
15037// Get: Gets the account's active ad summary by account ID.
15038//
15039// - profileId: User profile ID associated with this request.
15040// - summaryAccountId: Account ID.
15041func (r *AccountActiveAdSummariesService) Get(profileId int64, summaryAccountId int64) *AccountActiveAdSummariesGetCall {
15042	c := &AccountActiveAdSummariesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15043	c.profileId = profileId
15044	c.summaryAccountId = summaryAccountId
15045	return c
15046}
15047
15048// Fields allows partial responses to be retrieved. See
15049// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15050// for more information.
15051func (c *AccountActiveAdSummariesGetCall) Fields(s ...googleapi.Field) *AccountActiveAdSummariesGetCall {
15052	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15053	return c
15054}
15055
15056// IfNoneMatch sets the optional parameter which makes the operation
15057// fail if the object's ETag matches the given value. This is useful for
15058// getting updates only after the object has changed since the last
15059// request. Use googleapi.IsNotModified to check whether the response
15060// error from Do is the result of In-None-Match.
15061func (c *AccountActiveAdSummariesGetCall) IfNoneMatch(entityTag string) *AccountActiveAdSummariesGetCall {
15062	c.ifNoneMatch_ = entityTag
15063	return c
15064}
15065
15066// Context sets the context to be used in this call's Do method. Any
15067// pending HTTP request will be aborted if the provided context is
15068// canceled.
15069func (c *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall {
15070	c.ctx_ = ctx
15071	return c
15072}
15073
15074// Header returns an http.Header that can be modified by the caller to
15075// add HTTP headers to the request.
15076func (c *AccountActiveAdSummariesGetCall) Header() http.Header {
15077	if c.header_ == nil {
15078		c.header_ = make(http.Header)
15079	}
15080	return c.header_
15081}
15082
15083func (c *AccountActiveAdSummariesGetCall) doRequest(alt string) (*http.Response, error) {
15084	reqHeaders := make(http.Header)
15085	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15086	for k, v := range c.header_ {
15087		reqHeaders[k] = v
15088	}
15089	reqHeaders.Set("User-Agent", c.s.userAgent())
15090	if c.ifNoneMatch_ != "" {
15091		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15092	}
15093	var body io.Reader = nil
15094	c.urlParams_.Set("alt", alt)
15095	c.urlParams_.Set("prettyPrint", "false")
15096	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}")
15097	urls += "?" + c.urlParams_.Encode()
15098	req, err := http.NewRequest("GET", urls, body)
15099	if err != nil {
15100		return nil, err
15101	}
15102	req.Header = reqHeaders
15103	googleapi.Expand(req.URL, map[string]string{
15104		"profileId":        strconv.FormatInt(c.profileId, 10),
15105		"summaryAccountId": strconv.FormatInt(c.summaryAccountId, 10),
15106	})
15107	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15108}
15109
15110// Do executes the "dfareporting.accountActiveAdSummaries.get" call.
15111// Exactly one of *AccountActiveAdSummary or error will be non-nil. Any
15112// non-2xx status code is an error. Response headers are in either
15113// *AccountActiveAdSummary.ServerResponse.Header or (if a response was
15114// returned at all) in error.(*googleapi.Error).Header. Use
15115// googleapi.IsNotModified to check whether the returned error was
15116// because http.StatusNotModified was returned.
15117func (c *AccountActiveAdSummariesGetCall) Do(opts ...googleapi.CallOption) (*AccountActiveAdSummary, error) {
15118	gensupport.SetOptions(c.urlParams_, opts...)
15119	res, err := c.doRequest("json")
15120	if res != nil && res.StatusCode == http.StatusNotModified {
15121		if res.Body != nil {
15122			res.Body.Close()
15123		}
15124		return nil, &googleapi.Error{
15125			Code:   res.StatusCode,
15126			Header: res.Header,
15127		}
15128	}
15129	if err != nil {
15130		return nil, err
15131	}
15132	defer googleapi.CloseBody(res)
15133	if err := googleapi.CheckResponse(res); err != nil {
15134		return nil, err
15135	}
15136	ret := &AccountActiveAdSummary{
15137		ServerResponse: googleapi.ServerResponse{
15138			Header:         res.Header,
15139			HTTPStatusCode: res.StatusCode,
15140		},
15141	}
15142	target := &ret
15143	if err := gensupport.DecodeResponse(target, res); err != nil {
15144		return nil, err
15145	}
15146	return ret, nil
15147	// {
15148	//   "description": "Gets the account's active ad summary by account ID.",
15149	//   "flatPath": "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}",
15150	//   "httpMethod": "GET",
15151	//   "id": "dfareporting.accountActiveAdSummaries.get",
15152	//   "parameterOrder": [
15153	//     "profileId",
15154	//     "summaryAccountId"
15155	//   ],
15156	//   "parameters": {
15157	//     "profileId": {
15158	//       "description": "User profile ID associated with this request.",
15159	//       "format": "int64",
15160	//       "location": "path",
15161	//       "required": true,
15162	//       "type": "string"
15163	//     },
15164	//     "summaryAccountId": {
15165	//       "description": "Account ID.",
15166	//       "format": "int64",
15167	//       "location": "path",
15168	//       "required": true,
15169	//       "type": "string"
15170	//     }
15171	//   },
15172	//   "path": "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}",
15173	//   "response": {
15174	//     "$ref": "AccountActiveAdSummary"
15175	//   },
15176	//   "scopes": [
15177	//     "https://www.googleapis.com/auth/dfatrafficking"
15178	//   ]
15179	// }
15180
15181}
15182
15183// method id "dfareporting.accountPermissionGroups.get":
15184
15185type AccountPermissionGroupsGetCall struct {
15186	s            *Service
15187	profileId    int64
15188	id           int64
15189	urlParams_   gensupport.URLParams
15190	ifNoneMatch_ string
15191	ctx_         context.Context
15192	header_      http.Header
15193}
15194
15195// Get: Gets one account permission group by ID.
15196//
15197// - id: Account permission group ID.
15198// - profileId: User profile ID associated with this request.
15199func (r *AccountPermissionGroupsService) Get(profileId int64, id int64) *AccountPermissionGroupsGetCall {
15200	c := &AccountPermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15201	c.profileId = profileId
15202	c.id = id
15203	return c
15204}
15205
15206// Fields allows partial responses to be retrieved. See
15207// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15208// for more information.
15209func (c *AccountPermissionGroupsGetCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsGetCall {
15210	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15211	return c
15212}
15213
15214// IfNoneMatch sets the optional parameter which makes the operation
15215// fail if the object's ETag matches the given value. This is useful for
15216// getting updates only after the object has changed since the last
15217// request. Use googleapi.IsNotModified to check whether the response
15218// error from Do is the result of In-None-Match.
15219func (c *AccountPermissionGroupsGetCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsGetCall {
15220	c.ifNoneMatch_ = entityTag
15221	return c
15222}
15223
15224// Context sets the context to be used in this call's Do method. Any
15225// pending HTTP request will be aborted if the provided context is
15226// canceled.
15227func (c *AccountPermissionGroupsGetCall) Context(ctx context.Context) *AccountPermissionGroupsGetCall {
15228	c.ctx_ = ctx
15229	return c
15230}
15231
15232// Header returns an http.Header that can be modified by the caller to
15233// add HTTP headers to the request.
15234func (c *AccountPermissionGroupsGetCall) Header() http.Header {
15235	if c.header_ == nil {
15236		c.header_ = make(http.Header)
15237	}
15238	return c.header_
15239}
15240
15241func (c *AccountPermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
15242	reqHeaders := make(http.Header)
15243	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15244	for k, v := range c.header_ {
15245		reqHeaders[k] = v
15246	}
15247	reqHeaders.Set("User-Agent", c.s.userAgent())
15248	if c.ifNoneMatch_ != "" {
15249		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15250	}
15251	var body io.Reader = nil
15252	c.urlParams_.Set("alt", alt)
15253	c.urlParams_.Set("prettyPrint", "false")
15254	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups/{id}")
15255	urls += "?" + c.urlParams_.Encode()
15256	req, err := http.NewRequest("GET", urls, body)
15257	if err != nil {
15258		return nil, err
15259	}
15260	req.Header = reqHeaders
15261	googleapi.Expand(req.URL, map[string]string{
15262		"profileId": strconv.FormatInt(c.profileId, 10),
15263		"id":        strconv.FormatInt(c.id, 10),
15264	})
15265	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15266}
15267
15268// Do executes the "dfareporting.accountPermissionGroups.get" call.
15269// Exactly one of *AccountPermissionGroup or error will be non-nil. Any
15270// non-2xx status code is an error. Response headers are in either
15271// *AccountPermissionGroup.ServerResponse.Header or (if a response was
15272// returned at all) in error.(*googleapi.Error).Header. Use
15273// googleapi.IsNotModified to check whether the returned error was
15274// because http.StatusNotModified was returned.
15275func (c *AccountPermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroup, error) {
15276	gensupport.SetOptions(c.urlParams_, opts...)
15277	res, err := c.doRequest("json")
15278	if res != nil && res.StatusCode == http.StatusNotModified {
15279		if res.Body != nil {
15280			res.Body.Close()
15281		}
15282		return nil, &googleapi.Error{
15283			Code:   res.StatusCode,
15284			Header: res.Header,
15285		}
15286	}
15287	if err != nil {
15288		return nil, err
15289	}
15290	defer googleapi.CloseBody(res)
15291	if err := googleapi.CheckResponse(res); err != nil {
15292		return nil, err
15293	}
15294	ret := &AccountPermissionGroup{
15295		ServerResponse: googleapi.ServerResponse{
15296			Header:         res.Header,
15297			HTTPStatusCode: res.StatusCode,
15298		},
15299	}
15300	target := &ret
15301	if err := gensupport.DecodeResponse(target, res); err != nil {
15302		return nil, err
15303	}
15304	return ret, nil
15305	// {
15306	//   "description": "Gets one account permission group by ID.",
15307	//   "flatPath": "userprofiles/{profileId}/accountPermissionGroups/{id}",
15308	//   "httpMethod": "GET",
15309	//   "id": "dfareporting.accountPermissionGroups.get",
15310	//   "parameterOrder": [
15311	//     "profileId",
15312	//     "id"
15313	//   ],
15314	//   "parameters": {
15315	//     "id": {
15316	//       "description": "Account permission group ID.",
15317	//       "format": "int64",
15318	//       "location": "path",
15319	//       "required": true,
15320	//       "type": "string"
15321	//     },
15322	//     "profileId": {
15323	//       "description": "User profile ID associated with this request.",
15324	//       "format": "int64",
15325	//       "location": "path",
15326	//       "required": true,
15327	//       "type": "string"
15328	//     }
15329	//   },
15330	//   "path": "userprofiles/{profileId}/accountPermissionGroups/{id}",
15331	//   "response": {
15332	//     "$ref": "AccountPermissionGroup"
15333	//   },
15334	//   "scopes": [
15335	//     "https://www.googleapis.com/auth/dfatrafficking"
15336	//   ]
15337	// }
15338
15339}
15340
15341// method id "dfareporting.accountPermissionGroups.list":
15342
15343type AccountPermissionGroupsListCall struct {
15344	s            *Service
15345	profileId    int64
15346	urlParams_   gensupport.URLParams
15347	ifNoneMatch_ string
15348	ctx_         context.Context
15349	header_      http.Header
15350}
15351
15352// List: Retrieves the list of account permission groups.
15353//
15354// - profileId: User profile ID associated with this request.
15355func (r *AccountPermissionGroupsService) List(profileId int64) *AccountPermissionGroupsListCall {
15356	c := &AccountPermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15357	c.profileId = profileId
15358	return c
15359}
15360
15361// Fields allows partial responses to be retrieved. See
15362// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15363// for more information.
15364func (c *AccountPermissionGroupsListCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsListCall {
15365	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15366	return c
15367}
15368
15369// IfNoneMatch sets the optional parameter which makes the operation
15370// fail if the object's ETag matches the given value. This is useful for
15371// getting updates only after the object has changed since the last
15372// request. Use googleapi.IsNotModified to check whether the response
15373// error from Do is the result of In-None-Match.
15374func (c *AccountPermissionGroupsListCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsListCall {
15375	c.ifNoneMatch_ = entityTag
15376	return c
15377}
15378
15379// Context sets the context to be used in this call's Do method. Any
15380// pending HTTP request will be aborted if the provided context is
15381// canceled.
15382func (c *AccountPermissionGroupsListCall) Context(ctx context.Context) *AccountPermissionGroupsListCall {
15383	c.ctx_ = ctx
15384	return c
15385}
15386
15387// Header returns an http.Header that can be modified by the caller to
15388// add HTTP headers to the request.
15389func (c *AccountPermissionGroupsListCall) Header() http.Header {
15390	if c.header_ == nil {
15391		c.header_ = make(http.Header)
15392	}
15393	return c.header_
15394}
15395
15396func (c *AccountPermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
15397	reqHeaders := make(http.Header)
15398	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15399	for k, v := range c.header_ {
15400		reqHeaders[k] = v
15401	}
15402	reqHeaders.Set("User-Agent", c.s.userAgent())
15403	if c.ifNoneMatch_ != "" {
15404		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15405	}
15406	var body io.Reader = nil
15407	c.urlParams_.Set("alt", alt)
15408	c.urlParams_.Set("prettyPrint", "false")
15409	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups")
15410	urls += "?" + c.urlParams_.Encode()
15411	req, err := http.NewRequest("GET", urls, body)
15412	if err != nil {
15413		return nil, err
15414	}
15415	req.Header = reqHeaders
15416	googleapi.Expand(req.URL, map[string]string{
15417		"profileId": strconv.FormatInt(c.profileId, 10),
15418	})
15419	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15420}
15421
15422// Do executes the "dfareporting.accountPermissionGroups.list" call.
15423// Exactly one of *AccountPermissionGroupsListResponse or error will be
15424// non-nil. Any non-2xx status code is an error. Response headers are in
15425// either *AccountPermissionGroupsListResponse.ServerResponse.Header or
15426// (if a response was returned at all) in
15427// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15428// whether the returned error was because http.StatusNotModified was
15429// returned.
15430func (c *AccountPermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroupsListResponse, error) {
15431	gensupport.SetOptions(c.urlParams_, opts...)
15432	res, err := c.doRequest("json")
15433	if res != nil && res.StatusCode == http.StatusNotModified {
15434		if res.Body != nil {
15435			res.Body.Close()
15436		}
15437		return nil, &googleapi.Error{
15438			Code:   res.StatusCode,
15439			Header: res.Header,
15440		}
15441	}
15442	if err != nil {
15443		return nil, err
15444	}
15445	defer googleapi.CloseBody(res)
15446	if err := googleapi.CheckResponse(res); err != nil {
15447		return nil, err
15448	}
15449	ret := &AccountPermissionGroupsListResponse{
15450		ServerResponse: googleapi.ServerResponse{
15451			Header:         res.Header,
15452			HTTPStatusCode: res.StatusCode,
15453		},
15454	}
15455	target := &ret
15456	if err := gensupport.DecodeResponse(target, res); err != nil {
15457		return nil, err
15458	}
15459	return ret, nil
15460	// {
15461	//   "description": "Retrieves the list of account permission groups.",
15462	//   "flatPath": "userprofiles/{profileId}/accountPermissionGroups",
15463	//   "httpMethod": "GET",
15464	//   "id": "dfareporting.accountPermissionGroups.list",
15465	//   "parameterOrder": [
15466	//     "profileId"
15467	//   ],
15468	//   "parameters": {
15469	//     "profileId": {
15470	//       "description": "User profile ID associated with this request.",
15471	//       "format": "int64",
15472	//       "location": "path",
15473	//       "required": true,
15474	//       "type": "string"
15475	//     }
15476	//   },
15477	//   "path": "userprofiles/{profileId}/accountPermissionGroups",
15478	//   "response": {
15479	//     "$ref": "AccountPermissionGroupsListResponse"
15480	//   },
15481	//   "scopes": [
15482	//     "https://www.googleapis.com/auth/dfatrafficking"
15483	//   ]
15484	// }
15485
15486}
15487
15488// method id "dfareporting.accountPermissions.get":
15489
15490type AccountPermissionsGetCall struct {
15491	s            *Service
15492	profileId    int64
15493	id           int64
15494	urlParams_   gensupport.URLParams
15495	ifNoneMatch_ string
15496	ctx_         context.Context
15497	header_      http.Header
15498}
15499
15500// Get: Gets one account permission by ID.
15501//
15502// - id: Account permission ID.
15503// - profileId: User profile ID associated with this request.
15504func (r *AccountPermissionsService) Get(profileId int64, id int64) *AccountPermissionsGetCall {
15505	c := &AccountPermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15506	c.profileId = profileId
15507	c.id = id
15508	return c
15509}
15510
15511// Fields allows partial responses to be retrieved. See
15512// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15513// for more information.
15514func (c *AccountPermissionsGetCall) Fields(s ...googleapi.Field) *AccountPermissionsGetCall {
15515	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15516	return c
15517}
15518
15519// IfNoneMatch sets the optional parameter which makes the operation
15520// fail if the object's ETag matches the given value. This is useful for
15521// getting updates only after the object has changed since the last
15522// request. Use googleapi.IsNotModified to check whether the response
15523// error from Do is the result of In-None-Match.
15524func (c *AccountPermissionsGetCall) IfNoneMatch(entityTag string) *AccountPermissionsGetCall {
15525	c.ifNoneMatch_ = entityTag
15526	return c
15527}
15528
15529// Context sets the context to be used in this call's Do method. Any
15530// pending HTTP request will be aborted if the provided context is
15531// canceled.
15532func (c *AccountPermissionsGetCall) Context(ctx context.Context) *AccountPermissionsGetCall {
15533	c.ctx_ = ctx
15534	return c
15535}
15536
15537// Header returns an http.Header that can be modified by the caller to
15538// add HTTP headers to the request.
15539func (c *AccountPermissionsGetCall) Header() http.Header {
15540	if c.header_ == nil {
15541		c.header_ = make(http.Header)
15542	}
15543	return c.header_
15544}
15545
15546func (c *AccountPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
15547	reqHeaders := make(http.Header)
15548	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15549	for k, v := range c.header_ {
15550		reqHeaders[k] = v
15551	}
15552	reqHeaders.Set("User-Agent", c.s.userAgent())
15553	if c.ifNoneMatch_ != "" {
15554		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15555	}
15556	var body io.Reader = nil
15557	c.urlParams_.Set("alt", alt)
15558	c.urlParams_.Set("prettyPrint", "false")
15559	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions/{id}")
15560	urls += "?" + c.urlParams_.Encode()
15561	req, err := http.NewRequest("GET", urls, body)
15562	if err != nil {
15563		return nil, err
15564	}
15565	req.Header = reqHeaders
15566	googleapi.Expand(req.URL, map[string]string{
15567		"profileId": strconv.FormatInt(c.profileId, 10),
15568		"id":        strconv.FormatInt(c.id, 10),
15569	})
15570	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15571}
15572
15573// Do executes the "dfareporting.accountPermissions.get" call.
15574// Exactly one of *AccountPermission or error will be non-nil. Any
15575// non-2xx status code is an error. Response headers are in either
15576// *AccountPermission.ServerResponse.Header or (if a response was
15577// returned at all) in error.(*googleapi.Error).Header. Use
15578// googleapi.IsNotModified to check whether the returned error was
15579// because http.StatusNotModified was returned.
15580func (c *AccountPermissionsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermission, error) {
15581	gensupport.SetOptions(c.urlParams_, opts...)
15582	res, err := c.doRequest("json")
15583	if res != nil && res.StatusCode == http.StatusNotModified {
15584		if res.Body != nil {
15585			res.Body.Close()
15586		}
15587		return nil, &googleapi.Error{
15588			Code:   res.StatusCode,
15589			Header: res.Header,
15590		}
15591	}
15592	if err != nil {
15593		return nil, err
15594	}
15595	defer googleapi.CloseBody(res)
15596	if err := googleapi.CheckResponse(res); err != nil {
15597		return nil, err
15598	}
15599	ret := &AccountPermission{
15600		ServerResponse: googleapi.ServerResponse{
15601			Header:         res.Header,
15602			HTTPStatusCode: res.StatusCode,
15603		},
15604	}
15605	target := &ret
15606	if err := gensupport.DecodeResponse(target, res); err != nil {
15607		return nil, err
15608	}
15609	return ret, nil
15610	// {
15611	//   "description": "Gets one account permission by ID.",
15612	//   "flatPath": "userprofiles/{profileId}/accountPermissions/{id}",
15613	//   "httpMethod": "GET",
15614	//   "id": "dfareporting.accountPermissions.get",
15615	//   "parameterOrder": [
15616	//     "profileId",
15617	//     "id"
15618	//   ],
15619	//   "parameters": {
15620	//     "id": {
15621	//       "description": "Account permission ID.",
15622	//       "format": "int64",
15623	//       "location": "path",
15624	//       "required": true,
15625	//       "type": "string"
15626	//     },
15627	//     "profileId": {
15628	//       "description": "User profile ID associated with this request.",
15629	//       "format": "int64",
15630	//       "location": "path",
15631	//       "required": true,
15632	//       "type": "string"
15633	//     }
15634	//   },
15635	//   "path": "userprofiles/{profileId}/accountPermissions/{id}",
15636	//   "response": {
15637	//     "$ref": "AccountPermission"
15638	//   },
15639	//   "scopes": [
15640	//     "https://www.googleapis.com/auth/dfatrafficking"
15641	//   ]
15642	// }
15643
15644}
15645
15646// method id "dfareporting.accountPermissions.list":
15647
15648type AccountPermissionsListCall struct {
15649	s            *Service
15650	profileId    int64
15651	urlParams_   gensupport.URLParams
15652	ifNoneMatch_ string
15653	ctx_         context.Context
15654	header_      http.Header
15655}
15656
15657// List: Retrieves the list of account permissions.
15658//
15659// - profileId: User profile ID associated with this request.
15660func (r *AccountPermissionsService) List(profileId int64) *AccountPermissionsListCall {
15661	c := &AccountPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15662	c.profileId = profileId
15663	return c
15664}
15665
15666// Fields allows partial responses to be retrieved. See
15667// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15668// for more information.
15669func (c *AccountPermissionsListCall) Fields(s ...googleapi.Field) *AccountPermissionsListCall {
15670	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15671	return c
15672}
15673
15674// IfNoneMatch sets the optional parameter which makes the operation
15675// fail if the object's ETag matches the given value. This is useful for
15676// getting updates only after the object has changed since the last
15677// request. Use googleapi.IsNotModified to check whether the response
15678// error from Do is the result of In-None-Match.
15679func (c *AccountPermissionsListCall) IfNoneMatch(entityTag string) *AccountPermissionsListCall {
15680	c.ifNoneMatch_ = entityTag
15681	return c
15682}
15683
15684// Context sets the context to be used in this call's Do method. Any
15685// pending HTTP request will be aborted if the provided context is
15686// canceled.
15687func (c *AccountPermissionsListCall) Context(ctx context.Context) *AccountPermissionsListCall {
15688	c.ctx_ = ctx
15689	return c
15690}
15691
15692// Header returns an http.Header that can be modified by the caller to
15693// add HTTP headers to the request.
15694func (c *AccountPermissionsListCall) Header() http.Header {
15695	if c.header_ == nil {
15696		c.header_ = make(http.Header)
15697	}
15698	return c.header_
15699}
15700
15701func (c *AccountPermissionsListCall) doRequest(alt string) (*http.Response, error) {
15702	reqHeaders := make(http.Header)
15703	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15704	for k, v := range c.header_ {
15705		reqHeaders[k] = v
15706	}
15707	reqHeaders.Set("User-Agent", c.s.userAgent())
15708	if c.ifNoneMatch_ != "" {
15709		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15710	}
15711	var body io.Reader = nil
15712	c.urlParams_.Set("alt", alt)
15713	c.urlParams_.Set("prettyPrint", "false")
15714	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions")
15715	urls += "?" + c.urlParams_.Encode()
15716	req, err := http.NewRequest("GET", urls, body)
15717	if err != nil {
15718		return nil, err
15719	}
15720	req.Header = reqHeaders
15721	googleapi.Expand(req.URL, map[string]string{
15722		"profileId": strconv.FormatInt(c.profileId, 10),
15723	})
15724	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15725}
15726
15727// Do executes the "dfareporting.accountPermissions.list" call.
15728// Exactly one of *AccountPermissionsListResponse or error will be
15729// non-nil. Any non-2xx status code is an error. Response headers are in
15730// either *AccountPermissionsListResponse.ServerResponse.Header or (if a
15731// response was returned at all) in error.(*googleapi.Error).Header. Use
15732// googleapi.IsNotModified to check whether the returned error was
15733// because http.StatusNotModified was returned.
15734func (c *AccountPermissionsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionsListResponse, error) {
15735	gensupport.SetOptions(c.urlParams_, opts...)
15736	res, err := c.doRequest("json")
15737	if res != nil && res.StatusCode == http.StatusNotModified {
15738		if res.Body != nil {
15739			res.Body.Close()
15740		}
15741		return nil, &googleapi.Error{
15742			Code:   res.StatusCode,
15743			Header: res.Header,
15744		}
15745	}
15746	if err != nil {
15747		return nil, err
15748	}
15749	defer googleapi.CloseBody(res)
15750	if err := googleapi.CheckResponse(res); err != nil {
15751		return nil, err
15752	}
15753	ret := &AccountPermissionsListResponse{
15754		ServerResponse: googleapi.ServerResponse{
15755			Header:         res.Header,
15756			HTTPStatusCode: res.StatusCode,
15757		},
15758	}
15759	target := &ret
15760	if err := gensupport.DecodeResponse(target, res); err != nil {
15761		return nil, err
15762	}
15763	return ret, nil
15764	// {
15765	//   "description": "Retrieves the list of account permissions.",
15766	//   "flatPath": "userprofiles/{profileId}/accountPermissions",
15767	//   "httpMethod": "GET",
15768	//   "id": "dfareporting.accountPermissions.list",
15769	//   "parameterOrder": [
15770	//     "profileId"
15771	//   ],
15772	//   "parameters": {
15773	//     "profileId": {
15774	//       "description": "User profile ID associated with this request.",
15775	//       "format": "int64",
15776	//       "location": "path",
15777	//       "required": true,
15778	//       "type": "string"
15779	//     }
15780	//   },
15781	//   "path": "userprofiles/{profileId}/accountPermissions",
15782	//   "response": {
15783	//     "$ref": "AccountPermissionsListResponse"
15784	//   },
15785	//   "scopes": [
15786	//     "https://www.googleapis.com/auth/dfatrafficking"
15787	//   ]
15788	// }
15789
15790}
15791
15792// method id "dfareporting.accountUserProfiles.get":
15793
15794type AccountUserProfilesGetCall struct {
15795	s            *Service
15796	profileId    int64
15797	id           int64
15798	urlParams_   gensupport.URLParams
15799	ifNoneMatch_ string
15800	ctx_         context.Context
15801	header_      http.Header
15802}
15803
15804// Get: Gets one account user profile by ID.
15805//
15806// - id: User profile ID.
15807// - profileId: User profile ID associated with this request.
15808func (r *AccountUserProfilesService) Get(profileId int64, id int64) *AccountUserProfilesGetCall {
15809	c := &AccountUserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15810	c.profileId = profileId
15811	c.id = id
15812	return c
15813}
15814
15815// Fields allows partial responses to be retrieved. See
15816// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15817// for more information.
15818func (c *AccountUserProfilesGetCall) Fields(s ...googleapi.Field) *AccountUserProfilesGetCall {
15819	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15820	return c
15821}
15822
15823// IfNoneMatch sets the optional parameter which makes the operation
15824// fail if the object's ETag matches the given value. This is useful for
15825// getting updates only after the object has changed since the last
15826// request. Use googleapi.IsNotModified to check whether the response
15827// error from Do is the result of In-None-Match.
15828func (c *AccountUserProfilesGetCall) IfNoneMatch(entityTag string) *AccountUserProfilesGetCall {
15829	c.ifNoneMatch_ = entityTag
15830	return c
15831}
15832
15833// Context sets the context to be used in this call's Do method. Any
15834// pending HTTP request will be aborted if the provided context is
15835// canceled.
15836func (c *AccountUserProfilesGetCall) Context(ctx context.Context) *AccountUserProfilesGetCall {
15837	c.ctx_ = ctx
15838	return c
15839}
15840
15841// Header returns an http.Header that can be modified by the caller to
15842// add HTTP headers to the request.
15843func (c *AccountUserProfilesGetCall) Header() http.Header {
15844	if c.header_ == nil {
15845		c.header_ = make(http.Header)
15846	}
15847	return c.header_
15848}
15849
15850func (c *AccountUserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
15851	reqHeaders := make(http.Header)
15852	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15853	for k, v := range c.header_ {
15854		reqHeaders[k] = v
15855	}
15856	reqHeaders.Set("User-Agent", c.s.userAgent())
15857	if c.ifNoneMatch_ != "" {
15858		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15859	}
15860	var body io.Reader = nil
15861	c.urlParams_.Set("alt", alt)
15862	c.urlParams_.Set("prettyPrint", "false")
15863	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles/{id}")
15864	urls += "?" + c.urlParams_.Encode()
15865	req, err := http.NewRequest("GET", urls, body)
15866	if err != nil {
15867		return nil, err
15868	}
15869	req.Header = reqHeaders
15870	googleapi.Expand(req.URL, map[string]string{
15871		"profileId": strconv.FormatInt(c.profileId, 10),
15872		"id":        strconv.FormatInt(c.id, 10),
15873	})
15874	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15875}
15876
15877// Do executes the "dfareporting.accountUserProfiles.get" call.
15878// Exactly one of *AccountUserProfile or error will be non-nil. Any
15879// non-2xx status code is an error. Response headers are in either
15880// *AccountUserProfile.ServerResponse.Header or (if a response was
15881// returned at all) in error.(*googleapi.Error).Header. Use
15882// googleapi.IsNotModified to check whether the returned error was
15883// because http.StatusNotModified was returned.
15884func (c *AccountUserProfilesGetCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15885	gensupport.SetOptions(c.urlParams_, opts...)
15886	res, err := c.doRequest("json")
15887	if res != nil && res.StatusCode == http.StatusNotModified {
15888		if res.Body != nil {
15889			res.Body.Close()
15890		}
15891		return nil, &googleapi.Error{
15892			Code:   res.StatusCode,
15893			Header: res.Header,
15894		}
15895	}
15896	if err != nil {
15897		return nil, err
15898	}
15899	defer googleapi.CloseBody(res)
15900	if err := googleapi.CheckResponse(res); err != nil {
15901		return nil, err
15902	}
15903	ret := &AccountUserProfile{
15904		ServerResponse: googleapi.ServerResponse{
15905			Header:         res.Header,
15906			HTTPStatusCode: res.StatusCode,
15907		},
15908	}
15909	target := &ret
15910	if err := gensupport.DecodeResponse(target, res); err != nil {
15911		return nil, err
15912	}
15913	return ret, nil
15914	// {
15915	//   "description": "Gets one account user profile by ID.",
15916	//   "flatPath": "userprofiles/{profileId}/accountUserProfiles/{id}",
15917	//   "httpMethod": "GET",
15918	//   "id": "dfareporting.accountUserProfiles.get",
15919	//   "parameterOrder": [
15920	//     "profileId",
15921	//     "id"
15922	//   ],
15923	//   "parameters": {
15924	//     "id": {
15925	//       "description": "User profile ID.",
15926	//       "format": "int64",
15927	//       "location": "path",
15928	//       "required": true,
15929	//       "type": "string"
15930	//     },
15931	//     "profileId": {
15932	//       "description": "User profile ID associated with this request.",
15933	//       "format": "int64",
15934	//       "location": "path",
15935	//       "required": true,
15936	//       "type": "string"
15937	//     }
15938	//   },
15939	//   "path": "userprofiles/{profileId}/accountUserProfiles/{id}",
15940	//   "response": {
15941	//     "$ref": "AccountUserProfile"
15942	//   },
15943	//   "scopes": [
15944	//     "https://www.googleapis.com/auth/dfatrafficking"
15945	//   ]
15946	// }
15947
15948}
15949
15950// method id "dfareporting.accountUserProfiles.insert":
15951
15952type AccountUserProfilesInsertCall struct {
15953	s                  *Service
15954	profileId          int64
15955	accountuserprofile *AccountUserProfile
15956	urlParams_         gensupport.URLParams
15957	ctx_               context.Context
15958	header_            http.Header
15959}
15960
15961// Insert: Inserts a new account user profile.
15962//
15963// - profileId: User profile ID associated with this request.
15964func (r *AccountUserProfilesService) Insert(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesInsertCall {
15965	c := &AccountUserProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15966	c.profileId = profileId
15967	c.accountuserprofile = accountuserprofile
15968	return c
15969}
15970
15971// Fields allows partial responses to be retrieved. See
15972// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15973// for more information.
15974func (c *AccountUserProfilesInsertCall) Fields(s ...googleapi.Field) *AccountUserProfilesInsertCall {
15975	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15976	return c
15977}
15978
15979// Context sets the context to be used in this call's Do method. Any
15980// pending HTTP request will be aborted if the provided context is
15981// canceled.
15982func (c *AccountUserProfilesInsertCall) Context(ctx context.Context) *AccountUserProfilesInsertCall {
15983	c.ctx_ = ctx
15984	return c
15985}
15986
15987// Header returns an http.Header that can be modified by the caller to
15988// add HTTP headers to the request.
15989func (c *AccountUserProfilesInsertCall) Header() http.Header {
15990	if c.header_ == nil {
15991		c.header_ = make(http.Header)
15992	}
15993	return c.header_
15994}
15995
15996func (c *AccountUserProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
15997	reqHeaders := make(http.Header)
15998	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15999	for k, v := range c.header_ {
16000		reqHeaders[k] = v
16001	}
16002	reqHeaders.Set("User-Agent", c.s.userAgent())
16003	var body io.Reader = nil
16004	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
16005	if err != nil {
16006		return nil, err
16007	}
16008	reqHeaders.Set("Content-Type", "application/json")
16009	c.urlParams_.Set("alt", alt)
16010	c.urlParams_.Set("prettyPrint", "false")
16011	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
16012	urls += "?" + c.urlParams_.Encode()
16013	req, err := http.NewRequest("POST", urls, body)
16014	if err != nil {
16015		return nil, err
16016	}
16017	req.Header = reqHeaders
16018	googleapi.Expand(req.URL, map[string]string{
16019		"profileId": strconv.FormatInt(c.profileId, 10),
16020	})
16021	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16022}
16023
16024// Do executes the "dfareporting.accountUserProfiles.insert" call.
16025// Exactly one of *AccountUserProfile or error will be non-nil. Any
16026// non-2xx status code is an error. Response headers are in either
16027// *AccountUserProfile.ServerResponse.Header or (if a response was
16028// returned at all) in error.(*googleapi.Error).Header. Use
16029// googleapi.IsNotModified to check whether the returned error was
16030// because http.StatusNotModified was returned.
16031func (c *AccountUserProfilesInsertCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
16032	gensupport.SetOptions(c.urlParams_, opts...)
16033	res, err := c.doRequest("json")
16034	if res != nil && res.StatusCode == http.StatusNotModified {
16035		if res.Body != nil {
16036			res.Body.Close()
16037		}
16038		return nil, &googleapi.Error{
16039			Code:   res.StatusCode,
16040			Header: res.Header,
16041		}
16042	}
16043	if err != nil {
16044		return nil, err
16045	}
16046	defer googleapi.CloseBody(res)
16047	if err := googleapi.CheckResponse(res); err != nil {
16048		return nil, err
16049	}
16050	ret := &AccountUserProfile{
16051		ServerResponse: googleapi.ServerResponse{
16052			Header:         res.Header,
16053			HTTPStatusCode: res.StatusCode,
16054		},
16055	}
16056	target := &ret
16057	if err := gensupport.DecodeResponse(target, res); err != nil {
16058		return nil, err
16059	}
16060	return ret, nil
16061	// {
16062	//   "description": "Inserts a new account user profile.",
16063	//   "flatPath": "userprofiles/{profileId}/accountUserProfiles",
16064	//   "httpMethod": "POST",
16065	//   "id": "dfareporting.accountUserProfiles.insert",
16066	//   "parameterOrder": [
16067	//     "profileId"
16068	//   ],
16069	//   "parameters": {
16070	//     "profileId": {
16071	//       "description": "User profile ID associated with this request.",
16072	//       "format": "int64",
16073	//       "location": "path",
16074	//       "required": true,
16075	//       "type": "string"
16076	//     }
16077	//   },
16078	//   "path": "userprofiles/{profileId}/accountUserProfiles",
16079	//   "request": {
16080	//     "$ref": "AccountUserProfile"
16081	//   },
16082	//   "response": {
16083	//     "$ref": "AccountUserProfile"
16084	//   },
16085	//   "scopes": [
16086	//     "https://www.googleapis.com/auth/dfatrafficking"
16087	//   ]
16088	// }
16089
16090}
16091
16092// method id "dfareporting.accountUserProfiles.list":
16093
16094type AccountUserProfilesListCall struct {
16095	s            *Service
16096	profileId    int64
16097	urlParams_   gensupport.URLParams
16098	ifNoneMatch_ string
16099	ctx_         context.Context
16100	header_      http.Header
16101}
16102
16103// List: Retrieves a list of account user profiles, possibly filtered.
16104// This method supports paging.
16105//
16106// - profileId: User profile ID associated with this request.
16107func (r *AccountUserProfilesService) List(profileId int64) *AccountUserProfilesListCall {
16108	c := &AccountUserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16109	c.profileId = profileId
16110	return c
16111}
16112
16113// Active sets the optional parameter "active": Select only active user
16114// profiles.
16115func (c *AccountUserProfilesListCall) Active(active bool) *AccountUserProfilesListCall {
16116	c.urlParams_.Set("active", fmt.Sprint(active))
16117	return c
16118}
16119
16120// Ids sets the optional parameter "ids": Select only user profiles with
16121// these IDs.
16122func (c *AccountUserProfilesListCall) Ids(ids ...int64) *AccountUserProfilesListCall {
16123	var ids_ []string
16124	for _, v := range ids {
16125		ids_ = append(ids_, fmt.Sprint(v))
16126	}
16127	c.urlParams_.SetMulti("ids", ids_)
16128	return c
16129}
16130
16131// MaxResults sets the optional parameter "maxResults": Maximum number
16132// of results to return.
16133func (c *AccountUserProfilesListCall) MaxResults(maxResults int64) *AccountUserProfilesListCall {
16134	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16135	return c
16136}
16137
16138// PageToken sets the optional parameter "pageToken": Value of the
16139// nextPageToken from the previous result page.
16140func (c *AccountUserProfilesListCall) PageToken(pageToken string) *AccountUserProfilesListCall {
16141	c.urlParams_.Set("pageToken", pageToken)
16142	return c
16143}
16144
16145// SearchString sets the optional parameter "searchString": Allows
16146// searching for objects by name, ID or email. Wildcards (*) are
16147// allowed. For example, "user profile*2015" will return objects with
16148// names like "user profile June 2015", "user profile April 2015", or
16149// simply "user profile 2015". Most of the searches also add wildcards
16150// implicitly at the start and the end of the search string. For
16151// example, a search string of "user profile" will match objects with
16152// name "my user profile", "user profile 2015", or simply "user
16153// profile".
16154func (c *AccountUserProfilesListCall) SearchString(searchString string) *AccountUserProfilesListCall {
16155	c.urlParams_.Set("searchString", searchString)
16156	return c
16157}
16158
16159// SortField sets the optional parameter "sortField": Field by which to
16160// sort the list.
16161//
16162// Possible values:
16163//   "ID" (default)
16164//   "NAME"
16165func (c *AccountUserProfilesListCall) SortField(sortField string) *AccountUserProfilesListCall {
16166	c.urlParams_.Set("sortField", sortField)
16167	return c
16168}
16169
16170// SortOrder sets the optional parameter "sortOrder": Order of sorted
16171// results.
16172//
16173// Possible values:
16174//   "ASCENDING" (default)
16175//   "DESCENDING"
16176func (c *AccountUserProfilesListCall) SortOrder(sortOrder string) *AccountUserProfilesListCall {
16177	c.urlParams_.Set("sortOrder", sortOrder)
16178	return c
16179}
16180
16181// SubaccountId sets the optional parameter "subaccountId": Select only
16182// user profiles with the specified subaccount ID.
16183func (c *AccountUserProfilesListCall) SubaccountId(subaccountId int64) *AccountUserProfilesListCall {
16184	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
16185	return c
16186}
16187
16188// UserRoleId sets the optional parameter "userRoleId": Select only user
16189// profiles with the specified user role ID.
16190func (c *AccountUserProfilesListCall) UserRoleId(userRoleId int64) *AccountUserProfilesListCall {
16191	c.urlParams_.Set("userRoleId", fmt.Sprint(userRoleId))
16192	return c
16193}
16194
16195// Fields allows partial responses to be retrieved. See
16196// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16197// for more information.
16198func (c *AccountUserProfilesListCall) Fields(s ...googleapi.Field) *AccountUserProfilesListCall {
16199	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16200	return c
16201}
16202
16203// IfNoneMatch sets the optional parameter which makes the operation
16204// fail if the object's ETag matches the given value. This is useful for
16205// getting updates only after the object has changed since the last
16206// request. Use googleapi.IsNotModified to check whether the response
16207// error from Do is the result of In-None-Match.
16208func (c *AccountUserProfilesListCall) IfNoneMatch(entityTag string) *AccountUserProfilesListCall {
16209	c.ifNoneMatch_ = entityTag
16210	return c
16211}
16212
16213// Context sets the context to be used in this call's Do method. Any
16214// pending HTTP request will be aborted if the provided context is
16215// canceled.
16216func (c *AccountUserProfilesListCall) Context(ctx context.Context) *AccountUserProfilesListCall {
16217	c.ctx_ = ctx
16218	return c
16219}
16220
16221// Header returns an http.Header that can be modified by the caller to
16222// add HTTP headers to the request.
16223func (c *AccountUserProfilesListCall) Header() http.Header {
16224	if c.header_ == nil {
16225		c.header_ = make(http.Header)
16226	}
16227	return c.header_
16228}
16229
16230func (c *AccountUserProfilesListCall) doRequest(alt string) (*http.Response, error) {
16231	reqHeaders := make(http.Header)
16232	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
16233	for k, v := range c.header_ {
16234		reqHeaders[k] = v
16235	}
16236	reqHeaders.Set("User-Agent", c.s.userAgent())
16237	if c.ifNoneMatch_ != "" {
16238		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16239	}
16240	var body io.Reader = nil
16241	c.urlParams_.Set("alt", alt)
16242	c.urlParams_.Set("prettyPrint", "false")
16243	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
16244	urls += "?" + c.urlParams_.Encode()
16245	req, err := http.NewRequest("GET", urls, body)
16246	if err != nil {
16247		return nil, err
16248	}
16249	req.Header = reqHeaders
16250	googleapi.Expand(req.URL, map[string]string{
16251		"profileId": strconv.FormatInt(c.profileId, 10),
16252	})
16253	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16254}
16255
16256// Do executes the "dfareporting.accountUserProfiles.list" call.
16257// Exactly one of *AccountUserProfilesListResponse or error will be
16258// non-nil. Any non-2xx status code is an error. Response headers are in
16259// either *AccountUserProfilesListResponse.ServerResponse.Header or (if
16260// a response was returned at all) in error.(*googleapi.Error).Header.
16261// Use googleapi.IsNotModified to check whether the returned error was
16262// because http.StatusNotModified was returned.
16263func (c *AccountUserProfilesListCall) Do(opts ...googleapi.CallOption) (*AccountUserProfilesListResponse, error) {
16264	gensupport.SetOptions(c.urlParams_, opts...)
16265	res, err := c.doRequest("json")
16266	if res != nil && res.StatusCode == http.StatusNotModified {
16267		if res.Body != nil {
16268			res.Body.Close()
16269		}
16270		return nil, &googleapi.Error{
16271			Code:   res.StatusCode,
16272			Header: res.Header,
16273		}
16274	}
16275	if err != nil {
16276		return nil, err
16277	}
16278	defer googleapi.CloseBody(res)
16279	if err := googleapi.CheckResponse(res); err != nil {
16280		return nil, err
16281	}
16282	ret := &AccountUserProfilesListResponse{
16283		ServerResponse: googleapi.ServerResponse{
16284			Header:         res.Header,
16285			HTTPStatusCode: res.StatusCode,
16286		},
16287	}
16288	target := &ret
16289	if err := gensupport.DecodeResponse(target, res); err != nil {
16290		return nil, err
16291	}
16292	return ret, nil
16293	// {
16294	//   "description": "Retrieves a list of account user profiles, possibly filtered. This method supports paging.",
16295	//   "flatPath": "userprofiles/{profileId}/accountUserProfiles",
16296	//   "httpMethod": "GET",
16297	//   "id": "dfareporting.accountUserProfiles.list",
16298	//   "parameterOrder": [
16299	//     "profileId"
16300	//   ],
16301	//   "parameters": {
16302	//     "active": {
16303	//       "description": "Select only active user profiles.",
16304	//       "location": "query",
16305	//       "type": "boolean"
16306	//     },
16307	//     "ids": {
16308	//       "description": "Select only user profiles with these IDs.",
16309	//       "format": "int64",
16310	//       "location": "query",
16311	//       "repeated": true,
16312	//       "type": "string"
16313	//     },
16314	//     "maxResults": {
16315	//       "default": "1000",
16316	//       "description": "Maximum number of results to return.",
16317	//       "format": "int32",
16318	//       "location": "query",
16319	//       "maximum": "1000",
16320	//       "minimum": "0",
16321	//       "type": "integer"
16322	//     },
16323	//     "pageToken": {
16324	//       "description": "Value of the nextPageToken from the previous result page.",
16325	//       "location": "query",
16326	//       "type": "string"
16327	//     },
16328	//     "profileId": {
16329	//       "description": "User profile ID associated with this request.",
16330	//       "format": "int64",
16331	//       "location": "path",
16332	//       "required": true,
16333	//       "type": "string"
16334	//     },
16335	//     "searchString": {
16336	//       "description": "Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, \"user profile*2015\" will return objects with names like \"user profile June 2015\", \"user profile April 2015\", or simply \"user profile 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"user profile\" will match objects with name \"my user profile\", \"user profile 2015\", or simply \"user profile\".",
16337	//       "location": "query",
16338	//       "type": "string"
16339	//     },
16340	//     "sortField": {
16341	//       "default": "ID",
16342	//       "description": "Field by which to sort the list.",
16343	//       "enum": [
16344	//         "ID",
16345	//         "NAME"
16346	//       ],
16347	//       "enumDescriptions": [
16348	//         "",
16349	//         ""
16350	//       ],
16351	//       "location": "query",
16352	//       "type": "string"
16353	//     },
16354	//     "sortOrder": {
16355	//       "default": "ASCENDING",
16356	//       "description": "Order of sorted results.",
16357	//       "enum": [
16358	//         "ASCENDING",
16359	//         "DESCENDING"
16360	//       ],
16361	//       "enumDescriptions": [
16362	//         "",
16363	//         ""
16364	//       ],
16365	//       "location": "query",
16366	//       "type": "string"
16367	//     },
16368	//     "subaccountId": {
16369	//       "description": "Select only user profiles with the specified subaccount ID.",
16370	//       "format": "int64",
16371	//       "location": "query",
16372	//       "type": "string"
16373	//     },
16374	//     "userRoleId": {
16375	//       "description": "Select only user profiles with the specified user role ID.",
16376	//       "format": "int64",
16377	//       "location": "query",
16378	//       "type": "string"
16379	//     }
16380	//   },
16381	//   "path": "userprofiles/{profileId}/accountUserProfiles",
16382	//   "response": {
16383	//     "$ref": "AccountUserProfilesListResponse"
16384	//   },
16385	//   "scopes": [
16386	//     "https://www.googleapis.com/auth/dfatrafficking"
16387	//   ]
16388	// }
16389
16390}
16391
16392// Pages invokes f for each page of results.
16393// A non-nil error returned from f will halt the iteration.
16394// The provided context supersedes any context provided to the Context method.
16395func (c *AccountUserProfilesListCall) Pages(ctx context.Context, f func(*AccountUserProfilesListResponse) error) error {
16396	c.ctx_ = ctx
16397	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16398	for {
16399		x, err := c.Do()
16400		if err != nil {
16401			return err
16402		}
16403		if err := f(x); err != nil {
16404			return err
16405		}
16406		if x.NextPageToken == "" {
16407			return nil
16408		}
16409		c.PageToken(x.NextPageToken)
16410	}
16411}
16412
16413// method id "dfareporting.accountUserProfiles.patch":
16414
16415type AccountUserProfilesPatchCall struct {
16416	s                  *Service
16417	profileId          int64
16418	accountuserprofile *AccountUserProfile
16419	urlParams_         gensupport.URLParams
16420	ctx_               context.Context
16421	header_            http.Header
16422}
16423
16424// Patch: Updates an existing account user profile. This method supports
16425// patch semantics.
16426//
16427// - id: AccountUserProfile ID.
16428// - profileId: User profile ID associated with this request.
16429func (r *AccountUserProfilesService) Patch(profileId int64, id int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesPatchCall {
16430	c := &AccountUserProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16431	c.profileId = profileId
16432	c.urlParams_.Set("id", fmt.Sprint(id))
16433	c.accountuserprofile = accountuserprofile
16434	return c
16435}
16436
16437// Fields allows partial responses to be retrieved. See
16438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16439// for more information.
16440func (c *AccountUserProfilesPatchCall) Fields(s ...googleapi.Field) *AccountUserProfilesPatchCall {
16441	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16442	return c
16443}
16444
16445// Context sets the context to be used in this call's Do method. Any
16446// pending HTTP request will be aborted if the provided context is
16447// canceled.
16448func (c *AccountUserProfilesPatchCall) Context(ctx context.Context) *AccountUserProfilesPatchCall {
16449	c.ctx_ = ctx
16450	return c
16451}
16452
16453// Header returns an http.Header that can be modified by the caller to
16454// add HTTP headers to the request.
16455func (c *AccountUserProfilesPatchCall) Header() http.Header {
16456	if c.header_ == nil {
16457		c.header_ = make(http.Header)
16458	}
16459	return c.header_
16460}
16461
16462func (c *AccountUserProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
16463	reqHeaders := make(http.Header)
16464	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
16465	for k, v := range c.header_ {
16466		reqHeaders[k] = v
16467	}
16468	reqHeaders.Set("User-Agent", c.s.userAgent())
16469	var body io.Reader = nil
16470	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
16471	if err != nil {
16472		return nil, err
16473	}
16474	reqHeaders.Set("Content-Type", "application/json")
16475	c.urlParams_.Set("alt", alt)
16476	c.urlParams_.Set("prettyPrint", "false")
16477	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
16478	urls += "?" + c.urlParams_.Encode()
16479	req, err := http.NewRequest("PATCH", urls, body)
16480	if err != nil {
16481		return nil, err
16482	}
16483	req.Header = reqHeaders
16484	googleapi.Expand(req.URL, map[string]string{
16485		"profileId": strconv.FormatInt(c.profileId, 10),
16486	})
16487	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16488}
16489
16490// Do executes the "dfareporting.accountUserProfiles.patch" call.
16491// Exactly one of *AccountUserProfile or error will be non-nil. Any
16492// non-2xx status code is an error. Response headers are in either
16493// *AccountUserProfile.ServerResponse.Header or (if a response was
16494// returned at all) in error.(*googleapi.Error).Header. Use
16495// googleapi.IsNotModified to check whether the returned error was
16496// because http.StatusNotModified was returned.
16497func (c *AccountUserProfilesPatchCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
16498	gensupport.SetOptions(c.urlParams_, opts...)
16499	res, err := c.doRequest("json")
16500	if res != nil && res.StatusCode == http.StatusNotModified {
16501		if res.Body != nil {
16502			res.Body.Close()
16503		}
16504		return nil, &googleapi.Error{
16505			Code:   res.StatusCode,
16506			Header: res.Header,
16507		}
16508	}
16509	if err != nil {
16510		return nil, err
16511	}
16512	defer googleapi.CloseBody(res)
16513	if err := googleapi.CheckResponse(res); err != nil {
16514		return nil, err
16515	}
16516	ret := &AccountUserProfile{
16517		ServerResponse: googleapi.ServerResponse{
16518			Header:         res.Header,
16519			HTTPStatusCode: res.StatusCode,
16520		},
16521	}
16522	target := &ret
16523	if err := gensupport.DecodeResponse(target, res); err != nil {
16524		return nil, err
16525	}
16526	return ret, nil
16527	// {
16528	//   "description": "Updates an existing account user profile. This method supports patch semantics.",
16529	//   "flatPath": "userprofiles/{profileId}/accountUserProfiles",
16530	//   "httpMethod": "PATCH",
16531	//   "id": "dfareporting.accountUserProfiles.patch",
16532	//   "parameterOrder": [
16533	//     "profileId",
16534	//     "id"
16535	//   ],
16536	//   "parameters": {
16537	//     "id": {
16538	//       "description": "AccountUserProfile ID.",
16539	//       "format": "int64",
16540	//       "location": "query",
16541	//       "required": true,
16542	//       "type": "string"
16543	//     },
16544	//     "profileId": {
16545	//       "description": "User profile ID associated with this request.",
16546	//       "format": "int64",
16547	//       "location": "path",
16548	//       "required": true,
16549	//       "type": "string"
16550	//     }
16551	//   },
16552	//   "path": "userprofiles/{profileId}/accountUserProfiles",
16553	//   "request": {
16554	//     "$ref": "AccountUserProfile"
16555	//   },
16556	//   "response": {
16557	//     "$ref": "AccountUserProfile"
16558	//   },
16559	//   "scopes": [
16560	//     "https://www.googleapis.com/auth/dfatrafficking"
16561	//   ]
16562	// }
16563
16564}
16565
16566// method id "dfareporting.accountUserProfiles.update":
16567
16568type AccountUserProfilesUpdateCall struct {
16569	s                  *Service
16570	profileId          int64
16571	accountuserprofile *AccountUserProfile
16572	urlParams_         gensupport.URLParams
16573	ctx_               context.Context
16574	header_            http.Header
16575}
16576
16577// Update: Updates an existing account user profile.
16578//
16579// - profileId: User profile ID associated with this request.
16580func (r *AccountUserProfilesService) Update(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesUpdateCall {
16581	c := &AccountUserProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16582	c.profileId = profileId
16583	c.accountuserprofile = accountuserprofile
16584	return c
16585}
16586
16587// Fields allows partial responses to be retrieved. See
16588// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16589// for more information.
16590func (c *AccountUserProfilesUpdateCall) Fields(s ...googleapi.Field) *AccountUserProfilesUpdateCall {
16591	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16592	return c
16593}
16594
16595// Context sets the context to be used in this call's Do method. Any
16596// pending HTTP request will be aborted if the provided context is
16597// canceled.
16598func (c *AccountUserProfilesUpdateCall) Context(ctx context.Context) *AccountUserProfilesUpdateCall {
16599	c.ctx_ = ctx
16600	return c
16601}
16602
16603// Header returns an http.Header that can be modified by the caller to
16604// add HTTP headers to the request.
16605func (c *AccountUserProfilesUpdateCall) Header() http.Header {
16606	if c.header_ == nil {
16607		c.header_ = make(http.Header)
16608	}
16609	return c.header_
16610}
16611
16612func (c *AccountUserProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
16613	reqHeaders := make(http.Header)
16614	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
16615	for k, v := range c.header_ {
16616		reqHeaders[k] = v
16617	}
16618	reqHeaders.Set("User-Agent", c.s.userAgent())
16619	var body io.Reader = nil
16620	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
16621	if err != nil {
16622		return nil, err
16623	}
16624	reqHeaders.Set("Content-Type", "application/json")
16625	c.urlParams_.Set("alt", alt)
16626	c.urlParams_.Set("prettyPrint", "false")
16627	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
16628	urls += "?" + c.urlParams_.Encode()
16629	req, err := http.NewRequest("PUT", urls, body)
16630	if err != nil {
16631		return nil, err
16632	}
16633	req.Header = reqHeaders
16634	googleapi.Expand(req.URL, map[string]string{
16635		"profileId": strconv.FormatInt(c.profileId, 10),
16636	})
16637	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16638}
16639
16640// Do executes the "dfareporting.accountUserProfiles.update" call.
16641// Exactly one of *AccountUserProfile or error will be non-nil. Any
16642// non-2xx status code is an error. Response headers are in either
16643// *AccountUserProfile.ServerResponse.Header or (if a response was
16644// returned at all) in error.(*googleapi.Error).Header. Use
16645// googleapi.IsNotModified to check whether the returned error was
16646// because http.StatusNotModified was returned.
16647func (c *AccountUserProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
16648	gensupport.SetOptions(c.urlParams_, opts...)
16649	res, err := c.doRequest("json")
16650	if res != nil && res.StatusCode == http.StatusNotModified {
16651		if res.Body != nil {
16652			res.Body.Close()
16653		}
16654		return nil, &googleapi.Error{
16655			Code:   res.StatusCode,
16656			Header: res.Header,
16657		}
16658	}
16659	if err != nil {
16660		return nil, err
16661	}
16662	defer googleapi.CloseBody(res)
16663	if err := googleapi.CheckResponse(res); err != nil {
16664		return nil, err
16665	}
16666	ret := &AccountUserProfile{
16667		ServerResponse: googleapi.ServerResponse{
16668			Header:         res.Header,
16669			HTTPStatusCode: res.StatusCode,
16670		},
16671	}
16672	target := &ret
16673	if err := gensupport.DecodeResponse(target, res); err != nil {
16674		return nil, err
16675	}
16676	return ret, nil
16677	// {
16678	//   "description": "Updates an existing account user profile.",
16679	//   "flatPath": "userprofiles/{profileId}/accountUserProfiles",
16680	//   "httpMethod": "PUT",
16681	//   "id": "dfareporting.accountUserProfiles.update",
16682	//   "parameterOrder": [
16683	//     "profileId"
16684	//   ],
16685	//   "parameters": {
16686	//     "profileId": {
16687	//       "description": "User profile ID associated with this request.",
16688	//       "format": "int64",
16689	//       "location": "path",
16690	//       "required": true,
16691	//       "type": "string"
16692	//     }
16693	//   },
16694	//   "path": "userprofiles/{profileId}/accountUserProfiles",
16695	//   "request": {
16696	//     "$ref": "AccountUserProfile"
16697	//   },
16698	//   "response": {
16699	//     "$ref": "AccountUserProfile"
16700	//   },
16701	//   "scopes": [
16702	//     "https://www.googleapis.com/auth/dfatrafficking"
16703	//   ]
16704	// }
16705
16706}
16707
16708// method id "dfareporting.accounts.get":
16709
16710type AccountsGetCall struct {
16711	s            *Service
16712	profileId    int64
16713	id           int64
16714	urlParams_   gensupport.URLParams
16715	ifNoneMatch_ string
16716	ctx_         context.Context
16717	header_      http.Header
16718}
16719
16720// Get: Gets one account by ID.
16721//
16722// - id: Account ID.
16723// - profileId: User profile ID associated with this request.
16724func (r *AccountsService) Get(profileId int64, id int64) *AccountsGetCall {
16725	c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16726	c.profileId = profileId
16727	c.id = id
16728	return c
16729}
16730
16731// Fields allows partial responses to be retrieved. See
16732// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16733// for more information.
16734func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
16735	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16736	return c
16737}
16738
16739// IfNoneMatch sets the optional parameter which makes the operation
16740// fail if the object's ETag matches the given value. This is useful for
16741// getting updates only after the object has changed since the last
16742// request. Use googleapi.IsNotModified to check whether the response
16743// error from Do is the result of In-None-Match.
16744func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
16745	c.ifNoneMatch_ = entityTag
16746	return c
16747}
16748
16749// Context sets the context to be used in this call's Do method. Any
16750// pending HTTP request will be aborted if the provided context is
16751// canceled.
16752func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
16753	c.ctx_ = ctx
16754	return c
16755}
16756
16757// Header returns an http.Header that can be modified by the caller to
16758// add HTTP headers to the request.
16759func (c *AccountsGetCall) Header() http.Header {
16760	if c.header_ == nil {
16761		c.header_ = make(http.Header)
16762	}
16763	return c.header_
16764}
16765
16766func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
16767	reqHeaders := make(http.Header)
16768	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
16769	for k, v := range c.header_ {
16770		reqHeaders[k] = v
16771	}
16772	reqHeaders.Set("User-Agent", c.s.userAgent())
16773	if c.ifNoneMatch_ != "" {
16774		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16775	}
16776	var body io.Reader = nil
16777	c.urlParams_.Set("alt", alt)
16778	c.urlParams_.Set("prettyPrint", "false")
16779	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts/{id}")
16780	urls += "?" + c.urlParams_.Encode()
16781	req, err := http.NewRequest("GET", urls, body)
16782	if err != nil {
16783		return nil, err
16784	}
16785	req.Header = reqHeaders
16786	googleapi.Expand(req.URL, map[string]string{
16787		"profileId": strconv.FormatInt(c.profileId, 10),
16788		"id":        strconv.FormatInt(c.id, 10),
16789	})
16790	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16791}
16792
16793// Do executes the "dfareporting.accounts.get" call.
16794// Exactly one of *Account or error will be non-nil. Any non-2xx status
16795// code is an error. Response headers are in either
16796// *Account.ServerResponse.Header or (if a response was returned at all)
16797// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16798// check whether the returned error was because http.StatusNotModified
16799// was returned.
16800func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16801	gensupport.SetOptions(c.urlParams_, opts...)
16802	res, err := c.doRequest("json")
16803	if res != nil && res.StatusCode == http.StatusNotModified {
16804		if res.Body != nil {
16805			res.Body.Close()
16806		}
16807		return nil, &googleapi.Error{
16808			Code:   res.StatusCode,
16809			Header: res.Header,
16810		}
16811	}
16812	if err != nil {
16813		return nil, err
16814	}
16815	defer googleapi.CloseBody(res)
16816	if err := googleapi.CheckResponse(res); err != nil {
16817		return nil, err
16818	}
16819	ret := &Account{
16820		ServerResponse: googleapi.ServerResponse{
16821			Header:         res.Header,
16822			HTTPStatusCode: res.StatusCode,
16823		},
16824	}
16825	target := &ret
16826	if err := gensupport.DecodeResponse(target, res); err != nil {
16827		return nil, err
16828	}
16829	return ret, nil
16830	// {
16831	//   "description": "Gets one account by ID.",
16832	//   "flatPath": "userprofiles/{profileId}/accounts/{id}",
16833	//   "httpMethod": "GET",
16834	//   "id": "dfareporting.accounts.get",
16835	//   "parameterOrder": [
16836	//     "profileId",
16837	//     "id"
16838	//   ],
16839	//   "parameters": {
16840	//     "id": {
16841	//       "description": "Account ID.",
16842	//       "format": "int64",
16843	//       "location": "path",
16844	//       "required": true,
16845	//       "type": "string"
16846	//     },
16847	//     "profileId": {
16848	//       "description": "User profile ID associated with this request.",
16849	//       "format": "int64",
16850	//       "location": "path",
16851	//       "required": true,
16852	//       "type": "string"
16853	//     }
16854	//   },
16855	//   "path": "userprofiles/{profileId}/accounts/{id}",
16856	//   "response": {
16857	//     "$ref": "Account"
16858	//   },
16859	//   "scopes": [
16860	//     "https://www.googleapis.com/auth/dfatrafficking"
16861	//   ]
16862	// }
16863
16864}
16865
16866// method id "dfareporting.accounts.list":
16867
16868type AccountsListCall struct {
16869	s            *Service
16870	profileId    int64
16871	urlParams_   gensupport.URLParams
16872	ifNoneMatch_ string
16873	ctx_         context.Context
16874	header_      http.Header
16875}
16876
16877// List: Retrieves the list of accounts, possibly filtered. This method
16878// supports paging.
16879//
16880// - profileId: User profile ID associated with this request.
16881func (r *AccountsService) List(profileId int64) *AccountsListCall {
16882	c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16883	c.profileId = profileId
16884	return c
16885}
16886
16887// Active sets the optional parameter "active": Select only active
16888// accounts. Don't set this field to select both active and non-active
16889// accounts.
16890func (c *AccountsListCall) Active(active bool) *AccountsListCall {
16891	c.urlParams_.Set("active", fmt.Sprint(active))
16892	return c
16893}
16894
16895// Ids sets the optional parameter "ids": Select only accounts with
16896// these IDs.
16897func (c *AccountsListCall) Ids(ids ...int64) *AccountsListCall {
16898	var ids_ []string
16899	for _, v := range ids {
16900		ids_ = append(ids_, fmt.Sprint(v))
16901	}
16902	c.urlParams_.SetMulti("ids", ids_)
16903	return c
16904}
16905
16906// MaxResults sets the optional parameter "maxResults": Maximum number
16907// of results to return.
16908func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
16909	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16910	return c
16911}
16912
16913// PageToken sets the optional parameter "pageToken": Value of the
16914// nextPageToken from the previous result page.
16915func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
16916	c.urlParams_.Set("pageToken", pageToken)
16917	return c
16918}
16919
16920// SearchString sets the optional parameter "searchString": Allows
16921// searching for objects by name or ID. Wildcards (*) are allowed. For
16922// example, "account*2015" will return objects with names like "account
16923// June 2015", "account April 2015", or simply "account 2015". Most of
16924// the searches also add wildcards implicitly at the start and the end
16925// of the search string. For example, a search string of "account" will
16926// match objects with name "my account", "account 2015", or simply
16927// "account".
16928func (c *AccountsListCall) SearchString(searchString string) *AccountsListCall {
16929	c.urlParams_.Set("searchString", searchString)
16930	return c
16931}
16932
16933// SortField sets the optional parameter "sortField": Field by which to
16934// sort the list.
16935//
16936// Possible values:
16937//   "ID" (default)
16938//   "NAME"
16939func (c *AccountsListCall) SortField(sortField string) *AccountsListCall {
16940	c.urlParams_.Set("sortField", sortField)
16941	return c
16942}
16943
16944// SortOrder sets the optional parameter "sortOrder": Order of sorted
16945// results.
16946//
16947// Possible values:
16948//   "ASCENDING" (default)
16949//   "DESCENDING"
16950func (c *AccountsListCall) SortOrder(sortOrder string) *AccountsListCall {
16951	c.urlParams_.Set("sortOrder", sortOrder)
16952	return c
16953}
16954
16955// Fields allows partial responses to be retrieved. See
16956// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16957// for more information.
16958func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
16959	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16960	return c
16961}
16962
16963// IfNoneMatch sets the optional parameter which makes the operation
16964// fail if the object's ETag matches the given value. This is useful for
16965// getting updates only after the object has changed since the last
16966// request. Use googleapi.IsNotModified to check whether the response
16967// error from Do is the result of In-None-Match.
16968func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
16969	c.ifNoneMatch_ = entityTag
16970	return c
16971}
16972
16973// Context sets the context to be used in this call's Do method. Any
16974// pending HTTP request will be aborted if the provided context is
16975// canceled.
16976func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
16977	c.ctx_ = ctx
16978	return c
16979}
16980
16981// Header returns an http.Header that can be modified by the caller to
16982// add HTTP headers to the request.
16983func (c *AccountsListCall) Header() http.Header {
16984	if c.header_ == nil {
16985		c.header_ = make(http.Header)
16986	}
16987	return c.header_
16988}
16989
16990func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
16991	reqHeaders := make(http.Header)
16992	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
16993	for k, v := range c.header_ {
16994		reqHeaders[k] = v
16995	}
16996	reqHeaders.Set("User-Agent", c.s.userAgent())
16997	if c.ifNoneMatch_ != "" {
16998		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16999	}
17000	var body io.Reader = nil
17001	c.urlParams_.Set("alt", alt)
17002	c.urlParams_.Set("prettyPrint", "false")
17003	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
17004	urls += "?" + c.urlParams_.Encode()
17005	req, err := http.NewRequest("GET", urls, body)
17006	if err != nil {
17007		return nil, err
17008	}
17009	req.Header = reqHeaders
17010	googleapi.Expand(req.URL, map[string]string{
17011		"profileId": strconv.FormatInt(c.profileId, 10),
17012	})
17013	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17014}
17015
17016// Do executes the "dfareporting.accounts.list" call.
17017// Exactly one of *AccountsListResponse or error will be non-nil. Any
17018// non-2xx status code is an error. Response headers are in either
17019// *AccountsListResponse.ServerResponse.Header or (if a response was
17020// returned at all) in error.(*googleapi.Error).Header. Use
17021// googleapi.IsNotModified to check whether the returned error was
17022// because http.StatusNotModified was returned.
17023func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) {
17024	gensupport.SetOptions(c.urlParams_, opts...)
17025	res, err := c.doRequest("json")
17026	if res != nil && res.StatusCode == http.StatusNotModified {
17027		if res.Body != nil {
17028			res.Body.Close()
17029		}
17030		return nil, &googleapi.Error{
17031			Code:   res.StatusCode,
17032			Header: res.Header,
17033		}
17034	}
17035	if err != nil {
17036		return nil, err
17037	}
17038	defer googleapi.CloseBody(res)
17039	if err := googleapi.CheckResponse(res); err != nil {
17040		return nil, err
17041	}
17042	ret := &AccountsListResponse{
17043		ServerResponse: googleapi.ServerResponse{
17044			Header:         res.Header,
17045			HTTPStatusCode: res.StatusCode,
17046		},
17047	}
17048	target := &ret
17049	if err := gensupport.DecodeResponse(target, res); err != nil {
17050		return nil, err
17051	}
17052	return ret, nil
17053	// {
17054	//   "description": "Retrieves the list of accounts, possibly filtered. This method supports paging.",
17055	//   "flatPath": "userprofiles/{profileId}/accounts",
17056	//   "httpMethod": "GET",
17057	//   "id": "dfareporting.accounts.list",
17058	//   "parameterOrder": [
17059	//     "profileId"
17060	//   ],
17061	//   "parameters": {
17062	//     "active": {
17063	//       "description": "Select only active accounts. Don't set this field to select both active and non-active accounts.",
17064	//       "location": "query",
17065	//       "type": "boolean"
17066	//     },
17067	//     "ids": {
17068	//       "description": "Select only accounts with these IDs.",
17069	//       "format": "int64",
17070	//       "location": "query",
17071	//       "repeated": true,
17072	//       "type": "string"
17073	//     },
17074	//     "maxResults": {
17075	//       "default": "1000",
17076	//       "description": "Maximum number of results to return.",
17077	//       "format": "int32",
17078	//       "location": "query",
17079	//       "maximum": "1000",
17080	//       "minimum": "0",
17081	//       "type": "integer"
17082	//     },
17083	//     "pageToken": {
17084	//       "description": "Value of the nextPageToken from the previous result page.",
17085	//       "location": "query",
17086	//       "type": "string"
17087	//     },
17088	//     "profileId": {
17089	//       "description": "User profile ID associated with this request.",
17090	//       "format": "int64",
17091	//       "location": "path",
17092	//       "required": true,
17093	//       "type": "string"
17094	//     },
17095	//     "searchString": {
17096	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"account*2015\" will return objects with names like \"account June 2015\", \"account April 2015\", or simply \"account 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"account\" will match objects with name \"my account\", \"account 2015\", or simply \"account\".",
17097	//       "location": "query",
17098	//       "type": "string"
17099	//     },
17100	//     "sortField": {
17101	//       "default": "ID",
17102	//       "description": "Field by which to sort the list.",
17103	//       "enum": [
17104	//         "ID",
17105	//         "NAME"
17106	//       ],
17107	//       "enumDescriptions": [
17108	//         "",
17109	//         ""
17110	//       ],
17111	//       "location": "query",
17112	//       "type": "string"
17113	//     },
17114	//     "sortOrder": {
17115	//       "default": "ASCENDING",
17116	//       "description": "Order of sorted results.",
17117	//       "enum": [
17118	//         "ASCENDING",
17119	//         "DESCENDING"
17120	//       ],
17121	//       "enumDescriptions": [
17122	//         "",
17123	//         ""
17124	//       ],
17125	//       "location": "query",
17126	//       "type": "string"
17127	//     }
17128	//   },
17129	//   "path": "userprofiles/{profileId}/accounts",
17130	//   "response": {
17131	//     "$ref": "AccountsListResponse"
17132	//   },
17133	//   "scopes": [
17134	//     "https://www.googleapis.com/auth/dfatrafficking"
17135	//   ]
17136	// }
17137
17138}
17139
17140// Pages invokes f for each page of results.
17141// A non-nil error returned from f will halt the iteration.
17142// The provided context supersedes any context provided to the Context method.
17143func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error {
17144	c.ctx_ = ctx
17145	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17146	for {
17147		x, err := c.Do()
17148		if err != nil {
17149			return err
17150		}
17151		if err := f(x); err != nil {
17152			return err
17153		}
17154		if x.NextPageToken == "" {
17155			return nil
17156		}
17157		c.PageToken(x.NextPageToken)
17158	}
17159}
17160
17161// method id "dfareporting.accounts.patch":
17162
17163type AccountsPatchCall struct {
17164	s          *Service
17165	profileId  int64
17166	account    *Account
17167	urlParams_ gensupport.URLParams
17168	ctx_       context.Context
17169	header_    http.Header
17170}
17171
17172// Patch: Updates an existing account. This method supports patch
17173// semantics.
17174//
17175// - id: Account ID.
17176// - profileId: User profile ID associated with this request.
17177func (r *AccountsService) Patch(profileId int64, id int64, account *Account) *AccountsPatchCall {
17178	c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17179	c.profileId = profileId
17180	c.urlParams_.Set("id", fmt.Sprint(id))
17181	c.account = account
17182	return c
17183}
17184
17185// Fields allows partial responses to be retrieved. See
17186// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17187// for more information.
17188func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
17189	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17190	return c
17191}
17192
17193// Context sets the context to be used in this call's Do method. Any
17194// pending HTTP request will be aborted if the provided context is
17195// canceled.
17196func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
17197	c.ctx_ = ctx
17198	return c
17199}
17200
17201// Header returns an http.Header that can be modified by the caller to
17202// add HTTP headers to the request.
17203func (c *AccountsPatchCall) Header() http.Header {
17204	if c.header_ == nil {
17205		c.header_ = make(http.Header)
17206	}
17207	return c.header_
17208}
17209
17210func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
17211	reqHeaders := make(http.Header)
17212	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
17213	for k, v := range c.header_ {
17214		reqHeaders[k] = v
17215	}
17216	reqHeaders.Set("User-Agent", c.s.userAgent())
17217	var body io.Reader = nil
17218	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
17219	if err != nil {
17220		return nil, err
17221	}
17222	reqHeaders.Set("Content-Type", "application/json")
17223	c.urlParams_.Set("alt", alt)
17224	c.urlParams_.Set("prettyPrint", "false")
17225	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
17226	urls += "?" + c.urlParams_.Encode()
17227	req, err := http.NewRequest("PATCH", urls, body)
17228	if err != nil {
17229		return nil, err
17230	}
17231	req.Header = reqHeaders
17232	googleapi.Expand(req.URL, map[string]string{
17233		"profileId": strconv.FormatInt(c.profileId, 10),
17234	})
17235	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17236}
17237
17238// Do executes the "dfareporting.accounts.patch" call.
17239// Exactly one of *Account or error will be non-nil. Any non-2xx status
17240// code is an error. Response headers are in either
17241// *Account.ServerResponse.Header or (if a response was returned at all)
17242// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17243// check whether the returned error was because http.StatusNotModified
17244// was returned.
17245func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) {
17246	gensupport.SetOptions(c.urlParams_, opts...)
17247	res, err := c.doRequest("json")
17248	if res != nil && res.StatusCode == http.StatusNotModified {
17249		if res.Body != nil {
17250			res.Body.Close()
17251		}
17252		return nil, &googleapi.Error{
17253			Code:   res.StatusCode,
17254			Header: res.Header,
17255		}
17256	}
17257	if err != nil {
17258		return nil, err
17259	}
17260	defer googleapi.CloseBody(res)
17261	if err := googleapi.CheckResponse(res); err != nil {
17262		return nil, err
17263	}
17264	ret := &Account{
17265		ServerResponse: googleapi.ServerResponse{
17266			Header:         res.Header,
17267			HTTPStatusCode: res.StatusCode,
17268		},
17269	}
17270	target := &ret
17271	if err := gensupport.DecodeResponse(target, res); err != nil {
17272		return nil, err
17273	}
17274	return ret, nil
17275	// {
17276	//   "description": "Updates an existing account. This method supports patch semantics.",
17277	//   "flatPath": "userprofiles/{profileId}/accounts",
17278	//   "httpMethod": "PATCH",
17279	//   "id": "dfareporting.accounts.patch",
17280	//   "parameterOrder": [
17281	//     "profileId",
17282	//     "id"
17283	//   ],
17284	//   "parameters": {
17285	//     "id": {
17286	//       "description": "Account ID.",
17287	//       "format": "int64",
17288	//       "location": "query",
17289	//       "required": true,
17290	//       "type": "string"
17291	//     },
17292	//     "profileId": {
17293	//       "description": "User profile ID associated with this request.",
17294	//       "format": "int64",
17295	//       "location": "path",
17296	//       "required": true,
17297	//       "type": "string"
17298	//     }
17299	//   },
17300	//   "path": "userprofiles/{profileId}/accounts",
17301	//   "request": {
17302	//     "$ref": "Account"
17303	//   },
17304	//   "response": {
17305	//     "$ref": "Account"
17306	//   },
17307	//   "scopes": [
17308	//     "https://www.googleapis.com/auth/dfatrafficking"
17309	//   ]
17310	// }
17311
17312}
17313
17314// method id "dfareporting.accounts.update":
17315
17316type AccountsUpdateCall struct {
17317	s          *Service
17318	profileId  int64
17319	account    *Account
17320	urlParams_ gensupport.URLParams
17321	ctx_       context.Context
17322	header_    http.Header
17323}
17324
17325// Update: Updates an existing account.
17326//
17327// - profileId: User profile ID associated with this request.
17328func (r *AccountsService) Update(profileId int64, account *Account) *AccountsUpdateCall {
17329	c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17330	c.profileId = profileId
17331	c.account = account
17332	return c
17333}
17334
17335// Fields allows partial responses to be retrieved. See
17336// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17337// for more information.
17338func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
17339	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17340	return c
17341}
17342
17343// Context sets the context to be used in this call's Do method. Any
17344// pending HTTP request will be aborted if the provided context is
17345// canceled.
17346func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
17347	c.ctx_ = ctx
17348	return c
17349}
17350
17351// Header returns an http.Header that can be modified by the caller to
17352// add HTTP headers to the request.
17353func (c *AccountsUpdateCall) Header() http.Header {
17354	if c.header_ == nil {
17355		c.header_ = make(http.Header)
17356	}
17357	return c.header_
17358}
17359
17360func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
17361	reqHeaders := make(http.Header)
17362	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
17363	for k, v := range c.header_ {
17364		reqHeaders[k] = v
17365	}
17366	reqHeaders.Set("User-Agent", c.s.userAgent())
17367	var body io.Reader = nil
17368	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
17369	if err != nil {
17370		return nil, err
17371	}
17372	reqHeaders.Set("Content-Type", "application/json")
17373	c.urlParams_.Set("alt", alt)
17374	c.urlParams_.Set("prettyPrint", "false")
17375	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
17376	urls += "?" + c.urlParams_.Encode()
17377	req, err := http.NewRequest("PUT", urls, body)
17378	if err != nil {
17379		return nil, err
17380	}
17381	req.Header = reqHeaders
17382	googleapi.Expand(req.URL, map[string]string{
17383		"profileId": strconv.FormatInt(c.profileId, 10),
17384	})
17385	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17386}
17387
17388// Do executes the "dfareporting.accounts.update" call.
17389// Exactly one of *Account or error will be non-nil. Any non-2xx status
17390// code is an error. Response headers are in either
17391// *Account.ServerResponse.Header or (if a response was returned at all)
17392// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17393// check whether the returned error was because http.StatusNotModified
17394// was returned.
17395func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
17396	gensupport.SetOptions(c.urlParams_, opts...)
17397	res, err := c.doRequest("json")
17398	if res != nil && res.StatusCode == http.StatusNotModified {
17399		if res.Body != nil {
17400			res.Body.Close()
17401		}
17402		return nil, &googleapi.Error{
17403			Code:   res.StatusCode,
17404			Header: res.Header,
17405		}
17406	}
17407	if err != nil {
17408		return nil, err
17409	}
17410	defer googleapi.CloseBody(res)
17411	if err := googleapi.CheckResponse(res); err != nil {
17412		return nil, err
17413	}
17414	ret := &Account{
17415		ServerResponse: googleapi.ServerResponse{
17416			Header:         res.Header,
17417			HTTPStatusCode: res.StatusCode,
17418		},
17419	}
17420	target := &ret
17421	if err := gensupport.DecodeResponse(target, res); err != nil {
17422		return nil, err
17423	}
17424	return ret, nil
17425	// {
17426	//   "description": "Updates an existing account.",
17427	//   "flatPath": "userprofiles/{profileId}/accounts",
17428	//   "httpMethod": "PUT",
17429	//   "id": "dfareporting.accounts.update",
17430	//   "parameterOrder": [
17431	//     "profileId"
17432	//   ],
17433	//   "parameters": {
17434	//     "profileId": {
17435	//       "description": "User profile ID associated with this request.",
17436	//       "format": "int64",
17437	//       "location": "path",
17438	//       "required": true,
17439	//       "type": "string"
17440	//     }
17441	//   },
17442	//   "path": "userprofiles/{profileId}/accounts",
17443	//   "request": {
17444	//     "$ref": "Account"
17445	//   },
17446	//   "response": {
17447	//     "$ref": "Account"
17448	//   },
17449	//   "scopes": [
17450	//     "https://www.googleapis.com/auth/dfatrafficking"
17451	//   ]
17452	// }
17453
17454}
17455
17456// method id "dfareporting.ads.get":
17457
17458type AdsGetCall struct {
17459	s            *Service
17460	profileId    int64
17461	id           int64
17462	urlParams_   gensupport.URLParams
17463	ifNoneMatch_ string
17464	ctx_         context.Context
17465	header_      http.Header
17466}
17467
17468// Get: Gets one ad by ID.
17469//
17470// - id: Ad ID.
17471// - profileId: User profile ID associated with this request.
17472func (r *AdsService) Get(profileId int64, id int64) *AdsGetCall {
17473	c := &AdsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17474	c.profileId = profileId
17475	c.id = id
17476	return c
17477}
17478
17479// Fields allows partial responses to be retrieved. See
17480// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17481// for more information.
17482func (c *AdsGetCall) Fields(s ...googleapi.Field) *AdsGetCall {
17483	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17484	return c
17485}
17486
17487// IfNoneMatch sets the optional parameter which makes the operation
17488// fail if the object's ETag matches the given value. This is useful for
17489// getting updates only after the object has changed since the last
17490// request. Use googleapi.IsNotModified to check whether the response
17491// error from Do is the result of In-None-Match.
17492func (c *AdsGetCall) IfNoneMatch(entityTag string) *AdsGetCall {
17493	c.ifNoneMatch_ = entityTag
17494	return c
17495}
17496
17497// Context sets the context to be used in this call's Do method. Any
17498// pending HTTP request will be aborted if the provided context is
17499// canceled.
17500func (c *AdsGetCall) Context(ctx context.Context) *AdsGetCall {
17501	c.ctx_ = ctx
17502	return c
17503}
17504
17505// Header returns an http.Header that can be modified by the caller to
17506// add HTTP headers to the request.
17507func (c *AdsGetCall) Header() http.Header {
17508	if c.header_ == nil {
17509		c.header_ = make(http.Header)
17510	}
17511	return c.header_
17512}
17513
17514func (c *AdsGetCall) doRequest(alt string) (*http.Response, error) {
17515	reqHeaders := make(http.Header)
17516	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
17517	for k, v := range c.header_ {
17518		reqHeaders[k] = v
17519	}
17520	reqHeaders.Set("User-Agent", c.s.userAgent())
17521	if c.ifNoneMatch_ != "" {
17522		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17523	}
17524	var body io.Reader = nil
17525	c.urlParams_.Set("alt", alt)
17526	c.urlParams_.Set("prettyPrint", "false")
17527	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads/{id}")
17528	urls += "?" + c.urlParams_.Encode()
17529	req, err := http.NewRequest("GET", urls, body)
17530	if err != nil {
17531		return nil, err
17532	}
17533	req.Header = reqHeaders
17534	googleapi.Expand(req.URL, map[string]string{
17535		"profileId": strconv.FormatInt(c.profileId, 10),
17536		"id":        strconv.FormatInt(c.id, 10),
17537	})
17538	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17539}
17540
17541// Do executes the "dfareporting.ads.get" call.
17542// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17543// is an error. Response headers are in either *Ad.ServerResponse.Header
17544// or (if a response was returned at all) in
17545// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17546// whether the returned error was because http.StatusNotModified was
17547// returned.
17548func (c *AdsGetCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17549	gensupport.SetOptions(c.urlParams_, opts...)
17550	res, err := c.doRequest("json")
17551	if res != nil && res.StatusCode == http.StatusNotModified {
17552		if res.Body != nil {
17553			res.Body.Close()
17554		}
17555		return nil, &googleapi.Error{
17556			Code:   res.StatusCode,
17557			Header: res.Header,
17558		}
17559	}
17560	if err != nil {
17561		return nil, err
17562	}
17563	defer googleapi.CloseBody(res)
17564	if err := googleapi.CheckResponse(res); err != nil {
17565		return nil, err
17566	}
17567	ret := &Ad{
17568		ServerResponse: googleapi.ServerResponse{
17569			Header:         res.Header,
17570			HTTPStatusCode: res.StatusCode,
17571		},
17572	}
17573	target := &ret
17574	if err := gensupport.DecodeResponse(target, res); err != nil {
17575		return nil, err
17576	}
17577	return ret, nil
17578	// {
17579	//   "description": "Gets one ad by ID.",
17580	//   "flatPath": "userprofiles/{profileId}/ads/{id}",
17581	//   "httpMethod": "GET",
17582	//   "id": "dfareporting.ads.get",
17583	//   "parameterOrder": [
17584	//     "profileId",
17585	//     "id"
17586	//   ],
17587	//   "parameters": {
17588	//     "id": {
17589	//       "description": "Ad ID.",
17590	//       "format": "int64",
17591	//       "location": "path",
17592	//       "required": true,
17593	//       "type": "string"
17594	//     },
17595	//     "profileId": {
17596	//       "description": "User profile ID associated with this request.",
17597	//       "format": "int64",
17598	//       "location": "path",
17599	//       "required": true,
17600	//       "type": "string"
17601	//     }
17602	//   },
17603	//   "path": "userprofiles/{profileId}/ads/{id}",
17604	//   "response": {
17605	//     "$ref": "Ad"
17606	//   },
17607	//   "scopes": [
17608	//     "https://www.googleapis.com/auth/dfatrafficking"
17609	//   ]
17610	// }
17611
17612}
17613
17614// method id "dfareporting.ads.insert":
17615
17616type AdsInsertCall struct {
17617	s          *Service
17618	profileId  int64
17619	ad         *Ad
17620	urlParams_ gensupport.URLParams
17621	ctx_       context.Context
17622	header_    http.Header
17623}
17624
17625// Insert: Inserts a new ad.
17626//
17627// - profileId: User profile ID associated with this request.
17628func (r *AdsService) Insert(profileId int64, ad *Ad) *AdsInsertCall {
17629	c := &AdsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17630	c.profileId = profileId
17631	c.ad = ad
17632	return c
17633}
17634
17635// Fields allows partial responses to be retrieved. See
17636// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17637// for more information.
17638func (c *AdsInsertCall) Fields(s ...googleapi.Field) *AdsInsertCall {
17639	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17640	return c
17641}
17642
17643// Context sets the context to be used in this call's Do method. Any
17644// pending HTTP request will be aborted if the provided context is
17645// canceled.
17646func (c *AdsInsertCall) Context(ctx context.Context) *AdsInsertCall {
17647	c.ctx_ = ctx
17648	return c
17649}
17650
17651// Header returns an http.Header that can be modified by the caller to
17652// add HTTP headers to the request.
17653func (c *AdsInsertCall) Header() http.Header {
17654	if c.header_ == nil {
17655		c.header_ = make(http.Header)
17656	}
17657	return c.header_
17658}
17659
17660func (c *AdsInsertCall) doRequest(alt string) (*http.Response, error) {
17661	reqHeaders := make(http.Header)
17662	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
17663	for k, v := range c.header_ {
17664		reqHeaders[k] = v
17665	}
17666	reqHeaders.Set("User-Agent", c.s.userAgent())
17667	var body io.Reader = nil
17668	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17669	if err != nil {
17670		return nil, err
17671	}
17672	reqHeaders.Set("Content-Type", "application/json")
17673	c.urlParams_.Set("alt", alt)
17674	c.urlParams_.Set("prettyPrint", "false")
17675	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17676	urls += "?" + c.urlParams_.Encode()
17677	req, err := http.NewRequest("POST", urls, body)
17678	if err != nil {
17679		return nil, err
17680	}
17681	req.Header = reqHeaders
17682	googleapi.Expand(req.URL, map[string]string{
17683		"profileId": strconv.FormatInt(c.profileId, 10),
17684	})
17685	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17686}
17687
17688// Do executes the "dfareporting.ads.insert" call.
17689// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17690// is an error. Response headers are in either *Ad.ServerResponse.Header
17691// or (if a response was returned at all) in
17692// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17693// whether the returned error was because http.StatusNotModified was
17694// returned.
17695func (c *AdsInsertCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17696	gensupport.SetOptions(c.urlParams_, opts...)
17697	res, err := c.doRequest("json")
17698	if res != nil && res.StatusCode == http.StatusNotModified {
17699		if res.Body != nil {
17700			res.Body.Close()
17701		}
17702		return nil, &googleapi.Error{
17703			Code:   res.StatusCode,
17704			Header: res.Header,
17705		}
17706	}
17707	if err != nil {
17708		return nil, err
17709	}
17710	defer googleapi.CloseBody(res)
17711	if err := googleapi.CheckResponse(res); err != nil {
17712		return nil, err
17713	}
17714	ret := &Ad{
17715		ServerResponse: googleapi.ServerResponse{
17716			Header:         res.Header,
17717			HTTPStatusCode: res.StatusCode,
17718		},
17719	}
17720	target := &ret
17721	if err := gensupport.DecodeResponse(target, res); err != nil {
17722		return nil, err
17723	}
17724	return ret, nil
17725	// {
17726	//   "description": "Inserts a new ad.",
17727	//   "flatPath": "userprofiles/{profileId}/ads",
17728	//   "httpMethod": "POST",
17729	//   "id": "dfareporting.ads.insert",
17730	//   "parameterOrder": [
17731	//     "profileId"
17732	//   ],
17733	//   "parameters": {
17734	//     "profileId": {
17735	//       "description": "User profile ID associated with this request.",
17736	//       "format": "int64",
17737	//       "location": "path",
17738	//       "required": true,
17739	//       "type": "string"
17740	//     }
17741	//   },
17742	//   "path": "userprofiles/{profileId}/ads",
17743	//   "request": {
17744	//     "$ref": "Ad"
17745	//   },
17746	//   "response": {
17747	//     "$ref": "Ad"
17748	//   },
17749	//   "scopes": [
17750	//     "https://www.googleapis.com/auth/dfatrafficking"
17751	//   ]
17752	// }
17753
17754}
17755
17756// method id "dfareporting.ads.list":
17757
17758type AdsListCall struct {
17759	s            *Service
17760	profileId    int64
17761	urlParams_   gensupport.URLParams
17762	ifNoneMatch_ string
17763	ctx_         context.Context
17764	header_      http.Header
17765}
17766
17767// List: Retrieves a list of ads, possibly filtered. This method
17768// supports paging.
17769//
17770// - profileId: User profile ID associated with this request.
17771func (r *AdsService) List(profileId int64) *AdsListCall {
17772	c := &AdsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17773	c.profileId = profileId
17774	return c
17775}
17776
17777// Active sets the optional parameter "active": Select only active ads.
17778func (c *AdsListCall) Active(active bool) *AdsListCall {
17779	c.urlParams_.Set("active", fmt.Sprint(active))
17780	return c
17781}
17782
17783// AdvertiserId sets the optional parameter "advertiserId": Select only
17784// ads with this advertiser ID.
17785func (c *AdsListCall) AdvertiserId(advertiserId int64) *AdsListCall {
17786	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
17787	return c
17788}
17789
17790// Archived sets the optional parameter "archived": Select only archived
17791// ads.
17792func (c *AdsListCall) Archived(archived bool) *AdsListCall {
17793	c.urlParams_.Set("archived", fmt.Sprint(archived))
17794	return c
17795}
17796
17797// AudienceSegmentIds sets the optional parameter "audienceSegmentIds":
17798// Select only ads with these audience segment IDs.
17799func (c *AdsListCall) AudienceSegmentIds(audienceSegmentIds ...int64) *AdsListCall {
17800	var audienceSegmentIds_ []string
17801	for _, v := range audienceSegmentIds {
17802		audienceSegmentIds_ = append(audienceSegmentIds_, fmt.Sprint(v))
17803	}
17804	c.urlParams_.SetMulti("audienceSegmentIds", audienceSegmentIds_)
17805	return c
17806}
17807
17808// CampaignIds sets the optional parameter "campaignIds": Select only
17809// ads with these campaign IDs.
17810func (c *AdsListCall) CampaignIds(campaignIds ...int64) *AdsListCall {
17811	var campaignIds_ []string
17812	for _, v := range campaignIds {
17813		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
17814	}
17815	c.urlParams_.SetMulti("campaignIds", campaignIds_)
17816	return c
17817}
17818
17819// Compatibility sets the optional parameter "compatibility": Select
17820// default ads with the specified compatibility. Applicable when type is
17821// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
17822// rendering either on desktop or on mobile devices for regular or
17823// interstitial ads, respectively. APP and APP_INTERSTITIAL are for
17824// rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an
17825// in-stream video ads developed with the VAST standard.
17826//
17827// Possible values:
17828//   "DISPLAY"
17829//   "DISPLAY_INTERSTITIAL"
17830//   "APP"
17831//   "APP_INTERSTITIAL"
17832//   "IN_STREAM_VIDEO"
17833//   "IN_STREAM_AUDIO"
17834func (c *AdsListCall) Compatibility(compatibility string) *AdsListCall {
17835	c.urlParams_.Set("compatibility", compatibility)
17836	return c
17837}
17838
17839// CreativeIds sets the optional parameter "creativeIds": Select only
17840// ads with these creative IDs assigned.
17841func (c *AdsListCall) CreativeIds(creativeIds ...int64) *AdsListCall {
17842	var creativeIds_ []string
17843	for _, v := range creativeIds {
17844		creativeIds_ = append(creativeIds_, fmt.Sprint(v))
17845	}
17846	c.urlParams_.SetMulti("creativeIds", creativeIds_)
17847	return c
17848}
17849
17850// CreativeOptimizationConfigurationIds sets the optional parameter
17851// "creativeOptimizationConfigurationIds": Select only ads with these
17852// creative optimization configuration IDs.
17853func (c *AdsListCall) CreativeOptimizationConfigurationIds(creativeOptimizationConfigurationIds ...int64) *AdsListCall {
17854	var creativeOptimizationConfigurationIds_ []string
17855	for _, v := range creativeOptimizationConfigurationIds {
17856		creativeOptimizationConfigurationIds_ = append(creativeOptimizationConfigurationIds_, fmt.Sprint(v))
17857	}
17858	c.urlParams_.SetMulti("creativeOptimizationConfigurationIds", creativeOptimizationConfigurationIds_)
17859	return c
17860}
17861
17862// DynamicClickTracker sets the optional parameter
17863// "dynamicClickTracker": Select only dynamic click trackers. Applicable
17864// when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click
17865// trackers. If false, select static click trackers. Leave unset to
17866// select both.
17867func (c *AdsListCall) DynamicClickTracker(dynamicClickTracker bool) *AdsListCall {
17868	c.urlParams_.Set("dynamicClickTracker", fmt.Sprint(dynamicClickTracker))
17869	return c
17870}
17871
17872// Ids sets the optional parameter "ids": Select only ads with these
17873// IDs.
17874func (c *AdsListCall) Ids(ids ...int64) *AdsListCall {
17875	var ids_ []string
17876	for _, v := range ids {
17877		ids_ = append(ids_, fmt.Sprint(v))
17878	}
17879	c.urlParams_.SetMulti("ids", ids_)
17880	return c
17881}
17882
17883// LandingPageIds sets the optional parameter "landingPageIds": Select
17884// only ads with these landing page IDs.
17885func (c *AdsListCall) LandingPageIds(landingPageIds ...int64) *AdsListCall {
17886	var landingPageIds_ []string
17887	for _, v := range landingPageIds {
17888		landingPageIds_ = append(landingPageIds_, fmt.Sprint(v))
17889	}
17890	c.urlParams_.SetMulti("landingPageIds", landingPageIds_)
17891	return c
17892}
17893
17894// MaxResults sets the optional parameter "maxResults": Maximum number
17895// of results to return.
17896func (c *AdsListCall) MaxResults(maxResults int64) *AdsListCall {
17897	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17898	return c
17899}
17900
17901// OverriddenEventTagId sets the optional parameter
17902// "overriddenEventTagId": Select only ads with this event tag override
17903// ID.
17904func (c *AdsListCall) OverriddenEventTagId(overriddenEventTagId int64) *AdsListCall {
17905	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
17906	return c
17907}
17908
17909// PageToken sets the optional parameter "pageToken": Value of the
17910// nextPageToken from the previous result page.
17911func (c *AdsListCall) PageToken(pageToken string) *AdsListCall {
17912	c.urlParams_.Set("pageToken", pageToken)
17913	return c
17914}
17915
17916// PlacementIds sets the optional parameter "placementIds": Select only
17917// ads with these placement IDs assigned.
17918func (c *AdsListCall) PlacementIds(placementIds ...int64) *AdsListCall {
17919	var placementIds_ []string
17920	for _, v := range placementIds {
17921		placementIds_ = append(placementIds_, fmt.Sprint(v))
17922	}
17923	c.urlParams_.SetMulti("placementIds", placementIds_)
17924	return c
17925}
17926
17927// RemarketingListIds sets the optional parameter "remarketingListIds":
17928// Select only ads whose list targeting expression use these remarketing
17929// list IDs.
17930func (c *AdsListCall) RemarketingListIds(remarketingListIds ...int64) *AdsListCall {
17931	var remarketingListIds_ []string
17932	for _, v := range remarketingListIds {
17933		remarketingListIds_ = append(remarketingListIds_, fmt.Sprint(v))
17934	}
17935	c.urlParams_.SetMulti("remarketingListIds", remarketingListIds_)
17936	return c
17937}
17938
17939// SearchString sets the optional parameter "searchString": Allows
17940// searching for objects by name or ID. Wildcards (*) are allowed. For
17941// example, "ad*2015" will return objects with names like "ad June
17942// 2015", "ad April 2015", or simply "ad 2015". Most of the searches
17943// also add wildcards implicitly at the start and the end of the search
17944// string. For example, a search string of "ad" will match objects with
17945// name "my ad", "ad 2015", or simply "ad".
17946func (c *AdsListCall) SearchString(searchString string) *AdsListCall {
17947	c.urlParams_.Set("searchString", searchString)
17948	return c
17949}
17950
17951// SizeIds sets the optional parameter "sizeIds": Select only ads with
17952// these size IDs.
17953func (c *AdsListCall) SizeIds(sizeIds ...int64) *AdsListCall {
17954	var sizeIds_ []string
17955	for _, v := range sizeIds {
17956		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
17957	}
17958	c.urlParams_.SetMulti("sizeIds", sizeIds_)
17959	return c
17960}
17961
17962// SortField sets the optional parameter "sortField": Field by which to
17963// sort the list.
17964//
17965// Possible values:
17966//   "ID" (default)
17967//   "NAME"
17968func (c *AdsListCall) SortField(sortField string) *AdsListCall {
17969	c.urlParams_.Set("sortField", sortField)
17970	return c
17971}
17972
17973// SortOrder sets the optional parameter "sortOrder": Order of sorted
17974// results.
17975//
17976// Possible values:
17977//   "ASCENDING" (default)
17978//   "DESCENDING"
17979func (c *AdsListCall) SortOrder(sortOrder string) *AdsListCall {
17980	c.urlParams_.Set("sortOrder", sortOrder)
17981	return c
17982}
17983
17984// SslCompliant sets the optional parameter "sslCompliant": Select only
17985// ads that are SSL-compliant.
17986func (c *AdsListCall) SslCompliant(sslCompliant bool) *AdsListCall {
17987	c.urlParams_.Set("sslCompliant", fmt.Sprint(sslCompliant))
17988	return c
17989}
17990
17991// SslRequired sets the optional parameter "sslRequired": Select only
17992// ads that require SSL.
17993func (c *AdsListCall) SslRequired(sslRequired bool) *AdsListCall {
17994	c.urlParams_.Set("sslRequired", fmt.Sprint(sslRequired))
17995	return c
17996}
17997
17998// Type sets the optional parameter "type": Select only ads with these
17999// types.
18000//
18001// Possible values:
18002//   "AD_SERVING_STANDARD_AD"
18003//   "AD_SERVING_DEFAULT_AD"
18004//   "AD_SERVING_CLICK_TRACKER"
18005//   "AD_SERVING_TRACKING"
18006//   "AD_SERVING_BRAND_SAFE_AD"
18007func (c *AdsListCall) Type(type_ ...string) *AdsListCall {
18008	c.urlParams_.SetMulti("type", append([]string{}, type_...))
18009	return c
18010}
18011
18012// Fields allows partial responses to be retrieved. See
18013// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18014// for more information.
18015func (c *AdsListCall) Fields(s ...googleapi.Field) *AdsListCall {
18016	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18017	return c
18018}
18019
18020// IfNoneMatch sets the optional parameter which makes the operation
18021// fail if the object's ETag matches the given value. This is useful for
18022// getting updates only after the object has changed since the last
18023// request. Use googleapi.IsNotModified to check whether the response
18024// error from Do is the result of In-None-Match.
18025func (c *AdsListCall) IfNoneMatch(entityTag string) *AdsListCall {
18026	c.ifNoneMatch_ = entityTag
18027	return c
18028}
18029
18030// Context sets the context to be used in this call's Do method. Any
18031// pending HTTP request will be aborted if the provided context is
18032// canceled.
18033func (c *AdsListCall) Context(ctx context.Context) *AdsListCall {
18034	c.ctx_ = ctx
18035	return c
18036}
18037
18038// Header returns an http.Header that can be modified by the caller to
18039// add HTTP headers to the request.
18040func (c *AdsListCall) Header() http.Header {
18041	if c.header_ == nil {
18042		c.header_ = make(http.Header)
18043	}
18044	return c.header_
18045}
18046
18047func (c *AdsListCall) doRequest(alt string) (*http.Response, error) {
18048	reqHeaders := make(http.Header)
18049	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
18050	for k, v := range c.header_ {
18051		reqHeaders[k] = v
18052	}
18053	reqHeaders.Set("User-Agent", c.s.userAgent())
18054	if c.ifNoneMatch_ != "" {
18055		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18056	}
18057	var body io.Reader = nil
18058	c.urlParams_.Set("alt", alt)
18059	c.urlParams_.Set("prettyPrint", "false")
18060	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
18061	urls += "?" + c.urlParams_.Encode()
18062	req, err := http.NewRequest("GET", urls, body)
18063	if err != nil {
18064		return nil, err
18065	}
18066	req.Header = reqHeaders
18067	googleapi.Expand(req.URL, map[string]string{
18068		"profileId": strconv.FormatInt(c.profileId, 10),
18069	})
18070	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18071}
18072
18073// Do executes the "dfareporting.ads.list" call.
18074// Exactly one of *AdsListResponse or error will be non-nil. Any non-2xx
18075// status code is an error. Response headers are in either
18076// *AdsListResponse.ServerResponse.Header or (if a response was returned
18077// at all) in error.(*googleapi.Error).Header. Use
18078// googleapi.IsNotModified to check whether the returned error was
18079// because http.StatusNotModified was returned.
18080func (c *AdsListCall) Do(opts ...googleapi.CallOption) (*AdsListResponse, error) {
18081	gensupport.SetOptions(c.urlParams_, opts...)
18082	res, err := c.doRequest("json")
18083	if res != nil && res.StatusCode == http.StatusNotModified {
18084		if res.Body != nil {
18085			res.Body.Close()
18086		}
18087		return nil, &googleapi.Error{
18088			Code:   res.StatusCode,
18089			Header: res.Header,
18090		}
18091	}
18092	if err != nil {
18093		return nil, err
18094	}
18095	defer googleapi.CloseBody(res)
18096	if err := googleapi.CheckResponse(res); err != nil {
18097		return nil, err
18098	}
18099	ret := &AdsListResponse{
18100		ServerResponse: googleapi.ServerResponse{
18101			Header:         res.Header,
18102			HTTPStatusCode: res.StatusCode,
18103		},
18104	}
18105	target := &ret
18106	if err := gensupport.DecodeResponse(target, res); err != nil {
18107		return nil, err
18108	}
18109	return ret, nil
18110	// {
18111	//   "description": "Retrieves a list of ads, possibly filtered. This method supports paging.",
18112	//   "flatPath": "userprofiles/{profileId}/ads",
18113	//   "httpMethod": "GET",
18114	//   "id": "dfareporting.ads.list",
18115	//   "parameterOrder": [
18116	//     "profileId"
18117	//   ],
18118	//   "parameters": {
18119	//     "active": {
18120	//       "description": "Select only active ads.",
18121	//       "location": "query",
18122	//       "type": "boolean"
18123	//     },
18124	//     "advertiserId": {
18125	//       "description": "Select only ads with this advertiser ID.",
18126	//       "format": "int64",
18127	//       "location": "query",
18128	//       "type": "string"
18129	//     },
18130	//     "archived": {
18131	//       "description": "Select only archived ads.",
18132	//       "location": "query",
18133	//       "type": "boolean"
18134	//     },
18135	//     "audienceSegmentIds": {
18136	//       "description": "Select only ads with these audience segment IDs.",
18137	//       "format": "int64",
18138	//       "location": "query",
18139	//       "repeated": true,
18140	//       "type": "string"
18141	//     },
18142	//     "campaignIds": {
18143	//       "description": "Select only ads with these campaign IDs.",
18144	//       "format": "int64",
18145	//       "location": "query",
18146	//       "repeated": true,
18147	//       "type": "string"
18148	//     },
18149	//     "compatibility": {
18150	//       "description": "Select default ads with the specified compatibility. Applicable when type is AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an in-stream video ads developed with the VAST standard.",
18151	//       "enum": [
18152	//         "DISPLAY",
18153	//         "DISPLAY_INTERSTITIAL",
18154	//         "APP",
18155	//         "APP_INTERSTITIAL",
18156	//         "IN_STREAM_VIDEO",
18157	//         "IN_STREAM_AUDIO"
18158	//       ],
18159	//       "enumDescriptions": [
18160	//         "",
18161	//         "",
18162	//         "",
18163	//         "",
18164	//         "",
18165	//         ""
18166	//       ],
18167	//       "location": "query",
18168	//       "type": "string"
18169	//     },
18170	//     "creativeIds": {
18171	//       "description": "Select only ads with these creative IDs assigned.",
18172	//       "format": "int64",
18173	//       "location": "query",
18174	//       "repeated": true,
18175	//       "type": "string"
18176	//     },
18177	//     "creativeOptimizationConfigurationIds": {
18178	//       "description": "Select only ads with these creative optimization configuration IDs.",
18179	//       "format": "int64",
18180	//       "location": "query",
18181	//       "repeated": true,
18182	//       "type": "string"
18183	//     },
18184	//     "dynamicClickTracker": {
18185	//       "description": "Select only dynamic click trackers. Applicable when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click trackers. If false, select static click trackers. Leave unset to select both.",
18186	//       "location": "query",
18187	//       "type": "boolean"
18188	//     },
18189	//     "ids": {
18190	//       "description": "Select only ads with these IDs.",
18191	//       "format": "int64",
18192	//       "location": "query",
18193	//       "repeated": true,
18194	//       "type": "string"
18195	//     },
18196	//     "landingPageIds": {
18197	//       "description": "Select only ads with these landing page IDs.",
18198	//       "format": "int64",
18199	//       "location": "query",
18200	//       "repeated": true,
18201	//       "type": "string"
18202	//     },
18203	//     "maxResults": {
18204	//       "default": "1000",
18205	//       "description": "Maximum number of results to return.",
18206	//       "format": "int32",
18207	//       "location": "query",
18208	//       "maximum": "1000",
18209	//       "minimum": "0",
18210	//       "type": "integer"
18211	//     },
18212	//     "overriddenEventTagId": {
18213	//       "description": "Select only ads with this event tag override ID.",
18214	//       "format": "int64",
18215	//       "location": "query",
18216	//       "type": "string"
18217	//     },
18218	//     "pageToken": {
18219	//       "description": "Value of the nextPageToken from the previous result page.",
18220	//       "location": "query",
18221	//       "type": "string"
18222	//     },
18223	//     "placementIds": {
18224	//       "description": "Select only ads with these placement IDs assigned.",
18225	//       "format": "int64",
18226	//       "location": "query",
18227	//       "repeated": true,
18228	//       "type": "string"
18229	//     },
18230	//     "profileId": {
18231	//       "description": "User profile ID associated with this request.",
18232	//       "format": "int64",
18233	//       "location": "path",
18234	//       "required": true,
18235	//       "type": "string"
18236	//     },
18237	//     "remarketingListIds": {
18238	//       "description": "Select only ads whose list targeting expression use these remarketing list IDs.",
18239	//       "format": "int64",
18240	//       "location": "query",
18241	//       "repeated": true,
18242	//       "type": "string"
18243	//     },
18244	//     "searchString": {
18245	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"ad*2015\" will return objects with names like \"ad June 2015\", \"ad April 2015\", or simply \"ad 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"ad\" will match objects with name \"my ad\", \"ad 2015\", or simply \"ad\".",
18246	//       "location": "query",
18247	//       "type": "string"
18248	//     },
18249	//     "sizeIds": {
18250	//       "description": "Select only ads with these size IDs.",
18251	//       "format": "int64",
18252	//       "location": "query",
18253	//       "repeated": true,
18254	//       "type": "string"
18255	//     },
18256	//     "sortField": {
18257	//       "default": "ID",
18258	//       "description": "Field by which to sort the list.",
18259	//       "enum": [
18260	//         "ID",
18261	//         "NAME"
18262	//       ],
18263	//       "enumDescriptions": [
18264	//         "",
18265	//         ""
18266	//       ],
18267	//       "location": "query",
18268	//       "type": "string"
18269	//     },
18270	//     "sortOrder": {
18271	//       "default": "ASCENDING",
18272	//       "description": "Order of sorted results.",
18273	//       "enum": [
18274	//         "ASCENDING",
18275	//         "DESCENDING"
18276	//       ],
18277	//       "enumDescriptions": [
18278	//         "",
18279	//         ""
18280	//       ],
18281	//       "location": "query",
18282	//       "type": "string"
18283	//     },
18284	//     "sslCompliant": {
18285	//       "description": "Select only ads that are SSL-compliant.",
18286	//       "location": "query",
18287	//       "type": "boolean"
18288	//     },
18289	//     "sslRequired": {
18290	//       "description": "Select only ads that require SSL.",
18291	//       "location": "query",
18292	//       "type": "boolean"
18293	//     },
18294	//     "type": {
18295	//       "description": "Select only ads with these types.",
18296	//       "enum": [
18297	//         "AD_SERVING_STANDARD_AD",
18298	//         "AD_SERVING_DEFAULT_AD",
18299	//         "AD_SERVING_CLICK_TRACKER",
18300	//         "AD_SERVING_TRACKING",
18301	//         "AD_SERVING_BRAND_SAFE_AD"
18302	//       ],
18303	//       "enumDescriptions": [
18304	//         "",
18305	//         "",
18306	//         "",
18307	//         "",
18308	//         ""
18309	//       ],
18310	//       "location": "query",
18311	//       "repeated": true,
18312	//       "type": "string"
18313	//     }
18314	//   },
18315	//   "path": "userprofiles/{profileId}/ads",
18316	//   "response": {
18317	//     "$ref": "AdsListResponse"
18318	//   },
18319	//   "scopes": [
18320	//     "https://www.googleapis.com/auth/dfatrafficking"
18321	//   ]
18322	// }
18323
18324}
18325
18326// Pages invokes f for each page of results.
18327// A non-nil error returned from f will halt the iteration.
18328// The provided context supersedes any context provided to the Context method.
18329func (c *AdsListCall) Pages(ctx context.Context, f func(*AdsListResponse) error) error {
18330	c.ctx_ = ctx
18331	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18332	for {
18333		x, err := c.Do()
18334		if err != nil {
18335			return err
18336		}
18337		if err := f(x); err != nil {
18338			return err
18339		}
18340		if x.NextPageToken == "" {
18341			return nil
18342		}
18343		c.PageToken(x.NextPageToken)
18344	}
18345}
18346
18347// method id "dfareporting.ads.patch":
18348
18349type AdsPatchCall struct {
18350	s          *Service
18351	profileId  int64
18352	ad         *Ad
18353	urlParams_ gensupport.URLParams
18354	ctx_       context.Context
18355	header_    http.Header
18356}
18357
18358// Patch: Updates an existing ad. This method supports patch semantics.
18359//
18360// - id: Ad ID.
18361// - profileId: User profile ID associated with this request.
18362func (r *AdsService) Patch(profileId int64, id int64, ad *Ad) *AdsPatchCall {
18363	c := &AdsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18364	c.profileId = profileId
18365	c.urlParams_.Set("id", fmt.Sprint(id))
18366	c.ad = ad
18367	return c
18368}
18369
18370// Fields allows partial responses to be retrieved. See
18371// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18372// for more information.
18373func (c *AdsPatchCall) Fields(s ...googleapi.Field) *AdsPatchCall {
18374	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18375	return c
18376}
18377
18378// Context sets the context to be used in this call's Do method. Any
18379// pending HTTP request will be aborted if the provided context is
18380// canceled.
18381func (c *AdsPatchCall) Context(ctx context.Context) *AdsPatchCall {
18382	c.ctx_ = ctx
18383	return c
18384}
18385
18386// Header returns an http.Header that can be modified by the caller to
18387// add HTTP headers to the request.
18388func (c *AdsPatchCall) Header() http.Header {
18389	if c.header_ == nil {
18390		c.header_ = make(http.Header)
18391	}
18392	return c.header_
18393}
18394
18395func (c *AdsPatchCall) doRequest(alt string) (*http.Response, error) {
18396	reqHeaders := make(http.Header)
18397	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
18398	for k, v := range c.header_ {
18399		reqHeaders[k] = v
18400	}
18401	reqHeaders.Set("User-Agent", c.s.userAgent())
18402	var body io.Reader = nil
18403	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
18404	if err != nil {
18405		return nil, err
18406	}
18407	reqHeaders.Set("Content-Type", "application/json")
18408	c.urlParams_.Set("alt", alt)
18409	c.urlParams_.Set("prettyPrint", "false")
18410	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
18411	urls += "?" + c.urlParams_.Encode()
18412	req, err := http.NewRequest("PATCH", urls, body)
18413	if err != nil {
18414		return nil, err
18415	}
18416	req.Header = reqHeaders
18417	googleapi.Expand(req.URL, map[string]string{
18418		"profileId": strconv.FormatInt(c.profileId, 10),
18419	})
18420	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18421}
18422
18423// Do executes the "dfareporting.ads.patch" call.
18424// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
18425// is an error. Response headers are in either *Ad.ServerResponse.Header
18426// or (if a response was returned at all) in
18427// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18428// whether the returned error was because http.StatusNotModified was
18429// returned.
18430func (c *AdsPatchCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
18431	gensupport.SetOptions(c.urlParams_, opts...)
18432	res, err := c.doRequest("json")
18433	if res != nil && res.StatusCode == http.StatusNotModified {
18434		if res.Body != nil {
18435			res.Body.Close()
18436		}
18437		return nil, &googleapi.Error{
18438			Code:   res.StatusCode,
18439			Header: res.Header,
18440		}
18441	}
18442	if err != nil {
18443		return nil, err
18444	}
18445	defer googleapi.CloseBody(res)
18446	if err := googleapi.CheckResponse(res); err != nil {
18447		return nil, err
18448	}
18449	ret := &Ad{
18450		ServerResponse: googleapi.ServerResponse{
18451			Header:         res.Header,
18452			HTTPStatusCode: res.StatusCode,
18453		},
18454	}
18455	target := &ret
18456	if err := gensupport.DecodeResponse(target, res); err != nil {
18457		return nil, err
18458	}
18459	return ret, nil
18460	// {
18461	//   "description": "Updates an existing ad. This method supports patch semantics.",
18462	//   "flatPath": "userprofiles/{profileId}/ads",
18463	//   "httpMethod": "PATCH",
18464	//   "id": "dfareporting.ads.patch",
18465	//   "parameterOrder": [
18466	//     "profileId",
18467	//     "id"
18468	//   ],
18469	//   "parameters": {
18470	//     "id": {
18471	//       "description": "Ad ID.",
18472	//       "format": "int64",
18473	//       "location": "query",
18474	//       "required": true,
18475	//       "type": "string"
18476	//     },
18477	//     "profileId": {
18478	//       "description": "User profile ID associated with this request.",
18479	//       "format": "int64",
18480	//       "location": "path",
18481	//       "required": true,
18482	//       "type": "string"
18483	//     }
18484	//   },
18485	//   "path": "userprofiles/{profileId}/ads",
18486	//   "request": {
18487	//     "$ref": "Ad"
18488	//   },
18489	//   "response": {
18490	//     "$ref": "Ad"
18491	//   },
18492	//   "scopes": [
18493	//     "https://www.googleapis.com/auth/dfatrafficking"
18494	//   ]
18495	// }
18496
18497}
18498
18499// method id "dfareporting.ads.update":
18500
18501type AdsUpdateCall struct {
18502	s          *Service
18503	profileId  int64
18504	ad         *Ad
18505	urlParams_ gensupport.URLParams
18506	ctx_       context.Context
18507	header_    http.Header
18508}
18509
18510// Update: Updates an existing ad.
18511//
18512// - profileId: User profile ID associated with this request.
18513func (r *AdsService) Update(profileId int64, ad *Ad) *AdsUpdateCall {
18514	c := &AdsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18515	c.profileId = profileId
18516	c.ad = ad
18517	return c
18518}
18519
18520// Fields allows partial responses to be retrieved. See
18521// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18522// for more information.
18523func (c *AdsUpdateCall) Fields(s ...googleapi.Field) *AdsUpdateCall {
18524	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18525	return c
18526}
18527
18528// Context sets the context to be used in this call's Do method. Any
18529// pending HTTP request will be aborted if the provided context is
18530// canceled.
18531func (c *AdsUpdateCall) Context(ctx context.Context) *AdsUpdateCall {
18532	c.ctx_ = ctx
18533	return c
18534}
18535
18536// Header returns an http.Header that can be modified by the caller to
18537// add HTTP headers to the request.
18538func (c *AdsUpdateCall) Header() http.Header {
18539	if c.header_ == nil {
18540		c.header_ = make(http.Header)
18541	}
18542	return c.header_
18543}
18544
18545func (c *AdsUpdateCall) doRequest(alt string) (*http.Response, error) {
18546	reqHeaders := make(http.Header)
18547	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
18548	for k, v := range c.header_ {
18549		reqHeaders[k] = v
18550	}
18551	reqHeaders.Set("User-Agent", c.s.userAgent())
18552	var body io.Reader = nil
18553	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
18554	if err != nil {
18555		return nil, err
18556	}
18557	reqHeaders.Set("Content-Type", "application/json")
18558	c.urlParams_.Set("alt", alt)
18559	c.urlParams_.Set("prettyPrint", "false")
18560	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
18561	urls += "?" + c.urlParams_.Encode()
18562	req, err := http.NewRequest("PUT", urls, body)
18563	if err != nil {
18564		return nil, err
18565	}
18566	req.Header = reqHeaders
18567	googleapi.Expand(req.URL, map[string]string{
18568		"profileId": strconv.FormatInt(c.profileId, 10),
18569	})
18570	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18571}
18572
18573// Do executes the "dfareporting.ads.update" call.
18574// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
18575// is an error. Response headers are in either *Ad.ServerResponse.Header
18576// or (if a response was returned at all) in
18577// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18578// whether the returned error was because http.StatusNotModified was
18579// returned.
18580func (c *AdsUpdateCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
18581	gensupport.SetOptions(c.urlParams_, opts...)
18582	res, err := c.doRequest("json")
18583	if res != nil && res.StatusCode == http.StatusNotModified {
18584		if res.Body != nil {
18585			res.Body.Close()
18586		}
18587		return nil, &googleapi.Error{
18588			Code:   res.StatusCode,
18589			Header: res.Header,
18590		}
18591	}
18592	if err != nil {
18593		return nil, err
18594	}
18595	defer googleapi.CloseBody(res)
18596	if err := googleapi.CheckResponse(res); err != nil {
18597		return nil, err
18598	}
18599	ret := &Ad{
18600		ServerResponse: googleapi.ServerResponse{
18601			Header:         res.Header,
18602			HTTPStatusCode: res.StatusCode,
18603		},
18604	}
18605	target := &ret
18606	if err := gensupport.DecodeResponse(target, res); err != nil {
18607		return nil, err
18608	}
18609	return ret, nil
18610	// {
18611	//   "description": "Updates an existing ad.",
18612	//   "flatPath": "userprofiles/{profileId}/ads",
18613	//   "httpMethod": "PUT",
18614	//   "id": "dfareporting.ads.update",
18615	//   "parameterOrder": [
18616	//     "profileId"
18617	//   ],
18618	//   "parameters": {
18619	//     "profileId": {
18620	//       "description": "User profile ID associated with this request.",
18621	//       "format": "int64",
18622	//       "location": "path",
18623	//       "required": true,
18624	//       "type": "string"
18625	//     }
18626	//   },
18627	//   "path": "userprofiles/{profileId}/ads",
18628	//   "request": {
18629	//     "$ref": "Ad"
18630	//   },
18631	//   "response": {
18632	//     "$ref": "Ad"
18633	//   },
18634	//   "scopes": [
18635	//     "https://www.googleapis.com/auth/dfatrafficking"
18636	//   ]
18637	// }
18638
18639}
18640
18641// method id "dfareporting.advertiserGroups.delete":
18642
18643type AdvertiserGroupsDeleteCall struct {
18644	s          *Service
18645	profileId  int64
18646	id         int64
18647	urlParams_ gensupport.URLParams
18648	ctx_       context.Context
18649	header_    http.Header
18650}
18651
18652// Delete: Deletes an existing advertiser group.
18653//
18654// - id: Advertiser group ID.
18655// - profileId: User profile ID associated with this request.
18656func (r *AdvertiserGroupsService) Delete(profileId int64, id int64) *AdvertiserGroupsDeleteCall {
18657	c := &AdvertiserGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18658	c.profileId = profileId
18659	c.id = id
18660	return c
18661}
18662
18663// Fields allows partial responses to be retrieved. See
18664// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18665// for more information.
18666func (c *AdvertiserGroupsDeleteCall) Fields(s ...googleapi.Field) *AdvertiserGroupsDeleteCall {
18667	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18668	return c
18669}
18670
18671// Context sets the context to be used in this call's Do method. Any
18672// pending HTTP request will be aborted if the provided context is
18673// canceled.
18674func (c *AdvertiserGroupsDeleteCall) Context(ctx context.Context) *AdvertiserGroupsDeleteCall {
18675	c.ctx_ = ctx
18676	return c
18677}
18678
18679// Header returns an http.Header that can be modified by the caller to
18680// add HTTP headers to the request.
18681func (c *AdvertiserGroupsDeleteCall) Header() http.Header {
18682	if c.header_ == nil {
18683		c.header_ = make(http.Header)
18684	}
18685	return c.header_
18686}
18687
18688func (c *AdvertiserGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
18689	reqHeaders := make(http.Header)
18690	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
18691	for k, v := range c.header_ {
18692		reqHeaders[k] = v
18693	}
18694	reqHeaders.Set("User-Agent", c.s.userAgent())
18695	var body io.Reader = nil
18696	c.urlParams_.Set("alt", alt)
18697	c.urlParams_.Set("prettyPrint", "false")
18698	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
18699	urls += "?" + c.urlParams_.Encode()
18700	req, err := http.NewRequest("DELETE", urls, body)
18701	if err != nil {
18702		return nil, err
18703	}
18704	req.Header = reqHeaders
18705	googleapi.Expand(req.URL, map[string]string{
18706		"profileId": strconv.FormatInt(c.profileId, 10),
18707		"id":        strconv.FormatInt(c.id, 10),
18708	})
18709	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18710}
18711
18712// Do executes the "dfareporting.advertiserGroups.delete" call.
18713func (c *AdvertiserGroupsDeleteCall) Do(opts ...googleapi.CallOption) error {
18714	gensupport.SetOptions(c.urlParams_, opts...)
18715	res, err := c.doRequest("json")
18716	if err != nil {
18717		return err
18718	}
18719	defer googleapi.CloseBody(res)
18720	if err := googleapi.CheckResponse(res); err != nil {
18721		return err
18722	}
18723	return nil
18724	// {
18725	//   "description": "Deletes an existing advertiser group.",
18726	//   "flatPath": "userprofiles/{profileId}/advertiserGroups/{id}",
18727	//   "httpMethod": "DELETE",
18728	//   "id": "dfareporting.advertiserGroups.delete",
18729	//   "parameterOrder": [
18730	//     "profileId",
18731	//     "id"
18732	//   ],
18733	//   "parameters": {
18734	//     "id": {
18735	//       "description": "Advertiser group ID.",
18736	//       "format": "int64",
18737	//       "location": "path",
18738	//       "required": true,
18739	//       "type": "string"
18740	//     },
18741	//     "profileId": {
18742	//       "description": "User profile ID associated with this request.",
18743	//       "format": "int64",
18744	//       "location": "path",
18745	//       "required": true,
18746	//       "type": "string"
18747	//     }
18748	//   },
18749	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
18750	//   "scopes": [
18751	//     "https://www.googleapis.com/auth/dfatrafficking"
18752	//   ]
18753	// }
18754
18755}
18756
18757// method id "dfareporting.advertiserGroups.get":
18758
18759type AdvertiserGroupsGetCall struct {
18760	s            *Service
18761	profileId    int64
18762	id           int64
18763	urlParams_   gensupport.URLParams
18764	ifNoneMatch_ string
18765	ctx_         context.Context
18766	header_      http.Header
18767}
18768
18769// Get: Gets one advertiser group by ID.
18770//
18771// - id: Advertiser group ID.
18772// - profileId: User profile ID associated with this request.
18773func (r *AdvertiserGroupsService) Get(profileId int64, id int64) *AdvertiserGroupsGetCall {
18774	c := &AdvertiserGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18775	c.profileId = profileId
18776	c.id = id
18777	return c
18778}
18779
18780// Fields allows partial responses to be retrieved. See
18781// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18782// for more information.
18783func (c *AdvertiserGroupsGetCall) Fields(s ...googleapi.Field) *AdvertiserGroupsGetCall {
18784	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18785	return c
18786}
18787
18788// IfNoneMatch sets the optional parameter which makes the operation
18789// fail if the object's ETag matches the given value. This is useful for
18790// getting updates only after the object has changed since the last
18791// request. Use googleapi.IsNotModified to check whether the response
18792// error from Do is the result of In-None-Match.
18793func (c *AdvertiserGroupsGetCall) IfNoneMatch(entityTag string) *AdvertiserGroupsGetCall {
18794	c.ifNoneMatch_ = entityTag
18795	return c
18796}
18797
18798// Context sets the context to be used in this call's Do method. Any
18799// pending HTTP request will be aborted if the provided context is
18800// canceled.
18801func (c *AdvertiserGroupsGetCall) Context(ctx context.Context) *AdvertiserGroupsGetCall {
18802	c.ctx_ = ctx
18803	return c
18804}
18805
18806// Header returns an http.Header that can be modified by the caller to
18807// add HTTP headers to the request.
18808func (c *AdvertiserGroupsGetCall) Header() http.Header {
18809	if c.header_ == nil {
18810		c.header_ = make(http.Header)
18811	}
18812	return c.header_
18813}
18814
18815func (c *AdvertiserGroupsGetCall) doRequest(alt string) (*http.Response, error) {
18816	reqHeaders := make(http.Header)
18817	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
18818	for k, v := range c.header_ {
18819		reqHeaders[k] = v
18820	}
18821	reqHeaders.Set("User-Agent", c.s.userAgent())
18822	if c.ifNoneMatch_ != "" {
18823		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18824	}
18825	var body io.Reader = nil
18826	c.urlParams_.Set("alt", alt)
18827	c.urlParams_.Set("prettyPrint", "false")
18828	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
18829	urls += "?" + c.urlParams_.Encode()
18830	req, err := http.NewRequest("GET", urls, body)
18831	if err != nil {
18832		return nil, err
18833	}
18834	req.Header = reqHeaders
18835	googleapi.Expand(req.URL, map[string]string{
18836		"profileId": strconv.FormatInt(c.profileId, 10),
18837		"id":        strconv.FormatInt(c.id, 10),
18838	})
18839	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18840}
18841
18842// Do executes the "dfareporting.advertiserGroups.get" call.
18843// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18844// status code is an error. Response headers are in either
18845// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18846// at all) in error.(*googleapi.Error).Header. Use
18847// googleapi.IsNotModified to check whether the returned error was
18848// because http.StatusNotModified was returned.
18849func (c *AdvertiserGroupsGetCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18850	gensupport.SetOptions(c.urlParams_, opts...)
18851	res, err := c.doRequest("json")
18852	if res != nil && res.StatusCode == http.StatusNotModified {
18853		if res.Body != nil {
18854			res.Body.Close()
18855		}
18856		return nil, &googleapi.Error{
18857			Code:   res.StatusCode,
18858			Header: res.Header,
18859		}
18860	}
18861	if err != nil {
18862		return nil, err
18863	}
18864	defer googleapi.CloseBody(res)
18865	if err := googleapi.CheckResponse(res); err != nil {
18866		return nil, err
18867	}
18868	ret := &AdvertiserGroup{
18869		ServerResponse: googleapi.ServerResponse{
18870			Header:         res.Header,
18871			HTTPStatusCode: res.StatusCode,
18872		},
18873	}
18874	target := &ret
18875	if err := gensupport.DecodeResponse(target, res); err != nil {
18876		return nil, err
18877	}
18878	return ret, nil
18879	// {
18880	//   "description": "Gets one advertiser group by ID.",
18881	//   "flatPath": "userprofiles/{profileId}/advertiserGroups/{id}",
18882	//   "httpMethod": "GET",
18883	//   "id": "dfareporting.advertiserGroups.get",
18884	//   "parameterOrder": [
18885	//     "profileId",
18886	//     "id"
18887	//   ],
18888	//   "parameters": {
18889	//     "id": {
18890	//       "description": "Advertiser group ID.",
18891	//       "format": "int64",
18892	//       "location": "path",
18893	//       "required": true,
18894	//       "type": "string"
18895	//     },
18896	//     "profileId": {
18897	//       "description": "User profile ID associated with this request.",
18898	//       "format": "int64",
18899	//       "location": "path",
18900	//       "required": true,
18901	//       "type": "string"
18902	//     }
18903	//   },
18904	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
18905	//   "response": {
18906	//     "$ref": "AdvertiserGroup"
18907	//   },
18908	//   "scopes": [
18909	//     "https://www.googleapis.com/auth/dfatrafficking"
18910	//   ]
18911	// }
18912
18913}
18914
18915// method id "dfareporting.advertiserGroups.insert":
18916
18917type AdvertiserGroupsInsertCall struct {
18918	s               *Service
18919	profileId       int64
18920	advertisergroup *AdvertiserGroup
18921	urlParams_      gensupport.URLParams
18922	ctx_            context.Context
18923	header_         http.Header
18924}
18925
18926// Insert: Inserts a new advertiser group.
18927//
18928// - profileId: User profile ID associated with this request.
18929func (r *AdvertiserGroupsService) Insert(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsInsertCall {
18930	c := &AdvertiserGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18931	c.profileId = profileId
18932	c.advertisergroup = advertisergroup
18933	return c
18934}
18935
18936// Fields allows partial responses to be retrieved. See
18937// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18938// for more information.
18939func (c *AdvertiserGroupsInsertCall) Fields(s ...googleapi.Field) *AdvertiserGroupsInsertCall {
18940	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18941	return c
18942}
18943
18944// Context sets the context to be used in this call's Do method. Any
18945// pending HTTP request will be aborted if the provided context is
18946// canceled.
18947func (c *AdvertiserGroupsInsertCall) Context(ctx context.Context) *AdvertiserGroupsInsertCall {
18948	c.ctx_ = ctx
18949	return c
18950}
18951
18952// Header returns an http.Header that can be modified by the caller to
18953// add HTTP headers to the request.
18954func (c *AdvertiserGroupsInsertCall) Header() http.Header {
18955	if c.header_ == nil {
18956		c.header_ = make(http.Header)
18957	}
18958	return c.header_
18959}
18960
18961func (c *AdvertiserGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
18962	reqHeaders := make(http.Header)
18963	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
18964	for k, v := range c.header_ {
18965		reqHeaders[k] = v
18966	}
18967	reqHeaders.Set("User-Agent", c.s.userAgent())
18968	var body io.Reader = nil
18969	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18970	if err != nil {
18971		return nil, err
18972	}
18973	reqHeaders.Set("Content-Type", "application/json")
18974	c.urlParams_.Set("alt", alt)
18975	c.urlParams_.Set("prettyPrint", "false")
18976	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18977	urls += "?" + c.urlParams_.Encode()
18978	req, err := http.NewRequest("POST", urls, body)
18979	if err != nil {
18980		return nil, err
18981	}
18982	req.Header = reqHeaders
18983	googleapi.Expand(req.URL, map[string]string{
18984		"profileId": strconv.FormatInt(c.profileId, 10),
18985	})
18986	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18987}
18988
18989// Do executes the "dfareporting.advertiserGroups.insert" call.
18990// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18991// status code is an error. Response headers are in either
18992// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18993// at all) in error.(*googleapi.Error).Header. Use
18994// googleapi.IsNotModified to check whether the returned error was
18995// because http.StatusNotModified was returned.
18996func (c *AdvertiserGroupsInsertCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18997	gensupport.SetOptions(c.urlParams_, opts...)
18998	res, err := c.doRequest("json")
18999	if res != nil && res.StatusCode == http.StatusNotModified {
19000		if res.Body != nil {
19001			res.Body.Close()
19002		}
19003		return nil, &googleapi.Error{
19004			Code:   res.StatusCode,
19005			Header: res.Header,
19006		}
19007	}
19008	if err != nil {
19009		return nil, err
19010	}
19011	defer googleapi.CloseBody(res)
19012	if err := googleapi.CheckResponse(res); err != nil {
19013		return nil, err
19014	}
19015	ret := &AdvertiserGroup{
19016		ServerResponse: googleapi.ServerResponse{
19017			Header:         res.Header,
19018			HTTPStatusCode: res.StatusCode,
19019		},
19020	}
19021	target := &ret
19022	if err := gensupport.DecodeResponse(target, res); err != nil {
19023		return nil, err
19024	}
19025	return ret, nil
19026	// {
19027	//   "description": "Inserts a new advertiser group.",
19028	//   "flatPath": "userprofiles/{profileId}/advertiserGroups",
19029	//   "httpMethod": "POST",
19030	//   "id": "dfareporting.advertiserGroups.insert",
19031	//   "parameterOrder": [
19032	//     "profileId"
19033	//   ],
19034	//   "parameters": {
19035	//     "profileId": {
19036	//       "description": "User profile ID associated with this request.",
19037	//       "format": "int64",
19038	//       "location": "path",
19039	//       "required": true,
19040	//       "type": "string"
19041	//     }
19042	//   },
19043	//   "path": "userprofiles/{profileId}/advertiserGroups",
19044	//   "request": {
19045	//     "$ref": "AdvertiserGroup"
19046	//   },
19047	//   "response": {
19048	//     "$ref": "AdvertiserGroup"
19049	//   },
19050	//   "scopes": [
19051	//     "https://www.googleapis.com/auth/dfatrafficking"
19052	//   ]
19053	// }
19054
19055}
19056
19057// method id "dfareporting.advertiserGroups.list":
19058
19059type AdvertiserGroupsListCall struct {
19060	s            *Service
19061	profileId    int64
19062	urlParams_   gensupport.URLParams
19063	ifNoneMatch_ string
19064	ctx_         context.Context
19065	header_      http.Header
19066}
19067
19068// List: Retrieves a list of advertiser groups, possibly filtered. This
19069// method supports paging.
19070//
19071// - profileId: User profile ID associated with this request.
19072func (r *AdvertiserGroupsService) List(profileId int64) *AdvertiserGroupsListCall {
19073	c := &AdvertiserGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19074	c.profileId = profileId
19075	return c
19076}
19077
19078// Ids sets the optional parameter "ids": Select only advertiser groups
19079// with these IDs.
19080func (c *AdvertiserGroupsListCall) Ids(ids ...int64) *AdvertiserGroupsListCall {
19081	var ids_ []string
19082	for _, v := range ids {
19083		ids_ = append(ids_, fmt.Sprint(v))
19084	}
19085	c.urlParams_.SetMulti("ids", ids_)
19086	return c
19087}
19088
19089// MaxResults sets the optional parameter "maxResults": Maximum number
19090// of results to return.
19091func (c *AdvertiserGroupsListCall) MaxResults(maxResults int64) *AdvertiserGroupsListCall {
19092	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19093	return c
19094}
19095
19096// PageToken sets the optional parameter "pageToken": Value of the
19097// nextPageToken from the previous result page.
19098func (c *AdvertiserGroupsListCall) PageToken(pageToken string) *AdvertiserGroupsListCall {
19099	c.urlParams_.Set("pageToken", pageToken)
19100	return c
19101}
19102
19103// SearchString sets the optional parameter "searchString": Allows
19104// searching for objects by name or ID. Wildcards (*) are allowed. For
19105// example, "advertiser*2015" will return objects with names like
19106// "advertiser group June 2015", "advertiser group April 2015", or
19107// simply "advertiser group 2015". Most of the searches also add
19108// wildcards implicitly at the start and the end of the search string.
19109// For example, a search string of "advertisergroup" will match objects
19110// with name "my advertisergroup", "advertisergroup 2015", or simply
19111// "advertisergroup".
19112func (c *AdvertiserGroupsListCall) SearchString(searchString string) *AdvertiserGroupsListCall {
19113	c.urlParams_.Set("searchString", searchString)
19114	return c
19115}
19116
19117// SortField sets the optional parameter "sortField": Field by which to
19118// sort the list.
19119//
19120// Possible values:
19121//   "ID" (default)
19122//   "NAME"
19123func (c *AdvertiserGroupsListCall) SortField(sortField string) *AdvertiserGroupsListCall {
19124	c.urlParams_.Set("sortField", sortField)
19125	return c
19126}
19127
19128// SortOrder sets the optional parameter "sortOrder": Order of sorted
19129// results.
19130//
19131// Possible values:
19132//   "ASCENDING" (default)
19133//   "DESCENDING"
19134func (c *AdvertiserGroupsListCall) SortOrder(sortOrder string) *AdvertiserGroupsListCall {
19135	c.urlParams_.Set("sortOrder", sortOrder)
19136	return c
19137}
19138
19139// Fields allows partial responses to be retrieved. See
19140// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19141// for more information.
19142func (c *AdvertiserGroupsListCall) Fields(s ...googleapi.Field) *AdvertiserGroupsListCall {
19143	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19144	return c
19145}
19146
19147// IfNoneMatch sets the optional parameter which makes the operation
19148// fail if the object's ETag matches the given value. This is useful for
19149// getting updates only after the object has changed since the last
19150// request. Use googleapi.IsNotModified to check whether the response
19151// error from Do is the result of In-None-Match.
19152func (c *AdvertiserGroupsListCall) IfNoneMatch(entityTag string) *AdvertiserGroupsListCall {
19153	c.ifNoneMatch_ = entityTag
19154	return c
19155}
19156
19157// Context sets the context to be used in this call's Do method. Any
19158// pending HTTP request will be aborted if the provided context is
19159// canceled.
19160func (c *AdvertiserGroupsListCall) Context(ctx context.Context) *AdvertiserGroupsListCall {
19161	c.ctx_ = ctx
19162	return c
19163}
19164
19165// Header returns an http.Header that can be modified by the caller to
19166// add HTTP headers to the request.
19167func (c *AdvertiserGroupsListCall) Header() http.Header {
19168	if c.header_ == nil {
19169		c.header_ = make(http.Header)
19170	}
19171	return c.header_
19172}
19173
19174func (c *AdvertiserGroupsListCall) doRequest(alt string) (*http.Response, error) {
19175	reqHeaders := make(http.Header)
19176	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
19177	for k, v := range c.header_ {
19178		reqHeaders[k] = v
19179	}
19180	reqHeaders.Set("User-Agent", c.s.userAgent())
19181	if c.ifNoneMatch_ != "" {
19182		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19183	}
19184	var body io.Reader = nil
19185	c.urlParams_.Set("alt", alt)
19186	c.urlParams_.Set("prettyPrint", "false")
19187	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
19188	urls += "?" + c.urlParams_.Encode()
19189	req, err := http.NewRequest("GET", urls, body)
19190	if err != nil {
19191		return nil, err
19192	}
19193	req.Header = reqHeaders
19194	googleapi.Expand(req.URL, map[string]string{
19195		"profileId": strconv.FormatInt(c.profileId, 10),
19196	})
19197	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19198}
19199
19200// Do executes the "dfareporting.advertiserGroups.list" call.
19201// Exactly one of *AdvertiserGroupsListResponse or error will be
19202// non-nil. Any non-2xx status code is an error. Response headers are in
19203// either *AdvertiserGroupsListResponse.ServerResponse.Header or (if a
19204// response was returned at all) in error.(*googleapi.Error).Header. Use
19205// googleapi.IsNotModified to check whether the returned error was
19206// because http.StatusNotModified was returned.
19207func (c *AdvertiserGroupsListCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroupsListResponse, error) {
19208	gensupport.SetOptions(c.urlParams_, opts...)
19209	res, err := c.doRequest("json")
19210	if res != nil && res.StatusCode == http.StatusNotModified {
19211		if res.Body != nil {
19212			res.Body.Close()
19213		}
19214		return nil, &googleapi.Error{
19215			Code:   res.StatusCode,
19216			Header: res.Header,
19217		}
19218	}
19219	if err != nil {
19220		return nil, err
19221	}
19222	defer googleapi.CloseBody(res)
19223	if err := googleapi.CheckResponse(res); err != nil {
19224		return nil, err
19225	}
19226	ret := &AdvertiserGroupsListResponse{
19227		ServerResponse: googleapi.ServerResponse{
19228			Header:         res.Header,
19229			HTTPStatusCode: res.StatusCode,
19230		},
19231	}
19232	target := &ret
19233	if err := gensupport.DecodeResponse(target, res); err != nil {
19234		return nil, err
19235	}
19236	return ret, nil
19237	// {
19238	//   "description": "Retrieves a list of advertiser groups, possibly filtered. This method supports paging.",
19239	//   "flatPath": "userprofiles/{profileId}/advertiserGroups",
19240	//   "httpMethod": "GET",
19241	//   "id": "dfareporting.advertiserGroups.list",
19242	//   "parameterOrder": [
19243	//     "profileId"
19244	//   ],
19245	//   "parameters": {
19246	//     "ids": {
19247	//       "description": "Select only advertiser groups with these IDs.",
19248	//       "format": "int64",
19249	//       "location": "query",
19250	//       "repeated": true,
19251	//       "type": "string"
19252	//     },
19253	//     "maxResults": {
19254	//       "default": "1000",
19255	//       "description": "Maximum number of results to return.",
19256	//       "format": "int32",
19257	//       "location": "query",
19258	//       "maximum": "1000",
19259	//       "minimum": "0",
19260	//       "type": "integer"
19261	//     },
19262	//     "pageToken": {
19263	//       "description": "Value of the nextPageToken from the previous result page.",
19264	//       "location": "query",
19265	//       "type": "string"
19266	//     },
19267	//     "profileId": {
19268	//       "description": "User profile ID associated with this request.",
19269	//       "format": "int64",
19270	//       "location": "path",
19271	//       "required": true,
19272	//       "type": "string"
19273	//     },
19274	//     "searchString": {
19275	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"advertiser*2015\" will return objects with names like \"advertiser group June 2015\", \"advertiser group April 2015\", or simply \"advertiser group 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"advertisergroup\" will match objects with name \"my advertisergroup\", \"advertisergroup 2015\", or simply \"advertisergroup\".",
19276	//       "location": "query",
19277	//       "type": "string"
19278	//     },
19279	//     "sortField": {
19280	//       "default": "ID",
19281	//       "description": "Field by which to sort the list.",
19282	//       "enum": [
19283	//         "ID",
19284	//         "NAME"
19285	//       ],
19286	//       "enumDescriptions": [
19287	//         "",
19288	//         ""
19289	//       ],
19290	//       "location": "query",
19291	//       "type": "string"
19292	//     },
19293	//     "sortOrder": {
19294	//       "default": "ASCENDING",
19295	//       "description": "Order of sorted results.",
19296	//       "enum": [
19297	//         "ASCENDING",
19298	//         "DESCENDING"
19299	//       ],
19300	//       "enumDescriptions": [
19301	//         "",
19302	//         ""
19303	//       ],
19304	//       "location": "query",
19305	//       "type": "string"
19306	//     }
19307	//   },
19308	//   "path": "userprofiles/{profileId}/advertiserGroups",
19309	//   "response": {
19310	//     "$ref": "AdvertiserGroupsListResponse"
19311	//   },
19312	//   "scopes": [
19313	//     "https://www.googleapis.com/auth/dfatrafficking"
19314	//   ]
19315	// }
19316
19317}
19318
19319// Pages invokes f for each page of results.
19320// A non-nil error returned from f will halt the iteration.
19321// The provided context supersedes any context provided to the Context method.
19322func (c *AdvertiserGroupsListCall) Pages(ctx context.Context, f func(*AdvertiserGroupsListResponse) error) error {
19323	c.ctx_ = ctx
19324	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19325	for {
19326		x, err := c.Do()
19327		if err != nil {
19328			return err
19329		}
19330		if err := f(x); err != nil {
19331			return err
19332		}
19333		if x.NextPageToken == "" {
19334			return nil
19335		}
19336		c.PageToken(x.NextPageToken)
19337	}
19338}
19339
19340// method id "dfareporting.advertiserGroups.patch":
19341
19342type AdvertiserGroupsPatchCall struct {
19343	s               *Service
19344	profileId       int64
19345	advertisergroup *AdvertiserGroup
19346	urlParams_      gensupport.URLParams
19347	ctx_            context.Context
19348	header_         http.Header
19349}
19350
19351// Patch: Updates an existing advertiser group. This method supports
19352// patch semantics.
19353//
19354// - id: AdvertiserGroup ID.
19355// - profileId: User profile ID associated with this request.
19356func (r *AdvertiserGroupsService) Patch(profileId int64, id int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsPatchCall {
19357	c := &AdvertiserGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19358	c.profileId = profileId
19359	c.urlParams_.Set("id", fmt.Sprint(id))
19360	c.advertisergroup = advertisergroup
19361	return c
19362}
19363
19364// Fields allows partial responses to be retrieved. See
19365// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19366// for more information.
19367func (c *AdvertiserGroupsPatchCall) Fields(s ...googleapi.Field) *AdvertiserGroupsPatchCall {
19368	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19369	return c
19370}
19371
19372// Context sets the context to be used in this call's Do method. Any
19373// pending HTTP request will be aborted if the provided context is
19374// canceled.
19375func (c *AdvertiserGroupsPatchCall) Context(ctx context.Context) *AdvertiserGroupsPatchCall {
19376	c.ctx_ = ctx
19377	return c
19378}
19379
19380// Header returns an http.Header that can be modified by the caller to
19381// add HTTP headers to the request.
19382func (c *AdvertiserGroupsPatchCall) Header() http.Header {
19383	if c.header_ == nil {
19384		c.header_ = make(http.Header)
19385	}
19386	return c.header_
19387}
19388
19389func (c *AdvertiserGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
19390	reqHeaders := make(http.Header)
19391	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
19392	for k, v := range c.header_ {
19393		reqHeaders[k] = v
19394	}
19395	reqHeaders.Set("User-Agent", c.s.userAgent())
19396	var body io.Reader = nil
19397	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
19398	if err != nil {
19399		return nil, err
19400	}
19401	reqHeaders.Set("Content-Type", "application/json")
19402	c.urlParams_.Set("alt", alt)
19403	c.urlParams_.Set("prettyPrint", "false")
19404	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
19405	urls += "?" + c.urlParams_.Encode()
19406	req, err := http.NewRequest("PATCH", urls, body)
19407	if err != nil {
19408		return nil, err
19409	}
19410	req.Header = reqHeaders
19411	googleapi.Expand(req.URL, map[string]string{
19412		"profileId": strconv.FormatInt(c.profileId, 10),
19413	})
19414	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19415}
19416
19417// Do executes the "dfareporting.advertiserGroups.patch" call.
19418// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
19419// status code is an error. Response headers are in either
19420// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
19421// at all) in error.(*googleapi.Error).Header. Use
19422// googleapi.IsNotModified to check whether the returned error was
19423// because http.StatusNotModified was returned.
19424func (c *AdvertiserGroupsPatchCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
19425	gensupport.SetOptions(c.urlParams_, opts...)
19426	res, err := c.doRequest("json")
19427	if res != nil && res.StatusCode == http.StatusNotModified {
19428		if res.Body != nil {
19429			res.Body.Close()
19430		}
19431		return nil, &googleapi.Error{
19432			Code:   res.StatusCode,
19433			Header: res.Header,
19434		}
19435	}
19436	if err != nil {
19437		return nil, err
19438	}
19439	defer googleapi.CloseBody(res)
19440	if err := googleapi.CheckResponse(res); err != nil {
19441		return nil, err
19442	}
19443	ret := &AdvertiserGroup{
19444		ServerResponse: googleapi.ServerResponse{
19445			Header:         res.Header,
19446			HTTPStatusCode: res.StatusCode,
19447		},
19448	}
19449	target := &ret
19450	if err := gensupport.DecodeResponse(target, res); err != nil {
19451		return nil, err
19452	}
19453	return ret, nil
19454	// {
19455	//   "description": "Updates an existing advertiser group. This method supports patch semantics.",
19456	//   "flatPath": "userprofiles/{profileId}/advertiserGroups",
19457	//   "httpMethod": "PATCH",
19458	//   "id": "dfareporting.advertiserGroups.patch",
19459	//   "parameterOrder": [
19460	//     "profileId",
19461	//     "id"
19462	//   ],
19463	//   "parameters": {
19464	//     "id": {
19465	//       "description": "AdvertiserGroup ID.",
19466	//       "format": "int64",
19467	//       "location": "query",
19468	//       "required": true,
19469	//       "type": "string"
19470	//     },
19471	//     "profileId": {
19472	//       "description": "User profile ID associated with this request.",
19473	//       "format": "int64",
19474	//       "location": "path",
19475	//       "required": true,
19476	//       "type": "string"
19477	//     }
19478	//   },
19479	//   "path": "userprofiles/{profileId}/advertiserGroups",
19480	//   "request": {
19481	//     "$ref": "AdvertiserGroup"
19482	//   },
19483	//   "response": {
19484	//     "$ref": "AdvertiserGroup"
19485	//   },
19486	//   "scopes": [
19487	//     "https://www.googleapis.com/auth/dfatrafficking"
19488	//   ]
19489	// }
19490
19491}
19492
19493// method id "dfareporting.advertiserGroups.update":
19494
19495type AdvertiserGroupsUpdateCall struct {
19496	s               *Service
19497	profileId       int64
19498	advertisergroup *AdvertiserGroup
19499	urlParams_      gensupport.URLParams
19500	ctx_            context.Context
19501	header_         http.Header
19502}
19503
19504// Update: Updates an existing advertiser group.
19505//
19506// - profileId: User profile ID associated with this request.
19507func (r *AdvertiserGroupsService) Update(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsUpdateCall {
19508	c := &AdvertiserGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19509	c.profileId = profileId
19510	c.advertisergroup = advertisergroup
19511	return c
19512}
19513
19514// Fields allows partial responses to be retrieved. See
19515// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19516// for more information.
19517func (c *AdvertiserGroupsUpdateCall) Fields(s ...googleapi.Field) *AdvertiserGroupsUpdateCall {
19518	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19519	return c
19520}
19521
19522// Context sets the context to be used in this call's Do method. Any
19523// pending HTTP request will be aborted if the provided context is
19524// canceled.
19525func (c *AdvertiserGroupsUpdateCall) Context(ctx context.Context) *AdvertiserGroupsUpdateCall {
19526	c.ctx_ = ctx
19527	return c
19528}
19529
19530// Header returns an http.Header that can be modified by the caller to
19531// add HTTP headers to the request.
19532func (c *AdvertiserGroupsUpdateCall) Header() http.Header {
19533	if c.header_ == nil {
19534		c.header_ = make(http.Header)
19535	}
19536	return c.header_
19537}
19538
19539func (c *AdvertiserGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
19540	reqHeaders := make(http.Header)
19541	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
19542	for k, v := range c.header_ {
19543		reqHeaders[k] = v
19544	}
19545	reqHeaders.Set("User-Agent", c.s.userAgent())
19546	var body io.Reader = nil
19547	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
19548	if err != nil {
19549		return nil, err
19550	}
19551	reqHeaders.Set("Content-Type", "application/json")
19552	c.urlParams_.Set("alt", alt)
19553	c.urlParams_.Set("prettyPrint", "false")
19554	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
19555	urls += "?" + c.urlParams_.Encode()
19556	req, err := http.NewRequest("PUT", urls, body)
19557	if err != nil {
19558		return nil, err
19559	}
19560	req.Header = reqHeaders
19561	googleapi.Expand(req.URL, map[string]string{
19562		"profileId": strconv.FormatInt(c.profileId, 10),
19563	})
19564	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19565}
19566
19567// Do executes the "dfareporting.advertiserGroups.update" call.
19568// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
19569// status code is an error. Response headers are in either
19570// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
19571// at all) in error.(*googleapi.Error).Header. Use
19572// googleapi.IsNotModified to check whether the returned error was
19573// because http.StatusNotModified was returned.
19574func (c *AdvertiserGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
19575	gensupport.SetOptions(c.urlParams_, opts...)
19576	res, err := c.doRequest("json")
19577	if res != nil && res.StatusCode == http.StatusNotModified {
19578		if res.Body != nil {
19579			res.Body.Close()
19580		}
19581		return nil, &googleapi.Error{
19582			Code:   res.StatusCode,
19583			Header: res.Header,
19584		}
19585	}
19586	if err != nil {
19587		return nil, err
19588	}
19589	defer googleapi.CloseBody(res)
19590	if err := googleapi.CheckResponse(res); err != nil {
19591		return nil, err
19592	}
19593	ret := &AdvertiserGroup{
19594		ServerResponse: googleapi.ServerResponse{
19595			Header:         res.Header,
19596			HTTPStatusCode: res.StatusCode,
19597		},
19598	}
19599	target := &ret
19600	if err := gensupport.DecodeResponse(target, res); err != nil {
19601		return nil, err
19602	}
19603	return ret, nil
19604	// {
19605	//   "description": "Updates an existing advertiser group.",
19606	//   "flatPath": "userprofiles/{profileId}/advertiserGroups",
19607	//   "httpMethod": "PUT",
19608	//   "id": "dfareporting.advertiserGroups.update",
19609	//   "parameterOrder": [
19610	//     "profileId"
19611	//   ],
19612	//   "parameters": {
19613	//     "profileId": {
19614	//       "description": "User profile ID associated with this request.",
19615	//       "format": "int64",
19616	//       "location": "path",
19617	//       "required": true,
19618	//       "type": "string"
19619	//     }
19620	//   },
19621	//   "path": "userprofiles/{profileId}/advertiserGroups",
19622	//   "request": {
19623	//     "$ref": "AdvertiserGroup"
19624	//   },
19625	//   "response": {
19626	//     "$ref": "AdvertiserGroup"
19627	//   },
19628	//   "scopes": [
19629	//     "https://www.googleapis.com/auth/dfatrafficking"
19630	//   ]
19631	// }
19632
19633}
19634
19635// method id "dfareporting.advertiserLandingPages.get":
19636
19637type AdvertiserLandingPagesGetCall struct {
19638	s            *Service
19639	profileId    int64
19640	id           int64
19641	urlParams_   gensupport.URLParams
19642	ifNoneMatch_ string
19643	ctx_         context.Context
19644	header_      http.Header
19645}
19646
19647// Get: Gets one landing page by ID.
19648//
19649// - id: Landing page ID.
19650// - profileId: User profile ID associated with this request.
19651func (r *AdvertiserLandingPagesService) Get(profileId int64, id int64) *AdvertiserLandingPagesGetCall {
19652	c := &AdvertiserLandingPagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19653	c.profileId = profileId
19654	c.id = id
19655	return c
19656}
19657
19658// Fields allows partial responses to be retrieved. See
19659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19660// for more information.
19661func (c *AdvertiserLandingPagesGetCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesGetCall {
19662	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19663	return c
19664}
19665
19666// IfNoneMatch sets the optional parameter which makes the operation
19667// fail if the object's ETag matches the given value. This is useful for
19668// getting updates only after the object has changed since the last
19669// request. Use googleapi.IsNotModified to check whether the response
19670// error from Do is the result of In-None-Match.
19671func (c *AdvertiserLandingPagesGetCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesGetCall {
19672	c.ifNoneMatch_ = entityTag
19673	return c
19674}
19675
19676// Context sets the context to be used in this call's Do method. Any
19677// pending HTTP request will be aborted if the provided context is
19678// canceled.
19679func (c *AdvertiserLandingPagesGetCall) Context(ctx context.Context) *AdvertiserLandingPagesGetCall {
19680	c.ctx_ = ctx
19681	return c
19682}
19683
19684// Header returns an http.Header that can be modified by the caller to
19685// add HTTP headers to the request.
19686func (c *AdvertiserLandingPagesGetCall) Header() http.Header {
19687	if c.header_ == nil {
19688		c.header_ = make(http.Header)
19689	}
19690	return c.header_
19691}
19692
19693func (c *AdvertiserLandingPagesGetCall) doRequest(alt string) (*http.Response, error) {
19694	reqHeaders := make(http.Header)
19695	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
19696	for k, v := range c.header_ {
19697		reqHeaders[k] = v
19698	}
19699	reqHeaders.Set("User-Agent", c.s.userAgent())
19700	if c.ifNoneMatch_ != "" {
19701		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19702	}
19703	var body io.Reader = nil
19704	c.urlParams_.Set("alt", alt)
19705	c.urlParams_.Set("prettyPrint", "false")
19706	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages/{id}")
19707	urls += "?" + c.urlParams_.Encode()
19708	req, err := http.NewRequest("GET", urls, body)
19709	if err != nil {
19710		return nil, err
19711	}
19712	req.Header = reqHeaders
19713	googleapi.Expand(req.URL, map[string]string{
19714		"profileId": strconv.FormatInt(c.profileId, 10),
19715		"id":        strconv.FormatInt(c.id, 10),
19716	})
19717	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19718}
19719
19720// Do executes the "dfareporting.advertiserLandingPages.get" call.
19721// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
19722// status code is an error. Response headers are in either
19723// *LandingPage.ServerResponse.Header or (if a response was returned at
19724// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19725// to check whether the returned error was because
19726// http.StatusNotModified was returned.
19727func (c *AdvertiserLandingPagesGetCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19728	gensupport.SetOptions(c.urlParams_, opts...)
19729	res, err := c.doRequest("json")
19730	if res != nil && res.StatusCode == http.StatusNotModified {
19731		if res.Body != nil {
19732			res.Body.Close()
19733		}
19734		return nil, &googleapi.Error{
19735			Code:   res.StatusCode,
19736			Header: res.Header,
19737		}
19738	}
19739	if err != nil {
19740		return nil, err
19741	}
19742	defer googleapi.CloseBody(res)
19743	if err := googleapi.CheckResponse(res); err != nil {
19744		return nil, err
19745	}
19746	ret := &LandingPage{
19747		ServerResponse: googleapi.ServerResponse{
19748			Header:         res.Header,
19749			HTTPStatusCode: res.StatusCode,
19750		},
19751	}
19752	target := &ret
19753	if err := gensupport.DecodeResponse(target, res); err != nil {
19754		return nil, err
19755	}
19756	return ret, nil
19757	// {
19758	//   "description": "Gets one landing page by ID.",
19759	//   "flatPath": "userprofiles/{profileId}/advertiserLandingPages/{id}",
19760	//   "httpMethod": "GET",
19761	//   "id": "dfareporting.advertiserLandingPages.get",
19762	//   "parameterOrder": [
19763	//     "profileId",
19764	//     "id"
19765	//   ],
19766	//   "parameters": {
19767	//     "id": {
19768	//       "description": "Landing page ID.",
19769	//       "format": "int64",
19770	//       "location": "path",
19771	//       "required": true,
19772	//       "type": "string"
19773	//     },
19774	//     "profileId": {
19775	//       "description": "User profile ID associated with this request.",
19776	//       "format": "int64",
19777	//       "location": "path",
19778	//       "required": true,
19779	//       "type": "string"
19780	//     }
19781	//   },
19782	//   "path": "userprofiles/{profileId}/advertiserLandingPages/{id}",
19783	//   "response": {
19784	//     "$ref": "LandingPage"
19785	//   },
19786	//   "scopes": [
19787	//     "https://www.googleapis.com/auth/dfatrafficking"
19788	//   ]
19789	// }
19790
19791}
19792
19793// method id "dfareporting.advertiserLandingPages.insert":
19794
19795type AdvertiserLandingPagesInsertCall struct {
19796	s           *Service
19797	profileId   int64
19798	landingpage *LandingPage
19799	urlParams_  gensupport.URLParams
19800	ctx_        context.Context
19801	header_     http.Header
19802}
19803
19804// Insert: Inserts a new landing page.
19805//
19806// - profileId: User profile ID associated with this request.
19807func (r *AdvertiserLandingPagesService) Insert(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesInsertCall {
19808	c := &AdvertiserLandingPagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19809	c.profileId = profileId
19810	c.landingpage = landingpage
19811	return c
19812}
19813
19814// Fields allows partial responses to be retrieved. See
19815// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19816// for more information.
19817func (c *AdvertiserLandingPagesInsertCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesInsertCall {
19818	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19819	return c
19820}
19821
19822// Context sets the context to be used in this call's Do method. Any
19823// pending HTTP request will be aborted if the provided context is
19824// canceled.
19825func (c *AdvertiserLandingPagesInsertCall) Context(ctx context.Context) *AdvertiserLandingPagesInsertCall {
19826	c.ctx_ = ctx
19827	return c
19828}
19829
19830// Header returns an http.Header that can be modified by the caller to
19831// add HTTP headers to the request.
19832func (c *AdvertiserLandingPagesInsertCall) Header() http.Header {
19833	if c.header_ == nil {
19834		c.header_ = make(http.Header)
19835	}
19836	return c.header_
19837}
19838
19839func (c *AdvertiserLandingPagesInsertCall) doRequest(alt string) (*http.Response, error) {
19840	reqHeaders := make(http.Header)
19841	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
19842	for k, v := range c.header_ {
19843		reqHeaders[k] = v
19844	}
19845	reqHeaders.Set("User-Agent", c.s.userAgent())
19846	var body io.Reader = nil
19847	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19848	if err != nil {
19849		return nil, err
19850	}
19851	reqHeaders.Set("Content-Type", "application/json")
19852	c.urlParams_.Set("alt", alt)
19853	c.urlParams_.Set("prettyPrint", "false")
19854	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19855	urls += "?" + c.urlParams_.Encode()
19856	req, err := http.NewRequest("POST", urls, body)
19857	if err != nil {
19858		return nil, err
19859	}
19860	req.Header = reqHeaders
19861	googleapi.Expand(req.URL, map[string]string{
19862		"profileId": strconv.FormatInt(c.profileId, 10),
19863	})
19864	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19865}
19866
19867// Do executes the "dfareporting.advertiserLandingPages.insert" call.
19868// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
19869// status code is an error. Response headers are in either
19870// *LandingPage.ServerResponse.Header or (if a response was returned at
19871// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19872// to check whether the returned error was because
19873// http.StatusNotModified was returned.
19874func (c *AdvertiserLandingPagesInsertCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19875	gensupport.SetOptions(c.urlParams_, opts...)
19876	res, err := c.doRequest("json")
19877	if res != nil && res.StatusCode == http.StatusNotModified {
19878		if res.Body != nil {
19879			res.Body.Close()
19880		}
19881		return nil, &googleapi.Error{
19882			Code:   res.StatusCode,
19883			Header: res.Header,
19884		}
19885	}
19886	if err != nil {
19887		return nil, err
19888	}
19889	defer googleapi.CloseBody(res)
19890	if err := googleapi.CheckResponse(res); err != nil {
19891		return nil, err
19892	}
19893	ret := &LandingPage{
19894		ServerResponse: googleapi.ServerResponse{
19895			Header:         res.Header,
19896			HTTPStatusCode: res.StatusCode,
19897		},
19898	}
19899	target := &ret
19900	if err := gensupport.DecodeResponse(target, res); err != nil {
19901		return nil, err
19902	}
19903	return ret, nil
19904	// {
19905	//   "description": "Inserts a new landing page.",
19906	//   "flatPath": "userprofiles/{profileId}/advertiserLandingPages",
19907	//   "httpMethod": "POST",
19908	//   "id": "dfareporting.advertiserLandingPages.insert",
19909	//   "parameterOrder": [
19910	//     "profileId"
19911	//   ],
19912	//   "parameters": {
19913	//     "profileId": {
19914	//       "description": "User profile ID associated with this request.",
19915	//       "format": "int64",
19916	//       "location": "path",
19917	//       "required": true,
19918	//       "type": "string"
19919	//     }
19920	//   },
19921	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19922	//   "request": {
19923	//     "$ref": "LandingPage"
19924	//   },
19925	//   "response": {
19926	//     "$ref": "LandingPage"
19927	//   },
19928	//   "scopes": [
19929	//     "https://www.googleapis.com/auth/dfatrafficking"
19930	//   ]
19931	// }
19932
19933}
19934
19935// method id "dfareporting.advertiserLandingPages.list":
19936
19937type AdvertiserLandingPagesListCall struct {
19938	s            *Service
19939	profileId    int64
19940	urlParams_   gensupport.URLParams
19941	ifNoneMatch_ string
19942	ctx_         context.Context
19943	header_      http.Header
19944}
19945
19946// List: Retrieves a list of landing pages.
19947//
19948// - profileId: User profile ID associated with this request.
19949func (r *AdvertiserLandingPagesService) List(profileId int64) *AdvertiserLandingPagesListCall {
19950	c := &AdvertiserLandingPagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19951	c.profileId = profileId
19952	return c
19953}
19954
19955// AdvertiserIds sets the optional parameter "advertiserIds": Select
19956// only landing pages that belong to these advertisers.
19957func (c *AdvertiserLandingPagesListCall) AdvertiserIds(advertiserIds ...int64) *AdvertiserLandingPagesListCall {
19958	var advertiserIds_ []string
19959	for _, v := range advertiserIds {
19960		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
19961	}
19962	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
19963	return c
19964}
19965
19966// Archived sets the optional parameter "archived": Select only archived
19967// landing pages. Don't set this field to select both archived and
19968// non-archived landing pages.
19969func (c *AdvertiserLandingPagesListCall) Archived(archived bool) *AdvertiserLandingPagesListCall {
19970	c.urlParams_.Set("archived", fmt.Sprint(archived))
19971	return c
19972}
19973
19974// CampaignIds sets the optional parameter "campaignIds": Select only
19975// landing pages that are associated with these campaigns.
19976func (c *AdvertiserLandingPagesListCall) CampaignIds(campaignIds ...int64) *AdvertiserLandingPagesListCall {
19977	var campaignIds_ []string
19978	for _, v := range campaignIds {
19979		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
19980	}
19981	c.urlParams_.SetMulti("campaignIds", campaignIds_)
19982	return c
19983}
19984
19985// Ids sets the optional parameter "ids": Select only landing pages with
19986// these IDs.
19987func (c *AdvertiserLandingPagesListCall) Ids(ids ...int64) *AdvertiserLandingPagesListCall {
19988	var ids_ []string
19989	for _, v := range ids {
19990		ids_ = append(ids_, fmt.Sprint(v))
19991	}
19992	c.urlParams_.SetMulti("ids", ids_)
19993	return c
19994}
19995
19996// MaxResults sets the optional parameter "maxResults": Maximum number
19997// of results to return.
19998func (c *AdvertiserLandingPagesListCall) MaxResults(maxResults int64) *AdvertiserLandingPagesListCall {
19999	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20000	return c
20001}
20002
20003// PageToken sets the optional parameter "pageToken": Value of the
20004// nextPageToken from the previous result page.
20005func (c *AdvertiserLandingPagesListCall) PageToken(pageToken string) *AdvertiserLandingPagesListCall {
20006	c.urlParams_.Set("pageToken", pageToken)
20007	return c
20008}
20009
20010// SearchString sets the optional parameter "searchString": Allows
20011// searching for landing pages by name or ID. Wildcards (*) are allowed.
20012// For example, "landingpage*2017" will return landing pages with names
20013// like "landingpage July 2017", "landingpage March 2017", or simply
20014// "landingpage 2017". Most of the searches also add wildcards
20015// implicitly at the start and the end of the search string. For
20016// example, a search string of "landingpage" will match campaigns with
20017// name "my landingpage", "landingpage 2015", or simply "landingpage".
20018func (c *AdvertiserLandingPagesListCall) SearchString(searchString string) *AdvertiserLandingPagesListCall {
20019	c.urlParams_.Set("searchString", searchString)
20020	return c
20021}
20022
20023// SortField sets the optional parameter "sortField": Field by which to
20024// sort the list.
20025//
20026// Possible values:
20027//   "ID" (default)
20028//   "NAME"
20029func (c *AdvertiserLandingPagesListCall) SortField(sortField string) *AdvertiserLandingPagesListCall {
20030	c.urlParams_.Set("sortField", sortField)
20031	return c
20032}
20033
20034// SortOrder sets the optional parameter "sortOrder": Order of sorted
20035// results.
20036//
20037// Possible values:
20038//   "ASCENDING" (default)
20039//   "DESCENDING"
20040func (c *AdvertiserLandingPagesListCall) SortOrder(sortOrder string) *AdvertiserLandingPagesListCall {
20041	c.urlParams_.Set("sortOrder", sortOrder)
20042	return c
20043}
20044
20045// SubaccountId sets the optional parameter "subaccountId": Select only
20046// landing pages that belong to this subaccount.
20047func (c *AdvertiserLandingPagesListCall) SubaccountId(subaccountId int64) *AdvertiserLandingPagesListCall {
20048	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
20049	return c
20050}
20051
20052// Fields allows partial responses to be retrieved. See
20053// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20054// for more information.
20055func (c *AdvertiserLandingPagesListCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesListCall {
20056	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20057	return c
20058}
20059
20060// IfNoneMatch sets the optional parameter which makes the operation
20061// fail if the object's ETag matches the given value. This is useful for
20062// getting updates only after the object has changed since the last
20063// request. Use googleapi.IsNotModified to check whether the response
20064// error from Do is the result of In-None-Match.
20065func (c *AdvertiserLandingPagesListCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesListCall {
20066	c.ifNoneMatch_ = entityTag
20067	return c
20068}
20069
20070// Context sets the context to be used in this call's Do method. Any
20071// pending HTTP request will be aborted if the provided context is
20072// canceled.
20073func (c *AdvertiserLandingPagesListCall) Context(ctx context.Context) *AdvertiserLandingPagesListCall {
20074	c.ctx_ = ctx
20075	return c
20076}
20077
20078// Header returns an http.Header that can be modified by the caller to
20079// add HTTP headers to the request.
20080func (c *AdvertiserLandingPagesListCall) Header() http.Header {
20081	if c.header_ == nil {
20082		c.header_ = make(http.Header)
20083	}
20084	return c.header_
20085}
20086
20087func (c *AdvertiserLandingPagesListCall) doRequest(alt string) (*http.Response, error) {
20088	reqHeaders := make(http.Header)
20089	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
20090	for k, v := range c.header_ {
20091		reqHeaders[k] = v
20092	}
20093	reqHeaders.Set("User-Agent", c.s.userAgent())
20094	if c.ifNoneMatch_ != "" {
20095		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20096	}
20097	var body io.Reader = nil
20098	c.urlParams_.Set("alt", alt)
20099	c.urlParams_.Set("prettyPrint", "false")
20100	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
20101	urls += "?" + c.urlParams_.Encode()
20102	req, err := http.NewRequest("GET", urls, body)
20103	if err != nil {
20104		return nil, err
20105	}
20106	req.Header = reqHeaders
20107	googleapi.Expand(req.URL, map[string]string{
20108		"profileId": strconv.FormatInt(c.profileId, 10),
20109	})
20110	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20111}
20112
20113// Do executes the "dfareporting.advertiserLandingPages.list" call.
20114// Exactly one of *AdvertiserLandingPagesListResponse or error will be
20115// non-nil. Any non-2xx status code is an error. Response headers are in
20116// either *AdvertiserLandingPagesListResponse.ServerResponse.Header or
20117// (if a response was returned at all) in
20118// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20119// whether the returned error was because http.StatusNotModified was
20120// returned.
20121func (c *AdvertiserLandingPagesListCall) Do(opts ...googleapi.CallOption) (*AdvertiserLandingPagesListResponse, error) {
20122	gensupport.SetOptions(c.urlParams_, opts...)
20123	res, err := c.doRequest("json")
20124	if res != nil && res.StatusCode == http.StatusNotModified {
20125		if res.Body != nil {
20126			res.Body.Close()
20127		}
20128		return nil, &googleapi.Error{
20129			Code:   res.StatusCode,
20130			Header: res.Header,
20131		}
20132	}
20133	if err != nil {
20134		return nil, err
20135	}
20136	defer googleapi.CloseBody(res)
20137	if err := googleapi.CheckResponse(res); err != nil {
20138		return nil, err
20139	}
20140	ret := &AdvertiserLandingPagesListResponse{
20141		ServerResponse: googleapi.ServerResponse{
20142			Header:         res.Header,
20143			HTTPStatusCode: res.StatusCode,
20144		},
20145	}
20146	target := &ret
20147	if err := gensupport.DecodeResponse(target, res); err != nil {
20148		return nil, err
20149	}
20150	return ret, nil
20151	// {
20152	//   "description": "Retrieves a list of landing pages.",
20153	//   "flatPath": "userprofiles/{profileId}/advertiserLandingPages",
20154	//   "httpMethod": "GET",
20155	//   "id": "dfareporting.advertiserLandingPages.list",
20156	//   "parameterOrder": [
20157	//     "profileId"
20158	//   ],
20159	//   "parameters": {
20160	//     "advertiserIds": {
20161	//       "description": "Select only landing pages that belong to these advertisers.",
20162	//       "format": "int64",
20163	//       "location": "query",
20164	//       "repeated": true,
20165	//       "type": "string"
20166	//     },
20167	//     "archived": {
20168	//       "description": "Select only archived landing pages. Don't set this field to select both archived and non-archived landing pages.",
20169	//       "location": "query",
20170	//       "type": "boolean"
20171	//     },
20172	//     "campaignIds": {
20173	//       "description": "Select only landing pages that are associated with these campaigns.",
20174	//       "format": "int64",
20175	//       "location": "query",
20176	//       "repeated": true,
20177	//       "type": "string"
20178	//     },
20179	//     "ids": {
20180	//       "description": "Select only landing pages with these IDs.",
20181	//       "format": "int64",
20182	//       "location": "query",
20183	//       "repeated": true,
20184	//       "type": "string"
20185	//     },
20186	//     "maxResults": {
20187	//       "default": "1000",
20188	//       "description": "Maximum number of results to return.",
20189	//       "format": "int32",
20190	//       "location": "query",
20191	//       "maximum": "1000",
20192	//       "minimum": "0",
20193	//       "type": "integer"
20194	//     },
20195	//     "pageToken": {
20196	//       "description": "Value of the nextPageToken from the previous result page.",
20197	//       "location": "query",
20198	//       "type": "string"
20199	//     },
20200	//     "profileId": {
20201	//       "description": "User profile ID associated with this request.",
20202	//       "format": "int64",
20203	//       "location": "path",
20204	//       "required": true,
20205	//       "type": "string"
20206	//     },
20207	//     "searchString": {
20208	//       "description": "Allows searching for landing pages by name or ID. Wildcards (*) are allowed. For example, \"landingpage*2017\" will return landing pages with names like \"landingpage July 2017\", \"landingpage March 2017\", or simply \"landingpage 2017\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"landingpage\" will match campaigns with name \"my landingpage\", \"landingpage 2015\", or simply \"landingpage\".",
20209	//       "location": "query",
20210	//       "type": "string"
20211	//     },
20212	//     "sortField": {
20213	//       "default": "ID",
20214	//       "description": "Field by which to sort the list.",
20215	//       "enum": [
20216	//         "ID",
20217	//         "NAME"
20218	//       ],
20219	//       "enumDescriptions": [
20220	//         "",
20221	//         ""
20222	//       ],
20223	//       "location": "query",
20224	//       "type": "string"
20225	//     },
20226	//     "sortOrder": {
20227	//       "default": "ASCENDING",
20228	//       "description": "Order of sorted results.",
20229	//       "enum": [
20230	//         "ASCENDING",
20231	//         "DESCENDING"
20232	//       ],
20233	//       "enumDescriptions": [
20234	//         "",
20235	//         ""
20236	//       ],
20237	//       "location": "query",
20238	//       "type": "string"
20239	//     },
20240	//     "subaccountId": {
20241	//       "description": "Select only landing pages that belong to this subaccount.",
20242	//       "format": "int64",
20243	//       "location": "query",
20244	//       "type": "string"
20245	//     }
20246	//   },
20247	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
20248	//   "response": {
20249	//     "$ref": "AdvertiserLandingPagesListResponse"
20250	//   },
20251	//   "scopes": [
20252	//     "https://www.googleapis.com/auth/dfatrafficking"
20253	//   ]
20254	// }
20255
20256}
20257
20258// Pages invokes f for each page of results.
20259// A non-nil error returned from f will halt the iteration.
20260// The provided context supersedes any context provided to the Context method.
20261func (c *AdvertiserLandingPagesListCall) Pages(ctx context.Context, f func(*AdvertiserLandingPagesListResponse) error) error {
20262	c.ctx_ = ctx
20263	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20264	for {
20265		x, err := c.Do()
20266		if err != nil {
20267			return err
20268		}
20269		if err := f(x); err != nil {
20270			return err
20271		}
20272		if x.NextPageToken == "" {
20273			return nil
20274		}
20275		c.PageToken(x.NextPageToken)
20276	}
20277}
20278
20279// method id "dfareporting.advertiserLandingPages.patch":
20280
20281type AdvertiserLandingPagesPatchCall struct {
20282	s           *Service
20283	profileId   int64
20284	landingpage *LandingPage
20285	urlParams_  gensupport.URLParams
20286	ctx_        context.Context
20287	header_     http.Header
20288}
20289
20290// Patch: Updates an existing advertiser landing page. This method
20291// supports patch semantics.
20292//
20293// - id: LandingPage ID.
20294// - profileId: User profile ID associated with this request.
20295func (r *AdvertiserLandingPagesService) Patch(profileId int64, id int64, landingpage *LandingPage) *AdvertiserLandingPagesPatchCall {
20296	c := &AdvertiserLandingPagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20297	c.profileId = profileId
20298	c.urlParams_.Set("id", fmt.Sprint(id))
20299	c.landingpage = landingpage
20300	return c
20301}
20302
20303// Fields allows partial responses to be retrieved. See
20304// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20305// for more information.
20306func (c *AdvertiserLandingPagesPatchCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesPatchCall {
20307	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20308	return c
20309}
20310
20311// Context sets the context to be used in this call's Do method. Any
20312// pending HTTP request will be aborted if the provided context is
20313// canceled.
20314func (c *AdvertiserLandingPagesPatchCall) Context(ctx context.Context) *AdvertiserLandingPagesPatchCall {
20315	c.ctx_ = ctx
20316	return c
20317}
20318
20319// Header returns an http.Header that can be modified by the caller to
20320// add HTTP headers to the request.
20321func (c *AdvertiserLandingPagesPatchCall) Header() http.Header {
20322	if c.header_ == nil {
20323		c.header_ = make(http.Header)
20324	}
20325	return c.header_
20326}
20327
20328func (c *AdvertiserLandingPagesPatchCall) doRequest(alt string) (*http.Response, error) {
20329	reqHeaders := make(http.Header)
20330	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
20331	for k, v := range c.header_ {
20332		reqHeaders[k] = v
20333	}
20334	reqHeaders.Set("User-Agent", c.s.userAgent())
20335	var body io.Reader = nil
20336	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
20337	if err != nil {
20338		return nil, err
20339	}
20340	reqHeaders.Set("Content-Type", "application/json")
20341	c.urlParams_.Set("alt", alt)
20342	c.urlParams_.Set("prettyPrint", "false")
20343	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
20344	urls += "?" + c.urlParams_.Encode()
20345	req, err := http.NewRequest("PATCH", urls, body)
20346	if err != nil {
20347		return nil, err
20348	}
20349	req.Header = reqHeaders
20350	googleapi.Expand(req.URL, map[string]string{
20351		"profileId": strconv.FormatInt(c.profileId, 10),
20352	})
20353	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20354}
20355
20356// Do executes the "dfareporting.advertiserLandingPages.patch" call.
20357// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
20358// status code is an error. Response headers are in either
20359// *LandingPage.ServerResponse.Header or (if a response was returned at
20360// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20361// to check whether the returned error was because
20362// http.StatusNotModified was returned.
20363func (c *AdvertiserLandingPagesPatchCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
20364	gensupport.SetOptions(c.urlParams_, opts...)
20365	res, err := c.doRequest("json")
20366	if res != nil && res.StatusCode == http.StatusNotModified {
20367		if res.Body != nil {
20368			res.Body.Close()
20369		}
20370		return nil, &googleapi.Error{
20371			Code:   res.StatusCode,
20372			Header: res.Header,
20373		}
20374	}
20375	if err != nil {
20376		return nil, err
20377	}
20378	defer googleapi.CloseBody(res)
20379	if err := googleapi.CheckResponse(res); err != nil {
20380		return nil, err
20381	}
20382	ret := &LandingPage{
20383		ServerResponse: googleapi.ServerResponse{
20384			Header:         res.Header,
20385			HTTPStatusCode: res.StatusCode,
20386		},
20387	}
20388	target := &ret
20389	if err := gensupport.DecodeResponse(target, res); err != nil {
20390		return nil, err
20391	}
20392	return ret, nil
20393	// {
20394	//   "description": "Updates an existing advertiser landing page. This method supports patch semantics.",
20395	//   "flatPath": "userprofiles/{profileId}/advertiserLandingPages",
20396	//   "httpMethod": "PATCH",
20397	//   "id": "dfareporting.advertiserLandingPages.patch",
20398	//   "parameterOrder": [
20399	//     "profileId",
20400	//     "id"
20401	//   ],
20402	//   "parameters": {
20403	//     "id": {
20404	//       "description": "LandingPage ID.",
20405	//       "format": "int64",
20406	//       "location": "query",
20407	//       "required": true,
20408	//       "type": "string"
20409	//     },
20410	//     "profileId": {
20411	//       "description": "User profile ID associated with this request.",
20412	//       "format": "int64",
20413	//       "location": "path",
20414	//       "required": true,
20415	//       "type": "string"
20416	//     }
20417	//   },
20418	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
20419	//   "request": {
20420	//     "$ref": "LandingPage"
20421	//   },
20422	//   "response": {
20423	//     "$ref": "LandingPage"
20424	//   },
20425	//   "scopes": [
20426	//     "https://www.googleapis.com/auth/dfatrafficking"
20427	//   ]
20428	// }
20429
20430}
20431
20432// method id "dfareporting.advertiserLandingPages.update":
20433
20434type AdvertiserLandingPagesUpdateCall struct {
20435	s           *Service
20436	profileId   int64
20437	landingpage *LandingPage
20438	urlParams_  gensupport.URLParams
20439	ctx_        context.Context
20440	header_     http.Header
20441}
20442
20443// Update: Updates an existing landing page.
20444//
20445// - profileId: User profile ID associated with this request.
20446func (r *AdvertiserLandingPagesService) Update(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesUpdateCall {
20447	c := &AdvertiserLandingPagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20448	c.profileId = profileId
20449	c.landingpage = landingpage
20450	return c
20451}
20452
20453// Fields allows partial responses to be retrieved. See
20454// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20455// for more information.
20456func (c *AdvertiserLandingPagesUpdateCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesUpdateCall {
20457	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20458	return c
20459}
20460
20461// Context sets the context to be used in this call's Do method. Any
20462// pending HTTP request will be aborted if the provided context is
20463// canceled.
20464func (c *AdvertiserLandingPagesUpdateCall) Context(ctx context.Context) *AdvertiserLandingPagesUpdateCall {
20465	c.ctx_ = ctx
20466	return c
20467}
20468
20469// Header returns an http.Header that can be modified by the caller to
20470// add HTTP headers to the request.
20471func (c *AdvertiserLandingPagesUpdateCall) Header() http.Header {
20472	if c.header_ == nil {
20473		c.header_ = make(http.Header)
20474	}
20475	return c.header_
20476}
20477
20478func (c *AdvertiserLandingPagesUpdateCall) doRequest(alt string) (*http.Response, error) {
20479	reqHeaders := make(http.Header)
20480	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
20481	for k, v := range c.header_ {
20482		reqHeaders[k] = v
20483	}
20484	reqHeaders.Set("User-Agent", c.s.userAgent())
20485	var body io.Reader = nil
20486	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
20487	if err != nil {
20488		return nil, err
20489	}
20490	reqHeaders.Set("Content-Type", "application/json")
20491	c.urlParams_.Set("alt", alt)
20492	c.urlParams_.Set("prettyPrint", "false")
20493	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
20494	urls += "?" + c.urlParams_.Encode()
20495	req, err := http.NewRequest("PUT", urls, body)
20496	if err != nil {
20497		return nil, err
20498	}
20499	req.Header = reqHeaders
20500	googleapi.Expand(req.URL, map[string]string{
20501		"profileId": strconv.FormatInt(c.profileId, 10),
20502	})
20503	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20504}
20505
20506// Do executes the "dfareporting.advertiserLandingPages.update" call.
20507// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
20508// status code is an error. Response headers are in either
20509// *LandingPage.ServerResponse.Header or (if a response was returned at
20510// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20511// to check whether the returned error was because
20512// http.StatusNotModified was returned.
20513func (c *AdvertiserLandingPagesUpdateCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
20514	gensupport.SetOptions(c.urlParams_, opts...)
20515	res, err := c.doRequest("json")
20516	if res != nil && res.StatusCode == http.StatusNotModified {
20517		if res.Body != nil {
20518			res.Body.Close()
20519		}
20520		return nil, &googleapi.Error{
20521			Code:   res.StatusCode,
20522			Header: res.Header,
20523		}
20524	}
20525	if err != nil {
20526		return nil, err
20527	}
20528	defer googleapi.CloseBody(res)
20529	if err := googleapi.CheckResponse(res); err != nil {
20530		return nil, err
20531	}
20532	ret := &LandingPage{
20533		ServerResponse: googleapi.ServerResponse{
20534			Header:         res.Header,
20535			HTTPStatusCode: res.StatusCode,
20536		},
20537	}
20538	target := &ret
20539	if err := gensupport.DecodeResponse(target, res); err != nil {
20540		return nil, err
20541	}
20542	return ret, nil
20543	// {
20544	//   "description": "Updates an existing landing page.",
20545	//   "flatPath": "userprofiles/{profileId}/advertiserLandingPages",
20546	//   "httpMethod": "PUT",
20547	//   "id": "dfareporting.advertiserLandingPages.update",
20548	//   "parameterOrder": [
20549	//     "profileId"
20550	//   ],
20551	//   "parameters": {
20552	//     "profileId": {
20553	//       "description": "User profile ID associated with this request.",
20554	//       "format": "int64",
20555	//       "location": "path",
20556	//       "required": true,
20557	//       "type": "string"
20558	//     }
20559	//   },
20560	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
20561	//   "request": {
20562	//     "$ref": "LandingPage"
20563	//   },
20564	//   "response": {
20565	//     "$ref": "LandingPage"
20566	//   },
20567	//   "scopes": [
20568	//     "https://www.googleapis.com/auth/dfatrafficking"
20569	//   ]
20570	// }
20571
20572}
20573
20574// method id "dfareporting.advertisers.get":
20575
20576type AdvertisersGetCall struct {
20577	s            *Service
20578	profileId    int64
20579	id           int64
20580	urlParams_   gensupport.URLParams
20581	ifNoneMatch_ string
20582	ctx_         context.Context
20583	header_      http.Header
20584}
20585
20586// Get: Gets one advertiser by ID.
20587//
20588// - id: Advertiser ID.
20589// - profileId: User profile ID associated with this request.
20590func (r *AdvertisersService) Get(profileId int64, id int64) *AdvertisersGetCall {
20591	c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20592	c.profileId = profileId
20593	c.id = id
20594	return c
20595}
20596
20597// Fields allows partial responses to be retrieved. See
20598// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20599// for more information.
20600func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall {
20601	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20602	return c
20603}
20604
20605// IfNoneMatch sets the optional parameter which makes the operation
20606// fail if the object's ETag matches the given value. This is useful for
20607// getting updates only after the object has changed since the last
20608// request. Use googleapi.IsNotModified to check whether the response
20609// error from Do is the result of In-None-Match.
20610func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall {
20611	c.ifNoneMatch_ = entityTag
20612	return c
20613}
20614
20615// Context sets the context to be used in this call's Do method. Any
20616// pending HTTP request will be aborted if the provided context is
20617// canceled.
20618func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
20619	c.ctx_ = ctx
20620	return c
20621}
20622
20623// Header returns an http.Header that can be modified by the caller to
20624// add HTTP headers to the request.
20625func (c *AdvertisersGetCall) Header() http.Header {
20626	if c.header_ == nil {
20627		c.header_ = make(http.Header)
20628	}
20629	return c.header_
20630}
20631
20632func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
20633	reqHeaders := make(http.Header)
20634	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
20635	for k, v := range c.header_ {
20636		reqHeaders[k] = v
20637	}
20638	reqHeaders.Set("User-Agent", c.s.userAgent())
20639	if c.ifNoneMatch_ != "" {
20640		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20641	}
20642	var body io.Reader = nil
20643	c.urlParams_.Set("alt", alt)
20644	c.urlParams_.Set("prettyPrint", "false")
20645	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers/{id}")
20646	urls += "?" + c.urlParams_.Encode()
20647	req, err := http.NewRequest("GET", urls, body)
20648	if err != nil {
20649		return nil, err
20650	}
20651	req.Header = reqHeaders
20652	googleapi.Expand(req.URL, map[string]string{
20653		"profileId": strconv.FormatInt(c.profileId, 10),
20654		"id":        strconv.FormatInt(c.id, 10),
20655	})
20656	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20657}
20658
20659// Do executes the "dfareporting.advertisers.get" call.
20660// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
20661// status code is an error. Response headers are in either
20662// *Advertiser.ServerResponse.Header or (if a response was returned at
20663// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20664// to check whether the returned error was because
20665// http.StatusNotModified was returned.
20666func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20667	gensupport.SetOptions(c.urlParams_, opts...)
20668	res, err := c.doRequest("json")
20669	if res != nil && res.StatusCode == http.StatusNotModified {
20670		if res.Body != nil {
20671			res.Body.Close()
20672		}
20673		return nil, &googleapi.Error{
20674			Code:   res.StatusCode,
20675			Header: res.Header,
20676		}
20677	}
20678	if err != nil {
20679		return nil, err
20680	}
20681	defer googleapi.CloseBody(res)
20682	if err := googleapi.CheckResponse(res); err != nil {
20683		return nil, err
20684	}
20685	ret := &Advertiser{
20686		ServerResponse: googleapi.ServerResponse{
20687			Header:         res.Header,
20688			HTTPStatusCode: res.StatusCode,
20689		},
20690	}
20691	target := &ret
20692	if err := gensupport.DecodeResponse(target, res); err != nil {
20693		return nil, err
20694	}
20695	return ret, nil
20696	// {
20697	//   "description": "Gets one advertiser by ID.",
20698	//   "flatPath": "userprofiles/{profileId}/advertisers/{id}",
20699	//   "httpMethod": "GET",
20700	//   "id": "dfareporting.advertisers.get",
20701	//   "parameterOrder": [
20702	//     "profileId",
20703	//     "id"
20704	//   ],
20705	//   "parameters": {
20706	//     "id": {
20707	//       "description": "Advertiser ID.",
20708	//       "format": "int64",
20709	//       "location": "path",
20710	//       "required": true,
20711	//       "type": "string"
20712	//     },
20713	//     "profileId": {
20714	//       "description": "User profile ID associated with this request.",
20715	//       "format": "int64",
20716	//       "location": "path",
20717	//       "required": true,
20718	//       "type": "string"
20719	//     }
20720	//   },
20721	//   "path": "userprofiles/{profileId}/advertisers/{id}",
20722	//   "response": {
20723	//     "$ref": "Advertiser"
20724	//   },
20725	//   "scopes": [
20726	//     "https://www.googleapis.com/auth/dfatrafficking"
20727	//   ]
20728	// }
20729
20730}
20731
20732// method id "dfareporting.advertisers.insert":
20733
20734type AdvertisersInsertCall struct {
20735	s          *Service
20736	profileId  int64
20737	advertiser *Advertiser
20738	urlParams_ gensupport.URLParams
20739	ctx_       context.Context
20740	header_    http.Header
20741}
20742
20743// Insert: Inserts a new advertiser.
20744//
20745// - profileId: User profile ID associated with this request.
20746func (r *AdvertisersService) Insert(profileId int64, advertiser *Advertiser) *AdvertisersInsertCall {
20747	c := &AdvertisersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20748	c.profileId = profileId
20749	c.advertiser = advertiser
20750	return c
20751}
20752
20753// Fields allows partial responses to be retrieved. See
20754// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20755// for more information.
20756func (c *AdvertisersInsertCall) Fields(s ...googleapi.Field) *AdvertisersInsertCall {
20757	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20758	return c
20759}
20760
20761// Context sets the context to be used in this call's Do method. Any
20762// pending HTTP request will be aborted if the provided context is
20763// canceled.
20764func (c *AdvertisersInsertCall) Context(ctx context.Context) *AdvertisersInsertCall {
20765	c.ctx_ = ctx
20766	return c
20767}
20768
20769// Header returns an http.Header that can be modified by the caller to
20770// add HTTP headers to the request.
20771func (c *AdvertisersInsertCall) Header() http.Header {
20772	if c.header_ == nil {
20773		c.header_ = make(http.Header)
20774	}
20775	return c.header_
20776}
20777
20778func (c *AdvertisersInsertCall) doRequest(alt string) (*http.Response, error) {
20779	reqHeaders := make(http.Header)
20780	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
20781	for k, v := range c.header_ {
20782		reqHeaders[k] = v
20783	}
20784	reqHeaders.Set("User-Agent", c.s.userAgent())
20785	var body io.Reader = nil
20786	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20787	if err != nil {
20788		return nil, err
20789	}
20790	reqHeaders.Set("Content-Type", "application/json")
20791	c.urlParams_.Set("alt", alt)
20792	c.urlParams_.Set("prettyPrint", "false")
20793	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20794	urls += "?" + c.urlParams_.Encode()
20795	req, err := http.NewRequest("POST", urls, body)
20796	if err != nil {
20797		return nil, err
20798	}
20799	req.Header = reqHeaders
20800	googleapi.Expand(req.URL, map[string]string{
20801		"profileId": strconv.FormatInt(c.profileId, 10),
20802	})
20803	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20804}
20805
20806// Do executes the "dfareporting.advertisers.insert" call.
20807// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
20808// status code is an error. Response headers are in either
20809// *Advertiser.ServerResponse.Header or (if a response was returned at
20810// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20811// to check whether the returned error was because
20812// http.StatusNotModified was returned.
20813func (c *AdvertisersInsertCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20814	gensupport.SetOptions(c.urlParams_, opts...)
20815	res, err := c.doRequest("json")
20816	if res != nil && res.StatusCode == http.StatusNotModified {
20817		if res.Body != nil {
20818			res.Body.Close()
20819		}
20820		return nil, &googleapi.Error{
20821			Code:   res.StatusCode,
20822			Header: res.Header,
20823		}
20824	}
20825	if err != nil {
20826		return nil, err
20827	}
20828	defer googleapi.CloseBody(res)
20829	if err := googleapi.CheckResponse(res); err != nil {
20830		return nil, err
20831	}
20832	ret := &Advertiser{
20833		ServerResponse: googleapi.ServerResponse{
20834			Header:         res.Header,
20835			HTTPStatusCode: res.StatusCode,
20836		},
20837	}
20838	target := &ret
20839	if err := gensupport.DecodeResponse(target, res); err != nil {
20840		return nil, err
20841	}
20842	return ret, nil
20843	// {
20844	//   "description": "Inserts a new advertiser.",
20845	//   "flatPath": "userprofiles/{profileId}/advertisers",
20846	//   "httpMethod": "POST",
20847	//   "id": "dfareporting.advertisers.insert",
20848	//   "parameterOrder": [
20849	//     "profileId"
20850	//   ],
20851	//   "parameters": {
20852	//     "profileId": {
20853	//       "description": "User profile ID associated with this request.",
20854	//       "format": "int64",
20855	//       "location": "path",
20856	//       "required": true,
20857	//       "type": "string"
20858	//     }
20859	//   },
20860	//   "path": "userprofiles/{profileId}/advertisers",
20861	//   "request": {
20862	//     "$ref": "Advertiser"
20863	//   },
20864	//   "response": {
20865	//     "$ref": "Advertiser"
20866	//   },
20867	//   "scopes": [
20868	//     "https://www.googleapis.com/auth/dfatrafficking"
20869	//   ]
20870	// }
20871
20872}
20873
20874// method id "dfareporting.advertisers.list":
20875
20876type AdvertisersListCall struct {
20877	s            *Service
20878	profileId    int64
20879	urlParams_   gensupport.URLParams
20880	ifNoneMatch_ string
20881	ctx_         context.Context
20882	header_      http.Header
20883}
20884
20885// List: Retrieves a list of advertisers, possibly filtered. This method
20886// supports paging.
20887//
20888// - profileId: User profile ID associated with this request.
20889func (r *AdvertisersService) List(profileId int64) *AdvertisersListCall {
20890	c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20891	c.profileId = profileId
20892	return c
20893}
20894
20895// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
20896// Select only advertisers with these advertiser group IDs.
20897func (c *AdvertisersListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *AdvertisersListCall {
20898	var advertiserGroupIds_ []string
20899	for _, v := range advertiserGroupIds {
20900		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
20901	}
20902	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
20903	return c
20904}
20905
20906// FloodlightConfigurationIds sets the optional parameter
20907// "floodlightConfigurationIds": Select only advertisers with these
20908// floodlight configuration IDs.
20909func (c *AdvertisersListCall) FloodlightConfigurationIds(floodlightConfigurationIds ...int64) *AdvertisersListCall {
20910	var floodlightConfigurationIds_ []string
20911	for _, v := range floodlightConfigurationIds {
20912		floodlightConfigurationIds_ = append(floodlightConfigurationIds_, fmt.Sprint(v))
20913	}
20914	c.urlParams_.SetMulti("floodlightConfigurationIds", floodlightConfigurationIds_)
20915	return c
20916}
20917
20918// Ids sets the optional parameter "ids": Select only advertisers with
20919// these IDs.
20920func (c *AdvertisersListCall) Ids(ids ...int64) *AdvertisersListCall {
20921	var ids_ []string
20922	for _, v := range ids {
20923		ids_ = append(ids_, fmt.Sprint(v))
20924	}
20925	c.urlParams_.SetMulti("ids", ids_)
20926	return c
20927}
20928
20929// IncludeAdvertisersWithoutGroupsOnly sets the optional parameter
20930// "includeAdvertisersWithoutGroupsOnly": Select only advertisers which
20931// do not belong to any advertiser group.
20932func (c *AdvertisersListCall) IncludeAdvertisersWithoutGroupsOnly(includeAdvertisersWithoutGroupsOnly bool) *AdvertisersListCall {
20933	c.urlParams_.Set("includeAdvertisersWithoutGroupsOnly", fmt.Sprint(includeAdvertisersWithoutGroupsOnly))
20934	return c
20935}
20936
20937// MaxResults sets the optional parameter "maxResults": Maximum number
20938// of results to return.
20939func (c *AdvertisersListCall) MaxResults(maxResults int64) *AdvertisersListCall {
20940	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20941	return c
20942}
20943
20944// OnlyParent sets the optional parameter "onlyParent": Select only
20945// advertisers which use another advertiser's floodlight configuration.
20946func (c *AdvertisersListCall) OnlyParent(onlyParent bool) *AdvertisersListCall {
20947	c.urlParams_.Set("onlyParent", fmt.Sprint(onlyParent))
20948	return c
20949}
20950
20951// PageToken sets the optional parameter "pageToken": Value of the
20952// nextPageToken from the previous result page.
20953func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall {
20954	c.urlParams_.Set("pageToken", pageToken)
20955	return c
20956}
20957
20958// SearchString sets the optional parameter "searchString": Allows
20959// searching for objects by name or ID. Wildcards (*) are allowed. For
20960// example, "advertiser*2015" will return objects with names like
20961// "advertiser June 2015", "advertiser April 2015", or simply
20962// "advertiser 2015". Most of the searches also add wildcards implicitly
20963// at the start and the end of the search string. For example, a search
20964// string of "advertiser" will match objects with name "my advertiser",
20965// "advertiser 2015", or simply "advertiser" .
20966func (c *AdvertisersListCall) SearchString(searchString string) *AdvertisersListCall {
20967	c.urlParams_.Set("searchString", searchString)
20968	return c
20969}
20970
20971// SortField sets the optional parameter "sortField": Field by which to
20972// sort the list.
20973//
20974// Possible values:
20975//   "ID" (default)
20976//   "NAME"
20977func (c *AdvertisersListCall) SortField(sortField string) *AdvertisersListCall {
20978	c.urlParams_.Set("sortField", sortField)
20979	return c
20980}
20981
20982// SortOrder sets the optional parameter "sortOrder": Order of sorted
20983// results.
20984//
20985// Possible values:
20986//   "ASCENDING" (default)
20987//   "DESCENDING"
20988func (c *AdvertisersListCall) SortOrder(sortOrder string) *AdvertisersListCall {
20989	c.urlParams_.Set("sortOrder", sortOrder)
20990	return c
20991}
20992
20993// Status sets the optional parameter "status": Select only advertisers
20994// with the specified status.
20995//
20996// Possible values:
20997//   "APPROVED"
20998//   "ON_HOLD"
20999func (c *AdvertisersListCall) Status(status string) *AdvertisersListCall {
21000	c.urlParams_.Set("status", status)
21001	return c
21002}
21003
21004// SubaccountId sets the optional parameter "subaccountId": Select only
21005// advertisers with these subaccount IDs.
21006func (c *AdvertisersListCall) SubaccountId(subaccountId int64) *AdvertisersListCall {
21007	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
21008	return c
21009}
21010
21011// Fields allows partial responses to be retrieved. See
21012// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21013// for more information.
21014func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall {
21015	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21016	return c
21017}
21018
21019// IfNoneMatch sets the optional parameter which makes the operation
21020// fail if the object's ETag matches the given value. This is useful for
21021// getting updates only after the object has changed since the last
21022// request. Use googleapi.IsNotModified to check whether the response
21023// error from Do is the result of In-None-Match.
21024func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall {
21025	c.ifNoneMatch_ = entityTag
21026	return c
21027}
21028
21029// Context sets the context to be used in this call's Do method. Any
21030// pending HTTP request will be aborted if the provided context is
21031// canceled.
21032func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
21033	c.ctx_ = ctx
21034	return c
21035}
21036
21037// Header returns an http.Header that can be modified by the caller to
21038// add HTTP headers to the request.
21039func (c *AdvertisersListCall) Header() http.Header {
21040	if c.header_ == nil {
21041		c.header_ = make(http.Header)
21042	}
21043	return c.header_
21044}
21045
21046func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
21047	reqHeaders := make(http.Header)
21048	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
21049	for k, v := range c.header_ {
21050		reqHeaders[k] = v
21051	}
21052	reqHeaders.Set("User-Agent", c.s.userAgent())
21053	if c.ifNoneMatch_ != "" {
21054		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21055	}
21056	var body io.Reader = nil
21057	c.urlParams_.Set("alt", alt)
21058	c.urlParams_.Set("prettyPrint", "false")
21059	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
21060	urls += "?" + c.urlParams_.Encode()
21061	req, err := http.NewRequest("GET", urls, body)
21062	if err != nil {
21063		return nil, err
21064	}
21065	req.Header = reqHeaders
21066	googleapi.Expand(req.URL, map[string]string{
21067		"profileId": strconv.FormatInt(c.profileId, 10),
21068	})
21069	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21070}
21071
21072// Do executes the "dfareporting.advertisers.list" call.
21073// Exactly one of *AdvertisersListResponse or error will be non-nil. Any
21074// non-2xx status code is an error. Response headers are in either
21075// *AdvertisersListResponse.ServerResponse.Header or (if a response was
21076// returned at all) in error.(*googleapi.Error).Header. Use
21077// googleapi.IsNotModified to check whether the returned error was
21078// because http.StatusNotModified was returned.
21079func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*AdvertisersListResponse, error) {
21080	gensupport.SetOptions(c.urlParams_, opts...)
21081	res, err := c.doRequest("json")
21082	if res != nil && res.StatusCode == http.StatusNotModified {
21083		if res.Body != nil {
21084			res.Body.Close()
21085		}
21086		return nil, &googleapi.Error{
21087			Code:   res.StatusCode,
21088			Header: res.Header,
21089		}
21090	}
21091	if err != nil {
21092		return nil, err
21093	}
21094	defer googleapi.CloseBody(res)
21095	if err := googleapi.CheckResponse(res); err != nil {
21096		return nil, err
21097	}
21098	ret := &AdvertisersListResponse{
21099		ServerResponse: googleapi.ServerResponse{
21100			Header:         res.Header,
21101			HTTPStatusCode: res.StatusCode,
21102		},
21103	}
21104	target := &ret
21105	if err := gensupport.DecodeResponse(target, res); err != nil {
21106		return nil, err
21107	}
21108	return ret, nil
21109	// {
21110	//   "description": "Retrieves a list of advertisers, possibly filtered. This method supports paging.",
21111	//   "flatPath": "userprofiles/{profileId}/advertisers",
21112	//   "httpMethod": "GET",
21113	//   "id": "dfareporting.advertisers.list",
21114	//   "parameterOrder": [
21115	//     "profileId"
21116	//   ],
21117	//   "parameters": {
21118	//     "advertiserGroupIds": {
21119	//       "description": "Select only advertisers with these advertiser group IDs.",
21120	//       "format": "int64",
21121	//       "location": "query",
21122	//       "repeated": true,
21123	//       "type": "string"
21124	//     },
21125	//     "floodlightConfigurationIds": {
21126	//       "description": "Select only advertisers with these floodlight configuration IDs.",
21127	//       "format": "int64",
21128	//       "location": "query",
21129	//       "repeated": true,
21130	//       "type": "string"
21131	//     },
21132	//     "ids": {
21133	//       "description": "Select only advertisers with these IDs.",
21134	//       "format": "int64",
21135	//       "location": "query",
21136	//       "repeated": true,
21137	//       "type": "string"
21138	//     },
21139	//     "includeAdvertisersWithoutGroupsOnly": {
21140	//       "description": "Select only advertisers which do not belong to any advertiser group.",
21141	//       "location": "query",
21142	//       "type": "boolean"
21143	//     },
21144	//     "maxResults": {
21145	//       "default": "1000",
21146	//       "description": "Maximum number of results to return.",
21147	//       "format": "int32",
21148	//       "location": "query",
21149	//       "maximum": "1000",
21150	//       "minimum": "0",
21151	//       "type": "integer"
21152	//     },
21153	//     "onlyParent": {
21154	//       "description": "Select only advertisers which use another advertiser's floodlight configuration.",
21155	//       "location": "query",
21156	//       "type": "boolean"
21157	//     },
21158	//     "pageToken": {
21159	//       "description": "Value of the nextPageToken from the previous result page.",
21160	//       "location": "query",
21161	//       "type": "string"
21162	//     },
21163	//     "profileId": {
21164	//       "description": "User profile ID associated with this request.",
21165	//       "format": "int64",
21166	//       "location": "path",
21167	//       "required": true,
21168	//       "type": "string"
21169	//     },
21170	//     "searchString": {
21171	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"advertiser*2015\" will return objects with names like \"advertiser June 2015\", \"advertiser April 2015\", or simply \"advertiser 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"advertiser\" will match objects with name \"my advertiser\", \"advertiser 2015\", or simply \"advertiser\" .",
21172	//       "location": "query",
21173	//       "type": "string"
21174	//     },
21175	//     "sortField": {
21176	//       "default": "ID",
21177	//       "description": "Field by which to sort the list.",
21178	//       "enum": [
21179	//         "ID",
21180	//         "NAME"
21181	//       ],
21182	//       "enumDescriptions": [
21183	//         "",
21184	//         ""
21185	//       ],
21186	//       "location": "query",
21187	//       "type": "string"
21188	//     },
21189	//     "sortOrder": {
21190	//       "default": "ASCENDING",
21191	//       "description": "Order of sorted results.",
21192	//       "enum": [
21193	//         "ASCENDING",
21194	//         "DESCENDING"
21195	//       ],
21196	//       "enumDescriptions": [
21197	//         "",
21198	//         ""
21199	//       ],
21200	//       "location": "query",
21201	//       "type": "string"
21202	//     },
21203	//     "status": {
21204	//       "description": "Select only advertisers with the specified status.",
21205	//       "enum": [
21206	//         "APPROVED",
21207	//         "ON_HOLD"
21208	//       ],
21209	//       "enumDescriptions": [
21210	//         "",
21211	//         ""
21212	//       ],
21213	//       "location": "query",
21214	//       "type": "string"
21215	//     },
21216	//     "subaccountId": {
21217	//       "description": "Select only advertisers with these subaccount IDs.",
21218	//       "format": "int64",
21219	//       "location": "query",
21220	//       "type": "string"
21221	//     }
21222	//   },
21223	//   "path": "userprofiles/{profileId}/advertisers",
21224	//   "response": {
21225	//     "$ref": "AdvertisersListResponse"
21226	//   },
21227	//   "scopes": [
21228	//     "https://www.googleapis.com/auth/dfatrafficking"
21229	//   ]
21230	// }
21231
21232}
21233
21234// Pages invokes f for each page of results.
21235// A non-nil error returned from f will halt the iteration.
21236// The provided context supersedes any context provided to the Context method.
21237func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*AdvertisersListResponse) error) error {
21238	c.ctx_ = ctx
21239	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21240	for {
21241		x, err := c.Do()
21242		if err != nil {
21243			return err
21244		}
21245		if err := f(x); err != nil {
21246			return err
21247		}
21248		if x.NextPageToken == "" {
21249			return nil
21250		}
21251		c.PageToken(x.NextPageToken)
21252	}
21253}
21254
21255// method id "dfareporting.advertisers.patch":
21256
21257type AdvertisersPatchCall struct {
21258	s          *Service
21259	profileId  int64
21260	advertiser *Advertiser
21261	urlParams_ gensupport.URLParams
21262	ctx_       context.Context
21263	header_    http.Header
21264}
21265
21266// Patch: Updates an existing advertiser. This method supports patch
21267// semantics.
21268//
21269// - id: Advertiser ID.
21270// - profileId: User profile ID associated with this request.
21271func (r *AdvertisersService) Patch(profileId int64, id int64, advertiser *Advertiser) *AdvertisersPatchCall {
21272	c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21273	c.profileId = profileId
21274	c.urlParams_.Set("id", fmt.Sprint(id))
21275	c.advertiser = advertiser
21276	return c
21277}
21278
21279// Fields allows partial responses to be retrieved. See
21280// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21281// for more information.
21282func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall {
21283	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21284	return c
21285}
21286
21287// Context sets the context to be used in this call's Do method. Any
21288// pending HTTP request will be aborted if the provided context is
21289// canceled.
21290func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
21291	c.ctx_ = ctx
21292	return c
21293}
21294
21295// Header returns an http.Header that can be modified by the caller to
21296// add HTTP headers to the request.
21297func (c *AdvertisersPatchCall) Header() http.Header {
21298	if c.header_ == nil {
21299		c.header_ = make(http.Header)
21300	}
21301	return c.header_
21302}
21303
21304func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
21305	reqHeaders := make(http.Header)
21306	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
21307	for k, v := range c.header_ {
21308		reqHeaders[k] = v
21309	}
21310	reqHeaders.Set("User-Agent", c.s.userAgent())
21311	var body io.Reader = nil
21312	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
21313	if err != nil {
21314		return nil, err
21315	}
21316	reqHeaders.Set("Content-Type", "application/json")
21317	c.urlParams_.Set("alt", alt)
21318	c.urlParams_.Set("prettyPrint", "false")
21319	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
21320	urls += "?" + c.urlParams_.Encode()
21321	req, err := http.NewRequest("PATCH", urls, body)
21322	if err != nil {
21323		return nil, err
21324	}
21325	req.Header = reqHeaders
21326	googleapi.Expand(req.URL, map[string]string{
21327		"profileId": strconv.FormatInt(c.profileId, 10),
21328	})
21329	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21330}
21331
21332// Do executes the "dfareporting.advertisers.patch" call.
21333// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
21334// status code is an error. Response headers are in either
21335// *Advertiser.ServerResponse.Header or (if a response was returned at
21336// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21337// to check whether the returned error was because
21338// http.StatusNotModified was returned.
21339func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
21340	gensupport.SetOptions(c.urlParams_, opts...)
21341	res, err := c.doRequest("json")
21342	if res != nil && res.StatusCode == http.StatusNotModified {
21343		if res.Body != nil {
21344			res.Body.Close()
21345		}
21346		return nil, &googleapi.Error{
21347			Code:   res.StatusCode,
21348			Header: res.Header,
21349		}
21350	}
21351	if err != nil {
21352		return nil, err
21353	}
21354	defer googleapi.CloseBody(res)
21355	if err := googleapi.CheckResponse(res); err != nil {
21356		return nil, err
21357	}
21358	ret := &Advertiser{
21359		ServerResponse: googleapi.ServerResponse{
21360			Header:         res.Header,
21361			HTTPStatusCode: res.StatusCode,
21362		},
21363	}
21364	target := &ret
21365	if err := gensupport.DecodeResponse(target, res); err != nil {
21366		return nil, err
21367	}
21368	return ret, nil
21369	// {
21370	//   "description": "Updates an existing advertiser. This method supports patch semantics.",
21371	//   "flatPath": "userprofiles/{profileId}/advertisers",
21372	//   "httpMethod": "PATCH",
21373	//   "id": "dfareporting.advertisers.patch",
21374	//   "parameterOrder": [
21375	//     "profileId",
21376	//     "id"
21377	//   ],
21378	//   "parameters": {
21379	//     "id": {
21380	//       "description": "Advertiser ID.",
21381	//       "format": "int64",
21382	//       "location": "query",
21383	//       "required": true,
21384	//       "type": "string"
21385	//     },
21386	//     "profileId": {
21387	//       "description": "User profile ID associated with this request.",
21388	//       "format": "int64",
21389	//       "location": "path",
21390	//       "required": true,
21391	//       "type": "string"
21392	//     }
21393	//   },
21394	//   "path": "userprofiles/{profileId}/advertisers",
21395	//   "request": {
21396	//     "$ref": "Advertiser"
21397	//   },
21398	//   "response": {
21399	//     "$ref": "Advertiser"
21400	//   },
21401	//   "scopes": [
21402	//     "https://www.googleapis.com/auth/dfatrafficking"
21403	//   ]
21404	// }
21405
21406}
21407
21408// method id "dfareporting.advertisers.update":
21409
21410type AdvertisersUpdateCall struct {
21411	s          *Service
21412	profileId  int64
21413	advertiser *Advertiser
21414	urlParams_ gensupport.URLParams
21415	ctx_       context.Context
21416	header_    http.Header
21417}
21418
21419// Update: Updates an existing advertiser.
21420//
21421// - profileId: User profile ID associated with this request.
21422func (r *AdvertisersService) Update(profileId int64, advertiser *Advertiser) *AdvertisersUpdateCall {
21423	c := &AdvertisersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21424	c.profileId = profileId
21425	c.advertiser = advertiser
21426	return c
21427}
21428
21429// Fields allows partial responses to be retrieved. See
21430// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21431// for more information.
21432func (c *AdvertisersUpdateCall) Fields(s ...googleapi.Field) *AdvertisersUpdateCall {
21433	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21434	return c
21435}
21436
21437// Context sets the context to be used in this call's Do method. Any
21438// pending HTTP request will be aborted if the provided context is
21439// canceled.
21440func (c *AdvertisersUpdateCall) Context(ctx context.Context) *AdvertisersUpdateCall {
21441	c.ctx_ = ctx
21442	return c
21443}
21444
21445// Header returns an http.Header that can be modified by the caller to
21446// add HTTP headers to the request.
21447func (c *AdvertisersUpdateCall) Header() http.Header {
21448	if c.header_ == nil {
21449		c.header_ = make(http.Header)
21450	}
21451	return c.header_
21452}
21453
21454func (c *AdvertisersUpdateCall) doRequest(alt string) (*http.Response, error) {
21455	reqHeaders := make(http.Header)
21456	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
21457	for k, v := range c.header_ {
21458		reqHeaders[k] = v
21459	}
21460	reqHeaders.Set("User-Agent", c.s.userAgent())
21461	var body io.Reader = nil
21462	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
21463	if err != nil {
21464		return nil, err
21465	}
21466	reqHeaders.Set("Content-Type", "application/json")
21467	c.urlParams_.Set("alt", alt)
21468	c.urlParams_.Set("prettyPrint", "false")
21469	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
21470	urls += "?" + c.urlParams_.Encode()
21471	req, err := http.NewRequest("PUT", urls, body)
21472	if err != nil {
21473		return nil, err
21474	}
21475	req.Header = reqHeaders
21476	googleapi.Expand(req.URL, map[string]string{
21477		"profileId": strconv.FormatInt(c.profileId, 10),
21478	})
21479	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21480}
21481
21482// Do executes the "dfareporting.advertisers.update" call.
21483// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
21484// status code is an error. Response headers are in either
21485// *Advertiser.ServerResponse.Header or (if a response was returned at
21486// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21487// to check whether the returned error was because
21488// http.StatusNotModified was returned.
21489func (c *AdvertisersUpdateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
21490	gensupport.SetOptions(c.urlParams_, opts...)
21491	res, err := c.doRequest("json")
21492	if res != nil && res.StatusCode == http.StatusNotModified {
21493		if res.Body != nil {
21494			res.Body.Close()
21495		}
21496		return nil, &googleapi.Error{
21497			Code:   res.StatusCode,
21498			Header: res.Header,
21499		}
21500	}
21501	if err != nil {
21502		return nil, err
21503	}
21504	defer googleapi.CloseBody(res)
21505	if err := googleapi.CheckResponse(res); err != nil {
21506		return nil, err
21507	}
21508	ret := &Advertiser{
21509		ServerResponse: googleapi.ServerResponse{
21510			Header:         res.Header,
21511			HTTPStatusCode: res.StatusCode,
21512		},
21513	}
21514	target := &ret
21515	if err := gensupport.DecodeResponse(target, res); err != nil {
21516		return nil, err
21517	}
21518	return ret, nil
21519	// {
21520	//   "description": "Updates an existing advertiser.",
21521	//   "flatPath": "userprofiles/{profileId}/advertisers",
21522	//   "httpMethod": "PUT",
21523	//   "id": "dfareporting.advertisers.update",
21524	//   "parameterOrder": [
21525	//     "profileId"
21526	//   ],
21527	//   "parameters": {
21528	//     "profileId": {
21529	//       "description": "User profile ID associated with this request.",
21530	//       "format": "int64",
21531	//       "location": "path",
21532	//       "required": true,
21533	//       "type": "string"
21534	//     }
21535	//   },
21536	//   "path": "userprofiles/{profileId}/advertisers",
21537	//   "request": {
21538	//     "$ref": "Advertiser"
21539	//   },
21540	//   "response": {
21541	//     "$ref": "Advertiser"
21542	//   },
21543	//   "scopes": [
21544	//     "https://www.googleapis.com/auth/dfatrafficking"
21545	//   ]
21546	// }
21547
21548}
21549
21550// method id "dfareporting.browsers.list":
21551
21552type BrowsersListCall struct {
21553	s            *Service
21554	profileId    int64
21555	urlParams_   gensupport.URLParams
21556	ifNoneMatch_ string
21557	ctx_         context.Context
21558	header_      http.Header
21559}
21560
21561// List: Retrieves a list of browsers.
21562//
21563// - profileId: User profile ID associated with this request.
21564func (r *BrowsersService) List(profileId int64) *BrowsersListCall {
21565	c := &BrowsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21566	c.profileId = profileId
21567	return c
21568}
21569
21570// Fields allows partial responses to be retrieved. See
21571// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21572// for more information.
21573func (c *BrowsersListCall) Fields(s ...googleapi.Field) *BrowsersListCall {
21574	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21575	return c
21576}
21577
21578// IfNoneMatch sets the optional parameter which makes the operation
21579// fail if the object's ETag matches the given value. This is useful for
21580// getting updates only after the object has changed since the last
21581// request. Use googleapi.IsNotModified to check whether the response
21582// error from Do is the result of In-None-Match.
21583func (c *BrowsersListCall) IfNoneMatch(entityTag string) *BrowsersListCall {
21584	c.ifNoneMatch_ = entityTag
21585	return c
21586}
21587
21588// Context sets the context to be used in this call's Do method. Any
21589// pending HTTP request will be aborted if the provided context is
21590// canceled.
21591func (c *BrowsersListCall) Context(ctx context.Context) *BrowsersListCall {
21592	c.ctx_ = ctx
21593	return c
21594}
21595
21596// Header returns an http.Header that can be modified by the caller to
21597// add HTTP headers to the request.
21598func (c *BrowsersListCall) Header() http.Header {
21599	if c.header_ == nil {
21600		c.header_ = make(http.Header)
21601	}
21602	return c.header_
21603}
21604
21605func (c *BrowsersListCall) doRequest(alt string) (*http.Response, error) {
21606	reqHeaders := make(http.Header)
21607	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
21608	for k, v := range c.header_ {
21609		reqHeaders[k] = v
21610	}
21611	reqHeaders.Set("User-Agent", c.s.userAgent())
21612	if c.ifNoneMatch_ != "" {
21613		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21614	}
21615	var body io.Reader = nil
21616	c.urlParams_.Set("alt", alt)
21617	c.urlParams_.Set("prettyPrint", "false")
21618	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/browsers")
21619	urls += "?" + c.urlParams_.Encode()
21620	req, err := http.NewRequest("GET", urls, body)
21621	if err != nil {
21622		return nil, err
21623	}
21624	req.Header = reqHeaders
21625	googleapi.Expand(req.URL, map[string]string{
21626		"profileId": strconv.FormatInt(c.profileId, 10),
21627	})
21628	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21629}
21630
21631// Do executes the "dfareporting.browsers.list" call.
21632// Exactly one of *BrowsersListResponse or error will be non-nil. Any
21633// non-2xx status code is an error. Response headers are in either
21634// *BrowsersListResponse.ServerResponse.Header or (if a response was
21635// returned at all) in error.(*googleapi.Error).Header. Use
21636// googleapi.IsNotModified to check whether the returned error was
21637// because http.StatusNotModified was returned.
21638func (c *BrowsersListCall) Do(opts ...googleapi.CallOption) (*BrowsersListResponse, error) {
21639	gensupport.SetOptions(c.urlParams_, opts...)
21640	res, err := c.doRequest("json")
21641	if res != nil && res.StatusCode == http.StatusNotModified {
21642		if res.Body != nil {
21643			res.Body.Close()
21644		}
21645		return nil, &googleapi.Error{
21646			Code:   res.StatusCode,
21647			Header: res.Header,
21648		}
21649	}
21650	if err != nil {
21651		return nil, err
21652	}
21653	defer googleapi.CloseBody(res)
21654	if err := googleapi.CheckResponse(res); err != nil {
21655		return nil, err
21656	}
21657	ret := &BrowsersListResponse{
21658		ServerResponse: googleapi.ServerResponse{
21659			Header:         res.Header,
21660			HTTPStatusCode: res.StatusCode,
21661		},
21662	}
21663	target := &ret
21664	if err := gensupport.DecodeResponse(target, res); err != nil {
21665		return nil, err
21666	}
21667	return ret, nil
21668	// {
21669	//   "description": "Retrieves a list of browsers.",
21670	//   "flatPath": "userprofiles/{profileId}/browsers",
21671	//   "httpMethod": "GET",
21672	//   "id": "dfareporting.browsers.list",
21673	//   "parameterOrder": [
21674	//     "profileId"
21675	//   ],
21676	//   "parameters": {
21677	//     "profileId": {
21678	//       "description": "User profile ID associated with this request.",
21679	//       "format": "int64",
21680	//       "location": "path",
21681	//       "required": true,
21682	//       "type": "string"
21683	//     }
21684	//   },
21685	//   "path": "userprofiles/{profileId}/browsers",
21686	//   "response": {
21687	//     "$ref": "BrowsersListResponse"
21688	//   },
21689	//   "scopes": [
21690	//     "https://www.googleapis.com/auth/dfatrafficking"
21691	//   ]
21692	// }
21693
21694}
21695
21696// method id "dfareporting.campaignCreativeAssociations.insert":
21697
21698type CampaignCreativeAssociationsInsertCall struct {
21699	s                           *Service
21700	profileId                   int64
21701	campaignId                  int64
21702	campaigncreativeassociation *CampaignCreativeAssociation
21703	urlParams_                  gensupport.URLParams
21704	ctx_                        context.Context
21705	header_                     http.Header
21706}
21707
21708// Insert: Associates a creative with the specified campaign. This
21709// method creates a default ad with dimensions matching the creative in
21710// the campaign if such a default ad does not exist already.
21711//
21712// - campaignId: Campaign ID in this association.
21713// - profileId: User profile ID associated with this request.
21714func (r *CampaignCreativeAssociationsService) Insert(profileId int64, campaignId int64, campaigncreativeassociation *CampaignCreativeAssociation) *CampaignCreativeAssociationsInsertCall {
21715	c := &CampaignCreativeAssociationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21716	c.profileId = profileId
21717	c.campaignId = campaignId
21718	c.campaigncreativeassociation = campaigncreativeassociation
21719	return c
21720}
21721
21722// Fields allows partial responses to be retrieved. See
21723// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21724// for more information.
21725func (c *CampaignCreativeAssociationsInsertCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsInsertCall {
21726	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21727	return c
21728}
21729
21730// Context sets the context to be used in this call's Do method. Any
21731// pending HTTP request will be aborted if the provided context is
21732// canceled.
21733func (c *CampaignCreativeAssociationsInsertCall) Context(ctx context.Context) *CampaignCreativeAssociationsInsertCall {
21734	c.ctx_ = ctx
21735	return c
21736}
21737
21738// Header returns an http.Header that can be modified by the caller to
21739// add HTTP headers to the request.
21740func (c *CampaignCreativeAssociationsInsertCall) Header() http.Header {
21741	if c.header_ == nil {
21742		c.header_ = make(http.Header)
21743	}
21744	return c.header_
21745}
21746
21747func (c *CampaignCreativeAssociationsInsertCall) doRequest(alt string) (*http.Response, error) {
21748	reqHeaders := make(http.Header)
21749	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
21750	for k, v := range c.header_ {
21751		reqHeaders[k] = v
21752	}
21753	reqHeaders.Set("User-Agent", c.s.userAgent())
21754	var body io.Reader = nil
21755	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaigncreativeassociation)
21756	if err != nil {
21757		return nil, err
21758	}
21759	reqHeaders.Set("Content-Type", "application/json")
21760	c.urlParams_.Set("alt", alt)
21761	c.urlParams_.Set("prettyPrint", "false")
21762	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
21763	urls += "?" + c.urlParams_.Encode()
21764	req, err := http.NewRequest("POST", urls, body)
21765	if err != nil {
21766		return nil, err
21767	}
21768	req.Header = reqHeaders
21769	googleapi.Expand(req.URL, map[string]string{
21770		"profileId":  strconv.FormatInt(c.profileId, 10),
21771		"campaignId": strconv.FormatInt(c.campaignId, 10),
21772	})
21773	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21774}
21775
21776// Do executes the "dfareporting.campaignCreativeAssociations.insert" call.
21777// Exactly one of *CampaignCreativeAssociation or error will be non-nil.
21778// Any non-2xx status code is an error. Response headers are in either
21779// *CampaignCreativeAssociation.ServerResponse.Header or (if a response
21780// was returned at all) in error.(*googleapi.Error).Header. Use
21781// googleapi.IsNotModified to check whether the returned error was
21782// because http.StatusNotModified was returned.
21783func (c *CampaignCreativeAssociationsInsertCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociation, error) {
21784	gensupport.SetOptions(c.urlParams_, opts...)
21785	res, err := c.doRequest("json")
21786	if res != nil && res.StatusCode == http.StatusNotModified {
21787		if res.Body != nil {
21788			res.Body.Close()
21789		}
21790		return nil, &googleapi.Error{
21791			Code:   res.StatusCode,
21792			Header: res.Header,
21793		}
21794	}
21795	if err != nil {
21796		return nil, err
21797	}
21798	defer googleapi.CloseBody(res)
21799	if err := googleapi.CheckResponse(res); err != nil {
21800		return nil, err
21801	}
21802	ret := &CampaignCreativeAssociation{
21803		ServerResponse: googleapi.ServerResponse{
21804			Header:         res.Header,
21805			HTTPStatusCode: res.StatusCode,
21806		},
21807	}
21808	target := &ret
21809	if err := gensupport.DecodeResponse(target, res); err != nil {
21810		return nil, err
21811	}
21812	return ret, nil
21813	// {
21814	//   "description": "Associates a creative with the specified campaign. This method creates a default ad with dimensions matching the creative in the campaign if such a default ad does not exist already.",
21815	//   "flatPath": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
21816	//   "httpMethod": "POST",
21817	//   "id": "dfareporting.campaignCreativeAssociations.insert",
21818	//   "parameterOrder": [
21819	//     "profileId",
21820	//     "campaignId"
21821	//   ],
21822	//   "parameters": {
21823	//     "campaignId": {
21824	//       "description": "Campaign ID in this association.",
21825	//       "format": "int64",
21826	//       "location": "path",
21827	//       "required": true,
21828	//       "type": "string"
21829	//     },
21830	//     "profileId": {
21831	//       "description": "User profile ID associated with this request.",
21832	//       "format": "int64",
21833	//       "location": "path",
21834	//       "required": true,
21835	//       "type": "string"
21836	//     }
21837	//   },
21838	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
21839	//   "request": {
21840	//     "$ref": "CampaignCreativeAssociation"
21841	//   },
21842	//   "response": {
21843	//     "$ref": "CampaignCreativeAssociation"
21844	//   },
21845	//   "scopes": [
21846	//     "https://www.googleapis.com/auth/dfatrafficking"
21847	//   ]
21848	// }
21849
21850}
21851
21852// method id "dfareporting.campaignCreativeAssociations.list":
21853
21854type CampaignCreativeAssociationsListCall struct {
21855	s            *Service
21856	profileId    int64
21857	campaignId   int64
21858	urlParams_   gensupport.URLParams
21859	ifNoneMatch_ string
21860	ctx_         context.Context
21861	header_      http.Header
21862}
21863
21864// List: Retrieves the list of creative IDs associated with the
21865// specified campaign. This method supports paging.
21866//
21867// - campaignId: Campaign ID in this association.
21868// - profileId: User profile ID associated with this request.
21869func (r *CampaignCreativeAssociationsService) List(profileId int64, campaignId int64) *CampaignCreativeAssociationsListCall {
21870	c := &CampaignCreativeAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21871	c.profileId = profileId
21872	c.campaignId = campaignId
21873	return c
21874}
21875
21876// MaxResults sets the optional parameter "maxResults": Maximum number
21877// of results to return.
21878func (c *CampaignCreativeAssociationsListCall) MaxResults(maxResults int64) *CampaignCreativeAssociationsListCall {
21879	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21880	return c
21881}
21882
21883// PageToken sets the optional parameter "pageToken": Value of the
21884// nextPageToken from the previous result page.
21885func (c *CampaignCreativeAssociationsListCall) PageToken(pageToken string) *CampaignCreativeAssociationsListCall {
21886	c.urlParams_.Set("pageToken", pageToken)
21887	return c
21888}
21889
21890// SortOrder sets the optional parameter "sortOrder": Order of sorted
21891// results.
21892//
21893// Possible values:
21894//   "ASCENDING" (default)
21895//   "DESCENDING"
21896func (c *CampaignCreativeAssociationsListCall) SortOrder(sortOrder string) *CampaignCreativeAssociationsListCall {
21897	c.urlParams_.Set("sortOrder", sortOrder)
21898	return c
21899}
21900
21901// Fields allows partial responses to be retrieved. See
21902// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21903// for more information.
21904func (c *CampaignCreativeAssociationsListCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsListCall {
21905	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21906	return c
21907}
21908
21909// IfNoneMatch sets the optional parameter which makes the operation
21910// fail if the object's ETag matches the given value. This is useful for
21911// getting updates only after the object has changed since the last
21912// request. Use googleapi.IsNotModified to check whether the response
21913// error from Do is the result of In-None-Match.
21914func (c *CampaignCreativeAssociationsListCall) IfNoneMatch(entityTag string) *CampaignCreativeAssociationsListCall {
21915	c.ifNoneMatch_ = entityTag
21916	return c
21917}
21918
21919// Context sets the context to be used in this call's Do method. Any
21920// pending HTTP request will be aborted if the provided context is
21921// canceled.
21922func (c *CampaignCreativeAssociationsListCall) Context(ctx context.Context) *CampaignCreativeAssociationsListCall {
21923	c.ctx_ = ctx
21924	return c
21925}
21926
21927// Header returns an http.Header that can be modified by the caller to
21928// add HTTP headers to the request.
21929func (c *CampaignCreativeAssociationsListCall) Header() http.Header {
21930	if c.header_ == nil {
21931		c.header_ = make(http.Header)
21932	}
21933	return c.header_
21934}
21935
21936func (c *CampaignCreativeAssociationsListCall) doRequest(alt string) (*http.Response, error) {
21937	reqHeaders := make(http.Header)
21938	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
21939	for k, v := range c.header_ {
21940		reqHeaders[k] = v
21941	}
21942	reqHeaders.Set("User-Agent", c.s.userAgent())
21943	if c.ifNoneMatch_ != "" {
21944		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21945	}
21946	var body io.Reader = nil
21947	c.urlParams_.Set("alt", alt)
21948	c.urlParams_.Set("prettyPrint", "false")
21949	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
21950	urls += "?" + c.urlParams_.Encode()
21951	req, err := http.NewRequest("GET", urls, body)
21952	if err != nil {
21953		return nil, err
21954	}
21955	req.Header = reqHeaders
21956	googleapi.Expand(req.URL, map[string]string{
21957		"profileId":  strconv.FormatInt(c.profileId, 10),
21958		"campaignId": strconv.FormatInt(c.campaignId, 10),
21959	})
21960	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21961}
21962
21963// Do executes the "dfareporting.campaignCreativeAssociations.list" call.
21964// Exactly one of *CampaignCreativeAssociationsListResponse or error
21965// will be non-nil. Any non-2xx status code is an error. Response
21966// headers are in either
21967// *CampaignCreativeAssociationsListResponse.ServerResponse.Header or
21968// (if a response was returned at all) in
21969// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21970// whether the returned error was because http.StatusNotModified was
21971// returned.
21972func (c *CampaignCreativeAssociationsListCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociationsListResponse, error) {
21973	gensupport.SetOptions(c.urlParams_, opts...)
21974	res, err := c.doRequest("json")
21975	if res != nil && res.StatusCode == http.StatusNotModified {
21976		if res.Body != nil {
21977			res.Body.Close()
21978		}
21979		return nil, &googleapi.Error{
21980			Code:   res.StatusCode,
21981			Header: res.Header,
21982		}
21983	}
21984	if err != nil {
21985		return nil, err
21986	}
21987	defer googleapi.CloseBody(res)
21988	if err := googleapi.CheckResponse(res); err != nil {
21989		return nil, err
21990	}
21991	ret := &CampaignCreativeAssociationsListResponse{
21992		ServerResponse: googleapi.ServerResponse{
21993			Header:         res.Header,
21994			HTTPStatusCode: res.StatusCode,
21995		},
21996	}
21997	target := &ret
21998	if err := gensupport.DecodeResponse(target, res); err != nil {
21999		return nil, err
22000	}
22001	return ret, nil
22002	// {
22003	//   "description": "Retrieves the list of creative IDs associated with the specified campaign. This method supports paging.",
22004	//   "flatPath": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
22005	//   "httpMethod": "GET",
22006	//   "id": "dfareporting.campaignCreativeAssociations.list",
22007	//   "parameterOrder": [
22008	//     "profileId",
22009	//     "campaignId"
22010	//   ],
22011	//   "parameters": {
22012	//     "campaignId": {
22013	//       "description": "Campaign ID in this association.",
22014	//       "format": "int64",
22015	//       "location": "path",
22016	//       "required": true,
22017	//       "type": "string"
22018	//     },
22019	//     "maxResults": {
22020	//       "default": "1000",
22021	//       "description": "Maximum number of results to return.",
22022	//       "format": "int32",
22023	//       "location": "query",
22024	//       "maximum": "1000",
22025	//       "minimum": "0",
22026	//       "type": "integer"
22027	//     },
22028	//     "pageToken": {
22029	//       "description": "Value of the nextPageToken from the previous result page.",
22030	//       "location": "query",
22031	//       "type": "string"
22032	//     },
22033	//     "profileId": {
22034	//       "description": "User profile ID associated with this request.",
22035	//       "format": "int64",
22036	//       "location": "path",
22037	//       "required": true,
22038	//       "type": "string"
22039	//     },
22040	//     "sortOrder": {
22041	//       "default": "ASCENDING",
22042	//       "description": "Order of sorted results.",
22043	//       "enum": [
22044	//         "ASCENDING",
22045	//         "DESCENDING"
22046	//       ],
22047	//       "enumDescriptions": [
22048	//         "",
22049	//         ""
22050	//       ],
22051	//       "location": "query",
22052	//       "type": "string"
22053	//     }
22054	//   },
22055	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
22056	//   "response": {
22057	//     "$ref": "CampaignCreativeAssociationsListResponse"
22058	//   },
22059	//   "scopes": [
22060	//     "https://www.googleapis.com/auth/dfatrafficking"
22061	//   ]
22062	// }
22063
22064}
22065
22066// Pages invokes f for each page of results.
22067// A non-nil error returned from f will halt the iteration.
22068// The provided context supersedes any context provided to the Context method.
22069func (c *CampaignCreativeAssociationsListCall) Pages(ctx context.Context, f func(*CampaignCreativeAssociationsListResponse) error) error {
22070	c.ctx_ = ctx
22071	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22072	for {
22073		x, err := c.Do()
22074		if err != nil {
22075			return err
22076		}
22077		if err := f(x); err != nil {
22078			return err
22079		}
22080		if x.NextPageToken == "" {
22081			return nil
22082		}
22083		c.PageToken(x.NextPageToken)
22084	}
22085}
22086
22087// method id "dfareporting.campaigns.get":
22088
22089type CampaignsGetCall struct {
22090	s            *Service
22091	profileId    int64
22092	id           int64
22093	urlParams_   gensupport.URLParams
22094	ifNoneMatch_ string
22095	ctx_         context.Context
22096	header_      http.Header
22097}
22098
22099// Get: Gets one campaign by ID.
22100//
22101// - id: Campaign ID.
22102// - profileId: User profile ID associated with this request.
22103func (r *CampaignsService) Get(profileId int64, id int64) *CampaignsGetCall {
22104	c := &CampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22105	c.profileId = profileId
22106	c.id = id
22107	return c
22108}
22109
22110// Fields allows partial responses to be retrieved. See
22111// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22112// for more information.
22113func (c *CampaignsGetCall) Fields(s ...googleapi.Field) *CampaignsGetCall {
22114	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22115	return c
22116}
22117
22118// IfNoneMatch sets the optional parameter which makes the operation
22119// fail if the object's ETag matches the given value. This is useful for
22120// getting updates only after the object has changed since the last
22121// request. Use googleapi.IsNotModified to check whether the response
22122// error from Do is the result of In-None-Match.
22123func (c *CampaignsGetCall) IfNoneMatch(entityTag string) *CampaignsGetCall {
22124	c.ifNoneMatch_ = entityTag
22125	return c
22126}
22127
22128// Context sets the context to be used in this call's Do method. Any
22129// pending HTTP request will be aborted if the provided context is
22130// canceled.
22131func (c *CampaignsGetCall) Context(ctx context.Context) *CampaignsGetCall {
22132	c.ctx_ = ctx
22133	return c
22134}
22135
22136// Header returns an http.Header that can be modified by the caller to
22137// add HTTP headers to the request.
22138func (c *CampaignsGetCall) Header() http.Header {
22139	if c.header_ == nil {
22140		c.header_ = make(http.Header)
22141	}
22142	return c.header_
22143}
22144
22145func (c *CampaignsGetCall) doRequest(alt string) (*http.Response, error) {
22146	reqHeaders := make(http.Header)
22147	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
22148	for k, v := range c.header_ {
22149		reqHeaders[k] = v
22150	}
22151	reqHeaders.Set("User-Agent", c.s.userAgent())
22152	if c.ifNoneMatch_ != "" {
22153		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22154	}
22155	var body io.Reader = nil
22156	c.urlParams_.Set("alt", alt)
22157	c.urlParams_.Set("prettyPrint", "false")
22158	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{id}")
22159	urls += "?" + c.urlParams_.Encode()
22160	req, err := http.NewRequest("GET", urls, body)
22161	if err != nil {
22162		return nil, err
22163	}
22164	req.Header = reqHeaders
22165	googleapi.Expand(req.URL, map[string]string{
22166		"profileId": strconv.FormatInt(c.profileId, 10),
22167		"id":        strconv.FormatInt(c.id, 10),
22168	})
22169	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22170}
22171
22172// Do executes the "dfareporting.campaigns.get" call.
22173// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
22174// code is an error. Response headers are in either
22175// *Campaign.ServerResponse.Header or (if a response was returned at
22176// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22177// to check whether the returned error was because
22178// http.StatusNotModified was returned.
22179func (c *CampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
22180	gensupport.SetOptions(c.urlParams_, opts...)
22181	res, err := c.doRequest("json")
22182	if res != nil && res.StatusCode == http.StatusNotModified {
22183		if res.Body != nil {
22184			res.Body.Close()
22185		}
22186		return nil, &googleapi.Error{
22187			Code:   res.StatusCode,
22188			Header: res.Header,
22189		}
22190	}
22191	if err != nil {
22192		return nil, err
22193	}
22194	defer googleapi.CloseBody(res)
22195	if err := googleapi.CheckResponse(res); err != nil {
22196		return nil, err
22197	}
22198	ret := &Campaign{
22199		ServerResponse: googleapi.ServerResponse{
22200			Header:         res.Header,
22201			HTTPStatusCode: res.StatusCode,
22202		},
22203	}
22204	target := &ret
22205	if err := gensupport.DecodeResponse(target, res); err != nil {
22206		return nil, err
22207	}
22208	return ret, nil
22209	// {
22210	//   "description": "Gets one campaign by ID.",
22211	//   "flatPath": "userprofiles/{profileId}/campaigns/{id}",
22212	//   "httpMethod": "GET",
22213	//   "id": "dfareporting.campaigns.get",
22214	//   "parameterOrder": [
22215	//     "profileId",
22216	//     "id"
22217	//   ],
22218	//   "parameters": {
22219	//     "id": {
22220	//       "description": "Campaign ID.",
22221	//       "format": "int64",
22222	//       "location": "path",
22223	//       "required": true,
22224	//       "type": "string"
22225	//     },
22226	//     "profileId": {
22227	//       "description": "User profile ID associated with this request.",
22228	//       "format": "int64",
22229	//       "location": "path",
22230	//       "required": true,
22231	//       "type": "string"
22232	//     }
22233	//   },
22234	//   "path": "userprofiles/{profileId}/campaigns/{id}",
22235	//   "response": {
22236	//     "$ref": "Campaign"
22237	//   },
22238	//   "scopes": [
22239	//     "https://www.googleapis.com/auth/dfatrafficking"
22240	//   ]
22241	// }
22242
22243}
22244
22245// method id "dfareporting.campaigns.insert":
22246
22247type CampaignsInsertCall struct {
22248	s          *Service
22249	profileId  int64
22250	campaign   *Campaign
22251	urlParams_ gensupport.URLParams
22252	ctx_       context.Context
22253	header_    http.Header
22254}
22255
22256// Insert: Inserts a new campaign.
22257//
22258// - profileId: User profile ID associated with this request.
22259func (r *CampaignsService) Insert(profileId int64, campaign *Campaign) *CampaignsInsertCall {
22260	c := &CampaignsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22261	c.profileId = profileId
22262	c.campaign = campaign
22263	return c
22264}
22265
22266// Fields allows partial responses to be retrieved. See
22267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22268// for more information.
22269func (c *CampaignsInsertCall) Fields(s ...googleapi.Field) *CampaignsInsertCall {
22270	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22271	return c
22272}
22273
22274// Context sets the context to be used in this call's Do method. Any
22275// pending HTTP request will be aborted if the provided context is
22276// canceled.
22277func (c *CampaignsInsertCall) Context(ctx context.Context) *CampaignsInsertCall {
22278	c.ctx_ = ctx
22279	return c
22280}
22281
22282// Header returns an http.Header that can be modified by the caller to
22283// add HTTP headers to the request.
22284func (c *CampaignsInsertCall) Header() http.Header {
22285	if c.header_ == nil {
22286		c.header_ = make(http.Header)
22287	}
22288	return c.header_
22289}
22290
22291func (c *CampaignsInsertCall) doRequest(alt string) (*http.Response, error) {
22292	reqHeaders := make(http.Header)
22293	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
22294	for k, v := range c.header_ {
22295		reqHeaders[k] = v
22296	}
22297	reqHeaders.Set("User-Agent", c.s.userAgent())
22298	var body io.Reader = nil
22299	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
22300	if err != nil {
22301		return nil, err
22302	}
22303	reqHeaders.Set("Content-Type", "application/json")
22304	c.urlParams_.Set("alt", alt)
22305	c.urlParams_.Set("prettyPrint", "false")
22306	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
22307	urls += "?" + c.urlParams_.Encode()
22308	req, err := http.NewRequest("POST", urls, body)
22309	if err != nil {
22310		return nil, err
22311	}
22312	req.Header = reqHeaders
22313	googleapi.Expand(req.URL, map[string]string{
22314		"profileId": strconv.FormatInt(c.profileId, 10),
22315	})
22316	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22317}
22318
22319// Do executes the "dfareporting.campaigns.insert" call.
22320// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
22321// code is an error. Response headers are in either
22322// *Campaign.ServerResponse.Header or (if a response was returned at
22323// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22324// to check whether the returned error was because
22325// http.StatusNotModified was returned.
22326func (c *CampaignsInsertCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
22327	gensupport.SetOptions(c.urlParams_, opts...)
22328	res, err := c.doRequest("json")
22329	if res != nil && res.StatusCode == http.StatusNotModified {
22330		if res.Body != nil {
22331			res.Body.Close()
22332		}
22333		return nil, &googleapi.Error{
22334			Code:   res.StatusCode,
22335			Header: res.Header,
22336		}
22337	}
22338	if err != nil {
22339		return nil, err
22340	}
22341	defer googleapi.CloseBody(res)
22342	if err := googleapi.CheckResponse(res); err != nil {
22343		return nil, err
22344	}
22345	ret := &Campaign{
22346		ServerResponse: googleapi.ServerResponse{
22347			Header:         res.Header,
22348			HTTPStatusCode: res.StatusCode,
22349		},
22350	}
22351	target := &ret
22352	if err := gensupport.DecodeResponse(target, res); err != nil {
22353		return nil, err
22354	}
22355	return ret, nil
22356	// {
22357	//   "description": "Inserts a new campaign.",
22358	//   "flatPath": "userprofiles/{profileId}/campaigns",
22359	//   "httpMethod": "POST",
22360	//   "id": "dfareporting.campaigns.insert",
22361	//   "parameterOrder": [
22362	//     "profileId"
22363	//   ],
22364	//   "parameters": {
22365	//     "profileId": {
22366	//       "description": "User profile ID associated with this request.",
22367	//       "format": "int64",
22368	//       "location": "path",
22369	//       "required": true,
22370	//       "type": "string"
22371	//     }
22372	//   },
22373	//   "path": "userprofiles/{profileId}/campaigns",
22374	//   "request": {
22375	//     "$ref": "Campaign"
22376	//   },
22377	//   "response": {
22378	//     "$ref": "Campaign"
22379	//   },
22380	//   "scopes": [
22381	//     "https://www.googleapis.com/auth/dfatrafficking"
22382	//   ]
22383	// }
22384
22385}
22386
22387// method id "dfareporting.campaigns.list":
22388
22389type CampaignsListCall struct {
22390	s            *Service
22391	profileId    int64
22392	urlParams_   gensupport.URLParams
22393	ifNoneMatch_ string
22394	ctx_         context.Context
22395	header_      http.Header
22396}
22397
22398// List: Retrieves a list of campaigns, possibly filtered. This method
22399// supports paging.
22400//
22401// - profileId: User profile ID associated with this request.
22402func (r *CampaignsService) List(profileId int64) *CampaignsListCall {
22403	c := &CampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22404	c.profileId = profileId
22405	return c
22406}
22407
22408// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
22409// Select only campaigns whose advertisers belong to these advertiser
22410// groups.
22411func (c *CampaignsListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *CampaignsListCall {
22412	var advertiserGroupIds_ []string
22413	for _, v := range advertiserGroupIds {
22414		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
22415	}
22416	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
22417	return c
22418}
22419
22420// AdvertiserIds sets the optional parameter "advertiserIds": Select
22421// only campaigns that belong to these advertisers.
22422func (c *CampaignsListCall) AdvertiserIds(advertiserIds ...int64) *CampaignsListCall {
22423	var advertiserIds_ []string
22424	for _, v := range advertiserIds {
22425		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
22426	}
22427	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
22428	return c
22429}
22430
22431// Archived sets the optional parameter "archived": Select only archived
22432// campaigns. Don't set this field to select both archived and
22433// non-archived campaigns.
22434func (c *CampaignsListCall) Archived(archived bool) *CampaignsListCall {
22435	c.urlParams_.Set("archived", fmt.Sprint(archived))
22436	return c
22437}
22438
22439// AtLeastOneOptimizationActivity sets the optional parameter
22440// "atLeastOneOptimizationActivity": Select only campaigns that have at
22441// least one optimization activity.
22442func (c *CampaignsListCall) AtLeastOneOptimizationActivity(atLeastOneOptimizationActivity bool) *CampaignsListCall {
22443	c.urlParams_.Set("atLeastOneOptimizationActivity", fmt.Sprint(atLeastOneOptimizationActivity))
22444	return c
22445}
22446
22447// ExcludedIds sets the optional parameter "excludedIds": Exclude
22448// campaigns with these IDs.
22449func (c *CampaignsListCall) ExcludedIds(excludedIds ...int64) *CampaignsListCall {
22450	var excludedIds_ []string
22451	for _, v := range excludedIds {
22452		excludedIds_ = append(excludedIds_, fmt.Sprint(v))
22453	}
22454	c.urlParams_.SetMulti("excludedIds", excludedIds_)
22455	return c
22456}
22457
22458// Ids sets the optional parameter "ids": Select only campaigns with
22459// these IDs.
22460func (c *CampaignsListCall) Ids(ids ...int64) *CampaignsListCall {
22461	var ids_ []string
22462	for _, v := range ids {
22463		ids_ = append(ids_, fmt.Sprint(v))
22464	}
22465	c.urlParams_.SetMulti("ids", ids_)
22466	return c
22467}
22468
22469// MaxResults sets the optional parameter "maxResults": Maximum number
22470// of results to return.
22471func (c *CampaignsListCall) MaxResults(maxResults int64) *CampaignsListCall {
22472	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22473	return c
22474}
22475
22476// OverriddenEventTagId sets the optional parameter
22477// "overriddenEventTagId": Select only campaigns that have overridden
22478// this event tag ID.
22479func (c *CampaignsListCall) OverriddenEventTagId(overriddenEventTagId int64) *CampaignsListCall {
22480	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
22481	return c
22482}
22483
22484// PageToken sets the optional parameter "pageToken": Value of the
22485// nextPageToken from the previous result page.
22486func (c *CampaignsListCall) PageToken(pageToken string) *CampaignsListCall {
22487	c.urlParams_.Set("pageToken", pageToken)
22488	return c
22489}
22490
22491// SearchString sets the optional parameter "searchString": Allows
22492// searching for campaigns by name or ID. Wildcards (*) are allowed. For
22493// example, "campaign*2015" will return campaigns with names like
22494// "campaign June 2015", "campaign April 2015", or simply "campaign
22495// 2015". Most of the searches also add wildcards implicitly at the
22496// start and the end of the search string. For example, a search string
22497// of "campaign" will match campaigns with name "my campaign", "campaign
22498// 2015", or simply "campaign".
22499func (c *CampaignsListCall) SearchString(searchString string) *CampaignsListCall {
22500	c.urlParams_.Set("searchString", searchString)
22501	return c
22502}
22503
22504// SortField sets the optional parameter "sortField": Field by which to
22505// sort the list.
22506//
22507// Possible values:
22508//   "ID" (default)
22509//   "NAME"
22510func (c *CampaignsListCall) SortField(sortField string) *CampaignsListCall {
22511	c.urlParams_.Set("sortField", sortField)
22512	return c
22513}
22514
22515// SortOrder sets the optional parameter "sortOrder": Order of sorted
22516// results.
22517//
22518// Possible values:
22519//   "ASCENDING" (default)
22520//   "DESCENDING"
22521func (c *CampaignsListCall) SortOrder(sortOrder string) *CampaignsListCall {
22522	c.urlParams_.Set("sortOrder", sortOrder)
22523	return c
22524}
22525
22526// SubaccountId sets the optional parameter "subaccountId": Select only
22527// campaigns that belong to this subaccount.
22528func (c *CampaignsListCall) SubaccountId(subaccountId int64) *CampaignsListCall {
22529	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
22530	return c
22531}
22532
22533// Fields allows partial responses to be retrieved. See
22534// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22535// for more information.
22536func (c *CampaignsListCall) Fields(s ...googleapi.Field) *CampaignsListCall {
22537	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22538	return c
22539}
22540
22541// IfNoneMatch sets the optional parameter which makes the operation
22542// fail if the object's ETag matches the given value. This is useful for
22543// getting updates only after the object has changed since the last
22544// request. Use googleapi.IsNotModified to check whether the response
22545// error from Do is the result of In-None-Match.
22546func (c *CampaignsListCall) IfNoneMatch(entityTag string) *CampaignsListCall {
22547	c.ifNoneMatch_ = entityTag
22548	return c
22549}
22550
22551// Context sets the context to be used in this call's Do method. Any
22552// pending HTTP request will be aborted if the provided context is
22553// canceled.
22554func (c *CampaignsListCall) Context(ctx context.Context) *CampaignsListCall {
22555	c.ctx_ = ctx
22556	return c
22557}
22558
22559// Header returns an http.Header that can be modified by the caller to
22560// add HTTP headers to the request.
22561func (c *CampaignsListCall) Header() http.Header {
22562	if c.header_ == nil {
22563		c.header_ = make(http.Header)
22564	}
22565	return c.header_
22566}
22567
22568func (c *CampaignsListCall) doRequest(alt string) (*http.Response, error) {
22569	reqHeaders := make(http.Header)
22570	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
22571	for k, v := range c.header_ {
22572		reqHeaders[k] = v
22573	}
22574	reqHeaders.Set("User-Agent", c.s.userAgent())
22575	if c.ifNoneMatch_ != "" {
22576		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22577	}
22578	var body io.Reader = nil
22579	c.urlParams_.Set("alt", alt)
22580	c.urlParams_.Set("prettyPrint", "false")
22581	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
22582	urls += "?" + c.urlParams_.Encode()
22583	req, err := http.NewRequest("GET", urls, body)
22584	if err != nil {
22585		return nil, err
22586	}
22587	req.Header = reqHeaders
22588	googleapi.Expand(req.URL, map[string]string{
22589		"profileId": strconv.FormatInt(c.profileId, 10),
22590	})
22591	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22592}
22593
22594// Do executes the "dfareporting.campaigns.list" call.
22595// Exactly one of *CampaignsListResponse or error will be non-nil. Any
22596// non-2xx status code is an error. Response headers are in either
22597// *CampaignsListResponse.ServerResponse.Header or (if a response was
22598// returned at all) in error.(*googleapi.Error).Header. Use
22599// googleapi.IsNotModified to check whether the returned error was
22600// because http.StatusNotModified was returned.
22601func (c *CampaignsListCall) Do(opts ...googleapi.CallOption) (*CampaignsListResponse, error) {
22602	gensupport.SetOptions(c.urlParams_, opts...)
22603	res, err := c.doRequest("json")
22604	if res != nil && res.StatusCode == http.StatusNotModified {
22605		if res.Body != nil {
22606			res.Body.Close()
22607		}
22608		return nil, &googleapi.Error{
22609			Code:   res.StatusCode,
22610			Header: res.Header,
22611		}
22612	}
22613	if err != nil {
22614		return nil, err
22615	}
22616	defer googleapi.CloseBody(res)
22617	if err := googleapi.CheckResponse(res); err != nil {
22618		return nil, err
22619	}
22620	ret := &CampaignsListResponse{
22621		ServerResponse: googleapi.ServerResponse{
22622			Header:         res.Header,
22623			HTTPStatusCode: res.StatusCode,
22624		},
22625	}
22626	target := &ret
22627	if err := gensupport.DecodeResponse(target, res); err != nil {
22628		return nil, err
22629	}
22630	return ret, nil
22631	// {
22632	//   "description": "Retrieves a list of campaigns, possibly filtered. This method supports paging.",
22633	//   "flatPath": "userprofiles/{profileId}/campaigns",
22634	//   "httpMethod": "GET",
22635	//   "id": "dfareporting.campaigns.list",
22636	//   "parameterOrder": [
22637	//     "profileId"
22638	//   ],
22639	//   "parameters": {
22640	//     "advertiserGroupIds": {
22641	//       "description": "Select only campaigns whose advertisers belong to these advertiser groups.",
22642	//       "format": "int64",
22643	//       "location": "query",
22644	//       "repeated": true,
22645	//       "type": "string"
22646	//     },
22647	//     "advertiserIds": {
22648	//       "description": "Select only campaigns that belong to these advertisers.",
22649	//       "format": "int64",
22650	//       "location": "query",
22651	//       "repeated": true,
22652	//       "type": "string"
22653	//     },
22654	//     "archived": {
22655	//       "description": "Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns.",
22656	//       "location": "query",
22657	//       "type": "boolean"
22658	//     },
22659	//     "atLeastOneOptimizationActivity": {
22660	//       "description": "Select only campaigns that have at least one optimization activity.",
22661	//       "location": "query",
22662	//       "type": "boolean"
22663	//     },
22664	//     "excludedIds": {
22665	//       "description": "Exclude campaigns with these IDs.",
22666	//       "format": "int64",
22667	//       "location": "query",
22668	//       "repeated": true,
22669	//       "type": "string"
22670	//     },
22671	//     "ids": {
22672	//       "description": "Select only campaigns with these IDs.",
22673	//       "format": "int64",
22674	//       "location": "query",
22675	//       "repeated": true,
22676	//       "type": "string"
22677	//     },
22678	//     "maxResults": {
22679	//       "default": "1000",
22680	//       "description": "Maximum number of results to return.",
22681	//       "format": "int32",
22682	//       "location": "query",
22683	//       "maximum": "1000",
22684	//       "minimum": "0",
22685	//       "type": "integer"
22686	//     },
22687	//     "overriddenEventTagId": {
22688	//       "description": "Select only campaigns that have overridden this event tag ID.",
22689	//       "format": "int64",
22690	//       "location": "query",
22691	//       "type": "string"
22692	//     },
22693	//     "pageToken": {
22694	//       "description": "Value of the nextPageToken from the previous result page.",
22695	//       "location": "query",
22696	//       "type": "string"
22697	//     },
22698	//     "profileId": {
22699	//       "description": "User profile ID associated with this request.",
22700	//       "format": "int64",
22701	//       "location": "path",
22702	//       "required": true,
22703	//       "type": "string"
22704	//     },
22705	//     "searchString": {
22706	//       "description": "Allows searching for campaigns by name or ID. Wildcards (*) are allowed. For example, \"campaign*2015\" will return campaigns with names like \"campaign June 2015\", \"campaign April 2015\", or simply \"campaign 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"campaign\" will match campaigns with name \"my campaign\", \"campaign 2015\", or simply \"campaign\".",
22707	//       "location": "query",
22708	//       "type": "string"
22709	//     },
22710	//     "sortField": {
22711	//       "default": "ID",
22712	//       "description": "Field by which to sort the list.",
22713	//       "enum": [
22714	//         "ID",
22715	//         "NAME"
22716	//       ],
22717	//       "enumDescriptions": [
22718	//         "",
22719	//         ""
22720	//       ],
22721	//       "location": "query",
22722	//       "type": "string"
22723	//     },
22724	//     "sortOrder": {
22725	//       "default": "ASCENDING",
22726	//       "description": "Order of sorted results.",
22727	//       "enum": [
22728	//         "ASCENDING",
22729	//         "DESCENDING"
22730	//       ],
22731	//       "enumDescriptions": [
22732	//         "",
22733	//         ""
22734	//       ],
22735	//       "location": "query",
22736	//       "type": "string"
22737	//     },
22738	//     "subaccountId": {
22739	//       "description": "Select only campaigns that belong to this subaccount.",
22740	//       "format": "int64",
22741	//       "location": "query",
22742	//       "type": "string"
22743	//     }
22744	//   },
22745	//   "path": "userprofiles/{profileId}/campaigns",
22746	//   "response": {
22747	//     "$ref": "CampaignsListResponse"
22748	//   },
22749	//   "scopes": [
22750	//     "https://www.googleapis.com/auth/dfatrafficking"
22751	//   ]
22752	// }
22753
22754}
22755
22756// Pages invokes f for each page of results.
22757// A non-nil error returned from f will halt the iteration.
22758// The provided context supersedes any context provided to the Context method.
22759func (c *CampaignsListCall) Pages(ctx context.Context, f func(*CampaignsListResponse) error) error {
22760	c.ctx_ = ctx
22761	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22762	for {
22763		x, err := c.Do()
22764		if err != nil {
22765			return err
22766		}
22767		if err := f(x); err != nil {
22768			return err
22769		}
22770		if x.NextPageToken == "" {
22771			return nil
22772		}
22773		c.PageToken(x.NextPageToken)
22774	}
22775}
22776
22777// method id "dfareporting.campaigns.patch":
22778
22779type CampaignsPatchCall struct {
22780	s          *Service
22781	profileId  int64
22782	campaign   *Campaign
22783	urlParams_ gensupport.URLParams
22784	ctx_       context.Context
22785	header_    http.Header
22786}
22787
22788// Patch: Updates an existing campaign. This method supports patch
22789// semantics.
22790//
22791// - id: Campaign ID.
22792// - profileId: User profile ID associated with this request.
22793func (r *CampaignsService) Patch(profileId int64, id int64, campaign *Campaign) *CampaignsPatchCall {
22794	c := &CampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22795	c.profileId = profileId
22796	c.urlParams_.Set("id", fmt.Sprint(id))
22797	c.campaign = campaign
22798	return c
22799}
22800
22801// Fields allows partial responses to be retrieved. See
22802// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22803// for more information.
22804func (c *CampaignsPatchCall) Fields(s ...googleapi.Field) *CampaignsPatchCall {
22805	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22806	return c
22807}
22808
22809// Context sets the context to be used in this call's Do method. Any
22810// pending HTTP request will be aborted if the provided context is
22811// canceled.
22812func (c *CampaignsPatchCall) Context(ctx context.Context) *CampaignsPatchCall {
22813	c.ctx_ = ctx
22814	return c
22815}
22816
22817// Header returns an http.Header that can be modified by the caller to
22818// add HTTP headers to the request.
22819func (c *CampaignsPatchCall) Header() http.Header {
22820	if c.header_ == nil {
22821		c.header_ = make(http.Header)
22822	}
22823	return c.header_
22824}
22825
22826func (c *CampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
22827	reqHeaders := make(http.Header)
22828	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
22829	for k, v := range c.header_ {
22830		reqHeaders[k] = v
22831	}
22832	reqHeaders.Set("User-Agent", c.s.userAgent())
22833	var body io.Reader = nil
22834	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
22835	if err != nil {
22836		return nil, err
22837	}
22838	reqHeaders.Set("Content-Type", "application/json")
22839	c.urlParams_.Set("alt", alt)
22840	c.urlParams_.Set("prettyPrint", "false")
22841	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
22842	urls += "?" + c.urlParams_.Encode()
22843	req, err := http.NewRequest("PATCH", urls, body)
22844	if err != nil {
22845		return nil, err
22846	}
22847	req.Header = reqHeaders
22848	googleapi.Expand(req.URL, map[string]string{
22849		"profileId": strconv.FormatInt(c.profileId, 10),
22850	})
22851	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22852}
22853
22854// Do executes the "dfareporting.campaigns.patch" call.
22855// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
22856// code is an error. Response headers are in either
22857// *Campaign.ServerResponse.Header or (if a response was returned at
22858// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22859// to check whether the returned error was because
22860// http.StatusNotModified was returned.
22861func (c *CampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
22862	gensupport.SetOptions(c.urlParams_, opts...)
22863	res, err := c.doRequest("json")
22864	if res != nil && res.StatusCode == http.StatusNotModified {
22865		if res.Body != nil {
22866			res.Body.Close()
22867		}
22868		return nil, &googleapi.Error{
22869			Code:   res.StatusCode,
22870			Header: res.Header,
22871		}
22872	}
22873	if err != nil {
22874		return nil, err
22875	}
22876	defer googleapi.CloseBody(res)
22877	if err := googleapi.CheckResponse(res); err != nil {
22878		return nil, err
22879	}
22880	ret := &Campaign{
22881		ServerResponse: googleapi.ServerResponse{
22882			Header:         res.Header,
22883			HTTPStatusCode: res.StatusCode,
22884		},
22885	}
22886	target := &ret
22887	if err := gensupport.DecodeResponse(target, res); err != nil {
22888		return nil, err
22889	}
22890	return ret, nil
22891	// {
22892	//   "description": "Updates an existing campaign. This method supports patch semantics.",
22893	//   "flatPath": "userprofiles/{profileId}/campaigns",
22894	//   "httpMethod": "PATCH",
22895	//   "id": "dfareporting.campaigns.patch",
22896	//   "parameterOrder": [
22897	//     "profileId",
22898	//     "id"
22899	//   ],
22900	//   "parameters": {
22901	//     "id": {
22902	//       "description": "Campaign ID.",
22903	//       "format": "int64",
22904	//       "location": "query",
22905	//       "required": true,
22906	//       "type": "string"
22907	//     },
22908	//     "profileId": {
22909	//       "description": "User profile ID associated with this request.",
22910	//       "format": "int64",
22911	//       "location": "path",
22912	//       "required": true,
22913	//       "type": "string"
22914	//     }
22915	//   },
22916	//   "path": "userprofiles/{profileId}/campaigns",
22917	//   "request": {
22918	//     "$ref": "Campaign"
22919	//   },
22920	//   "response": {
22921	//     "$ref": "Campaign"
22922	//   },
22923	//   "scopes": [
22924	//     "https://www.googleapis.com/auth/dfatrafficking"
22925	//   ]
22926	// }
22927
22928}
22929
22930// method id "dfareporting.campaigns.update":
22931
22932type CampaignsUpdateCall struct {
22933	s          *Service
22934	profileId  int64
22935	campaign   *Campaign
22936	urlParams_ gensupport.URLParams
22937	ctx_       context.Context
22938	header_    http.Header
22939}
22940
22941// Update: Updates an existing campaign.
22942//
22943// - profileId: User profile ID associated with this request.
22944func (r *CampaignsService) Update(profileId int64, campaign *Campaign) *CampaignsUpdateCall {
22945	c := &CampaignsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22946	c.profileId = profileId
22947	c.campaign = campaign
22948	return c
22949}
22950
22951// Fields allows partial responses to be retrieved. See
22952// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22953// for more information.
22954func (c *CampaignsUpdateCall) Fields(s ...googleapi.Field) *CampaignsUpdateCall {
22955	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22956	return c
22957}
22958
22959// Context sets the context to be used in this call's Do method. Any
22960// pending HTTP request will be aborted if the provided context is
22961// canceled.
22962func (c *CampaignsUpdateCall) Context(ctx context.Context) *CampaignsUpdateCall {
22963	c.ctx_ = ctx
22964	return c
22965}
22966
22967// Header returns an http.Header that can be modified by the caller to
22968// add HTTP headers to the request.
22969func (c *CampaignsUpdateCall) Header() http.Header {
22970	if c.header_ == nil {
22971		c.header_ = make(http.Header)
22972	}
22973	return c.header_
22974}
22975
22976func (c *CampaignsUpdateCall) doRequest(alt string) (*http.Response, error) {
22977	reqHeaders := make(http.Header)
22978	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
22979	for k, v := range c.header_ {
22980		reqHeaders[k] = v
22981	}
22982	reqHeaders.Set("User-Agent", c.s.userAgent())
22983	var body io.Reader = nil
22984	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
22985	if err != nil {
22986		return nil, err
22987	}
22988	reqHeaders.Set("Content-Type", "application/json")
22989	c.urlParams_.Set("alt", alt)
22990	c.urlParams_.Set("prettyPrint", "false")
22991	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
22992	urls += "?" + c.urlParams_.Encode()
22993	req, err := http.NewRequest("PUT", urls, body)
22994	if err != nil {
22995		return nil, err
22996	}
22997	req.Header = reqHeaders
22998	googleapi.Expand(req.URL, map[string]string{
22999		"profileId": strconv.FormatInt(c.profileId, 10),
23000	})
23001	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23002}
23003
23004// Do executes the "dfareporting.campaigns.update" call.
23005// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
23006// code is an error. Response headers are in either
23007// *Campaign.ServerResponse.Header or (if a response was returned at
23008// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23009// to check whether the returned error was because
23010// http.StatusNotModified was returned.
23011func (c *CampaignsUpdateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
23012	gensupport.SetOptions(c.urlParams_, opts...)
23013	res, err := c.doRequest("json")
23014	if res != nil && res.StatusCode == http.StatusNotModified {
23015		if res.Body != nil {
23016			res.Body.Close()
23017		}
23018		return nil, &googleapi.Error{
23019			Code:   res.StatusCode,
23020			Header: res.Header,
23021		}
23022	}
23023	if err != nil {
23024		return nil, err
23025	}
23026	defer googleapi.CloseBody(res)
23027	if err := googleapi.CheckResponse(res); err != nil {
23028		return nil, err
23029	}
23030	ret := &Campaign{
23031		ServerResponse: googleapi.ServerResponse{
23032			Header:         res.Header,
23033			HTTPStatusCode: res.StatusCode,
23034		},
23035	}
23036	target := &ret
23037	if err := gensupport.DecodeResponse(target, res); err != nil {
23038		return nil, err
23039	}
23040	return ret, nil
23041	// {
23042	//   "description": "Updates an existing campaign.",
23043	//   "flatPath": "userprofiles/{profileId}/campaigns",
23044	//   "httpMethod": "PUT",
23045	//   "id": "dfareporting.campaigns.update",
23046	//   "parameterOrder": [
23047	//     "profileId"
23048	//   ],
23049	//   "parameters": {
23050	//     "profileId": {
23051	//       "description": "User profile ID associated with this request.",
23052	//       "format": "int64",
23053	//       "location": "path",
23054	//       "required": true,
23055	//       "type": "string"
23056	//     }
23057	//   },
23058	//   "path": "userprofiles/{profileId}/campaigns",
23059	//   "request": {
23060	//     "$ref": "Campaign"
23061	//   },
23062	//   "response": {
23063	//     "$ref": "Campaign"
23064	//   },
23065	//   "scopes": [
23066	//     "https://www.googleapis.com/auth/dfatrafficking"
23067	//   ]
23068	// }
23069
23070}
23071
23072// method id "dfareporting.changeLogs.get":
23073
23074type ChangeLogsGetCall struct {
23075	s            *Service
23076	profileId    int64
23077	id           int64
23078	urlParams_   gensupport.URLParams
23079	ifNoneMatch_ string
23080	ctx_         context.Context
23081	header_      http.Header
23082}
23083
23084// Get: Gets one change log by ID.
23085//
23086// - id: Change log ID.
23087// - profileId: User profile ID associated with this request.
23088func (r *ChangeLogsService) Get(profileId int64, id int64) *ChangeLogsGetCall {
23089	c := &ChangeLogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23090	c.profileId = profileId
23091	c.id = id
23092	return c
23093}
23094
23095// Fields allows partial responses to be retrieved. See
23096// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23097// for more information.
23098func (c *ChangeLogsGetCall) Fields(s ...googleapi.Field) *ChangeLogsGetCall {
23099	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23100	return c
23101}
23102
23103// IfNoneMatch sets the optional parameter which makes the operation
23104// fail if the object's ETag matches the given value. This is useful for
23105// getting updates only after the object has changed since the last
23106// request. Use googleapi.IsNotModified to check whether the response
23107// error from Do is the result of In-None-Match.
23108func (c *ChangeLogsGetCall) IfNoneMatch(entityTag string) *ChangeLogsGetCall {
23109	c.ifNoneMatch_ = entityTag
23110	return c
23111}
23112
23113// Context sets the context to be used in this call's Do method. Any
23114// pending HTTP request will be aborted if the provided context is
23115// canceled.
23116func (c *ChangeLogsGetCall) Context(ctx context.Context) *ChangeLogsGetCall {
23117	c.ctx_ = ctx
23118	return c
23119}
23120
23121// Header returns an http.Header that can be modified by the caller to
23122// add HTTP headers to the request.
23123func (c *ChangeLogsGetCall) Header() http.Header {
23124	if c.header_ == nil {
23125		c.header_ = make(http.Header)
23126	}
23127	return c.header_
23128}
23129
23130func (c *ChangeLogsGetCall) doRequest(alt string) (*http.Response, error) {
23131	reqHeaders := make(http.Header)
23132	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
23133	for k, v := range c.header_ {
23134		reqHeaders[k] = v
23135	}
23136	reqHeaders.Set("User-Agent", c.s.userAgent())
23137	if c.ifNoneMatch_ != "" {
23138		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23139	}
23140	var body io.Reader = nil
23141	c.urlParams_.Set("alt", alt)
23142	c.urlParams_.Set("prettyPrint", "false")
23143	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs/{id}")
23144	urls += "?" + c.urlParams_.Encode()
23145	req, err := http.NewRequest("GET", urls, body)
23146	if err != nil {
23147		return nil, err
23148	}
23149	req.Header = reqHeaders
23150	googleapi.Expand(req.URL, map[string]string{
23151		"profileId": strconv.FormatInt(c.profileId, 10),
23152		"id":        strconv.FormatInt(c.id, 10),
23153	})
23154	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23155}
23156
23157// Do executes the "dfareporting.changeLogs.get" call.
23158// Exactly one of *ChangeLog or error will be non-nil. Any non-2xx
23159// status code is an error. Response headers are in either
23160// *ChangeLog.ServerResponse.Header or (if a response was returned at
23161// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23162// to check whether the returned error was because
23163// http.StatusNotModified was returned.
23164func (c *ChangeLogsGetCall) Do(opts ...googleapi.CallOption) (*ChangeLog, error) {
23165	gensupport.SetOptions(c.urlParams_, opts...)
23166	res, err := c.doRequest("json")
23167	if res != nil && res.StatusCode == http.StatusNotModified {
23168		if res.Body != nil {
23169			res.Body.Close()
23170		}
23171		return nil, &googleapi.Error{
23172			Code:   res.StatusCode,
23173			Header: res.Header,
23174		}
23175	}
23176	if err != nil {
23177		return nil, err
23178	}
23179	defer googleapi.CloseBody(res)
23180	if err := googleapi.CheckResponse(res); err != nil {
23181		return nil, err
23182	}
23183	ret := &ChangeLog{
23184		ServerResponse: googleapi.ServerResponse{
23185			Header:         res.Header,
23186			HTTPStatusCode: res.StatusCode,
23187		},
23188	}
23189	target := &ret
23190	if err := gensupport.DecodeResponse(target, res); err != nil {
23191		return nil, err
23192	}
23193	return ret, nil
23194	// {
23195	//   "description": "Gets one change log by ID.",
23196	//   "flatPath": "userprofiles/{profileId}/changeLogs/{id}",
23197	//   "httpMethod": "GET",
23198	//   "id": "dfareporting.changeLogs.get",
23199	//   "parameterOrder": [
23200	//     "profileId",
23201	//     "id"
23202	//   ],
23203	//   "parameters": {
23204	//     "id": {
23205	//       "description": "Change log ID.",
23206	//       "format": "int64",
23207	//       "location": "path",
23208	//       "required": true,
23209	//       "type": "string"
23210	//     },
23211	//     "profileId": {
23212	//       "description": "User profile ID associated with this request.",
23213	//       "format": "int64",
23214	//       "location": "path",
23215	//       "required": true,
23216	//       "type": "string"
23217	//     }
23218	//   },
23219	//   "path": "userprofiles/{profileId}/changeLogs/{id}",
23220	//   "response": {
23221	//     "$ref": "ChangeLog"
23222	//   },
23223	//   "scopes": [
23224	//     "https://www.googleapis.com/auth/dfatrafficking"
23225	//   ]
23226	// }
23227
23228}
23229
23230// method id "dfareporting.changeLogs.list":
23231
23232type ChangeLogsListCall struct {
23233	s            *Service
23234	profileId    int64
23235	urlParams_   gensupport.URLParams
23236	ifNoneMatch_ string
23237	ctx_         context.Context
23238	header_      http.Header
23239}
23240
23241// List: Retrieves a list of change logs. This method supports paging.
23242//
23243// - profileId: User profile ID associated with this request.
23244func (r *ChangeLogsService) List(profileId int64) *ChangeLogsListCall {
23245	c := &ChangeLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23246	c.profileId = profileId
23247	return c
23248}
23249
23250// Action sets the optional parameter "action": Select only change logs
23251// with the specified action.
23252//
23253// Possible values:
23254//   "ACTION_CREATE"
23255//   "ACTION_UPDATE"
23256//   "ACTION_DELETE"
23257//   "ACTION_ENABLE"
23258//   "ACTION_DISABLE"
23259//   "ACTION_ADD"
23260//   "ACTION_REMOVE"
23261//   "ACTION_MARK_AS_DEFAULT"
23262//   "ACTION_ASSOCIATE"
23263//   "ACTION_ASSIGN"
23264//   "ACTION_UNASSIGN"
23265//   "ACTION_SEND"
23266//   "ACTION_LINK"
23267//   "ACTION_UNLINK"
23268//   "ACTION_PUSH"
23269//   "ACTION_EMAIL_TAGS"
23270//   "ACTION_SHARE"
23271func (c *ChangeLogsListCall) Action(action string) *ChangeLogsListCall {
23272	c.urlParams_.Set("action", action)
23273	return c
23274}
23275
23276// Ids sets the optional parameter "ids": Select only change logs with
23277// these IDs.
23278func (c *ChangeLogsListCall) Ids(ids ...int64) *ChangeLogsListCall {
23279	var ids_ []string
23280	for _, v := range ids {
23281		ids_ = append(ids_, fmt.Sprint(v))
23282	}
23283	c.urlParams_.SetMulti("ids", ids_)
23284	return c
23285}
23286
23287// MaxChangeTime sets the optional parameter "maxChangeTime": Select
23288// only change logs whose change time is before the specified
23289// maxChangeTime.The time should be formatted as an RFC3339 date/time
23290// string. For example, for 10:54 PM on July 18th, 2015, in the
23291// America/New York time zone, the format is
23292// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
23293// the letter T, the hour (24-hour clock system), minute, second, and
23294// then the time zone offset.
23295func (c *ChangeLogsListCall) MaxChangeTime(maxChangeTime string) *ChangeLogsListCall {
23296	c.urlParams_.Set("maxChangeTime", maxChangeTime)
23297	return c
23298}
23299
23300// MaxResults sets the optional parameter "maxResults": Maximum number
23301// of results to return.
23302func (c *ChangeLogsListCall) MaxResults(maxResults int64) *ChangeLogsListCall {
23303	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23304	return c
23305}
23306
23307// MinChangeTime sets the optional parameter "minChangeTime": Select
23308// only change logs whose change time is after the specified
23309// minChangeTime.The time should be formatted as an RFC3339 date/time
23310// string. For example, for 10:54 PM on July 18th, 2015, in the
23311// America/New York time zone, the format is
23312// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
23313// the letter T, the hour (24-hour clock system), minute, second, and
23314// then the time zone offset.
23315func (c *ChangeLogsListCall) MinChangeTime(minChangeTime string) *ChangeLogsListCall {
23316	c.urlParams_.Set("minChangeTime", minChangeTime)
23317	return c
23318}
23319
23320// ObjectIds sets the optional parameter "objectIds": Select only change
23321// logs with these object IDs.
23322func (c *ChangeLogsListCall) ObjectIds(objectIds ...int64) *ChangeLogsListCall {
23323	var objectIds_ []string
23324	for _, v := range objectIds {
23325		objectIds_ = append(objectIds_, fmt.Sprint(v))
23326	}
23327	c.urlParams_.SetMulti("objectIds", objectIds_)
23328	return c
23329}
23330
23331// ObjectType sets the optional parameter "objectType": Select only
23332// change logs with the specified object type.
23333//
23334// Possible values:
23335//   "OBJECT_ADVERTISER"
23336//   "OBJECT_FLOODLIGHT_CONFIGURATION"
23337//   "OBJECT_AD"
23338//   "OBJECT_FLOODLIGHT_ACTVITY"
23339//   "OBJECT_CAMPAIGN"
23340//   "OBJECT_FLOODLIGHT_ACTIVITY_GROUP"
23341//   "OBJECT_CREATIVE"
23342//   "OBJECT_PLACEMENT"
23343//   "OBJECT_DFA_SITE"
23344//   "OBJECT_USER_ROLE"
23345//   "OBJECT_USER_PROFILE"
23346//   "OBJECT_ADVERTISER_GROUP"
23347//   "OBJECT_ACCOUNT"
23348//   "OBJECT_SUBACCOUNT"
23349//   "OBJECT_RICHMEDIA_CREATIVE"
23350//   "OBJECT_INSTREAM_CREATIVE"
23351//   "OBJECT_MEDIA_ORDER"
23352//   "OBJECT_CONTENT_CATEGORY"
23353//   "OBJECT_PLACEMENT_STRATEGY"
23354//   "OBJECT_SD_SITE"
23355//   "OBJECT_SIZE"
23356//   "OBJECT_CREATIVE_GROUP"
23357//   "OBJECT_CREATIVE_ASSET"
23358//   "OBJECT_USER_PROFILE_FILTER"
23359//   "OBJECT_LANDING_PAGE"
23360//   "OBJECT_CREATIVE_FIELD"
23361//   "OBJECT_REMARKETING_LIST"
23362//   "OBJECT_PROVIDED_LIST_CLIENT"
23363//   "OBJECT_EVENT_TAG"
23364//   "OBJECT_CREATIVE_BUNDLE"
23365//   "OBJECT_BILLING_ACCOUNT_GROUP"
23366//   "OBJECT_BILLING_FEATURE"
23367//   "OBJECT_RATE_CARD"
23368//   "OBJECT_ACCOUNT_BILLING_FEATURE"
23369//   "OBJECT_BILLING_MINIMUM_FEE"
23370//   "OBJECT_BILLING_PROFILE"
23371//   "OBJECT_PLAYSTORE_LINK"
23372//   "OBJECT_TARGETING_TEMPLATE"
23373//   "OBJECT_SEARCH_LIFT_STUDY"
23374//   "OBJECT_FLOODLIGHT_DV360_LINK"
23375func (c *ChangeLogsListCall) ObjectType(objectType string) *ChangeLogsListCall {
23376	c.urlParams_.Set("objectType", objectType)
23377	return c
23378}
23379
23380// PageToken sets the optional parameter "pageToken": Value of the
23381// nextPageToken from the previous result page.
23382func (c *ChangeLogsListCall) PageToken(pageToken string) *ChangeLogsListCall {
23383	c.urlParams_.Set("pageToken", pageToken)
23384	return c
23385}
23386
23387// SearchString sets the optional parameter "searchString": Select only
23388// change logs whose object ID, user name, old or new values match the
23389// search string.
23390func (c *ChangeLogsListCall) SearchString(searchString string) *ChangeLogsListCall {
23391	c.urlParams_.Set("searchString", searchString)
23392	return c
23393}
23394
23395// UserProfileIds sets the optional parameter "userProfileIds": Select
23396// only change logs with these user profile IDs.
23397func (c *ChangeLogsListCall) UserProfileIds(userProfileIds ...int64) *ChangeLogsListCall {
23398	var userProfileIds_ []string
23399	for _, v := range userProfileIds {
23400		userProfileIds_ = append(userProfileIds_, fmt.Sprint(v))
23401	}
23402	c.urlParams_.SetMulti("userProfileIds", userProfileIds_)
23403	return c
23404}
23405
23406// Fields allows partial responses to be retrieved. See
23407// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23408// for more information.
23409func (c *ChangeLogsListCall) Fields(s ...googleapi.Field) *ChangeLogsListCall {
23410	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23411	return c
23412}
23413
23414// IfNoneMatch sets the optional parameter which makes the operation
23415// fail if the object's ETag matches the given value. This is useful for
23416// getting updates only after the object has changed since the last
23417// request. Use googleapi.IsNotModified to check whether the response
23418// error from Do is the result of In-None-Match.
23419func (c *ChangeLogsListCall) IfNoneMatch(entityTag string) *ChangeLogsListCall {
23420	c.ifNoneMatch_ = entityTag
23421	return c
23422}
23423
23424// Context sets the context to be used in this call's Do method. Any
23425// pending HTTP request will be aborted if the provided context is
23426// canceled.
23427func (c *ChangeLogsListCall) Context(ctx context.Context) *ChangeLogsListCall {
23428	c.ctx_ = ctx
23429	return c
23430}
23431
23432// Header returns an http.Header that can be modified by the caller to
23433// add HTTP headers to the request.
23434func (c *ChangeLogsListCall) Header() http.Header {
23435	if c.header_ == nil {
23436		c.header_ = make(http.Header)
23437	}
23438	return c.header_
23439}
23440
23441func (c *ChangeLogsListCall) doRequest(alt string) (*http.Response, error) {
23442	reqHeaders := make(http.Header)
23443	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
23444	for k, v := range c.header_ {
23445		reqHeaders[k] = v
23446	}
23447	reqHeaders.Set("User-Agent", c.s.userAgent())
23448	if c.ifNoneMatch_ != "" {
23449		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23450	}
23451	var body io.Reader = nil
23452	c.urlParams_.Set("alt", alt)
23453	c.urlParams_.Set("prettyPrint", "false")
23454	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs")
23455	urls += "?" + c.urlParams_.Encode()
23456	req, err := http.NewRequest("GET", urls, body)
23457	if err != nil {
23458		return nil, err
23459	}
23460	req.Header = reqHeaders
23461	googleapi.Expand(req.URL, map[string]string{
23462		"profileId": strconv.FormatInt(c.profileId, 10),
23463	})
23464	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23465}
23466
23467// Do executes the "dfareporting.changeLogs.list" call.
23468// Exactly one of *ChangeLogsListResponse or error will be non-nil. Any
23469// non-2xx status code is an error. Response headers are in either
23470// *ChangeLogsListResponse.ServerResponse.Header or (if a response was
23471// returned at all) in error.(*googleapi.Error).Header. Use
23472// googleapi.IsNotModified to check whether the returned error was
23473// because http.StatusNotModified was returned.
23474func (c *ChangeLogsListCall) Do(opts ...googleapi.CallOption) (*ChangeLogsListResponse, error) {
23475	gensupport.SetOptions(c.urlParams_, opts...)
23476	res, err := c.doRequest("json")
23477	if res != nil && res.StatusCode == http.StatusNotModified {
23478		if res.Body != nil {
23479			res.Body.Close()
23480		}
23481		return nil, &googleapi.Error{
23482			Code:   res.StatusCode,
23483			Header: res.Header,
23484		}
23485	}
23486	if err != nil {
23487		return nil, err
23488	}
23489	defer googleapi.CloseBody(res)
23490	if err := googleapi.CheckResponse(res); err != nil {
23491		return nil, err
23492	}
23493	ret := &ChangeLogsListResponse{
23494		ServerResponse: googleapi.ServerResponse{
23495			Header:         res.Header,
23496			HTTPStatusCode: res.StatusCode,
23497		},
23498	}
23499	target := &ret
23500	if err := gensupport.DecodeResponse(target, res); err != nil {
23501		return nil, err
23502	}
23503	return ret, nil
23504	// {
23505	//   "description": "Retrieves a list of change logs. This method supports paging.",
23506	//   "flatPath": "userprofiles/{profileId}/changeLogs",
23507	//   "httpMethod": "GET",
23508	//   "id": "dfareporting.changeLogs.list",
23509	//   "parameterOrder": [
23510	//     "profileId"
23511	//   ],
23512	//   "parameters": {
23513	//     "action": {
23514	//       "description": "Select only change logs with the specified action.",
23515	//       "enum": [
23516	//         "ACTION_CREATE",
23517	//         "ACTION_UPDATE",
23518	//         "ACTION_DELETE",
23519	//         "ACTION_ENABLE",
23520	//         "ACTION_DISABLE",
23521	//         "ACTION_ADD",
23522	//         "ACTION_REMOVE",
23523	//         "ACTION_MARK_AS_DEFAULT",
23524	//         "ACTION_ASSOCIATE",
23525	//         "ACTION_ASSIGN",
23526	//         "ACTION_UNASSIGN",
23527	//         "ACTION_SEND",
23528	//         "ACTION_LINK",
23529	//         "ACTION_UNLINK",
23530	//         "ACTION_PUSH",
23531	//         "ACTION_EMAIL_TAGS",
23532	//         "ACTION_SHARE"
23533	//       ],
23534	//       "enumDescriptions": [
23535	//         "",
23536	//         "",
23537	//         "",
23538	//         "",
23539	//         "",
23540	//         "",
23541	//         "",
23542	//         "",
23543	//         "",
23544	//         "",
23545	//         "",
23546	//         "",
23547	//         "",
23548	//         "",
23549	//         "",
23550	//         "",
23551	//         ""
23552	//       ],
23553	//       "location": "query",
23554	//       "type": "string"
23555	//     },
23556	//     "ids": {
23557	//       "description": "Select only change logs with these IDs.",
23558	//       "format": "int64",
23559	//       "location": "query",
23560	//       "repeated": true,
23561	//       "type": "string"
23562	//     },
23563	//     "maxChangeTime": {
23564	//       "description": "Select only change logs whose change time is before the specified maxChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is \"2015-07-18T22:54:00-04:00\". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset.",
23565	//       "location": "query",
23566	//       "type": "string"
23567	//     },
23568	//     "maxResults": {
23569	//       "default": "1000",
23570	//       "description": "Maximum number of results to return.",
23571	//       "format": "int32",
23572	//       "location": "query",
23573	//       "maximum": "1000",
23574	//       "minimum": "0",
23575	//       "type": "integer"
23576	//     },
23577	//     "minChangeTime": {
23578	//       "description": "Select only change logs whose change time is after the specified minChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is \"2015-07-18T22:54:00-04:00\". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset.",
23579	//       "location": "query",
23580	//       "type": "string"
23581	//     },
23582	//     "objectIds": {
23583	//       "description": "Select only change logs with these object IDs.",
23584	//       "format": "int64",
23585	//       "location": "query",
23586	//       "repeated": true,
23587	//       "type": "string"
23588	//     },
23589	//     "objectType": {
23590	//       "description": "Select only change logs with the specified object type.",
23591	//       "enum": [
23592	//         "OBJECT_ADVERTISER",
23593	//         "OBJECT_FLOODLIGHT_CONFIGURATION",
23594	//         "OBJECT_AD",
23595	//         "OBJECT_FLOODLIGHT_ACTVITY",
23596	//         "OBJECT_CAMPAIGN",
23597	//         "OBJECT_FLOODLIGHT_ACTIVITY_GROUP",
23598	//         "OBJECT_CREATIVE",
23599	//         "OBJECT_PLACEMENT",
23600	//         "OBJECT_DFA_SITE",
23601	//         "OBJECT_USER_ROLE",
23602	//         "OBJECT_USER_PROFILE",
23603	//         "OBJECT_ADVERTISER_GROUP",
23604	//         "OBJECT_ACCOUNT",
23605	//         "OBJECT_SUBACCOUNT",
23606	//         "OBJECT_RICHMEDIA_CREATIVE",
23607	//         "OBJECT_INSTREAM_CREATIVE",
23608	//         "OBJECT_MEDIA_ORDER",
23609	//         "OBJECT_CONTENT_CATEGORY",
23610	//         "OBJECT_PLACEMENT_STRATEGY",
23611	//         "OBJECT_SD_SITE",
23612	//         "OBJECT_SIZE",
23613	//         "OBJECT_CREATIVE_GROUP",
23614	//         "OBJECT_CREATIVE_ASSET",
23615	//         "OBJECT_USER_PROFILE_FILTER",
23616	//         "OBJECT_LANDING_PAGE",
23617	//         "OBJECT_CREATIVE_FIELD",
23618	//         "OBJECT_REMARKETING_LIST",
23619	//         "OBJECT_PROVIDED_LIST_CLIENT",
23620	//         "OBJECT_EVENT_TAG",
23621	//         "OBJECT_CREATIVE_BUNDLE",
23622	//         "OBJECT_BILLING_ACCOUNT_GROUP",
23623	//         "OBJECT_BILLING_FEATURE",
23624	//         "OBJECT_RATE_CARD",
23625	//         "OBJECT_ACCOUNT_BILLING_FEATURE",
23626	//         "OBJECT_BILLING_MINIMUM_FEE",
23627	//         "OBJECT_BILLING_PROFILE",
23628	//         "OBJECT_PLAYSTORE_LINK",
23629	//         "OBJECT_TARGETING_TEMPLATE",
23630	//         "OBJECT_SEARCH_LIFT_STUDY",
23631	//         "OBJECT_FLOODLIGHT_DV360_LINK"
23632	//       ],
23633	//       "enumDescriptions": [
23634	//         "",
23635	//         "",
23636	//         "",
23637	//         "",
23638	//         "",
23639	//         "",
23640	//         "",
23641	//         "",
23642	//         "",
23643	//         "",
23644	//         "",
23645	//         "",
23646	//         "",
23647	//         "",
23648	//         "",
23649	//         "",
23650	//         "",
23651	//         "",
23652	//         "",
23653	//         "",
23654	//         "",
23655	//         "",
23656	//         "",
23657	//         "",
23658	//         "",
23659	//         "",
23660	//         "",
23661	//         "",
23662	//         "",
23663	//         "",
23664	//         "",
23665	//         "",
23666	//         "",
23667	//         "",
23668	//         "",
23669	//         "",
23670	//         "",
23671	//         "",
23672	//         "",
23673	//         ""
23674	//       ],
23675	//       "location": "query",
23676	//       "type": "string"
23677	//     },
23678	//     "pageToken": {
23679	//       "description": "Value of the nextPageToken from the previous result page.",
23680	//       "location": "query",
23681	//       "type": "string"
23682	//     },
23683	//     "profileId": {
23684	//       "description": "User profile ID associated with this request.",
23685	//       "format": "int64",
23686	//       "location": "path",
23687	//       "required": true,
23688	//       "type": "string"
23689	//     },
23690	//     "searchString": {
23691	//       "description": "Select only change logs whose object ID, user name, old or new values match the search string.",
23692	//       "location": "query",
23693	//       "type": "string"
23694	//     },
23695	//     "userProfileIds": {
23696	//       "description": "Select only change logs with these user profile IDs.",
23697	//       "format": "int64",
23698	//       "location": "query",
23699	//       "repeated": true,
23700	//       "type": "string"
23701	//     }
23702	//   },
23703	//   "path": "userprofiles/{profileId}/changeLogs",
23704	//   "response": {
23705	//     "$ref": "ChangeLogsListResponse"
23706	//   },
23707	//   "scopes": [
23708	//     "https://www.googleapis.com/auth/dfatrafficking"
23709	//   ]
23710	// }
23711
23712}
23713
23714// Pages invokes f for each page of results.
23715// A non-nil error returned from f will halt the iteration.
23716// The provided context supersedes any context provided to the Context method.
23717func (c *ChangeLogsListCall) Pages(ctx context.Context, f func(*ChangeLogsListResponse) error) error {
23718	c.ctx_ = ctx
23719	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23720	for {
23721		x, err := c.Do()
23722		if err != nil {
23723			return err
23724		}
23725		if err := f(x); err != nil {
23726			return err
23727		}
23728		if x.NextPageToken == "" {
23729			return nil
23730		}
23731		c.PageToken(x.NextPageToken)
23732	}
23733}
23734
23735// method id "dfareporting.cities.list":
23736
23737type CitiesListCall struct {
23738	s            *Service
23739	profileId    int64
23740	urlParams_   gensupport.URLParams
23741	ifNoneMatch_ string
23742	ctx_         context.Context
23743	header_      http.Header
23744}
23745
23746// List: Retrieves a list of cities, possibly filtered.
23747//
23748// - profileId: User profile ID associated with this request.
23749func (r *CitiesService) List(profileId int64) *CitiesListCall {
23750	c := &CitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23751	c.profileId = profileId
23752	return c
23753}
23754
23755// CountryDartIds sets the optional parameter "countryDartIds": Select
23756// only cities from these countries.
23757func (c *CitiesListCall) CountryDartIds(countryDartIds ...int64) *CitiesListCall {
23758	var countryDartIds_ []string
23759	for _, v := range countryDartIds {
23760		countryDartIds_ = append(countryDartIds_, fmt.Sprint(v))
23761	}
23762	c.urlParams_.SetMulti("countryDartIds", countryDartIds_)
23763	return c
23764}
23765
23766// DartIds sets the optional parameter "dartIds": Select only cities
23767// with these DART IDs.
23768func (c *CitiesListCall) DartIds(dartIds ...int64) *CitiesListCall {
23769	var dartIds_ []string
23770	for _, v := range dartIds {
23771		dartIds_ = append(dartIds_, fmt.Sprint(v))
23772	}
23773	c.urlParams_.SetMulti("dartIds", dartIds_)
23774	return c
23775}
23776
23777// NamePrefix sets the optional parameter "namePrefix": Select only
23778// cities with names starting with this prefix.
23779func (c *CitiesListCall) NamePrefix(namePrefix string) *CitiesListCall {
23780	c.urlParams_.Set("namePrefix", namePrefix)
23781	return c
23782}
23783
23784// RegionDartIds sets the optional parameter "regionDartIds": Select
23785// only cities from these regions.
23786func (c *CitiesListCall) RegionDartIds(regionDartIds ...int64) *CitiesListCall {
23787	var regionDartIds_ []string
23788	for _, v := range regionDartIds {
23789		regionDartIds_ = append(regionDartIds_, fmt.Sprint(v))
23790	}
23791	c.urlParams_.SetMulti("regionDartIds", regionDartIds_)
23792	return c
23793}
23794
23795// Fields allows partial responses to be retrieved. See
23796// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23797// for more information.
23798func (c *CitiesListCall) Fields(s ...googleapi.Field) *CitiesListCall {
23799	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23800	return c
23801}
23802
23803// IfNoneMatch sets the optional parameter which makes the operation
23804// fail if the object's ETag matches the given value. This is useful for
23805// getting updates only after the object has changed since the last
23806// request. Use googleapi.IsNotModified to check whether the response
23807// error from Do is the result of In-None-Match.
23808func (c *CitiesListCall) IfNoneMatch(entityTag string) *CitiesListCall {
23809	c.ifNoneMatch_ = entityTag
23810	return c
23811}
23812
23813// Context sets the context to be used in this call's Do method. Any
23814// pending HTTP request will be aborted if the provided context is
23815// canceled.
23816func (c *CitiesListCall) Context(ctx context.Context) *CitiesListCall {
23817	c.ctx_ = ctx
23818	return c
23819}
23820
23821// Header returns an http.Header that can be modified by the caller to
23822// add HTTP headers to the request.
23823func (c *CitiesListCall) Header() http.Header {
23824	if c.header_ == nil {
23825		c.header_ = make(http.Header)
23826	}
23827	return c.header_
23828}
23829
23830func (c *CitiesListCall) doRequest(alt string) (*http.Response, error) {
23831	reqHeaders := make(http.Header)
23832	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
23833	for k, v := range c.header_ {
23834		reqHeaders[k] = v
23835	}
23836	reqHeaders.Set("User-Agent", c.s.userAgent())
23837	if c.ifNoneMatch_ != "" {
23838		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23839	}
23840	var body io.Reader = nil
23841	c.urlParams_.Set("alt", alt)
23842	c.urlParams_.Set("prettyPrint", "false")
23843	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/cities")
23844	urls += "?" + c.urlParams_.Encode()
23845	req, err := http.NewRequest("GET", urls, body)
23846	if err != nil {
23847		return nil, err
23848	}
23849	req.Header = reqHeaders
23850	googleapi.Expand(req.URL, map[string]string{
23851		"profileId": strconv.FormatInt(c.profileId, 10),
23852	})
23853	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23854}
23855
23856// Do executes the "dfareporting.cities.list" call.
23857// Exactly one of *CitiesListResponse or error will be non-nil. Any
23858// non-2xx status code is an error. Response headers are in either
23859// *CitiesListResponse.ServerResponse.Header or (if a response was
23860// returned at all) in error.(*googleapi.Error).Header. Use
23861// googleapi.IsNotModified to check whether the returned error was
23862// because http.StatusNotModified was returned.
23863func (c *CitiesListCall) Do(opts ...googleapi.CallOption) (*CitiesListResponse, error) {
23864	gensupport.SetOptions(c.urlParams_, opts...)
23865	res, err := c.doRequest("json")
23866	if res != nil && res.StatusCode == http.StatusNotModified {
23867		if res.Body != nil {
23868			res.Body.Close()
23869		}
23870		return nil, &googleapi.Error{
23871			Code:   res.StatusCode,
23872			Header: res.Header,
23873		}
23874	}
23875	if err != nil {
23876		return nil, err
23877	}
23878	defer googleapi.CloseBody(res)
23879	if err := googleapi.CheckResponse(res); err != nil {
23880		return nil, err
23881	}
23882	ret := &CitiesListResponse{
23883		ServerResponse: googleapi.ServerResponse{
23884			Header:         res.Header,
23885			HTTPStatusCode: res.StatusCode,
23886		},
23887	}
23888	target := &ret
23889	if err := gensupport.DecodeResponse(target, res); err != nil {
23890		return nil, err
23891	}
23892	return ret, nil
23893	// {
23894	//   "description": "Retrieves a list of cities, possibly filtered.",
23895	//   "flatPath": "userprofiles/{profileId}/cities",
23896	//   "httpMethod": "GET",
23897	//   "id": "dfareporting.cities.list",
23898	//   "parameterOrder": [
23899	//     "profileId"
23900	//   ],
23901	//   "parameters": {
23902	//     "countryDartIds": {
23903	//       "description": "Select only cities from these countries.",
23904	//       "format": "int64",
23905	//       "location": "query",
23906	//       "repeated": true,
23907	//       "type": "string"
23908	//     },
23909	//     "dartIds": {
23910	//       "description": "Select only cities with these DART IDs.",
23911	//       "format": "int64",
23912	//       "location": "query",
23913	//       "repeated": true,
23914	//       "type": "string"
23915	//     },
23916	//     "namePrefix": {
23917	//       "description": "Select only cities with names starting with this prefix.",
23918	//       "location": "query",
23919	//       "type": "string"
23920	//     },
23921	//     "profileId": {
23922	//       "description": "User profile ID associated with this request.",
23923	//       "format": "int64",
23924	//       "location": "path",
23925	//       "required": true,
23926	//       "type": "string"
23927	//     },
23928	//     "regionDartIds": {
23929	//       "description": "Select only cities from these regions.",
23930	//       "format": "int64",
23931	//       "location": "query",
23932	//       "repeated": true,
23933	//       "type": "string"
23934	//     }
23935	//   },
23936	//   "path": "userprofiles/{profileId}/cities",
23937	//   "response": {
23938	//     "$ref": "CitiesListResponse"
23939	//   },
23940	//   "scopes": [
23941	//     "https://www.googleapis.com/auth/dfatrafficking"
23942	//   ]
23943	// }
23944
23945}
23946
23947// method id "dfareporting.connectionTypes.get":
23948
23949type ConnectionTypesGetCall struct {
23950	s            *Service
23951	profileId    int64
23952	id           int64
23953	urlParams_   gensupport.URLParams
23954	ifNoneMatch_ string
23955	ctx_         context.Context
23956	header_      http.Header
23957}
23958
23959// Get: Gets one connection type by ID.
23960//
23961// - id: Connection type ID.
23962// - profileId: User profile ID associated with this request.
23963func (r *ConnectionTypesService) Get(profileId int64, id int64) *ConnectionTypesGetCall {
23964	c := &ConnectionTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23965	c.profileId = profileId
23966	c.id = id
23967	return c
23968}
23969
23970// Fields allows partial responses to be retrieved. See
23971// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23972// for more information.
23973func (c *ConnectionTypesGetCall) Fields(s ...googleapi.Field) *ConnectionTypesGetCall {
23974	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23975	return c
23976}
23977
23978// IfNoneMatch sets the optional parameter which makes the operation
23979// fail if the object's ETag matches the given value. This is useful for
23980// getting updates only after the object has changed since the last
23981// request. Use googleapi.IsNotModified to check whether the response
23982// error from Do is the result of In-None-Match.
23983func (c *ConnectionTypesGetCall) IfNoneMatch(entityTag string) *ConnectionTypesGetCall {
23984	c.ifNoneMatch_ = entityTag
23985	return c
23986}
23987
23988// Context sets the context to be used in this call's Do method. Any
23989// pending HTTP request will be aborted if the provided context is
23990// canceled.
23991func (c *ConnectionTypesGetCall) Context(ctx context.Context) *ConnectionTypesGetCall {
23992	c.ctx_ = ctx
23993	return c
23994}
23995
23996// Header returns an http.Header that can be modified by the caller to
23997// add HTTP headers to the request.
23998func (c *ConnectionTypesGetCall) Header() http.Header {
23999	if c.header_ == nil {
24000		c.header_ = make(http.Header)
24001	}
24002	return c.header_
24003}
24004
24005func (c *ConnectionTypesGetCall) doRequest(alt string) (*http.Response, error) {
24006	reqHeaders := make(http.Header)
24007	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
24008	for k, v := range c.header_ {
24009		reqHeaders[k] = v
24010	}
24011	reqHeaders.Set("User-Agent", c.s.userAgent())
24012	if c.ifNoneMatch_ != "" {
24013		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24014	}
24015	var body io.Reader = nil
24016	c.urlParams_.Set("alt", alt)
24017	c.urlParams_.Set("prettyPrint", "false")
24018	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes/{id}")
24019	urls += "?" + c.urlParams_.Encode()
24020	req, err := http.NewRequest("GET", urls, body)
24021	if err != nil {
24022		return nil, err
24023	}
24024	req.Header = reqHeaders
24025	googleapi.Expand(req.URL, map[string]string{
24026		"profileId": strconv.FormatInt(c.profileId, 10),
24027		"id":        strconv.FormatInt(c.id, 10),
24028	})
24029	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24030}
24031
24032// Do executes the "dfareporting.connectionTypes.get" call.
24033// Exactly one of *ConnectionType or error will be non-nil. Any non-2xx
24034// status code is an error. Response headers are in either
24035// *ConnectionType.ServerResponse.Header or (if a response was returned
24036// at all) in error.(*googleapi.Error).Header. Use
24037// googleapi.IsNotModified to check whether the returned error was
24038// because http.StatusNotModified was returned.
24039func (c *ConnectionTypesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionType, error) {
24040	gensupport.SetOptions(c.urlParams_, opts...)
24041	res, err := c.doRequest("json")
24042	if res != nil && res.StatusCode == http.StatusNotModified {
24043		if res.Body != nil {
24044			res.Body.Close()
24045		}
24046		return nil, &googleapi.Error{
24047			Code:   res.StatusCode,
24048			Header: res.Header,
24049		}
24050	}
24051	if err != nil {
24052		return nil, err
24053	}
24054	defer googleapi.CloseBody(res)
24055	if err := googleapi.CheckResponse(res); err != nil {
24056		return nil, err
24057	}
24058	ret := &ConnectionType{
24059		ServerResponse: googleapi.ServerResponse{
24060			Header:         res.Header,
24061			HTTPStatusCode: res.StatusCode,
24062		},
24063	}
24064	target := &ret
24065	if err := gensupport.DecodeResponse(target, res); err != nil {
24066		return nil, err
24067	}
24068	return ret, nil
24069	// {
24070	//   "description": "Gets one connection type by ID.",
24071	//   "flatPath": "userprofiles/{profileId}/connectionTypes/{id}",
24072	//   "httpMethod": "GET",
24073	//   "id": "dfareporting.connectionTypes.get",
24074	//   "parameterOrder": [
24075	//     "profileId",
24076	//     "id"
24077	//   ],
24078	//   "parameters": {
24079	//     "id": {
24080	//       "description": "Connection type ID.",
24081	//       "format": "int64",
24082	//       "location": "path",
24083	//       "required": true,
24084	//       "type": "string"
24085	//     },
24086	//     "profileId": {
24087	//       "description": "User profile ID associated with this request.",
24088	//       "format": "int64",
24089	//       "location": "path",
24090	//       "required": true,
24091	//       "type": "string"
24092	//     }
24093	//   },
24094	//   "path": "userprofiles/{profileId}/connectionTypes/{id}",
24095	//   "response": {
24096	//     "$ref": "ConnectionType"
24097	//   },
24098	//   "scopes": [
24099	//     "https://www.googleapis.com/auth/dfatrafficking"
24100	//   ]
24101	// }
24102
24103}
24104
24105// method id "dfareporting.connectionTypes.list":
24106
24107type ConnectionTypesListCall struct {
24108	s            *Service
24109	profileId    int64
24110	urlParams_   gensupport.URLParams
24111	ifNoneMatch_ string
24112	ctx_         context.Context
24113	header_      http.Header
24114}
24115
24116// List: Retrieves a list of connection types.
24117//
24118// - profileId: User profile ID associated with this request.
24119func (r *ConnectionTypesService) List(profileId int64) *ConnectionTypesListCall {
24120	c := &ConnectionTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24121	c.profileId = profileId
24122	return c
24123}
24124
24125// Fields allows partial responses to be retrieved. See
24126// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24127// for more information.
24128func (c *ConnectionTypesListCall) Fields(s ...googleapi.Field) *ConnectionTypesListCall {
24129	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24130	return c
24131}
24132
24133// IfNoneMatch sets the optional parameter which makes the operation
24134// fail if the object's ETag matches the given value. This is useful for
24135// getting updates only after the object has changed since the last
24136// request. Use googleapi.IsNotModified to check whether the response
24137// error from Do is the result of In-None-Match.
24138func (c *ConnectionTypesListCall) IfNoneMatch(entityTag string) *ConnectionTypesListCall {
24139	c.ifNoneMatch_ = entityTag
24140	return c
24141}
24142
24143// Context sets the context to be used in this call's Do method. Any
24144// pending HTTP request will be aborted if the provided context is
24145// canceled.
24146func (c *ConnectionTypesListCall) Context(ctx context.Context) *ConnectionTypesListCall {
24147	c.ctx_ = ctx
24148	return c
24149}
24150
24151// Header returns an http.Header that can be modified by the caller to
24152// add HTTP headers to the request.
24153func (c *ConnectionTypesListCall) Header() http.Header {
24154	if c.header_ == nil {
24155		c.header_ = make(http.Header)
24156	}
24157	return c.header_
24158}
24159
24160func (c *ConnectionTypesListCall) doRequest(alt string) (*http.Response, error) {
24161	reqHeaders := make(http.Header)
24162	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
24163	for k, v := range c.header_ {
24164		reqHeaders[k] = v
24165	}
24166	reqHeaders.Set("User-Agent", c.s.userAgent())
24167	if c.ifNoneMatch_ != "" {
24168		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24169	}
24170	var body io.Reader = nil
24171	c.urlParams_.Set("alt", alt)
24172	c.urlParams_.Set("prettyPrint", "false")
24173	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes")
24174	urls += "?" + c.urlParams_.Encode()
24175	req, err := http.NewRequest("GET", urls, body)
24176	if err != nil {
24177		return nil, err
24178	}
24179	req.Header = reqHeaders
24180	googleapi.Expand(req.URL, map[string]string{
24181		"profileId": strconv.FormatInt(c.profileId, 10),
24182	})
24183	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24184}
24185
24186// Do executes the "dfareporting.connectionTypes.list" call.
24187// Exactly one of *ConnectionTypesListResponse or error will be non-nil.
24188// Any non-2xx status code is an error. Response headers are in either
24189// *ConnectionTypesListResponse.ServerResponse.Header or (if a response
24190// was returned at all) in error.(*googleapi.Error).Header. Use
24191// googleapi.IsNotModified to check whether the returned error was
24192// because http.StatusNotModified was returned.
24193func (c *ConnectionTypesListCall) Do(opts ...googleapi.CallOption) (*ConnectionTypesListResponse, error) {
24194	gensupport.SetOptions(c.urlParams_, opts...)
24195	res, err := c.doRequest("json")
24196	if res != nil && res.StatusCode == http.StatusNotModified {
24197		if res.Body != nil {
24198			res.Body.Close()
24199		}
24200		return nil, &googleapi.Error{
24201			Code:   res.StatusCode,
24202			Header: res.Header,
24203		}
24204	}
24205	if err != nil {
24206		return nil, err
24207	}
24208	defer googleapi.CloseBody(res)
24209	if err := googleapi.CheckResponse(res); err != nil {
24210		return nil, err
24211	}
24212	ret := &ConnectionTypesListResponse{
24213		ServerResponse: googleapi.ServerResponse{
24214			Header:         res.Header,
24215			HTTPStatusCode: res.StatusCode,
24216		},
24217	}
24218	target := &ret
24219	if err := gensupport.DecodeResponse(target, res); err != nil {
24220		return nil, err
24221	}
24222	return ret, nil
24223	// {
24224	//   "description": "Retrieves a list of connection types.",
24225	//   "flatPath": "userprofiles/{profileId}/connectionTypes",
24226	//   "httpMethod": "GET",
24227	//   "id": "dfareporting.connectionTypes.list",
24228	//   "parameterOrder": [
24229	//     "profileId"
24230	//   ],
24231	//   "parameters": {
24232	//     "profileId": {
24233	//       "description": "User profile ID associated with this request.",
24234	//       "format": "int64",
24235	//       "location": "path",
24236	//       "required": true,
24237	//       "type": "string"
24238	//     }
24239	//   },
24240	//   "path": "userprofiles/{profileId}/connectionTypes",
24241	//   "response": {
24242	//     "$ref": "ConnectionTypesListResponse"
24243	//   },
24244	//   "scopes": [
24245	//     "https://www.googleapis.com/auth/dfatrafficking"
24246	//   ]
24247	// }
24248
24249}
24250
24251// method id "dfareporting.contentCategories.delete":
24252
24253type ContentCategoriesDeleteCall struct {
24254	s          *Service
24255	profileId  int64
24256	id         int64
24257	urlParams_ gensupport.URLParams
24258	ctx_       context.Context
24259	header_    http.Header
24260}
24261
24262// Delete: Deletes an existing content category.
24263//
24264// - id: Content category ID.
24265// - profileId: User profile ID associated with this request.
24266func (r *ContentCategoriesService) Delete(profileId int64, id int64) *ContentCategoriesDeleteCall {
24267	c := &ContentCategoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24268	c.profileId = profileId
24269	c.id = id
24270	return c
24271}
24272
24273// Fields allows partial responses to be retrieved. See
24274// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24275// for more information.
24276func (c *ContentCategoriesDeleteCall) Fields(s ...googleapi.Field) *ContentCategoriesDeleteCall {
24277	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24278	return c
24279}
24280
24281// Context sets the context to be used in this call's Do method. Any
24282// pending HTTP request will be aborted if the provided context is
24283// canceled.
24284func (c *ContentCategoriesDeleteCall) Context(ctx context.Context) *ContentCategoriesDeleteCall {
24285	c.ctx_ = ctx
24286	return c
24287}
24288
24289// Header returns an http.Header that can be modified by the caller to
24290// add HTTP headers to the request.
24291func (c *ContentCategoriesDeleteCall) Header() http.Header {
24292	if c.header_ == nil {
24293		c.header_ = make(http.Header)
24294	}
24295	return c.header_
24296}
24297
24298func (c *ContentCategoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
24299	reqHeaders := make(http.Header)
24300	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
24301	for k, v := range c.header_ {
24302		reqHeaders[k] = v
24303	}
24304	reqHeaders.Set("User-Agent", c.s.userAgent())
24305	var body io.Reader = nil
24306	c.urlParams_.Set("alt", alt)
24307	c.urlParams_.Set("prettyPrint", "false")
24308	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
24309	urls += "?" + c.urlParams_.Encode()
24310	req, err := http.NewRequest("DELETE", urls, body)
24311	if err != nil {
24312		return nil, err
24313	}
24314	req.Header = reqHeaders
24315	googleapi.Expand(req.URL, map[string]string{
24316		"profileId": strconv.FormatInt(c.profileId, 10),
24317		"id":        strconv.FormatInt(c.id, 10),
24318	})
24319	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24320}
24321
24322// Do executes the "dfareporting.contentCategories.delete" call.
24323func (c *ContentCategoriesDeleteCall) Do(opts ...googleapi.CallOption) error {
24324	gensupport.SetOptions(c.urlParams_, opts...)
24325	res, err := c.doRequest("json")
24326	if err != nil {
24327		return err
24328	}
24329	defer googleapi.CloseBody(res)
24330	if err := googleapi.CheckResponse(res); err != nil {
24331		return err
24332	}
24333	return nil
24334	// {
24335	//   "description": "Deletes an existing content category.",
24336	//   "flatPath": "userprofiles/{profileId}/contentCategories/{id}",
24337	//   "httpMethod": "DELETE",
24338	//   "id": "dfareporting.contentCategories.delete",
24339	//   "parameterOrder": [
24340	//     "profileId",
24341	//     "id"
24342	//   ],
24343	//   "parameters": {
24344	//     "id": {
24345	//       "description": "Content category ID.",
24346	//       "format": "int64",
24347	//       "location": "path",
24348	//       "required": true,
24349	//       "type": "string"
24350	//     },
24351	//     "profileId": {
24352	//       "description": "User profile ID associated with this request.",
24353	//       "format": "int64",
24354	//       "location": "path",
24355	//       "required": true,
24356	//       "type": "string"
24357	//     }
24358	//   },
24359	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
24360	//   "scopes": [
24361	//     "https://www.googleapis.com/auth/dfatrafficking"
24362	//   ]
24363	// }
24364
24365}
24366
24367// method id "dfareporting.contentCategories.get":
24368
24369type ContentCategoriesGetCall struct {
24370	s            *Service
24371	profileId    int64
24372	id           int64
24373	urlParams_   gensupport.URLParams
24374	ifNoneMatch_ string
24375	ctx_         context.Context
24376	header_      http.Header
24377}
24378
24379// Get: Gets one content category by ID.
24380//
24381// - id: Content category ID.
24382// - profileId: User profile ID associated with this request.
24383func (r *ContentCategoriesService) Get(profileId int64, id int64) *ContentCategoriesGetCall {
24384	c := &ContentCategoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24385	c.profileId = profileId
24386	c.id = id
24387	return c
24388}
24389
24390// Fields allows partial responses to be retrieved. See
24391// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24392// for more information.
24393func (c *ContentCategoriesGetCall) Fields(s ...googleapi.Field) *ContentCategoriesGetCall {
24394	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24395	return c
24396}
24397
24398// IfNoneMatch sets the optional parameter which makes the operation
24399// fail if the object's ETag matches the given value. This is useful for
24400// getting updates only after the object has changed since the last
24401// request. Use googleapi.IsNotModified to check whether the response
24402// error from Do is the result of In-None-Match.
24403func (c *ContentCategoriesGetCall) IfNoneMatch(entityTag string) *ContentCategoriesGetCall {
24404	c.ifNoneMatch_ = entityTag
24405	return c
24406}
24407
24408// Context sets the context to be used in this call's Do method. Any
24409// pending HTTP request will be aborted if the provided context is
24410// canceled.
24411func (c *ContentCategoriesGetCall) Context(ctx context.Context) *ContentCategoriesGetCall {
24412	c.ctx_ = ctx
24413	return c
24414}
24415
24416// Header returns an http.Header that can be modified by the caller to
24417// add HTTP headers to the request.
24418func (c *ContentCategoriesGetCall) Header() http.Header {
24419	if c.header_ == nil {
24420		c.header_ = make(http.Header)
24421	}
24422	return c.header_
24423}
24424
24425func (c *ContentCategoriesGetCall) doRequest(alt string) (*http.Response, error) {
24426	reqHeaders := make(http.Header)
24427	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
24428	for k, v := range c.header_ {
24429		reqHeaders[k] = v
24430	}
24431	reqHeaders.Set("User-Agent", c.s.userAgent())
24432	if c.ifNoneMatch_ != "" {
24433		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24434	}
24435	var body io.Reader = nil
24436	c.urlParams_.Set("alt", alt)
24437	c.urlParams_.Set("prettyPrint", "false")
24438	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
24439	urls += "?" + c.urlParams_.Encode()
24440	req, err := http.NewRequest("GET", urls, body)
24441	if err != nil {
24442		return nil, err
24443	}
24444	req.Header = reqHeaders
24445	googleapi.Expand(req.URL, map[string]string{
24446		"profileId": strconv.FormatInt(c.profileId, 10),
24447		"id":        strconv.FormatInt(c.id, 10),
24448	})
24449	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24450}
24451
24452// Do executes the "dfareporting.contentCategories.get" call.
24453// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
24454// status code is an error. Response headers are in either
24455// *ContentCategory.ServerResponse.Header or (if a response was returned
24456// at all) in error.(*googleapi.Error).Header. Use
24457// googleapi.IsNotModified to check whether the returned error was
24458// because http.StatusNotModified was returned.
24459func (c *ContentCategoriesGetCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
24460	gensupport.SetOptions(c.urlParams_, opts...)
24461	res, err := c.doRequest("json")
24462	if res != nil && res.StatusCode == http.StatusNotModified {
24463		if res.Body != nil {
24464			res.Body.Close()
24465		}
24466		return nil, &googleapi.Error{
24467			Code:   res.StatusCode,
24468			Header: res.Header,
24469		}
24470	}
24471	if err != nil {
24472		return nil, err
24473	}
24474	defer googleapi.CloseBody(res)
24475	if err := googleapi.CheckResponse(res); err != nil {
24476		return nil, err
24477	}
24478	ret := &ContentCategory{
24479		ServerResponse: googleapi.ServerResponse{
24480			Header:         res.Header,
24481			HTTPStatusCode: res.StatusCode,
24482		},
24483	}
24484	target := &ret
24485	if err := gensupport.DecodeResponse(target, res); err != nil {
24486		return nil, err
24487	}
24488	return ret, nil
24489	// {
24490	//   "description": "Gets one content category by ID.",
24491	//   "flatPath": "userprofiles/{profileId}/contentCategories/{id}",
24492	//   "httpMethod": "GET",
24493	//   "id": "dfareporting.contentCategories.get",
24494	//   "parameterOrder": [
24495	//     "profileId",
24496	//     "id"
24497	//   ],
24498	//   "parameters": {
24499	//     "id": {
24500	//       "description": "Content category ID.",
24501	//       "format": "int64",
24502	//       "location": "path",
24503	//       "required": true,
24504	//       "type": "string"
24505	//     },
24506	//     "profileId": {
24507	//       "description": "User profile ID associated with this request.",
24508	//       "format": "int64",
24509	//       "location": "path",
24510	//       "required": true,
24511	//       "type": "string"
24512	//     }
24513	//   },
24514	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
24515	//   "response": {
24516	//     "$ref": "ContentCategory"
24517	//   },
24518	//   "scopes": [
24519	//     "https://www.googleapis.com/auth/dfatrafficking"
24520	//   ]
24521	// }
24522
24523}
24524
24525// method id "dfareporting.contentCategories.insert":
24526
24527type ContentCategoriesInsertCall struct {
24528	s               *Service
24529	profileId       int64
24530	contentcategory *ContentCategory
24531	urlParams_      gensupport.URLParams
24532	ctx_            context.Context
24533	header_         http.Header
24534}
24535
24536// Insert: Inserts a new content category.
24537//
24538// - profileId: User profile ID associated with this request.
24539func (r *ContentCategoriesService) Insert(profileId int64, contentcategory *ContentCategory) *ContentCategoriesInsertCall {
24540	c := &ContentCategoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24541	c.profileId = profileId
24542	c.contentcategory = contentcategory
24543	return c
24544}
24545
24546// Fields allows partial responses to be retrieved. See
24547// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24548// for more information.
24549func (c *ContentCategoriesInsertCall) Fields(s ...googleapi.Field) *ContentCategoriesInsertCall {
24550	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24551	return c
24552}
24553
24554// Context sets the context to be used in this call's Do method. Any
24555// pending HTTP request will be aborted if the provided context is
24556// canceled.
24557func (c *ContentCategoriesInsertCall) Context(ctx context.Context) *ContentCategoriesInsertCall {
24558	c.ctx_ = ctx
24559	return c
24560}
24561
24562// Header returns an http.Header that can be modified by the caller to
24563// add HTTP headers to the request.
24564func (c *ContentCategoriesInsertCall) Header() http.Header {
24565	if c.header_ == nil {
24566		c.header_ = make(http.Header)
24567	}
24568	return c.header_
24569}
24570
24571func (c *ContentCategoriesInsertCall) doRequest(alt string) (*http.Response, error) {
24572	reqHeaders := make(http.Header)
24573	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
24574	for k, v := range c.header_ {
24575		reqHeaders[k] = v
24576	}
24577	reqHeaders.Set("User-Agent", c.s.userAgent())
24578	var body io.Reader = nil
24579	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
24580	if err != nil {
24581		return nil, err
24582	}
24583	reqHeaders.Set("Content-Type", "application/json")
24584	c.urlParams_.Set("alt", alt)
24585	c.urlParams_.Set("prettyPrint", "false")
24586	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
24587	urls += "?" + c.urlParams_.Encode()
24588	req, err := http.NewRequest("POST", urls, body)
24589	if err != nil {
24590		return nil, err
24591	}
24592	req.Header = reqHeaders
24593	googleapi.Expand(req.URL, map[string]string{
24594		"profileId": strconv.FormatInt(c.profileId, 10),
24595	})
24596	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24597}
24598
24599// Do executes the "dfareporting.contentCategories.insert" call.
24600// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
24601// status code is an error. Response headers are in either
24602// *ContentCategory.ServerResponse.Header or (if a response was returned
24603// at all) in error.(*googleapi.Error).Header. Use
24604// googleapi.IsNotModified to check whether the returned error was
24605// because http.StatusNotModified was returned.
24606func (c *ContentCategoriesInsertCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
24607	gensupport.SetOptions(c.urlParams_, opts...)
24608	res, err := c.doRequest("json")
24609	if res != nil && res.StatusCode == http.StatusNotModified {
24610		if res.Body != nil {
24611			res.Body.Close()
24612		}
24613		return nil, &googleapi.Error{
24614			Code:   res.StatusCode,
24615			Header: res.Header,
24616		}
24617	}
24618	if err != nil {
24619		return nil, err
24620	}
24621	defer googleapi.CloseBody(res)
24622	if err := googleapi.CheckResponse(res); err != nil {
24623		return nil, err
24624	}
24625	ret := &ContentCategory{
24626		ServerResponse: googleapi.ServerResponse{
24627			Header:         res.Header,
24628			HTTPStatusCode: res.StatusCode,
24629		},
24630	}
24631	target := &ret
24632	if err := gensupport.DecodeResponse(target, res); err != nil {
24633		return nil, err
24634	}
24635	return ret, nil
24636	// {
24637	//   "description": "Inserts a new content category.",
24638	//   "flatPath": "userprofiles/{profileId}/contentCategories",
24639	//   "httpMethod": "POST",
24640	//   "id": "dfareporting.contentCategories.insert",
24641	//   "parameterOrder": [
24642	//     "profileId"
24643	//   ],
24644	//   "parameters": {
24645	//     "profileId": {
24646	//       "description": "User profile ID associated with this request.",
24647	//       "format": "int64",
24648	//       "location": "path",
24649	//       "required": true,
24650	//       "type": "string"
24651	//     }
24652	//   },
24653	//   "path": "userprofiles/{profileId}/contentCategories",
24654	//   "request": {
24655	//     "$ref": "ContentCategory"
24656	//   },
24657	//   "response": {
24658	//     "$ref": "ContentCategory"
24659	//   },
24660	//   "scopes": [
24661	//     "https://www.googleapis.com/auth/dfatrafficking"
24662	//   ]
24663	// }
24664
24665}
24666
24667// method id "dfareporting.contentCategories.list":
24668
24669type ContentCategoriesListCall struct {
24670	s            *Service
24671	profileId    int64
24672	urlParams_   gensupport.URLParams
24673	ifNoneMatch_ string
24674	ctx_         context.Context
24675	header_      http.Header
24676}
24677
24678// List: Retrieves a list of content categories, possibly filtered. This
24679// method supports paging.
24680//
24681// - profileId: User profile ID associated with this request.
24682func (r *ContentCategoriesService) List(profileId int64) *ContentCategoriesListCall {
24683	c := &ContentCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24684	c.profileId = profileId
24685	return c
24686}
24687
24688// Ids sets the optional parameter "ids": Select only content categories
24689// with these IDs.
24690func (c *ContentCategoriesListCall) Ids(ids ...int64) *ContentCategoriesListCall {
24691	var ids_ []string
24692	for _, v := range ids {
24693		ids_ = append(ids_, fmt.Sprint(v))
24694	}
24695	c.urlParams_.SetMulti("ids", ids_)
24696	return c
24697}
24698
24699// MaxResults sets the optional parameter "maxResults": Maximum number
24700// of results to return.
24701func (c *ContentCategoriesListCall) MaxResults(maxResults int64) *ContentCategoriesListCall {
24702	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
24703	return c
24704}
24705
24706// PageToken sets the optional parameter "pageToken": Value of the
24707// nextPageToken from the previous result page.
24708func (c *ContentCategoriesListCall) PageToken(pageToken string) *ContentCategoriesListCall {
24709	c.urlParams_.Set("pageToken", pageToken)
24710	return c
24711}
24712
24713// SearchString sets the optional parameter "searchString": Allows
24714// searching for objects by name or ID. Wildcards (*) are allowed. For
24715// example, "contentcategory*2015" will return objects with names like
24716// "contentcategory June 2015", "contentcategory April 2015", or simply
24717// "contentcategory 2015". Most of the searches also add wildcards
24718// implicitly at the start and the end of the search string. For
24719// example, a search string of "contentcategory" will match objects with
24720// name "my contentcategory", "contentcategory 2015", or simply
24721// "contentcategory".
24722func (c *ContentCategoriesListCall) SearchString(searchString string) *ContentCategoriesListCall {
24723	c.urlParams_.Set("searchString", searchString)
24724	return c
24725}
24726
24727// SortField sets the optional parameter "sortField": Field by which to
24728// sort the list.
24729//
24730// Possible values:
24731//   "ID" (default)
24732//   "NAME"
24733func (c *ContentCategoriesListCall) SortField(sortField string) *ContentCategoriesListCall {
24734	c.urlParams_.Set("sortField", sortField)
24735	return c
24736}
24737
24738// SortOrder sets the optional parameter "sortOrder": Order of sorted
24739// results.
24740//
24741// Possible values:
24742//   "ASCENDING" (default)
24743//   "DESCENDING"
24744func (c *ContentCategoriesListCall) SortOrder(sortOrder string) *ContentCategoriesListCall {
24745	c.urlParams_.Set("sortOrder", sortOrder)
24746	return c
24747}
24748
24749// Fields allows partial responses to be retrieved. See
24750// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24751// for more information.
24752func (c *ContentCategoriesListCall) Fields(s ...googleapi.Field) *ContentCategoriesListCall {
24753	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24754	return c
24755}
24756
24757// IfNoneMatch sets the optional parameter which makes the operation
24758// fail if the object's ETag matches the given value. This is useful for
24759// getting updates only after the object has changed since the last
24760// request. Use googleapi.IsNotModified to check whether the response
24761// error from Do is the result of In-None-Match.
24762func (c *ContentCategoriesListCall) IfNoneMatch(entityTag string) *ContentCategoriesListCall {
24763	c.ifNoneMatch_ = entityTag
24764	return c
24765}
24766
24767// Context sets the context to be used in this call's Do method. Any
24768// pending HTTP request will be aborted if the provided context is
24769// canceled.
24770func (c *ContentCategoriesListCall) Context(ctx context.Context) *ContentCategoriesListCall {
24771	c.ctx_ = ctx
24772	return c
24773}
24774
24775// Header returns an http.Header that can be modified by the caller to
24776// add HTTP headers to the request.
24777func (c *ContentCategoriesListCall) Header() http.Header {
24778	if c.header_ == nil {
24779		c.header_ = make(http.Header)
24780	}
24781	return c.header_
24782}
24783
24784func (c *ContentCategoriesListCall) doRequest(alt string) (*http.Response, error) {
24785	reqHeaders := make(http.Header)
24786	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
24787	for k, v := range c.header_ {
24788		reqHeaders[k] = v
24789	}
24790	reqHeaders.Set("User-Agent", c.s.userAgent())
24791	if c.ifNoneMatch_ != "" {
24792		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24793	}
24794	var body io.Reader = nil
24795	c.urlParams_.Set("alt", alt)
24796	c.urlParams_.Set("prettyPrint", "false")
24797	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
24798	urls += "?" + c.urlParams_.Encode()
24799	req, err := http.NewRequest("GET", urls, body)
24800	if err != nil {
24801		return nil, err
24802	}
24803	req.Header = reqHeaders
24804	googleapi.Expand(req.URL, map[string]string{
24805		"profileId": strconv.FormatInt(c.profileId, 10),
24806	})
24807	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24808}
24809
24810// Do executes the "dfareporting.contentCategories.list" call.
24811// Exactly one of *ContentCategoriesListResponse or error will be
24812// non-nil. Any non-2xx status code is an error. Response headers are in
24813// either *ContentCategoriesListResponse.ServerResponse.Header or (if a
24814// response was returned at all) in error.(*googleapi.Error).Header. Use
24815// googleapi.IsNotModified to check whether the returned error was
24816// because http.StatusNotModified was returned.
24817func (c *ContentCategoriesListCall) Do(opts ...googleapi.CallOption) (*ContentCategoriesListResponse, error) {
24818	gensupport.SetOptions(c.urlParams_, opts...)
24819	res, err := c.doRequest("json")
24820	if res != nil && res.StatusCode == http.StatusNotModified {
24821		if res.Body != nil {
24822			res.Body.Close()
24823		}
24824		return nil, &googleapi.Error{
24825			Code:   res.StatusCode,
24826			Header: res.Header,
24827		}
24828	}
24829	if err != nil {
24830		return nil, err
24831	}
24832	defer googleapi.CloseBody(res)
24833	if err := googleapi.CheckResponse(res); err != nil {
24834		return nil, err
24835	}
24836	ret := &ContentCategoriesListResponse{
24837		ServerResponse: googleapi.ServerResponse{
24838			Header:         res.Header,
24839			HTTPStatusCode: res.StatusCode,
24840		},
24841	}
24842	target := &ret
24843	if err := gensupport.DecodeResponse(target, res); err != nil {
24844		return nil, err
24845	}
24846	return ret, nil
24847	// {
24848	//   "description": "Retrieves a list of content categories, possibly filtered. This method supports paging.",
24849	//   "flatPath": "userprofiles/{profileId}/contentCategories",
24850	//   "httpMethod": "GET",
24851	//   "id": "dfareporting.contentCategories.list",
24852	//   "parameterOrder": [
24853	//     "profileId"
24854	//   ],
24855	//   "parameters": {
24856	//     "ids": {
24857	//       "description": "Select only content categories with these IDs.",
24858	//       "format": "int64",
24859	//       "location": "query",
24860	//       "repeated": true,
24861	//       "type": "string"
24862	//     },
24863	//     "maxResults": {
24864	//       "default": "1000",
24865	//       "description": "Maximum number of results to return.",
24866	//       "format": "int32",
24867	//       "location": "query",
24868	//       "maximum": "1000",
24869	//       "minimum": "0",
24870	//       "type": "integer"
24871	//     },
24872	//     "pageToken": {
24873	//       "description": "Value of the nextPageToken from the previous result page.",
24874	//       "location": "query",
24875	//       "type": "string"
24876	//     },
24877	//     "profileId": {
24878	//       "description": "User profile ID associated with this request.",
24879	//       "format": "int64",
24880	//       "location": "path",
24881	//       "required": true,
24882	//       "type": "string"
24883	//     },
24884	//     "searchString": {
24885	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"contentcategory*2015\" will return objects with names like \"contentcategory June 2015\", \"contentcategory April 2015\", or simply \"contentcategory 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"contentcategory\" will match objects with name \"my contentcategory\", \"contentcategory 2015\", or simply \"contentcategory\".",
24886	//       "location": "query",
24887	//       "type": "string"
24888	//     },
24889	//     "sortField": {
24890	//       "default": "ID",
24891	//       "description": "Field by which to sort the list.",
24892	//       "enum": [
24893	//         "ID",
24894	//         "NAME"
24895	//       ],
24896	//       "enumDescriptions": [
24897	//         "",
24898	//         ""
24899	//       ],
24900	//       "location": "query",
24901	//       "type": "string"
24902	//     },
24903	//     "sortOrder": {
24904	//       "default": "ASCENDING",
24905	//       "description": "Order of sorted results.",
24906	//       "enum": [
24907	//         "ASCENDING",
24908	//         "DESCENDING"
24909	//       ],
24910	//       "enumDescriptions": [
24911	//         "",
24912	//         ""
24913	//       ],
24914	//       "location": "query",
24915	//       "type": "string"
24916	//     }
24917	//   },
24918	//   "path": "userprofiles/{profileId}/contentCategories",
24919	//   "response": {
24920	//     "$ref": "ContentCategoriesListResponse"
24921	//   },
24922	//   "scopes": [
24923	//     "https://www.googleapis.com/auth/dfatrafficking"
24924	//   ]
24925	// }
24926
24927}
24928
24929// Pages invokes f for each page of results.
24930// A non-nil error returned from f will halt the iteration.
24931// The provided context supersedes any context provided to the Context method.
24932func (c *ContentCategoriesListCall) Pages(ctx context.Context, f func(*ContentCategoriesListResponse) error) error {
24933	c.ctx_ = ctx
24934	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
24935	for {
24936		x, err := c.Do()
24937		if err != nil {
24938			return err
24939		}
24940		if err := f(x); err != nil {
24941			return err
24942		}
24943		if x.NextPageToken == "" {
24944			return nil
24945		}
24946		c.PageToken(x.NextPageToken)
24947	}
24948}
24949
24950// method id "dfareporting.contentCategories.patch":
24951
24952type ContentCategoriesPatchCall struct {
24953	s               *Service
24954	profileId       int64
24955	contentcategory *ContentCategory
24956	urlParams_      gensupport.URLParams
24957	ctx_            context.Context
24958	header_         http.Header
24959}
24960
24961// Patch: Updates an existing content category. This method supports
24962// patch semantics.
24963//
24964// - id: ContentCategory ID.
24965// - profileId: User profile ID associated with this request.
24966func (r *ContentCategoriesService) Patch(profileId int64, id int64, contentcategory *ContentCategory) *ContentCategoriesPatchCall {
24967	c := &ContentCategoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24968	c.profileId = profileId
24969	c.urlParams_.Set("id", fmt.Sprint(id))
24970	c.contentcategory = contentcategory
24971	return c
24972}
24973
24974// Fields allows partial responses to be retrieved. See
24975// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24976// for more information.
24977func (c *ContentCategoriesPatchCall) Fields(s ...googleapi.Field) *ContentCategoriesPatchCall {
24978	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24979	return c
24980}
24981
24982// Context sets the context to be used in this call's Do method. Any
24983// pending HTTP request will be aborted if the provided context is
24984// canceled.
24985func (c *ContentCategoriesPatchCall) Context(ctx context.Context) *ContentCategoriesPatchCall {
24986	c.ctx_ = ctx
24987	return c
24988}
24989
24990// Header returns an http.Header that can be modified by the caller to
24991// add HTTP headers to the request.
24992func (c *ContentCategoriesPatchCall) Header() http.Header {
24993	if c.header_ == nil {
24994		c.header_ = make(http.Header)
24995	}
24996	return c.header_
24997}
24998
24999func (c *ContentCategoriesPatchCall) doRequest(alt string) (*http.Response, error) {
25000	reqHeaders := make(http.Header)
25001	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
25002	for k, v := range c.header_ {
25003		reqHeaders[k] = v
25004	}
25005	reqHeaders.Set("User-Agent", c.s.userAgent())
25006	var body io.Reader = nil
25007	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
25008	if err != nil {
25009		return nil, err
25010	}
25011	reqHeaders.Set("Content-Type", "application/json")
25012	c.urlParams_.Set("alt", alt)
25013	c.urlParams_.Set("prettyPrint", "false")
25014	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
25015	urls += "?" + c.urlParams_.Encode()
25016	req, err := http.NewRequest("PATCH", urls, body)
25017	if err != nil {
25018		return nil, err
25019	}
25020	req.Header = reqHeaders
25021	googleapi.Expand(req.URL, map[string]string{
25022		"profileId": strconv.FormatInt(c.profileId, 10),
25023	})
25024	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25025}
25026
25027// Do executes the "dfareporting.contentCategories.patch" call.
25028// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
25029// status code is an error. Response headers are in either
25030// *ContentCategory.ServerResponse.Header or (if a response was returned
25031// at all) in error.(*googleapi.Error).Header. Use
25032// googleapi.IsNotModified to check whether the returned error was
25033// because http.StatusNotModified was returned.
25034func (c *ContentCategoriesPatchCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
25035	gensupport.SetOptions(c.urlParams_, opts...)
25036	res, err := c.doRequest("json")
25037	if res != nil && res.StatusCode == http.StatusNotModified {
25038		if res.Body != nil {
25039			res.Body.Close()
25040		}
25041		return nil, &googleapi.Error{
25042			Code:   res.StatusCode,
25043			Header: res.Header,
25044		}
25045	}
25046	if err != nil {
25047		return nil, err
25048	}
25049	defer googleapi.CloseBody(res)
25050	if err := googleapi.CheckResponse(res); err != nil {
25051		return nil, err
25052	}
25053	ret := &ContentCategory{
25054		ServerResponse: googleapi.ServerResponse{
25055			Header:         res.Header,
25056			HTTPStatusCode: res.StatusCode,
25057		},
25058	}
25059	target := &ret
25060	if err := gensupport.DecodeResponse(target, res); err != nil {
25061		return nil, err
25062	}
25063	return ret, nil
25064	// {
25065	//   "description": "Updates an existing content category. This method supports patch semantics.",
25066	//   "flatPath": "userprofiles/{profileId}/contentCategories",
25067	//   "httpMethod": "PATCH",
25068	//   "id": "dfareporting.contentCategories.patch",
25069	//   "parameterOrder": [
25070	//     "profileId",
25071	//     "id"
25072	//   ],
25073	//   "parameters": {
25074	//     "id": {
25075	//       "description": "ContentCategory ID.",
25076	//       "format": "int64",
25077	//       "location": "query",
25078	//       "required": true,
25079	//       "type": "string"
25080	//     },
25081	//     "profileId": {
25082	//       "description": "User profile ID associated with this request.",
25083	//       "format": "int64",
25084	//       "location": "path",
25085	//       "required": true,
25086	//       "type": "string"
25087	//     }
25088	//   },
25089	//   "path": "userprofiles/{profileId}/contentCategories",
25090	//   "request": {
25091	//     "$ref": "ContentCategory"
25092	//   },
25093	//   "response": {
25094	//     "$ref": "ContentCategory"
25095	//   },
25096	//   "scopes": [
25097	//     "https://www.googleapis.com/auth/dfatrafficking"
25098	//   ]
25099	// }
25100
25101}
25102
25103// method id "dfareporting.contentCategories.update":
25104
25105type ContentCategoriesUpdateCall struct {
25106	s               *Service
25107	profileId       int64
25108	contentcategory *ContentCategory
25109	urlParams_      gensupport.URLParams
25110	ctx_            context.Context
25111	header_         http.Header
25112}
25113
25114// Update: Updates an existing content category.
25115//
25116// - profileId: User profile ID associated with this request.
25117func (r *ContentCategoriesService) Update(profileId int64, contentcategory *ContentCategory) *ContentCategoriesUpdateCall {
25118	c := &ContentCategoriesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25119	c.profileId = profileId
25120	c.contentcategory = contentcategory
25121	return c
25122}
25123
25124// Fields allows partial responses to be retrieved. See
25125// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25126// for more information.
25127func (c *ContentCategoriesUpdateCall) Fields(s ...googleapi.Field) *ContentCategoriesUpdateCall {
25128	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25129	return c
25130}
25131
25132// Context sets the context to be used in this call's Do method. Any
25133// pending HTTP request will be aborted if the provided context is
25134// canceled.
25135func (c *ContentCategoriesUpdateCall) Context(ctx context.Context) *ContentCategoriesUpdateCall {
25136	c.ctx_ = ctx
25137	return c
25138}
25139
25140// Header returns an http.Header that can be modified by the caller to
25141// add HTTP headers to the request.
25142func (c *ContentCategoriesUpdateCall) Header() http.Header {
25143	if c.header_ == nil {
25144		c.header_ = make(http.Header)
25145	}
25146	return c.header_
25147}
25148
25149func (c *ContentCategoriesUpdateCall) doRequest(alt string) (*http.Response, error) {
25150	reqHeaders := make(http.Header)
25151	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
25152	for k, v := range c.header_ {
25153		reqHeaders[k] = v
25154	}
25155	reqHeaders.Set("User-Agent", c.s.userAgent())
25156	var body io.Reader = nil
25157	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
25158	if err != nil {
25159		return nil, err
25160	}
25161	reqHeaders.Set("Content-Type", "application/json")
25162	c.urlParams_.Set("alt", alt)
25163	c.urlParams_.Set("prettyPrint", "false")
25164	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
25165	urls += "?" + c.urlParams_.Encode()
25166	req, err := http.NewRequest("PUT", urls, body)
25167	if err != nil {
25168		return nil, err
25169	}
25170	req.Header = reqHeaders
25171	googleapi.Expand(req.URL, map[string]string{
25172		"profileId": strconv.FormatInt(c.profileId, 10),
25173	})
25174	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25175}
25176
25177// Do executes the "dfareporting.contentCategories.update" call.
25178// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
25179// status code is an error. Response headers are in either
25180// *ContentCategory.ServerResponse.Header or (if a response was returned
25181// at all) in error.(*googleapi.Error).Header. Use
25182// googleapi.IsNotModified to check whether the returned error was
25183// because http.StatusNotModified was returned.
25184func (c *ContentCategoriesUpdateCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
25185	gensupport.SetOptions(c.urlParams_, opts...)
25186	res, err := c.doRequest("json")
25187	if res != nil && res.StatusCode == http.StatusNotModified {
25188		if res.Body != nil {
25189			res.Body.Close()
25190		}
25191		return nil, &googleapi.Error{
25192			Code:   res.StatusCode,
25193			Header: res.Header,
25194		}
25195	}
25196	if err != nil {
25197		return nil, err
25198	}
25199	defer googleapi.CloseBody(res)
25200	if err := googleapi.CheckResponse(res); err != nil {
25201		return nil, err
25202	}
25203	ret := &ContentCategory{
25204		ServerResponse: googleapi.ServerResponse{
25205			Header:         res.Header,
25206			HTTPStatusCode: res.StatusCode,
25207		},
25208	}
25209	target := &ret
25210	if err := gensupport.DecodeResponse(target, res); err != nil {
25211		return nil, err
25212	}
25213	return ret, nil
25214	// {
25215	//   "description": "Updates an existing content category.",
25216	//   "flatPath": "userprofiles/{profileId}/contentCategories",
25217	//   "httpMethod": "PUT",
25218	//   "id": "dfareporting.contentCategories.update",
25219	//   "parameterOrder": [
25220	//     "profileId"
25221	//   ],
25222	//   "parameters": {
25223	//     "profileId": {
25224	//       "description": "User profile ID associated with this request.",
25225	//       "format": "int64",
25226	//       "location": "path",
25227	//       "required": true,
25228	//       "type": "string"
25229	//     }
25230	//   },
25231	//   "path": "userprofiles/{profileId}/contentCategories",
25232	//   "request": {
25233	//     "$ref": "ContentCategory"
25234	//   },
25235	//   "response": {
25236	//     "$ref": "ContentCategory"
25237	//   },
25238	//   "scopes": [
25239	//     "https://www.googleapis.com/auth/dfatrafficking"
25240	//   ]
25241	// }
25242
25243}
25244
25245// method id "dfareporting.conversions.batchinsert":
25246
25247type ConversionsBatchinsertCall struct {
25248	s                             *Service
25249	profileId                     int64
25250	conversionsbatchinsertrequest *ConversionsBatchInsertRequest
25251	urlParams_                    gensupport.URLParams
25252	ctx_                          context.Context
25253	header_                       http.Header
25254}
25255
25256// Batchinsert: Inserts conversions.
25257//
25258// - profileId: User profile ID associated with this request.
25259func (r *ConversionsService) Batchinsert(profileId int64, conversionsbatchinsertrequest *ConversionsBatchInsertRequest) *ConversionsBatchinsertCall {
25260	c := &ConversionsBatchinsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25261	c.profileId = profileId
25262	c.conversionsbatchinsertrequest = conversionsbatchinsertrequest
25263	return c
25264}
25265
25266// Fields allows partial responses to be retrieved. See
25267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25268// for more information.
25269func (c *ConversionsBatchinsertCall) Fields(s ...googleapi.Field) *ConversionsBatchinsertCall {
25270	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25271	return c
25272}
25273
25274// Context sets the context to be used in this call's Do method. Any
25275// pending HTTP request will be aborted if the provided context is
25276// canceled.
25277func (c *ConversionsBatchinsertCall) Context(ctx context.Context) *ConversionsBatchinsertCall {
25278	c.ctx_ = ctx
25279	return c
25280}
25281
25282// Header returns an http.Header that can be modified by the caller to
25283// add HTTP headers to the request.
25284func (c *ConversionsBatchinsertCall) Header() http.Header {
25285	if c.header_ == nil {
25286		c.header_ = make(http.Header)
25287	}
25288	return c.header_
25289}
25290
25291func (c *ConversionsBatchinsertCall) doRequest(alt string) (*http.Response, error) {
25292	reqHeaders := make(http.Header)
25293	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
25294	for k, v := range c.header_ {
25295		reqHeaders[k] = v
25296	}
25297	reqHeaders.Set("User-Agent", c.s.userAgent())
25298	var body io.Reader = nil
25299	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchinsertrequest)
25300	if err != nil {
25301		return nil, err
25302	}
25303	reqHeaders.Set("Content-Type", "application/json")
25304	c.urlParams_.Set("alt", alt)
25305	c.urlParams_.Set("prettyPrint", "false")
25306	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchinsert")
25307	urls += "?" + c.urlParams_.Encode()
25308	req, err := http.NewRequest("POST", urls, body)
25309	if err != nil {
25310		return nil, err
25311	}
25312	req.Header = reqHeaders
25313	googleapi.Expand(req.URL, map[string]string{
25314		"profileId": strconv.FormatInt(c.profileId, 10),
25315	})
25316	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25317}
25318
25319// Do executes the "dfareporting.conversions.batchinsert" call.
25320// Exactly one of *ConversionsBatchInsertResponse or error will be
25321// non-nil. Any non-2xx status code is an error. Response headers are in
25322// either *ConversionsBatchInsertResponse.ServerResponse.Header or (if a
25323// response was returned at all) in error.(*googleapi.Error).Header. Use
25324// googleapi.IsNotModified to check whether the returned error was
25325// because http.StatusNotModified was returned.
25326func (c *ConversionsBatchinsertCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchInsertResponse, error) {
25327	gensupport.SetOptions(c.urlParams_, opts...)
25328	res, err := c.doRequest("json")
25329	if res != nil && res.StatusCode == http.StatusNotModified {
25330		if res.Body != nil {
25331			res.Body.Close()
25332		}
25333		return nil, &googleapi.Error{
25334			Code:   res.StatusCode,
25335			Header: res.Header,
25336		}
25337	}
25338	if err != nil {
25339		return nil, err
25340	}
25341	defer googleapi.CloseBody(res)
25342	if err := googleapi.CheckResponse(res); err != nil {
25343		return nil, err
25344	}
25345	ret := &ConversionsBatchInsertResponse{
25346		ServerResponse: googleapi.ServerResponse{
25347			Header:         res.Header,
25348			HTTPStatusCode: res.StatusCode,
25349		},
25350	}
25351	target := &ret
25352	if err := gensupport.DecodeResponse(target, res); err != nil {
25353		return nil, err
25354	}
25355	return ret, nil
25356	// {
25357	//   "description": "Inserts conversions.",
25358	//   "flatPath": "userprofiles/{profileId}/conversions/batchinsert",
25359	//   "httpMethod": "POST",
25360	//   "id": "dfareporting.conversions.batchinsert",
25361	//   "parameterOrder": [
25362	//     "profileId"
25363	//   ],
25364	//   "parameters": {
25365	//     "profileId": {
25366	//       "description": "User profile ID associated with this request.",
25367	//       "format": "int64",
25368	//       "location": "path",
25369	//       "required": true,
25370	//       "type": "string"
25371	//     }
25372	//   },
25373	//   "path": "userprofiles/{profileId}/conversions/batchinsert",
25374	//   "request": {
25375	//     "$ref": "ConversionsBatchInsertRequest"
25376	//   },
25377	//   "response": {
25378	//     "$ref": "ConversionsBatchInsertResponse"
25379	//   },
25380	//   "scopes": [
25381	//     "https://www.googleapis.com/auth/ddmconversions"
25382	//   ]
25383	// }
25384
25385}
25386
25387// method id "dfareporting.conversions.batchupdate":
25388
25389type ConversionsBatchupdateCall struct {
25390	s                             *Service
25391	profileId                     int64
25392	conversionsbatchupdaterequest *ConversionsBatchUpdateRequest
25393	urlParams_                    gensupport.URLParams
25394	ctx_                          context.Context
25395	header_                       http.Header
25396}
25397
25398// Batchupdate: Updates existing conversions.
25399//
25400// - profileId: User profile ID associated with this request.
25401func (r *ConversionsService) Batchupdate(profileId int64, conversionsbatchupdaterequest *ConversionsBatchUpdateRequest) *ConversionsBatchupdateCall {
25402	c := &ConversionsBatchupdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25403	c.profileId = profileId
25404	c.conversionsbatchupdaterequest = conversionsbatchupdaterequest
25405	return c
25406}
25407
25408// Fields allows partial responses to be retrieved. See
25409// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25410// for more information.
25411func (c *ConversionsBatchupdateCall) Fields(s ...googleapi.Field) *ConversionsBatchupdateCall {
25412	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25413	return c
25414}
25415
25416// Context sets the context to be used in this call's Do method. Any
25417// pending HTTP request will be aborted if the provided context is
25418// canceled.
25419func (c *ConversionsBatchupdateCall) Context(ctx context.Context) *ConversionsBatchupdateCall {
25420	c.ctx_ = ctx
25421	return c
25422}
25423
25424// Header returns an http.Header that can be modified by the caller to
25425// add HTTP headers to the request.
25426func (c *ConversionsBatchupdateCall) Header() http.Header {
25427	if c.header_ == nil {
25428		c.header_ = make(http.Header)
25429	}
25430	return c.header_
25431}
25432
25433func (c *ConversionsBatchupdateCall) doRequest(alt string) (*http.Response, error) {
25434	reqHeaders := make(http.Header)
25435	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
25436	for k, v := range c.header_ {
25437		reqHeaders[k] = v
25438	}
25439	reqHeaders.Set("User-Agent", c.s.userAgent())
25440	var body io.Reader = nil
25441	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchupdaterequest)
25442	if err != nil {
25443		return nil, err
25444	}
25445	reqHeaders.Set("Content-Type", "application/json")
25446	c.urlParams_.Set("alt", alt)
25447	c.urlParams_.Set("prettyPrint", "false")
25448	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchupdate")
25449	urls += "?" + c.urlParams_.Encode()
25450	req, err := http.NewRequest("POST", urls, body)
25451	if err != nil {
25452		return nil, err
25453	}
25454	req.Header = reqHeaders
25455	googleapi.Expand(req.URL, map[string]string{
25456		"profileId": strconv.FormatInt(c.profileId, 10),
25457	})
25458	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25459}
25460
25461// Do executes the "dfareporting.conversions.batchupdate" call.
25462// Exactly one of *ConversionsBatchUpdateResponse or error will be
25463// non-nil. Any non-2xx status code is an error. Response headers are in
25464// either *ConversionsBatchUpdateResponse.ServerResponse.Header or (if a
25465// response was returned at all) in error.(*googleapi.Error).Header. Use
25466// googleapi.IsNotModified to check whether the returned error was
25467// because http.StatusNotModified was returned.
25468func (c *ConversionsBatchupdateCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchUpdateResponse, error) {
25469	gensupport.SetOptions(c.urlParams_, opts...)
25470	res, err := c.doRequest("json")
25471	if res != nil && res.StatusCode == http.StatusNotModified {
25472		if res.Body != nil {
25473			res.Body.Close()
25474		}
25475		return nil, &googleapi.Error{
25476			Code:   res.StatusCode,
25477			Header: res.Header,
25478		}
25479	}
25480	if err != nil {
25481		return nil, err
25482	}
25483	defer googleapi.CloseBody(res)
25484	if err := googleapi.CheckResponse(res); err != nil {
25485		return nil, err
25486	}
25487	ret := &ConversionsBatchUpdateResponse{
25488		ServerResponse: googleapi.ServerResponse{
25489			Header:         res.Header,
25490			HTTPStatusCode: res.StatusCode,
25491		},
25492	}
25493	target := &ret
25494	if err := gensupport.DecodeResponse(target, res); err != nil {
25495		return nil, err
25496	}
25497	return ret, nil
25498	// {
25499	//   "description": "Updates existing conversions.",
25500	//   "flatPath": "userprofiles/{profileId}/conversions/batchupdate",
25501	//   "httpMethod": "POST",
25502	//   "id": "dfareporting.conversions.batchupdate",
25503	//   "parameterOrder": [
25504	//     "profileId"
25505	//   ],
25506	//   "parameters": {
25507	//     "profileId": {
25508	//       "description": "User profile ID associated with this request.",
25509	//       "format": "int64",
25510	//       "location": "path",
25511	//       "required": true,
25512	//       "type": "string"
25513	//     }
25514	//   },
25515	//   "path": "userprofiles/{profileId}/conversions/batchupdate",
25516	//   "request": {
25517	//     "$ref": "ConversionsBatchUpdateRequest"
25518	//   },
25519	//   "response": {
25520	//     "$ref": "ConversionsBatchUpdateResponse"
25521	//   },
25522	//   "scopes": [
25523	//     "https://www.googleapis.com/auth/ddmconversions"
25524	//   ]
25525	// }
25526
25527}
25528
25529// method id "dfareporting.countries.get":
25530
25531type CountriesGetCall struct {
25532	s            *Service
25533	profileId    int64
25534	dartId       int64
25535	urlParams_   gensupport.URLParams
25536	ifNoneMatch_ string
25537	ctx_         context.Context
25538	header_      http.Header
25539}
25540
25541// Get: Gets one country by ID.
25542//
25543// - dartId: Country DART ID.
25544// - profileId: User profile ID associated with this request.
25545func (r *CountriesService) Get(profileId int64, dartId int64) *CountriesGetCall {
25546	c := &CountriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25547	c.profileId = profileId
25548	c.dartId = dartId
25549	return c
25550}
25551
25552// Fields allows partial responses to be retrieved. See
25553// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25554// for more information.
25555func (c *CountriesGetCall) Fields(s ...googleapi.Field) *CountriesGetCall {
25556	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25557	return c
25558}
25559
25560// IfNoneMatch sets the optional parameter which makes the operation
25561// fail if the object's ETag matches the given value. This is useful for
25562// getting updates only after the object has changed since the last
25563// request. Use googleapi.IsNotModified to check whether the response
25564// error from Do is the result of In-None-Match.
25565func (c *CountriesGetCall) IfNoneMatch(entityTag string) *CountriesGetCall {
25566	c.ifNoneMatch_ = entityTag
25567	return c
25568}
25569
25570// Context sets the context to be used in this call's Do method. Any
25571// pending HTTP request will be aborted if the provided context is
25572// canceled.
25573func (c *CountriesGetCall) Context(ctx context.Context) *CountriesGetCall {
25574	c.ctx_ = ctx
25575	return c
25576}
25577
25578// Header returns an http.Header that can be modified by the caller to
25579// add HTTP headers to the request.
25580func (c *CountriesGetCall) Header() http.Header {
25581	if c.header_ == nil {
25582		c.header_ = make(http.Header)
25583	}
25584	return c.header_
25585}
25586
25587func (c *CountriesGetCall) doRequest(alt string) (*http.Response, error) {
25588	reqHeaders := make(http.Header)
25589	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
25590	for k, v := range c.header_ {
25591		reqHeaders[k] = v
25592	}
25593	reqHeaders.Set("User-Agent", c.s.userAgent())
25594	if c.ifNoneMatch_ != "" {
25595		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25596	}
25597	var body io.Reader = nil
25598	c.urlParams_.Set("alt", alt)
25599	c.urlParams_.Set("prettyPrint", "false")
25600	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries/{dartId}")
25601	urls += "?" + c.urlParams_.Encode()
25602	req, err := http.NewRequest("GET", urls, body)
25603	if err != nil {
25604		return nil, err
25605	}
25606	req.Header = reqHeaders
25607	googleapi.Expand(req.URL, map[string]string{
25608		"profileId": strconv.FormatInt(c.profileId, 10),
25609		"dartId":    strconv.FormatInt(c.dartId, 10),
25610	})
25611	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25612}
25613
25614// Do executes the "dfareporting.countries.get" call.
25615// Exactly one of *Country or error will be non-nil. Any non-2xx status
25616// code is an error. Response headers are in either
25617// *Country.ServerResponse.Header or (if a response was returned at all)
25618// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
25619// check whether the returned error was because http.StatusNotModified
25620// was returned.
25621func (c *CountriesGetCall) Do(opts ...googleapi.CallOption) (*Country, error) {
25622	gensupport.SetOptions(c.urlParams_, opts...)
25623	res, err := c.doRequest("json")
25624	if res != nil && res.StatusCode == http.StatusNotModified {
25625		if res.Body != nil {
25626			res.Body.Close()
25627		}
25628		return nil, &googleapi.Error{
25629			Code:   res.StatusCode,
25630			Header: res.Header,
25631		}
25632	}
25633	if err != nil {
25634		return nil, err
25635	}
25636	defer googleapi.CloseBody(res)
25637	if err := googleapi.CheckResponse(res); err != nil {
25638		return nil, err
25639	}
25640	ret := &Country{
25641		ServerResponse: googleapi.ServerResponse{
25642			Header:         res.Header,
25643			HTTPStatusCode: res.StatusCode,
25644		},
25645	}
25646	target := &ret
25647	if err := gensupport.DecodeResponse(target, res); err != nil {
25648		return nil, err
25649	}
25650	return ret, nil
25651	// {
25652	//   "description": "Gets one country by ID.",
25653	//   "flatPath": "userprofiles/{profileId}/countries/{dartId}",
25654	//   "httpMethod": "GET",
25655	//   "id": "dfareporting.countries.get",
25656	//   "parameterOrder": [
25657	//     "profileId",
25658	//     "dartId"
25659	//   ],
25660	//   "parameters": {
25661	//     "dartId": {
25662	//       "description": "Country DART ID.",
25663	//       "format": "int64",
25664	//       "location": "path",
25665	//       "required": true,
25666	//       "type": "string"
25667	//     },
25668	//     "profileId": {
25669	//       "description": "User profile ID associated with this request.",
25670	//       "format": "int64",
25671	//       "location": "path",
25672	//       "required": true,
25673	//       "type": "string"
25674	//     }
25675	//   },
25676	//   "path": "userprofiles/{profileId}/countries/{dartId}",
25677	//   "response": {
25678	//     "$ref": "Country"
25679	//   },
25680	//   "scopes": [
25681	//     "https://www.googleapis.com/auth/dfatrafficking"
25682	//   ]
25683	// }
25684
25685}
25686
25687// method id "dfareporting.countries.list":
25688
25689type CountriesListCall struct {
25690	s            *Service
25691	profileId    int64
25692	urlParams_   gensupport.URLParams
25693	ifNoneMatch_ string
25694	ctx_         context.Context
25695	header_      http.Header
25696}
25697
25698// List: Retrieves a list of countries.
25699//
25700// - profileId: User profile ID associated with this request.
25701func (r *CountriesService) List(profileId int64) *CountriesListCall {
25702	c := &CountriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25703	c.profileId = profileId
25704	return c
25705}
25706
25707// Fields allows partial responses to be retrieved. See
25708// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25709// for more information.
25710func (c *CountriesListCall) Fields(s ...googleapi.Field) *CountriesListCall {
25711	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25712	return c
25713}
25714
25715// IfNoneMatch sets the optional parameter which makes the operation
25716// fail if the object's ETag matches the given value. This is useful for
25717// getting updates only after the object has changed since the last
25718// request. Use googleapi.IsNotModified to check whether the response
25719// error from Do is the result of In-None-Match.
25720func (c *CountriesListCall) IfNoneMatch(entityTag string) *CountriesListCall {
25721	c.ifNoneMatch_ = entityTag
25722	return c
25723}
25724
25725// Context sets the context to be used in this call's Do method. Any
25726// pending HTTP request will be aborted if the provided context is
25727// canceled.
25728func (c *CountriesListCall) Context(ctx context.Context) *CountriesListCall {
25729	c.ctx_ = ctx
25730	return c
25731}
25732
25733// Header returns an http.Header that can be modified by the caller to
25734// add HTTP headers to the request.
25735func (c *CountriesListCall) Header() http.Header {
25736	if c.header_ == nil {
25737		c.header_ = make(http.Header)
25738	}
25739	return c.header_
25740}
25741
25742func (c *CountriesListCall) doRequest(alt string) (*http.Response, error) {
25743	reqHeaders := make(http.Header)
25744	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
25745	for k, v := range c.header_ {
25746		reqHeaders[k] = v
25747	}
25748	reqHeaders.Set("User-Agent", c.s.userAgent())
25749	if c.ifNoneMatch_ != "" {
25750		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25751	}
25752	var body io.Reader = nil
25753	c.urlParams_.Set("alt", alt)
25754	c.urlParams_.Set("prettyPrint", "false")
25755	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries")
25756	urls += "?" + c.urlParams_.Encode()
25757	req, err := http.NewRequest("GET", urls, body)
25758	if err != nil {
25759		return nil, err
25760	}
25761	req.Header = reqHeaders
25762	googleapi.Expand(req.URL, map[string]string{
25763		"profileId": strconv.FormatInt(c.profileId, 10),
25764	})
25765	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25766}
25767
25768// Do executes the "dfareporting.countries.list" call.
25769// Exactly one of *CountriesListResponse or error will be non-nil. Any
25770// non-2xx status code is an error. Response headers are in either
25771// *CountriesListResponse.ServerResponse.Header or (if a response was
25772// returned at all) in error.(*googleapi.Error).Header. Use
25773// googleapi.IsNotModified to check whether the returned error was
25774// because http.StatusNotModified was returned.
25775func (c *CountriesListCall) Do(opts ...googleapi.CallOption) (*CountriesListResponse, error) {
25776	gensupport.SetOptions(c.urlParams_, opts...)
25777	res, err := c.doRequest("json")
25778	if res != nil && res.StatusCode == http.StatusNotModified {
25779		if res.Body != nil {
25780			res.Body.Close()
25781		}
25782		return nil, &googleapi.Error{
25783			Code:   res.StatusCode,
25784			Header: res.Header,
25785		}
25786	}
25787	if err != nil {
25788		return nil, err
25789	}
25790	defer googleapi.CloseBody(res)
25791	if err := googleapi.CheckResponse(res); err != nil {
25792		return nil, err
25793	}
25794	ret := &CountriesListResponse{
25795		ServerResponse: googleapi.ServerResponse{
25796			Header:         res.Header,
25797			HTTPStatusCode: res.StatusCode,
25798		},
25799	}
25800	target := &ret
25801	if err := gensupport.DecodeResponse(target, res); err != nil {
25802		return nil, err
25803	}
25804	return ret, nil
25805	// {
25806	//   "description": "Retrieves a list of countries.",
25807	//   "flatPath": "userprofiles/{profileId}/countries",
25808	//   "httpMethod": "GET",
25809	//   "id": "dfareporting.countries.list",
25810	//   "parameterOrder": [
25811	//     "profileId"
25812	//   ],
25813	//   "parameters": {
25814	//     "profileId": {
25815	//       "description": "User profile ID associated with this request.",
25816	//       "format": "int64",
25817	//       "location": "path",
25818	//       "required": true,
25819	//       "type": "string"
25820	//     }
25821	//   },
25822	//   "path": "userprofiles/{profileId}/countries",
25823	//   "response": {
25824	//     "$ref": "CountriesListResponse"
25825	//   },
25826	//   "scopes": [
25827	//     "https://www.googleapis.com/auth/dfatrafficking"
25828	//   ]
25829	// }
25830
25831}
25832
25833// method id "dfareporting.creativeAssets.insert":
25834
25835type CreativeAssetsInsertCall struct {
25836	s                     *Service
25837	profileId             int64
25838	advertiserId          int64
25839	creativeassetmetadata *CreativeAssetMetadata
25840	urlParams_            gensupport.URLParams
25841	mediaInfo_            *gensupport.MediaInfo
25842	ctx_                  context.Context
25843	header_               http.Header
25844}
25845
25846// Insert: Inserts a new creative asset.
25847//
25848// - advertiserId: Advertiser ID of this creative. This is a required
25849//   field.
25850// - profileId: User profile ID associated with this request.
25851func (r *CreativeAssetsService) Insert(profileId int64, advertiserId int64, creativeassetmetadata *CreativeAssetMetadata) *CreativeAssetsInsertCall {
25852	c := &CreativeAssetsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25853	c.profileId = profileId
25854	c.advertiserId = advertiserId
25855	c.creativeassetmetadata = creativeassetmetadata
25856	return c
25857}
25858
25859// Media specifies the media to upload in one or more chunks. The chunk
25860// size may be controlled by supplying a MediaOption generated by
25861// googleapi.ChunkSize. The chunk size defaults to
25862// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
25863// upload request will be determined by sniffing the contents of r,
25864// unless a MediaOption generated by googleapi.ContentType is
25865// supplied.
25866// At most one of Media and ResumableMedia may be set.
25867func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CreativeAssetsInsertCall {
25868	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
25869	return c
25870}
25871
25872// ResumableMedia specifies the media to upload in chunks and can be
25873// canceled with ctx.
25874//
25875// Deprecated: use Media instead.
25876//
25877// At most one of Media and ResumableMedia may be set. mediaType
25878// identifies the MIME media type of the upload, such as "image/png". If
25879// mediaType is "", it will be auto-detected. The provided ctx will
25880// supersede any context previously provided to the Context method.
25881func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall {
25882	c.ctx_ = ctx
25883	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
25884	return c
25885}
25886
25887// ProgressUpdater provides a callback function that will be called
25888// after every chunk. It should be a low-latency function in order to
25889// not slow down the upload operation. This should only be called when
25890// using ResumableMedia (as opposed to Media).
25891func (c *CreativeAssetsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CreativeAssetsInsertCall {
25892	c.mediaInfo_.SetProgressUpdater(pu)
25893	return c
25894}
25895
25896// Fields allows partial responses to be retrieved. See
25897// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25898// for more information.
25899func (c *CreativeAssetsInsertCall) Fields(s ...googleapi.Field) *CreativeAssetsInsertCall {
25900	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25901	return c
25902}
25903
25904// Context sets the context to be used in this call's Do method. Any
25905// pending HTTP request will be aborted if the provided context is
25906// canceled.
25907// This context will supersede any context previously provided to the
25908// ResumableMedia method.
25909func (c *CreativeAssetsInsertCall) Context(ctx context.Context) *CreativeAssetsInsertCall {
25910	c.ctx_ = ctx
25911	return c
25912}
25913
25914// Header returns an http.Header that can be modified by the caller to
25915// add HTTP headers to the request.
25916func (c *CreativeAssetsInsertCall) Header() http.Header {
25917	if c.header_ == nil {
25918		c.header_ = make(http.Header)
25919	}
25920	return c.header_
25921}
25922
25923func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) {
25924	reqHeaders := make(http.Header)
25925	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
25926	for k, v := range c.header_ {
25927		reqHeaders[k] = v
25928	}
25929	reqHeaders.Set("User-Agent", c.s.userAgent())
25930	var body io.Reader = nil
25931	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativeassetmetadata)
25932	if err != nil {
25933		return nil, err
25934	}
25935	reqHeaders.Set("Content-Type", "application/json")
25936	c.urlParams_.Set("alt", alt)
25937	c.urlParams_.Set("prettyPrint", "false")
25938	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
25939	if c.mediaInfo_ != nil {
25940		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/dfareporting/v3.4/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
25941		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
25942	}
25943	if body == nil {
25944		body = new(bytes.Buffer)
25945		reqHeaders.Set("Content-Type", "application/json")
25946	}
25947	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
25948	defer cleanup()
25949	urls += "?" + c.urlParams_.Encode()
25950	req, err := http.NewRequest("POST", urls, body)
25951	if err != nil {
25952		return nil, err
25953	}
25954	req.Header = reqHeaders
25955	req.GetBody = getBody
25956	googleapi.Expand(req.URL, map[string]string{
25957		"profileId":    strconv.FormatInt(c.profileId, 10),
25958		"advertiserId": strconv.FormatInt(c.advertiserId, 10),
25959	})
25960	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25961}
25962
25963// Do executes the "dfareporting.creativeAssets.insert" call.
25964// Exactly one of *CreativeAssetMetadata or error will be non-nil. Any
25965// non-2xx status code is an error. Response headers are in either
25966// *CreativeAssetMetadata.ServerResponse.Header or (if a response was
25967// returned at all) in error.(*googleapi.Error).Header. Use
25968// googleapi.IsNotModified to check whether the returned error was
25969// because http.StatusNotModified was returned.
25970func (c *CreativeAssetsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeAssetMetadata, error) {
25971	gensupport.SetOptions(c.urlParams_, opts...)
25972	res, err := c.doRequest("json")
25973	if res != nil && res.StatusCode == http.StatusNotModified {
25974		if res.Body != nil {
25975			res.Body.Close()
25976		}
25977		return nil, &googleapi.Error{
25978			Code:   res.StatusCode,
25979			Header: res.Header,
25980		}
25981	}
25982	if err != nil {
25983		return nil, err
25984	}
25985	defer googleapi.CloseBody(res)
25986	if err := googleapi.CheckResponse(res); err != nil {
25987		return nil, err
25988	}
25989	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
25990	if rx != nil {
25991		rx.Client = c.s.client
25992		rx.UserAgent = c.s.userAgent()
25993		ctx := c.ctx_
25994		if ctx == nil {
25995			ctx = context.TODO()
25996		}
25997		res, err = rx.Upload(ctx)
25998		if err != nil {
25999			return nil, err
26000		}
26001		defer res.Body.Close()
26002		if err := googleapi.CheckResponse(res); err != nil {
26003			return nil, err
26004		}
26005	}
26006	ret := &CreativeAssetMetadata{
26007		ServerResponse: googleapi.ServerResponse{
26008			Header:         res.Header,
26009			HTTPStatusCode: res.StatusCode,
26010		},
26011	}
26012	target := &ret
26013	if err := gensupport.DecodeResponse(target, res); err != nil {
26014		return nil, err
26015	}
26016	return ret, nil
26017	// {
26018	//   "description": "Inserts a new creative asset.",
26019	//   "flatPath": "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets",
26020	//   "httpMethod": "POST",
26021	//   "id": "dfareporting.creativeAssets.insert",
26022	//   "mediaUpload": {
26023	//     "accept": [
26024	//       "*/*"
26025	//     ],
26026	//     "maxSize": "1073741824",
26027	//     "protocols": {
26028	//       "simple": {
26029	//         "multipart": true,
26030	//         "path": "/upload/dfareporting/v3.4/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
26031	//       }
26032	//     }
26033	//   },
26034	//   "parameterOrder": [
26035	//     "profileId",
26036	//     "advertiserId"
26037	//   ],
26038	//   "parameters": {
26039	//     "advertiserId": {
26040	//       "description": "Advertiser ID of this creative. This is a required field.",
26041	//       "format": "int64",
26042	//       "location": "path",
26043	//       "required": true,
26044	//       "type": "string"
26045	//     },
26046	//     "profileId": {
26047	//       "description": "User profile ID associated with this request.",
26048	//       "format": "int64",
26049	//       "location": "path",
26050	//       "required": true,
26051	//       "type": "string"
26052	//     }
26053	//   },
26054	//   "path": "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets",
26055	//   "request": {
26056	//     "$ref": "CreativeAssetMetadata"
26057	//   },
26058	//   "response": {
26059	//     "$ref": "CreativeAssetMetadata"
26060	//   },
26061	//   "scopes": [
26062	//     "https://www.googleapis.com/auth/dfatrafficking"
26063	//   ],
26064	//   "supportsMediaUpload": true
26065	// }
26066
26067}
26068
26069// method id "dfareporting.creativeFieldValues.delete":
26070
26071type CreativeFieldValuesDeleteCall struct {
26072	s               *Service
26073	profileId       int64
26074	creativeFieldId int64
26075	id              int64
26076	urlParams_      gensupport.URLParams
26077	ctx_            context.Context
26078	header_         http.Header
26079}
26080
26081// Delete: Deletes an existing creative field value.
26082//
26083// - creativeFieldId: Creative field ID for this creative field value.
26084// - id: Creative Field Value ID.
26085// - profileId: User profile ID associated with this request.
26086func (r *CreativeFieldValuesService) Delete(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesDeleteCall {
26087	c := &CreativeFieldValuesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26088	c.profileId = profileId
26089	c.creativeFieldId = creativeFieldId
26090	c.id = id
26091	return c
26092}
26093
26094// Fields allows partial responses to be retrieved. See
26095// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26096// for more information.
26097func (c *CreativeFieldValuesDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldValuesDeleteCall {
26098	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26099	return c
26100}
26101
26102// Context sets the context to be used in this call's Do method. Any
26103// pending HTTP request will be aborted if the provided context is
26104// canceled.
26105func (c *CreativeFieldValuesDeleteCall) Context(ctx context.Context) *CreativeFieldValuesDeleteCall {
26106	c.ctx_ = ctx
26107	return c
26108}
26109
26110// Header returns an http.Header that can be modified by the caller to
26111// add HTTP headers to the request.
26112func (c *CreativeFieldValuesDeleteCall) Header() http.Header {
26113	if c.header_ == nil {
26114		c.header_ = make(http.Header)
26115	}
26116	return c.header_
26117}
26118
26119func (c *CreativeFieldValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
26120	reqHeaders := make(http.Header)
26121	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
26122	for k, v := range c.header_ {
26123		reqHeaders[k] = v
26124	}
26125	reqHeaders.Set("User-Agent", c.s.userAgent())
26126	var body io.Reader = nil
26127	c.urlParams_.Set("alt", alt)
26128	c.urlParams_.Set("prettyPrint", "false")
26129	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
26130	urls += "?" + c.urlParams_.Encode()
26131	req, err := http.NewRequest("DELETE", urls, body)
26132	if err != nil {
26133		return nil, err
26134	}
26135	req.Header = reqHeaders
26136	googleapi.Expand(req.URL, map[string]string{
26137		"profileId":       strconv.FormatInt(c.profileId, 10),
26138		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
26139		"id":              strconv.FormatInt(c.id, 10),
26140	})
26141	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26142}
26143
26144// Do executes the "dfareporting.creativeFieldValues.delete" call.
26145func (c *CreativeFieldValuesDeleteCall) Do(opts ...googleapi.CallOption) error {
26146	gensupport.SetOptions(c.urlParams_, opts...)
26147	res, err := c.doRequest("json")
26148	if err != nil {
26149		return err
26150	}
26151	defer googleapi.CloseBody(res)
26152	if err := googleapi.CheckResponse(res); err != nil {
26153		return err
26154	}
26155	return nil
26156	// {
26157	//   "description": "Deletes an existing creative field value.",
26158	//   "flatPath": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
26159	//   "httpMethod": "DELETE",
26160	//   "id": "dfareporting.creativeFieldValues.delete",
26161	//   "parameterOrder": [
26162	//     "profileId",
26163	//     "creativeFieldId",
26164	//     "id"
26165	//   ],
26166	//   "parameters": {
26167	//     "creativeFieldId": {
26168	//       "description": "Creative field ID for this creative field value.",
26169	//       "format": "int64",
26170	//       "location": "path",
26171	//       "required": true,
26172	//       "type": "string"
26173	//     },
26174	//     "id": {
26175	//       "description": "Creative Field Value ID",
26176	//       "format": "int64",
26177	//       "location": "path",
26178	//       "required": true,
26179	//       "type": "string"
26180	//     },
26181	//     "profileId": {
26182	//       "description": "User profile ID associated with this request.",
26183	//       "format": "int64",
26184	//       "location": "path",
26185	//       "required": true,
26186	//       "type": "string"
26187	//     }
26188	//   },
26189	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
26190	//   "scopes": [
26191	//     "https://www.googleapis.com/auth/dfatrafficking"
26192	//   ]
26193	// }
26194
26195}
26196
26197// method id "dfareporting.creativeFieldValues.get":
26198
26199type CreativeFieldValuesGetCall struct {
26200	s               *Service
26201	profileId       int64
26202	creativeFieldId int64
26203	id              int64
26204	urlParams_      gensupport.URLParams
26205	ifNoneMatch_    string
26206	ctx_            context.Context
26207	header_         http.Header
26208}
26209
26210// Get: Gets one creative field value by ID.
26211//
26212// - creativeFieldId: Creative field ID for this creative field value.
26213// - id: Creative Field Value ID.
26214// - profileId: User profile ID associated with this request.
26215func (r *CreativeFieldValuesService) Get(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesGetCall {
26216	c := &CreativeFieldValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26217	c.profileId = profileId
26218	c.creativeFieldId = creativeFieldId
26219	c.id = id
26220	return c
26221}
26222
26223// Fields allows partial responses to be retrieved. See
26224// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26225// for more information.
26226func (c *CreativeFieldValuesGetCall) Fields(s ...googleapi.Field) *CreativeFieldValuesGetCall {
26227	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26228	return c
26229}
26230
26231// IfNoneMatch sets the optional parameter which makes the operation
26232// fail if the object's ETag matches the given value. This is useful for
26233// getting updates only after the object has changed since the last
26234// request. Use googleapi.IsNotModified to check whether the response
26235// error from Do is the result of In-None-Match.
26236func (c *CreativeFieldValuesGetCall) IfNoneMatch(entityTag string) *CreativeFieldValuesGetCall {
26237	c.ifNoneMatch_ = entityTag
26238	return c
26239}
26240
26241// Context sets the context to be used in this call's Do method. Any
26242// pending HTTP request will be aborted if the provided context is
26243// canceled.
26244func (c *CreativeFieldValuesGetCall) Context(ctx context.Context) *CreativeFieldValuesGetCall {
26245	c.ctx_ = ctx
26246	return c
26247}
26248
26249// Header returns an http.Header that can be modified by the caller to
26250// add HTTP headers to the request.
26251func (c *CreativeFieldValuesGetCall) Header() http.Header {
26252	if c.header_ == nil {
26253		c.header_ = make(http.Header)
26254	}
26255	return c.header_
26256}
26257
26258func (c *CreativeFieldValuesGetCall) doRequest(alt string) (*http.Response, error) {
26259	reqHeaders := make(http.Header)
26260	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
26261	for k, v := range c.header_ {
26262		reqHeaders[k] = v
26263	}
26264	reqHeaders.Set("User-Agent", c.s.userAgent())
26265	if c.ifNoneMatch_ != "" {
26266		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26267	}
26268	var body io.Reader = nil
26269	c.urlParams_.Set("alt", alt)
26270	c.urlParams_.Set("prettyPrint", "false")
26271	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
26272	urls += "?" + c.urlParams_.Encode()
26273	req, err := http.NewRequest("GET", urls, body)
26274	if err != nil {
26275		return nil, err
26276	}
26277	req.Header = reqHeaders
26278	googleapi.Expand(req.URL, map[string]string{
26279		"profileId":       strconv.FormatInt(c.profileId, 10),
26280		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
26281		"id":              strconv.FormatInt(c.id, 10),
26282	})
26283	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26284}
26285
26286// Do executes the "dfareporting.creativeFieldValues.get" call.
26287// Exactly one of *CreativeFieldValue or error will be non-nil. Any
26288// non-2xx status code is an error. Response headers are in either
26289// *CreativeFieldValue.ServerResponse.Header or (if a response was
26290// returned at all) in error.(*googleapi.Error).Header. Use
26291// googleapi.IsNotModified to check whether the returned error was
26292// because http.StatusNotModified was returned.
26293func (c *CreativeFieldValuesGetCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
26294	gensupport.SetOptions(c.urlParams_, opts...)
26295	res, err := c.doRequest("json")
26296	if res != nil && res.StatusCode == http.StatusNotModified {
26297		if res.Body != nil {
26298			res.Body.Close()
26299		}
26300		return nil, &googleapi.Error{
26301			Code:   res.StatusCode,
26302			Header: res.Header,
26303		}
26304	}
26305	if err != nil {
26306		return nil, err
26307	}
26308	defer googleapi.CloseBody(res)
26309	if err := googleapi.CheckResponse(res); err != nil {
26310		return nil, err
26311	}
26312	ret := &CreativeFieldValue{
26313		ServerResponse: googleapi.ServerResponse{
26314			Header:         res.Header,
26315			HTTPStatusCode: res.StatusCode,
26316		},
26317	}
26318	target := &ret
26319	if err := gensupport.DecodeResponse(target, res); err != nil {
26320		return nil, err
26321	}
26322	return ret, nil
26323	// {
26324	//   "description": "Gets one creative field value by ID.",
26325	//   "flatPath": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
26326	//   "httpMethod": "GET",
26327	//   "id": "dfareporting.creativeFieldValues.get",
26328	//   "parameterOrder": [
26329	//     "profileId",
26330	//     "creativeFieldId",
26331	//     "id"
26332	//   ],
26333	//   "parameters": {
26334	//     "creativeFieldId": {
26335	//       "description": "Creative field ID for this creative field value.",
26336	//       "format": "int64",
26337	//       "location": "path",
26338	//       "required": true,
26339	//       "type": "string"
26340	//     },
26341	//     "id": {
26342	//       "description": "Creative Field Value ID",
26343	//       "format": "int64",
26344	//       "location": "path",
26345	//       "required": true,
26346	//       "type": "string"
26347	//     },
26348	//     "profileId": {
26349	//       "description": "User profile ID associated with this request.",
26350	//       "format": "int64",
26351	//       "location": "path",
26352	//       "required": true,
26353	//       "type": "string"
26354	//     }
26355	//   },
26356	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
26357	//   "response": {
26358	//     "$ref": "CreativeFieldValue"
26359	//   },
26360	//   "scopes": [
26361	//     "https://www.googleapis.com/auth/dfatrafficking"
26362	//   ]
26363	// }
26364
26365}
26366
26367// method id "dfareporting.creativeFieldValues.insert":
26368
26369type CreativeFieldValuesInsertCall struct {
26370	s                  *Service
26371	profileId          int64
26372	creativeFieldId    int64
26373	creativefieldvalue *CreativeFieldValue
26374	urlParams_         gensupport.URLParams
26375	ctx_               context.Context
26376	header_            http.Header
26377}
26378
26379// Insert: Inserts a new creative field value.
26380//
26381// - creativeFieldId: Creative field ID for this creative field value.
26382// - profileId: User profile ID associated with this request.
26383func (r *CreativeFieldValuesService) Insert(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesInsertCall {
26384	c := &CreativeFieldValuesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26385	c.profileId = profileId
26386	c.creativeFieldId = creativeFieldId
26387	c.creativefieldvalue = creativefieldvalue
26388	return c
26389}
26390
26391// Fields allows partial responses to be retrieved. See
26392// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26393// for more information.
26394func (c *CreativeFieldValuesInsertCall) Fields(s ...googleapi.Field) *CreativeFieldValuesInsertCall {
26395	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26396	return c
26397}
26398
26399// Context sets the context to be used in this call's Do method. Any
26400// pending HTTP request will be aborted if the provided context is
26401// canceled.
26402func (c *CreativeFieldValuesInsertCall) Context(ctx context.Context) *CreativeFieldValuesInsertCall {
26403	c.ctx_ = ctx
26404	return c
26405}
26406
26407// Header returns an http.Header that can be modified by the caller to
26408// add HTTP headers to the request.
26409func (c *CreativeFieldValuesInsertCall) Header() http.Header {
26410	if c.header_ == nil {
26411		c.header_ = make(http.Header)
26412	}
26413	return c.header_
26414}
26415
26416func (c *CreativeFieldValuesInsertCall) doRequest(alt string) (*http.Response, error) {
26417	reqHeaders := make(http.Header)
26418	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
26419	for k, v := range c.header_ {
26420		reqHeaders[k] = v
26421	}
26422	reqHeaders.Set("User-Agent", c.s.userAgent())
26423	var body io.Reader = nil
26424	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
26425	if err != nil {
26426		return nil, err
26427	}
26428	reqHeaders.Set("Content-Type", "application/json")
26429	c.urlParams_.Set("alt", alt)
26430	c.urlParams_.Set("prettyPrint", "false")
26431	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
26432	urls += "?" + c.urlParams_.Encode()
26433	req, err := http.NewRequest("POST", urls, body)
26434	if err != nil {
26435		return nil, err
26436	}
26437	req.Header = reqHeaders
26438	googleapi.Expand(req.URL, map[string]string{
26439		"profileId":       strconv.FormatInt(c.profileId, 10),
26440		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
26441	})
26442	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26443}
26444
26445// Do executes the "dfareporting.creativeFieldValues.insert" call.
26446// Exactly one of *CreativeFieldValue or error will be non-nil. Any
26447// non-2xx status code is an error. Response headers are in either
26448// *CreativeFieldValue.ServerResponse.Header or (if a response was
26449// returned at all) in error.(*googleapi.Error).Header. Use
26450// googleapi.IsNotModified to check whether the returned error was
26451// because http.StatusNotModified was returned.
26452func (c *CreativeFieldValuesInsertCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
26453	gensupport.SetOptions(c.urlParams_, opts...)
26454	res, err := c.doRequest("json")
26455	if res != nil && res.StatusCode == http.StatusNotModified {
26456		if res.Body != nil {
26457			res.Body.Close()
26458		}
26459		return nil, &googleapi.Error{
26460			Code:   res.StatusCode,
26461			Header: res.Header,
26462		}
26463	}
26464	if err != nil {
26465		return nil, err
26466	}
26467	defer googleapi.CloseBody(res)
26468	if err := googleapi.CheckResponse(res); err != nil {
26469		return nil, err
26470	}
26471	ret := &CreativeFieldValue{
26472		ServerResponse: googleapi.ServerResponse{
26473			Header:         res.Header,
26474			HTTPStatusCode: res.StatusCode,
26475		},
26476	}
26477	target := &ret
26478	if err := gensupport.DecodeResponse(target, res); err != nil {
26479		return nil, err
26480	}
26481	return ret, nil
26482	// {
26483	//   "description": "Inserts a new creative field value.",
26484	//   "flatPath": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
26485	//   "httpMethod": "POST",
26486	//   "id": "dfareporting.creativeFieldValues.insert",
26487	//   "parameterOrder": [
26488	//     "profileId",
26489	//     "creativeFieldId"
26490	//   ],
26491	//   "parameters": {
26492	//     "creativeFieldId": {
26493	//       "description": "Creative field ID for this creative field value.",
26494	//       "format": "int64",
26495	//       "location": "path",
26496	//       "required": true,
26497	//       "type": "string"
26498	//     },
26499	//     "profileId": {
26500	//       "description": "User profile ID associated with this request.",
26501	//       "format": "int64",
26502	//       "location": "path",
26503	//       "required": true,
26504	//       "type": "string"
26505	//     }
26506	//   },
26507	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
26508	//   "request": {
26509	//     "$ref": "CreativeFieldValue"
26510	//   },
26511	//   "response": {
26512	//     "$ref": "CreativeFieldValue"
26513	//   },
26514	//   "scopes": [
26515	//     "https://www.googleapis.com/auth/dfatrafficking"
26516	//   ]
26517	// }
26518
26519}
26520
26521// method id "dfareporting.creativeFieldValues.list":
26522
26523type CreativeFieldValuesListCall struct {
26524	s               *Service
26525	profileId       int64
26526	creativeFieldId int64
26527	urlParams_      gensupport.URLParams
26528	ifNoneMatch_    string
26529	ctx_            context.Context
26530	header_         http.Header
26531}
26532
26533// List: Retrieves a list of creative field values, possibly filtered.
26534// This method supports paging.
26535//
26536// - creativeFieldId: Creative field ID for this creative field value.
26537// - profileId: User profile ID associated with this request.
26538func (r *CreativeFieldValuesService) List(profileId int64, creativeFieldId int64) *CreativeFieldValuesListCall {
26539	c := &CreativeFieldValuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26540	c.profileId = profileId
26541	c.creativeFieldId = creativeFieldId
26542	return c
26543}
26544
26545// Ids sets the optional parameter "ids": Select only creative field
26546// values with these IDs.
26547func (c *CreativeFieldValuesListCall) Ids(ids ...int64) *CreativeFieldValuesListCall {
26548	var ids_ []string
26549	for _, v := range ids {
26550		ids_ = append(ids_, fmt.Sprint(v))
26551	}
26552	c.urlParams_.SetMulti("ids", ids_)
26553	return c
26554}
26555
26556// MaxResults sets the optional parameter "maxResults": Maximum number
26557// of results to return.
26558func (c *CreativeFieldValuesListCall) MaxResults(maxResults int64) *CreativeFieldValuesListCall {
26559	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
26560	return c
26561}
26562
26563// PageToken sets the optional parameter "pageToken": Value of the
26564// nextPageToken from the previous result page.
26565func (c *CreativeFieldValuesListCall) PageToken(pageToken string) *CreativeFieldValuesListCall {
26566	c.urlParams_.Set("pageToken", pageToken)
26567	return c
26568}
26569
26570// SearchString sets the optional parameter "searchString": Allows
26571// searching for creative field values by their values. Wildcards (e.g.
26572// *) are not allowed.
26573func (c *CreativeFieldValuesListCall) SearchString(searchString string) *CreativeFieldValuesListCall {
26574	c.urlParams_.Set("searchString", searchString)
26575	return c
26576}
26577
26578// SortField sets the optional parameter "sortField": Field by which to
26579// sort the list.
26580//
26581// Possible values:
26582//   "ID" (default)
26583//   "VALUE"
26584func (c *CreativeFieldValuesListCall) SortField(sortField string) *CreativeFieldValuesListCall {
26585	c.urlParams_.Set("sortField", sortField)
26586	return c
26587}
26588
26589// SortOrder sets the optional parameter "sortOrder": Order of sorted
26590// results.
26591//
26592// Possible values:
26593//   "ASCENDING" (default)
26594//   "DESCENDING"
26595func (c *CreativeFieldValuesListCall) SortOrder(sortOrder string) *CreativeFieldValuesListCall {
26596	c.urlParams_.Set("sortOrder", sortOrder)
26597	return c
26598}
26599
26600// Fields allows partial responses to be retrieved. See
26601// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26602// for more information.
26603func (c *CreativeFieldValuesListCall) Fields(s ...googleapi.Field) *CreativeFieldValuesListCall {
26604	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26605	return c
26606}
26607
26608// IfNoneMatch sets the optional parameter which makes the operation
26609// fail if the object's ETag matches the given value. This is useful for
26610// getting updates only after the object has changed since the last
26611// request. Use googleapi.IsNotModified to check whether the response
26612// error from Do is the result of In-None-Match.
26613func (c *CreativeFieldValuesListCall) IfNoneMatch(entityTag string) *CreativeFieldValuesListCall {
26614	c.ifNoneMatch_ = entityTag
26615	return c
26616}
26617
26618// Context sets the context to be used in this call's Do method. Any
26619// pending HTTP request will be aborted if the provided context is
26620// canceled.
26621func (c *CreativeFieldValuesListCall) Context(ctx context.Context) *CreativeFieldValuesListCall {
26622	c.ctx_ = ctx
26623	return c
26624}
26625
26626// Header returns an http.Header that can be modified by the caller to
26627// add HTTP headers to the request.
26628func (c *CreativeFieldValuesListCall) Header() http.Header {
26629	if c.header_ == nil {
26630		c.header_ = make(http.Header)
26631	}
26632	return c.header_
26633}
26634
26635func (c *CreativeFieldValuesListCall) doRequest(alt string) (*http.Response, error) {
26636	reqHeaders := make(http.Header)
26637	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
26638	for k, v := range c.header_ {
26639		reqHeaders[k] = v
26640	}
26641	reqHeaders.Set("User-Agent", c.s.userAgent())
26642	if c.ifNoneMatch_ != "" {
26643		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26644	}
26645	var body io.Reader = nil
26646	c.urlParams_.Set("alt", alt)
26647	c.urlParams_.Set("prettyPrint", "false")
26648	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
26649	urls += "?" + c.urlParams_.Encode()
26650	req, err := http.NewRequest("GET", urls, body)
26651	if err != nil {
26652		return nil, err
26653	}
26654	req.Header = reqHeaders
26655	googleapi.Expand(req.URL, map[string]string{
26656		"profileId":       strconv.FormatInt(c.profileId, 10),
26657		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
26658	})
26659	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26660}
26661
26662// Do executes the "dfareporting.creativeFieldValues.list" call.
26663// Exactly one of *CreativeFieldValuesListResponse or error will be
26664// non-nil. Any non-2xx status code is an error. Response headers are in
26665// either *CreativeFieldValuesListResponse.ServerResponse.Header or (if
26666// a response was returned at all) in error.(*googleapi.Error).Header.
26667// Use googleapi.IsNotModified to check whether the returned error was
26668// because http.StatusNotModified was returned.
26669func (c *CreativeFieldValuesListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValuesListResponse, error) {
26670	gensupport.SetOptions(c.urlParams_, opts...)
26671	res, err := c.doRequest("json")
26672	if res != nil && res.StatusCode == http.StatusNotModified {
26673		if res.Body != nil {
26674			res.Body.Close()
26675		}
26676		return nil, &googleapi.Error{
26677			Code:   res.StatusCode,
26678			Header: res.Header,
26679		}
26680	}
26681	if err != nil {
26682		return nil, err
26683	}
26684	defer googleapi.CloseBody(res)
26685	if err := googleapi.CheckResponse(res); err != nil {
26686		return nil, err
26687	}
26688	ret := &CreativeFieldValuesListResponse{
26689		ServerResponse: googleapi.ServerResponse{
26690			Header:         res.Header,
26691			HTTPStatusCode: res.StatusCode,
26692		},
26693	}
26694	target := &ret
26695	if err := gensupport.DecodeResponse(target, res); err != nil {
26696		return nil, err
26697	}
26698	return ret, nil
26699	// {
26700	//   "description": "Retrieves a list of creative field values, possibly filtered. This method supports paging.",
26701	//   "flatPath": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
26702	//   "httpMethod": "GET",
26703	//   "id": "dfareporting.creativeFieldValues.list",
26704	//   "parameterOrder": [
26705	//     "profileId",
26706	//     "creativeFieldId"
26707	//   ],
26708	//   "parameters": {
26709	//     "creativeFieldId": {
26710	//       "description": "Creative field ID for this creative field value.",
26711	//       "format": "int64",
26712	//       "location": "path",
26713	//       "required": true,
26714	//       "type": "string"
26715	//     },
26716	//     "ids": {
26717	//       "description": "Select only creative field values with these IDs.",
26718	//       "format": "int64",
26719	//       "location": "query",
26720	//       "repeated": true,
26721	//       "type": "string"
26722	//     },
26723	//     "maxResults": {
26724	//       "default": "1000",
26725	//       "description": "Maximum number of results to return.",
26726	//       "format": "int32",
26727	//       "location": "query",
26728	//       "maximum": "1000",
26729	//       "minimum": "0",
26730	//       "type": "integer"
26731	//     },
26732	//     "pageToken": {
26733	//       "description": "Value of the nextPageToken from the previous result page.",
26734	//       "location": "query",
26735	//       "type": "string"
26736	//     },
26737	//     "profileId": {
26738	//       "description": "User profile ID associated with this request.",
26739	//       "format": "int64",
26740	//       "location": "path",
26741	//       "required": true,
26742	//       "type": "string"
26743	//     },
26744	//     "searchString": {
26745	//       "description": "Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed.",
26746	//       "location": "query",
26747	//       "type": "string"
26748	//     },
26749	//     "sortField": {
26750	//       "default": "ID",
26751	//       "description": "Field by which to sort the list.",
26752	//       "enum": [
26753	//         "ID",
26754	//         "VALUE"
26755	//       ],
26756	//       "enumDescriptions": [
26757	//         "",
26758	//         ""
26759	//       ],
26760	//       "location": "query",
26761	//       "type": "string"
26762	//     },
26763	//     "sortOrder": {
26764	//       "default": "ASCENDING",
26765	//       "description": "Order of sorted results.",
26766	//       "enum": [
26767	//         "ASCENDING",
26768	//         "DESCENDING"
26769	//       ],
26770	//       "enumDescriptions": [
26771	//         "",
26772	//         ""
26773	//       ],
26774	//       "location": "query",
26775	//       "type": "string"
26776	//     }
26777	//   },
26778	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
26779	//   "response": {
26780	//     "$ref": "CreativeFieldValuesListResponse"
26781	//   },
26782	//   "scopes": [
26783	//     "https://www.googleapis.com/auth/dfatrafficking"
26784	//   ]
26785	// }
26786
26787}
26788
26789// Pages invokes f for each page of results.
26790// A non-nil error returned from f will halt the iteration.
26791// The provided context supersedes any context provided to the Context method.
26792func (c *CreativeFieldValuesListCall) Pages(ctx context.Context, f func(*CreativeFieldValuesListResponse) error) error {
26793	c.ctx_ = ctx
26794	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26795	for {
26796		x, err := c.Do()
26797		if err != nil {
26798			return err
26799		}
26800		if err := f(x); err != nil {
26801			return err
26802		}
26803		if x.NextPageToken == "" {
26804			return nil
26805		}
26806		c.PageToken(x.NextPageToken)
26807	}
26808}
26809
26810// method id "dfareporting.creativeFieldValues.patch":
26811
26812type CreativeFieldValuesPatchCall struct {
26813	s                  *Service
26814	profileId          int64
26815	creativeFieldId    int64
26816	creativefieldvalue *CreativeFieldValue
26817	urlParams_         gensupport.URLParams
26818	ctx_               context.Context
26819	header_            http.Header
26820}
26821
26822// Patch: Updates an existing creative field value. This method supports
26823// patch semantics.
26824//
26825// - creativeFieldId: CreativeField ID.
26826// - id: CreativeFieldValue ID.
26827// - profileId: User profile ID associated with this request.
26828func (r *CreativeFieldValuesService) Patch(profileId int64, creativeFieldId int64, id int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesPatchCall {
26829	c := &CreativeFieldValuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26830	c.profileId = profileId
26831	c.creativeFieldId = creativeFieldId
26832	c.urlParams_.Set("id", fmt.Sprint(id))
26833	c.creativefieldvalue = creativefieldvalue
26834	return c
26835}
26836
26837// Fields allows partial responses to be retrieved. See
26838// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26839// for more information.
26840func (c *CreativeFieldValuesPatchCall) Fields(s ...googleapi.Field) *CreativeFieldValuesPatchCall {
26841	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26842	return c
26843}
26844
26845// Context sets the context to be used in this call's Do method. Any
26846// pending HTTP request will be aborted if the provided context is
26847// canceled.
26848func (c *CreativeFieldValuesPatchCall) Context(ctx context.Context) *CreativeFieldValuesPatchCall {
26849	c.ctx_ = ctx
26850	return c
26851}
26852
26853// Header returns an http.Header that can be modified by the caller to
26854// add HTTP headers to the request.
26855func (c *CreativeFieldValuesPatchCall) Header() http.Header {
26856	if c.header_ == nil {
26857		c.header_ = make(http.Header)
26858	}
26859	return c.header_
26860}
26861
26862func (c *CreativeFieldValuesPatchCall) doRequest(alt string) (*http.Response, error) {
26863	reqHeaders := make(http.Header)
26864	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
26865	for k, v := range c.header_ {
26866		reqHeaders[k] = v
26867	}
26868	reqHeaders.Set("User-Agent", c.s.userAgent())
26869	var body io.Reader = nil
26870	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
26871	if err != nil {
26872		return nil, err
26873	}
26874	reqHeaders.Set("Content-Type", "application/json")
26875	c.urlParams_.Set("alt", alt)
26876	c.urlParams_.Set("prettyPrint", "false")
26877	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
26878	urls += "?" + c.urlParams_.Encode()
26879	req, err := http.NewRequest("PATCH", urls, body)
26880	if err != nil {
26881		return nil, err
26882	}
26883	req.Header = reqHeaders
26884	googleapi.Expand(req.URL, map[string]string{
26885		"profileId":       strconv.FormatInt(c.profileId, 10),
26886		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
26887	})
26888	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26889}
26890
26891// Do executes the "dfareporting.creativeFieldValues.patch" call.
26892// Exactly one of *CreativeFieldValue or error will be non-nil. Any
26893// non-2xx status code is an error. Response headers are in either
26894// *CreativeFieldValue.ServerResponse.Header or (if a response was
26895// returned at all) in error.(*googleapi.Error).Header. Use
26896// googleapi.IsNotModified to check whether the returned error was
26897// because http.StatusNotModified was returned.
26898func (c *CreativeFieldValuesPatchCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
26899	gensupport.SetOptions(c.urlParams_, opts...)
26900	res, err := c.doRequest("json")
26901	if res != nil && res.StatusCode == http.StatusNotModified {
26902		if res.Body != nil {
26903			res.Body.Close()
26904		}
26905		return nil, &googleapi.Error{
26906			Code:   res.StatusCode,
26907			Header: res.Header,
26908		}
26909	}
26910	if err != nil {
26911		return nil, err
26912	}
26913	defer googleapi.CloseBody(res)
26914	if err := googleapi.CheckResponse(res); err != nil {
26915		return nil, err
26916	}
26917	ret := &CreativeFieldValue{
26918		ServerResponse: googleapi.ServerResponse{
26919			Header:         res.Header,
26920			HTTPStatusCode: res.StatusCode,
26921		},
26922	}
26923	target := &ret
26924	if err := gensupport.DecodeResponse(target, res); err != nil {
26925		return nil, err
26926	}
26927	return ret, nil
26928	// {
26929	//   "description": "Updates an existing creative field value. This method supports patch semantics.",
26930	//   "flatPath": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
26931	//   "httpMethod": "PATCH",
26932	//   "id": "dfareporting.creativeFieldValues.patch",
26933	//   "parameterOrder": [
26934	//     "profileId",
26935	//     "creativeFieldId",
26936	//     "id"
26937	//   ],
26938	//   "parameters": {
26939	//     "creativeFieldId": {
26940	//       "description": "CreativeField ID.",
26941	//       "format": "int64",
26942	//       "location": "path",
26943	//       "required": true,
26944	//       "type": "string"
26945	//     },
26946	//     "id": {
26947	//       "description": "CreativeFieldValue ID.",
26948	//       "format": "int64",
26949	//       "location": "query",
26950	//       "required": true,
26951	//       "type": "string"
26952	//     },
26953	//     "profileId": {
26954	//       "description": "User profile ID associated with this request.",
26955	//       "format": "int64",
26956	//       "location": "path",
26957	//       "required": true,
26958	//       "type": "string"
26959	//     }
26960	//   },
26961	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
26962	//   "request": {
26963	//     "$ref": "CreativeFieldValue"
26964	//   },
26965	//   "response": {
26966	//     "$ref": "CreativeFieldValue"
26967	//   },
26968	//   "scopes": [
26969	//     "https://www.googleapis.com/auth/dfatrafficking"
26970	//   ]
26971	// }
26972
26973}
26974
26975// method id "dfareporting.creativeFieldValues.update":
26976
26977type CreativeFieldValuesUpdateCall struct {
26978	s                  *Service
26979	profileId          int64
26980	creativeFieldId    int64
26981	creativefieldvalue *CreativeFieldValue
26982	urlParams_         gensupport.URLParams
26983	ctx_               context.Context
26984	header_            http.Header
26985}
26986
26987// Update: Updates an existing creative field value.
26988//
26989// - creativeFieldId: Creative field ID for this creative field value.
26990// - profileId: User profile ID associated with this request.
26991func (r *CreativeFieldValuesService) Update(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesUpdateCall {
26992	c := &CreativeFieldValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26993	c.profileId = profileId
26994	c.creativeFieldId = creativeFieldId
26995	c.creativefieldvalue = creativefieldvalue
26996	return c
26997}
26998
26999// Fields allows partial responses to be retrieved. See
27000// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27001// for more information.
27002func (c *CreativeFieldValuesUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldValuesUpdateCall {
27003	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27004	return c
27005}
27006
27007// Context sets the context to be used in this call's Do method. Any
27008// pending HTTP request will be aborted if the provided context is
27009// canceled.
27010func (c *CreativeFieldValuesUpdateCall) Context(ctx context.Context) *CreativeFieldValuesUpdateCall {
27011	c.ctx_ = ctx
27012	return c
27013}
27014
27015// Header returns an http.Header that can be modified by the caller to
27016// add HTTP headers to the request.
27017func (c *CreativeFieldValuesUpdateCall) Header() http.Header {
27018	if c.header_ == nil {
27019		c.header_ = make(http.Header)
27020	}
27021	return c.header_
27022}
27023
27024func (c *CreativeFieldValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
27025	reqHeaders := make(http.Header)
27026	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
27027	for k, v := range c.header_ {
27028		reqHeaders[k] = v
27029	}
27030	reqHeaders.Set("User-Agent", c.s.userAgent())
27031	var body io.Reader = nil
27032	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
27033	if err != nil {
27034		return nil, err
27035	}
27036	reqHeaders.Set("Content-Type", "application/json")
27037	c.urlParams_.Set("alt", alt)
27038	c.urlParams_.Set("prettyPrint", "false")
27039	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
27040	urls += "?" + c.urlParams_.Encode()
27041	req, err := http.NewRequest("PUT", urls, body)
27042	if err != nil {
27043		return nil, err
27044	}
27045	req.Header = reqHeaders
27046	googleapi.Expand(req.URL, map[string]string{
27047		"profileId":       strconv.FormatInt(c.profileId, 10),
27048		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
27049	})
27050	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27051}
27052
27053// Do executes the "dfareporting.creativeFieldValues.update" call.
27054// Exactly one of *CreativeFieldValue or error will be non-nil. Any
27055// non-2xx status code is an error. Response headers are in either
27056// *CreativeFieldValue.ServerResponse.Header or (if a response was
27057// returned at all) in error.(*googleapi.Error).Header. Use
27058// googleapi.IsNotModified to check whether the returned error was
27059// because http.StatusNotModified was returned.
27060func (c *CreativeFieldValuesUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, 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, &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, err
27078	}
27079	ret := &CreativeFieldValue{
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	//   "description": "Updates an existing creative field value.",
27092	//   "flatPath": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
27093	//   "httpMethod": "PUT",
27094	//   "id": "dfareporting.creativeFieldValues.update",
27095	//   "parameterOrder": [
27096	//     "profileId",
27097	//     "creativeFieldId"
27098	//   ],
27099	//   "parameters": {
27100	//     "creativeFieldId": {
27101	//       "description": "Creative field ID for this creative field value.",
27102	//       "format": "int64",
27103	//       "location": "path",
27104	//       "required": true,
27105	//       "type": "string"
27106	//     },
27107	//     "profileId": {
27108	//       "description": "User profile ID associated with this request.",
27109	//       "format": "int64",
27110	//       "location": "path",
27111	//       "required": true,
27112	//       "type": "string"
27113	//     }
27114	//   },
27115	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
27116	//   "request": {
27117	//     "$ref": "CreativeFieldValue"
27118	//   },
27119	//   "response": {
27120	//     "$ref": "CreativeFieldValue"
27121	//   },
27122	//   "scopes": [
27123	//     "https://www.googleapis.com/auth/dfatrafficking"
27124	//   ]
27125	// }
27126
27127}
27128
27129// method id "dfareporting.creativeFields.delete":
27130
27131type CreativeFieldsDeleteCall struct {
27132	s          *Service
27133	profileId  int64
27134	id         int64
27135	urlParams_ gensupport.URLParams
27136	ctx_       context.Context
27137	header_    http.Header
27138}
27139
27140// Delete: Deletes an existing creative field.
27141//
27142// - id: Creative Field ID.
27143// - profileId: User profile ID associated with this request.
27144func (r *CreativeFieldsService) Delete(profileId int64, id int64) *CreativeFieldsDeleteCall {
27145	c := &CreativeFieldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27146	c.profileId = profileId
27147	c.id = id
27148	return c
27149}
27150
27151// Fields allows partial responses to be retrieved. See
27152// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27153// for more information.
27154func (c *CreativeFieldsDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldsDeleteCall {
27155	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27156	return c
27157}
27158
27159// Context sets the context to be used in this call's Do method. Any
27160// pending HTTP request will be aborted if the provided context is
27161// canceled.
27162func (c *CreativeFieldsDeleteCall) Context(ctx context.Context) *CreativeFieldsDeleteCall {
27163	c.ctx_ = ctx
27164	return c
27165}
27166
27167// Header returns an http.Header that can be modified by the caller to
27168// add HTTP headers to the request.
27169func (c *CreativeFieldsDeleteCall) Header() http.Header {
27170	if c.header_ == nil {
27171		c.header_ = make(http.Header)
27172	}
27173	return c.header_
27174}
27175
27176func (c *CreativeFieldsDeleteCall) doRequest(alt string) (*http.Response, error) {
27177	reqHeaders := make(http.Header)
27178	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
27179	for k, v := range c.header_ {
27180		reqHeaders[k] = v
27181	}
27182	reqHeaders.Set("User-Agent", c.s.userAgent())
27183	var body io.Reader = nil
27184	c.urlParams_.Set("alt", alt)
27185	c.urlParams_.Set("prettyPrint", "false")
27186	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
27187	urls += "?" + c.urlParams_.Encode()
27188	req, err := http.NewRequest("DELETE", urls, body)
27189	if err != nil {
27190		return nil, err
27191	}
27192	req.Header = reqHeaders
27193	googleapi.Expand(req.URL, map[string]string{
27194		"profileId": strconv.FormatInt(c.profileId, 10),
27195		"id":        strconv.FormatInt(c.id, 10),
27196	})
27197	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27198}
27199
27200// Do executes the "dfareporting.creativeFields.delete" call.
27201func (c *CreativeFieldsDeleteCall) Do(opts ...googleapi.CallOption) error {
27202	gensupport.SetOptions(c.urlParams_, opts...)
27203	res, err := c.doRequest("json")
27204	if err != nil {
27205		return err
27206	}
27207	defer googleapi.CloseBody(res)
27208	if err := googleapi.CheckResponse(res); err != nil {
27209		return err
27210	}
27211	return nil
27212	// {
27213	//   "description": "Deletes an existing creative field.",
27214	//   "flatPath": "userprofiles/{profileId}/creativeFields/{id}",
27215	//   "httpMethod": "DELETE",
27216	//   "id": "dfareporting.creativeFields.delete",
27217	//   "parameterOrder": [
27218	//     "profileId",
27219	//     "id"
27220	//   ],
27221	//   "parameters": {
27222	//     "id": {
27223	//       "description": "Creative Field ID",
27224	//       "format": "int64",
27225	//       "location": "path",
27226	//       "required": true,
27227	//       "type": "string"
27228	//     },
27229	//     "profileId": {
27230	//       "description": "User profile ID associated with this request.",
27231	//       "format": "int64",
27232	//       "location": "path",
27233	//       "required": true,
27234	//       "type": "string"
27235	//     }
27236	//   },
27237	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
27238	//   "scopes": [
27239	//     "https://www.googleapis.com/auth/dfatrafficking"
27240	//   ]
27241	// }
27242
27243}
27244
27245// method id "dfareporting.creativeFields.get":
27246
27247type CreativeFieldsGetCall struct {
27248	s            *Service
27249	profileId    int64
27250	id           int64
27251	urlParams_   gensupport.URLParams
27252	ifNoneMatch_ string
27253	ctx_         context.Context
27254	header_      http.Header
27255}
27256
27257// Get: Gets one creative field by ID.
27258//
27259// - id: Creative Field ID.
27260// - profileId: User profile ID associated with this request.
27261func (r *CreativeFieldsService) Get(profileId int64, id int64) *CreativeFieldsGetCall {
27262	c := &CreativeFieldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27263	c.profileId = profileId
27264	c.id = id
27265	return c
27266}
27267
27268// Fields allows partial responses to be retrieved. See
27269// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27270// for more information.
27271func (c *CreativeFieldsGetCall) Fields(s ...googleapi.Field) *CreativeFieldsGetCall {
27272	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27273	return c
27274}
27275
27276// IfNoneMatch sets the optional parameter which makes the operation
27277// fail if the object's ETag matches the given value. This is useful for
27278// getting updates only after the object has changed since the last
27279// request. Use googleapi.IsNotModified to check whether the response
27280// error from Do is the result of In-None-Match.
27281func (c *CreativeFieldsGetCall) IfNoneMatch(entityTag string) *CreativeFieldsGetCall {
27282	c.ifNoneMatch_ = entityTag
27283	return c
27284}
27285
27286// Context sets the context to be used in this call's Do method. Any
27287// pending HTTP request will be aborted if the provided context is
27288// canceled.
27289func (c *CreativeFieldsGetCall) Context(ctx context.Context) *CreativeFieldsGetCall {
27290	c.ctx_ = ctx
27291	return c
27292}
27293
27294// Header returns an http.Header that can be modified by the caller to
27295// add HTTP headers to the request.
27296func (c *CreativeFieldsGetCall) Header() http.Header {
27297	if c.header_ == nil {
27298		c.header_ = make(http.Header)
27299	}
27300	return c.header_
27301}
27302
27303func (c *CreativeFieldsGetCall) doRequest(alt string) (*http.Response, error) {
27304	reqHeaders := make(http.Header)
27305	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
27306	for k, v := range c.header_ {
27307		reqHeaders[k] = v
27308	}
27309	reqHeaders.Set("User-Agent", c.s.userAgent())
27310	if c.ifNoneMatch_ != "" {
27311		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27312	}
27313	var body io.Reader = nil
27314	c.urlParams_.Set("alt", alt)
27315	c.urlParams_.Set("prettyPrint", "false")
27316	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
27317	urls += "?" + c.urlParams_.Encode()
27318	req, err := http.NewRequest("GET", urls, body)
27319	if err != nil {
27320		return nil, err
27321	}
27322	req.Header = reqHeaders
27323	googleapi.Expand(req.URL, map[string]string{
27324		"profileId": strconv.FormatInt(c.profileId, 10),
27325		"id":        strconv.FormatInt(c.id, 10),
27326	})
27327	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27328}
27329
27330// Do executes the "dfareporting.creativeFields.get" call.
27331// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
27332// status code is an error. Response headers are in either
27333// *CreativeField.ServerResponse.Header or (if a response was returned
27334// at all) in error.(*googleapi.Error).Header. Use
27335// googleapi.IsNotModified to check whether the returned error was
27336// because http.StatusNotModified was returned.
27337func (c *CreativeFieldsGetCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
27338	gensupport.SetOptions(c.urlParams_, opts...)
27339	res, err := c.doRequest("json")
27340	if res != nil && res.StatusCode == http.StatusNotModified {
27341		if res.Body != nil {
27342			res.Body.Close()
27343		}
27344		return nil, &googleapi.Error{
27345			Code:   res.StatusCode,
27346			Header: res.Header,
27347		}
27348	}
27349	if err != nil {
27350		return nil, err
27351	}
27352	defer googleapi.CloseBody(res)
27353	if err := googleapi.CheckResponse(res); err != nil {
27354		return nil, err
27355	}
27356	ret := &CreativeField{
27357		ServerResponse: googleapi.ServerResponse{
27358			Header:         res.Header,
27359			HTTPStatusCode: res.StatusCode,
27360		},
27361	}
27362	target := &ret
27363	if err := gensupport.DecodeResponse(target, res); err != nil {
27364		return nil, err
27365	}
27366	return ret, nil
27367	// {
27368	//   "description": "Gets one creative field by ID.",
27369	//   "flatPath": "userprofiles/{profileId}/creativeFields/{id}",
27370	//   "httpMethod": "GET",
27371	//   "id": "dfareporting.creativeFields.get",
27372	//   "parameterOrder": [
27373	//     "profileId",
27374	//     "id"
27375	//   ],
27376	//   "parameters": {
27377	//     "id": {
27378	//       "description": "Creative Field ID",
27379	//       "format": "int64",
27380	//       "location": "path",
27381	//       "required": true,
27382	//       "type": "string"
27383	//     },
27384	//     "profileId": {
27385	//       "description": "User profile ID associated with this request.",
27386	//       "format": "int64",
27387	//       "location": "path",
27388	//       "required": true,
27389	//       "type": "string"
27390	//     }
27391	//   },
27392	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
27393	//   "response": {
27394	//     "$ref": "CreativeField"
27395	//   },
27396	//   "scopes": [
27397	//     "https://www.googleapis.com/auth/dfatrafficking"
27398	//   ]
27399	// }
27400
27401}
27402
27403// method id "dfareporting.creativeFields.insert":
27404
27405type CreativeFieldsInsertCall struct {
27406	s             *Service
27407	profileId     int64
27408	creativefield *CreativeField
27409	urlParams_    gensupport.URLParams
27410	ctx_          context.Context
27411	header_       http.Header
27412}
27413
27414// Insert: Inserts a new creative field.
27415//
27416// - profileId: User profile ID associated with this request.
27417func (r *CreativeFieldsService) Insert(profileId int64, creativefield *CreativeField) *CreativeFieldsInsertCall {
27418	c := &CreativeFieldsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27419	c.profileId = profileId
27420	c.creativefield = creativefield
27421	return c
27422}
27423
27424// Fields allows partial responses to be retrieved. See
27425// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27426// for more information.
27427func (c *CreativeFieldsInsertCall) Fields(s ...googleapi.Field) *CreativeFieldsInsertCall {
27428	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27429	return c
27430}
27431
27432// Context sets the context to be used in this call's Do method. Any
27433// pending HTTP request will be aborted if the provided context is
27434// canceled.
27435func (c *CreativeFieldsInsertCall) Context(ctx context.Context) *CreativeFieldsInsertCall {
27436	c.ctx_ = ctx
27437	return c
27438}
27439
27440// Header returns an http.Header that can be modified by the caller to
27441// add HTTP headers to the request.
27442func (c *CreativeFieldsInsertCall) Header() http.Header {
27443	if c.header_ == nil {
27444		c.header_ = make(http.Header)
27445	}
27446	return c.header_
27447}
27448
27449func (c *CreativeFieldsInsertCall) doRequest(alt string) (*http.Response, error) {
27450	reqHeaders := make(http.Header)
27451	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
27452	for k, v := range c.header_ {
27453		reqHeaders[k] = v
27454	}
27455	reqHeaders.Set("User-Agent", c.s.userAgent())
27456	var body io.Reader = nil
27457	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
27458	if err != nil {
27459		return nil, err
27460	}
27461	reqHeaders.Set("Content-Type", "application/json")
27462	c.urlParams_.Set("alt", alt)
27463	c.urlParams_.Set("prettyPrint", "false")
27464	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
27465	urls += "?" + c.urlParams_.Encode()
27466	req, err := http.NewRequest("POST", urls, body)
27467	if err != nil {
27468		return nil, err
27469	}
27470	req.Header = reqHeaders
27471	googleapi.Expand(req.URL, map[string]string{
27472		"profileId": strconv.FormatInt(c.profileId, 10),
27473	})
27474	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27475}
27476
27477// Do executes the "dfareporting.creativeFields.insert" call.
27478// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
27479// status code is an error. Response headers are in either
27480// *CreativeField.ServerResponse.Header or (if a response was returned
27481// at all) in error.(*googleapi.Error).Header. Use
27482// googleapi.IsNotModified to check whether the returned error was
27483// because http.StatusNotModified was returned.
27484func (c *CreativeFieldsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
27485	gensupport.SetOptions(c.urlParams_, opts...)
27486	res, err := c.doRequest("json")
27487	if res != nil && res.StatusCode == http.StatusNotModified {
27488		if res.Body != nil {
27489			res.Body.Close()
27490		}
27491		return nil, &googleapi.Error{
27492			Code:   res.StatusCode,
27493			Header: res.Header,
27494		}
27495	}
27496	if err != nil {
27497		return nil, err
27498	}
27499	defer googleapi.CloseBody(res)
27500	if err := googleapi.CheckResponse(res); err != nil {
27501		return nil, err
27502	}
27503	ret := &CreativeField{
27504		ServerResponse: googleapi.ServerResponse{
27505			Header:         res.Header,
27506			HTTPStatusCode: res.StatusCode,
27507		},
27508	}
27509	target := &ret
27510	if err := gensupport.DecodeResponse(target, res); err != nil {
27511		return nil, err
27512	}
27513	return ret, nil
27514	// {
27515	//   "description": "Inserts a new creative field.",
27516	//   "flatPath": "userprofiles/{profileId}/creativeFields",
27517	//   "httpMethod": "POST",
27518	//   "id": "dfareporting.creativeFields.insert",
27519	//   "parameterOrder": [
27520	//     "profileId"
27521	//   ],
27522	//   "parameters": {
27523	//     "profileId": {
27524	//       "description": "User profile ID associated with this request.",
27525	//       "format": "int64",
27526	//       "location": "path",
27527	//       "required": true,
27528	//       "type": "string"
27529	//     }
27530	//   },
27531	//   "path": "userprofiles/{profileId}/creativeFields",
27532	//   "request": {
27533	//     "$ref": "CreativeField"
27534	//   },
27535	//   "response": {
27536	//     "$ref": "CreativeField"
27537	//   },
27538	//   "scopes": [
27539	//     "https://www.googleapis.com/auth/dfatrafficking"
27540	//   ]
27541	// }
27542
27543}
27544
27545// method id "dfareporting.creativeFields.list":
27546
27547type CreativeFieldsListCall struct {
27548	s            *Service
27549	profileId    int64
27550	urlParams_   gensupport.URLParams
27551	ifNoneMatch_ string
27552	ctx_         context.Context
27553	header_      http.Header
27554}
27555
27556// List: Retrieves a list of creative fields, possibly filtered. This
27557// method supports paging.
27558//
27559// - profileId: User profile ID associated with this request.
27560func (r *CreativeFieldsService) List(profileId int64) *CreativeFieldsListCall {
27561	c := &CreativeFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27562	c.profileId = profileId
27563	return c
27564}
27565
27566// AdvertiserIds sets the optional parameter "advertiserIds": Select
27567// only creative fields that belong to these advertisers.
27568func (c *CreativeFieldsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeFieldsListCall {
27569	var advertiserIds_ []string
27570	for _, v := range advertiserIds {
27571		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
27572	}
27573	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
27574	return c
27575}
27576
27577// Ids sets the optional parameter "ids": Select only creative fields
27578// with these IDs.
27579func (c *CreativeFieldsListCall) Ids(ids ...int64) *CreativeFieldsListCall {
27580	var ids_ []string
27581	for _, v := range ids {
27582		ids_ = append(ids_, fmt.Sprint(v))
27583	}
27584	c.urlParams_.SetMulti("ids", ids_)
27585	return c
27586}
27587
27588// MaxResults sets the optional parameter "maxResults": Maximum number
27589// of results to return.
27590func (c *CreativeFieldsListCall) MaxResults(maxResults int64) *CreativeFieldsListCall {
27591	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27592	return c
27593}
27594
27595// PageToken sets the optional parameter "pageToken": Value of the
27596// nextPageToken from the previous result page.
27597func (c *CreativeFieldsListCall) PageToken(pageToken string) *CreativeFieldsListCall {
27598	c.urlParams_.Set("pageToken", pageToken)
27599	return c
27600}
27601
27602// SearchString sets the optional parameter "searchString": Allows
27603// searching for creative fields by name or ID. Wildcards (*) are
27604// allowed. For example, "creativefield*2015" will return creative
27605// fields with names like "creativefield June 2015", "creativefield
27606// April 2015", or simply "creativefield 2015". Most of the searches
27607// also add wild-cards implicitly at the start and the end of the search
27608// string. For example, a search string of "creativefield" will match
27609// creative fields with the name "my creativefield", "creativefield
27610// 2015", or simply "creativefield".
27611func (c *CreativeFieldsListCall) SearchString(searchString string) *CreativeFieldsListCall {
27612	c.urlParams_.Set("searchString", searchString)
27613	return c
27614}
27615
27616// SortField sets the optional parameter "sortField": Field by which to
27617// sort the list.
27618//
27619// Possible values:
27620//   "ID" (default)
27621//   "NAME"
27622func (c *CreativeFieldsListCall) SortField(sortField string) *CreativeFieldsListCall {
27623	c.urlParams_.Set("sortField", sortField)
27624	return c
27625}
27626
27627// SortOrder sets the optional parameter "sortOrder": Order of sorted
27628// results.
27629//
27630// Possible values:
27631//   "ASCENDING" (default)
27632//   "DESCENDING"
27633func (c *CreativeFieldsListCall) SortOrder(sortOrder string) *CreativeFieldsListCall {
27634	c.urlParams_.Set("sortOrder", sortOrder)
27635	return c
27636}
27637
27638// Fields allows partial responses to be retrieved. See
27639// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27640// for more information.
27641func (c *CreativeFieldsListCall) Fields(s ...googleapi.Field) *CreativeFieldsListCall {
27642	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27643	return c
27644}
27645
27646// IfNoneMatch sets the optional parameter which makes the operation
27647// fail if the object's ETag matches the given value. This is useful for
27648// getting updates only after the object has changed since the last
27649// request. Use googleapi.IsNotModified to check whether the response
27650// error from Do is the result of In-None-Match.
27651func (c *CreativeFieldsListCall) IfNoneMatch(entityTag string) *CreativeFieldsListCall {
27652	c.ifNoneMatch_ = entityTag
27653	return c
27654}
27655
27656// Context sets the context to be used in this call's Do method. Any
27657// pending HTTP request will be aborted if the provided context is
27658// canceled.
27659func (c *CreativeFieldsListCall) Context(ctx context.Context) *CreativeFieldsListCall {
27660	c.ctx_ = ctx
27661	return c
27662}
27663
27664// Header returns an http.Header that can be modified by the caller to
27665// add HTTP headers to the request.
27666func (c *CreativeFieldsListCall) Header() http.Header {
27667	if c.header_ == nil {
27668		c.header_ = make(http.Header)
27669	}
27670	return c.header_
27671}
27672
27673func (c *CreativeFieldsListCall) doRequest(alt string) (*http.Response, error) {
27674	reqHeaders := make(http.Header)
27675	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
27676	for k, v := range c.header_ {
27677		reqHeaders[k] = v
27678	}
27679	reqHeaders.Set("User-Agent", c.s.userAgent())
27680	if c.ifNoneMatch_ != "" {
27681		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27682	}
27683	var body io.Reader = nil
27684	c.urlParams_.Set("alt", alt)
27685	c.urlParams_.Set("prettyPrint", "false")
27686	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
27687	urls += "?" + c.urlParams_.Encode()
27688	req, err := http.NewRequest("GET", urls, body)
27689	if err != nil {
27690		return nil, err
27691	}
27692	req.Header = reqHeaders
27693	googleapi.Expand(req.URL, map[string]string{
27694		"profileId": strconv.FormatInt(c.profileId, 10),
27695	})
27696	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27697}
27698
27699// Do executes the "dfareporting.creativeFields.list" call.
27700// Exactly one of *CreativeFieldsListResponse or error will be non-nil.
27701// Any non-2xx status code is an error. Response headers are in either
27702// *CreativeFieldsListResponse.ServerResponse.Header or (if a response
27703// was returned at all) in error.(*googleapi.Error).Header. Use
27704// googleapi.IsNotModified to check whether the returned error was
27705// because http.StatusNotModified was returned.
27706func (c *CreativeFieldsListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldsListResponse, error) {
27707	gensupport.SetOptions(c.urlParams_, opts...)
27708	res, err := c.doRequest("json")
27709	if res != nil && res.StatusCode == http.StatusNotModified {
27710		if res.Body != nil {
27711			res.Body.Close()
27712		}
27713		return nil, &googleapi.Error{
27714			Code:   res.StatusCode,
27715			Header: res.Header,
27716		}
27717	}
27718	if err != nil {
27719		return nil, err
27720	}
27721	defer googleapi.CloseBody(res)
27722	if err := googleapi.CheckResponse(res); err != nil {
27723		return nil, err
27724	}
27725	ret := &CreativeFieldsListResponse{
27726		ServerResponse: googleapi.ServerResponse{
27727			Header:         res.Header,
27728			HTTPStatusCode: res.StatusCode,
27729		},
27730	}
27731	target := &ret
27732	if err := gensupport.DecodeResponse(target, res); err != nil {
27733		return nil, err
27734	}
27735	return ret, nil
27736	// {
27737	//   "description": "Retrieves a list of creative fields, possibly filtered. This method supports paging.",
27738	//   "flatPath": "userprofiles/{profileId}/creativeFields",
27739	//   "httpMethod": "GET",
27740	//   "id": "dfareporting.creativeFields.list",
27741	//   "parameterOrder": [
27742	//     "profileId"
27743	//   ],
27744	//   "parameters": {
27745	//     "advertiserIds": {
27746	//       "description": "Select only creative fields that belong to these advertisers.",
27747	//       "format": "int64",
27748	//       "location": "query",
27749	//       "repeated": true,
27750	//       "type": "string"
27751	//     },
27752	//     "ids": {
27753	//       "description": "Select only creative fields with these IDs.",
27754	//       "format": "int64",
27755	//       "location": "query",
27756	//       "repeated": true,
27757	//       "type": "string"
27758	//     },
27759	//     "maxResults": {
27760	//       "default": "1000",
27761	//       "description": "Maximum number of results to return.",
27762	//       "format": "int32",
27763	//       "location": "query",
27764	//       "maximum": "1000",
27765	//       "minimum": "0",
27766	//       "type": "integer"
27767	//     },
27768	//     "pageToken": {
27769	//       "description": "Value of the nextPageToken from the previous result page.",
27770	//       "location": "query",
27771	//       "type": "string"
27772	//     },
27773	//     "profileId": {
27774	//       "description": "User profile ID associated with this request.",
27775	//       "format": "int64",
27776	//       "location": "path",
27777	//       "required": true,
27778	//       "type": "string"
27779	//     },
27780	//     "searchString": {
27781	//       "description": "Allows searching for creative fields by name or ID. Wildcards (*) are allowed. For example, \"creativefield*2015\" will return creative fields with names like \"creativefield June 2015\", \"creativefield April 2015\", or simply \"creativefield 2015\". Most of the searches also add wild-cards implicitly at the start and the end of the search string. For example, a search string of \"creativefield\" will match creative fields with the name \"my creativefield\", \"creativefield 2015\", or simply \"creativefield\".",
27782	//       "location": "query",
27783	//       "type": "string"
27784	//     },
27785	//     "sortField": {
27786	//       "default": "ID",
27787	//       "description": "Field by which to sort the list.",
27788	//       "enum": [
27789	//         "ID",
27790	//         "NAME"
27791	//       ],
27792	//       "enumDescriptions": [
27793	//         "",
27794	//         ""
27795	//       ],
27796	//       "location": "query",
27797	//       "type": "string"
27798	//     },
27799	//     "sortOrder": {
27800	//       "default": "ASCENDING",
27801	//       "description": "Order of sorted results.",
27802	//       "enum": [
27803	//         "ASCENDING",
27804	//         "DESCENDING"
27805	//       ],
27806	//       "enumDescriptions": [
27807	//         "",
27808	//         ""
27809	//       ],
27810	//       "location": "query",
27811	//       "type": "string"
27812	//     }
27813	//   },
27814	//   "path": "userprofiles/{profileId}/creativeFields",
27815	//   "response": {
27816	//     "$ref": "CreativeFieldsListResponse"
27817	//   },
27818	//   "scopes": [
27819	//     "https://www.googleapis.com/auth/dfatrafficking"
27820	//   ]
27821	// }
27822
27823}
27824
27825// Pages invokes f for each page of results.
27826// A non-nil error returned from f will halt the iteration.
27827// The provided context supersedes any context provided to the Context method.
27828func (c *CreativeFieldsListCall) Pages(ctx context.Context, f func(*CreativeFieldsListResponse) error) error {
27829	c.ctx_ = ctx
27830	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27831	for {
27832		x, err := c.Do()
27833		if err != nil {
27834			return err
27835		}
27836		if err := f(x); err != nil {
27837			return err
27838		}
27839		if x.NextPageToken == "" {
27840			return nil
27841		}
27842		c.PageToken(x.NextPageToken)
27843	}
27844}
27845
27846// method id "dfareporting.creativeFields.patch":
27847
27848type CreativeFieldsPatchCall struct {
27849	s             *Service
27850	profileId     int64
27851	creativefield *CreativeField
27852	urlParams_    gensupport.URLParams
27853	ctx_          context.Context
27854	header_       http.Header
27855}
27856
27857// Patch: Updates an existing creative field. This method supports patch
27858// semantics.
27859//
27860// - id: CreativeField ID.
27861// - profileId: User profile ID associated with this request.
27862func (r *CreativeFieldsService) Patch(profileId int64, id int64, creativefield *CreativeField) *CreativeFieldsPatchCall {
27863	c := &CreativeFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27864	c.profileId = profileId
27865	c.urlParams_.Set("id", fmt.Sprint(id))
27866	c.creativefield = creativefield
27867	return c
27868}
27869
27870// Fields allows partial responses to be retrieved. See
27871// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27872// for more information.
27873func (c *CreativeFieldsPatchCall) Fields(s ...googleapi.Field) *CreativeFieldsPatchCall {
27874	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27875	return c
27876}
27877
27878// Context sets the context to be used in this call's Do method. Any
27879// pending HTTP request will be aborted if the provided context is
27880// canceled.
27881func (c *CreativeFieldsPatchCall) Context(ctx context.Context) *CreativeFieldsPatchCall {
27882	c.ctx_ = ctx
27883	return c
27884}
27885
27886// Header returns an http.Header that can be modified by the caller to
27887// add HTTP headers to the request.
27888func (c *CreativeFieldsPatchCall) Header() http.Header {
27889	if c.header_ == nil {
27890		c.header_ = make(http.Header)
27891	}
27892	return c.header_
27893}
27894
27895func (c *CreativeFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
27896	reqHeaders := make(http.Header)
27897	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
27898	for k, v := range c.header_ {
27899		reqHeaders[k] = v
27900	}
27901	reqHeaders.Set("User-Agent", c.s.userAgent())
27902	var body io.Reader = nil
27903	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
27904	if err != nil {
27905		return nil, err
27906	}
27907	reqHeaders.Set("Content-Type", "application/json")
27908	c.urlParams_.Set("alt", alt)
27909	c.urlParams_.Set("prettyPrint", "false")
27910	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
27911	urls += "?" + c.urlParams_.Encode()
27912	req, err := http.NewRequest("PATCH", urls, body)
27913	if err != nil {
27914		return nil, err
27915	}
27916	req.Header = reqHeaders
27917	googleapi.Expand(req.URL, map[string]string{
27918		"profileId": strconv.FormatInt(c.profileId, 10),
27919	})
27920	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27921}
27922
27923// Do executes the "dfareporting.creativeFields.patch" call.
27924// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
27925// status code is an error. Response headers are in either
27926// *CreativeField.ServerResponse.Header or (if a response was returned
27927// at all) in error.(*googleapi.Error).Header. Use
27928// googleapi.IsNotModified to check whether the returned error was
27929// because http.StatusNotModified was returned.
27930func (c *CreativeFieldsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
27931	gensupport.SetOptions(c.urlParams_, opts...)
27932	res, err := c.doRequest("json")
27933	if res != nil && res.StatusCode == http.StatusNotModified {
27934		if res.Body != nil {
27935			res.Body.Close()
27936		}
27937		return nil, &googleapi.Error{
27938			Code:   res.StatusCode,
27939			Header: res.Header,
27940		}
27941	}
27942	if err != nil {
27943		return nil, err
27944	}
27945	defer googleapi.CloseBody(res)
27946	if err := googleapi.CheckResponse(res); err != nil {
27947		return nil, err
27948	}
27949	ret := &CreativeField{
27950		ServerResponse: googleapi.ServerResponse{
27951			Header:         res.Header,
27952			HTTPStatusCode: res.StatusCode,
27953		},
27954	}
27955	target := &ret
27956	if err := gensupport.DecodeResponse(target, res); err != nil {
27957		return nil, err
27958	}
27959	return ret, nil
27960	// {
27961	//   "description": "Updates an existing creative field. This method supports patch semantics.",
27962	//   "flatPath": "userprofiles/{profileId}/creativeFields",
27963	//   "httpMethod": "PATCH",
27964	//   "id": "dfareporting.creativeFields.patch",
27965	//   "parameterOrder": [
27966	//     "profileId",
27967	//     "id"
27968	//   ],
27969	//   "parameters": {
27970	//     "id": {
27971	//       "description": "CreativeField ID.",
27972	//       "format": "int64",
27973	//       "location": "query",
27974	//       "required": true,
27975	//       "type": "string"
27976	//     },
27977	//     "profileId": {
27978	//       "description": "User profile ID associated with this request.",
27979	//       "format": "int64",
27980	//       "location": "path",
27981	//       "required": true,
27982	//       "type": "string"
27983	//     }
27984	//   },
27985	//   "path": "userprofiles/{profileId}/creativeFields",
27986	//   "request": {
27987	//     "$ref": "CreativeField"
27988	//   },
27989	//   "response": {
27990	//     "$ref": "CreativeField"
27991	//   },
27992	//   "scopes": [
27993	//     "https://www.googleapis.com/auth/dfatrafficking"
27994	//   ]
27995	// }
27996
27997}
27998
27999// method id "dfareporting.creativeFields.update":
28000
28001type CreativeFieldsUpdateCall struct {
28002	s             *Service
28003	profileId     int64
28004	creativefield *CreativeField
28005	urlParams_    gensupport.URLParams
28006	ctx_          context.Context
28007	header_       http.Header
28008}
28009
28010// Update: Updates an existing creative field.
28011//
28012// - profileId: User profile ID associated with this request.
28013func (r *CreativeFieldsService) Update(profileId int64, creativefield *CreativeField) *CreativeFieldsUpdateCall {
28014	c := &CreativeFieldsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28015	c.profileId = profileId
28016	c.creativefield = creativefield
28017	return c
28018}
28019
28020// Fields allows partial responses to be retrieved. See
28021// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28022// for more information.
28023func (c *CreativeFieldsUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldsUpdateCall {
28024	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28025	return c
28026}
28027
28028// Context sets the context to be used in this call's Do method. Any
28029// pending HTTP request will be aborted if the provided context is
28030// canceled.
28031func (c *CreativeFieldsUpdateCall) Context(ctx context.Context) *CreativeFieldsUpdateCall {
28032	c.ctx_ = ctx
28033	return c
28034}
28035
28036// Header returns an http.Header that can be modified by the caller to
28037// add HTTP headers to the request.
28038func (c *CreativeFieldsUpdateCall) Header() http.Header {
28039	if c.header_ == nil {
28040		c.header_ = make(http.Header)
28041	}
28042	return c.header_
28043}
28044
28045func (c *CreativeFieldsUpdateCall) doRequest(alt string) (*http.Response, error) {
28046	reqHeaders := make(http.Header)
28047	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
28048	for k, v := range c.header_ {
28049		reqHeaders[k] = v
28050	}
28051	reqHeaders.Set("User-Agent", c.s.userAgent())
28052	var body io.Reader = nil
28053	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
28054	if err != nil {
28055		return nil, err
28056	}
28057	reqHeaders.Set("Content-Type", "application/json")
28058	c.urlParams_.Set("alt", alt)
28059	c.urlParams_.Set("prettyPrint", "false")
28060	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
28061	urls += "?" + c.urlParams_.Encode()
28062	req, err := http.NewRequest("PUT", urls, body)
28063	if err != nil {
28064		return nil, err
28065	}
28066	req.Header = reqHeaders
28067	googleapi.Expand(req.URL, map[string]string{
28068		"profileId": strconv.FormatInt(c.profileId, 10),
28069	})
28070	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28071}
28072
28073// Do executes the "dfareporting.creativeFields.update" call.
28074// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
28075// status code is an error. Response headers are in either
28076// *CreativeField.ServerResponse.Header or (if a response was returned
28077// at all) in error.(*googleapi.Error).Header. Use
28078// googleapi.IsNotModified to check whether the returned error was
28079// because http.StatusNotModified was returned.
28080func (c *CreativeFieldsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
28081	gensupport.SetOptions(c.urlParams_, opts...)
28082	res, err := c.doRequest("json")
28083	if res != nil && res.StatusCode == http.StatusNotModified {
28084		if res.Body != nil {
28085			res.Body.Close()
28086		}
28087		return nil, &googleapi.Error{
28088			Code:   res.StatusCode,
28089			Header: res.Header,
28090		}
28091	}
28092	if err != nil {
28093		return nil, err
28094	}
28095	defer googleapi.CloseBody(res)
28096	if err := googleapi.CheckResponse(res); err != nil {
28097		return nil, err
28098	}
28099	ret := &CreativeField{
28100		ServerResponse: googleapi.ServerResponse{
28101			Header:         res.Header,
28102			HTTPStatusCode: res.StatusCode,
28103		},
28104	}
28105	target := &ret
28106	if err := gensupport.DecodeResponse(target, res); err != nil {
28107		return nil, err
28108	}
28109	return ret, nil
28110	// {
28111	//   "description": "Updates an existing creative field.",
28112	//   "flatPath": "userprofiles/{profileId}/creativeFields",
28113	//   "httpMethod": "PUT",
28114	//   "id": "dfareporting.creativeFields.update",
28115	//   "parameterOrder": [
28116	//     "profileId"
28117	//   ],
28118	//   "parameters": {
28119	//     "profileId": {
28120	//       "description": "User profile ID associated with this request.",
28121	//       "format": "int64",
28122	//       "location": "path",
28123	//       "required": true,
28124	//       "type": "string"
28125	//     }
28126	//   },
28127	//   "path": "userprofiles/{profileId}/creativeFields",
28128	//   "request": {
28129	//     "$ref": "CreativeField"
28130	//   },
28131	//   "response": {
28132	//     "$ref": "CreativeField"
28133	//   },
28134	//   "scopes": [
28135	//     "https://www.googleapis.com/auth/dfatrafficking"
28136	//   ]
28137	// }
28138
28139}
28140
28141// method id "dfareporting.creativeGroups.get":
28142
28143type CreativeGroupsGetCall struct {
28144	s            *Service
28145	profileId    int64
28146	id           int64
28147	urlParams_   gensupport.URLParams
28148	ifNoneMatch_ string
28149	ctx_         context.Context
28150	header_      http.Header
28151}
28152
28153// Get: Gets one creative group by ID.
28154//
28155// - id: Creative group ID.
28156// - profileId: User profile ID associated with this request.
28157func (r *CreativeGroupsService) Get(profileId int64, id int64) *CreativeGroupsGetCall {
28158	c := &CreativeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28159	c.profileId = profileId
28160	c.id = id
28161	return c
28162}
28163
28164// Fields allows partial responses to be retrieved. See
28165// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28166// for more information.
28167func (c *CreativeGroupsGetCall) Fields(s ...googleapi.Field) *CreativeGroupsGetCall {
28168	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28169	return c
28170}
28171
28172// IfNoneMatch sets the optional parameter which makes the operation
28173// fail if the object's ETag matches the given value. This is useful for
28174// getting updates only after the object has changed since the last
28175// request. Use googleapi.IsNotModified to check whether the response
28176// error from Do is the result of In-None-Match.
28177func (c *CreativeGroupsGetCall) IfNoneMatch(entityTag string) *CreativeGroupsGetCall {
28178	c.ifNoneMatch_ = entityTag
28179	return c
28180}
28181
28182// Context sets the context to be used in this call's Do method. Any
28183// pending HTTP request will be aborted if the provided context is
28184// canceled.
28185func (c *CreativeGroupsGetCall) Context(ctx context.Context) *CreativeGroupsGetCall {
28186	c.ctx_ = ctx
28187	return c
28188}
28189
28190// Header returns an http.Header that can be modified by the caller to
28191// add HTTP headers to the request.
28192func (c *CreativeGroupsGetCall) Header() http.Header {
28193	if c.header_ == nil {
28194		c.header_ = make(http.Header)
28195	}
28196	return c.header_
28197}
28198
28199func (c *CreativeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
28200	reqHeaders := make(http.Header)
28201	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
28202	for k, v := range c.header_ {
28203		reqHeaders[k] = v
28204	}
28205	reqHeaders.Set("User-Agent", c.s.userAgent())
28206	if c.ifNoneMatch_ != "" {
28207		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28208	}
28209	var body io.Reader = nil
28210	c.urlParams_.Set("alt", alt)
28211	c.urlParams_.Set("prettyPrint", "false")
28212	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups/{id}")
28213	urls += "?" + c.urlParams_.Encode()
28214	req, err := http.NewRequest("GET", urls, body)
28215	if err != nil {
28216		return nil, err
28217	}
28218	req.Header = reqHeaders
28219	googleapi.Expand(req.URL, map[string]string{
28220		"profileId": strconv.FormatInt(c.profileId, 10),
28221		"id":        strconv.FormatInt(c.id, 10),
28222	})
28223	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28224}
28225
28226// Do executes the "dfareporting.creativeGroups.get" call.
28227// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
28228// status code is an error. Response headers are in either
28229// *CreativeGroup.ServerResponse.Header or (if a response was returned
28230// at all) in error.(*googleapi.Error).Header. Use
28231// googleapi.IsNotModified to check whether the returned error was
28232// because http.StatusNotModified was returned.
28233func (c *CreativeGroupsGetCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
28234	gensupport.SetOptions(c.urlParams_, opts...)
28235	res, err := c.doRequest("json")
28236	if res != nil && res.StatusCode == http.StatusNotModified {
28237		if res.Body != nil {
28238			res.Body.Close()
28239		}
28240		return nil, &googleapi.Error{
28241			Code:   res.StatusCode,
28242			Header: res.Header,
28243		}
28244	}
28245	if err != nil {
28246		return nil, err
28247	}
28248	defer googleapi.CloseBody(res)
28249	if err := googleapi.CheckResponse(res); err != nil {
28250		return nil, err
28251	}
28252	ret := &CreativeGroup{
28253		ServerResponse: googleapi.ServerResponse{
28254			Header:         res.Header,
28255			HTTPStatusCode: res.StatusCode,
28256		},
28257	}
28258	target := &ret
28259	if err := gensupport.DecodeResponse(target, res); err != nil {
28260		return nil, err
28261	}
28262	return ret, nil
28263	// {
28264	//   "description": "Gets one creative group by ID.",
28265	//   "flatPath": "userprofiles/{profileId}/creativeGroups/{id}",
28266	//   "httpMethod": "GET",
28267	//   "id": "dfareporting.creativeGroups.get",
28268	//   "parameterOrder": [
28269	//     "profileId",
28270	//     "id"
28271	//   ],
28272	//   "parameters": {
28273	//     "id": {
28274	//       "description": "Creative group ID.",
28275	//       "format": "int64",
28276	//       "location": "path",
28277	//       "required": true,
28278	//       "type": "string"
28279	//     },
28280	//     "profileId": {
28281	//       "description": "User profile ID associated with this request.",
28282	//       "format": "int64",
28283	//       "location": "path",
28284	//       "required": true,
28285	//       "type": "string"
28286	//     }
28287	//   },
28288	//   "path": "userprofiles/{profileId}/creativeGroups/{id}",
28289	//   "response": {
28290	//     "$ref": "CreativeGroup"
28291	//   },
28292	//   "scopes": [
28293	//     "https://www.googleapis.com/auth/dfatrafficking"
28294	//   ]
28295	// }
28296
28297}
28298
28299// method id "dfareporting.creativeGroups.insert":
28300
28301type CreativeGroupsInsertCall struct {
28302	s             *Service
28303	profileId     int64
28304	creativegroup *CreativeGroup
28305	urlParams_    gensupport.URLParams
28306	ctx_          context.Context
28307	header_       http.Header
28308}
28309
28310// Insert: Inserts a new creative group.
28311//
28312// - profileId: User profile ID associated with this request.
28313func (r *CreativeGroupsService) Insert(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsInsertCall {
28314	c := &CreativeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28315	c.profileId = profileId
28316	c.creativegroup = creativegroup
28317	return c
28318}
28319
28320// Fields allows partial responses to be retrieved. See
28321// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28322// for more information.
28323func (c *CreativeGroupsInsertCall) Fields(s ...googleapi.Field) *CreativeGroupsInsertCall {
28324	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28325	return c
28326}
28327
28328// Context sets the context to be used in this call's Do method. Any
28329// pending HTTP request will be aborted if the provided context is
28330// canceled.
28331func (c *CreativeGroupsInsertCall) Context(ctx context.Context) *CreativeGroupsInsertCall {
28332	c.ctx_ = ctx
28333	return c
28334}
28335
28336// Header returns an http.Header that can be modified by the caller to
28337// add HTTP headers to the request.
28338func (c *CreativeGroupsInsertCall) Header() http.Header {
28339	if c.header_ == nil {
28340		c.header_ = make(http.Header)
28341	}
28342	return c.header_
28343}
28344
28345func (c *CreativeGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
28346	reqHeaders := make(http.Header)
28347	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
28348	for k, v := range c.header_ {
28349		reqHeaders[k] = v
28350	}
28351	reqHeaders.Set("User-Agent", c.s.userAgent())
28352	var body io.Reader = nil
28353	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
28354	if err != nil {
28355		return nil, err
28356	}
28357	reqHeaders.Set("Content-Type", "application/json")
28358	c.urlParams_.Set("alt", alt)
28359	c.urlParams_.Set("prettyPrint", "false")
28360	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
28361	urls += "?" + c.urlParams_.Encode()
28362	req, err := http.NewRequest("POST", urls, body)
28363	if err != nil {
28364		return nil, err
28365	}
28366	req.Header = reqHeaders
28367	googleapi.Expand(req.URL, map[string]string{
28368		"profileId": strconv.FormatInt(c.profileId, 10),
28369	})
28370	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28371}
28372
28373// Do executes the "dfareporting.creativeGroups.insert" call.
28374// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
28375// status code is an error. Response headers are in either
28376// *CreativeGroup.ServerResponse.Header or (if a response was returned
28377// at all) in error.(*googleapi.Error).Header. Use
28378// googleapi.IsNotModified to check whether the returned error was
28379// because http.StatusNotModified was returned.
28380func (c *CreativeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
28381	gensupport.SetOptions(c.urlParams_, opts...)
28382	res, err := c.doRequest("json")
28383	if res != nil && res.StatusCode == http.StatusNotModified {
28384		if res.Body != nil {
28385			res.Body.Close()
28386		}
28387		return nil, &googleapi.Error{
28388			Code:   res.StatusCode,
28389			Header: res.Header,
28390		}
28391	}
28392	if err != nil {
28393		return nil, err
28394	}
28395	defer googleapi.CloseBody(res)
28396	if err := googleapi.CheckResponse(res); err != nil {
28397		return nil, err
28398	}
28399	ret := &CreativeGroup{
28400		ServerResponse: googleapi.ServerResponse{
28401			Header:         res.Header,
28402			HTTPStatusCode: res.StatusCode,
28403		},
28404	}
28405	target := &ret
28406	if err := gensupport.DecodeResponse(target, res); err != nil {
28407		return nil, err
28408	}
28409	return ret, nil
28410	// {
28411	//   "description": "Inserts a new creative group.",
28412	//   "flatPath": "userprofiles/{profileId}/creativeGroups",
28413	//   "httpMethod": "POST",
28414	//   "id": "dfareporting.creativeGroups.insert",
28415	//   "parameterOrder": [
28416	//     "profileId"
28417	//   ],
28418	//   "parameters": {
28419	//     "profileId": {
28420	//       "description": "User profile ID associated with this request.",
28421	//       "format": "int64",
28422	//       "location": "path",
28423	//       "required": true,
28424	//       "type": "string"
28425	//     }
28426	//   },
28427	//   "path": "userprofiles/{profileId}/creativeGroups",
28428	//   "request": {
28429	//     "$ref": "CreativeGroup"
28430	//   },
28431	//   "response": {
28432	//     "$ref": "CreativeGroup"
28433	//   },
28434	//   "scopes": [
28435	//     "https://www.googleapis.com/auth/dfatrafficking"
28436	//   ]
28437	// }
28438
28439}
28440
28441// method id "dfareporting.creativeGroups.list":
28442
28443type CreativeGroupsListCall struct {
28444	s            *Service
28445	profileId    int64
28446	urlParams_   gensupport.URLParams
28447	ifNoneMatch_ string
28448	ctx_         context.Context
28449	header_      http.Header
28450}
28451
28452// List: Retrieves a list of creative groups, possibly filtered. This
28453// method supports paging.
28454//
28455// - profileId: User profile ID associated with this request.
28456func (r *CreativeGroupsService) List(profileId int64) *CreativeGroupsListCall {
28457	c := &CreativeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28458	c.profileId = profileId
28459	return c
28460}
28461
28462// AdvertiserIds sets the optional parameter "advertiserIds": Select
28463// only creative groups that belong to these advertisers.
28464func (c *CreativeGroupsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeGroupsListCall {
28465	var advertiserIds_ []string
28466	for _, v := range advertiserIds {
28467		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
28468	}
28469	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
28470	return c
28471}
28472
28473// GroupNumber sets the optional parameter "groupNumber": Select only
28474// creative groups that belong to this subgroup.
28475func (c *CreativeGroupsListCall) GroupNumber(groupNumber int64) *CreativeGroupsListCall {
28476	c.urlParams_.Set("groupNumber", fmt.Sprint(groupNumber))
28477	return c
28478}
28479
28480// Ids sets the optional parameter "ids": Select only creative groups
28481// with these IDs.
28482func (c *CreativeGroupsListCall) Ids(ids ...int64) *CreativeGroupsListCall {
28483	var ids_ []string
28484	for _, v := range ids {
28485		ids_ = append(ids_, fmt.Sprint(v))
28486	}
28487	c.urlParams_.SetMulti("ids", ids_)
28488	return c
28489}
28490
28491// MaxResults sets the optional parameter "maxResults": Maximum number
28492// of results to return.
28493func (c *CreativeGroupsListCall) MaxResults(maxResults int64) *CreativeGroupsListCall {
28494	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28495	return c
28496}
28497
28498// PageToken sets the optional parameter "pageToken": Value of the
28499// nextPageToken from the previous result page.
28500func (c *CreativeGroupsListCall) PageToken(pageToken string) *CreativeGroupsListCall {
28501	c.urlParams_.Set("pageToken", pageToken)
28502	return c
28503}
28504
28505// SearchString sets the optional parameter "searchString": Allows
28506// searching for creative groups by name or ID. Wildcards (*) are
28507// allowed. For example, "creativegroup*2015" will return creative
28508// groups with names like "creativegroup June 2015", "creativegroup
28509// April 2015", or simply "creativegroup 2015". Most of the searches
28510// also add wild-cards implicitly at the start and the end of the search
28511// string. For example, a search string of "creativegroup" will match
28512// creative groups with the name "my creativegroup", "creativegroup
28513// 2015", or simply "creativegroup".
28514func (c *CreativeGroupsListCall) SearchString(searchString string) *CreativeGroupsListCall {
28515	c.urlParams_.Set("searchString", searchString)
28516	return c
28517}
28518
28519// SortField sets the optional parameter "sortField": Field by which to
28520// sort the list.
28521//
28522// Possible values:
28523//   "ID" (default)
28524//   "NAME"
28525func (c *CreativeGroupsListCall) SortField(sortField string) *CreativeGroupsListCall {
28526	c.urlParams_.Set("sortField", sortField)
28527	return c
28528}
28529
28530// SortOrder sets the optional parameter "sortOrder": Order of sorted
28531// results.
28532//
28533// Possible values:
28534//   "ASCENDING" (default)
28535//   "DESCENDING"
28536func (c *CreativeGroupsListCall) SortOrder(sortOrder string) *CreativeGroupsListCall {
28537	c.urlParams_.Set("sortOrder", sortOrder)
28538	return c
28539}
28540
28541// Fields allows partial responses to be retrieved. See
28542// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28543// for more information.
28544func (c *CreativeGroupsListCall) Fields(s ...googleapi.Field) *CreativeGroupsListCall {
28545	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28546	return c
28547}
28548
28549// IfNoneMatch sets the optional parameter which makes the operation
28550// fail if the object's ETag matches the given value. This is useful for
28551// getting updates only after the object has changed since the last
28552// request. Use googleapi.IsNotModified to check whether the response
28553// error from Do is the result of In-None-Match.
28554func (c *CreativeGroupsListCall) IfNoneMatch(entityTag string) *CreativeGroupsListCall {
28555	c.ifNoneMatch_ = entityTag
28556	return c
28557}
28558
28559// Context sets the context to be used in this call's Do method. Any
28560// pending HTTP request will be aborted if the provided context is
28561// canceled.
28562func (c *CreativeGroupsListCall) Context(ctx context.Context) *CreativeGroupsListCall {
28563	c.ctx_ = ctx
28564	return c
28565}
28566
28567// Header returns an http.Header that can be modified by the caller to
28568// add HTTP headers to the request.
28569func (c *CreativeGroupsListCall) Header() http.Header {
28570	if c.header_ == nil {
28571		c.header_ = make(http.Header)
28572	}
28573	return c.header_
28574}
28575
28576func (c *CreativeGroupsListCall) doRequest(alt string) (*http.Response, error) {
28577	reqHeaders := make(http.Header)
28578	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
28579	for k, v := range c.header_ {
28580		reqHeaders[k] = v
28581	}
28582	reqHeaders.Set("User-Agent", c.s.userAgent())
28583	if c.ifNoneMatch_ != "" {
28584		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28585	}
28586	var body io.Reader = nil
28587	c.urlParams_.Set("alt", alt)
28588	c.urlParams_.Set("prettyPrint", "false")
28589	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
28590	urls += "?" + c.urlParams_.Encode()
28591	req, err := http.NewRequest("GET", urls, body)
28592	if err != nil {
28593		return nil, err
28594	}
28595	req.Header = reqHeaders
28596	googleapi.Expand(req.URL, map[string]string{
28597		"profileId": strconv.FormatInt(c.profileId, 10),
28598	})
28599	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28600}
28601
28602// Do executes the "dfareporting.creativeGroups.list" call.
28603// Exactly one of *CreativeGroupsListResponse or error will be non-nil.
28604// Any non-2xx status code is an error. Response headers are in either
28605// *CreativeGroupsListResponse.ServerResponse.Header or (if a response
28606// was returned at all) in error.(*googleapi.Error).Header. Use
28607// googleapi.IsNotModified to check whether the returned error was
28608// because http.StatusNotModified was returned.
28609func (c *CreativeGroupsListCall) Do(opts ...googleapi.CallOption) (*CreativeGroupsListResponse, error) {
28610	gensupport.SetOptions(c.urlParams_, opts...)
28611	res, err := c.doRequest("json")
28612	if res != nil && res.StatusCode == http.StatusNotModified {
28613		if res.Body != nil {
28614			res.Body.Close()
28615		}
28616		return nil, &googleapi.Error{
28617			Code:   res.StatusCode,
28618			Header: res.Header,
28619		}
28620	}
28621	if err != nil {
28622		return nil, err
28623	}
28624	defer googleapi.CloseBody(res)
28625	if err := googleapi.CheckResponse(res); err != nil {
28626		return nil, err
28627	}
28628	ret := &CreativeGroupsListResponse{
28629		ServerResponse: googleapi.ServerResponse{
28630			Header:         res.Header,
28631			HTTPStatusCode: res.StatusCode,
28632		},
28633	}
28634	target := &ret
28635	if err := gensupport.DecodeResponse(target, res); err != nil {
28636		return nil, err
28637	}
28638	return ret, nil
28639	// {
28640	//   "description": "Retrieves a list of creative groups, possibly filtered. This method supports paging.",
28641	//   "flatPath": "userprofiles/{profileId}/creativeGroups",
28642	//   "httpMethod": "GET",
28643	//   "id": "dfareporting.creativeGroups.list",
28644	//   "parameterOrder": [
28645	//     "profileId"
28646	//   ],
28647	//   "parameters": {
28648	//     "advertiserIds": {
28649	//       "description": "Select only creative groups that belong to these advertisers.",
28650	//       "format": "int64",
28651	//       "location": "query",
28652	//       "repeated": true,
28653	//       "type": "string"
28654	//     },
28655	//     "groupNumber": {
28656	//       "description": "Select only creative groups that belong to this subgroup.",
28657	//       "format": "int32",
28658	//       "location": "query",
28659	//       "maximum": "2",
28660	//       "minimum": "1",
28661	//       "type": "integer"
28662	//     },
28663	//     "ids": {
28664	//       "description": "Select only creative groups with these IDs.",
28665	//       "format": "int64",
28666	//       "location": "query",
28667	//       "repeated": true,
28668	//       "type": "string"
28669	//     },
28670	//     "maxResults": {
28671	//       "default": "1000",
28672	//       "description": "Maximum number of results to return.",
28673	//       "format": "int32",
28674	//       "location": "query",
28675	//       "maximum": "1000",
28676	//       "minimum": "0",
28677	//       "type": "integer"
28678	//     },
28679	//     "pageToken": {
28680	//       "description": "Value of the nextPageToken from the previous result page.",
28681	//       "location": "query",
28682	//       "type": "string"
28683	//     },
28684	//     "profileId": {
28685	//       "description": "User profile ID associated with this request.",
28686	//       "format": "int64",
28687	//       "location": "path",
28688	//       "required": true,
28689	//       "type": "string"
28690	//     },
28691	//     "searchString": {
28692	//       "description": "Allows searching for creative groups by name or ID. Wildcards (*) are allowed. For example, \"creativegroup*2015\" will return creative groups with names like \"creativegroup June 2015\", \"creativegroup April 2015\", or simply \"creativegroup 2015\". Most of the searches also add wild-cards implicitly at the start and the end of the search string. For example, a search string of \"creativegroup\" will match creative groups with the name \"my creativegroup\", \"creativegroup 2015\", or simply \"creativegroup\".",
28693	//       "location": "query",
28694	//       "type": "string"
28695	//     },
28696	//     "sortField": {
28697	//       "default": "ID",
28698	//       "description": "Field by which to sort the list.",
28699	//       "enum": [
28700	//         "ID",
28701	//         "NAME"
28702	//       ],
28703	//       "enumDescriptions": [
28704	//         "",
28705	//         ""
28706	//       ],
28707	//       "location": "query",
28708	//       "type": "string"
28709	//     },
28710	//     "sortOrder": {
28711	//       "default": "ASCENDING",
28712	//       "description": "Order of sorted results.",
28713	//       "enum": [
28714	//         "ASCENDING",
28715	//         "DESCENDING"
28716	//       ],
28717	//       "enumDescriptions": [
28718	//         "",
28719	//         ""
28720	//       ],
28721	//       "location": "query",
28722	//       "type": "string"
28723	//     }
28724	//   },
28725	//   "path": "userprofiles/{profileId}/creativeGroups",
28726	//   "response": {
28727	//     "$ref": "CreativeGroupsListResponse"
28728	//   },
28729	//   "scopes": [
28730	//     "https://www.googleapis.com/auth/dfatrafficking"
28731	//   ]
28732	// }
28733
28734}
28735
28736// Pages invokes f for each page of results.
28737// A non-nil error returned from f will halt the iteration.
28738// The provided context supersedes any context provided to the Context method.
28739func (c *CreativeGroupsListCall) Pages(ctx context.Context, f func(*CreativeGroupsListResponse) error) error {
28740	c.ctx_ = ctx
28741	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28742	for {
28743		x, err := c.Do()
28744		if err != nil {
28745			return err
28746		}
28747		if err := f(x); err != nil {
28748			return err
28749		}
28750		if x.NextPageToken == "" {
28751			return nil
28752		}
28753		c.PageToken(x.NextPageToken)
28754	}
28755}
28756
28757// method id "dfareporting.creativeGroups.patch":
28758
28759type CreativeGroupsPatchCall struct {
28760	s             *Service
28761	profileId     int64
28762	creativegroup *CreativeGroup
28763	urlParams_    gensupport.URLParams
28764	ctx_          context.Context
28765	header_       http.Header
28766}
28767
28768// Patch: Updates an existing creative group. This method supports patch
28769// semantics.
28770//
28771// - id: CreativeGroup ID.
28772// - profileId: User profile ID associated with this request.
28773func (r *CreativeGroupsService) Patch(profileId int64, id int64, creativegroup *CreativeGroup) *CreativeGroupsPatchCall {
28774	c := &CreativeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28775	c.profileId = profileId
28776	c.urlParams_.Set("id", fmt.Sprint(id))
28777	c.creativegroup = creativegroup
28778	return c
28779}
28780
28781// Fields allows partial responses to be retrieved. See
28782// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28783// for more information.
28784func (c *CreativeGroupsPatchCall) Fields(s ...googleapi.Field) *CreativeGroupsPatchCall {
28785	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28786	return c
28787}
28788
28789// Context sets the context to be used in this call's Do method. Any
28790// pending HTTP request will be aborted if the provided context is
28791// canceled.
28792func (c *CreativeGroupsPatchCall) Context(ctx context.Context) *CreativeGroupsPatchCall {
28793	c.ctx_ = ctx
28794	return c
28795}
28796
28797// Header returns an http.Header that can be modified by the caller to
28798// add HTTP headers to the request.
28799func (c *CreativeGroupsPatchCall) Header() http.Header {
28800	if c.header_ == nil {
28801		c.header_ = make(http.Header)
28802	}
28803	return c.header_
28804}
28805
28806func (c *CreativeGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
28807	reqHeaders := make(http.Header)
28808	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
28809	for k, v := range c.header_ {
28810		reqHeaders[k] = v
28811	}
28812	reqHeaders.Set("User-Agent", c.s.userAgent())
28813	var body io.Reader = nil
28814	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
28815	if err != nil {
28816		return nil, err
28817	}
28818	reqHeaders.Set("Content-Type", "application/json")
28819	c.urlParams_.Set("alt", alt)
28820	c.urlParams_.Set("prettyPrint", "false")
28821	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
28822	urls += "?" + c.urlParams_.Encode()
28823	req, err := http.NewRequest("PATCH", urls, body)
28824	if err != nil {
28825		return nil, err
28826	}
28827	req.Header = reqHeaders
28828	googleapi.Expand(req.URL, map[string]string{
28829		"profileId": strconv.FormatInt(c.profileId, 10),
28830	})
28831	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28832}
28833
28834// Do executes the "dfareporting.creativeGroups.patch" call.
28835// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
28836// status code is an error. Response headers are in either
28837// *CreativeGroup.ServerResponse.Header or (if a response was returned
28838// at all) in error.(*googleapi.Error).Header. Use
28839// googleapi.IsNotModified to check whether the returned error was
28840// because http.StatusNotModified was returned.
28841func (c *CreativeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
28842	gensupport.SetOptions(c.urlParams_, opts...)
28843	res, err := c.doRequest("json")
28844	if res != nil && res.StatusCode == http.StatusNotModified {
28845		if res.Body != nil {
28846			res.Body.Close()
28847		}
28848		return nil, &googleapi.Error{
28849			Code:   res.StatusCode,
28850			Header: res.Header,
28851		}
28852	}
28853	if err != nil {
28854		return nil, err
28855	}
28856	defer googleapi.CloseBody(res)
28857	if err := googleapi.CheckResponse(res); err != nil {
28858		return nil, err
28859	}
28860	ret := &CreativeGroup{
28861		ServerResponse: googleapi.ServerResponse{
28862			Header:         res.Header,
28863			HTTPStatusCode: res.StatusCode,
28864		},
28865	}
28866	target := &ret
28867	if err := gensupport.DecodeResponse(target, res); err != nil {
28868		return nil, err
28869	}
28870	return ret, nil
28871	// {
28872	//   "description": "Updates an existing creative group. This method supports patch semantics.",
28873	//   "flatPath": "userprofiles/{profileId}/creativeGroups",
28874	//   "httpMethod": "PATCH",
28875	//   "id": "dfareporting.creativeGroups.patch",
28876	//   "parameterOrder": [
28877	//     "profileId",
28878	//     "id"
28879	//   ],
28880	//   "parameters": {
28881	//     "id": {
28882	//       "description": "CreativeGroup ID.",
28883	//       "format": "int64",
28884	//       "location": "query",
28885	//       "required": true,
28886	//       "type": "string"
28887	//     },
28888	//     "profileId": {
28889	//       "description": "User profile ID associated with this request.",
28890	//       "format": "int64",
28891	//       "location": "path",
28892	//       "required": true,
28893	//       "type": "string"
28894	//     }
28895	//   },
28896	//   "path": "userprofiles/{profileId}/creativeGroups",
28897	//   "request": {
28898	//     "$ref": "CreativeGroup"
28899	//   },
28900	//   "response": {
28901	//     "$ref": "CreativeGroup"
28902	//   },
28903	//   "scopes": [
28904	//     "https://www.googleapis.com/auth/dfatrafficking"
28905	//   ]
28906	// }
28907
28908}
28909
28910// method id "dfareporting.creativeGroups.update":
28911
28912type CreativeGroupsUpdateCall struct {
28913	s             *Service
28914	profileId     int64
28915	creativegroup *CreativeGroup
28916	urlParams_    gensupport.URLParams
28917	ctx_          context.Context
28918	header_       http.Header
28919}
28920
28921// Update: Updates an existing creative group.
28922//
28923// - profileId: User profile ID associated with this request.
28924func (r *CreativeGroupsService) Update(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsUpdateCall {
28925	c := &CreativeGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28926	c.profileId = profileId
28927	c.creativegroup = creativegroup
28928	return c
28929}
28930
28931// Fields allows partial responses to be retrieved. See
28932// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28933// for more information.
28934func (c *CreativeGroupsUpdateCall) Fields(s ...googleapi.Field) *CreativeGroupsUpdateCall {
28935	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28936	return c
28937}
28938
28939// Context sets the context to be used in this call's Do method. Any
28940// pending HTTP request will be aborted if the provided context is
28941// canceled.
28942func (c *CreativeGroupsUpdateCall) Context(ctx context.Context) *CreativeGroupsUpdateCall {
28943	c.ctx_ = ctx
28944	return c
28945}
28946
28947// Header returns an http.Header that can be modified by the caller to
28948// add HTTP headers to the request.
28949func (c *CreativeGroupsUpdateCall) Header() http.Header {
28950	if c.header_ == nil {
28951		c.header_ = make(http.Header)
28952	}
28953	return c.header_
28954}
28955
28956func (c *CreativeGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
28957	reqHeaders := make(http.Header)
28958	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
28959	for k, v := range c.header_ {
28960		reqHeaders[k] = v
28961	}
28962	reqHeaders.Set("User-Agent", c.s.userAgent())
28963	var body io.Reader = nil
28964	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
28965	if err != nil {
28966		return nil, err
28967	}
28968	reqHeaders.Set("Content-Type", "application/json")
28969	c.urlParams_.Set("alt", alt)
28970	c.urlParams_.Set("prettyPrint", "false")
28971	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
28972	urls += "?" + c.urlParams_.Encode()
28973	req, err := http.NewRequest("PUT", urls, body)
28974	if err != nil {
28975		return nil, err
28976	}
28977	req.Header = reqHeaders
28978	googleapi.Expand(req.URL, map[string]string{
28979		"profileId": strconv.FormatInt(c.profileId, 10),
28980	})
28981	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28982}
28983
28984// Do executes the "dfareporting.creativeGroups.update" call.
28985// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
28986// status code is an error. Response headers are in either
28987// *CreativeGroup.ServerResponse.Header or (if a response was returned
28988// at all) in error.(*googleapi.Error).Header. Use
28989// googleapi.IsNotModified to check whether the returned error was
28990// because http.StatusNotModified was returned.
28991func (c *CreativeGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
28992	gensupport.SetOptions(c.urlParams_, opts...)
28993	res, err := c.doRequest("json")
28994	if res != nil && res.StatusCode == http.StatusNotModified {
28995		if res.Body != nil {
28996			res.Body.Close()
28997		}
28998		return nil, &googleapi.Error{
28999			Code:   res.StatusCode,
29000			Header: res.Header,
29001		}
29002	}
29003	if err != nil {
29004		return nil, err
29005	}
29006	defer googleapi.CloseBody(res)
29007	if err := googleapi.CheckResponse(res); err != nil {
29008		return nil, err
29009	}
29010	ret := &CreativeGroup{
29011		ServerResponse: googleapi.ServerResponse{
29012			Header:         res.Header,
29013			HTTPStatusCode: res.StatusCode,
29014		},
29015	}
29016	target := &ret
29017	if err := gensupport.DecodeResponse(target, res); err != nil {
29018		return nil, err
29019	}
29020	return ret, nil
29021	// {
29022	//   "description": "Updates an existing creative group.",
29023	//   "flatPath": "userprofiles/{profileId}/creativeGroups",
29024	//   "httpMethod": "PUT",
29025	//   "id": "dfareporting.creativeGroups.update",
29026	//   "parameterOrder": [
29027	//     "profileId"
29028	//   ],
29029	//   "parameters": {
29030	//     "profileId": {
29031	//       "description": "User profile ID associated with this request.",
29032	//       "format": "int64",
29033	//       "location": "path",
29034	//       "required": true,
29035	//       "type": "string"
29036	//     }
29037	//   },
29038	//   "path": "userprofiles/{profileId}/creativeGroups",
29039	//   "request": {
29040	//     "$ref": "CreativeGroup"
29041	//   },
29042	//   "response": {
29043	//     "$ref": "CreativeGroup"
29044	//   },
29045	//   "scopes": [
29046	//     "https://www.googleapis.com/auth/dfatrafficking"
29047	//   ]
29048	// }
29049
29050}
29051
29052// method id "dfareporting.creatives.get":
29053
29054type CreativesGetCall struct {
29055	s            *Service
29056	profileId    int64
29057	id           int64
29058	urlParams_   gensupport.URLParams
29059	ifNoneMatch_ string
29060	ctx_         context.Context
29061	header_      http.Header
29062}
29063
29064// Get: Gets one creative by ID.
29065//
29066// - id: Creative ID.
29067// - profileId: User profile ID associated with this request.
29068func (r *CreativesService) Get(profileId int64, id int64) *CreativesGetCall {
29069	c := &CreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29070	c.profileId = profileId
29071	c.id = id
29072	return c
29073}
29074
29075// Fields allows partial responses to be retrieved. See
29076// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29077// for more information.
29078func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall {
29079	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29080	return c
29081}
29082
29083// IfNoneMatch sets the optional parameter which makes the operation
29084// fail if the object's ETag matches the given value. This is useful for
29085// getting updates only after the object has changed since the last
29086// request. Use googleapi.IsNotModified to check whether the response
29087// error from Do is the result of In-None-Match.
29088func (c *CreativesGetCall) IfNoneMatch(entityTag string) *CreativesGetCall {
29089	c.ifNoneMatch_ = entityTag
29090	return c
29091}
29092
29093// Context sets the context to be used in this call's Do method. Any
29094// pending HTTP request will be aborted if the provided context is
29095// canceled.
29096func (c *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
29097	c.ctx_ = ctx
29098	return c
29099}
29100
29101// Header returns an http.Header that can be modified by the caller to
29102// add HTTP headers to the request.
29103func (c *CreativesGetCall) Header() http.Header {
29104	if c.header_ == nil {
29105		c.header_ = make(http.Header)
29106	}
29107	return c.header_
29108}
29109
29110func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
29111	reqHeaders := make(http.Header)
29112	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
29113	for k, v := range c.header_ {
29114		reqHeaders[k] = v
29115	}
29116	reqHeaders.Set("User-Agent", c.s.userAgent())
29117	if c.ifNoneMatch_ != "" {
29118		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29119	}
29120	var body io.Reader = nil
29121	c.urlParams_.Set("alt", alt)
29122	c.urlParams_.Set("prettyPrint", "false")
29123	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives/{id}")
29124	urls += "?" + c.urlParams_.Encode()
29125	req, err := http.NewRequest("GET", urls, body)
29126	if err != nil {
29127		return nil, err
29128	}
29129	req.Header = reqHeaders
29130	googleapi.Expand(req.URL, map[string]string{
29131		"profileId": strconv.FormatInt(c.profileId, 10),
29132		"id":        strconv.FormatInt(c.id, 10),
29133	})
29134	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29135}
29136
29137// Do executes the "dfareporting.creatives.get" call.
29138// Exactly one of *Creative or error will be non-nil. Any non-2xx status
29139// code is an error. Response headers are in either
29140// *Creative.ServerResponse.Header or (if a response was returned at
29141// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29142// to check whether the returned error was because
29143// http.StatusNotModified was returned.
29144func (c *CreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
29145	gensupport.SetOptions(c.urlParams_, opts...)
29146	res, err := c.doRequest("json")
29147	if res != nil && res.StatusCode == http.StatusNotModified {
29148		if res.Body != nil {
29149			res.Body.Close()
29150		}
29151		return nil, &googleapi.Error{
29152			Code:   res.StatusCode,
29153			Header: res.Header,
29154		}
29155	}
29156	if err != nil {
29157		return nil, err
29158	}
29159	defer googleapi.CloseBody(res)
29160	if err := googleapi.CheckResponse(res); err != nil {
29161		return nil, err
29162	}
29163	ret := &Creative{
29164		ServerResponse: googleapi.ServerResponse{
29165			Header:         res.Header,
29166			HTTPStatusCode: res.StatusCode,
29167		},
29168	}
29169	target := &ret
29170	if err := gensupport.DecodeResponse(target, res); err != nil {
29171		return nil, err
29172	}
29173	return ret, nil
29174	// {
29175	//   "description": "Gets one creative by ID.",
29176	//   "flatPath": "userprofiles/{profileId}/creatives/{id}",
29177	//   "httpMethod": "GET",
29178	//   "id": "dfareporting.creatives.get",
29179	//   "parameterOrder": [
29180	//     "profileId",
29181	//     "id"
29182	//   ],
29183	//   "parameters": {
29184	//     "id": {
29185	//       "description": "Creative ID.",
29186	//       "format": "int64",
29187	//       "location": "path",
29188	//       "required": true,
29189	//       "type": "string"
29190	//     },
29191	//     "profileId": {
29192	//       "description": "User profile ID associated with this request.",
29193	//       "format": "int64",
29194	//       "location": "path",
29195	//       "required": true,
29196	//       "type": "string"
29197	//     }
29198	//   },
29199	//   "path": "userprofiles/{profileId}/creatives/{id}",
29200	//   "response": {
29201	//     "$ref": "Creative"
29202	//   },
29203	//   "scopes": [
29204	//     "https://www.googleapis.com/auth/dfatrafficking"
29205	//   ]
29206	// }
29207
29208}
29209
29210// method id "dfareporting.creatives.insert":
29211
29212type CreativesInsertCall struct {
29213	s          *Service
29214	profileId  int64
29215	creative   *Creative
29216	urlParams_ gensupport.URLParams
29217	ctx_       context.Context
29218	header_    http.Header
29219}
29220
29221// Insert: Inserts a new creative.
29222//
29223// - profileId: User profile ID associated with this request.
29224func (r *CreativesService) Insert(profileId int64, creative *Creative) *CreativesInsertCall {
29225	c := &CreativesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29226	c.profileId = profileId
29227	c.creative = creative
29228	return c
29229}
29230
29231// Fields allows partial responses to be retrieved. See
29232// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29233// for more information.
29234func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall {
29235	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29236	return c
29237}
29238
29239// Context sets the context to be used in this call's Do method. Any
29240// pending HTTP request will be aborted if the provided context is
29241// canceled.
29242func (c *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
29243	c.ctx_ = ctx
29244	return c
29245}
29246
29247// Header returns an http.Header that can be modified by the caller to
29248// add HTTP headers to the request.
29249func (c *CreativesInsertCall) Header() http.Header {
29250	if c.header_ == nil {
29251		c.header_ = make(http.Header)
29252	}
29253	return c.header_
29254}
29255
29256func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
29257	reqHeaders := make(http.Header)
29258	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
29259	for k, v := range c.header_ {
29260		reqHeaders[k] = v
29261	}
29262	reqHeaders.Set("User-Agent", c.s.userAgent())
29263	var body io.Reader = nil
29264	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
29265	if err != nil {
29266		return nil, err
29267	}
29268	reqHeaders.Set("Content-Type", "application/json")
29269	c.urlParams_.Set("alt", alt)
29270	c.urlParams_.Set("prettyPrint", "false")
29271	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
29272	urls += "?" + c.urlParams_.Encode()
29273	req, err := http.NewRequest("POST", urls, body)
29274	if err != nil {
29275		return nil, err
29276	}
29277	req.Header = reqHeaders
29278	googleapi.Expand(req.URL, map[string]string{
29279		"profileId": strconv.FormatInt(c.profileId, 10),
29280	})
29281	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29282}
29283
29284// Do executes the "dfareporting.creatives.insert" call.
29285// Exactly one of *Creative or error will be non-nil. Any non-2xx status
29286// code is an error. Response headers are in either
29287// *Creative.ServerResponse.Header or (if a response was returned at
29288// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29289// to check whether the returned error was because
29290// http.StatusNotModified was returned.
29291func (c *CreativesInsertCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
29292	gensupport.SetOptions(c.urlParams_, opts...)
29293	res, err := c.doRequest("json")
29294	if res != nil && res.StatusCode == http.StatusNotModified {
29295		if res.Body != nil {
29296			res.Body.Close()
29297		}
29298		return nil, &googleapi.Error{
29299			Code:   res.StatusCode,
29300			Header: res.Header,
29301		}
29302	}
29303	if err != nil {
29304		return nil, err
29305	}
29306	defer googleapi.CloseBody(res)
29307	if err := googleapi.CheckResponse(res); err != nil {
29308		return nil, err
29309	}
29310	ret := &Creative{
29311		ServerResponse: googleapi.ServerResponse{
29312			Header:         res.Header,
29313			HTTPStatusCode: res.StatusCode,
29314		},
29315	}
29316	target := &ret
29317	if err := gensupport.DecodeResponse(target, res); err != nil {
29318		return nil, err
29319	}
29320	return ret, nil
29321	// {
29322	//   "description": "Inserts a new creative.",
29323	//   "flatPath": "userprofiles/{profileId}/creatives",
29324	//   "httpMethod": "POST",
29325	//   "id": "dfareporting.creatives.insert",
29326	//   "parameterOrder": [
29327	//     "profileId"
29328	//   ],
29329	//   "parameters": {
29330	//     "profileId": {
29331	//       "description": "User profile ID associated with this request.",
29332	//       "format": "int64",
29333	//       "location": "path",
29334	//       "required": true,
29335	//       "type": "string"
29336	//     }
29337	//   },
29338	//   "path": "userprofiles/{profileId}/creatives",
29339	//   "request": {
29340	//     "$ref": "Creative"
29341	//   },
29342	//   "response": {
29343	//     "$ref": "Creative"
29344	//   },
29345	//   "scopes": [
29346	//     "https://www.googleapis.com/auth/dfatrafficking"
29347	//   ]
29348	// }
29349
29350}
29351
29352// method id "dfareporting.creatives.list":
29353
29354type CreativesListCall struct {
29355	s            *Service
29356	profileId    int64
29357	urlParams_   gensupport.URLParams
29358	ifNoneMatch_ string
29359	ctx_         context.Context
29360	header_      http.Header
29361}
29362
29363// List: Retrieves a list of creatives, possibly filtered. This method
29364// supports paging.
29365//
29366// - profileId: User profile ID associated with this request.
29367func (r *CreativesService) List(profileId int64) *CreativesListCall {
29368	c := &CreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29369	c.profileId = profileId
29370	return c
29371}
29372
29373// Active sets the optional parameter "active": Select only active
29374// creatives. Leave blank to select active and inactive creatives.
29375func (c *CreativesListCall) Active(active bool) *CreativesListCall {
29376	c.urlParams_.Set("active", fmt.Sprint(active))
29377	return c
29378}
29379
29380// AdvertiserId sets the optional parameter "advertiserId": Select only
29381// creatives with this advertiser ID.
29382func (c *CreativesListCall) AdvertiserId(advertiserId int64) *CreativesListCall {
29383	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29384	return c
29385}
29386
29387// Archived sets the optional parameter "archived": Select only archived
29388// creatives. Leave blank to select archived and unarchived creatives.
29389func (c *CreativesListCall) Archived(archived bool) *CreativesListCall {
29390	c.urlParams_.Set("archived", fmt.Sprint(archived))
29391	return c
29392}
29393
29394// CampaignId sets the optional parameter "campaignId": Select only
29395// creatives with this campaign ID.
29396func (c *CreativesListCall) CampaignId(campaignId int64) *CreativesListCall {
29397	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
29398	return c
29399}
29400
29401// CompanionCreativeIds sets the optional parameter
29402// "companionCreativeIds": Select only in-stream video creatives with
29403// these companion IDs.
29404func (c *CreativesListCall) CompanionCreativeIds(companionCreativeIds ...int64) *CreativesListCall {
29405	var companionCreativeIds_ []string
29406	for _, v := range companionCreativeIds {
29407		companionCreativeIds_ = append(companionCreativeIds_, fmt.Sprint(v))
29408	}
29409	c.urlParams_.SetMulti("companionCreativeIds", companionCreativeIds_)
29410	return c
29411}
29412
29413// CreativeFieldIds sets the optional parameter "creativeFieldIds":
29414// Select only creatives with these creative field IDs.
29415func (c *CreativesListCall) CreativeFieldIds(creativeFieldIds ...int64) *CreativesListCall {
29416	var creativeFieldIds_ []string
29417	for _, v := range creativeFieldIds {
29418		creativeFieldIds_ = append(creativeFieldIds_, fmt.Sprint(v))
29419	}
29420	c.urlParams_.SetMulti("creativeFieldIds", creativeFieldIds_)
29421	return c
29422}
29423
29424// Ids sets the optional parameter "ids": Select only creatives with
29425// these IDs.
29426func (c *CreativesListCall) Ids(ids ...int64) *CreativesListCall {
29427	var ids_ []string
29428	for _, v := range ids {
29429		ids_ = append(ids_, fmt.Sprint(v))
29430	}
29431	c.urlParams_.SetMulti("ids", ids_)
29432	return c
29433}
29434
29435// MaxResults sets the optional parameter "maxResults": Maximum number
29436// of results to return.
29437func (c *CreativesListCall) MaxResults(maxResults int64) *CreativesListCall {
29438	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29439	return c
29440}
29441
29442// PageToken sets the optional parameter "pageToken": Value of the
29443// nextPageToken from the previous result page.
29444func (c *CreativesListCall) PageToken(pageToken string) *CreativesListCall {
29445	c.urlParams_.Set("pageToken", pageToken)
29446	return c
29447}
29448
29449// RenderingIds sets the optional parameter "renderingIds": Select only
29450// creatives with these rendering IDs.
29451func (c *CreativesListCall) RenderingIds(renderingIds ...int64) *CreativesListCall {
29452	var renderingIds_ []string
29453	for _, v := range renderingIds {
29454		renderingIds_ = append(renderingIds_, fmt.Sprint(v))
29455	}
29456	c.urlParams_.SetMulti("renderingIds", renderingIds_)
29457	return c
29458}
29459
29460// SearchString sets the optional parameter "searchString": Allows
29461// searching for objects by name or ID. Wildcards (*) are allowed. For
29462// example, "creative*2015" will return objects with names like
29463// "creative June 2015", "creative April 2015", or simply "creative
29464// 2015". Most of the searches also add wildcards implicitly at the
29465// start and the end of the search string. For example, a search string
29466// of "creative" will match objects with name "my creative", "creative
29467// 2015", or simply "creative".
29468func (c *CreativesListCall) SearchString(searchString string) *CreativesListCall {
29469	c.urlParams_.Set("searchString", searchString)
29470	return c
29471}
29472
29473// SizeIds sets the optional parameter "sizeIds": Select only creatives
29474// with these size IDs.
29475func (c *CreativesListCall) SizeIds(sizeIds ...int64) *CreativesListCall {
29476	var sizeIds_ []string
29477	for _, v := range sizeIds {
29478		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
29479	}
29480	c.urlParams_.SetMulti("sizeIds", sizeIds_)
29481	return c
29482}
29483
29484// SortField sets the optional parameter "sortField": Field by which to
29485// sort the list.
29486//
29487// Possible values:
29488//   "ID" (default)
29489//   "NAME"
29490func (c *CreativesListCall) SortField(sortField string) *CreativesListCall {
29491	c.urlParams_.Set("sortField", sortField)
29492	return c
29493}
29494
29495// SortOrder sets the optional parameter "sortOrder": Order of sorted
29496// results.
29497//
29498// Possible values:
29499//   "ASCENDING" (default)
29500//   "DESCENDING"
29501func (c *CreativesListCall) SortOrder(sortOrder string) *CreativesListCall {
29502	c.urlParams_.Set("sortOrder", sortOrder)
29503	return c
29504}
29505
29506// StudioCreativeId sets the optional parameter "studioCreativeId":
29507// Select only creatives corresponding to this Studio creative ID.
29508func (c *CreativesListCall) StudioCreativeId(studioCreativeId int64) *CreativesListCall {
29509	c.urlParams_.Set("studioCreativeId", fmt.Sprint(studioCreativeId))
29510	return c
29511}
29512
29513// Types sets the optional parameter "types": Select only creatives with
29514// these creative types.
29515//
29516// Possible values:
29517//   "IMAGE"
29518//   "DISPLAY_REDIRECT"
29519//   "CUSTOM_DISPLAY"
29520//   "INTERNAL_REDIRECT"
29521//   "CUSTOM_DISPLAY_INTERSTITIAL"
29522//   "INTERSTITIAL_INTERNAL_REDIRECT"
29523//   "TRACKING_TEXT"
29524//   "RICH_MEDIA_DISPLAY_BANNER"
29525//   "RICH_MEDIA_INPAGE_FLOATING"
29526//   "RICH_MEDIA_IM_EXPAND"
29527//   "RICH_MEDIA_DISPLAY_EXPANDING"
29528//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
29529//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
29530//   "RICH_MEDIA_MOBILE_IN_APP"
29531//   "FLASH_INPAGE"
29532//   "INSTREAM_VIDEO"
29533//   "VPAID_LINEAR_VIDEO"
29534//   "VPAID_NON_LINEAR_VIDEO"
29535//   "INSTREAM_VIDEO_REDIRECT"
29536//   "RICH_MEDIA_PEEL_DOWN"
29537//   "HTML5_BANNER"
29538//   "DISPLAY"
29539//   "DISPLAY_IMAGE_GALLERY"
29540//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
29541//   "INSTREAM_AUDIO"
29542func (c *CreativesListCall) Types(types ...string) *CreativesListCall {
29543	c.urlParams_.SetMulti("types", append([]string{}, types...))
29544	return c
29545}
29546
29547// Fields allows partial responses to be retrieved. See
29548// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29549// for more information.
29550func (c *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall {
29551	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29552	return c
29553}
29554
29555// IfNoneMatch sets the optional parameter which makes the operation
29556// fail if the object's ETag matches the given value. This is useful for
29557// getting updates only after the object has changed since the last
29558// request. Use googleapi.IsNotModified to check whether the response
29559// error from Do is the result of In-None-Match.
29560func (c *CreativesListCall) IfNoneMatch(entityTag string) *CreativesListCall {
29561	c.ifNoneMatch_ = entityTag
29562	return c
29563}
29564
29565// Context sets the context to be used in this call's Do method. Any
29566// pending HTTP request will be aborted if the provided context is
29567// canceled.
29568func (c *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
29569	c.ctx_ = ctx
29570	return c
29571}
29572
29573// Header returns an http.Header that can be modified by the caller to
29574// add HTTP headers to the request.
29575func (c *CreativesListCall) Header() http.Header {
29576	if c.header_ == nil {
29577		c.header_ = make(http.Header)
29578	}
29579	return c.header_
29580}
29581
29582func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
29583	reqHeaders := make(http.Header)
29584	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
29585	for k, v := range c.header_ {
29586		reqHeaders[k] = v
29587	}
29588	reqHeaders.Set("User-Agent", c.s.userAgent())
29589	if c.ifNoneMatch_ != "" {
29590		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29591	}
29592	var body io.Reader = nil
29593	c.urlParams_.Set("alt", alt)
29594	c.urlParams_.Set("prettyPrint", "false")
29595	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
29596	urls += "?" + c.urlParams_.Encode()
29597	req, err := http.NewRequest("GET", urls, body)
29598	if err != nil {
29599		return nil, err
29600	}
29601	req.Header = reqHeaders
29602	googleapi.Expand(req.URL, map[string]string{
29603		"profileId": strconv.FormatInt(c.profileId, 10),
29604	})
29605	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29606}
29607
29608// Do executes the "dfareporting.creatives.list" call.
29609// Exactly one of *CreativesListResponse or error will be non-nil. Any
29610// non-2xx status code is an error. Response headers are in either
29611// *CreativesListResponse.ServerResponse.Header or (if a response was
29612// returned at all) in error.(*googleapi.Error).Header. Use
29613// googleapi.IsNotModified to check whether the returned error was
29614// because http.StatusNotModified was returned.
29615func (c *CreativesListCall) Do(opts ...googleapi.CallOption) (*CreativesListResponse, error) {
29616	gensupport.SetOptions(c.urlParams_, opts...)
29617	res, err := c.doRequest("json")
29618	if res != nil && res.StatusCode == http.StatusNotModified {
29619		if res.Body != nil {
29620			res.Body.Close()
29621		}
29622		return nil, &googleapi.Error{
29623			Code:   res.StatusCode,
29624			Header: res.Header,
29625		}
29626	}
29627	if err != nil {
29628		return nil, err
29629	}
29630	defer googleapi.CloseBody(res)
29631	if err := googleapi.CheckResponse(res); err != nil {
29632		return nil, err
29633	}
29634	ret := &CreativesListResponse{
29635		ServerResponse: googleapi.ServerResponse{
29636			Header:         res.Header,
29637			HTTPStatusCode: res.StatusCode,
29638		},
29639	}
29640	target := &ret
29641	if err := gensupport.DecodeResponse(target, res); err != nil {
29642		return nil, err
29643	}
29644	return ret, nil
29645	// {
29646	//   "description": "Retrieves a list of creatives, possibly filtered. This method supports paging.",
29647	//   "flatPath": "userprofiles/{profileId}/creatives",
29648	//   "httpMethod": "GET",
29649	//   "id": "dfareporting.creatives.list",
29650	//   "parameterOrder": [
29651	//     "profileId"
29652	//   ],
29653	//   "parameters": {
29654	//     "active": {
29655	//       "description": "Select only active creatives. Leave blank to select active and inactive creatives.",
29656	//       "location": "query",
29657	//       "type": "boolean"
29658	//     },
29659	//     "advertiserId": {
29660	//       "description": "Select only creatives with this advertiser ID.",
29661	//       "format": "int64",
29662	//       "location": "query",
29663	//       "type": "string"
29664	//     },
29665	//     "archived": {
29666	//       "description": "Select only archived creatives. Leave blank to select archived and unarchived creatives.",
29667	//       "location": "query",
29668	//       "type": "boolean"
29669	//     },
29670	//     "campaignId": {
29671	//       "description": "Select only creatives with this campaign ID.",
29672	//       "format": "int64",
29673	//       "location": "query",
29674	//       "type": "string"
29675	//     },
29676	//     "companionCreativeIds": {
29677	//       "description": "Select only in-stream video creatives with these companion IDs.",
29678	//       "format": "int64",
29679	//       "location": "query",
29680	//       "repeated": true,
29681	//       "type": "string"
29682	//     },
29683	//     "creativeFieldIds": {
29684	//       "description": "Select only creatives with these creative field IDs.",
29685	//       "format": "int64",
29686	//       "location": "query",
29687	//       "repeated": true,
29688	//       "type": "string"
29689	//     },
29690	//     "ids": {
29691	//       "description": "Select only creatives with these IDs.",
29692	//       "format": "int64",
29693	//       "location": "query",
29694	//       "repeated": true,
29695	//       "type": "string"
29696	//     },
29697	//     "maxResults": {
29698	//       "default": "1000",
29699	//       "description": "Maximum number of results to return.",
29700	//       "format": "int32",
29701	//       "location": "query",
29702	//       "maximum": "1000",
29703	//       "minimum": "0",
29704	//       "type": "integer"
29705	//     },
29706	//     "pageToken": {
29707	//       "description": "Value of the nextPageToken from the previous result page.",
29708	//       "location": "query",
29709	//       "type": "string"
29710	//     },
29711	//     "profileId": {
29712	//       "description": "User profile ID associated with this request.",
29713	//       "format": "int64",
29714	//       "location": "path",
29715	//       "required": true,
29716	//       "type": "string"
29717	//     },
29718	//     "renderingIds": {
29719	//       "description": "Select only creatives with these rendering IDs.",
29720	//       "format": "int64",
29721	//       "location": "query",
29722	//       "repeated": true,
29723	//       "type": "string"
29724	//     },
29725	//     "searchString": {
29726	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"creative*2015\" will return objects with names like \"creative June 2015\", \"creative April 2015\", or simply \"creative 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"creative\" will match objects with name \"my creative\", \"creative 2015\", or simply \"creative\".",
29727	//       "location": "query",
29728	//       "type": "string"
29729	//     },
29730	//     "sizeIds": {
29731	//       "description": "Select only creatives with these size IDs.",
29732	//       "format": "int64",
29733	//       "location": "query",
29734	//       "repeated": true,
29735	//       "type": "string"
29736	//     },
29737	//     "sortField": {
29738	//       "default": "ID",
29739	//       "description": "Field by which to sort the list.",
29740	//       "enum": [
29741	//         "ID",
29742	//         "NAME"
29743	//       ],
29744	//       "enumDescriptions": [
29745	//         "",
29746	//         ""
29747	//       ],
29748	//       "location": "query",
29749	//       "type": "string"
29750	//     },
29751	//     "sortOrder": {
29752	//       "default": "ASCENDING",
29753	//       "description": "Order of sorted results.",
29754	//       "enum": [
29755	//         "ASCENDING",
29756	//         "DESCENDING"
29757	//       ],
29758	//       "enumDescriptions": [
29759	//         "",
29760	//         ""
29761	//       ],
29762	//       "location": "query",
29763	//       "type": "string"
29764	//     },
29765	//     "studioCreativeId": {
29766	//       "description": "Select only creatives corresponding to this Studio creative ID.",
29767	//       "format": "int64",
29768	//       "location": "query",
29769	//       "type": "string"
29770	//     },
29771	//     "types": {
29772	//       "description": "Select only creatives with these creative types.",
29773	//       "enum": [
29774	//         "IMAGE",
29775	//         "DISPLAY_REDIRECT",
29776	//         "CUSTOM_DISPLAY",
29777	//         "INTERNAL_REDIRECT",
29778	//         "CUSTOM_DISPLAY_INTERSTITIAL",
29779	//         "INTERSTITIAL_INTERNAL_REDIRECT",
29780	//         "TRACKING_TEXT",
29781	//         "RICH_MEDIA_DISPLAY_BANNER",
29782	//         "RICH_MEDIA_INPAGE_FLOATING",
29783	//         "RICH_MEDIA_IM_EXPAND",
29784	//         "RICH_MEDIA_DISPLAY_EXPANDING",
29785	//         "RICH_MEDIA_DISPLAY_INTERSTITIAL",
29786	//         "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL",
29787	//         "RICH_MEDIA_MOBILE_IN_APP",
29788	//         "FLASH_INPAGE",
29789	//         "INSTREAM_VIDEO",
29790	//         "VPAID_LINEAR_VIDEO",
29791	//         "VPAID_NON_LINEAR_VIDEO",
29792	//         "INSTREAM_VIDEO_REDIRECT",
29793	//         "RICH_MEDIA_PEEL_DOWN",
29794	//         "HTML5_BANNER",
29795	//         "DISPLAY",
29796	//         "DISPLAY_IMAGE_GALLERY",
29797	//         "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO",
29798	//         "INSTREAM_AUDIO"
29799	//       ],
29800	//       "enumDescriptions": [
29801	//         "",
29802	//         "",
29803	//         "",
29804	//         "",
29805	//         "",
29806	//         "",
29807	//         "",
29808	//         "",
29809	//         "",
29810	//         "",
29811	//         "",
29812	//         "",
29813	//         "",
29814	//         "",
29815	//         "",
29816	//         "",
29817	//         "",
29818	//         "",
29819	//         "",
29820	//         "",
29821	//         "",
29822	//         "",
29823	//         "",
29824	//         "",
29825	//         ""
29826	//       ],
29827	//       "location": "query",
29828	//       "repeated": true,
29829	//       "type": "string"
29830	//     }
29831	//   },
29832	//   "path": "userprofiles/{profileId}/creatives",
29833	//   "response": {
29834	//     "$ref": "CreativesListResponse"
29835	//   },
29836	//   "scopes": [
29837	//     "https://www.googleapis.com/auth/dfatrafficking"
29838	//   ]
29839	// }
29840
29841}
29842
29843// Pages invokes f for each page of results.
29844// A non-nil error returned from f will halt the iteration.
29845// The provided context supersedes any context provided to the Context method.
29846func (c *CreativesListCall) Pages(ctx context.Context, f func(*CreativesListResponse) error) error {
29847	c.ctx_ = ctx
29848	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29849	for {
29850		x, err := c.Do()
29851		if err != nil {
29852			return err
29853		}
29854		if err := f(x); err != nil {
29855			return err
29856		}
29857		if x.NextPageToken == "" {
29858			return nil
29859		}
29860		c.PageToken(x.NextPageToken)
29861	}
29862}
29863
29864// method id "dfareporting.creatives.patch":
29865
29866type CreativesPatchCall struct {
29867	s          *Service
29868	profileId  int64
29869	creative   *Creative
29870	urlParams_ gensupport.URLParams
29871	ctx_       context.Context
29872	header_    http.Header
29873}
29874
29875// Patch: Updates an existing creative. This method supports patch
29876// semantics.
29877//
29878// - id: Creative ID.
29879// - profileId: User profile ID associated with this request.
29880func (r *CreativesService) Patch(profileId int64, id int64, creative *Creative) *CreativesPatchCall {
29881	c := &CreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29882	c.profileId = profileId
29883	c.urlParams_.Set("id", fmt.Sprint(id))
29884	c.creative = creative
29885	return c
29886}
29887
29888// Fields allows partial responses to be retrieved. See
29889// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29890// for more information.
29891func (c *CreativesPatchCall) Fields(s ...googleapi.Field) *CreativesPatchCall {
29892	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29893	return c
29894}
29895
29896// Context sets the context to be used in this call's Do method. Any
29897// pending HTTP request will be aborted if the provided context is
29898// canceled.
29899func (c *CreativesPatchCall) Context(ctx context.Context) *CreativesPatchCall {
29900	c.ctx_ = ctx
29901	return c
29902}
29903
29904// Header returns an http.Header that can be modified by the caller to
29905// add HTTP headers to the request.
29906func (c *CreativesPatchCall) Header() http.Header {
29907	if c.header_ == nil {
29908		c.header_ = make(http.Header)
29909	}
29910	return c.header_
29911}
29912
29913func (c *CreativesPatchCall) doRequest(alt string) (*http.Response, error) {
29914	reqHeaders := make(http.Header)
29915	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
29916	for k, v := range c.header_ {
29917		reqHeaders[k] = v
29918	}
29919	reqHeaders.Set("User-Agent", c.s.userAgent())
29920	var body io.Reader = nil
29921	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
29922	if err != nil {
29923		return nil, err
29924	}
29925	reqHeaders.Set("Content-Type", "application/json")
29926	c.urlParams_.Set("alt", alt)
29927	c.urlParams_.Set("prettyPrint", "false")
29928	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
29929	urls += "?" + c.urlParams_.Encode()
29930	req, err := http.NewRequest("PATCH", urls, body)
29931	if err != nil {
29932		return nil, err
29933	}
29934	req.Header = reqHeaders
29935	googleapi.Expand(req.URL, map[string]string{
29936		"profileId": strconv.FormatInt(c.profileId, 10),
29937	})
29938	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29939}
29940
29941// Do executes the "dfareporting.creatives.patch" call.
29942// Exactly one of *Creative or error will be non-nil. Any non-2xx status
29943// code is an error. Response headers are in either
29944// *Creative.ServerResponse.Header or (if a response was returned at
29945// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29946// to check whether the returned error was because
29947// http.StatusNotModified was returned.
29948func (c *CreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
29949	gensupport.SetOptions(c.urlParams_, opts...)
29950	res, err := c.doRequest("json")
29951	if res != nil && res.StatusCode == http.StatusNotModified {
29952		if res.Body != nil {
29953			res.Body.Close()
29954		}
29955		return nil, &googleapi.Error{
29956			Code:   res.StatusCode,
29957			Header: res.Header,
29958		}
29959	}
29960	if err != nil {
29961		return nil, err
29962	}
29963	defer googleapi.CloseBody(res)
29964	if err := googleapi.CheckResponse(res); err != nil {
29965		return nil, err
29966	}
29967	ret := &Creative{
29968		ServerResponse: googleapi.ServerResponse{
29969			Header:         res.Header,
29970			HTTPStatusCode: res.StatusCode,
29971		},
29972	}
29973	target := &ret
29974	if err := gensupport.DecodeResponse(target, res); err != nil {
29975		return nil, err
29976	}
29977	return ret, nil
29978	// {
29979	//   "description": "Updates an existing creative. This method supports patch semantics.",
29980	//   "flatPath": "userprofiles/{profileId}/creatives",
29981	//   "httpMethod": "PATCH",
29982	//   "id": "dfareporting.creatives.patch",
29983	//   "parameterOrder": [
29984	//     "profileId",
29985	//     "id"
29986	//   ],
29987	//   "parameters": {
29988	//     "id": {
29989	//       "description": "Creative ID.",
29990	//       "format": "int64",
29991	//       "location": "query",
29992	//       "required": true,
29993	//       "type": "string"
29994	//     },
29995	//     "profileId": {
29996	//       "description": "User profile ID associated with this request.",
29997	//       "format": "int64",
29998	//       "location": "path",
29999	//       "required": true,
30000	//       "type": "string"
30001	//     }
30002	//   },
30003	//   "path": "userprofiles/{profileId}/creatives",
30004	//   "request": {
30005	//     "$ref": "Creative"
30006	//   },
30007	//   "response": {
30008	//     "$ref": "Creative"
30009	//   },
30010	//   "scopes": [
30011	//     "https://www.googleapis.com/auth/dfatrafficking"
30012	//   ]
30013	// }
30014
30015}
30016
30017// method id "dfareporting.creatives.update":
30018
30019type CreativesUpdateCall struct {
30020	s          *Service
30021	profileId  int64
30022	creative   *Creative
30023	urlParams_ gensupport.URLParams
30024	ctx_       context.Context
30025	header_    http.Header
30026}
30027
30028// Update: Updates an existing creative.
30029//
30030// - profileId: User profile ID associated with this request.
30031func (r *CreativesService) Update(profileId int64, creative *Creative) *CreativesUpdateCall {
30032	c := &CreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30033	c.profileId = profileId
30034	c.creative = creative
30035	return c
30036}
30037
30038// Fields allows partial responses to be retrieved. See
30039// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30040// for more information.
30041func (c *CreativesUpdateCall) Fields(s ...googleapi.Field) *CreativesUpdateCall {
30042	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30043	return c
30044}
30045
30046// Context sets the context to be used in this call's Do method. Any
30047// pending HTTP request will be aborted if the provided context is
30048// canceled.
30049func (c *CreativesUpdateCall) Context(ctx context.Context) *CreativesUpdateCall {
30050	c.ctx_ = ctx
30051	return c
30052}
30053
30054// Header returns an http.Header that can be modified by the caller to
30055// add HTTP headers to the request.
30056func (c *CreativesUpdateCall) Header() http.Header {
30057	if c.header_ == nil {
30058		c.header_ = make(http.Header)
30059	}
30060	return c.header_
30061}
30062
30063func (c *CreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
30064	reqHeaders := make(http.Header)
30065	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
30066	for k, v := range c.header_ {
30067		reqHeaders[k] = v
30068	}
30069	reqHeaders.Set("User-Agent", c.s.userAgent())
30070	var body io.Reader = nil
30071	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
30072	if err != nil {
30073		return nil, err
30074	}
30075	reqHeaders.Set("Content-Type", "application/json")
30076	c.urlParams_.Set("alt", alt)
30077	c.urlParams_.Set("prettyPrint", "false")
30078	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
30079	urls += "?" + c.urlParams_.Encode()
30080	req, err := http.NewRequest("PUT", urls, body)
30081	if err != nil {
30082		return nil, err
30083	}
30084	req.Header = reqHeaders
30085	googleapi.Expand(req.URL, map[string]string{
30086		"profileId": strconv.FormatInt(c.profileId, 10),
30087	})
30088	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30089}
30090
30091// Do executes the "dfareporting.creatives.update" call.
30092// Exactly one of *Creative or error will be non-nil. Any non-2xx status
30093// code is an error. Response headers are in either
30094// *Creative.ServerResponse.Header or (if a response was returned at
30095// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30096// to check whether the returned error was because
30097// http.StatusNotModified was returned.
30098func (c *CreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
30099	gensupport.SetOptions(c.urlParams_, opts...)
30100	res, err := c.doRequest("json")
30101	if res != nil && res.StatusCode == http.StatusNotModified {
30102		if res.Body != nil {
30103			res.Body.Close()
30104		}
30105		return nil, &googleapi.Error{
30106			Code:   res.StatusCode,
30107			Header: res.Header,
30108		}
30109	}
30110	if err != nil {
30111		return nil, err
30112	}
30113	defer googleapi.CloseBody(res)
30114	if err := googleapi.CheckResponse(res); err != nil {
30115		return nil, err
30116	}
30117	ret := &Creative{
30118		ServerResponse: googleapi.ServerResponse{
30119			Header:         res.Header,
30120			HTTPStatusCode: res.StatusCode,
30121		},
30122	}
30123	target := &ret
30124	if err := gensupport.DecodeResponse(target, res); err != nil {
30125		return nil, err
30126	}
30127	return ret, nil
30128	// {
30129	//   "description": "Updates an existing creative.",
30130	//   "flatPath": "userprofiles/{profileId}/creatives",
30131	//   "httpMethod": "PUT",
30132	//   "id": "dfareporting.creatives.update",
30133	//   "parameterOrder": [
30134	//     "profileId"
30135	//   ],
30136	//   "parameters": {
30137	//     "profileId": {
30138	//       "description": "User profile ID associated with this request.",
30139	//       "format": "int64",
30140	//       "location": "path",
30141	//       "required": true,
30142	//       "type": "string"
30143	//     }
30144	//   },
30145	//   "path": "userprofiles/{profileId}/creatives",
30146	//   "request": {
30147	//     "$ref": "Creative"
30148	//   },
30149	//   "response": {
30150	//     "$ref": "Creative"
30151	//   },
30152	//   "scopes": [
30153	//     "https://www.googleapis.com/auth/dfatrafficking"
30154	//   ]
30155	// }
30156
30157}
30158
30159// method id "dfareporting.customEvents.batchinsert":
30160
30161type CustomEventsBatchinsertCall struct {
30162	s                              *Service
30163	profileId                      int64
30164	customeventsbatchinsertrequest *CustomEventsBatchInsertRequest
30165	urlParams_                     gensupport.URLParams
30166	ctx_                           context.Context
30167	header_                        http.Header
30168}
30169
30170// Batchinsert: Inserts custom events.
30171//
30172// - profileId: User profile ID associated with this request.
30173func (r *CustomEventsService) Batchinsert(profileId int64, customeventsbatchinsertrequest *CustomEventsBatchInsertRequest) *CustomEventsBatchinsertCall {
30174	c := &CustomEventsBatchinsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30175	c.profileId = profileId
30176	c.customeventsbatchinsertrequest = customeventsbatchinsertrequest
30177	return c
30178}
30179
30180// Fields allows partial responses to be retrieved. See
30181// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30182// for more information.
30183func (c *CustomEventsBatchinsertCall) Fields(s ...googleapi.Field) *CustomEventsBatchinsertCall {
30184	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30185	return c
30186}
30187
30188// Context sets the context to be used in this call's Do method. Any
30189// pending HTTP request will be aborted if the provided context is
30190// canceled.
30191func (c *CustomEventsBatchinsertCall) Context(ctx context.Context) *CustomEventsBatchinsertCall {
30192	c.ctx_ = ctx
30193	return c
30194}
30195
30196// Header returns an http.Header that can be modified by the caller to
30197// add HTTP headers to the request.
30198func (c *CustomEventsBatchinsertCall) Header() http.Header {
30199	if c.header_ == nil {
30200		c.header_ = make(http.Header)
30201	}
30202	return c.header_
30203}
30204
30205func (c *CustomEventsBatchinsertCall) doRequest(alt string) (*http.Response, error) {
30206	reqHeaders := make(http.Header)
30207	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
30208	for k, v := range c.header_ {
30209		reqHeaders[k] = v
30210	}
30211	reqHeaders.Set("User-Agent", c.s.userAgent())
30212	var body io.Reader = nil
30213	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customeventsbatchinsertrequest)
30214	if err != nil {
30215		return nil, err
30216	}
30217	reqHeaders.Set("Content-Type", "application/json")
30218	c.urlParams_.Set("alt", alt)
30219	c.urlParams_.Set("prettyPrint", "false")
30220	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/customEvents/batchinsert")
30221	urls += "?" + c.urlParams_.Encode()
30222	req, err := http.NewRequest("POST", urls, body)
30223	if err != nil {
30224		return nil, err
30225	}
30226	req.Header = reqHeaders
30227	googleapi.Expand(req.URL, map[string]string{
30228		"profileId": strconv.FormatInt(c.profileId, 10),
30229	})
30230	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30231}
30232
30233// Do executes the "dfareporting.customEvents.batchinsert" call.
30234// Exactly one of *CustomEventsBatchInsertResponse or error will be
30235// non-nil. Any non-2xx status code is an error. Response headers are in
30236// either *CustomEventsBatchInsertResponse.ServerResponse.Header or (if
30237// a response was returned at all) in error.(*googleapi.Error).Header.
30238// Use googleapi.IsNotModified to check whether the returned error was
30239// because http.StatusNotModified was returned.
30240func (c *CustomEventsBatchinsertCall) Do(opts ...googleapi.CallOption) (*CustomEventsBatchInsertResponse, error) {
30241	gensupport.SetOptions(c.urlParams_, opts...)
30242	res, err := c.doRequest("json")
30243	if res != nil && res.StatusCode == http.StatusNotModified {
30244		if res.Body != nil {
30245			res.Body.Close()
30246		}
30247		return nil, &googleapi.Error{
30248			Code:   res.StatusCode,
30249			Header: res.Header,
30250		}
30251	}
30252	if err != nil {
30253		return nil, err
30254	}
30255	defer googleapi.CloseBody(res)
30256	if err := googleapi.CheckResponse(res); err != nil {
30257		return nil, err
30258	}
30259	ret := &CustomEventsBatchInsertResponse{
30260		ServerResponse: googleapi.ServerResponse{
30261			Header:         res.Header,
30262			HTTPStatusCode: res.StatusCode,
30263		},
30264	}
30265	target := &ret
30266	if err := gensupport.DecodeResponse(target, res); err != nil {
30267		return nil, err
30268	}
30269	return ret, nil
30270	// {
30271	//   "description": "Inserts custom events.",
30272	//   "flatPath": "userprofiles/{profileId}/customEvents/batchinsert",
30273	//   "httpMethod": "POST",
30274	//   "id": "dfareporting.customEvents.batchinsert",
30275	//   "parameterOrder": [
30276	//     "profileId"
30277	//   ],
30278	//   "parameters": {
30279	//     "profileId": {
30280	//       "description": "User profile ID associated with this request.",
30281	//       "format": "int64",
30282	//       "location": "path",
30283	//       "required": true,
30284	//       "type": "string"
30285	//     }
30286	//   },
30287	//   "path": "userprofiles/{profileId}/customEvents/batchinsert",
30288	//   "request": {
30289	//     "$ref": "CustomEventsBatchInsertRequest"
30290	//   },
30291	//   "response": {
30292	//     "$ref": "CustomEventsBatchInsertResponse"
30293	//   },
30294	//   "scopes": [
30295	//     "https://www.googleapis.com/auth/ddmconversions"
30296	//   ]
30297	// }
30298
30299}
30300
30301// method id "dfareporting.dimensionValues.query":
30302
30303type DimensionValuesQueryCall struct {
30304	s                     *Service
30305	profileId             int64
30306	dimensionvaluerequest *DimensionValueRequest
30307	urlParams_            gensupport.URLParams
30308	ctx_                  context.Context
30309	header_               http.Header
30310}
30311
30312// Query: Retrieves list of report dimension values for a list of
30313// filters.
30314//
30315// - profileId: The Campaign Manager 360 user profile ID.
30316func (r *DimensionValuesService) Query(profileId int64, dimensionvaluerequest *DimensionValueRequest) *DimensionValuesQueryCall {
30317	c := &DimensionValuesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30318	c.profileId = profileId
30319	c.dimensionvaluerequest = dimensionvaluerequest
30320	return c
30321}
30322
30323// MaxResults sets the optional parameter "maxResults": Maximum number
30324// of results to return.
30325func (c *DimensionValuesQueryCall) MaxResults(maxResults int64) *DimensionValuesQueryCall {
30326	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
30327	return c
30328}
30329
30330// PageToken sets the optional parameter "pageToken": The value of the
30331// nextToken from the previous result page.
30332func (c *DimensionValuesQueryCall) PageToken(pageToken string) *DimensionValuesQueryCall {
30333	c.urlParams_.Set("pageToken", pageToken)
30334	return c
30335}
30336
30337// Fields allows partial responses to be retrieved. See
30338// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30339// for more information.
30340func (c *DimensionValuesQueryCall) Fields(s ...googleapi.Field) *DimensionValuesQueryCall {
30341	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30342	return c
30343}
30344
30345// Context sets the context to be used in this call's Do method. Any
30346// pending HTTP request will be aborted if the provided context is
30347// canceled.
30348func (c *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
30349	c.ctx_ = ctx
30350	return c
30351}
30352
30353// Header returns an http.Header that can be modified by the caller to
30354// add HTTP headers to the request.
30355func (c *DimensionValuesQueryCall) Header() http.Header {
30356	if c.header_ == nil {
30357		c.header_ = make(http.Header)
30358	}
30359	return c.header_
30360}
30361
30362func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
30363	reqHeaders := make(http.Header)
30364	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
30365	for k, v := range c.header_ {
30366		reqHeaders[k] = v
30367	}
30368	reqHeaders.Set("User-Agent", c.s.userAgent())
30369	var body io.Reader = nil
30370	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
30371	if err != nil {
30372		return nil, err
30373	}
30374	reqHeaders.Set("Content-Type", "application/json")
30375	c.urlParams_.Set("alt", alt)
30376	c.urlParams_.Set("prettyPrint", "false")
30377	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dimensionvalues/query")
30378	urls += "?" + c.urlParams_.Encode()
30379	req, err := http.NewRequest("POST", urls, body)
30380	if err != nil {
30381		return nil, err
30382	}
30383	req.Header = reqHeaders
30384	googleapi.Expand(req.URL, map[string]string{
30385		"profileId": strconv.FormatInt(c.profileId, 10),
30386	})
30387	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30388}
30389
30390// Do executes the "dfareporting.dimensionValues.query" call.
30391// Exactly one of *DimensionValueList or error will be non-nil. Any
30392// non-2xx status code is an error. Response headers are in either
30393// *DimensionValueList.ServerResponse.Header or (if a response was
30394// returned at all) in error.(*googleapi.Error).Header. Use
30395// googleapi.IsNotModified to check whether the returned error was
30396// because http.StatusNotModified was returned.
30397func (c *DimensionValuesQueryCall) Do(opts ...googleapi.CallOption) (*DimensionValueList, error) {
30398	gensupport.SetOptions(c.urlParams_, opts...)
30399	res, err := c.doRequest("json")
30400	if res != nil && res.StatusCode == http.StatusNotModified {
30401		if res.Body != nil {
30402			res.Body.Close()
30403		}
30404		return nil, &googleapi.Error{
30405			Code:   res.StatusCode,
30406			Header: res.Header,
30407		}
30408	}
30409	if err != nil {
30410		return nil, err
30411	}
30412	defer googleapi.CloseBody(res)
30413	if err := googleapi.CheckResponse(res); err != nil {
30414		return nil, err
30415	}
30416	ret := &DimensionValueList{
30417		ServerResponse: googleapi.ServerResponse{
30418			Header:         res.Header,
30419			HTTPStatusCode: res.StatusCode,
30420		},
30421	}
30422	target := &ret
30423	if err := gensupport.DecodeResponse(target, res); err != nil {
30424		return nil, err
30425	}
30426	return ret, nil
30427	// {
30428	//   "description": "Retrieves list of report dimension values for a list of filters.",
30429	//   "flatPath": "userprofiles/{profileId}/dimensionvalues/query",
30430	//   "httpMethod": "POST",
30431	//   "id": "dfareporting.dimensionValues.query",
30432	//   "parameterOrder": [
30433	//     "profileId"
30434	//   ],
30435	//   "parameters": {
30436	//     "maxResults": {
30437	//       "default": "100",
30438	//       "description": "Maximum number of results to return.",
30439	//       "format": "int32",
30440	//       "location": "query",
30441	//       "maximum": "100",
30442	//       "minimum": "0",
30443	//       "type": "integer"
30444	//     },
30445	//     "pageToken": {
30446	//       "description": "The value of the nextToken from the previous result page.",
30447	//       "location": "query",
30448	//       "type": "string"
30449	//     },
30450	//     "profileId": {
30451	//       "description": "The Campaign Manager 360 user profile ID.",
30452	//       "format": "int64",
30453	//       "location": "path",
30454	//       "required": true,
30455	//       "type": "string"
30456	//     }
30457	//   },
30458	//   "path": "userprofiles/{profileId}/dimensionvalues/query",
30459	//   "request": {
30460	//     "$ref": "DimensionValueRequest"
30461	//   },
30462	//   "response": {
30463	//     "$ref": "DimensionValueList"
30464	//   },
30465	//   "scopes": [
30466	//     "https://www.googleapis.com/auth/dfareporting"
30467	//   ]
30468	// }
30469
30470}
30471
30472// Pages invokes f for each page of results.
30473// A non-nil error returned from f will halt the iteration.
30474// The provided context supersedes any context provided to the Context method.
30475func (c *DimensionValuesQueryCall) Pages(ctx context.Context, f func(*DimensionValueList) error) error {
30476	c.ctx_ = ctx
30477	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
30478	for {
30479		x, err := c.Do()
30480		if err != nil {
30481			return err
30482		}
30483		if err := f(x); err != nil {
30484			return err
30485		}
30486		if x.NextPageToken == "" {
30487			return nil
30488		}
30489		c.PageToken(x.NextPageToken)
30490	}
30491}
30492
30493// method id "dfareporting.directorySites.get":
30494
30495type DirectorySitesGetCall struct {
30496	s            *Service
30497	profileId    int64
30498	id           int64
30499	urlParams_   gensupport.URLParams
30500	ifNoneMatch_ string
30501	ctx_         context.Context
30502	header_      http.Header
30503}
30504
30505// Get: Gets one directory site by ID.
30506//
30507// - id: Directory site ID.
30508// - profileId: User profile ID associated with this request.
30509func (r *DirectorySitesService) Get(profileId int64, id int64) *DirectorySitesGetCall {
30510	c := &DirectorySitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30511	c.profileId = profileId
30512	c.id = id
30513	return c
30514}
30515
30516// Fields allows partial responses to be retrieved. See
30517// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30518// for more information.
30519func (c *DirectorySitesGetCall) Fields(s ...googleapi.Field) *DirectorySitesGetCall {
30520	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30521	return c
30522}
30523
30524// IfNoneMatch sets the optional parameter which makes the operation
30525// fail if the object's ETag matches the given value. This is useful for
30526// getting updates only after the object has changed since the last
30527// request. Use googleapi.IsNotModified to check whether the response
30528// error from Do is the result of In-None-Match.
30529func (c *DirectorySitesGetCall) IfNoneMatch(entityTag string) *DirectorySitesGetCall {
30530	c.ifNoneMatch_ = entityTag
30531	return c
30532}
30533
30534// Context sets the context to be used in this call's Do method. Any
30535// pending HTTP request will be aborted if the provided context is
30536// canceled.
30537func (c *DirectorySitesGetCall) Context(ctx context.Context) *DirectorySitesGetCall {
30538	c.ctx_ = ctx
30539	return c
30540}
30541
30542// Header returns an http.Header that can be modified by the caller to
30543// add HTTP headers to the request.
30544func (c *DirectorySitesGetCall) Header() http.Header {
30545	if c.header_ == nil {
30546		c.header_ = make(http.Header)
30547	}
30548	return c.header_
30549}
30550
30551func (c *DirectorySitesGetCall) doRequest(alt string) (*http.Response, error) {
30552	reqHeaders := make(http.Header)
30553	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
30554	for k, v := range c.header_ {
30555		reqHeaders[k] = v
30556	}
30557	reqHeaders.Set("User-Agent", c.s.userAgent())
30558	if c.ifNoneMatch_ != "" {
30559		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30560	}
30561	var body io.Reader = nil
30562	c.urlParams_.Set("alt", alt)
30563	c.urlParams_.Set("prettyPrint", "false")
30564	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites/{id}")
30565	urls += "?" + c.urlParams_.Encode()
30566	req, err := http.NewRequest("GET", urls, body)
30567	if err != nil {
30568		return nil, err
30569	}
30570	req.Header = reqHeaders
30571	googleapi.Expand(req.URL, map[string]string{
30572		"profileId": strconv.FormatInt(c.profileId, 10),
30573		"id":        strconv.FormatInt(c.id, 10),
30574	})
30575	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30576}
30577
30578// Do executes the "dfareporting.directorySites.get" call.
30579// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
30580// status code is an error. Response headers are in either
30581// *DirectorySite.ServerResponse.Header or (if a response was returned
30582// at all) in error.(*googleapi.Error).Header. Use
30583// googleapi.IsNotModified to check whether the returned error was
30584// because http.StatusNotModified was returned.
30585func (c *DirectorySitesGetCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
30586	gensupport.SetOptions(c.urlParams_, opts...)
30587	res, err := c.doRequest("json")
30588	if res != nil && res.StatusCode == http.StatusNotModified {
30589		if res.Body != nil {
30590			res.Body.Close()
30591		}
30592		return nil, &googleapi.Error{
30593			Code:   res.StatusCode,
30594			Header: res.Header,
30595		}
30596	}
30597	if err != nil {
30598		return nil, err
30599	}
30600	defer googleapi.CloseBody(res)
30601	if err := googleapi.CheckResponse(res); err != nil {
30602		return nil, err
30603	}
30604	ret := &DirectorySite{
30605		ServerResponse: googleapi.ServerResponse{
30606			Header:         res.Header,
30607			HTTPStatusCode: res.StatusCode,
30608		},
30609	}
30610	target := &ret
30611	if err := gensupport.DecodeResponse(target, res); err != nil {
30612		return nil, err
30613	}
30614	return ret, nil
30615	// {
30616	//   "description": "Gets one directory site by ID.",
30617	//   "flatPath": "userprofiles/{profileId}/directorySites/{id}",
30618	//   "httpMethod": "GET",
30619	//   "id": "dfareporting.directorySites.get",
30620	//   "parameterOrder": [
30621	//     "profileId",
30622	//     "id"
30623	//   ],
30624	//   "parameters": {
30625	//     "id": {
30626	//       "description": "Directory site ID.",
30627	//       "format": "int64",
30628	//       "location": "path",
30629	//       "required": true,
30630	//       "type": "string"
30631	//     },
30632	//     "profileId": {
30633	//       "description": "User profile ID associated with this request.",
30634	//       "format": "int64",
30635	//       "location": "path",
30636	//       "required": true,
30637	//       "type": "string"
30638	//     }
30639	//   },
30640	//   "path": "userprofiles/{profileId}/directorySites/{id}",
30641	//   "response": {
30642	//     "$ref": "DirectorySite"
30643	//   },
30644	//   "scopes": [
30645	//     "https://www.googleapis.com/auth/dfatrafficking"
30646	//   ]
30647	// }
30648
30649}
30650
30651// method id "dfareporting.directorySites.insert":
30652
30653type DirectorySitesInsertCall struct {
30654	s             *Service
30655	profileId     int64
30656	directorysite *DirectorySite
30657	urlParams_    gensupport.URLParams
30658	ctx_          context.Context
30659	header_       http.Header
30660}
30661
30662// Insert: Inserts a new directory site.
30663//
30664// - profileId: User profile ID associated with this request.
30665func (r *DirectorySitesService) Insert(profileId int64, directorysite *DirectorySite) *DirectorySitesInsertCall {
30666	c := &DirectorySitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30667	c.profileId = profileId
30668	c.directorysite = directorysite
30669	return c
30670}
30671
30672// Fields allows partial responses to be retrieved. See
30673// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30674// for more information.
30675func (c *DirectorySitesInsertCall) Fields(s ...googleapi.Field) *DirectorySitesInsertCall {
30676	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30677	return c
30678}
30679
30680// Context sets the context to be used in this call's Do method. Any
30681// pending HTTP request will be aborted if the provided context is
30682// canceled.
30683func (c *DirectorySitesInsertCall) Context(ctx context.Context) *DirectorySitesInsertCall {
30684	c.ctx_ = ctx
30685	return c
30686}
30687
30688// Header returns an http.Header that can be modified by the caller to
30689// add HTTP headers to the request.
30690func (c *DirectorySitesInsertCall) Header() http.Header {
30691	if c.header_ == nil {
30692		c.header_ = make(http.Header)
30693	}
30694	return c.header_
30695}
30696
30697func (c *DirectorySitesInsertCall) doRequest(alt string) (*http.Response, error) {
30698	reqHeaders := make(http.Header)
30699	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
30700	for k, v := range c.header_ {
30701		reqHeaders[k] = v
30702	}
30703	reqHeaders.Set("User-Agent", c.s.userAgent())
30704	var body io.Reader = nil
30705	body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorysite)
30706	if err != nil {
30707		return nil, err
30708	}
30709	reqHeaders.Set("Content-Type", "application/json")
30710	c.urlParams_.Set("alt", alt)
30711	c.urlParams_.Set("prettyPrint", "false")
30712	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
30713	urls += "?" + c.urlParams_.Encode()
30714	req, err := http.NewRequest("POST", urls, body)
30715	if err != nil {
30716		return nil, err
30717	}
30718	req.Header = reqHeaders
30719	googleapi.Expand(req.URL, map[string]string{
30720		"profileId": strconv.FormatInt(c.profileId, 10),
30721	})
30722	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30723}
30724
30725// Do executes the "dfareporting.directorySites.insert" call.
30726// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
30727// status code is an error. Response headers are in either
30728// *DirectorySite.ServerResponse.Header or (if a response was returned
30729// at all) in error.(*googleapi.Error).Header. Use
30730// googleapi.IsNotModified to check whether the returned error was
30731// because http.StatusNotModified was returned.
30732func (c *DirectorySitesInsertCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
30733	gensupport.SetOptions(c.urlParams_, opts...)
30734	res, err := c.doRequest("json")
30735	if res != nil && res.StatusCode == http.StatusNotModified {
30736		if res.Body != nil {
30737			res.Body.Close()
30738		}
30739		return nil, &googleapi.Error{
30740			Code:   res.StatusCode,
30741			Header: res.Header,
30742		}
30743	}
30744	if err != nil {
30745		return nil, err
30746	}
30747	defer googleapi.CloseBody(res)
30748	if err := googleapi.CheckResponse(res); err != nil {
30749		return nil, err
30750	}
30751	ret := &DirectorySite{
30752		ServerResponse: googleapi.ServerResponse{
30753			Header:         res.Header,
30754			HTTPStatusCode: res.StatusCode,
30755		},
30756	}
30757	target := &ret
30758	if err := gensupport.DecodeResponse(target, res); err != nil {
30759		return nil, err
30760	}
30761	return ret, nil
30762	// {
30763	//   "description": "Inserts a new directory site.",
30764	//   "flatPath": "userprofiles/{profileId}/directorySites",
30765	//   "httpMethod": "POST",
30766	//   "id": "dfareporting.directorySites.insert",
30767	//   "parameterOrder": [
30768	//     "profileId"
30769	//   ],
30770	//   "parameters": {
30771	//     "profileId": {
30772	//       "description": "User profile ID associated with this request.",
30773	//       "format": "int64",
30774	//       "location": "path",
30775	//       "required": true,
30776	//       "type": "string"
30777	//     }
30778	//   },
30779	//   "path": "userprofiles/{profileId}/directorySites",
30780	//   "request": {
30781	//     "$ref": "DirectorySite"
30782	//   },
30783	//   "response": {
30784	//     "$ref": "DirectorySite"
30785	//   },
30786	//   "scopes": [
30787	//     "https://www.googleapis.com/auth/dfatrafficking"
30788	//   ]
30789	// }
30790
30791}
30792
30793// method id "dfareporting.directorySites.list":
30794
30795type DirectorySitesListCall struct {
30796	s            *Service
30797	profileId    int64
30798	urlParams_   gensupport.URLParams
30799	ifNoneMatch_ string
30800	ctx_         context.Context
30801	header_      http.Header
30802}
30803
30804// List: Retrieves a list of directory sites, possibly filtered. This
30805// method supports paging.
30806//
30807// - profileId: User profile ID associated with this request.
30808func (r *DirectorySitesService) List(profileId int64) *DirectorySitesListCall {
30809	c := &DirectorySitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30810	c.profileId = profileId
30811	return c
30812}
30813
30814// AcceptsInStreamVideoPlacements sets the optional parameter
30815// "acceptsInStreamVideoPlacements": This search filter is no longer
30816// supported and will have no effect on the results returned.
30817func (c *DirectorySitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *DirectorySitesListCall {
30818	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
30819	return c
30820}
30821
30822// AcceptsInterstitialPlacements sets the optional parameter
30823// "acceptsInterstitialPlacements": This search filter is no longer
30824// supported and will have no effect on the results returned.
30825func (c *DirectorySitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *DirectorySitesListCall {
30826	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
30827	return c
30828}
30829
30830// AcceptsPublisherPaidPlacements sets the optional parameter
30831// "acceptsPublisherPaidPlacements": Select only directory sites that
30832// accept publisher paid placements. This field can be left blank.
30833func (c *DirectorySitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *DirectorySitesListCall {
30834	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
30835	return c
30836}
30837
30838// Active sets the optional parameter "active": Select only active
30839// directory sites. Leave blank to retrieve both active and inactive
30840// directory sites.
30841func (c *DirectorySitesListCall) Active(active bool) *DirectorySitesListCall {
30842	c.urlParams_.Set("active", fmt.Sprint(active))
30843	return c
30844}
30845
30846// DfpNetworkCode sets the optional parameter "dfpNetworkCode": Select
30847// only directory sites with this Ad Manager network code.
30848func (c *DirectorySitesListCall) DfpNetworkCode(dfpNetworkCode string) *DirectorySitesListCall {
30849	c.urlParams_.Set("dfpNetworkCode", dfpNetworkCode)
30850	return c
30851}
30852
30853// Ids sets the optional parameter "ids": Select only directory sites
30854// with these IDs.
30855func (c *DirectorySitesListCall) Ids(ids ...int64) *DirectorySitesListCall {
30856	var ids_ []string
30857	for _, v := range ids {
30858		ids_ = append(ids_, fmt.Sprint(v))
30859	}
30860	c.urlParams_.SetMulti("ids", ids_)
30861	return c
30862}
30863
30864// MaxResults sets the optional parameter "maxResults": Maximum number
30865// of results to return.
30866func (c *DirectorySitesListCall) MaxResults(maxResults int64) *DirectorySitesListCall {
30867	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
30868	return c
30869}
30870
30871// PageToken sets the optional parameter "pageToken": Value of the
30872// nextPageToken from the previous result page.
30873func (c *DirectorySitesListCall) PageToken(pageToken string) *DirectorySitesListCall {
30874	c.urlParams_.Set("pageToken", pageToken)
30875	return c
30876}
30877
30878// SearchString sets the optional parameter "searchString": Allows
30879// searching for objects by name, ID or URL. Wildcards (*) are allowed.
30880// For example, "directory site*2015" will return objects with names
30881// like "directory site June 2015", "directory site April 2015", or
30882// simply "directory site 2015". Most of the searches also add wildcards
30883// implicitly at the start and the end of the search string. For
30884// example, a search string of "directory site" will match objects with
30885// name "my directory site", "directory site 2015" or simply, "directory
30886// site".
30887func (c *DirectorySitesListCall) SearchString(searchString string) *DirectorySitesListCall {
30888	c.urlParams_.Set("searchString", searchString)
30889	return c
30890}
30891
30892// SortField sets the optional parameter "sortField": Field by which to
30893// sort the list.
30894//
30895// Possible values:
30896//   "ID" (default)
30897//   "NAME"
30898func (c *DirectorySitesListCall) SortField(sortField string) *DirectorySitesListCall {
30899	c.urlParams_.Set("sortField", sortField)
30900	return c
30901}
30902
30903// SortOrder sets the optional parameter "sortOrder": Order of sorted
30904// results.
30905//
30906// Possible values:
30907//   "ASCENDING" (default)
30908//   "DESCENDING"
30909func (c *DirectorySitesListCall) SortOrder(sortOrder string) *DirectorySitesListCall {
30910	c.urlParams_.Set("sortOrder", sortOrder)
30911	return c
30912}
30913
30914// Fields allows partial responses to be retrieved. See
30915// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30916// for more information.
30917func (c *DirectorySitesListCall) Fields(s ...googleapi.Field) *DirectorySitesListCall {
30918	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30919	return c
30920}
30921
30922// IfNoneMatch sets the optional parameter which makes the operation
30923// fail if the object's ETag matches the given value. This is useful for
30924// getting updates only after the object has changed since the last
30925// request. Use googleapi.IsNotModified to check whether the response
30926// error from Do is the result of In-None-Match.
30927func (c *DirectorySitesListCall) IfNoneMatch(entityTag string) *DirectorySitesListCall {
30928	c.ifNoneMatch_ = entityTag
30929	return c
30930}
30931
30932// Context sets the context to be used in this call's Do method. Any
30933// pending HTTP request will be aborted if the provided context is
30934// canceled.
30935func (c *DirectorySitesListCall) Context(ctx context.Context) *DirectorySitesListCall {
30936	c.ctx_ = ctx
30937	return c
30938}
30939
30940// Header returns an http.Header that can be modified by the caller to
30941// add HTTP headers to the request.
30942func (c *DirectorySitesListCall) Header() http.Header {
30943	if c.header_ == nil {
30944		c.header_ = make(http.Header)
30945	}
30946	return c.header_
30947}
30948
30949func (c *DirectorySitesListCall) doRequest(alt string) (*http.Response, error) {
30950	reqHeaders := make(http.Header)
30951	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
30952	for k, v := range c.header_ {
30953		reqHeaders[k] = v
30954	}
30955	reqHeaders.Set("User-Agent", c.s.userAgent())
30956	if c.ifNoneMatch_ != "" {
30957		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30958	}
30959	var body io.Reader = nil
30960	c.urlParams_.Set("alt", alt)
30961	c.urlParams_.Set("prettyPrint", "false")
30962	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
30963	urls += "?" + c.urlParams_.Encode()
30964	req, err := http.NewRequest("GET", urls, body)
30965	if err != nil {
30966		return nil, err
30967	}
30968	req.Header = reqHeaders
30969	googleapi.Expand(req.URL, map[string]string{
30970		"profileId": strconv.FormatInt(c.profileId, 10),
30971	})
30972	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30973}
30974
30975// Do executes the "dfareporting.directorySites.list" call.
30976// Exactly one of *DirectorySitesListResponse or error will be non-nil.
30977// Any non-2xx status code is an error. Response headers are in either
30978// *DirectorySitesListResponse.ServerResponse.Header or (if a response
30979// was returned at all) in error.(*googleapi.Error).Header. Use
30980// googleapi.IsNotModified to check whether the returned error was
30981// because http.StatusNotModified was returned.
30982func (c *DirectorySitesListCall) Do(opts ...googleapi.CallOption) (*DirectorySitesListResponse, error) {
30983	gensupport.SetOptions(c.urlParams_, opts...)
30984	res, err := c.doRequest("json")
30985	if res != nil && res.StatusCode == http.StatusNotModified {
30986		if res.Body != nil {
30987			res.Body.Close()
30988		}
30989		return nil, &googleapi.Error{
30990			Code:   res.StatusCode,
30991			Header: res.Header,
30992		}
30993	}
30994	if err != nil {
30995		return nil, err
30996	}
30997	defer googleapi.CloseBody(res)
30998	if err := googleapi.CheckResponse(res); err != nil {
30999		return nil, err
31000	}
31001	ret := &DirectorySitesListResponse{
31002		ServerResponse: googleapi.ServerResponse{
31003			Header:         res.Header,
31004			HTTPStatusCode: res.StatusCode,
31005		},
31006	}
31007	target := &ret
31008	if err := gensupport.DecodeResponse(target, res); err != nil {
31009		return nil, err
31010	}
31011	return ret, nil
31012	// {
31013	//   "description": "Retrieves a list of directory sites, possibly filtered. This method supports paging.",
31014	//   "flatPath": "userprofiles/{profileId}/directorySites",
31015	//   "httpMethod": "GET",
31016	//   "id": "dfareporting.directorySites.list",
31017	//   "parameterOrder": [
31018	//     "profileId"
31019	//   ],
31020	//   "parameters": {
31021	//     "acceptsInStreamVideoPlacements": {
31022	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
31023	//       "location": "query",
31024	//       "type": "boolean"
31025	//     },
31026	//     "acceptsInterstitialPlacements": {
31027	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
31028	//       "location": "query",
31029	//       "type": "boolean"
31030	//     },
31031	//     "acceptsPublisherPaidPlacements": {
31032	//       "description": "Select only directory sites that accept publisher paid placements. This field can be left blank.",
31033	//       "location": "query",
31034	//       "type": "boolean"
31035	//     },
31036	//     "active": {
31037	//       "description": "Select only active directory sites. Leave blank to retrieve both active and inactive directory sites.",
31038	//       "location": "query",
31039	//       "type": "boolean"
31040	//     },
31041	//     "dfpNetworkCode": {
31042	//       "description": "Select only directory sites with this Ad Manager network code.",
31043	//       "location": "query",
31044	//       "type": "string"
31045	//     },
31046	//     "ids": {
31047	//       "description": "Select only directory sites with these IDs.",
31048	//       "format": "int64",
31049	//       "location": "query",
31050	//       "repeated": true,
31051	//       "type": "string"
31052	//     },
31053	//     "maxResults": {
31054	//       "default": "1000",
31055	//       "description": "Maximum number of results to return.",
31056	//       "format": "int32",
31057	//       "location": "query",
31058	//       "maximum": "1000",
31059	//       "minimum": "0",
31060	//       "type": "integer"
31061	//     },
31062	//     "pageToken": {
31063	//       "description": "Value of the nextPageToken from the previous result page.",
31064	//       "location": "query",
31065	//       "type": "string"
31066	//     },
31067	//     "profileId": {
31068	//       "description": "User profile ID associated with this request.",
31069	//       "format": "int64",
31070	//       "location": "path",
31071	//       "required": true,
31072	//       "type": "string"
31073	//     },
31074	//     "searchString": {
31075	//       "description": "Allows searching for objects by name, ID or URL. Wildcards (*) are allowed. For example, \"directory site*2015\" will return objects with names like \"directory site June 2015\", \"directory site April 2015\", or simply \"directory site 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"directory site\" will match objects with name \"my directory site\", \"directory site 2015\" or simply, \"directory site\".",
31076	//       "location": "query",
31077	//       "type": "string"
31078	//     },
31079	//     "sortField": {
31080	//       "default": "ID",
31081	//       "description": "Field by which to sort the list.",
31082	//       "enum": [
31083	//         "ID",
31084	//         "NAME"
31085	//       ],
31086	//       "enumDescriptions": [
31087	//         "",
31088	//         ""
31089	//       ],
31090	//       "location": "query",
31091	//       "type": "string"
31092	//     },
31093	//     "sortOrder": {
31094	//       "default": "ASCENDING",
31095	//       "description": "Order of sorted results.",
31096	//       "enum": [
31097	//         "ASCENDING",
31098	//         "DESCENDING"
31099	//       ],
31100	//       "enumDescriptions": [
31101	//         "",
31102	//         ""
31103	//       ],
31104	//       "location": "query",
31105	//       "type": "string"
31106	//     }
31107	//   },
31108	//   "path": "userprofiles/{profileId}/directorySites",
31109	//   "response": {
31110	//     "$ref": "DirectorySitesListResponse"
31111	//   },
31112	//   "scopes": [
31113	//     "https://www.googleapis.com/auth/dfatrafficking"
31114	//   ]
31115	// }
31116
31117}
31118
31119// Pages invokes f for each page of results.
31120// A non-nil error returned from f will halt the iteration.
31121// The provided context supersedes any context provided to the Context method.
31122func (c *DirectorySitesListCall) Pages(ctx context.Context, f func(*DirectorySitesListResponse) error) error {
31123	c.ctx_ = ctx
31124	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
31125	for {
31126		x, err := c.Do()
31127		if err != nil {
31128			return err
31129		}
31130		if err := f(x); err != nil {
31131			return err
31132		}
31133		if x.NextPageToken == "" {
31134			return nil
31135		}
31136		c.PageToken(x.NextPageToken)
31137	}
31138}
31139
31140// method id "dfareporting.dynamicTargetingKeys.delete":
31141
31142type DynamicTargetingKeysDeleteCall struct {
31143	s          *Service
31144	profileId  int64
31145	objectId   int64
31146	urlParams_ gensupport.URLParams
31147	ctx_       context.Context
31148	header_    http.Header
31149}
31150
31151// Delete: Deletes an existing dynamic targeting key.
31152//
31153// - name: Name of this dynamic targeting key. This is a required field.
31154//   Must be less than 256 characters long and cannot contain commas.
31155//   All characters are converted to lowercase.
31156// - objectId: ID of the object of this dynamic targeting key. This is a
31157//   required field.
31158// - objectType: Type of the object of this dynamic targeting key. This
31159//   is a required field.
31160// - profileId: User profile ID associated with this request.
31161func (r *DynamicTargetingKeysService) Delete(profileId int64, objectId int64, name string, objectType string) *DynamicTargetingKeysDeleteCall {
31162	c := &DynamicTargetingKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31163	c.profileId = profileId
31164	c.objectId = objectId
31165	c.urlParams_.Set("name", name)
31166	c.urlParams_.Set("objectType", objectType)
31167	return c
31168}
31169
31170// Fields allows partial responses to be retrieved. See
31171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31172// for more information.
31173func (c *DynamicTargetingKeysDeleteCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysDeleteCall {
31174	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31175	return c
31176}
31177
31178// Context sets the context to be used in this call's Do method. Any
31179// pending HTTP request will be aborted if the provided context is
31180// canceled.
31181func (c *DynamicTargetingKeysDeleteCall) Context(ctx context.Context) *DynamicTargetingKeysDeleteCall {
31182	c.ctx_ = ctx
31183	return c
31184}
31185
31186// Header returns an http.Header that can be modified by the caller to
31187// add HTTP headers to the request.
31188func (c *DynamicTargetingKeysDeleteCall) Header() http.Header {
31189	if c.header_ == nil {
31190		c.header_ = make(http.Header)
31191	}
31192	return c.header_
31193}
31194
31195func (c *DynamicTargetingKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
31196	reqHeaders := make(http.Header)
31197	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
31198	for k, v := range c.header_ {
31199		reqHeaders[k] = v
31200	}
31201	reqHeaders.Set("User-Agent", c.s.userAgent())
31202	var body io.Reader = nil
31203	c.urlParams_.Set("alt", alt)
31204	c.urlParams_.Set("prettyPrint", "false")
31205	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}")
31206	urls += "?" + c.urlParams_.Encode()
31207	req, err := http.NewRequest("DELETE", urls, body)
31208	if err != nil {
31209		return nil, err
31210	}
31211	req.Header = reqHeaders
31212	googleapi.Expand(req.URL, map[string]string{
31213		"profileId": strconv.FormatInt(c.profileId, 10),
31214		"objectId":  strconv.FormatInt(c.objectId, 10),
31215	})
31216	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31217}
31218
31219// Do executes the "dfareporting.dynamicTargetingKeys.delete" call.
31220func (c *DynamicTargetingKeysDeleteCall) Do(opts ...googleapi.CallOption) error {
31221	gensupport.SetOptions(c.urlParams_, opts...)
31222	res, err := c.doRequest("json")
31223	if err != nil {
31224		return err
31225	}
31226	defer googleapi.CloseBody(res)
31227	if err := googleapi.CheckResponse(res); err != nil {
31228		return err
31229	}
31230	return nil
31231	// {
31232	//   "description": "Deletes an existing dynamic targeting key.",
31233	//   "flatPath": "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}",
31234	//   "httpMethod": "DELETE",
31235	//   "id": "dfareporting.dynamicTargetingKeys.delete",
31236	//   "parameterOrder": [
31237	//     "profileId",
31238	//     "objectId",
31239	//     "name",
31240	//     "objectType"
31241	//   ],
31242	//   "parameters": {
31243	//     "name": {
31244	//       "description": "Name of this dynamic targeting key. This is a required field. Must be less than 256 characters long and cannot contain commas. All characters are converted to lowercase.",
31245	//       "location": "query",
31246	//       "required": true,
31247	//       "type": "string"
31248	//     },
31249	//     "objectId": {
31250	//       "description": "ID of the object of this dynamic targeting key. This is a required field.",
31251	//       "format": "int64",
31252	//       "location": "path",
31253	//       "required": true,
31254	//       "type": "string"
31255	//     },
31256	//     "objectType": {
31257	//       "description": "Type of the object of this dynamic targeting key. This is a required field.",
31258	//       "enum": [
31259	//         "OBJECT_ADVERTISER",
31260	//         "OBJECT_AD",
31261	//         "OBJECT_CREATIVE",
31262	//         "OBJECT_PLACEMENT"
31263	//       ],
31264	//       "enumDescriptions": [
31265	//         "",
31266	//         "",
31267	//         "",
31268	//         ""
31269	//       ],
31270	//       "location": "query",
31271	//       "required": true,
31272	//       "type": "string"
31273	//     },
31274	//     "profileId": {
31275	//       "description": "User profile ID associated with this request.",
31276	//       "format": "int64",
31277	//       "location": "path",
31278	//       "required": true,
31279	//       "type": "string"
31280	//     }
31281	//   },
31282	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}",
31283	//   "scopes": [
31284	//     "https://www.googleapis.com/auth/dfatrafficking"
31285	//   ]
31286	// }
31287
31288}
31289
31290// method id "dfareporting.dynamicTargetingKeys.insert":
31291
31292type DynamicTargetingKeysInsertCall struct {
31293	s                   *Service
31294	profileId           int64
31295	dynamictargetingkey *DynamicTargetingKey
31296	urlParams_          gensupport.URLParams
31297	ctx_                context.Context
31298	header_             http.Header
31299}
31300
31301// Insert: Inserts a new dynamic targeting key. Keys must be created at
31302// the advertiser level before being assigned to the advertiser's ads,
31303// creatives, or placements. There is a maximum of 1000 keys per
31304// advertiser, out of which a maximum of 20 keys can be assigned per ad,
31305// creative, or placement.
31306//
31307// - profileId: User profile ID associated with this request.
31308func (r *DynamicTargetingKeysService) Insert(profileId int64, dynamictargetingkey *DynamicTargetingKey) *DynamicTargetingKeysInsertCall {
31309	c := &DynamicTargetingKeysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31310	c.profileId = profileId
31311	c.dynamictargetingkey = dynamictargetingkey
31312	return c
31313}
31314
31315// Fields allows partial responses to be retrieved. See
31316// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31317// for more information.
31318func (c *DynamicTargetingKeysInsertCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysInsertCall {
31319	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31320	return c
31321}
31322
31323// Context sets the context to be used in this call's Do method. Any
31324// pending HTTP request will be aborted if the provided context is
31325// canceled.
31326func (c *DynamicTargetingKeysInsertCall) Context(ctx context.Context) *DynamicTargetingKeysInsertCall {
31327	c.ctx_ = ctx
31328	return c
31329}
31330
31331// Header returns an http.Header that can be modified by the caller to
31332// add HTTP headers to the request.
31333func (c *DynamicTargetingKeysInsertCall) Header() http.Header {
31334	if c.header_ == nil {
31335		c.header_ = make(http.Header)
31336	}
31337	return c.header_
31338}
31339
31340func (c *DynamicTargetingKeysInsertCall) doRequest(alt string) (*http.Response, error) {
31341	reqHeaders := make(http.Header)
31342	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
31343	for k, v := range c.header_ {
31344		reqHeaders[k] = v
31345	}
31346	reqHeaders.Set("User-Agent", c.s.userAgent())
31347	var body io.Reader = nil
31348	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dynamictargetingkey)
31349	if err != nil {
31350		return nil, err
31351	}
31352	reqHeaders.Set("Content-Type", "application/json")
31353	c.urlParams_.Set("alt", alt)
31354	c.urlParams_.Set("prettyPrint", "false")
31355	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
31356	urls += "?" + c.urlParams_.Encode()
31357	req, err := http.NewRequest("POST", urls, body)
31358	if err != nil {
31359		return nil, err
31360	}
31361	req.Header = reqHeaders
31362	googleapi.Expand(req.URL, map[string]string{
31363		"profileId": strconv.FormatInt(c.profileId, 10),
31364	})
31365	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31366}
31367
31368// Do executes the "dfareporting.dynamicTargetingKeys.insert" call.
31369// Exactly one of *DynamicTargetingKey or error will be non-nil. Any
31370// non-2xx status code is an error. Response headers are in either
31371// *DynamicTargetingKey.ServerResponse.Header or (if a response was
31372// returned at all) in error.(*googleapi.Error).Header. Use
31373// googleapi.IsNotModified to check whether the returned error was
31374// because http.StatusNotModified was returned.
31375func (c *DynamicTargetingKeysInsertCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKey, error) {
31376	gensupport.SetOptions(c.urlParams_, opts...)
31377	res, err := c.doRequest("json")
31378	if res != nil && res.StatusCode == http.StatusNotModified {
31379		if res.Body != nil {
31380			res.Body.Close()
31381		}
31382		return nil, &googleapi.Error{
31383			Code:   res.StatusCode,
31384			Header: res.Header,
31385		}
31386	}
31387	if err != nil {
31388		return nil, err
31389	}
31390	defer googleapi.CloseBody(res)
31391	if err := googleapi.CheckResponse(res); err != nil {
31392		return nil, err
31393	}
31394	ret := &DynamicTargetingKey{
31395		ServerResponse: googleapi.ServerResponse{
31396			Header:         res.Header,
31397			HTTPStatusCode: res.StatusCode,
31398		},
31399	}
31400	target := &ret
31401	if err := gensupport.DecodeResponse(target, res); err != nil {
31402		return nil, err
31403	}
31404	return ret, nil
31405	// {
31406	//   "description": "Inserts a new dynamic targeting key. Keys must be created at the advertiser level before being assigned to the advertiser's ads, creatives, or placements. There is a maximum of 1000 keys per advertiser, out of which a maximum of 20 keys can be assigned per ad, creative, or placement.",
31407	//   "flatPath": "userprofiles/{profileId}/dynamicTargetingKeys",
31408	//   "httpMethod": "POST",
31409	//   "id": "dfareporting.dynamicTargetingKeys.insert",
31410	//   "parameterOrder": [
31411	//     "profileId"
31412	//   ],
31413	//   "parameters": {
31414	//     "profileId": {
31415	//       "description": "User profile ID associated with this request.",
31416	//       "format": "int64",
31417	//       "location": "path",
31418	//       "required": true,
31419	//       "type": "string"
31420	//     }
31421	//   },
31422	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
31423	//   "request": {
31424	//     "$ref": "DynamicTargetingKey"
31425	//   },
31426	//   "response": {
31427	//     "$ref": "DynamicTargetingKey"
31428	//   },
31429	//   "scopes": [
31430	//     "https://www.googleapis.com/auth/dfatrafficking"
31431	//   ]
31432	// }
31433
31434}
31435
31436// method id "dfareporting.dynamicTargetingKeys.list":
31437
31438type DynamicTargetingKeysListCall struct {
31439	s            *Service
31440	profileId    int64
31441	urlParams_   gensupport.URLParams
31442	ifNoneMatch_ string
31443	ctx_         context.Context
31444	header_      http.Header
31445}
31446
31447// List: Retrieves a list of dynamic targeting keys.
31448//
31449// - profileId: User profile ID associated with this request.
31450func (r *DynamicTargetingKeysService) List(profileId int64) *DynamicTargetingKeysListCall {
31451	c := &DynamicTargetingKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31452	c.profileId = profileId
31453	return c
31454}
31455
31456// AdvertiserId sets the optional parameter "advertiserId": Select only
31457// dynamic targeting keys whose object has this advertiser ID.
31458func (c *DynamicTargetingKeysListCall) AdvertiserId(advertiserId int64) *DynamicTargetingKeysListCall {
31459	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31460	return c
31461}
31462
31463// Names sets the optional parameter "names": Select only dynamic
31464// targeting keys exactly matching these names.
31465func (c *DynamicTargetingKeysListCall) Names(names ...string) *DynamicTargetingKeysListCall {
31466	c.urlParams_.SetMulti("names", append([]string{}, names...))
31467	return c
31468}
31469
31470// ObjectId sets the optional parameter "objectId": Select only dynamic
31471// targeting keys with this object ID.
31472func (c *DynamicTargetingKeysListCall) ObjectId(objectId int64) *DynamicTargetingKeysListCall {
31473	c.urlParams_.Set("objectId", fmt.Sprint(objectId))
31474	return c
31475}
31476
31477// ObjectType sets the optional parameter "objectType": Select only
31478// dynamic targeting keys with this object type.
31479//
31480// Possible values:
31481//   "OBJECT_ADVERTISER"
31482//   "OBJECT_AD"
31483//   "OBJECT_CREATIVE"
31484//   "OBJECT_PLACEMENT"
31485func (c *DynamicTargetingKeysListCall) ObjectType(objectType string) *DynamicTargetingKeysListCall {
31486	c.urlParams_.Set("objectType", objectType)
31487	return c
31488}
31489
31490// Fields allows partial responses to be retrieved. See
31491// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31492// for more information.
31493func (c *DynamicTargetingKeysListCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysListCall {
31494	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31495	return c
31496}
31497
31498// IfNoneMatch sets the optional parameter which makes the operation
31499// fail if the object's ETag matches the given value. This is useful for
31500// getting updates only after the object has changed since the last
31501// request. Use googleapi.IsNotModified to check whether the response
31502// error from Do is the result of In-None-Match.
31503func (c *DynamicTargetingKeysListCall) IfNoneMatch(entityTag string) *DynamicTargetingKeysListCall {
31504	c.ifNoneMatch_ = entityTag
31505	return c
31506}
31507
31508// Context sets the context to be used in this call's Do method. Any
31509// pending HTTP request will be aborted if the provided context is
31510// canceled.
31511func (c *DynamicTargetingKeysListCall) Context(ctx context.Context) *DynamicTargetingKeysListCall {
31512	c.ctx_ = ctx
31513	return c
31514}
31515
31516// Header returns an http.Header that can be modified by the caller to
31517// add HTTP headers to the request.
31518func (c *DynamicTargetingKeysListCall) Header() http.Header {
31519	if c.header_ == nil {
31520		c.header_ = make(http.Header)
31521	}
31522	return c.header_
31523}
31524
31525func (c *DynamicTargetingKeysListCall) doRequest(alt string) (*http.Response, error) {
31526	reqHeaders := make(http.Header)
31527	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
31528	for k, v := range c.header_ {
31529		reqHeaders[k] = v
31530	}
31531	reqHeaders.Set("User-Agent", c.s.userAgent())
31532	if c.ifNoneMatch_ != "" {
31533		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31534	}
31535	var body io.Reader = nil
31536	c.urlParams_.Set("alt", alt)
31537	c.urlParams_.Set("prettyPrint", "false")
31538	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
31539	urls += "?" + c.urlParams_.Encode()
31540	req, err := http.NewRequest("GET", urls, body)
31541	if err != nil {
31542		return nil, err
31543	}
31544	req.Header = reqHeaders
31545	googleapi.Expand(req.URL, map[string]string{
31546		"profileId": strconv.FormatInt(c.profileId, 10),
31547	})
31548	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31549}
31550
31551// Do executes the "dfareporting.dynamicTargetingKeys.list" call.
31552// Exactly one of *DynamicTargetingKeysListResponse or error will be
31553// non-nil. Any non-2xx status code is an error. Response headers are in
31554// either *DynamicTargetingKeysListResponse.ServerResponse.Header or (if
31555// a response was returned at all) in error.(*googleapi.Error).Header.
31556// Use googleapi.IsNotModified to check whether the returned error was
31557// because http.StatusNotModified was returned.
31558func (c *DynamicTargetingKeysListCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKeysListResponse, error) {
31559	gensupport.SetOptions(c.urlParams_, opts...)
31560	res, err := c.doRequest("json")
31561	if res != nil && res.StatusCode == http.StatusNotModified {
31562		if res.Body != nil {
31563			res.Body.Close()
31564		}
31565		return nil, &googleapi.Error{
31566			Code:   res.StatusCode,
31567			Header: res.Header,
31568		}
31569	}
31570	if err != nil {
31571		return nil, err
31572	}
31573	defer googleapi.CloseBody(res)
31574	if err := googleapi.CheckResponse(res); err != nil {
31575		return nil, err
31576	}
31577	ret := &DynamicTargetingKeysListResponse{
31578		ServerResponse: googleapi.ServerResponse{
31579			Header:         res.Header,
31580			HTTPStatusCode: res.StatusCode,
31581		},
31582	}
31583	target := &ret
31584	if err := gensupport.DecodeResponse(target, res); err != nil {
31585		return nil, err
31586	}
31587	return ret, nil
31588	// {
31589	//   "description": "Retrieves a list of dynamic targeting keys.",
31590	//   "flatPath": "userprofiles/{profileId}/dynamicTargetingKeys",
31591	//   "httpMethod": "GET",
31592	//   "id": "dfareporting.dynamicTargetingKeys.list",
31593	//   "parameterOrder": [
31594	//     "profileId"
31595	//   ],
31596	//   "parameters": {
31597	//     "advertiserId": {
31598	//       "description": "Select only dynamic targeting keys whose object has this advertiser ID.",
31599	//       "format": "int64",
31600	//       "location": "query",
31601	//       "type": "string"
31602	//     },
31603	//     "names": {
31604	//       "description": "Select only dynamic targeting keys exactly matching these names.",
31605	//       "location": "query",
31606	//       "repeated": true,
31607	//       "type": "string"
31608	//     },
31609	//     "objectId": {
31610	//       "description": "Select only dynamic targeting keys with this object ID.",
31611	//       "format": "int64",
31612	//       "location": "query",
31613	//       "type": "string"
31614	//     },
31615	//     "objectType": {
31616	//       "description": "Select only dynamic targeting keys with this object type.",
31617	//       "enum": [
31618	//         "OBJECT_ADVERTISER",
31619	//         "OBJECT_AD",
31620	//         "OBJECT_CREATIVE",
31621	//         "OBJECT_PLACEMENT"
31622	//       ],
31623	//       "enumDescriptions": [
31624	//         "",
31625	//         "",
31626	//         "",
31627	//         ""
31628	//       ],
31629	//       "location": "query",
31630	//       "type": "string"
31631	//     },
31632	//     "profileId": {
31633	//       "description": "User profile ID associated with this request.",
31634	//       "format": "int64",
31635	//       "location": "path",
31636	//       "required": true,
31637	//       "type": "string"
31638	//     }
31639	//   },
31640	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
31641	//   "response": {
31642	//     "$ref": "DynamicTargetingKeysListResponse"
31643	//   },
31644	//   "scopes": [
31645	//     "https://www.googleapis.com/auth/dfatrafficking"
31646	//   ]
31647	// }
31648
31649}
31650
31651// method id "dfareporting.eventTags.delete":
31652
31653type EventTagsDeleteCall struct {
31654	s          *Service
31655	profileId  int64
31656	id         int64
31657	urlParams_ gensupport.URLParams
31658	ctx_       context.Context
31659	header_    http.Header
31660}
31661
31662// Delete: Deletes an existing event tag.
31663//
31664// - id: Event tag ID.
31665// - profileId: User profile ID associated with this request.
31666func (r *EventTagsService) Delete(profileId int64, id int64) *EventTagsDeleteCall {
31667	c := &EventTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31668	c.profileId = profileId
31669	c.id = id
31670	return c
31671}
31672
31673// Fields allows partial responses to be retrieved. See
31674// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31675// for more information.
31676func (c *EventTagsDeleteCall) Fields(s ...googleapi.Field) *EventTagsDeleteCall {
31677	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31678	return c
31679}
31680
31681// Context sets the context to be used in this call's Do method. Any
31682// pending HTTP request will be aborted if the provided context is
31683// canceled.
31684func (c *EventTagsDeleteCall) Context(ctx context.Context) *EventTagsDeleteCall {
31685	c.ctx_ = ctx
31686	return c
31687}
31688
31689// Header returns an http.Header that can be modified by the caller to
31690// add HTTP headers to the request.
31691func (c *EventTagsDeleteCall) Header() http.Header {
31692	if c.header_ == nil {
31693		c.header_ = make(http.Header)
31694	}
31695	return c.header_
31696}
31697
31698func (c *EventTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
31699	reqHeaders := make(http.Header)
31700	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
31701	for k, v := range c.header_ {
31702		reqHeaders[k] = v
31703	}
31704	reqHeaders.Set("User-Agent", c.s.userAgent())
31705	var body io.Reader = nil
31706	c.urlParams_.Set("alt", alt)
31707	c.urlParams_.Set("prettyPrint", "false")
31708	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
31709	urls += "?" + c.urlParams_.Encode()
31710	req, err := http.NewRequest("DELETE", urls, body)
31711	if err != nil {
31712		return nil, err
31713	}
31714	req.Header = reqHeaders
31715	googleapi.Expand(req.URL, map[string]string{
31716		"profileId": strconv.FormatInt(c.profileId, 10),
31717		"id":        strconv.FormatInt(c.id, 10),
31718	})
31719	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31720}
31721
31722// Do executes the "dfareporting.eventTags.delete" call.
31723func (c *EventTagsDeleteCall) Do(opts ...googleapi.CallOption) error {
31724	gensupport.SetOptions(c.urlParams_, opts...)
31725	res, err := c.doRequest("json")
31726	if err != nil {
31727		return err
31728	}
31729	defer googleapi.CloseBody(res)
31730	if err := googleapi.CheckResponse(res); err != nil {
31731		return err
31732	}
31733	return nil
31734	// {
31735	//   "description": "Deletes an existing event tag.",
31736	//   "flatPath": "userprofiles/{profileId}/eventTags/{id}",
31737	//   "httpMethod": "DELETE",
31738	//   "id": "dfareporting.eventTags.delete",
31739	//   "parameterOrder": [
31740	//     "profileId",
31741	//     "id"
31742	//   ],
31743	//   "parameters": {
31744	//     "id": {
31745	//       "description": "Event tag ID.",
31746	//       "format": "int64",
31747	//       "location": "path",
31748	//       "required": true,
31749	//       "type": "string"
31750	//     },
31751	//     "profileId": {
31752	//       "description": "User profile ID associated with this request.",
31753	//       "format": "int64",
31754	//       "location": "path",
31755	//       "required": true,
31756	//       "type": "string"
31757	//     }
31758	//   },
31759	//   "path": "userprofiles/{profileId}/eventTags/{id}",
31760	//   "scopes": [
31761	//     "https://www.googleapis.com/auth/dfatrafficking"
31762	//   ]
31763	// }
31764
31765}
31766
31767// method id "dfareporting.eventTags.get":
31768
31769type EventTagsGetCall struct {
31770	s            *Service
31771	profileId    int64
31772	id           int64
31773	urlParams_   gensupport.URLParams
31774	ifNoneMatch_ string
31775	ctx_         context.Context
31776	header_      http.Header
31777}
31778
31779// Get: Gets one event tag by ID.
31780//
31781// - id: Event tag ID.
31782// - profileId: User profile ID associated with this request.
31783func (r *EventTagsService) Get(profileId int64, id int64) *EventTagsGetCall {
31784	c := &EventTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31785	c.profileId = profileId
31786	c.id = id
31787	return c
31788}
31789
31790// Fields allows partial responses to be retrieved. See
31791// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31792// for more information.
31793func (c *EventTagsGetCall) Fields(s ...googleapi.Field) *EventTagsGetCall {
31794	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31795	return c
31796}
31797
31798// IfNoneMatch sets the optional parameter which makes the operation
31799// fail if the object's ETag matches the given value. This is useful for
31800// getting updates only after the object has changed since the last
31801// request. Use googleapi.IsNotModified to check whether the response
31802// error from Do is the result of In-None-Match.
31803func (c *EventTagsGetCall) IfNoneMatch(entityTag string) *EventTagsGetCall {
31804	c.ifNoneMatch_ = entityTag
31805	return c
31806}
31807
31808// Context sets the context to be used in this call's Do method. Any
31809// pending HTTP request will be aborted if the provided context is
31810// canceled.
31811func (c *EventTagsGetCall) Context(ctx context.Context) *EventTagsGetCall {
31812	c.ctx_ = ctx
31813	return c
31814}
31815
31816// Header returns an http.Header that can be modified by the caller to
31817// add HTTP headers to the request.
31818func (c *EventTagsGetCall) Header() http.Header {
31819	if c.header_ == nil {
31820		c.header_ = make(http.Header)
31821	}
31822	return c.header_
31823}
31824
31825func (c *EventTagsGetCall) doRequest(alt string) (*http.Response, error) {
31826	reqHeaders := make(http.Header)
31827	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
31828	for k, v := range c.header_ {
31829		reqHeaders[k] = v
31830	}
31831	reqHeaders.Set("User-Agent", c.s.userAgent())
31832	if c.ifNoneMatch_ != "" {
31833		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31834	}
31835	var body io.Reader = nil
31836	c.urlParams_.Set("alt", alt)
31837	c.urlParams_.Set("prettyPrint", "false")
31838	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
31839	urls += "?" + c.urlParams_.Encode()
31840	req, err := http.NewRequest("GET", urls, body)
31841	if err != nil {
31842		return nil, err
31843	}
31844	req.Header = reqHeaders
31845	googleapi.Expand(req.URL, map[string]string{
31846		"profileId": strconv.FormatInt(c.profileId, 10),
31847		"id":        strconv.FormatInt(c.id, 10),
31848	})
31849	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31850}
31851
31852// Do executes the "dfareporting.eventTags.get" call.
31853// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
31854// code is an error. Response headers are in either
31855// *EventTag.ServerResponse.Header or (if a response was returned at
31856// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31857// to check whether the returned error was because
31858// http.StatusNotModified was returned.
31859func (c *EventTagsGetCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31860	gensupport.SetOptions(c.urlParams_, opts...)
31861	res, err := c.doRequest("json")
31862	if res != nil && res.StatusCode == http.StatusNotModified {
31863		if res.Body != nil {
31864			res.Body.Close()
31865		}
31866		return nil, &googleapi.Error{
31867			Code:   res.StatusCode,
31868			Header: res.Header,
31869		}
31870	}
31871	if err != nil {
31872		return nil, err
31873	}
31874	defer googleapi.CloseBody(res)
31875	if err := googleapi.CheckResponse(res); err != nil {
31876		return nil, err
31877	}
31878	ret := &EventTag{
31879		ServerResponse: googleapi.ServerResponse{
31880			Header:         res.Header,
31881			HTTPStatusCode: res.StatusCode,
31882		},
31883	}
31884	target := &ret
31885	if err := gensupport.DecodeResponse(target, res); err != nil {
31886		return nil, err
31887	}
31888	return ret, nil
31889	// {
31890	//   "description": "Gets one event tag by ID.",
31891	//   "flatPath": "userprofiles/{profileId}/eventTags/{id}",
31892	//   "httpMethod": "GET",
31893	//   "id": "dfareporting.eventTags.get",
31894	//   "parameterOrder": [
31895	//     "profileId",
31896	//     "id"
31897	//   ],
31898	//   "parameters": {
31899	//     "id": {
31900	//       "description": "Event tag ID.",
31901	//       "format": "int64",
31902	//       "location": "path",
31903	//       "required": true,
31904	//       "type": "string"
31905	//     },
31906	//     "profileId": {
31907	//       "description": "User profile ID associated with this request.",
31908	//       "format": "int64",
31909	//       "location": "path",
31910	//       "required": true,
31911	//       "type": "string"
31912	//     }
31913	//   },
31914	//   "path": "userprofiles/{profileId}/eventTags/{id}",
31915	//   "response": {
31916	//     "$ref": "EventTag"
31917	//   },
31918	//   "scopes": [
31919	//     "https://www.googleapis.com/auth/dfatrafficking"
31920	//   ]
31921	// }
31922
31923}
31924
31925// method id "dfareporting.eventTags.insert":
31926
31927type EventTagsInsertCall struct {
31928	s          *Service
31929	profileId  int64
31930	eventtag   *EventTag
31931	urlParams_ gensupport.URLParams
31932	ctx_       context.Context
31933	header_    http.Header
31934}
31935
31936// Insert: Inserts a new event tag.
31937//
31938// - profileId: User profile ID associated with this request.
31939func (r *EventTagsService) Insert(profileId int64, eventtag *EventTag) *EventTagsInsertCall {
31940	c := &EventTagsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31941	c.profileId = profileId
31942	c.eventtag = eventtag
31943	return c
31944}
31945
31946// Fields allows partial responses to be retrieved. See
31947// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31948// for more information.
31949func (c *EventTagsInsertCall) Fields(s ...googleapi.Field) *EventTagsInsertCall {
31950	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31951	return c
31952}
31953
31954// Context sets the context to be used in this call's Do method. Any
31955// pending HTTP request will be aborted if the provided context is
31956// canceled.
31957func (c *EventTagsInsertCall) Context(ctx context.Context) *EventTagsInsertCall {
31958	c.ctx_ = ctx
31959	return c
31960}
31961
31962// Header returns an http.Header that can be modified by the caller to
31963// add HTTP headers to the request.
31964func (c *EventTagsInsertCall) Header() http.Header {
31965	if c.header_ == nil {
31966		c.header_ = make(http.Header)
31967	}
31968	return c.header_
31969}
31970
31971func (c *EventTagsInsertCall) doRequest(alt string) (*http.Response, error) {
31972	reqHeaders := make(http.Header)
31973	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
31974	for k, v := range c.header_ {
31975		reqHeaders[k] = v
31976	}
31977	reqHeaders.Set("User-Agent", c.s.userAgent())
31978	var body io.Reader = nil
31979	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
31980	if err != nil {
31981		return nil, err
31982	}
31983	reqHeaders.Set("Content-Type", "application/json")
31984	c.urlParams_.Set("alt", alt)
31985	c.urlParams_.Set("prettyPrint", "false")
31986	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31987	urls += "?" + c.urlParams_.Encode()
31988	req, err := http.NewRequest("POST", urls, body)
31989	if err != nil {
31990		return nil, err
31991	}
31992	req.Header = reqHeaders
31993	googleapi.Expand(req.URL, map[string]string{
31994		"profileId": strconv.FormatInt(c.profileId, 10),
31995	})
31996	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31997}
31998
31999// Do executes the "dfareporting.eventTags.insert" call.
32000// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
32001// code is an error. Response headers are in either
32002// *EventTag.ServerResponse.Header or (if a response was returned at
32003// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32004// to check whether the returned error was because
32005// http.StatusNotModified was returned.
32006func (c *EventTagsInsertCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
32007	gensupport.SetOptions(c.urlParams_, opts...)
32008	res, err := c.doRequest("json")
32009	if res != nil && res.StatusCode == http.StatusNotModified {
32010		if res.Body != nil {
32011			res.Body.Close()
32012		}
32013		return nil, &googleapi.Error{
32014			Code:   res.StatusCode,
32015			Header: res.Header,
32016		}
32017	}
32018	if err != nil {
32019		return nil, err
32020	}
32021	defer googleapi.CloseBody(res)
32022	if err := googleapi.CheckResponse(res); err != nil {
32023		return nil, err
32024	}
32025	ret := &EventTag{
32026		ServerResponse: googleapi.ServerResponse{
32027			Header:         res.Header,
32028			HTTPStatusCode: res.StatusCode,
32029		},
32030	}
32031	target := &ret
32032	if err := gensupport.DecodeResponse(target, res); err != nil {
32033		return nil, err
32034	}
32035	return ret, nil
32036	// {
32037	//   "description": "Inserts a new event tag.",
32038	//   "flatPath": "userprofiles/{profileId}/eventTags",
32039	//   "httpMethod": "POST",
32040	//   "id": "dfareporting.eventTags.insert",
32041	//   "parameterOrder": [
32042	//     "profileId"
32043	//   ],
32044	//   "parameters": {
32045	//     "profileId": {
32046	//       "description": "User profile ID associated with this request.",
32047	//       "format": "int64",
32048	//       "location": "path",
32049	//       "required": true,
32050	//       "type": "string"
32051	//     }
32052	//   },
32053	//   "path": "userprofiles/{profileId}/eventTags",
32054	//   "request": {
32055	//     "$ref": "EventTag"
32056	//   },
32057	//   "response": {
32058	//     "$ref": "EventTag"
32059	//   },
32060	//   "scopes": [
32061	//     "https://www.googleapis.com/auth/dfatrafficking"
32062	//   ]
32063	// }
32064
32065}
32066
32067// method id "dfareporting.eventTags.list":
32068
32069type EventTagsListCall struct {
32070	s            *Service
32071	profileId    int64
32072	urlParams_   gensupport.URLParams
32073	ifNoneMatch_ string
32074	ctx_         context.Context
32075	header_      http.Header
32076}
32077
32078// List: Retrieves a list of event tags, possibly filtered.
32079//
32080// - profileId: User profile ID associated with this request.
32081func (r *EventTagsService) List(profileId int64) *EventTagsListCall {
32082	c := &EventTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32083	c.profileId = profileId
32084	return c
32085}
32086
32087// AdId sets the optional parameter "adId": Select only event tags that
32088// belong to this ad.
32089func (c *EventTagsListCall) AdId(adId int64) *EventTagsListCall {
32090	c.urlParams_.Set("adId", fmt.Sprint(adId))
32091	return c
32092}
32093
32094// AdvertiserId sets the optional parameter "advertiserId": Select only
32095// event tags that belong to this advertiser.
32096func (c *EventTagsListCall) AdvertiserId(advertiserId int64) *EventTagsListCall {
32097	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32098	return c
32099}
32100
32101// CampaignId sets the optional parameter "campaignId": Select only
32102// event tags that belong to this campaign.
32103func (c *EventTagsListCall) CampaignId(campaignId int64) *EventTagsListCall {
32104	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
32105	return c
32106}
32107
32108// DefinitionsOnly sets the optional parameter "definitionsOnly":
32109// Examine only the specified campaign or advertiser's event tags for
32110// matching selector criteria. When set to false, the parent advertiser
32111// and parent campaign of the specified ad or campaign is examined as
32112// well. In addition, when set to false, the status field is examined as
32113// well, along with the enabledByDefault field. This parameter can not
32114// be set to true when adId is specified as ads do not define their own
32115// even tags.
32116func (c *EventTagsListCall) DefinitionsOnly(definitionsOnly bool) *EventTagsListCall {
32117	c.urlParams_.Set("definitionsOnly", fmt.Sprint(definitionsOnly))
32118	return c
32119}
32120
32121// Enabled sets the optional parameter "enabled": Select only enabled
32122// event tags. What is considered enabled or disabled depends on the
32123// definitionsOnly parameter. When definitionsOnly is set to true, only
32124// the specified advertiser or campaign's event tags' enabledByDefault
32125// field is examined. When definitionsOnly is set to false, the
32126// specified ad or specified campaign's parent advertiser's or parent
32127// campaign's event tags' enabledByDefault and status fields are
32128// examined as well.
32129func (c *EventTagsListCall) Enabled(enabled bool) *EventTagsListCall {
32130	c.urlParams_.Set("enabled", fmt.Sprint(enabled))
32131	return c
32132}
32133
32134// EventTagTypes sets the optional parameter "eventTagTypes": Select
32135// only event tags with the specified event tag types. Event tag types
32136// can be used to specify whether to use a third-party pixel, a
32137// third-party JavaScript URL, or a third-party click-through URL for
32138// either impression or click tracking.
32139//
32140// Possible values:
32141//   "IMPRESSION_IMAGE_EVENT_TAG"
32142//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
32143//   "CLICK_THROUGH_EVENT_TAG"
32144func (c *EventTagsListCall) EventTagTypes(eventTagTypes ...string) *EventTagsListCall {
32145	c.urlParams_.SetMulti("eventTagTypes", append([]string{}, eventTagTypes...))
32146	return c
32147}
32148
32149// Ids sets the optional parameter "ids": Select only event tags with
32150// these IDs.
32151func (c *EventTagsListCall) Ids(ids ...int64) *EventTagsListCall {
32152	var ids_ []string
32153	for _, v := range ids {
32154		ids_ = append(ids_, fmt.Sprint(v))
32155	}
32156	c.urlParams_.SetMulti("ids", ids_)
32157	return c
32158}
32159
32160// SearchString sets the optional parameter "searchString": Allows
32161// searching for objects by name or ID. Wildcards (*) are allowed. For
32162// example, "eventtag*2015" will return objects with names like
32163// "eventtag June 2015", "eventtag April 2015", or simply "eventtag
32164// 2015". Most of the searches also add wildcards implicitly at the
32165// start and the end of the search string. For example, a search string
32166// of "eventtag" will match objects with name "my eventtag", "eventtag
32167// 2015", or simply "eventtag".
32168func (c *EventTagsListCall) SearchString(searchString string) *EventTagsListCall {
32169	c.urlParams_.Set("searchString", searchString)
32170	return c
32171}
32172
32173// SortField sets the optional parameter "sortField": Field by which to
32174// sort the list.
32175//
32176// Possible values:
32177//   "ID" (default)
32178//   "NAME"
32179func (c *EventTagsListCall) SortField(sortField string) *EventTagsListCall {
32180	c.urlParams_.Set("sortField", sortField)
32181	return c
32182}
32183
32184// SortOrder sets the optional parameter "sortOrder": Order of sorted
32185// results.
32186//
32187// Possible values:
32188//   "ASCENDING" (default)
32189//   "DESCENDING"
32190func (c *EventTagsListCall) SortOrder(sortOrder string) *EventTagsListCall {
32191	c.urlParams_.Set("sortOrder", sortOrder)
32192	return c
32193}
32194
32195// Fields allows partial responses to be retrieved. See
32196// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32197// for more information.
32198func (c *EventTagsListCall) Fields(s ...googleapi.Field) *EventTagsListCall {
32199	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32200	return c
32201}
32202
32203// IfNoneMatch sets the optional parameter which makes the operation
32204// fail if the object's ETag matches the given value. This is useful for
32205// getting updates only after the object has changed since the last
32206// request. Use googleapi.IsNotModified to check whether the response
32207// error from Do is the result of In-None-Match.
32208func (c *EventTagsListCall) IfNoneMatch(entityTag string) *EventTagsListCall {
32209	c.ifNoneMatch_ = entityTag
32210	return c
32211}
32212
32213// Context sets the context to be used in this call's Do method. Any
32214// pending HTTP request will be aborted if the provided context is
32215// canceled.
32216func (c *EventTagsListCall) Context(ctx context.Context) *EventTagsListCall {
32217	c.ctx_ = ctx
32218	return c
32219}
32220
32221// Header returns an http.Header that can be modified by the caller to
32222// add HTTP headers to the request.
32223func (c *EventTagsListCall) Header() http.Header {
32224	if c.header_ == nil {
32225		c.header_ = make(http.Header)
32226	}
32227	return c.header_
32228}
32229
32230func (c *EventTagsListCall) doRequest(alt string) (*http.Response, error) {
32231	reqHeaders := make(http.Header)
32232	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
32233	for k, v := range c.header_ {
32234		reqHeaders[k] = v
32235	}
32236	reqHeaders.Set("User-Agent", c.s.userAgent())
32237	if c.ifNoneMatch_ != "" {
32238		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32239	}
32240	var body io.Reader = nil
32241	c.urlParams_.Set("alt", alt)
32242	c.urlParams_.Set("prettyPrint", "false")
32243	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
32244	urls += "?" + c.urlParams_.Encode()
32245	req, err := http.NewRequest("GET", urls, body)
32246	if err != nil {
32247		return nil, err
32248	}
32249	req.Header = reqHeaders
32250	googleapi.Expand(req.URL, map[string]string{
32251		"profileId": strconv.FormatInt(c.profileId, 10),
32252	})
32253	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32254}
32255
32256// Do executes the "dfareporting.eventTags.list" call.
32257// Exactly one of *EventTagsListResponse or error will be non-nil. Any
32258// non-2xx status code is an error. Response headers are in either
32259// *EventTagsListResponse.ServerResponse.Header or (if a response was
32260// returned at all) in error.(*googleapi.Error).Header. Use
32261// googleapi.IsNotModified to check whether the returned error was
32262// because http.StatusNotModified was returned.
32263func (c *EventTagsListCall) Do(opts ...googleapi.CallOption) (*EventTagsListResponse, error) {
32264	gensupport.SetOptions(c.urlParams_, opts...)
32265	res, err := c.doRequest("json")
32266	if res != nil && res.StatusCode == http.StatusNotModified {
32267		if res.Body != nil {
32268			res.Body.Close()
32269		}
32270		return nil, &googleapi.Error{
32271			Code:   res.StatusCode,
32272			Header: res.Header,
32273		}
32274	}
32275	if err != nil {
32276		return nil, err
32277	}
32278	defer googleapi.CloseBody(res)
32279	if err := googleapi.CheckResponse(res); err != nil {
32280		return nil, err
32281	}
32282	ret := &EventTagsListResponse{
32283		ServerResponse: googleapi.ServerResponse{
32284			Header:         res.Header,
32285			HTTPStatusCode: res.StatusCode,
32286		},
32287	}
32288	target := &ret
32289	if err := gensupport.DecodeResponse(target, res); err != nil {
32290		return nil, err
32291	}
32292	return ret, nil
32293	// {
32294	//   "description": "Retrieves a list of event tags, possibly filtered.",
32295	//   "flatPath": "userprofiles/{profileId}/eventTags",
32296	//   "httpMethod": "GET",
32297	//   "id": "dfareporting.eventTags.list",
32298	//   "parameterOrder": [
32299	//     "profileId"
32300	//   ],
32301	//   "parameters": {
32302	//     "adId": {
32303	//       "description": "Select only event tags that belong to this ad.",
32304	//       "format": "int64",
32305	//       "location": "query",
32306	//       "type": "string"
32307	//     },
32308	//     "advertiserId": {
32309	//       "description": "Select only event tags that belong to this advertiser.",
32310	//       "format": "int64",
32311	//       "location": "query",
32312	//       "type": "string"
32313	//     },
32314	//     "campaignId": {
32315	//       "description": "Select only event tags that belong to this campaign.",
32316	//       "format": "int64",
32317	//       "location": "query",
32318	//       "type": "string"
32319	//     },
32320	//     "definitionsOnly": {
32321	//       "description": "Examine only the specified campaign or advertiser's event tags for matching selector criteria. When set to false, the parent advertiser and parent campaign of the specified ad or campaign is examined as well. In addition, when set to false, the status field is examined as well, along with the enabledByDefault field. This parameter can not be set to true when adId is specified as ads do not define their own even tags.",
32322	//       "location": "query",
32323	//       "type": "boolean"
32324	//     },
32325	//     "enabled": {
32326	//       "description": "Select only enabled event tags. What is considered enabled or disabled depends on the definitionsOnly parameter. When definitionsOnly is set to true, only the specified advertiser or campaign's event tags' enabledByDefault field is examined. When definitionsOnly is set to false, the specified ad or specified campaign's parent advertiser's or parent campaign's event tags' enabledByDefault and status fields are examined as well.",
32327	//       "location": "query",
32328	//       "type": "boolean"
32329	//     },
32330	//     "eventTagTypes": {
32331	//       "description": "Select only event tags with the specified event tag types. Event tag types can be used to specify whether to use a third-party pixel, a third-party JavaScript URL, or a third-party click-through URL for either impression or click tracking.",
32332	//       "enum": [
32333	//         "IMPRESSION_IMAGE_EVENT_TAG",
32334	//         "IMPRESSION_JAVASCRIPT_EVENT_TAG",
32335	//         "CLICK_THROUGH_EVENT_TAG"
32336	//       ],
32337	//       "enumDescriptions": [
32338	//         "",
32339	//         "",
32340	//         ""
32341	//       ],
32342	//       "location": "query",
32343	//       "repeated": true,
32344	//       "type": "string"
32345	//     },
32346	//     "ids": {
32347	//       "description": "Select only event tags with these IDs.",
32348	//       "format": "int64",
32349	//       "location": "query",
32350	//       "repeated": true,
32351	//       "type": "string"
32352	//     },
32353	//     "profileId": {
32354	//       "description": "User profile ID associated with this request.",
32355	//       "format": "int64",
32356	//       "location": "path",
32357	//       "required": true,
32358	//       "type": "string"
32359	//     },
32360	//     "searchString": {
32361	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"eventtag*2015\" will return objects with names like \"eventtag June 2015\", \"eventtag April 2015\", or simply \"eventtag 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"eventtag\" will match objects with name \"my eventtag\", \"eventtag 2015\", or simply \"eventtag\".",
32362	//       "location": "query",
32363	//       "type": "string"
32364	//     },
32365	//     "sortField": {
32366	//       "default": "ID",
32367	//       "description": "Field by which to sort the list.",
32368	//       "enum": [
32369	//         "ID",
32370	//         "NAME"
32371	//       ],
32372	//       "enumDescriptions": [
32373	//         "",
32374	//         ""
32375	//       ],
32376	//       "location": "query",
32377	//       "type": "string"
32378	//     },
32379	//     "sortOrder": {
32380	//       "default": "ASCENDING",
32381	//       "description": "Order of sorted results.",
32382	//       "enum": [
32383	//         "ASCENDING",
32384	//         "DESCENDING"
32385	//       ],
32386	//       "enumDescriptions": [
32387	//         "",
32388	//         ""
32389	//       ],
32390	//       "location": "query",
32391	//       "type": "string"
32392	//     }
32393	//   },
32394	//   "path": "userprofiles/{profileId}/eventTags",
32395	//   "response": {
32396	//     "$ref": "EventTagsListResponse"
32397	//   },
32398	//   "scopes": [
32399	//     "https://www.googleapis.com/auth/dfatrafficking"
32400	//   ]
32401	// }
32402
32403}
32404
32405// method id "dfareporting.eventTags.patch":
32406
32407type EventTagsPatchCall struct {
32408	s          *Service
32409	profileId  int64
32410	eventtag   *EventTag
32411	urlParams_ gensupport.URLParams
32412	ctx_       context.Context
32413	header_    http.Header
32414}
32415
32416// Patch: Updates an existing event tag. This method supports patch
32417// semantics.
32418//
32419// - id: EventTag ID.
32420// - profileId: User profile ID associated with this request.
32421func (r *EventTagsService) Patch(profileId int64, id int64, eventtag *EventTag) *EventTagsPatchCall {
32422	c := &EventTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32423	c.profileId = profileId
32424	c.urlParams_.Set("id", fmt.Sprint(id))
32425	c.eventtag = eventtag
32426	return c
32427}
32428
32429// Fields allows partial responses to be retrieved. See
32430// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32431// for more information.
32432func (c *EventTagsPatchCall) Fields(s ...googleapi.Field) *EventTagsPatchCall {
32433	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32434	return c
32435}
32436
32437// Context sets the context to be used in this call's Do method. Any
32438// pending HTTP request will be aborted if the provided context is
32439// canceled.
32440func (c *EventTagsPatchCall) Context(ctx context.Context) *EventTagsPatchCall {
32441	c.ctx_ = ctx
32442	return c
32443}
32444
32445// Header returns an http.Header that can be modified by the caller to
32446// add HTTP headers to the request.
32447func (c *EventTagsPatchCall) Header() http.Header {
32448	if c.header_ == nil {
32449		c.header_ = make(http.Header)
32450	}
32451	return c.header_
32452}
32453
32454func (c *EventTagsPatchCall) doRequest(alt string) (*http.Response, error) {
32455	reqHeaders := make(http.Header)
32456	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
32457	for k, v := range c.header_ {
32458		reqHeaders[k] = v
32459	}
32460	reqHeaders.Set("User-Agent", c.s.userAgent())
32461	var body io.Reader = nil
32462	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
32463	if err != nil {
32464		return nil, err
32465	}
32466	reqHeaders.Set("Content-Type", "application/json")
32467	c.urlParams_.Set("alt", alt)
32468	c.urlParams_.Set("prettyPrint", "false")
32469	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
32470	urls += "?" + c.urlParams_.Encode()
32471	req, err := http.NewRequest("PATCH", urls, body)
32472	if err != nil {
32473		return nil, err
32474	}
32475	req.Header = reqHeaders
32476	googleapi.Expand(req.URL, map[string]string{
32477		"profileId": strconv.FormatInt(c.profileId, 10),
32478	})
32479	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32480}
32481
32482// Do executes the "dfareporting.eventTags.patch" call.
32483// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
32484// code is an error. Response headers are in either
32485// *EventTag.ServerResponse.Header or (if a response was returned at
32486// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32487// to check whether the returned error was because
32488// http.StatusNotModified was returned.
32489func (c *EventTagsPatchCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
32490	gensupport.SetOptions(c.urlParams_, opts...)
32491	res, err := c.doRequest("json")
32492	if res != nil && res.StatusCode == http.StatusNotModified {
32493		if res.Body != nil {
32494			res.Body.Close()
32495		}
32496		return nil, &googleapi.Error{
32497			Code:   res.StatusCode,
32498			Header: res.Header,
32499		}
32500	}
32501	if err != nil {
32502		return nil, err
32503	}
32504	defer googleapi.CloseBody(res)
32505	if err := googleapi.CheckResponse(res); err != nil {
32506		return nil, err
32507	}
32508	ret := &EventTag{
32509		ServerResponse: googleapi.ServerResponse{
32510			Header:         res.Header,
32511			HTTPStatusCode: res.StatusCode,
32512		},
32513	}
32514	target := &ret
32515	if err := gensupport.DecodeResponse(target, res); err != nil {
32516		return nil, err
32517	}
32518	return ret, nil
32519	// {
32520	//   "description": "Updates an existing event tag. This method supports patch semantics.",
32521	//   "flatPath": "userprofiles/{profileId}/eventTags",
32522	//   "httpMethod": "PATCH",
32523	//   "id": "dfareporting.eventTags.patch",
32524	//   "parameterOrder": [
32525	//     "profileId",
32526	//     "id"
32527	//   ],
32528	//   "parameters": {
32529	//     "id": {
32530	//       "description": "EventTag ID.",
32531	//       "format": "int64",
32532	//       "location": "query",
32533	//       "required": true,
32534	//       "type": "string"
32535	//     },
32536	//     "profileId": {
32537	//       "description": "User profile ID associated with this request.",
32538	//       "format": "int64",
32539	//       "location": "path",
32540	//       "required": true,
32541	//       "type": "string"
32542	//     }
32543	//   },
32544	//   "path": "userprofiles/{profileId}/eventTags",
32545	//   "request": {
32546	//     "$ref": "EventTag"
32547	//   },
32548	//   "response": {
32549	//     "$ref": "EventTag"
32550	//   },
32551	//   "scopes": [
32552	//     "https://www.googleapis.com/auth/dfatrafficking"
32553	//   ]
32554	// }
32555
32556}
32557
32558// method id "dfareporting.eventTags.update":
32559
32560type EventTagsUpdateCall struct {
32561	s          *Service
32562	profileId  int64
32563	eventtag   *EventTag
32564	urlParams_ gensupport.URLParams
32565	ctx_       context.Context
32566	header_    http.Header
32567}
32568
32569// Update: Updates an existing event tag.
32570//
32571// - profileId: User profile ID associated with this request.
32572func (r *EventTagsService) Update(profileId int64, eventtag *EventTag) *EventTagsUpdateCall {
32573	c := &EventTagsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32574	c.profileId = profileId
32575	c.eventtag = eventtag
32576	return c
32577}
32578
32579// Fields allows partial responses to be retrieved. See
32580// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32581// for more information.
32582func (c *EventTagsUpdateCall) Fields(s ...googleapi.Field) *EventTagsUpdateCall {
32583	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32584	return c
32585}
32586
32587// Context sets the context to be used in this call's Do method. Any
32588// pending HTTP request will be aborted if the provided context is
32589// canceled.
32590func (c *EventTagsUpdateCall) Context(ctx context.Context) *EventTagsUpdateCall {
32591	c.ctx_ = ctx
32592	return c
32593}
32594
32595// Header returns an http.Header that can be modified by the caller to
32596// add HTTP headers to the request.
32597func (c *EventTagsUpdateCall) Header() http.Header {
32598	if c.header_ == nil {
32599		c.header_ = make(http.Header)
32600	}
32601	return c.header_
32602}
32603
32604func (c *EventTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
32605	reqHeaders := make(http.Header)
32606	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
32607	for k, v := range c.header_ {
32608		reqHeaders[k] = v
32609	}
32610	reqHeaders.Set("User-Agent", c.s.userAgent())
32611	var body io.Reader = nil
32612	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
32613	if err != nil {
32614		return nil, err
32615	}
32616	reqHeaders.Set("Content-Type", "application/json")
32617	c.urlParams_.Set("alt", alt)
32618	c.urlParams_.Set("prettyPrint", "false")
32619	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
32620	urls += "?" + c.urlParams_.Encode()
32621	req, err := http.NewRequest("PUT", urls, body)
32622	if err != nil {
32623		return nil, err
32624	}
32625	req.Header = reqHeaders
32626	googleapi.Expand(req.URL, map[string]string{
32627		"profileId": strconv.FormatInt(c.profileId, 10),
32628	})
32629	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32630}
32631
32632// Do executes the "dfareporting.eventTags.update" call.
32633// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
32634// code is an error. Response headers are in either
32635// *EventTag.ServerResponse.Header or (if a response was returned at
32636// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32637// to check whether the returned error was because
32638// http.StatusNotModified was returned.
32639func (c *EventTagsUpdateCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
32640	gensupport.SetOptions(c.urlParams_, opts...)
32641	res, err := c.doRequest("json")
32642	if res != nil && res.StatusCode == http.StatusNotModified {
32643		if res.Body != nil {
32644			res.Body.Close()
32645		}
32646		return nil, &googleapi.Error{
32647			Code:   res.StatusCode,
32648			Header: res.Header,
32649		}
32650	}
32651	if err != nil {
32652		return nil, err
32653	}
32654	defer googleapi.CloseBody(res)
32655	if err := googleapi.CheckResponse(res); err != nil {
32656		return nil, err
32657	}
32658	ret := &EventTag{
32659		ServerResponse: googleapi.ServerResponse{
32660			Header:         res.Header,
32661			HTTPStatusCode: res.StatusCode,
32662		},
32663	}
32664	target := &ret
32665	if err := gensupport.DecodeResponse(target, res); err != nil {
32666		return nil, err
32667	}
32668	return ret, nil
32669	// {
32670	//   "description": "Updates an existing event tag.",
32671	//   "flatPath": "userprofiles/{profileId}/eventTags",
32672	//   "httpMethod": "PUT",
32673	//   "id": "dfareporting.eventTags.update",
32674	//   "parameterOrder": [
32675	//     "profileId"
32676	//   ],
32677	//   "parameters": {
32678	//     "profileId": {
32679	//       "description": "User profile ID associated with this request.",
32680	//       "format": "int64",
32681	//       "location": "path",
32682	//       "required": true,
32683	//       "type": "string"
32684	//     }
32685	//   },
32686	//   "path": "userprofiles/{profileId}/eventTags",
32687	//   "request": {
32688	//     "$ref": "EventTag"
32689	//   },
32690	//   "response": {
32691	//     "$ref": "EventTag"
32692	//   },
32693	//   "scopes": [
32694	//     "https://www.googleapis.com/auth/dfatrafficking"
32695	//   ]
32696	// }
32697
32698}
32699
32700// method id "dfareporting.files.get":
32701
32702type FilesGetCall struct {
32703	s            *Service
32704	reportId     int64
32705	fileId       int64
32706	urlParams_   gensupport.URLParams
32707	ifNoneMatch_ string
32708	ctx_         context.Context
32709	header_      http.Header
32710}
32711
32712// Get: Retrieves a report file by its report ID and file ID. This
32713// method supports media download.
32714//
32715// - fileId: The ID of the report file.
32716// - reportId: The ID of the report.
32717func (r *FilesService) Get(reportId int64, fileId int64) *FilesGetCall {
32718	c := &FilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32719	c.reportId = reportId
32720	c.fileId = fileId
32721	return c
32722}
32723
32724// Fields allows partial responses to be retrieved. See
32725// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32726// for more information.
32727func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall {
32728	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32729	return c
32730}
32731
32732// IfNoneMatch sets the optional parameter which makes the operation
32733// fail if the object's ETag matches the given value. This is useful for
32734// getting updates only after the object has changed since the last
32735// request. Use googleapi.IsNotModified to check whether the response
32736// error from Do is the result of In-None-Match.
32737func (c *FilesGetCall) IfNoneMatch(entityTag string) *FilesGetCall {
32738	c.ifNoneMatch_ = entityTag
32739	return c
32740}
32741
32742// Context sets the context to be used in this call's Do and Download
32743// methods. Any pending HTTP request will be aborted if the provided
32744// context is canceled.
32745func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
32746	c.ctx_ = ctx
32747	return c
32748}
32749
32750// Header returns an http.Header that can be modified by the caller to
32751// add HTTP headers to the request.
32752func (c *FilesGetCall) Header() http.Header {
32753	if c.header_ == nil {
32754		c.header_ = make(http.Header)
32755	}
32756	return c.header_
32757}
32758
32759func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
32760	reqHeaders := make(http.Header)
32761	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
32762	for k, v := range c.header_ {
32763		reqHeaders[k] = v
32764	}
32765	reqHeaders.Set("User-Agent", c.s.userAgent())
32766	if c.ifNoneMatch_ != "" {
32767		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32768	}
32769	var body io.Reader = nil
32770	c.urlParams_.Set("alt", alt)
32771	c.urlParams_.Set("prettyPrint", "false")
32772	urls := googleapi.ResolveRelative(c.s.BasePath, "reports/{reportId}/files/{fileId}")
32773	urls += "?" + c.urlParams_.Encode()
32774	req, err := http.NewRequest("GET", urls, body)
32775	if err != nil {
32776		return nil, err
32777	}
32778	req.Header = reqHeaders
32779	googleapi.Expand(req.URL, map[string]string{
32780		"reportId": strconv.FormatInt(c.reportId, 10),
32781		"fileId":   strconv.FormatInt(c.fileId, 10),
32782	})
32783	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32784}
32785
32786// Download fetches the API endpoint's "media" value, instead of the normal
32787// API response value. If the returned error is nil, the Response is guaranteed to
32788// have a 2xx status code. Callers must close the Response.Body as usual.
32789func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
32790	gensupport.SetOptions(c.urlParams_, opts...)
32791	res, err := c.doRequest("media")
32792	if err != nil {
32793		return nil, err
32794	}
32795	if err := googleapi.CheckResponse(res); err != nil {
32796		res.Body.Close()
32797		return nil, err
32798	}
32799	return res, nil
32800}
32801
32802// Do executes the "dfareporting.files.get" call.
32803// Exactly one of *File or error will be non-nil. Any non-2xx status
32804// code is an error. Response headers are in either
32805// *File.ServerResponse.Header or (if a response was returned at all) in
32806// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
32807// whether the returned error was because http.StatusNotModified was
32808// returned.
32809func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
32810	gensupport.SetOptions(c.urlParams_, opts...)
32811	res, err := c.doRequest("json")
32812	if res != nil && res.StatusCode == http.StatusNotModified {
32813		if res.Body != nil {
32814			res.Body.Close()
32815		}
32816		return nil, &googleapi.Error{
32817			Code:   res.StatusCode,
32818			Header: res.Header,
32819		}
32820	}
32821	if err != nil {
32822		return nil, err
32823	}
32824	defer googleapi.CloseBody(res)
32825	if err := googleapi.CheckResponse(res); err != nil {
32826		return nil, err
32827	}
32828	ret := &File{
32829		ServerResponse: googleapi.ServerResponse{
32830			Header:         res.Header,
32831			HTTPStatusCode: res.StatusCode,
32832		},
32833	}
32834	target := &ret
32835	if err := gensupport.DecodeResponse(target, res); err != nil {
32836		return nil, err
32837	}
32838	return ret, nil
32839	// {
32840	//   "description": "Retrieves a report file by its report ID and file ID. This method supports media download.",
32841	//   "flatPath": "reports/{reportId}/files/{fileId}",
32842	//   "httpMethod": "GET",
32843	//   "id": "dfareporting.files.get",
32844	//   "parameterOrder": [
32845	//     "reportId",
32846	//     "fileId"
32847	//   ],
32848	//   "parameters": {
32849	//     "fileId": {
32850	//       "description": "The ID of the report file.",
32851	//       "format": "int64",
32852	//       "location": "path",
32853	//       "required": true,
32854	//       "type": "string"
32855	//     },
32856	//     "reportId": {
32857	//       "description": "The ID of the report.",
32858	//       "format": "int64",
32859	//       "location": "path",
32860	//       "required": true,
32861	//       "type": "string"
32862	//     }
32863	//   },
32864	//   "path": "reports/{reportId}/files/{fileId}",
32865	//   "response": {
32866	//     "$ref": "File"
32867	//   },
32868	//   "scopes": [
32869	//     "https://www.googleapis.com/auth/dfareporting"
32870	//   ],
32871	//   "supportsMediaDownload": true
32872	// }
32873
32874}
32875
32876// method id "dfareporting.files.list":
32877
32878type FilesListCall struct {
32879	s            *Service
32880	profileId    int64
32881	urlParams_   gensupport.URLParams
32882	ifNoneMatch_ string
32883	ctx_         context.Context
32884	header_      http.Header
32885}
32886
32887// List: Lists files for a user profile.
32888//
32889// - profileId: The Campaign Manager 360 user profile ID.
32890func (r *FilesService) List(profileId int64) *FilesListCall {
32891	c := &FilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32892	c.profileId = profileId
32893	return c
32894}
32895
32896// MaxResults sets the optional parameter "maxResults": Maximum number
32897// of results to return.
32898func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall {
32899	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32900	return c
32901}
32902
32903// PageToken sets the optional parameter "pageToken": The value of the
32904// nextToken from the previous result page.
32905func (c *FilesListCall) PageToken(pageToken string) *FilesListCall {
32906	c.urlParams_.Set("pageToken", pageToken)
32907	return c
32908}
32909
32910// Scope sets the optional parameter "scope": The scope that defines
32911// which results are returned.
32912//
32913// Possible values:
32914//   "ALL" - All files in account.
32915//   "MINE" (default) - My files.
32916//   "SHARED_WITH_ME" - Files shared with me.
32917func (c *FilesListCall) Scope(scope string) *FilesListCall {
32918	c.urlParams_.Set("scope", scope)
32919	return c
32920}
32921
32922// SortField sets the optional parameter "sortField": The field by which
32923// to sort the list.
32924//
32925// Possible values:
32926//   "ID" - Sort by file ID.
32927//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
32928func (c *FilesListCall) SortField(sortField string) *FilesListCall {
32929	c.urlParams_.Set("sortField", sortField)
32930	return c
32931}
32932
32933// SortOrder sets the optional parameter "sortOrder": Order of sorted
32934// results.
32935//
32936// Possible values:
32937//   "ASCENDING" - Ascending order.
32938//   "DESCENDING" (default) - Descending order.
32939func (c *FilesListCall) SortOrder(sortOrder string) *FilesListCall {
32940	c.urlParams_.Set("sortOrder", sortOrder)
32941	return c
32942}
32943
32944// Fields allows partial responses to be retrieved. See
32945// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32946// for more information.
32947func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall {
32948	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32949	return c
32950}
32951
32952// IfNoneMatch sets the optional parameter which makes the operation
32953// fail if the object's ETag matches the given value. This is useful for
32954// getting updates only after the object has changed since the last
32955// request. Use googleapi.IsNotModified to check whether the response
32956// error from Do is the result of In-None-Match.
32957func (c *FilesListCall) IfNoneMatch(entityTag string) *FilesListCall {
32958	c.ifNoneMatch_ = entityTag
32959	return c
32960}
32961
32962// Context sets the context to be used in this call's Do method. Any
32963// pending HTTP request will be aborted if the provided context is
32964// canceled.
32965func (c *FilesListCall) Context(ctx context.Context) *FilesListCall {
32966	c.ctx_ = ctx
32967	return c
32968}
32969
32970// Header returns an http.Header that can be modified by the caller to
32971// add HTTP headers to the request.
32972func (c *FilesListCall) Header() http.Header {
32973	if c.header_ == nil {
32974		c.header_ = make(http.Header)
32975	}
32976	return c.header_
32977}
32978
32979func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
32980	reqHeaders := make(http.Header)
32981	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
32982	for k, v := range c.header_ {
32983		reqHeaders[k] = v
32984	}
32985	reqHeaders.Set("User-Agent", c.s.userAgent())
32986	if c.ifNoneMatch_ != "" {
32987		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32988	}
32989	var body io.Reader = nil
32990	c.urlParams_.Set("alt", alt)
32991	c.urlParams_.Set("prettyPrint", "false")
32992	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/files")
32993	urls += "?" + c.urlParams_.Encode()
32994	req, err := http.NewRequest("GET", urls, body)
32995	if err != nil {
32996		return nil, err
32997	}
32998	req.Header = reqHeaders
32999	googleapi.Expand(req.URL, map[string]string{
33000		"profileId": strconv.FormatInt(c.profileId, 10),
33001	})
33002	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33003}
33004
33005// Do executes the "dfareporting.files.list" call.
33006// Exactly one of *FileList or error will be non-nil. Any non-2xx status
33007// code is an error. Response headers are in either
33008// *FileList.ServerResponse.Header or (if a response was returned at
33009// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
33010// to check whether the returned error was because
33011// http.StatusNotModified was returned.
33012func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
33013	gensupport.SetOptions(c.urlParams_, opts...)
33014	res, err := c.doRequest("json")
33015	if res != nil && res.StatusCode == http.StatusNotModified {
33016		if res.Body != nil {
33017			res.Body.Close()
33018		}
33019		return nil, &googleapi.Error{
33020			Code:   res.StatusCode,
33021			Header: res.Header,
33022		}
33023	}
33024	if err != nil {
33025		return nil, err
33026	}
33027	defer googleapi.CloseBody(res)
33028	if err := googleapi.CheckResponse(res); err != nil {
33029		return nil, err
33030	}
33031	ret := &FileList{
33032		ServerResponse: googleapi.ServerResponse{
33033			Header:         res.Header,
33034			HTTPStatusCode: res.StatusCode,
33035		},
33036	}
33037	target := &ret
33038	if err := gensupport.DecodeResponse(target, res); err != nil {
33039		return nil, err
33040	}
33041	return ret, nil
33042	// {
33043	//   "description": "Lists files for a user profile.",
33044	//   "flatPath": "userprofiles/{profileId}/files",
33045	//   "httpMethod": "GET",
33046	//   "id": "dfareporting.files.list",
33047	//   "parameterOrder": [
33048	//     "profileId"
33049	//   ],
33050	//   "parameters": {
33051	//     "maxResults": {
33052	//       "default": "10",
33053	//       "description": "Maximum number of results to return.",
33054	//       "format": "int32",
33055	//       "location": "query",
33056	//       "maximum": "10",
33057	//       "minimum": "0",
33058	//       "type": "integer"
33059	//     },
33060	//     "pageToken": {
33061	//       "description": "The value of the nextToken from the previous result page.",
33062	//       "location": "query",
33063	//       "type": "string"
33064	//     },
33065	//     "profileId": {
33066	//       "description": "The Campaign Manager 360 user profile ID.",
33067	//       "format": "int64",
33068	//       "location": "path",
33069	//       "required": true,
33070	//       "type": "string"
33071	//     },
33072	//     "scope": {
33073	//       "default": "MINE",
33074	//       "description": "The scope that defines which results are returned.",
33075	//       "enum": [
33076	//         "ALL",
33077	//         "MINE",
33078	//         "SHARED_WITH_ME"
33079	//       ],
33080	//       "enumDescriptions": [
33081	//         "All files in account.",
33082	//         "My files.",
33083	//         "Files shared with me."
33084	//       ],
33085	//       "location": "query",
33086	//       "type": "string"
33087	//     },
33088	//     "sortField": {
33089	//       "default": "LAST_MODIFIED_TIME",
33090	//       "description": "The field by which to sort the list.",
33091	//       "enum": [
33092	//         "ID",
33093	//         "LAST_MODIFIED_TIME"
33094	//       ],
33095	//       "enumDescriptions": [
33096	//         "Sort by file ID.",
33097	//         "Sort by 'lastmodifiedAt' field."
33098	//       ],
33099	//       "location": "query",
33100	//       "type": "string"
33101	//     },
33102	//     "sortOrder": {
33103	//       "default": "DESCENDING",
33104	//       "description": "Order of sorted results.",
33105	//       "enum": [
33106	//         "ASCENDING",
33107	//         "DESCENDING"
33108	//       ],
33109	//       "enumDescriptions": [
33110	//         "Ascending order.",
33111	//         "Descending order."
33112	//       ],
33113	//       "location": "query",
33114	//       "type": "string"
33115	//     }
33116	//   },
33117	//   "path": "userprofiles/{profileId}/files",
33118	//   "response": {
33119	//     "$ref": "FileList"
33120	//   },
33121	//   "scopes": [
33122	//     "https://www.googleapis.com/auth/dfareporting"
33123	//   ]
33124	// }
33125
33126}
33127
33128// Pages invokes f for each page of results.
33129// A non-nil error returned from f will halt the iteration.
33130// The provided context supersedes any context provided to the Context method.
33131func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
33132	c.ctx_ = ctx
33133	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
33134	for {
33135		x, err := c.Do()
33136		if err != nil {
33137			return err
33138		}
33139		if err := f(x); err != nil {
33140			return err
33141		}
33142		if x.NextPageToken == "" {
33143			return nil
33144		}
33145		c.PageToken(x.NextPageToken)
33146	}
33147}
33148
33149// method id "dfareporting.floodlightActivities.delete":
33150
33151type FloodlightActivitiesDeleteCall struct {
33152	s          *Service
33153	profileId  int64
33154	id         int64
33155	urlParams_ gensupport.URLParams
33156	ctx_       context.Context
33157	header_    http.Header
33158}
33159
33160// Delete: Deletes an existing floodlight activity.
33161//
33162// - id: Floodlight activity ID.
33163// - profileId: User profile ID associated with this request.
33164func (r *FloodlightActivitiesService) Delete(profileId int64, id int64) *FloodlightActivitiesDeleteCall {
33165	c := &FloodlightActivitiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33166	c.profileId = profileId
33167	c.id = id
33168	return c
33169}
33170
33171// Fields allows partial responses to be retrieved. See
33172// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33173// for more information.
33174func (c *FloodlightActivitiesDeleteCall) Fields(s ...googleapi.Field) *FloodlightActivitiesDeleteCall {
33175	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33176	return c
33177}
33178
33179// Context sets the context to be used in this call's Do method. Any
33180// pending HTTP request will be aborted if the provided context is
33181// canceled.
33182func (c *FloodlightActivitiesDeleteCall) Context(ctx context.Context) *FloodlightActivitiesDeleteCall {
33183	c.ctx_ = ctx
33184	return c
33185}
33186
33187// Header returns an http.Header that can be modified by the caller to
33188// add HTTP headers to the request.
33189func (c *FloodlightActivitiesDeleteCall) Header() http.Header {
33190	if c.header_ == nil {
33191		c.header_ = make(http.Header)
33192	}
33193	return c.header_
33194}
33195
33196func (c *FloodlightActivitiesDeleteCall) doRequest(alt string) (*http.Response, error) {
33197	reqHeaders := make(http.Header)
33198	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
33199	for k, v := range c.header_ {
33200		reqHeaders[k] = v
33201	}
33202	reqHeaders.Set("User-Agent", c.s.userAgent())
33203	var body io.Reader = nil
33204	c.urlParams_.Set("alt", alt)
33205	c.urlParams_.Set("prettyPrint", "false")
33206	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
33207	urls += "?" + c.urlParams_.Encode()
33208	req, err := http.NewRequest("DELETE", urls, body)
33209	if err != nil {
33210		return nil, err
33211	}
33212	req.Header = reqHeaders
33213	googleapi.Expand(req.URL, map[string]string{
33214		"profileId": strconv.FormatInt(c.profileId, 10),
33215		"id":        strconv.FormatInt(c.id, 10),
33216	})
33217	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33218}
33219
33220// Do executes the "dfareporting.floodlightActivities.delete" call.
33221func (c *FloodlightActivitiesDeleteCall) Do(opts ...googleapi.CallOption) error {
33222	gensupport.SetOptions(c.urlParams_, opts...)
33223	res, err := c.doRequest("json")
33224	if err != nil {
33225		return err
33226	}
33227	defer googleapi.CloseBody(res)
33228	if err := googleapi.CheckResponse(res); err != nil {
33229		return err
33230	}
33231	return nil
33232	// {
33233	//   "description": "Deletes an existing floodlight activity.",
33234	//   "flatPath": "userprofiles/{profileId}/floodlightActivities/{id}",
33235	//   "httpMethod": "DELETE",
33236	//   "id": "dfareporting.floodlightActivities.delete",
33237	//   "parameterOrder": [
33238	//     "profileId",
33239	//     "id"
33240	//   ],
33241	//   "parameters": {
33242	//     "id": {
33243	//       "description": "Floodlight activity ID.",
33244	//       "format": "int64",
33245	//       "location": "path",
33246	//       "required": true,
33247	//       "type": "string"
33248	//     },
33249	//     "profileId": {
33250	//       "description": "User profile ID associated with this request.",
33251	//       "format": "int64",
33252	//       "location": "path",
33253	//       "required": true,
33254	//       "type": "string"
33255	//     }
33256	//   },
33257	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
33258	//   "scopes": [
33259	//     "https://www.googleapis.com/auth/dfatrafficking"
33260	//   ]
33261	// }
33262
33263}
33264
33265// method id "dfareporting.floodlightActivities.generatetag":
33266
33267type FloodlightActivitiesGeneratetagCall struct {
33268	s          *Service
33269	profileId  int64
33270	urlParams_ gensupport.URLParams
33271	ctx_       context.Context
33272	header_    http.Header
33273}
33274
33275// Generatetag: Generates a tag for a floodlight activity.
33276//
33277// - profileId: User profile ID associated with this request.
33278func (r *FloodlightActivitiesService) Generatetag(profileId int64) *FloodlightActivitiesGeneratetagCall {
33279	c := &FloodlightActivitiesGeneratetagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33280	c.profileId = profileId
33281	return c
33282}
33283
33284// FloodlightActivityId sets the optional parameter
33285// "floodlightActivityId": Floodlight activity ID for which we want to
33286// generate a tag.
33287func (c *FloodlightActivitiesGeneratetagCall) FloodlightActivityId(floodlightActivityId int64) *FloodlightActivitiesGeneratetagCall {
33288	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
33289	return c
33290}
33291
33292// Fields allows partial responses to be retrieved. See
33293// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33294// for more information.
33295func (c *FloodlightActivitiesGeneratetagCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGeneratetagCall {
33296	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33297	return c
33298}
33299
33300// Context sets the context to be used in this call's Do method. Any
33301// pending HTTP request will be aborted if the provided context is
33302// canceled.
33303func (c *FloodlightActivitiesGeneratetagCall) Context(ctx context.Context) *FloodlightActivitiesGeneratetagCall {
33304	c.ctx_ = ctx
33305	return c
33306}
33307
33308// Header returns an http.Header that can be modified by the caller to
33309// add HTTP headers to the request.
33310func (c *FloodlightActivitiesGeneratetagCall) Header() http.Header {
33311	if c.header_ == nil {
33312		c.header_ = make(http.Header)
33313	}
33314	return c.header_
33315}
33316
33317func (c *FloodlightActivitiesGeneratetagCall) doRequest(alt string) (*http.Response, error) {
33318	reqHeaders := make(http.Header)
33319	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
33320	for k, v := range c.header_ {
33321		reqHeaders[k] = v
33322	}
33323	reqHeaders.Set("User-Agent", c.s.userAgent())
33324	var body io.Reader = nil
33325	c.urlParams_.Set("alt", alt)
33326	c.urlParams_.Set("prettyPrint", "false")
33327	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/generatetag")
33328	urls += "?" + c.urlParams_.Encode()
33329	req, err := http.NewRequest("POST", urls, body)
33330	if err != nil {
33331		return nil, err
33332	}
33333	req.Header = reqHeaders
33334	googleapi.Expand(req.URL, map[string]string{
33335		"profileId": strconv.FormatInt(c.profileId, 10),
33336	})
33337	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33338}
33339
33340// Do executes the "dfareporting.floodlightActivities.generatetag" call.
33341// Exactly one of *FloodlightActivitiesGenerateTagResponse or error will
33342// be non-nil. Any non-2xx status code is an error. Response headers are
33343// in either
33344// *FloodlightActivitiesGenerateTagResponse.ServerResponse.Header or (if
33345// a response was returned at all) in error.(*googleapi.Error).Header.
33346// Use googleapi.IsNotModified to check whether the returned error was
33347// because http.StatusNotModified was returned.
33348func (c *FloodlightActivitiesGeneratetagCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesGenerateTagResponse, error) {
33349	gensupport.SetOptions(c.urlParams_, opts...)
33350	res, err := c.doRequest("json")
33351	if res != nil && res.StatusCode == http.StatusNotModified {
33352		if res.Body != nil {
33353			res.Body.Close()
33354		}
33355		return nil, &googleapi.Error{
33356			Code:   res.StatusCode,
33357			Header: res.Header,
33358		}
33359	}
33360	if err != nil {
33361		return nil, err
33362	}
33363	defer googleapi.CloseBody(res)
33364	if err := googleapi.CheckResponse(res); err != nil {
33365		return nil, err
33366	}
33367	ret := &FloodlightActivitiesGenerateTagResponse{
33368		ServerResponse: googleapi.ServerResponse{
33369			Header:         res.Header,
33370			HTTPStatusCode: res.StatusCode,
33371		},
33372	}
33373	target := &ret
33374	if err := gensupport.DecodeResponse(target, res); err != nil {
33375		return nil, err
33376	}
33377	return ret, nil
33378	// {
33379	//   "description": "Generates a tag for a floodlight activity.",
33380	//   "flatPath": "userprofiles/{profileId}/floodlightActivities/generatetag",
33381	//   "httpMethod": "POST",
33382	//   "id": "dfareporting.floodlightActivities.generatetag",
33383	//   "parameterOrder": [
33384	//     "profileId"
33385	//   ],
33386	//   "parameters": {
33387	//     "floodlightActivityId": {
33388	//       "description": "Floodlight activity ID for which we want to generate a tag.",
33389	//       "format": "int64",
33390	//       "location": "query",
33391	//       "type": "string"
33392	//     },
33393	//     "profileId": {
33394	//       "description": "User profile ID associated with this request.",
33395	//       "format": "int64",
33396	//       "location": "path",
33397	//       "required": true,
33398	//       "type": "string"
33399	//     }
33400	//   },
33401	//   "path": "userprofiles/{profileId}/floodlightActivities/generatetag",
33402	//   "response": {
33403	//     "$ref": "FloodlightActivitiesGenerateTagResponse"
33404	//   },
33405	//   "scopes": [
33406	//     "https://www.googleapis.com/auth/dfatrafficking"
33407	//   ]
33408	// }
33409
33410}
33411
33412// method id "dfareporting.floodlightActivities.get":
33413
33414type FloodlightActivitiesGetCall struct {
33415	s            *Service
33416	profileId    int64
33417	id           int64
33418	urlParams_   gensupport.URLParams
33419	ifNoneMatch_ string
33420	ctx_         context.Context
33421	header_      http.Header
33422}
33423
33424// Get: Gets one floodlight activity by ID.
33425//
33426// - id: Floodlight activity ID.
33427// - profileId: User profile ID associated with this request.
33428func (r *FloodlightActivitiesService) Get(profileId int64, id int64) *FloodlightActivitiesGetCall {
33429	c := &FloodlightActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33430	c.profileId = profileId
33431	c.id = id
33432	return c
33433}
33434
33435// Fields allows partial responses to be retrieved. See
33436// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33437// for more information.
33438func (c *FloodlightActivitiesGetCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGetCall {
33439	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33440	return c
33441}
33442
33443// IfNoneMatch sets the optional parameter which makes the operation
33444// fail if the object's ETag matches the given value. This is useful for
33445// getting updates only after the object has changed since the last
33446// request. Use googleapi.IsNotModified to check whether the response
33447// error from Do is the result of In-None-Match.
33448func (c *FloodlightActivitiesGetCall) IfNoneMatch(entityTag string) *FloodlightActivitiesGetCall {
33449	c.ifNoneMatch_ = entityTag
33450	return c
33451}
33452
33453// Context sets the context to be used in this call's Do method. Any
33454// pending HTTP request will be aborted if the provided context is
33455// canceled.
33456func (c *FloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightActivitiesGetCall {
33457	c.ctx_ = ctx
33458	return c
33459}
33460
33461// Header returns an http.Header that can be modified by the caller to
33462// add HTTP headers to the request.
33463func (c *FloodlightActivitiesGetCall) Header() http.Header {
33464	if c.header_ == nil {
33465		c.header_ = make(http.Header)
33466	}
33467	return c.header_
33468}
33469
33470func (c *FloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
33471	reqHeaders := make(http.Header)
33472	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
33473	for k, v := range c.header_ {
33474		reqHeaders[k] = v
33475	}
33476	reqHeaders.Set("User-Agent", c.s.userAgent())
33477	if c.ifNoneMatch_ != "" {
33478		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33479	}
33480	var body io.Reader = nil
33481	c.urlParams_.Set("alt", alt)
33482	c.urlParams_.Set("prettyPrint", "false")
33483	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
33484	urls += "?" + c.urlParams_.Encode()
33485	req, err := http.NewRequest("GET", urls, body)
33486	if err != nil {
33487		return nil, err
33488	}
33489	req.Header = reqHeaders
33490	googleapi.Expand(req.URL, map[string]string{
33491		"profileId": strconv.FormatInt(c.profileId, 10),
33492		"id":        strconv.FormatInt(c.id, 10),
33493	})
33494	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33495}
33496
33497// Do executes the "dfareporting.floodlightActivities.get" call.
33498// Exactly one of *FloodlightActivity or error will be non-nil. Any
33499// non-2xx status code is an error. Response headers are in either
33500// *FloodlightActivity.ServerResponse.Header or (if a response was
33501// returned at all) in error.(*googleapi.Error).Header. Use
33502// googleapi.IsNotModified to check whether the returned error was
33503// because http.StatusNotModified was returned.
33504func (c *FloodlightActivitiesGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
33505	gensupport.SetOptions(c.urlParams_, opts...)
33506	res, err := c.doRequest("json")
33507	if res != nil && res.StatusCode == http.StatusNotModified {
33508		if res.Body != nil {
33509			res.Body.Close()
33510		}
33511		return nil, &googleapi.Error{
33512			Code:   res.StatusCode,
33513			Header: res.Header,
33514		}
33515	}
33516	if err != nil {
33517		return nil, err
33518	}
33519	defer googleapi.CloseBody(res)
33520	if err := googleapi.CheckResponse(res); err != nil {
33521		return nil, err
33522	}
33523	ret := &FloodlightActivity{
33524		ServerResponse: googleapi.ServerResponse{
33525			Header:         res.Header,
33526			HTTPStatusCode: res.StatusCode,
33527		},
33528	}
33529	target := &ret
33530	if err := gensupport.DecodeResponse(target, res); err != nil {
33531		return nil, err
33532	}
33533	return ret, nil
33534	// {
33535	//   "description": "Gets one floodlight activity by ID.",
33536	//   "flatPath": "userprofiles/{profileId}/floodlightActivities/{id}",
33537	//   "httpMethod": "GET",
33538	//   "id": "dfareporting.floodlightActivities.get",
33539	//   "parameterOrder": [
33540	//     "profileId",
33541	//     "id"
33542	//   ],
33543	//   "parameters": {
33544	//     "id": {
33545	//       "description": "Floodlight activity ID.",
33546	//       "format": "int64",
33547	//       "location": "path",
33548	//       "required": true,
33549	//       "type": "string"
33550	//     },
33551	//     "profileId": {
33552	//       "description": "User profile ID associated with this request.",
33553	//       "format": "int64",
33554	//       "location": "path",
33555	//       "required": true,
33556	//       "type": "string"
33557	//     }
33558	//   },
33559	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
33560	//   "response": {
33561	//     "$ref": "FloodlightActivity"
33562	//   },
33563	//   "scopes": [
33564	//     "https://www.googleapis.com/auth/dfatrafficking"
33565	//   ]
33566	// }
33567
33568}
33569
33570// method id "dfareporting.floodlightActivities.insert":
33571
33572type FloodlightActivitiesInsertCall struct {
33573	s                  *Service
33574	profileId          int64
33575	floodlightactivity *FloodlightActivity
33576	urlParams_         gensupport.URLParams
33577	ctx_               context.Context
33578	header_            http.Header
33579}
33580
33581// Insert: Inserts a new floodlight activity.
33582//
33583// - profileId: User profile ID associated with this request.
33584func (r *FloodlightActivitiesService) Insert(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesInsertCall {
33585	c := &FloodlightActivitiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33586	c.profileId = profileId
33587	c.floodlightactivity = floodlightactivity
33588	return c
33589}
33590
33591// Fields allows partial responses to be retrieved. See
33592// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33593// for more information.
33594func (c *FloodlightActivitiesInsertCall) Fields(s ...googleapi.Field) *FloodlightActivitiesInsertCall {
33595	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33596	return c
33597}
33598
33599// Context sets the context to be used in this call's Do method. Any
33600// pending HTTP request will be aborted if the provided context is
33601// canceled.
33602func (c *FloodlightActivitiesInsertCall) Context(ctx context.Context) *FloodlightActivitiesInsertCall {
33603	c.ctx_ = ctx
33604	return c
33605}
33606
33607// Header returns an http.Header that can be modified by the caller to
33608// add HTTP headers to the request.
33609func (c *FloodlightActivitiesInsertCall) Header() http.Header {
33610	if c.header_ == nil {
33611		c.header_ = make(http.Header)
33612	}
33613	return c.header_
33614}
33615
33616func (c *FloodlightActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
33617	reqHeaders := make(http.Header)
33618	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
33619	for k, v := range c.header_ {
33620		reqHeaders[k] = v
33621	}
33622	reqHeaders.Set("User-Agent", c.s.userAgent())
33623	var body io.Reader = nil
33624	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
33625	if err != nil {
33626		return nil, err
33627	}
33628	reqHeaders.Set("Content-Type", "application/json")
33629	c.urlParams_.Set("alt", alt)
33630	c.urlParams_.Set("prettyPrint", "false")
33631	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
33632	urls += "?" + c.urlParams_.Encode()
33633	req, err := http.NewRequest("POST", urls, body)
33634	if err != nil {
33635		return nil, err
33636	}
33637	req.Header = reqHeaders
33638	googleapi.Expand(req.URL, map[string]string{
33639		"profileId": strconv.FormatInt(c.profileId, 10),
33640	})
33641	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33642}
33643
33644// Do executes the "dfareporting.floodlightActivities.insert" call.
33645// Exactly one of *FloodlightActivity or error will be non-nil. Any
33646// non-2xx status code is an error. Response headers are in either
33647// *FloodlightActivity.ServerResponse.Header or (if a response was
33648// returned at all) in error.(*googleapi.Error).Header. Use
33649// googleapi.IsNotModified to check whether the returned error was
33650// because http.StatusNotModified was returned.
33651func (c *FloodlightActivitiesInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
33652	gensupport.SetOptions(c.urlParams_, opts...)
33653	res, err := c.doRequest("json")
33654	if res != nil && res.StatusCode == http.StatusNotModified {
33655		if res.Body != nil {
33656			res.Body.Close()
33657		}
33658		return nil, &googleapi.Error{
33659			Code:   res.StatusCode,
33660			Header: res.Header,
33661		}
33662	}
33663	if err != nil {
33664		return nil, err
33665	}
33666	defer googleapi.CloseBody(res)
33667	if err := googleapi.CheckResponse(res); err != nil {
33668		return nil, err
33669	}
33670	ret := &FloodlightActivity{
33671		ServerResponse: googleapi.ServerResponse{
33672			Header:         res.Header,
33673			HTTPStatusCode: res.StatusCode,
33674		},
33675	}
33676	target := &ret
33677	if err := gensupport.DecodeResponse(target, res); err != nil {
33678		return nil, err
33679	}
33680	return ret, nil
33681	// {
33682	//   "description": "Inserts a new floodlight activity.",
33683	//   "flatPath": "userprofiles/{profileId}/floodlightActivities",
33684	//   "httpMethod": "POST",
33685	//   "id": "dfareporting.floodlightActivities.insert",
33686	//   "parameterOrder": [
33687	//     "profileId"
33688	//   ],
33689	//   "parameters": {
33690	//     "profileId": {
33691	//       "description": "User profile ID associated with this request.",
33692	//       "format": "int64",
33693	//       "location": "path",
33694	//       "required": true,
33695	//       "type": "string"
33696	//     }
33697	//   },
33698	//   "path": "userprofiles/{profileId}/floodlightActivities",
33699	//   "request": {
33700	//     "$ref": "FloodlightActivity"
33701	//   },
33702	//   "response": {
33703	//     "$ref": "FloodlightActivity"
33704	//   },
33705	//   "scopes": [
33706	//     "https://www.googleapis.com/auth/dfatrafficking"
33707	//   ]
33708	// }
33709
33710}
33711
33712// method id "dfareporting.floodlightActivities.list":
33713
33714type FloodlightActivitiesListCall struct {
33715	s            *Service
33716	profileId    int64
33717	urlParams_   gensupport.URLParams
33718	ifNoneMatch_ string
33719	ctx_         context.Context
33720	header_      http.Header
33721}
33722
33723// List: Retrieves a list of floodlight activities, possibly filtered.
33724// This method supports paging.
33725//
33726// - profileId: User profile ID associated with this request.
33727func (r *FloodlightActivitiesService) List(profileId int64) *FloodlightActivitiesListCall {
33728	c := &FloodlightActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33729	c.profileId = profileId
33730	return c
33731}
33732
33733// AdvertiserId sets the optional parameter "advertiserId": Select only
33734// floodlight activities for the specified advertiser ID. Must specify
33735// either ids, advertiserId, or floodlightConfigurationId for a
33736// non-empty result.
33737func (c *FloodlightActivitiesListCall) AdvertiserId(advertiserId int64) *FloodlightActivitiesListCall {
33738	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33739	return c
33740}
33741
33742// FloodlightActivityGroupIds sets the optional parameter
33743// "floodlightActivityGroupIds": Select only floodlight activities with
33744// the specified floodlight activity group IDs.
33745func (c *FloodlightActivitiesListCall) FloodlightActivityGroupIds(floodlightActivityGroupIds ...int64) *FloodlightActivitiesListCall {
33746	var floodlightActivityGroupIds_ []string
33747	for _, v := range floodlightActivityGroupIds {
33748		floodlightActivityGroupIds_ = append(floodlightActivityGroupIds_, fmt.Sprint(v))
33749	}
33750	c.urlParams_.SetMulti("floodlightActivityGroupIds", floodlightActivityGroupIds_)
33751	return c
33752}
33753
33754// FloodlightActivityGroupName sets the optional parameter
33755// "floodlightActivityGroupName": Select only floodlight activities with
33756// the specified floodlight activity group name.
33757func (c *FloodlightActivitiesListCall) FloodlightActivityGroupName(floodlightActivityGroupName string) *FloodlightActivitiesListCall {
33758	c.urlParams_.Set("floodlightActivityGroupName", floodlightActivityGroupName)
33759	return c
33760}
33761
33762// FloodlightActivityGroupTagString sets the optional parameter
33763// "floodlightActivityGroupTagString": Select only floodlight activities
33764// with the specified floodlight activity group tag string.
33765func (c *FloodlightActivitiesListCall) FloodlightActivityGroupTagString(floodlightActivityGroupTagString string) *FloodlightActivitiesListCall {
33766	c.urlParams_.Set("floodlightActivityGroupTagString", floodlightActivityGroupTagString)
33767	return c
33768}
33769
33770// FloodlightActivityGroupType sets the optional parameter
33771// "floodlightActivityGroupType": Select only floodlight activities with
33772// the specified floodlight activity group type.
33773//
33774// Possible values:
33775//   "COUNTER"
33776//   "SALE"
33777func (c *FloodlightActivitiesListCall) FloodlightActivityGroupType(floodlightActivityGroupType string) *FloodlightActivitiesListCall {
33778	c.urlParams_.Set("floodlightActivityGroupType", floodlightActivityGroupType)
33779	return c
33780}
33781
33782// FloodlightConfigurationId sets the optional parameter
33783// "floodlightConfigurationId": Select only floodlight activities for
33784// the specified floodlight configuration ID. Must specify either ids,
33785// advertiserId, or floodlightConfigurationId for a non-empty result.
33786func (c *FloodlightActivitiesListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivitiesListCall {
33787	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
33788	return c
33789}
33790
33791// Ids sets the optional parameter "ids": Select only floodlight
33792// activities with the specified IDs. Must specify either ids,
33793// advertiserId, or floodlightConfigurationId for a non-empty result.
33794func (c *FloodlightActivitiesListCall) Ids(ids ...int64) *FloodlightActivitiesListCall {
33795	var ids_ []string
33796	for _, v := range ids {
33797		ids_ = append(ids_, fmt.Sprint(v))
33798	}
33799	c.urlParams_.SetMulti("ids", ids_)
33800	return c
33801}
33802
33803// MaxResults sets the optional parameter "maxResults": Maximum number
33804// of results to return.
33805func (c *FloodlightActivitiesListCall) MaxResults(maxResults int64) *FloodlightActivitiesListCall {
33806	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33807	return c
33808}
33809
33810// PageToken sets the optional parameter "pageToken": Value of the
33811// nextPageToken from the previous result page.
33812func (c *FloodlightActivitiesListCall) PageToken(pageToken string) *FloodlightActivitiesListCall {
33813	c.urlParams_.Set("pageToken", pageToken)
33814	return c
33815}
33816
33817// SearchString sets the optional parameter "searchString": Allows
33818// searching for objects by name or ID. Wildcards (*) are allowed. For
33819// example, "floodlightactivity*2015" will return objects with names
33820// like "floodlightactivity June 2015", "floodlightactivity April 2015",
33821// or simply "floodlightactivity 2015". Most of the searches also add
33822// wildcards implicitly at the start and the end of the search string.
33823// For example, a search string of "floodlightactivity" will match
33824// objects with name "my floodlightactivity activity",
33825// "floodlightactivity 2015", or simply "floodlightactivity".
33826func (c *FloodlightActivitiesListCall) SearchString(searchString string) *FloodlightActivitiesListCall {
33827	c.urlParams_.Set("searchString", searchString)
33828	return c
33829}
33830
33831// SortField sets the optional parameter "sortField": Field by which to
33832// sort the list.
33833//
33834// Possible values:
33835//   "ID" (default)
33836//   "NAME"
33837func (c *FloodlightActivitiesListCall) SortField(sortField string) *FloodlightActivitiesListCall {
33838	c.urlParams_.Set("sortField", sortField)
33839	return c
33840}
33841
33842// SortOrder sets the optional parameter "sortOrder": Order of sorted
33843// results.
33844//
33845// Possible values:
33846//   "ASCENDING" (default)
33847//   "DESCENDING"
33848func (c *FloodlightActivitiesListCall) SortOrder(sortOrder string) *FloodlightActivitiesListCall {
33849	c.urlParams_.Set("sortOrder", sortOrder)
33850	return c
33851}
33852
33853// TagString sets the optional parameter "tagString": Select only
33854// floodlight activities with the specified tag string.
33855func (c *FloodlightActivitiesListCall) TagString(tagString string) *FloodlightActivitiesListCall {
33856	c.urlParams_.Set("tagString", tagString)
33857	return c
33858}
33859
33860// Fields allows partial responses to be retrieved. See
33861// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33862// for more information.
33863func (c *FloodlightActivitiesListCall) Fields(s ...googleapi.Field) *FloodlightActivitiesListCall {
33864	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33865	return c
33866}
33867
33868// IfNoneMatch sets the optional parameter which makes the operation
33869// fail if the object's ETag matches the given value. This is useful for
33870// getting updates only after the object has changed since the last
33871// request. Use googleapi.IsNotModified to check whether the response
33872// error from Do is the result of In-None-Match.
33873func (c *FloodlightActivitiesListCall) IfNoneMatch(entityTag string) *FloodlightActivitiesListCall {
33874	c.ifNoneMatch_ = entityTag
33875	return c
33876}
33877
33878// Context sets the context to be used in this call's Do method. Any
33879// pending HTTP request will be aborted if the provided context is
33880// canceled.
33881func (c *FloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightActivitiesListCall {
33882	c.ctx_ = ctx
33883	return c
33884}
33885
33886// Header returns an http.Header that can be modified by the caller to
33887// add HTTP headers to the request.
33888func (c *FloodlightActivitiesListCall) Header() http.Header {
33889	if c.header_ == nil {
33890		c.header_ = make(http.Header)
33891	}
33892	return c.header_
33893}
33894
33895func (c *FloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
33896	reqHeaders := make(http.Header)
33897	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
33898	for k, v := range c.header_ {
33899		reqHeaders[k] = v
33900	}
33901	reqHeaders.Set("User-Agent", c.s.userAgent())
33902	if c.ifNoneMatch_ != "" {
33903		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33904	}
33905	var body io.Reader = nil
33906	c.urlParams_.Set("alt", alt)
33907	c.urlParams_.Set("prettyPrint", "false")
33908	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
33909	urls += "?" + c.urlParams_.Encode()
33910	req, err := http.NewRequest("GET", urls, body)
33911	if err != nil {
33912		return nil, err
33913	}
33914	req.Header = reqHeaders
33915	googleapi.Expand(req.URL, map[string]string{
33916		"profileId": strconv.FormatInt(c.profileId, 10),
33917	})
33918	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33919}
33920
33921// Do executes the "dfareporting.floodlightActivities.list" call.
33922// Exactly one of *FloodlightActivitiesListResponse or error will be
33923// non-nil. Any non-2xx status code is an error. Response headers are in
33924// either *FloodlightActivitiesListResponse.ServerResponse.Header or (if
33925// a response was returned at all) in error.(*googleapi.Error).Header.
33926// Use googleapi.IsNotModified to check whether the returned error was
33927// because http.StatusNotModified was returned.
33928func (c *FloodlightActivitiesListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesListResponse, error) {
33929	gensupport.SetOptions(c.urlParams_, opts...)
33930	res, err := c.doRequest("json")
33931	if res != nil && res.StatusCode == http.StatusNotModified {
33932		if res.Body != nil {
33933			res.Body.Close()
33934		}
33935		return nil, &googleapi.Error{
33936			Code:   res.StatusCode,
33937			Header: res.Header,
33938		}
33939	}
33940	if err != nil {
33941		return nil, err
33942	}
33943	defer googleapi.CloseBody(res)
33944	if err := googleapi.CheckResponse(res); err != nil {
33945		return nil, err
33946	}
33947	ret := &FloodlightActivitiesListResponse{
33948		ServerResponse: googleapi.ServerResponse{
33949			Header:         res.Header,
33950			HTTPStatusCode: res.StatusCode,
33951		},
33952	}
33953	target := &ret
33954	if err := gensupport.DecodeResponse(target, res); err != nil {
33955		return nil, err
33956	}
33957	return ret, nil
33958	// {
33959	//   "description": "Retrieves a list of floodlight activities, possibly filtered. This method supports paging.",
33960	//   "flatPath": "userprofiles/{profileId}/floodlightActivities",
33961	//   "httpMethod": "GET",
33962	//   "id": "dfareporting.floodlightActivities.list",
33963	//   "parameterOrder": [
33964	//     "profileId"
33965	//   ],
33966	//   "parameters": {
33967	//     "advertiserId": {
33968	//       "description": "Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
33969	//       "format": "int64",
33970	//       "location": "query",
33971	//       "type": "string"
33972	//     },
33973	//     "floodlightActivityGroupIds": {
33974	//       "description": "Select only floodlight activities with the specified floodlight activity group IDs.",
33975	//       "format": "int64",
33976	//       "location": "query",
33977	//       "repeated": true,
33978	//       "type": "string"
33979	//     },
33980	//     "floodlightActivityGroupName": {
33981	//       "description": "Select only floodlight activities with the specified floodlight activity group name.",
33982	//       "location": "query",
33983	//       "type": "string"
33984	//     },
33985	//     "floodlightActivityGroupTagString": {
33986	//       "description": "Select only floodlight activities with the specified floodlight activity group tag string.",
33987	//       "location": "query",
33988	//       "type": "string"
33989	//     },
33990	//     "floodlightActivityGroupType": {
33991	//       "description": "Select only floodlight activities with the specified floodlight activity group type.",
33992	//       "enum": [
33993	//         "COUNTER",
33994	//         "SALE"
33995	//       ],
33996	//       "enumDescriptions": [
33997	//         "",
33998	//         ""
33999	//       ],
34000	//       "location": "query",
34001	//       "type": "string"
34002	//     },
34003	//     "floodlightConfigurationId": {
34004	//       "description": "Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
34005	//       "format": "int64",
34006	//       "location": "query",
34007	//       "type": "string"
34008	//     },
34009	//     "ids": {
34010	//       "description": "Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
34011	//       "format": "int64",
34012	//       "location": "query",
34013	//       "repeated": true,
34014	//       "type": "string"
34015	//     },
34016	//     "maxResults": {
34017	//       "default": "1000",
34018	//       "description": "Maximum number of results to return.",
34019	//       "format": "int32",
34020	//       "location": "query",
34021	//       "maximum": "1000",
34022	//       "minimum": "0",
34023	//       "type": "integer"
34024	//     },
34025	//     "pageToken": {
34026	//       "description": "Value of the nextPageToken from the previous result page.",
34027	//       "location": "query",
34028	//       "type": "string"
34029	//     },
34030	//     "profileId": {
34031	//       "description": "User profile ID associated with this request.",
34032	//       "format": "int64",
34033	//       "location": "path",
34034	//       "required": true,
34035	//       "type": "string"
34036	//     },
34037	//     "searchString": {
34038	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"floodlightactivity*2015\" will return objects with names like \"floodlightactivity June 2015\", \"floodlightactivity April 2015\", or simply \"floodlightactivity 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"floodlightactivity\" will match objects with name \"my floodlightactivity activity\", \"floodlightactivity 2015\", or simply \"floodlightactivity\".",
34039	//       "location": "query",
34040	//       "type": "string"
34041	//     },
34042	//     "sortField": {
34043	//       "default": "ID",
34044	//       "description": "Field by which to sort the list.",
34045	//       "enum": [
34046	//         "ID",
34047	//         "NAME"
34048	//       ],
34049	//       "enumDescriptions": [
34050	//         "",
34051	//         ""
34052	//       ],
34053	//       "location": "query",
34054	//       "type": "string"
34055	//     },
34056	//     "sortOrder": {
34057	//       "default": "ASCENDING",
34058	//       "description": "Order of sorted results.",
34059	//       "enum": [
34060	//         "ASCENDING",
34061	//         "DESCENDING"
34062	//       ],
34063	//       "enumDescriptions": [
34064	//         "",
34065	//         ""
34066	//       ],
34067	//       "location": "query",
34068	//       "type": "string"
34069	//     },
34070	//     "tagString": {
34071	//       "description": "Select only floodlight activities with the specified tag string.",
34072	//       "location": "query",
34073	//       "type": "string"
34074	//     }
34075	//   },
34076	//   "path": "userprofiles/{profileId}/floodlightActivities",
34077	//   "response": {
34078	//     "$ref": "FloodlightActivitiesListResponse"
34079	//   },
34080	//   "scopes": [
34081	//     "https://www.googleapis.com/auth/dfatrafficking"
34082	//   ]
34083	// }
34084
34085}
34086
34087// Pages invokes f for each page of results.
34088// A non-nil error returned from f will halt the iteration.
34089// The provided context supersedes any context provided to the Context method.
34090func (c *FloodlightActivitiesListCall) Pages(ctx context.Context, f func(*FloodlightActivitiesListResponse) error) error {
34091	c.ctx_ = ctx
34092	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
34093	for {
34094		x, err := c.Do()
34095		if err != nil {
34096			return err
34097		}
34098		if err := f(x); err != nil {
34099			return err
34100		}
34101		if x.NextPageToken == "" {
34102			return nil
34103		}
34104		c.PageToken(x.NextPageToken)
34105	}
34106}
34107
34108// method id "dfareporting.floodlightActivities.patch":
34109
34110type FloodlightActivitiesPatchCall struct {
34111	s                  *Service
34112	profileId          int64
34113	floodlightactivity *FloodlightActivity
34114	urlParams_         gensupport.URLParams
34115	ctx_               context.Context
34116	header_            http.Header
34117}
34118
34119// Patch: Updates an existing floodlight activity. This method supports
34120// patch semantics.
34121//
34122// - id: FloodlightActivity ID.
34123// - profileId: User profile ID associated with this request.
34124func (r *FloodlightActivitiesService) Patch(profileId int64, id int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesPatchCall {
34125	c := &FloodlightActivitiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34126	c.profileId = profileId
34127	c.urlParams_.Set("id", fmt.Sprint(id))
34128	c.floodlightactivity = floodlightactivity
34129	return c
34130}
34131
34132// Fields allows partial responses to be retrieved. See
34133// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34134// for more information.
34135func (c *FloodlightActivitiesPatchCall) Fields(s ...googleapi.Field) *FloodlightActivitiesPatchCall {
34136	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34137	return c
34138}
34139
34140// Context sets the context to be used in this call's Do method. Any
34141// pending HTTP request will be aborted if the provided context is
34142// canceled.
34143func (c *FloodlightActivitiesPatchCall) Context(ctx context.Context) *FloodlightActivitiesPatchCall {
34144	c.ctx_ = ctx
34145	return c
34146}
34147
34148// Header returns an http.Header that can be modified by the caller to
34149// add HTTP headers to the request.
34150func (c *FloodlightActivitiesPatchCall) Header() http.Header {
34151	if c.header_ == nil {
34152		c.header_ = make(http.Header)
34153	}
34154	return c.header_
34155}
34156
34157func (c *FloodlightActivitiesPatchCall) doRequest(alt string) (*http.Response, error) {
34158	reqHeaders := make(http.Header)
34159	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
34160	for k, v := range c.header_ {
34161		reqHeaders[k] = v
34162	}
34163	reqHeaders.Set("User-Agent", c.s.userAgent())
34164	var body io.Reader = nil
34165	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
34166	if err != nil {
34167		return nil, err
34168	}
34169	reqHeaders.Set("Content-Type", "application/json")
34170	c.urlParams_.Set("alt", alt)
34171	c.urlParams_.Set("prettyPrint", "false")
34172	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
34173	urls += "?" + c.urlParams_.Encode()
34174	req, err := http.NewRequest("PATCH", urls, body)
34175	if err != nil {
34176		return nil, err
34177	}
34178	req.Header = reqHeaders
34179	googleapi.Expand(req.URL, map[string]string{
34180		"profileId": strconv.FormatInt(c.profileId, 10),
34181	})
34182	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34183}
34184
34185// Do executes the "dfareporting.floodlightActivities.patch" call.
34186// Exactly one of *FloodlightActivity or error will be non-nil. Any
34187// non-2xx status code is an error. Response headers are in either
34188// *FloodlightActivity.ServerResponse.Header or (if a response was
34189// returned at all) in error.(*googleapi.Error).Header. Use
34190// googleapi.IsNotModified to check whether the returned error was
34191// because http.StatusNotModified was returned.
34192func (c *FloodlightActivitiesPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
34193	gensupport.SetOptions(c.urlParams_, opts...)
34194	res, err := c.doRequest("json")
34195	if res != nil && res.StatusCode == http.StatusNotModified {
34196		if res.Body != nil {
34197			res.Body.Close()
34198		}
34199		return nil, &googleapi.Error{
34200			Code:   res.StatusCode,
34201			Header: res.Header,
34202		}
34203	}
34204	if err != nil {
34205		return nil, err
34206	}
34207	defer googleapi.CloseBody(res)
34208	if err := googleapi.CheckResponse(res); err != nil {
34209		return nil, err
34210	}
34211	ret := &FloodlightActivity{
34212		ServerResponse: googleapi.ServerResponse{
34213			Header:         res.Header,
34214			HTTPStatusCode: res.StatusCode,
34215		},
34216	}
34217	target := &ret
34218	if err := gensupport.DecodeResponse(target, res); err != nil {
34219		return nil, err
34220	}
34221	return ret, nil
34222	// {
34223	//   "description": "Updates an existing floodlight activity. This method supports patch semantics.",
34224	//   "flatPath": "userprofiles/{profileId}/floodlightActivities",
34225	//   "httpMethod": "PATCH",
34226	//   "id": "dfareporting.floodlightActivities.patch",
34227	//   "parameterOrder": [
34228	//     "profileId",
34229	//     "id"
34230	//   ],
34231	//   "parameters": {
34232	//     "id": {
34233	//       "description": "FloodlightActivity ID.",
34234	//       "format": "int64",
34235	//       "location": "query",
34236	//       "required": true,
34237	//       "type": "string"
34238	//     },
34239	//     "profileId": {
34240	//       "description": "User profile ID associated with this request.",
34241	//       "format": "int64",
34242	//       "location": "path",
34243	//       "required": true,
34244	//       "type": "string"
34245	//     }
34246	//   },
34247	//   "path": "userprofiles/{profileId}/floodlightActivities",
34248	//   "request": {
34249	//     "$ref": "FloodlightActivity"
34250	//   },
34251	//   "response": {
34252	//     "$ref": "FloodlightActivity"
34253	//   },
34254	//   "scopes": [
34255	//     "https://www.googleapis.com/auth/dfatrafficking"
34256	//   ]
34257	// }
34258
34259}
34260
34261// method id "dfareporting.floodlightActivities.update":
34262
34263type FloodlightActivitiesUpdateCall struct {
34264	s                  *Service
34265	profileId          int64
34266	floodlightactivity *FloodlightActivity
34267	urlParams_         gensupport.URLParams
34268	ctx_               context.Context
34269	header_            http.Header
34270}
34271
34272// Update: Updates an existing floodlight activity.
34273//
34274// - profileId: User profile ID associated with this request.
34275func (r *FloodlightActivitiesService) Update(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesUpdateCall {
34276	c := &FloodlightActivitiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34277	c.profileId = profileId
34278	c.floodlightactivity = floodlightactivity
34279	return c
34280}
34281
34282// Fields allows partial responses to be retrieved. See
34283// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34284// for more information.
34285func (c *FloodlightActivitiesUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivitiesUpdateCall {
34286	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34287	return c
34288}
34289
34290// Context sets the context to be used in this call's Do method. Any
34291// pending HTTP request will be aborted if the provided context is
34292// canceled.
34293func (c *FloodlightActivitiesUpdateCall) Context(ctx context.Context) *FloodlightActivitiesUpdateCall {
34294	c.ctx_ = ctx
34295	return c
34296}
34297
34298// Header returns an http.Header that can be modified by the caller to
34299// add HTTP headers to the request.
34300func (c *FloodlightActivitiesUpdateCall) Header() http.Header {
34301	if c.header_ == nil {
34302		c.header_ = make(http.Header)
34303	}
34304	return c.header_
34305}
34306
34307func (c *FloodlightActivitiesUpdateCall) doRequest(alt string) (*http.Response, error) {
34308	reqHeaders := make(http.Header)
34309	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
34310	for k, v := range c.header_ {
34311		reqHeaders[k] = v
34312	}
34313	reqHeaders.Set("User-Agent", c.s.userAgent())
34314	var body io.Reader = nil
34315	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
34316	if err != nil {
34317		return nil, err
34318	}
34319	reqHeaders.Set("Content-Type", "application/json")
34320	c.urlParams_.Set("alt", alt)
34321	c.urlParams_.Set("prettyPrint", "false")
34322	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
34323	urls += "?" + c.urlParams_.Encode()
34324	req, err := http.NewRequest("PUT", urls, body)
34325	if err != nil {
34326		return nil, err
34327	}
34328	req.Header = reqHeaders
34329	googleapi.Expand(req.URL, map[string]string{
34330		"profileId": strconv.FormatInt(c.profileId, 10),
34331	})
34332	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34333}
34334
34335// Do executes the "dfareporting.floodlightActivities.update" call.
34336// Exactly one of *FloodlightActivity or error will be non-nil. Any
34337// non-2xx status code is an error. Response headers are in either
34338// *FloodlightActivity.ServerResponse.Header or (if a response was
34339// returned at all) in error.(*googleapi.Error).Header. Use
34340// googleapi.IsNotModified to check whether the returned error was
34341// because http.StatusNotModified was returned.
34342func (c *FloodlightActivitiesUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
34343	gensupport.SetOptions(c.urlParams_, opts...)
34344	res, err := c.doRequest("json")
34345	if res != nil && res.StatusCode == http.StatusNotModified {
34346		if res.Body != nil {
34347			res.Body.Close()
34348		}
34349		return nil, &googleapi.Error{
34350			Code:   res.StatusCode,
34351			Header: res.Header,
34352		}
34353	}
34354	if err != nil {
34355		return nil, err
34356	}
34357	defer googleapi.CloseBody(res)
34358	if err := googleapi.CheckResponse(res); err != nil {
34359		return nil, err
34360	}
34361	ret := &FloodlightActivity{
34362		ServerResponse: googleapi.ServerResponse{
34363			Header:         res.Header,
34364			HTTPStatusCode: res.StatusCode,
34365		},
34366	}
34367	target := &ret
34368	if err := gensupport.DecodeResponse(target, res); err != nil {
34369		return nil, err
34370	}
34371	return ret, nil
34372	// {
34373	//   "description": "Updates an existing floodlight activity.",
34374	//   "flatPath": "userprofiles/{profileId}/floodlightActivities",
34375	//   "httpMethod": "PUT",
34376	//   "id": "dfareporting.floodlightActivities.update",
34377	//   "parameterOrder": [
34378	//     "profileId"
34379	//   ],
34380	//   "parameters": {
34381	//     "profileId": {
34382	//       "description": "User profile ID associated with this request.",
34383	//       "format": "int64",
34384	//       "location": "path",
34385	//       "required": true,
34386	//       "type": "string"
34387	//     }
34388	//   },
34389	//   "path": "userprofiles/{profileId}/floodlightActivities",
34390	//   "request": {
34391	//     "$ref": "FloodlightActivity"
34392	//   },
34393	//   "response": {
34394	//     "$ref": "FloodlightActivity"
34395	//   },
34396	//   "scopes": [
34397	//     "https://www.googleapis.com/auth/dfatrafficking"
34398	//   ]
34399	// }
34400
34401}
34402
34403// method id "dfareporting.floodlightActivityGroups.get":
34404
34405type FloodlightActivityGroupsGetCall struct {
34406	s            *Service
34407	profileId    int64
34408	id           int64
34409	urlParams_   gensupport.URLParams
34410	ifNoneMatch_ string
34411	ctx_         context.Context
34412	header_      http.Header
34413}
34414
34415// Get: Gets one floodlight activity group by ID.
34416//
34417// - id: Floodlight activity Group ID.
34418// - profileId: User profile ID associated with this request.
34419func (r *FloodlightActivityGroupsService) Get(profileId int64, id int64) *FloodlightActivityGroupsGetCall {
34420	c := &FloodlightActivityGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34421	c.profileId = profileId
34422	c.id = id
34423	return c
34424}
34425
34426// Fields allows partial responses to be retrieved. See
34427// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34428// for more information.
34429func (c *FloodlightActivityGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsGetCall {
34430	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34431	return c
34432}
34433
34434// IfNoneMatch sets the optional parameter which makes the operation
34435// fail if the object's ETag matches the given value. This is useful for
34436// getting updates only after the object has changed since the last
34437// request. Use googleapi.IsNotModified to check whether the response
34438// error from Do is the result of In-None-Match.
34439func (c *FloodlightActivityGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsGetCall {
34440	c.ifNoneMatch_ = entityTag
34441	return c
34442}
34443
34444// Context sets the context to be used in this call's Do method. Any
34445// pending HTTP request will be aborted if the provided context is
34446// canceled.
34447func (c *FloodlightActivityGroupsGetCall) Context(ctx context.Context) *FloodlightActivityGroupsGetCall {
34448	c.ctx_ = ctx
34449	return c
34450}
34451
34452// Header returns an http.Header that can be modified by the caller to
34453// add HTTP headers to the request.
34454func (c *FloodlightActivityGroupsGetCall) Header() http.Header {
34455	if c.header_ == nil {
34456		c.header_ = make(http.Header)
34457	}
34458	return c.header_
34459}
34460
34461func (c *FloodlightActivityGroupsGetCall) doRequest(alt string) (*http.Response, error) {
34462	reqHeaders := make(http.Header)
34463	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
34464	for k, v := range c.header_ {
34465		reqHeaders[k] = v
34466	}
34467	reqHeaders.Set("User-Agent", c.s.userAgent())
34468	if c.ifNoneMatch_ != "" {
34469		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34470	}
34471	var body io.Reader = nil
34472	c.urlParams_.Set("alt", alt)
34473	c.urlParams_.Set("prettyPrint", "false")
34474	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups/{id}")
34475	urls += "?" + c.urlParams_.Encode()
34476	req, err := http.NewRequest("GET", urls, body)
34477	if err != nil {
34478		return nil, err
34479	}
34480	req.Header = reqHeaders
34481	googleapi.Expand(req.URL, map[string]string{
34482		"profileId": strconv.FormatInt(c.profileId, 10),
34483		"id":        strconv.FormatInt(c.id, 10),
34484	})
34485	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34486}
34487
34488// Do executes the "dfareporting.floodlightActivityGroups.get" call.
34489// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
34490// non-2xx status code is an error. Response headers are in either
34491// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
34492// returned at all) in error.(*googleapi.Error).Header. Use
34493// googleapi.IsNotModified to check whether the returned error was
34494// because http.StatusNotModified was returned.
34495func (c *FloodlightActivityGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
34496	gensupport.SetOptions(c.urlParams_, opts...)
34497	res, err := c.doRequest("json")
34498	if res != nil && res.StatusCode == http.StatusNotModified {
34499		if res.Body != nil {
34500			res.Body.Close()
34501		}
34502		return nil, &googleapi.Error{
34503			Code:   res.StatusCode,
34504			Header: res.Header,
34505		}
34506	}
34507	if err != nil {
34508		return nil, err
34509	}
34510	defer googleapi.CloseBody(res)
34511	if err := googleapi.CheckResponse(res); err != nil {
34512		return nil, err
34513	}
34514	ret := &FloodlightActivityGroup{
34515		ServerResponse: googleapi.ServerResponse{
34516			Header:         res.Header,
34517			HTTPStatusCode: res.StatusCode,
34518		},
34519	}
34520	target := &ret
34521	if err := gensupport.DecodeResponse(target, res); err != nil {
34522		return nil, err
34523	}
34524	return ret, nil
34525	// {
34526	//   "description": "Gets one floodlight activity group by ID.",
34527	//   "flatPath": "userprofiles/{profileId}/floodlightActivityGroups/{id}",
34528	//   "httpMethod": "GET",
34529	//   "id": "dfareporting.floodlightActivityGroups.get",
34530	//   "parameterOrder": [
34531	//     "profileId",
34532	//     "id"
34533	//   ],
34534	//   "parameters": {
34535	//     "id": {
34536	//       "description": "Floodlight activity Group ID.",
34537	//       "format": "int64",
34538	//       "location": "path",
34539	//       "required": true,
34540	//       "type": "string"
34541	//     },
34542	//     "profileId": {
34543	//       "description": "User profile ID associated with this request.",
34544	//       "format": "int64",
34545	//       "location": "path",
34546	//       "required": true,
34547	//       "type": "string"
34548	//     }
34549	//   },
34550	//   "path": "userprofiles/{profileId}/floodlightActivityGroups/{id}",
34551	//   "response": {
34552	//     "$ref": "FloodlightActivityGroup"
34553	//   },
34554	//   "scopes": [
34555	//     "https://www.googleapis.com/auth/dfatrafficking"
34556	//   ]
34557	// }
34558
34559}
34560
34561// method id "dfareporting.floodlightActivityGroups.insert":
34562
34563type FloodlightActivityGroupsInsertCall struct {
34564	s                       *Service
34565	profileId               int64
34566	floodlightactivitygroup *FloodlightActivityGroup
34567	urlParams_              gensupport.URLParams
34568	ctx_                    context.Context
34569	header_                 http.Header
34570}
34571
34572// Insert: Inserts a new floodlight activity group.
34573//
34574// - profileId: User profile ID associated with this request.
34575func (r *FloodlightActivityGroupsService) Insert(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsInsertCall {
34576	c := &FloodlightActivityGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34577	c.profileId = profileId
34578	c.floodlightactivitygroup = floodlightactivitygroup
34579	return c
34580}
34581
34582// Fields allows partial responses to be retrieved. See
34583// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34584// for more information.
34585func (c *FloodlightActivityGroupsInsertCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsInsertCall {
34586	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34587	return c
34588}
34589
34590// Context sets the context to be used in this call's Do method. Any
34591// pending HTTP request will be aborted if the provided context is
34592// canceled.
34593func (c *FloodlightActivityGroupsInsertCall) Context(ctx context.Context) *FloodlightActivityGroupsInsertCall {
34594	c.ctx_ = ctx
34595	return c
34596}
34597
34598// Header returns an http.Header that can be modified by the caller to
34599// add HTTP headers to the request.
34600func (c *FloodlightActivityGroupsInsertCall) Header() http.Header {
34601	if c.header_ == nil {
34602		c.header_ = make(http.Header)
34603	}
34604	return c.header_
34605}
34606
34607func (c *FloodlightActivityGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
34608	reqHeaders := make(http.Header)
34609	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
34610	for k, v := range c.header_ {
34611		reqHeaders[k] = v
34612	}
34613	reqHeaders.Set("User-Agent", c.s.userAgent())
34614	var body io.Reader = nil
34615	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
34616	if err != nil {
34617		return nil, err
34618	}
34619	reqHeaders.Set("Content-Type", "application/json")
34620	c.urlParams_.Set("alt", alt)
34621	c.urlParams_.Set("prettyPrint", "false")
34622	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
34623	urls += "?" + c.urlParams_.Encode()
34624	req, err := http.NewRequest("POST", urls, body)
34625	if err != nil {
34626		return nil, err
34627	}
34628	req.Header = reqHeaders
34629	googleapi.Expand(req.URL, map[string]string{
34630		"profileId": strconv.FormatInt(c.profileId, 10),
34631	})
34632	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34633}
34634
34635// Do executes the "dfareporting.floodlightActivityGroups.insert" call.
34636// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
34637// non-2xx status code is an error. Response headers are in either
34638// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
34639// returned at all) in error.(*googleapi.Error).Header. Use
34640// googleapi.IsNotModified to check whether the returned error was
34641// because http.StatusNotModified was returned.
34642func (c *FloodlightActivityGroupsInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
34643	gensupport.SetOptions(c.urlParams_, opts...)
34644	res, err := c.doRequest("json")
34645	if res != nil && res.StatusCode == http.StatusNotModified {
34646		if res.Body != nil {
34647			res.Body.Close()
34648		}
34649		return nil, &googleapi.Error{
34650			Code:   res.StatusCode,
34651			Header: res.Header,
34652		}
34653	}
34654	if err != nil {
34655		return nil, err
34656	}
34657	defer googleapi.CloseBody(res)
34658	if err := googleapi.CheckResponse(res); err != nil {
34659		return nil, err
34660	}
34661	ret := &FloodlightActivityGroup{
34662		ServerResponse: googleapi.ServerResponse{
34663			Header:         res.Header,
34664			HTTPStatusCode: res.StatusCode,
34665		},
34666	}
34667	target := &ret
34668	if err := gensupport.DecodeResponse(target, res); err != nil {
34669		return nil, err
34670	}
34671	return ret, nil
34672	// {
34673	//   "description": "Inserts a new floodlight activity group.",
34674	//   "flatPath": "userprofiles/{profileId}/floodlightActivityGroups",
34675	//   "httpMethod": "POST",
34676	//   "id": "dfareporting.floodlightActivityGroups.insert",
34677	//   "parameterOrder": [
34678	//     "profileId"
34679	//   ],
34680	//   "parameters": {
34681	//     "profileId": {
34682	//       "description": "User profile ID associated with this request.",
34683	//       "format": "int64",
34684	//       "location": "path",
34685	//       "required": true,
34686	//       "type": "string"
34687	//     }
34688	//   },
34689	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
34690	//   "request": {
34691	//     "$ref": "FloodlightActivityGroup"
34692	//   },
34693	//   "response": {
34694	//     "$ref": "FloodlightActivityGroup"
34695	//   },
34696	//   "scopes": [
34697	//     "https://www.googleapis.com/auth/dfatrafficking"
34698	//   ]
34699	// }
34700
34701}
34702
34703// method id "dfareporting.floodlightActivityGroups.list":
34704
34705type FloodlightActivityGroupsListCall struct {
34706	s            *Service
34707	profileId    int64
34708	urlParams_   gensupport.URLParams
34709	ifNoneMatch_ string
34710	ctx_         context.Context
34711	header_      http.Header
34712}
34713
34714// List: Retrieves a list of floodlight activity groups, possibly
34715// filtered. This method supports paging.
34716//
34717// - profileId: User profile ID associated with this request.
34718func (r *FloodlightActivityGroupsService) List(profileId int64) *FloodlightActivityGroupsListCall {
34719	c := &FloodlightActivityGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34720	c.profileId = profileId
34721	return c
34722}
34723
34724// AdvertiserId sets the optional parameter "advertiserId": Select only
34725// floodlight activity groups with the specified advertiser ID. Must
34726// specify either advertiserId or floodlightConfigurationId for a
34727// non-empty result.
34728func (c *FloodlightActivityGroupsListCall) AdvertiserId(advertiserId int64) *FloodlightActivityGroupsListCall {
34729	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
34730	return c
34731}
34732
34733// FloodlightConfigurationId sets the optional parameter
34734// "floodlightConfigurationId": Select only floodlight activity groups
34735// with the specified floodlight configuration ID. Must specify either
34736// advertiserId, or floodlightConfigurationId for a non-empty result.
34737func (c *FloodlightActivityGroupsListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivityGroupsListCall {
34738	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
34739	return c
34740}
34741
34742// Ids sets the optional parameter "ids": Select only floodlight
34743// activity groups with the specified IDs. Must specify either
34744// advertiserId or floodlightConfigurationId for a non-empty result.
34745func (c *FloodlightActivityGroupsListCall) Ids(ids ...int64) *FloodlightActivityGroupsListCall {
34746	var ids_ []string
34747	for _, v := range ids {
34748		ids_ = append(ids_, fmt.Sprint(v))
34749	}
34750	c.urlParams_.SetMulti("ids", ids_)
34751	return c
34752}
34753
34754// MaxResults sets the optional parameter "maxResults": Maximum number
34755// of results to return.
34756func (c *FloodlightActivityGroupsListCall) MaxResults(maxResults int64) *FloodlightActivityGroupsListCall {
34757	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
34758	return c
34759}
34760
34761// PageToken sets the optional parameter "pageToken": Value of the
34762// nextPageToken from the previous result page.
34763func (c *FloodlightActivityGroupsListCall) PageToken(pageToken string) *FloodlightActivityGroupsListCall {
34764	c.urlParams_.Set("pageToken", pageToken)
34765	return c
34766}
34767
34768// SearchString sets the optional parameter "searchString": Allows
34769// searching for objects by name or ID. Wildcards (*) are allowed. For
34770// example, "floodlightactivitygroup*2015" will return objects with
34771// names like "floodlightactivitygroup June 2015",
34772// "floodlightactivitygroup April 2015", or simply
34773// "floodlightactivitygroup 2015". Most of the searches also add
34774// wildcards implicitly at the start and the end of the search string.
34775// For example, a search string of "floodlightactivitygroup" will match
34776// objects with name "my floodlightactivitygroup activity",
34777// "floodlightactivitygroup 2015", or simply "floodlightactivitygroup".
34778func (c *FloodlightActivityGroupsListCall) SearchString(searchString string) *FloodlightActivityGroupsListCall {
34779	c.urlParams_.Set("searchString", searchString)
34780	return c
34781}
34782
34783// SortField sets the optional parameter "sortField": Field by which to
34784// sort the list.
34785//
34786// Possible values:
34787//   "ID" (default)
34788//   "NAME"
34789func (c *FloodlightActivityGroupsListCall) SortField(sortField string) *FloodlightActivityGroupsListCall {
34790	c.urlParams_.Set("sortField", sortField)
34791	return c
34792}
34793
34794// SortOrder sets the optional parameter "sortOrder": Order of sorted
34795// results.
34796//
34797// Possible values:
34798//   "ASCENDING" (default)
34799//   "DESCENDING"
34800func (c *FloodlightActivityGroupsListCall) SortOrder(sortOrder string) *FloodlightActivityGroupsListCall {
34801	c.urlParams_.Set("sortOrder", sortOrder)
34802	return c
34803}
34804
34805// Type sets the optional parameter "type": Select only floodlight
34806// activity groups with the specified floodlight activity group type.
34807//
34808// Possible values:
34809//   "COUNTER"
34810//   "SALE"
34811func (c *FloodlightActivityGroupsListCall) Type(type_ string) *FloodlightActivityGroupsListCall {
34812	c.urlParams_.Set("type", type_)
34813	return c
34814}
34815
34816// Fields allows partial responses to be retrieved. See
34817// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34818// for more information.
34819func (c *FloodlightActivityGroupsListCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsListCall {
34820	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34821	return c
34822}
34823
34824// IfNoneMatch sets the optional parameter which makes the operation
34825// fail if the object's ETag matches the given value. This is useful for
34826// getting updates only after the object has changed since the last
34827// request. Use googleapi.IsNotModified to check whether the response
34828// error from Do is the result of In-None-Match.
34829func (c *FloodlightActivityGroupsListCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsListCall {
34830	c.ifNoneMatch_ = entityTag
34831	return c
34832}
34833
34834// Context sets the context to be used in this call's Do method. Any
34835// pending HTTP request will be aborted if the provided context is
34836// canceled.
34837func (c *FloodlightActivityGroupsListCall) Context(ctx context.Context) *FloodlightActivityGroupsListCall {
34838	c.ctx_ = ctx
34839	return c
34840}
34841
34842// Header returns an http.Header that can be modified by the caller to
34843// add HTTP headers to the request.
34844func (c *FloodlightActivityGroupsListCall) Header() http.Header {
34845	if c.header_ == nil {
34846		c.header_ = make(http.Header)
34847	}
34848	return c.header_
34849}
34850
34851func (c *FloodlightActivityGroupsListCall) doRequest(alt string) (*http.Response, error) {
34852	reqHeaders := make(http.Header)
34853	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
34854	for k, v := range c.header_ {
34855		reqHeaders[k] = v
34856	}
34857	reqHeaders.Set("User-Agent", c.s.userAgent())
34858	if c.ifNoneMatch_ != "" {
34859		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34860	}
34861	var body io.Reader = nil
34862	c.urlParams_.Set("alt", alt)
34863	c.urlParams_.Set("prettyPrint", "false")
34864	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
34865	urls += "?" + c.urlParams_.Encode()
34866	req, err := http.NewRequest("GET", urls, body)
34867	if err != nil {
34868		return nil, err
34869	}
34870	req.Header = reqHeaders
34871	googleapi.Expand(req.URL, map[string]string{
34872		"profileId": strconv.FormatInt(c.profileId, 10),
34873	})
34874	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34875}
34876
34877// Do executes the "dfareporting.floodlightActivityGroups.list" call.
34878// Exactly one of *FloodlightActivityGroupsListResponse or error will be
34879// non-nil. Any non-2xx status code is an error. Response headers are in
34880// either *FloodlightActivityGroupsListResponse.ServerResponse.Header or
34881// (if a response was returned at all) in
34882// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
34883// whether the returned error was because http.StatusNotModified was
34884// returned.
34885func (c *FloodlightActivityGroupsListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroupsListResponse, error) {
34886	gensupport.SetOptions(c.urlParams_, opts...)
34887	res, err := c.doRequest("json")
34888	if res != nil && res.StatusCode == http.StatusNotModified {
34889		if res.Body != nil {
34890			res.Body.Close()
34891		}
34892		return nil, &googleapi.Error{
34893			Code:   res.StatusCode,
34894			Header: res.Header,
34895		}
34896	}
34897	if err != nil {
34898		return nil, err
34899	}
34900	defer googleapi.CloseBody(res)
34901	if err := googleapi.CheckResponse(res); err != nil {
34902		return nil, err
34903	}
34904	ret := &FloodlightActivityGroupsListResponse{
34905		ServerResponse: googleapi.ServerResponse{
34906			Header:         res.Header,
34907			HTTPStatusCode: res.StatusCode,
34908		},
34909	}
34910	target := &ret
34911	if err := gensupport.DecodeResponse(target, res); err != nil {
34912		return nil, err
34913	}
34914	return ret, nil
34915	// {
34916	//   "description": "Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging.",
34917	//   "flatPath": "userprofiles/{profileId}/floodlightActivityGroups",
34918	//   "httpMethod": "GET",
34919	//   "id": "dfareporting.floodlightActivityGroups.list",
34920	//   "parameterOrder": [
34921	//     "profileId"
34922	//   ],
34923	//   "parameters": {
34924	//     "advertiserId": {
34925	//       "description": "Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
34926	//       "format": "int64",
34927	//       "location": "query",
34928	//       "type": "string"
34929	//     },
34930	//     "floodlightConfigurationId": {
34931	//       "description": "Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId for a non-empty result.",
34932	//       "format": "int64",
34933	//       "location": "query",
34934	//       "type": "string"
34935	//     },
34936	//     "ids": {
34937	//       "description": "Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
34938	//       "format": "int64",
34939	//       "location": "query",
34940	//       "repeated": true,
34941	//       "type": "string"
34942	//     },
34943	//     "maxResults": {
34944	//       "default": "1000",
34945	//       "description": "Maximum number of results to return.",
34946	//       "format": "int32",
34947	//       "location": "query",
34948	//       "maximum": "1000",
34949	//       "minimum": "0",
34950	//       "type": "integer"
34951	//     },
34952	//     "pageToken": {
34953	//       "description": "Value of the nextPageToken from the previous result page.",
34954	//       "location": "query",
34955	//       "type": "string"
34956	//     },
34957	//     "profileId": {
34958	//       "description": "User profile ID associated with this request.",
34959	//       "format": "int64",
34960	//       "location": "path",
34961	//       "required": true,
34962	//       "type": "string"
34963	//     },
34964	//     "searchString": {
34965	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"floodlightactivitygroup*2015\" will return objects with names like \"floodlightactivitygroup June 2015\", \"floodlightactivitygroup April 2015\", or simply \"floodlightactivitygroup 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"floodlightactivitygroup\" will match objects with name \"my floodlightactivitygroup activity\", \"floodlightactivitygroup 2015\", or simply \"floodlightactivitygroup\".",
34966	//       "location": "query",
34967	//       "type": "string"
34968	//     },
34969	//     "sortField": {
34970	//       "default": "ID",
34971	//       "description": "Field by which to sort the list.",
34972	//       "enum": [
34973	//         "ID",
34974	//         "NAME"
34975	//       ],
34976	//       "enumDescriptions": [
34977	//         "",
34978	//         ""
34979	//       ],
34980	//       "location": "query",
34981	//       "type": "string"
34982	//     },
34983	//     "sortOrder": {
34984	//       "default": "ASCENDING",
34985	//       "description": "Order of sorted results.",
34986	//       "enum": [
34987	//         "ASCENDING",
34988	//         "DESCENDING"
34989	//       ],
34990	//       "enumDescriptions": [
34991	//         "",
34992	//         ""
34993	//       ],
34994	//       "location": "query",
34995	//       "type": "string"
34996	//     },
34997	//     "type": {
34998	//       "description": "Select only floodlight activity groups with the specified floodlight activity group type.",
34999	//       "enum": [
35000	//         "COUNTER",
35001	//         "SALE"
35002	//       ],
35003	//       "enumDescriptions": [
35004	//         "",
35005	//         ""
35006	//       ],
35007	//       "location": "query",
35008	//       "type": "string"
35009	//     }
35010	//   },
35011	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
35012	//   "response": {
35013	//     "$ref": "FloodlightActivityGroupsListResponse"
35014	//   },
35015	//   "scopes": [
35016	//     "https://www.googleapis.com/auth/dfatrafficking"
35017	//   ]
35018	// }
35019
35020}
35021
35022// Pages invokes f for each page of results.
35023// A non-nil error returned from f will halt the iteration.
35024// The provided context supersedes any context provided to the Context method.
35025func (c *FloodlightActivityGroupsListCall) Pages(ctx context.Context, f func(*FloodlightActivityGroupsListResponse) error) error {
35026	c.ctx_ = ctx
35027	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
35028	for {
35029		x, err := c.Do()
35030		if err != nil {
35031			return err
35032		}
35033		if err := f(x); err != nil {
35034			return err
35035		}
35036		if x.NextPageToken == "" {
35037			return nil
35038		}
35039		c.PageToken(x.NextPageToken)
35040	}
35041}
35042
35043// method id "dfareporting.floodlightActivityGroups.patch":
35044
35045type FloodlightActivityGroupsPatchCall struct {
35046	s                       *Service
35047	profileId               int64
35048	floodlightactivitygroup *FloodlightActivityGroup
35049	urlParams_              gensupport.URLParams
35050	ctx_                    context.Context
35051	header_                 http.Header
35052}
35053
35054// Patch: Updates an existing floodlight activity group. This method
35055// supports patch semantics.
35056//
35057// - id: FloodlightActivityGroup ID.
35058// - profileId: User profile ID associated with this request.
35059func (r *FloodlightActivityGroupsService) Patch(profileId int64, id int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsPatchCall {
35060	c := &FloodlightActivityGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35061	c.profileId = profileId
35062	c.urlParams_.Set("id", fmt.Sprint(id))
35063	c.floodlightactivitygroup = floodlightactivitygroup
35064	return c
35065}
35066
35067// Fields allows partial responses to be retrieved. See
35068// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35069// for more information.
35070func (c *FloodlightActivityGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsPatchCall {
35071	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35072	return c
35073}
35074
35075// Context sets the context to be used in this call's Do method. Any
35076// pending HTTP request will be aborted if the provided context is
35077// canceled.
35078func (c *FloodlightActivityGroupsPatchCall) Context(ctx context.Context) *FloodlightActivityGroupsPatchCall {
35079	c.ctx_ = ctx
35080	return c
35081}
35082
35083// Header returns an http.Header that can be modified by the caller to
35084// add HTTP headers to the request.
35085func (c *FloodlightActivityGroupsPatchCall) Header() http.Header {
35086	if c.header_ == nil {
35087		c.header_ = make(http.Header)
35088	}
35089	return c.header_
35090}
35091
35092func (c *FloodlightActivityGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
35093	reqHeaders := make(http.Header)
35094	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
35095	for k, v := range c.header_ {
35096		reqHeaders[k] = v
35097	}
35098	reqHeaders.Set("User-Agent", c.s.userAgent())
35099	var body io.Reader = nil
35100	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
35101	if err != nil {
35102		return nil, err
35103	}
35104	reqHeaders.Set("Content-Type", "application/json")
35105	c.urlParams_.Set("alt", alt)
35106	c.urlParams_.Set("prettyPrint", "false")
35107	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
35108	urls += "?" + c.urlParams_.Encode()
35109	req, err := http.NewRequest("PATCH", urls, body)
35110	if err != nil {
35111		return nil, err
35112	}
35113	req.Header = reqHeaders
35114	googleapi.Expand(req.URL, map[string]string{
35115		"profileId": strconv.FormatInt(c.profileId, 10),
35116	})
35117	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35118}
35119
35120// Do executes the "dfareporting.floodlightActivityGroups.patch" call.
35121// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
35122// non-2xx status code is an error. Response headers are in either
35123// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
35124// returned at all) in error.(*googleapi.Error).Header. Use
35125// googleapi.IsNotModified to check whether the returned error was
35126// because http.StatusNotModified was returned.
35127func (c *FloodlightActivityGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
35128	gensupport.SetOptions(c.urlParams_, opts...)
35129	res, err := c.doRequest("json")
35130	if res != nil && res.StatusCode == http.StatusNotModified {
35131		if res.Body != nil {
35132			res.Body.Close()
35133		}
35134		return nil, &googleapi.Error{
35135			Code:   res.StatusCode,
35136			Header: res.Header,
35137		}
35138	}
35139	if err != nil {
35140		return nil, err
35141	}
35142	defer googleapi.CloseBody(res)
35143	if err := googleapi.CheckResponse(res); err != nil {
35144		return nil, err
35145	}
35146	ret := &FloodlightActivityGroup{
35147		ServerResponse: googleapi.ServerResponse{
35148			Header:         res.Header,
35149			HTTPStatusCode: res.StatusCode,
35150		},
35151	}
35152	target := &ret
35153	if err := gensupport.DecodeResponse(target, res); err != nil {
35154		return nil, err
35155	}
35156	return ret, nil
35157	// {
35158	//   "description": "Updates an existing floodlight activity group. This method supports patch semantics.",
35159	//   "flatPath": "userprofiles/{profileId}/floodlightActivityGroups",
35160	//   "httpMethod": "PATCH",
35161	//   "id": "dfareporting.floodlightActivityGroups.patch",
35162	//   "parameterOrder": [
35163	//     "profileId",
35164	//     "id"
35165	//   ],
35166	//   "parameters": {
35167	//     "id": {
35168	//       "description": "FloodlightActivityGroup ID.",
35169	//       "format": "int64",
35170	//       "location": "query",
35171	//       "required": true,
35172	//       "type": "string"
35173	//     },
35174	//     "profileId": {
35175	//       "description": "User profile ID associated with this request.",
35176	//       "format": "int64",
35177	//       "location": "path",
35178	//       "required": true,
35179	//       "type": "string"
35180	//     }
35181	//   },
35182	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
35183	//   "request": {
35184	//     "$ref": "FloodlightActivityGroup"
35185	//   },
35186	//   "response": {
35187	//     "$ref": "FloodlightActivityGroup"
35188	//   },
35189	//   "scopes": [
35190	//     "https://www.googleapis.com/auth/dfatrafficking"
35191	//   ]
35192	// }
35193
35194}
35195
35196// method id "dfareporting.floodlightActivityGroups.update":
35197
35198type FloodlightActivityGroupsUpdateCall struct {
35199	s                       *Service
35200	profileId               int64
35201	floodlightactivitygroup *FloodlightActivityGroup
35202	urlParams_              gensupport.URLParams
35203	ctx_                    context.Context
35204	header_                 http.Header
35205}
35206
35207// Update: Updates an existing floodlight activity group.
35208//
35209// - profileId: User profile ID associated with this request.
35210func (r *FloodlightActivityGroupsService) Update(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsUpdateCall {
35211	c := &FloodlightActivityGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35212	c.profileId = profileId
35213	c.floodlightactivitygroup = floodlightactivitygroup
35214	return c
35215}
35216
35217// Fields allows partial responses to be retrieved. See
35218// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35219// for more information.
35220func (c *FloodlightActivityGroupsUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsUpdateCall {
35221	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35222	return c
35223}
35224
35225// Context sets the context to be used in this call's Do method. Any
35226// pending HTTP request will be aborted if the provided context is
35227// canceled.
35228func (c *FloodlightActivityGroupsUpdateCall) Context(ctx context.Context) *FloodlightActivityGroupsUpdateCall {
35229	c.ctx_ = ctx
35230	return c
35231}
35232
35233// Header returns an http.Header that can be modified by the caller to
35234// add HTTP headers to the request.
35235func (c *FloodlightActivityGroupsUpdateCall) Header() http.Header {
35236	if c.header_ == nil {
35237		c.header_ = make(http.Header)
35238	}
35239	return c.header_
35240}
35241
35242func (c *FloodlightActivityGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
35243	reqHeaders := make(http.Header)
35244	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
35245	for k, v := range c.header_ {
35246		reqHeaders[k] = v
35247	}
35248	reqHeaders.Set("User-Agent", c.s.userAgent())
35249	var body io.Reader = nil
35250	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
35251	if err != nil {
35252		return nil, err
35253	}
35254	reqHeaders.Set("Content-Type", "application/json")
35255	c.urlParams_.Set("alt", alt)
35256	c.urlParams_.Set("prettyPrint", "false")
35257	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
35258	urls += "?" + c.urlParams_.Encode()
35259	req, err := http.NewRequest("PUT", urls, body)
35260	if err != nil {
35261		return nil, err
35262	}
35263	req.Header = reqHeaders
35264	googleapi.Expand(req.URL, map[string]string{
35265		"profileId": strconv.FormatInt(c.profileId, 10),
35266	})
35267	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35268}
35269
35270// Do executes the "dfareporting.floodlightActivityGroups.update" call.
35271// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
35272// non-2xx status code is an error. Response headers are in either
35273// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
35274// returned at all) in error.(*googleapi.Error).Header. Use
35275// googleapi.IsNotModified to check whether the returned error was
35276// because http.StatusNotModified was returned.
35277func (c *FloodlightActivityGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
35278	gensupport.SetOptions(c.urlParams_, opts...)
35279	res, err := c.doRequest("json")
35280	if res != nil && res.StatusCode == http.StatusNotModified {
35281		if res.Body != nil {
35282			res.Body.Close()
35283		}
35284		return nil, &googleapi.Error{
35285			Code:   res.StatusCode,
35286			Header: res.Header,
35287		}
35288	}
35289	if err != nil {
35290		return nil, err
35291	}
35292	defer googleapi.CloseBody(res)
35293	if err := googleapi.CheckResponse(res); err != nil {
35294		return nil, err
35295	}
35296	ret := &FloodlightActivityGroup{
35297		ServerResponse: googleapi.ServerResponse{
35298			Header:         res.Header,
35299			HTTPStatusCode: res.StatusCode,
35300		},
35301	}
35302	target := &ret
35303	if err := gensupport.DecodeResponse(target, res); err != nil {
35304		return nil, err
35305	}
35306	return ret, nil
35307	// {
35308	//   "description": "Updates an existing floodlight activity group.",
35309	//   "flatPath": "userprofiles/{profileId}/floodlightActivityGroups",
35310	//   "httpMethod": "PUT",
35311	//   "id": "dfareporting.floodlightActivityGroups.update",
35312	//   "parameterOrder": [
35313	//     "profileId"
35314	//   ],
35315	//   "parameters": {
35316	//     "profileId": {
35317	//       "description": "User profile ID associated with this request.",
35318	//       "format": "int64",
35319	//       "location": "path",
35320	//       "required": true,
35321	//       "type": "string"
35322	//     }
35323	//   },
35324	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
35325	//   "request": {
35326	//     "$ref": "FloodlightActivityGroup"
35327	//   },
35328	//   "response": {
35329	//     "$ref": "FloodlightActivityGroup"
35330	//   },
35331	//   "scopes": [
35332	//     "https://www.googleapis.com/auth/dfatrafficking"
35333	//   ]
35334	// }
35335
35336}
35337
35338// method id "dfareporting.floodlightConfigurations.get":
35339
35340type FloodlightConfigurationsGetCall struct {
35341	s            *Service
35342	profileId    int64
35343	id           int64
35344	urlParams_   gensupport.URLParams
35345	ifNoneMatch_ string
35346	ctx_         context.Context
35347	header_      http.Header
35348}
35349
35350// Get: Gets one floodlight configuration by ID.
35351//
35352// - id: Floodlight configuration ID.
35353// - profileId: User profile ID associated with this request.
35354func (r *FloodlightConfigurationsService) Get(profileId int64, id int64) *FloodlightConfigurationsGetCall {
35355	c := &FloodlightConfigurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35356	c.profileId = profileId
35357	c.id = id
35358	return c
35359}
35360
35361// Fields allows partial responses to be retrieved. See
35362// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35363// for more information.
35364func (c *FloodlightConfigurationsGetCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsGetCall {
35365	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35366	return c
35367}
35368
35369// IfNoneMatch sets the optional parameter which makes the operation
35370// fail if the object's ETag matches the given value. This is useful for
35371// getting updates only after the object has changed since the last
35372// request. Use googleapi.IsNotModified to check whether the response
35373// error from Do is the result of In-None-Match.
35374func (c *FloodlightConfigurationsGetCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsGetCall {
35375	c.ifNoneMatch_ = entityTag
35376	return c
35377}
35378
35379// Context sets the context to be used in this call's Do method. Any
35380// pending HTTP request will be aborted if the provided context is
35381// canceled.
35382func (c *FloodlightConfigurationsGetCall) Context(ctx context.Context) *FloodlightConfigurationsGetCall {
35383	c.ctx_ = ctx
35384	return c
35385}
35386
35387// Header returns an http.Header that can be modified by the caller to
35388// add HTTP headers to the request.
35389func (c *FloodlightConfigurationsGetCall) Header() http.Header {
35390	if c.header_ == nil {
35391		c.header_ = make(http.Header)
35392	}
35393	return c.header_
35394}
35395
35396func (c *FloodlightConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
35397	reqHeaders := make(http.Header)
35398	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
35399	for k, v := range c.header_ {
35400		reqHeaders[k] = v
35401	}
35402	reqHeaders.Set("User-Agent", c.s.userAgent())
35403	if c.ifNoneMatch_ != "" {
35404		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35405	}
35406	var body io.Reader = nil
35407	c.urlParams_.Set("alt", alt)
35408	c.urlParams_.Set("prettyPrint", "false")
35409	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations/{id}")
35410	urls += "?" + c.urlParams_.Encode()
35411	req, err := http.NewRequest("GET", urls, body)
35412	if err != nil {
35413		return nil, err
35414	}
35415	req.Header = reqHeaders
35416	googleapi.Expand(req.URL, map[string]string{
35417		"profileId": strconv.FormatInt(c.profileId, 10),
35418		"id":        strconv.FormatInt(c.id, 10),
35419	})
35420	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35421}
35422
35423// Do executes the "dfareporting.floodlightConfigurations.get" call.
35424// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
35425// non-2xx status code is an error. Response headers are in either
35426// *FloodlightConfiguration.ServerResponse.Header or (if a response was
35427// returned at all) in error.(*googleapi.Error).Header. Use
35428// googleapi.IsNotModified to check whether the returned error was
35429// because http.StatusNotModified was returned.
35430func (c *FloodlightConfigurationsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
35431	gensupport.SetOptions(c.urlParams_, opts...)
35432	res, err := c.doRequest("json")
35433	if res != nil && res.StatusCode == http.StatusNotModified {
35434		if res.Body != nil {
35435			res.Body.Close()
35436		}
35437		return nil, &googleapi.Error{
35438			Code:   res.StatusCode,
35439			Header: res.Header,
35440		}
35441	}
35442	if err != nil {
35443		return nil, err
35444	}
35445	defer googleapi.CloseBody(res)
35446	if err := googleapi.CheckResponse(res); err != nil {
35447		return nil, err
35448	}
35449	ret := &FloodlightConfiguration{
35450		ServerResponse: googleapi.ServerResponse{
35451			Header:         res.Header,
35452			HTTPStatusCode: res.StatusCode,
35453		},
35454	}
35455	target := &ret
35456	if err := gensupport.DecodeResponse(target, res); err != nil {
35457		return nil, err
35458	}
35459	return ret, nil
35460	// {
35461	//   "description": "Gets one floodlight configuration by ID.",
35462	//   "flatPath": "userprofiles/{profileId}/floodlightConfigurations/{id}",
35463	//   "httpMethod": "GET",
35464	//   "id": "dfareporting.floodlightConfigurations.get",
35465	//   "parameterOrder": [
35466	//     "profileId",
35467	//     "id"
35468	//   ],
35469	//   "parameters": {
35470	//     "id": {
35471	//       "description": "Floodlight configuration ID.",
35472	//       "format": "int64",
35473	//       "location": "path",
35474	//       "required": true,
35475	//       "type": "string"
35476	//     },
35477	//     "profileId": {
35478	//       "description": "User profile ID associated with this request.",
35479	//       "format": "int64",
35480	//       "location": "path",
35481	//       "required": true,
35482	//       "type": "string"
35483	//     }
35484	//   },
35485	//   "path": "userprofiles/{profileId}/floodlightConfigurations/{id}",
35486	//   "response": {
35487	//     "$ref": "FloodlightConfiguration"
35488	//   },
35489	//   "scopes": [
35490	//     "https://www.googleapis.com/auth/dfatrafficking"
35491	//   ]
35492	// }
35493
35494}
35495
35496// method id "dfareporting.floodlightConfigurations.list":
35497
35498type FloodlightConfigurationsListCall 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// List: Retrieves a list of floodlight configurations, possibly
35508// filtered.
35509//
35510// - profileId: User profile ID associated with this request.
35511func (r *FloodlightConfigurationsService) List(profileId int64) *FloodlightConfigurationsListCall {
35512	c := &FloodlightConfigurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35513	c.profileId = profileId
35514	return c
35515}
35516
35517// Ids sets the optional parameter "ids": Set of IDs of floodlight
35518// configurations to retrieve. Required field; otherwise an empty list
35519// will be returned.
35520func (c *FloodlightConfigurationsListCall) Ids(ids ...int64) *FloodlightConfigurationsListCall {
35521	var ids_ []string
35522	for _, v := range ids {
35523		ids_ = append(ids_, fmt.Sprint(v))
35524	}
35525	c.urlParams_.SetMulti("ids", ids_)
35526	return c
35527}
35528
35529// Fields allows partial responses to be retrieved. See
35530// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35531// for more information.
35532func (c *FloodlightConfigurationsListCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsListCall {
35533	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35534	return c
35535}
35536
35537// IfNoneMatch sets the optional parameter which makes the operation
35538// fail if the object's ETag matches the given value. This is useful for
35539// getting updates only after the object has changed since the last
35540// request. Use googleapi.IsNotModified to check whether the response
35541// error from Do is the result of In-None-Match.
35542func (c *FloodlightConfigurationsListCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsListCall {
35543	c.ifNoneMatch_ = entityTag
35544	return c
35545}
35546
35547// Context sets the context to be used in this call's Do method. Any
35548// pending HTTP request will be aborted if the provided context is
35549// canceled.
35550func (c *FloodlightConfigurationsListCall) Context(ctx context.Context) *FloodlightConfigurationsListCall {
35551	c.ctx_ = ctx
35552	return c
35553}
35554
35555// Header returns an http.Header that can be modified by the caller to
35556// add HTTP headers to the request.
35557func (c *FloodlightConfigurationsListCall) Header() http.Header {
35558	if c.header_ == nil {
35559		c.header_ = make(http.Header)
35560	}
35561	return c.header_
35562}
35563
35564func (c *FloodlightConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
35565	reqHeaders := make(http.Header)
35566	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
35567	for k, v := range c.header_ {
35568		reqHeaders[k] = v
35569	}
35570	reqHeaders.Set("User-Agent", c.s.userAgent())
35571	if c.ifNoneMatch_ != "" {
35572		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35573	}
35574	var body io.Reader = nil
35575	c.urlParams_.Set("alt", alt)
35576	c.urlParams_.Set("prettyPrint", "false")
35577	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
35578	urls += "?" + c.urlParams_.Encode()
35579	req, err := http.NewRequest("GET", urls, body)
35580	if err != nil {
35581		return nil, err
35582	}
35583	req.Header = reqHeaders
35584	googleapi.Expand(req.URL, map[string]string{
35585		"profileId": strconv.FormatInt(c.profileId, 10),
35586	})
35587	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35588}
35589
35590// Do executes the "dfareporting.floodlightConfigurations.list" call.
35591// Exactly one of *FloodlightConfigurationsListResponse or error will be
35592// non-nil. Any non-2xx status code is an error. Response headers are in
35593// either *FloodlightConfigurationsListResponse.ServerResponse.Header or
35594// (if a response was returned at all) in
35595// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
35596// whether the returned error was because http.StatusNotModified was
35597// returned.
35598func (c *FloodlightConfigurationsListCall) Do(opts ...googleapi.CallOption) (*FloodlightConfigurationsListResponse, error) {
35599	gensupport.SetOptions(c.urlParams_, opts...)
35600	res, err := c.doRequest("json")
35601	if res != nil && res.StatusCode == http.StatusNotModified {
35602		if res.Body != nil {
35603			res.Body.Close()
35604		}
35605		return nil, &googleapi.Error{
35606			Code:   res.StatusCode,
35607			Header: res.Header,
35608		}
35609	}
35610	if err != nil {
35611		return nil, err
35612	}
35613	defer googleapi.CloseBody(res)
35614	if err := googleapi.CheckResponse(res); err != nil {
35615		return nil, err
35616	}
35617	ret := &FloodlightConfigurationsListResponse{
35618		ServerResponse: googleapi.ServerResponse{
35619			Header:         res.Header,
35620			HTTPStatusCode: res.StatusCode,
35621		},
35622	}
35623	target := &ret
35624	if err := gensupport.DecodeResponse(target, res); err != nil {
35625		return nil, err
35626	}
35627	return ret, nil
35628	// {
35629	//   "description": "Retrieves a list of floodlight configurations, possibly filtered.",
35630	//   "flatPath": "userprofiles/{profileId}/floodlightConfigurations",
35631	//   "httpMethod": "GET",
35632	//   "id": "dfareporting.floodlightConfigurations.list",
35633	//   "parameterOrder": [
35634	//     "profileId"
35635	//   ],
35636	//   "parameters": {
35637	//     "ids": {
35638	//       "description": "Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned.",
35639	//       "format": "int64",
35640	//       "location": "query",
35641	//       "repeated": true,
35642	//       "type": "string"
35643	//     },
35644	//     "profileId": {
35645	//       "description": "User profile ID associated with this request.",
35646	//       "format": "int64",
35647	//       "location": "path",
35648	//       "required": true,
35649	//       "type": "string"
35650	//     }
35651	//   },
35652	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
35653	//   "response": {
35654	//     "$ref": "FloodlightConfigurationsListResponse"
35655	//   },
35656	//   "scopes": [
35657	//     "https://www.googleapis.com/auth/dfatrafficking"
35658	//   ]
35659	// }
35660
35661}
35662
35663// method id "dfareporting.floodlightConfigurations.patch":
35664
35665type FloodlightConfigurationsPatchCall struct {
35666	s                       *Service
35667	profileId               int64
35668	floodlightconfiguration *FloodlightConfiguration
35669	urlParams_              gensupport.URLParams
35670	ctx_                    context.Context
35671	header_                 http.Header
35672}
35673
35674// Patch: Updates an existing floodlight configuration. This method
35675// supports patch semantics.
35676//
35677// - id: FloodlightConfiguration ID.
35678// - profileId: User profile ID associated with this request.
35679func (r *FloodlightConfigurationsService) Patch(profileId int64, id int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsPatchCall {
35680	c := &FloodlightConfigurationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35681	c.profileId = profileId
35682	c.urlParams_.Set("id", fmt.Sprint(id))
35683	c.floodlightconfiguration = floodlightconfiguration
35684	return c
35685}
35686
35687// Fields allows partial responses to be retrieved. See
35688// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35689// for more information.
35690func (c *FloodlightConfigurationsPatchCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsPatchCall {
35691	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35692	return c
35693}
35694
35695// Context sets the context to be used in this call's Do method. Any
35696// pending HTTP request will be aborted if the provided context is
35697// canceled.
35698func (c *FloodlightConfigurationsPatchCall) Context(ctx context.Context) *FloodlightConfigurationsPatchCall {
35699	c.ctx_ = ctx
35700	return c
35701}
35702
35703// Header returns an http.Header that can be modified by the caller to
35704// add HTTP headers to the request.
35705func (c *FloodlightConfigurationsPatchCall) Header() http.Header {
35706	if c.header_ == nil {
35707		c.header_ = make(http.Header)
35708	}
35709	return c.header_
35710}
35711
35712func (c *FloodlightConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
35713	reqHeaders := make(http.Header)
35714	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
35715	for k, v := range c.header_ {
35716		reqHeaders[k] = v
35717	}
35718	reqHeaders.Set("User-Agent", c.s.userAgent())
35719	var body io.Reader = nil
35720	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
35721	if err != nil {
35722		return nil, err
35723	}
35724	reqHeaders.Set("Content-Type", "application/json")
35725	c.urlParams_.Set("alt", alt)
35726	c.urlParams_.Set("prettyPrint", "false")
35727	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
35728	urls += "?" + c.urlParams_.Encode()
35729	req, err := http.NewRequest("PATCH", urls, body)
35730	if err != nil {
35731		return nil, err
35732	}
35733	req.Header = reqHeaders
35734	googleapi.Expand(req.URL, map[string]string{
35735		"profileId": strconv.FormatInt(c.profileId, 10),
35736	})
35737	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35738}
35739
35740// Do executes the "dfareporting.floodlightConfigurations.patch" call.
35741// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
35742// non-2xx status code is an error. Response headers are in either
35743// *FloodlightConfiguration.ServerResponse.Header or (if a response was
35744// returned at all) in error.(*googleapi.Error).Header. Use
35745// googleapi.IsNotModified to check whether the returned error was
35746// because http.StatusNotModified was returned.
35747func (c *FloodlightConfigurationsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
35748	gensupport.SetOptions(c.urlParams_, opts...)
35749	res, err := c.doRequest("json")
35750	if res != nil && res.StatusCode == http.StatusNotModified {
35751		if res.Body != nil {
35752			res.Body.Close()
35753		}
35754		return nil, &googleapi.Error{
35755			Code:   res.StatusCode,
35756			Header: res.Header,
35757		}
35758	}
35759	if err != nil {
35760		return nil, err
35761	}
35762	defer googleapi.CloseBody(res)
35763	if err := googleapi.CheckResponse(res); err != nil {
35764		return nil, err
35765	}
35766	ret := &FloodlightConfiguration{
35767		ServerResponse: googleapi.ServerResponse{
35768			Header:         res.Header,
35769			HTTPStatusCode: res.StatusCode,
35770		},
35771	}
35772	target := &ret
35773	if err := gensupport.DecodeResponse(target, res); err != nil {
35774		return nil, err
35775	}
35776	return ret, nil
35777	// {
35778	//   "description": "Updates an existing floodlight configuration. This method supports patch semantics.",
35779	//   "flatPath": "userprofiles/{profileId}/floodlightConfigurations",
35780	//   "httpMethod": "PATCH",
35781	//   "id": "dfareporting.floodlightConfigurations.patch",
35782	//   "parameterOrder": [
35783	//     "profileId",
35784	//     "id"
35785	//   ],
35786	//   "parameters": {
35787	//     "id": {
35788	//       "description": "FloodlightConfiguration ID.",
35789	//       "format": "int64",
35790	//       "location": "query",
35791	//       "required": true,
35792	//       "type": "string"
35793	//     },
35794	//     "profileId": {
35795	//       "description": "User profile ID associated with this request.",
35796	//       "format": "int64",
35797	//       "location": "path",
35798	//       "required": true,
35799	//       "type": "string"
35800	//     }
35801	//   },
35802	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
35803	//   "request": {
35804	//     "$ref": "FloodlightConfiguration"
35805	//   },
35806	//   "response": {
35807	//     "$ref": "FloodlightConfiguration"
35808	//   },
35809	//   "scopes": [
35810	//     "https://www.googleapis.com/auth/dfatrafficking"
35811	//   ]
35812	// }
35813
35814}
35815
35816// method id "dfareporting.floodlightConfigurations.update":
35817
35818type FloodlightConfigurationsUpdateCall struct {
35819	s                       *Service
35820	profileId               int64
35821	floodlightconfiguration *FloodlightConfiguration
35822	urlParams_              gensupport.URLParams
35823	ctx_                    context.Context
35824	header_                 http.Header
35825}
35826
35827// Update: Updates an existing floodlight configuration.
35828//
35829// - profileId: User profile ID associated with this request.
35830func (r *FloodlightConfigurationsService) Update(profileId int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsUpdateCall {
35831	c := &FloodlightConfigurationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35832	c.profileId = profileId
35833	c.floodlightconfiguration = floodlightconfiguration
35834	return c
35835}
35836
35837// Fields allows partial responses to be retrieved. See
35838// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35839// for more information.
35840func (c *FloodlightConfigurationsUpdateCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsUpdateCall {
35841	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35842	return c
35843}
35844
35845// Context sets the context to be used in this call's Do method. Any
35846// pending HTTP request will be aborted if the provided context is
35847// canceled.
35848func (c *FloodlightConfigurationsUpdateCall) Context(ctx context.Context) *FloodlightConfigurationsUpdateCall {
35849	c.ctx_ = ctx
35850	return c
35851}
35852
35853// Header returns an http.Header that can be modified by the caller to
35854// add HTTP headers to the request.
35855func (c *FloodlightConfigurationsUpdateCall) Header() http.Header {
35856	if c.header_ == nil {
35857		c.header_ = make(http.Header)
35858	}
35859	return c.header_
35860}
35861
35862func (c *FloodlightConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
35863	reqHeaders := make(http.Header)
35864	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
35865	for k, v := range c.header_ {
35866		reqHeaders[k] = v
35867	}
35868	reqHeaders.Set("User-Agent", c.s.userAgent())
35869	var body io.Reader = nil
35870	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
35871	if err != nil {
35872		return nil, err
35873	}
35874	reqHeaders.Set("Content-Type", "application/json")
35875	c.urlParams_.Set("alt", alt)
35876	c.urlParams_.Set("prettyPrint", "false")
35877	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
35878	urls += "?" + c.urlParams_.Encode()
35879	req, err := http.NewRequest("PUT", urls, body)
35880	if err != nil {
35881		return nil, err
35882	}
35883	req.Header = reqHeaders
35884	googleapi.Expand(req.URL, map[string]string{
35885		"profileId": strconv.FormatInt(c.profileId, 10),
35886	})
35887	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35888}
35889
35890// Do executes the "dfareporting.floodlightConfigurations.update" call.
35891// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
35892// non-2xx status code is an error. Response headers are in either
35893// *FloodlightConfiguration.ServerResponse.Header or (if a response was
35894// returned at all) in error.(*googleapi.Error).Header. Use
35895// googleapi.IsNotModified to check whether the returned error was
35896// because http.StatusNotModified was returned.
35897func (c *FloodlightConfigurationsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
35898	gensupport.SetOptions(c.urlParams_, opts...)
35899	res, err := c.doRequest("json")
35900	if res != nil && res.StatusCode == http.StatusNotModified {
35901		if res.Body != nil {
35902			res.Body.Close()
35903		}
35904		return nil, &googleapi.Error{
35905			Code:   res.StatusCode,
35906			Header: res.Header,
35907		}
35908	}
35909	if err != nil {
35910		return nil, err
35911	}
35912	defer googleapi.CloseBody(res)
35913	if err := googleapi.CheckResponse(res); err != nil {
35914		return nil, err
35915	}
35916	ret := &FloodlightConfiguration{
35917		ServerResponse: googleapi.ServerResponse{
35918			Header:         res.Header,
35919			HTTPStatusCode: res.StatusCode,
35920		},
35921	}
35922	target := &ret
35923	if err := gensupport.DecodeResponse(target, res); err != nil {
35924		return nil, err
35925	}
35926	return ret, nil
35927	// {
35928	//   "description": "Updates an existing floodlight configuration.",
35929	//   "flatPath": "userprofiles/{profileId}/floodlightConfigurations",
35930	//   "httpMethod": "PUT",
35931	//   "id": "dfareporting.floodlightConfigurations.update",
35932	//   "parameterOrder": [
35933	//     "profileId"
35934	//   ],
35935	//   "parameters": {
35936	//     "profileId": {
35937	//       "description": "User profile ID associated with this request.",
35938	//       "format": "int64",
35939	//       "location": "path",
35940	//       "required": true,
35941	//       "type": "string"
35942	//     }
35943	//   },
35944	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
35945	//   "request": {
35946	//     "$ref": "FloodlightConfiguration"
35947	//   },
35948	//   "response": {
35949	//     "$ref": "FloodlightConfiguration"
35950	//   },
35951	//   "scopes": [
35952	//     "https://www.googleapis.com/auth/dfatrafficking"
35953	//   ]
35954	// }
35955
35956}
35957
35958// method id "dfareporting.inventoryItems.get":
35959
35960type InventoryItemsGetCall struct {
35961	s            *Service
35962	profileId    int64
35963	projectId    int64
35964	id           int64
35965	urlParams_   gensupport.URLParams
35966	ifNoneMatch_ string
35967	ctx_         context.Context
35968	header_      http.Header
35969}
35970
35971// Get: Gets one inventory item by ID.
35972//
35973// - id: Inventory item ID.
35974// - profileId: User profile ID associated with this request.
35975// - projectId: Project ID for order documents.
35976func (r *InventoryItemsService) Get(profileId int64, projectId int64, id int64) *InventoryItemsGetCall {
35977	c := &InventoryItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35978	c.profileId = profileId
35979	c.projectId = projectId
35980	c.id = id
35981	return c
35982}
35983
35984// Fields allows partial responses to be retrieved. See
35985// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35986// for more information.
35987func (c *InventoryItemsGetCall) Fields(s ...googleapi.Field) *InventoryItemsGetCall {
35988	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35989	return c
35990}
35991
35992// IfNoneMatch sets the optional parameter which makes the operation
35993// fail if the object's ETag matches the given value. This is useful for
35994// getting updates only after the object has changed since the last
35995// request. Use googleapi.IsNotModified to check whether the response
35996// error from Do is the result of In-None-Match.
35997func (c *InventoryItemsGetCall) IfNoneMatch(entityTag string) *InventoryItemsGetCall {
35998	c.ifNoneMatch_ = entityTag
35999	return c
36000}
36001
36002// Context sets the context to be used in this call's Do method. Any
36003// pending HTTP request will be aborted if the provided context is
36004// canceled.
36005func (c *InventoryItemsGetCall) Context(ctx context.Context) *InventoryItemsGetCall {
36006	c.ctx_ = ctx
36007	return c
36008}
36009
36010// Header returns an http.Header that can be modified by the caller to
36011// add HTTP headers to the request.
36012func (c *InventoryItemsGetCall) Header() http.Header {
36013	if c.header_ == nil {
36014		c.header_ = make(http.Header)
36015	}
36016	return c.header_
36017}
36018
36019func (c *InventoryItemsGetCall) doRequest(alt string) (*http.Response, error) {
36020	reqHeaders := make(http.Header)
36021	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
36022	for k, v := range c.header_ {
36023		reqHeaders[k] = v
36024	}
36025	reqHeaders.Set("User-Agent", c.s.userAgent())
36026	if c.ifNoneMatch_ != "" {
36027		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36028	}
36029	var body io.Reader = nil
36030	c.urlParams_.Set("alt", alt)
36031	c.urlParams_.Set("prettyPrint", "false")
36032	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}")
36033	urls += "?" + c.urlParams_.Encode()
36034	req, err := http.NewRequest("GET", urls, body)
36035	if err != nil {
36036		return nil, err
36037	}
36038	req.Header = reqHeaders
36039	googleapi.Expand(req.URL, map[string]string{
36040		"profileId": strconv.FormatInt(c.profileId, 10),
36041		"projectId": strconv.FormatInt(c.projectId, 10),
36042		"id":        strconv.FormatInt(c.id, 10),
36043	})
36044	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36045}
36046
36047// Do executes the "dfareporting.inventoryItems.get" call.
36048// Exactly one of *InventoryItem or error will be non-nil. Any non-2xx
36049// status code is an error. Response headers are in either
36050// *InventoryItem.ServerResponse.Header or (if a response was returned
36051// at all) in error.(*googleapi.Error).Header. Use
36052// googleapi.IsNotModified to check whether the returned error was
36053// because http.StatusNotModified was returned.
36054func (c *InventoryItemsGetCall) Do(opts ...googleapi.CallOption) (*InventoryItem, error) {
36055	gensupport.SetOptions(c.urlParams_, opts...)
36056	res, err := c.doRequest("json")
36057	if res != nil && res.StatusCode == http.StatusNotModified {
36058		if res.Body != nil {
36059			res.Body.Close()
36060		}
36061		return nil, &googleapi.Error{
36062			Code:   res.StatusCode,
36063			Header: res.Header,
36064		}
36065	}
36066	if err != nil {
36067		return nil, err
36068	}
36069	defer googleapi.CloseBody(res)
36070	if err := googleapi.CheckResponse(res); err != nil {
36071		return nil, err
36072	}
36073	ret := &InventoryItem{
36074		ServerResponse: googleapi.ServerResponse{
36075			Header:         res.Header,
36076			HTTPStatusCode: res.StatusCode,
36077		},
36078	}
36079	target := &ret
36080	if err := gensupport.DecodeResponse(target, res); err != nil {
36081		return nil, err
36082	}
36083	return ret, nil
36084	// {
36085	//   "description": "Gets one inventory item by ID.",
36086	//   "flatPath": "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}",
36087	//   "httpMethod": "GET",
36088	//   "id": "dfareporting.inventoryItems.get",
36089	//   "parameterOrder": [
36090	//     "profileId",
36091	//     "projectId",
36092	//     "id"
36093	//   ],
36094	//   "parameters": {
36095	//     "id": {
36096	//       "description": "Inventory item ID.",
36097	//       "format": "int64",
36098	//       "location": "path",
36099	//       "required": true,
36100	//       "type": "string"
36101	//     },
36102	//     "profileId": {
36103	//       "description": "User profile ID associated with this request.",
36104	//       "format": "int64",
36105	//       "location": "path",
36106	//       "required": true,
36107	//       "type": "string"
36108	//     },
36109	//     "projectId": {
36110	//       "description": "Project ID for order documents.",
36111	//       "format": "int64",
36112	//       "location": "path",
36113	//       "required": true,
36114	//       "type": "string"
36115	//     }
36116	//   },
36117	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}",
36118	//   "response": {
36119	//     "$ref": "InventoryItem"
36120	//   },
36121	//   "scopes": [
36122	//     "https://www.googleapis.com/auth/dfatrafficking"
36123	//   ]
36124	// }
36125
36126}
36127
36128// method id "dfareporting.inventoryItems.list":
36129
36130type InventoryItemsListCall struct {
36131	s            *Service
36132	profileId    int64
36133	projectId    int64
36134	urlParams_   gensupport.URLParams
36135	ifNoneMatch_ string
36136	ctx_         context.Context
36137	header_      http.Header
36138}
36139
36140// List: Retrieves a list of inventory items, possibly filtered. This
36141// method supports paging.
36142//
36143// - profileId: User profile ID associated with this request.
36144// - projectId: Project ID for order documents.
36145func (r *InventoryItemsService) List(profileId int64, projectId int64) *InventoryItemsListCall {
36146	c := &InventoryItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36147	c.profileId = profileId
36148	c.projectId = projectId
36149	return c
36150}
36151
36152// Ids sets the optional parameter "ids": Select only inventory items
36153// with these IDs.
36154func (c *InventoryItemsListCall) Ids(ids ...int64) *InventoryItemsListCall {
36155	var ids_ []string
36156	for _, v := range ids {
36157		ids_ = append(ids_, fmt.Sprint(v))
36158	}
36159	c.urlParams_.SetMulti("ids", ids_)
36160	return c
36161}
36162
36163// InPlan sets the optional parameter "inPlan": Select only inventory
36164// items that are in plan.
36165func (c *InventoryItemsListCall) InPlan(inPlan bool) *InventoryItemsListCall {
36166	c.urlParams_.Set("inPlan", fmt.Sprint(inPlan))
36167	return c
36168}
36169
36170// MaxResults sets the optional parameter "maxResults": Maximum number
36171// of results to return.
36172func (c *InventoryItemsListCall) MaxResults(maxResults int64) *InventoryItemsListCall {
36173	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36174	return c
36175}
36176
36177// OrderId sets the optional parameter "orderId": Select only inventory
36178// items that belong to specified orders.
36179func (c *InventoryItemsListCall) OrderId(orderId ...int64) *InventoryItemsListCall {
36180	var orderId_ []string
36181	for _, v := range orderId {
36182		orderId_ = append(orderId_, fmt.Sprint(v))
36183	}
36184	c.urlParams_.SetMulti("orderId", orderId_)
36185	return c
36186}
36187
36188// PageToken sets the optional parameter "pageToken": Value of the
36189// nextPageToken from the previous result page.
36190func (c *InventoryItemsListCall) PageToken(pageToken string) *InventoryItemsListCall {
36191	c.urlParams_.Set("pageToken", pageToken)
36192	return c
36193}
36194
36195// SiteId sets the optional parameter "siteId": Select only inventory
36196// items that are associated with these sites.
36197func (c *InventoryItemsListCall) SiteId(siteId ...int64) *InventoryItemsListCall {
36198	var siteId_ []string
36199	for _, v := range siteId {
36200		siteId_ = append(siteId_, fmt.Sprint(v))
36201	}
36202	c.urlParams_.SetMulti("siteId", siteId_)
36203	return c
36204}
36205
36206// SortField sets the optional parameter "sortField": Field by which to
36207// sort the list.
36208//
36209// Possible values:
36210//   "ID" (default)
36211//   "NAME"
36212func (c *InventoryItemsListCall) SortField(sortField string) *InventoryItemsListCall {
36213	c.urlParams_.Set("sortField", sortField)
36214	return c
36215}
36216
36217// SortOrder sets the optional parameter "sortOrder": Order of sorted
36218// results.
36219//
36220// Possible values:
36221//   "ASCENDING" (default)
36222//   "DESCENDING"
36223func (c *InventoryItemsListCall) SortOrder(sortOrder string) *InventoryItemsListCall {
36224	c.urlParams_.Set("sortOrder", sortOrder)
36225	return c
36226}
36227
36228// Type sets the optional parameter "type": Select only inventory items
36229// with this type.
36230//
36231// Possible values:
36232//   "PLANNING_PLACEMENT_TYPE_REGULAR"
36233//   "PLANNING_PLACEMENT_TYPE_CREDIT"
36234func (c *InventoryItemsListCall) Type(type_ string) *InventoryItemsListCall {
36235	c.urlParams_.Set("type", type_)
36236	return c
36237}
36238
36239// Fields allows partial responses to be retrieved. See
36240// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36241// for more information.
36242func (c *InventoryItemsListCall) Fields(s ...googleapi.Field) *InventoryItemsListCall {
36243	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36244	return c
36245}
36246
36247// IfNoneMatch sets the optional parameter which makes the operation
36248// fail if the object's ETag matches the given value. This is useful for
36249// getting updates only after the object has changed since the last
36250// request. Use googleapi.IsNotModified to check whether the response
36251// error from Do is the result of In-None-Match.
36252func (c *InventoryItemsListCall) IfNoneMatch(entityTag string) *InventoryItemsListCall {
36253	c.ifNoneMatch_ = entityTag
36254	return c
36255}
36256
36257// Context sets the context to be used in this call's Do method. Any
36258// pending HTTP request will be aborted if the provided context is
36259// canceled.
36260func (c *InventoryItemsListCall) Context(ctx context.Context) *InventoryItemsListCall {
36261	c.ctx_ = ctx
36262	return c
36263}
36264
36265// Header returns an http.Header that can be modified by the caller to
36266// add HTTP headers to the request.
36267func (c *InventoryItemsListCall) Header() http.Header {
36268	if c.header_ == nil {
36269		c.header_ = make(http.Header)
36270	}
36271	return c.header_
36272}
36273
36274func (c *InventoryItemsListCall) doRequest(alt string) (*http.Response, error) {
36275	reqHeaders := make(http.Header)
36276	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
36277	for k, v := range c.header_ {
36278		reqHeaders[k] = v
36279	}
36280	reqHeaders.Set("User-Agent", c.s.userAgent())
36281	if c.ifNoneMatch_ != "" {
36282		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36283	}
36284	var body io.Reader = nil
36285	c.urlParams_.Set("alt", alt)
36286	c.urlParams_.Set("prettyPrint", "false")
36287	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems")
36288	urls += "?" + c.urlParams_.Encode()
36289	req, err := http.NewRequest("GET", urls, body)
36290	if err != nil {
36291		return nil, err
36292	}
36293	req.Header = reqHeaders
36294	googleapi.Expand(req.URL, map[string]string{
36295		"profileId": strconv.FormatInt(c.profileId, 10),
36296		"projectId": strconv.FormatInt(c.projectId, 10),
36297	})
36298	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36299}
36300
36301// Do executes the "dfareporting.inventoryItems.list" call.
36302// Exactly one of *InventoryItemsListResponse or error will be non-nil.
36303// Any non-2xx status code is an error. Response headers are in either
36304// *InventoryItemsListResponse.ServerResponse.Header or (if a response
36305// was returned at all) in error.(*googleapi.Error).Header. Use
36306// googleapi.IsNotModified to check whether the returned error was
36307// because http.StatusNotModified was returned.
36308func (c *InventoryItemsListCall) Do(opts ...googleapi.CallOption) (*InventoryItemsListResponse, error) {
36309	gensupport.SetOptions(c.urlParams_, opts...)
36310	res, err := c.doRequest("json")
36311	if res != nil && res.StatusCode == http.StatusNotModified {
36312		if res.Body != nil {
36313			res.Body.Close()
36314		}
36315		return nil, &googleapi.Error{
36316			Code:   res.StatusCode,
36317			Header: res.Header,
36318		}
36319	}
36320	if err != nil {
36321		return nil, err
36322	}
36323	defer googleapi.CloseBody(res)
36324	if err := googleapi.CheckResponse(res); err != nil {
36325		return nil, err
36326	}
36327	ret := &InventoryItemsListResponse{
36328		ServerResponse: googleapi.ServerResponse{
36329			Header:         res.Header,
36330			HTTPStatusCode: res.StatusCode,
36331		},
36332	}
36333	target := &ret
36334	if err := gensupport.DecodeResponse(target, res); err != nil {
36335		return nil, err
36336	}
36337	return ret, nil
36338	// {
36339	//   "description": "Retrieves a list of inventory items, possibly filtered. This method supports paging.",
36340	//   "flatPath": "userprofiles/{profileId}/projects/{projectId}/inventoryItems",
36341	//   "httpMethod": "GET",
36342	//   "id": "dfareporting.inventoryItems.list",
36343	//   "parameterOrder": [
36344	//     "profileId",
36345	//     "projectId"
36346	//   ],
36347	//   "parameters": {
36348	//     "ids": {
36349	//       "description": "Select only inventory items with these IDs.",
36350	//       "format": "int64",
36351	//       "location": "query",
36352	//       "repeated": true,
36353	//       "type": "string"
36354	//     },
36355	//     "inPlan": {
36356	//       "description": "Select only inventory items that are in plan.",
36357	//       "location": "query",
36358	//       "type": "boolean"
36359	//     },
36360	//     "maxResults": {
36361	//       "default": "1000",
36362	//       "description": "Maximum number of results to return.",
36363	//       "format": "int32",
36364	//       "location": "query",
36365	//       "maximum": "1000",
36366	//       "minimum": "0",
36367	//       "type": "integer"
36368	//     },
36369	//     "orderId": {
36370	//       "description": "Select only inventory items that belong to specified orders.",
36371	//       "format": "int64",
36372	//       "location": "query",
36373	//       "repeated": true,
36374	//       "type": "string"
36375	//     },
36376	//     "pageToken": {
36377	//       "description": "Value of the nextPageToken from the previous result page.",
36378	//       "location": "query",
36379	//       "type": "string"
36380	//     },
36381	//     "profileId": {
36382	//       "description": "User profile ID associated with this request.",
36383	//       "format": "int64",
36384	//       "location": "path",
36385	//       "required": true,
36386	//       "type": "string"
36387	//     },
36388	//     "projectId": {
36389	//       "description": "Project ID for order documents.",
36390	//       "format": "int64",
36391	//       "location": "path",
36392	//       "required": true,
36393	//       "type": "string"
36394	//     },
36395	//     "siteId": {
36396	//       "description": "Select only inventory items that are associated with these sites.",
36397	//       "format": "int64",
36398	//       "location": "query",
36399	//       "repeated": true,
36400	//       "type": "string"
36401	//     },
36402	//     "sortField": {
36403	//       "default": "ID",
36404	//       "description": "Field by which to sort the list.",
36405	//       "enum": [
36406	//         "ID",
36407	//         "NAME"
36408	//       ],
36409	//       "enumDescriptions": [
36410	//         "",
36411	//         ""
36412	//       ],
36413	//       "location": "query",
36414	//       "type": "string"
36415	//     },
36416	//     "sortOrder": {
36417	//       "default": "ASCENDING",
36418	//       "description": "Order of sorted results.",
36419	//       "enum": [
36420	//         "ASCENDING",
36421	//         "DESCENDING"
36422	//       ],
36423	//       "enumDescriptions": [
36424	//         "",
36425	//         ""
36426	//       ],
36427	//       "location": "query",
36428	//       "type": "string"
36429	//     },
36430	//     "type": {
36431	//       "description": "Select only inventory items with this type.",
36432	//       "enum": [
36433	//         "PLANNING_PLACEMENT_TYPE_REGULAR",
36434	//         "PLANNING_PLACEMENT_TYPE_CREDIT"
36435	//       ],
36436	//       "enumDescriptions": [
36437	//         "",
36438	//         ""
36439	//       ],
36440	//       "location": "query",
36441	//       "type": "string"
36442	//     }
36443	//   },
36444	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems",
36445	//   "response": {
36446	//     "$ref": "InventoryItemsListResponse"
36447	//   },
36448	//   "scopes": [
36449	//     "https://www.googleapis.com/auth/dfatrafficking"
36450	//   ]
36451	// }
36452
36453}
36454
36455// Pages invokes f for each page of results.
36456// A non-nil error returned from f will halt the iteration.
36457// The provided context supersedes any context provided to the Context method.
36458func (c *InventoryItemsListCall) Pages(ctx context.Context, f func(*InventoryItemsListResponse) error) error {
36459	c.ctx_ = ctx
36460	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
36461	for {
36462		x, err := c.Do()
36463		if err != nil {
36464			return err
36465		}
36466		if err := f(x); err != nil {
36467			return err
36468		}
36469		if x.NextPageToken == "" {
36470			return nil
36471		}
36472		c.PageToken(x.NextPageToken)
36473	}
36474}
36475
36476// method id "dfareporting.languages.list":
36477
36478type LanguagesListCall struct {
36479	s            *Service
36480	profileId    int64
36481	urlParams_   gensupport.URLParams
36482	ifNoneMatch_ string
36483	ctx_         context.Context
36484	header_      http.Header
36485}
36486
36487// List: Retrieves a list of languages.
36488//
36489// - profileId: User profile ID associated with this request.
36490func (r *LanguagesService) List(profileId int64) *LanguagesListCall {
36491	c := &LanguagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36492	c.profileId = profileId
36493	return c
36494}
36495
36496// Fields allows partial responses to be retrieved. See
36497// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36498// for more information.
36499func (c *LanguagesListCall) Fields(s ...googleapi.Field) *LanguagesListCall {
36500	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36501	return c
36502}
36503
36504// IfNoneMatch sets the optional parameter which makes the operation
36505// fail if the object's ETag matches the given value. This is useful for
36506// getting updates only after the object has changed since the last
36507// request. Use googleapi.IsNotModified to check whether the response
36508// error from Do is the result of In-None-Match.
36509func (c *LanguagesListCall) IfNoneMatch(entityTag string) *LanguagesListCall {
36510	c.ifNoneMatch_ = entityTag
36511	return c
36512}
36513
36514// Context sets the context to be used in this call's Do method. Any
36515// pending HTTP request will be aborted if the provided context is
36516// canceled.
36517func (c *LanguagesListCall) Context(ctx context.Context) *LanguagesListCall {
36518	c.ctx_ = ctx
36519	return c
36520}
36521
36522// Header returns an http.Header that can be modified by the caller to
36523// add HTTP headers to the request.
36524func (c *LanguagesListCall) Header() http.Header {
36525	if c.header_ == nil {
36526		c.header_ = make(http.Header)
36527	}
36528	return c.header_
36529}
36530
36531func (c *LanguagesListCall) doRequest(alt string) (*http.Response, error) {
36532	reqHeaders := make(http.Header)
36533	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
36534	for k, v := range c.header_ {
36535		reqHeaders[k] = v
36536	}
36537	reqHeaders.Set("User-Agent", c.s.userAgent())
36538	if c.ifNoneMatch_ != "" {
36539		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36540	}
36541	var body io.Reader = nil
36542	c.urlParams_.Set("alt", alt)
36543	c.urlParams_.Set("prettyPrint", "false")
36544	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/languages")
36545	urls += "?" + c.urlParams_.Encode()
36546	req, err := http.NewRequest("GET", urls, body)
36547	if err != nil {
36548		return nil, err
36549	}
36550	req.Header = reqHeaders
36551	googleapi.Expand(req.URL, map[string]string{
36552		"profileId": strconv.FormatInt(c.profileId, 10),
36553	})
36554	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36555}
36556
36557// Do executes the "dfareporting.languages.list" call.
36558// Exactly one of *LanguagesListResponse or error will be non-nil. Any
36559// non-2xx status code is an error. Response headers are in either
36560// *LanguagesListResponse.ServerResponse.Header or (if a response was
36561// returned at all) in error.(*googleapi.Error).Header. Use
36562// googleapi.IsNotModified to check whether the returned error was
36563// because http.StatusNotModified was returned.
36564func (c *LanguagesListCall) Do(opts ...googleapi.CallOption) (*LanguagesListResponse, error) {
36565	gensupport.SetOptions(c.urlParams_, opts...)
36566	res, err := c.doRequest("json")
36567	if res != nil && res.StatusCode == http.StatusNotModified {
36568		if res.Body != nil {
36569			res.Body.Close()
36570		}
36571		return nil, &googleapi.Error{
36572			Code:   res.StatusCode,
36573			Header: res.Header,
36574		}
36575	}
36576	if err != nil {
36577		return nil, err
36578	}
36579	defer googleapi.CloseBody(res)
36580	if err := googleapi.CheckResponse(res); err != nil {
36581		return nil, err
36582	}
36583	ret := &LanguagesListResponse{
36584		ServerResponse: googleapi.ServerResponse{
36585			Header:         res.Header,
36586			HTTPStatusCode: res.StatusCode,
36587		},
36588	}
36589	target := &ret
36590	if err := gensupport.DecodeResponse(target, res); err != nil {
36591		return nil, err
36592	}
36593	return ret, nil
36594	// {
36595	//   "description": "Retrieves a list of languages.",
36596	//   "flatPath": "userprofiles/{profileId}/languages",
36597	//   "httpMethod": "GET",
36598	//   "id": "dfareporting.languages.list",
36599	//   "parameterOrder": [
36600	//     "profileId"
36601	//   ],
36602	//   "parameters": {
36603	//     "profileId": {
36604	//       "description": "User profile ID associated with this request.",
36605	//       "format": "int64",
36606	//       "location": "path",
36607	//       "required": true,
36608	//       "type": "string"
36609	//     }
36610	//   },
36611	//   "path": "userprofiles/{profileId}/languages",
36612	//   "response": {
36613	//     "$ref": "LanguagesListResponse"
36614	//   },
36615	//   "scopes": [
36616	//     "https://www.googleapis.com/auth/dfatrafficking"
36617	//   ]
36618	// }
36619
36620}
36621
36622// method id "dfareporting.metros.list":
36623
36624type MetrosListCall struct {
36625	s            *Service
36626	profileId    int64
36627	urlParams_   gensupport.URLParams
36628	ifNoneMatch_ string
36629	ctx_         context.Context
36630	header_      http.Header
36631}
36632
36633// List: Retrieves a list of metros.
36634//
36635// - profileId: User profile ID associated with this request.
36636func (r *MetrosService) List(profileId int64) *MetrosListCall {
36637	c := &MetrosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36638	c.profileId = profileId
36639	return c
36640}
36641
36642// Fields allows partial responses to be retrieved. See
36643// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36644// for more information.
36645func (c *MetrosListCall) Fields(s ...googleapi.Field) *MetrosListCall {
36646	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36647	return c
36648}
36649
36650// IfNoneMatch sets the optional parameter which makes the operation
36651// fail if the object's ETag matches the given value. This is useful for
36652// getting updates only after the object has changed since the last
36653// request. Use googleapi.IsNotModified to check whether the response
36654// error from Do is the result of In-None-Match.
36655func (c *MetrosListCall) IfNoneMatch(entityTag string) *MetrosListCall {
36656	c.ifNoneMatch_ = entityTag
36657	return c
36658}
36659
36660// Context sets the context to be used in this call's Do method. Any
36661// pending HTTP request will be aborted if the provided context is
36662// canceled.
36663func (c *MetrosListCall) Context(ctx context.Context) *MetrosListCall {
36664	c.ctx_ = ctx
36665	return c
36666}
36667
36668// Header returns an http.Header that can be modified by the caller to
36669// add HTTP headers to the request.
36670func (c *MetrosListCall) Header() http.Header {
36671	if c.header_ == nil {
36672		c.header_ = make(http.Header)
36673	}
36674	return c.header_
36675}
36676
36677func (c *MetrosListCall) doRequest(alt string) (*http.Response, error) {
36678	reqHeaders := make(http.Header)
36679	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
36680	for k, v := range c.header_ {
36681		reqHeaders[k] = v
36682	}
36683	reqHeaders.Set("User-Agent", c.s.userAgent())
36684	if c.ifNoneMatch_ != "" {
36685		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36686	}
36687	var body io.Reader = nil
36688	c.urlParams_.Set("alt", alt)
36689	c.urlParams_.Set("prettyPrint", "false")
36690	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/metros")
36691	urls += "?" + c.urlParams_.Encode()
36692	req, err := http.NewRequest("GET", urls, body)
36693	if err != nil {
36694		return nil, err
36695	}
36696	req.Header = reqHeaders
36697	googleapi.Expand(req.URL, map[string]string{
36698		"profileId": strconv.FormatInt(c.profileId, 10),
36699	})
36700	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36701}
36702
36703// Do executes the "dfareporting.metros.list" call.
36704// Exactly one of *MetrosListResponse or error will be non-nil. Any
36705// non-2xx status code is an error. Response headers are in either
36706// *MetrosListResponse.ServerResponse.Header or (if a response was
36707// returned at all) in error.(*googleapi.Error).Header. Use
36708// googleapi.IsNotModified to check whether the returned error was
36709// because http.StatusNotModified was returned.
36710func (c *MetrosListCall) Do(opts ...googleapi.CallOption) (*MetrosListResponse, error) {
36711	gensupport.SetOptions(c.urlParams_, opts...)
36712	res, err := c.doRequest("json")
36713	if res != nil && res.StatusCode == http.StatusNotModified {
36714		if res.Body != nil {
36715			res.Body.Close()
36716		}
36717		return nil, &googleapi.Error{
36718			Code:   res.StatusCode,
36719			Header: res.Header,
36720		}
36721	}
36722	if err != nil {
36723		return nil, err
36724	}
36725	defer googleapi.CloseBody(res)
36726	if err := googleapi.CheckResponse(res); err != nil {
36727		return nil, err
36728	}
36729	ret := &MetrosListResponse{
36730		ServerResponse: googleapi.ServerResponse{
36731			Header:         res.Header,
36732			HTTPStatusCode: res.StatusCode,
36733		},
36734	}
36735	target := &ret
36736	if err := gensupport.DecodeResponse(target, res); err != nil {
36737		return nil, err
36738	}
36739	return ret, nil
36740	// {
36741	//   "description": "Retrieves a list of metros.",
36742	//   "flatPath": "userprofiles/{profileId}/metros",
36743	//   "httpMethod": "GET",
36744	//   "id": "dfareporting.metros.list",
36745	//   "parameterOrder": [
36746	//     "profileId"
36747	//   ],
36748	//   "parameters": {
36749	//     "profileId": {
36750	//       "description": "User profile ID associated with this request.",
36751	//       "format": "int64",
36752	//       "location": "path",
36753	//       "required": true,
36754	//       "type": "string"
36755	//     }
36756	//   },
36757	//   "path": "userprofiles/{profileId}/metros",
36758	//   "response": {
36759	//     "$ref": "MetrosListResponse"
36760	//   },
36761	//   "scopes": [
36762	//     "https://www.googleapis.com/auth/dfatrafficking"
36763	//   ]
36764	// }
36765
36766}
36767
36768// method id "dfareporting.mobileApps.get":
36769
36770type MobileAppsGetCall struct {
36771	s            *Service
36772	profileId    int64
36773	id           string
36774	urlParams_   gensupport.URLParams
36775	ifNoneMatch_ string
36776	ctx_         context.Context
36777	header_      http.Header
36778}
36779
36780// Get: Gets one mobile app by ID.
36781//
36782// - id: Mobile app ID.
36783// - profileId: User profile ID associated with this request.
36784func (r *MobileAppsService) Get(profileId int64, id string) *MobileAppsGetCall {
36785	c := &MobileAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36786	c.profileId = profileId
36787	c.id = id
36788	return c
36789}
36790
36791// Fields allows partial responses to be retrieved. See
36792// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36793// for more information.
36794func (c *MobileAppsGetCall) Fields(s ...googleapi.Field) *MobileAppsGetCall {
36795	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36796	return c
36797}
36798
36799// IfNoneMatch sets the optional parameter which makes the operation
36800// fail if the object's ETag matches the given value. This is useful for
36801// getting updates only after the object has changed since the last
36802// request. Use googleapi.IsNotModified to check whether the response
36803// error from Do is the result of In-None-Match.
36804func (c *MobileAppsGetCall) IfNoneMatch(entityTag string) *MobileAppsGetCall {
36805	c.ifNoneMatch_ = entityTag
36806	return c
36807}
36808
36809// Context sets the context to be used in this call's Do method. Any
36810// pending HTTP request will be aborted if the provided context is
36811// canceled.
36812func (c *MobileAppsGetCall) Context(ctx context.Context) *MobileAppsGetCall {
36813	c.ctx_ = ctx
36814	return c
36815}
36816
36817// Header returns an http.Header that can be modified by the caller to
36818// add HTTP headers to the request.
36819func (c *MobileAppsGetCall) Header() http.Header {
36820	if c.header_ == nil {
36821		c.header_ = make(http.Header)
36822	}
36823	return c.header_
36824}
36825
36826func (c *MobileAppsGetCall) doRequest(alt string) (*http.Response, error) {
36827	reqHeaders := make(http.Header)
36828	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
36829	for k, v := range c.header_ {
36830		reqHeaders[k] = v
36831	}
36832	reqHeaders.Set("User-Agent", c.s.userAgent())
36833	if c.ifNoneMatch_ != "" {
36834		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36835	}
36836	var body io.Reader = nil
36837	c.urlParams_.Set("alt", alt)
36838	c.urlParams_.Set("prettyPrint", "false")
36839	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileApps/{id}")
36840	urls += "?" + c.urlParams_.Encode()
36841	req, err := http.NewRequest("GET", urls, body)
36842	if err != nil {
36843		return nil, err
36844	}
36845	req.Header = reqHeaders
36846	googleapi.Expand(req.URL, map[string]string{
36847		"profileId": strconv.FormatInt(c.profileId, 10),
36848		"id":        c.id,
36849	})
36850	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36851}
36852
36853// Do executes the "dfareporting.mobileApps.get" call.
36854// Exactly one of *MobileApp or error will be non-nil. Any non-2xx
36855// status code is an error. Response headers are in either
36856// *MobileApp.ServerResponse.Header or (if a response was returned at
36857// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36858// to check whether the returned error was because
36859// http.StatusNotModified was returned.
36860func (c *MobileAppsGetCall) Do(opts ...googleapi.CallOption) (*MobileApp, error) {
36861	gensupport.SetOptions(c.urlParams_, opts...)
36862	res, err := c.doRequest("json")
36863	if res != nil && res.StatusCode == http.StatusNotModified {
36864		if res.Body != nil {
36865			res.Body.Close()
36866		}
36867		return nil, &googleapi.Error{
36868			Code:   res.StatusCode,
36869			Header: res.Header,
36870		}
36871	}
36872	if err != nil {
36873		return nil, err
36874	}
36875	defer googleapi.CloseBody(res)
36876	if err := googleapi.CheckResponse(res); err != nil {
36877		return nil, err
36878	}
36879	ret := &MobileApp{
36880		ServerResponse: googleapi.ServerResponse{
36881			Header:         res.Header,
36882			HTTPStatusCode: res.StatusCode,
36883		},
36884	}
36885	target := &ret
36886	if err := gensupport.DecodeResponse(target, res); err != nil {
36887		return nil, err
36888	}
36889	return ret, nil
36890	// {
36891	//   "description": "Gets one mobile app by ID.",
36892	//   "flatPath": "userprofiles/{profileId}/mobileApps/{id}",
36893	//   "httpMethod": "GET",
36894	//   "id": "dfareporting.mobileApps.get",
36895	//   "parameterOrder": [
36896	//     "profileId",
36897	//     "id"
36898	//   ],
36899	//   "parameters": {
36900	//     "id": {
36901	//       "description": "Mobile app ID.",
36902	//       "location": "path",
36903	//       "required": true,
36904	//       "type": "string"
36905	//     },
36906	//     "profileId": {
36907	//       "description": "User profile ID associated with this request.",
36908	//       "format": "int64",
36909	//       "location": "path",
36910	//       "required": true,
36911	//       "type": "string"
36912	//     }
36913	//   },
36914	//   "path": "userprofiles/{profileId}/mobileApps/{id}",
36915	//   "response": {
36916	//     "$ref": "MobileApp"
36917	//   },
36918	//   "scopes": [
36919	//     "https://www.googleapis.com/auth/dfatrafficking"
36920	//   ]
36921	// }
36922
36923}
36924
36925// method id "dfareporting.mobileApps.list":
36926
36927type MobileAppsListCall struct {
36928	s            *Service
36929	profileId    int64
36930	urlParams_   gensupport.URLParams
36931	ifNoneMatch_ string
36932	ctx_         context.Context
36933	header_      http.Header
36934}
36935
36936// List: Retrieves list of available mobile apps.
36937//
36938// - profileId: User profile ID associated with this request.
36939func (r *MobileAppsService) List(profileId int64) *MobileAppsListCall {
36940	c := &MobileAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36941	c.profileId = profileId
36942	return c
36943}
36944
36945// Directories sets the optional parameter "directories": Select only
36946// apps from these directories.
36947//
36948// Possible values:
36949//   "UNKNOWN"
36950//   "APPLE_APP_STORE"
36951//   "GOOGLE_PLAY_STORE"
36952func (c *MobileAppsListCall) Directories(directories ...string) *MobileAppsListCall {
36953	c.urlParams_.SetMulti("directories", append([]string{}, directories...))
36954	return c
36955}
36956
36957// Ids sets the optional parameter "ids": Select only apps with these
36958// IDs.
36959func (c *MobileAppsListCall) Ids(ids ...string) *MobileAppsListCall {
36960	c.urlParams_.SetMulti("ids", append([]string{}, ids...))
36961	return c
36962}
36963
36964// MaxResults sets the optional parameter "maxResults": Maximum number
36965// of results to return.
36966func (c *MobileAppsListCall) MaxResults(maxResults int64) *MobileAppsListCall {
36967	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36968	return c
36969}
36970
36971// PageToken sets the optional parameter "pageToken": Value of the
36972// nextPageToken from the previous result page.
36973func (c *MobileAppsListCall) PageToken(pageToken string) *MobileAppsListCall {
36974	c.urlParams_.Set("pageToken", pageToken)
36975	return c
36976}
36977
36978// SearchString sets the optional parameter "searchString": Allows
36979// searching for objects by name or ID. Wildcards (*) are allowed. For
36980// example, "app*2015" will return objects with names like "app Jan
36981// 2018", "app Jan 2018", or simply "app 2018". Most of the searches
36982// also add wildcards implicitly at the start and the end of the search
36983// string. For example, a search string of "app" will match objects with
36984// name "my app", "app 2018", or simply "app".
36985func (c *MobileAppsListCall) SearchString(searchString string) *MobileAppsListCall {
36986	c.urlParams_.Set("searchString", searchString)
36987	return c
36988}
36989
36990// Fields allows partial responses to be retrieved. See
36991// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36992// for more information.
36993func (c *MobileAppsListCall) Fields(s ...googleapi.Field) *MobileAppsListCall {
36994	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36995	return c
36996}
36997
36998// IfNoneMatch sets the optional parameter which makes the operation
36999// fail if the object's ETag matches the given value. This is useful for
37000// getting updates only after the object has changed since the last
37001// request. Use googleapi.IsNotModified to check whether the response
37002// error from Do is the result of In-None-Match.
37003func (c *MobileAppsListCall) IfNoneMatch(entityTag string) *MobileAppsListCall {
37004	c.ifNoneMatch_ = entityTag
37005	return c
37006}
37007
37008// Context sets the context to be used in this call's Do method. Any
37009// pending HTTP request will be aborted if the provided context is
37010// canceled.
37011func (c *MobileAppsListCall) Context(ctx context.Context) *MobileAppsListCall {
37012	c.ctx_ = ctx
37013	return c
37014}
37015
37016// Header returns an http.Header that can be modified by the caller to
37017// add HTTP headers to the request.
37018func (c *MobileAppsListCall) Header() http.Header {
37019	if c.header_ == nil {
37020		c.header_ = make(http.Header)
37021	}
37022	return c.header_
37023}
37024
37025func (c *MobileAppsListCall) doRequest(alt string) (*http.Response, error) {
37026	reqHeaders := make(http.Header)
37027	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
37028	for k, v := range c.header_ {
37029		reqHeaders[k] = v
37030	}
37031	reqHeaders.Set("User-Agent", c.s.userAgent())
37032	if c.ifNoneMatch_ != "" {
37033		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37034	}
37035	var body io.Reader = nil
37036	c.urlParams_.Set("alt", alt)
37037	c.urlParams_.Set("prettyPrint", "false")
37038	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileApps")
37039	urls += "?" + c.urlParams_.Encode()
37040	req, err := http.NewRequest("GET", urls, body)
37041	if err != nil {
37042		return nil, err
37043	}
37044	req.Header = reqHeaders
37045	googleapi.Expand(req.URL, map[string]string{
37046		"profileId": strconv.FormatInt(c.profileId, 10),
37047	})
37048	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37049}
37050
37051// Do executes the "dfareporting.mobileApps.list" call.
37052// Exactly one of *MobileAppsListResponse or error will be non-nil. Any
37053// non-2xx status code is an error. Response headers are in either
37054// *MobileAppsListResponse.ServerResponse.Header or (if a response was
37055// returned at all) in error.(*googleapi.Error).Header. Use
37056// googleapi.IsNotModified to check whether the returned error was
37057// because http.StatusNotModified was returned.
37058func (c *MobileAppsListCall) Do(opts ...googleapi.CallOption) (*MobileAppsListResponse, error) {
37059	gensupport.SetOptions(c.urlParams_, opts...)
37060	res, err := c.doRequest("json")
37061	if res != nil && res.StatusCode == http.StatusNotModified {
37062		if res.Body != nil {
37063			res.Body.Close()
37064		}
37065		return nil, &googleapi.Error{
37066			Code:   res.StatusCode,
37067			Header: res.Header,
37068		}
37069	}
37070	if err != nil {
37071		return nil, err
37072	}
37073	defer googleapi.CloseBody(res)
37074	if err := googleapi.CheckResponse(res); err != nil {
37075		return nil, err
37076	}
37077	ret := &MobileAppsListResponse{
37078		ServerResponse: googleapi.ServerResponse{
37079			Header:         res.Header,
37080			HTTPStatusCode: res.StatusCode,
37081		},
37082	}
37083	target := &ret
37084	if err := gensupport.DecodeResponse(target, res); err != nil {
37085		return nil, err
37086	}
37087	return ret, nil
37088	// {
37089	//   "description": "Retrieves list of available mobile apps.",
37090	//   "flatPath": "userprofiles/{profileId}/mobileApps",
37091	//   "httpMethod": "GET",
37092	//   "id": "dfareporting.mobileApps.list",
37093	//   "parameterOrder": [
37094	//     "profileId"
37095	//   ],
37096	//   "parameters": {
37097	//     "directories": {
37098	//       "description": "Select only apps from these directories.",
37099	//       "enum": [
37100	//         "UNKNOWN",
37101	//         "APPLE_APP_STORE",
37102	//         "GOOGLE_PLAY_STORE"
37103	//       ],
37104	//       "enumDescriptions": [
37105	//         "",
37106	//         "",
37107	//         ""
37108	//       ],
37109	//       "location": "query",
37110	//       "repeated": true,
37111	//       "type": "string"
37112	//     },
37113	//     "ids": {
37114	//       "description": "Select only apps with these IDs.",
37115	//       "location": "query",
37116	//       "repeated": true,
37117	//       "type": "string"
37118	//     },
37119	//     "maxResults": {
37120	//       "default": "1000",
37121	//       "description": "Maximum number of results to return.",
37122	//       "format": "int32",
37123	//       "location": "query",
37124	//       "maximum": "1000",
37125	//       "minimum": "0",
37126	//       "type": "integer"
37127	//     },
37128	//     "pageToken": {
37129	//       "description": "Value of the nextPageToken from the previous result page.",
37130	//       "location": "query",
37131	//       "type": "string"
37132	//     },
37133	//     "profileId": {
37134	//       "description": "User profile ID associated with this request.",
37135	//       "format": "int64",
37136	//       "location": "path",
37137	//       "required": true,
37138	//       "type": "string"
37139	//     },
37140	//     "searchString": {
37141	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"app*2015\" will return objects with names like \"app Jan 2018\", \"app Jan 2018\", or simply \"app 2018\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"app\" will match objects with name \"my app\", \"app 2018\", or simply \"app\".",
37142	//       "location": "query",
37143	//       "type": "string"
37144	//     }
37145	//   },
37146	//   "path": "userprofiles/{profileId}/mobileApps",
37147	//   "response": {
37148	//     "$ref": "MobileAppsListResponse"
37149	//   },
37150	//   "scopes": [
37151	//     "https://www.googleapis.com/auth/dfatrafficking"
37152	//   ]
37153	// }
37154
37155}
37156
37157// Pages invokes f for each page of results.
37158// A non-nil error returned from f will halt the iteration.
37159// The provided context supersedes any context provided to the Context method.
37160func (c *MobileAppsListCall) Pages(ctx context.Context, f func(*MobileAppsListResponse) error) error {
37161	c.ctx_ = ctx
37162	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37163	for {
37164		x, err := c.Do()
37165		if err != nil {
37166			return err
37167		}
37168		if err := f(x); err != nil {
37169			return err
37170		}
37171		if x.NextPageToken == "" {
37172			return nil
37173		}
37174		c.PageToken(x.NextPageToken)
37175	}
37176}
37177
37178// method id "dfareporting.mobileCarriers.get":
37179
37180type MobileCarriersGetCall struct {
37181	s            *Service
37182	profileId    int64
37183	id           int64
37184	urlParams_   gensupport.URLParams
37185	ifNoneMatch_ string
37186	ctx_         context.Context
37187	header_      http.Header
37188}
37189
37190// Get: Gets one mobile carrier by ID.
37191//
37192// - id: Mobile carrier ID.
37193// - profileId: User profile ID associated with this request.
37194func (r *MobileCarriersService) Get(profileId int64, id int64) *MobileCarriersGetCall {
37195	c := &MobileCarriersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37196	c.profileId = profileId
37197	c.id = id
37198	return c
37199}
37200
37201// Fields allows partial responses to be retrieved. See
37202// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37203// for more information.
37204func (c *MobileCarriersGetCall) Fields(s ...googleapi.Field) *MobileCarriersGetCall {
37205	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37206	return c
37207}
37208
37209// IfNoneMatch sets the optional parameter which makes the operation
37210// fail if the object's ETag matches the given value. This is useful for
37211// getting updates only after the object has changed since the last
37212// request. Use googleapi.IsNotModified to check whether the response
37213// error from Do is the result of In-None-Match.
37214func (c *MobileCarriersGetCall) IfNoneMatch(entityTag string) *MobileCarriersGetCall {
37215	c.ifNoneMatch_ = entityTag
37216	return c
37217}
37218
37219// Context sets the context to be used in this call's Do method. Any
37220// pending HTTP request will be aborted if the provided context is
37221// canceled.
37222func (c *MobileCarriersGetCall) Context(ctx context.Context) *MobileCarriersGetCall {
37223	c.ctx_ = ctx
37224	return c
37225}
37226
37227// Header returns an http.Header that can be modified by the caller to
37228// add HTTP headers to the request.
37229func (c *MobileCarriersGetCall) Header() http.Header {
37230	if c.header_ == nil {
37231		c.header_ = make(http.Header)
37232	}
37233	return c.header_
37234}
37235
37236func (c *MobileCarriersGetCall) doRequest(alt string) (*http.Response, error) {
37237	reqHeaders := make(http.Header)
37238	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
37239	for k, v := range c.header_ {
37240		reqHeaders[k] = v
37241	}
37242	reqHeaders.Set("User-Agent", c.s.userAgent())
37243	if c.ifNoneMatch_ != "" {
37244		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37245	}
37246	var body io.Reader = nil
37247	c.urlParams_.Set("alt", alt)
37248	c.urlParams_.Set("prettyPrint", "false")
37249	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers/{id}")
37250	urls += "?" + c.urlParams_.Encode()
37251	req, err := http.NewRequest("GET", urls, body)
37252	if err != nil {
37253		return nil, err
37254	}
37255	req.Header = reqHeaders
37256	googleapi.Expand(req.URL, map[string]string{
37257		"profileId": strconv.FormatInt(c.profileId, 10),
37258		"id":        strconv.FormatInt(c.id, 10),
37259	})
37260	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37261}
37262
37263// Do executes the "dfareporting.mobileCarriers.get" call.
37264// Exactly one of *MobileCarrier or error will be non-nil. Any non-2xx
37265// status code is an error. Response headers are in either
37266// *MobileCarrier.ServerResponse.Header or (if a response was returned
37267// at all) in error.(*googleapi.Error).Header. Use
37268// googleapi.IsNotModified to check whether the returned error was
37269// because http.StatusNotModified was returned.
37270func (c *MobileCarriersGetCall) Do(opts ...googleapi.CallOption) (*MobileCarrier, error) {
37271	gensupport.SetOptions(c.urlParams_, opts...)
37272	res, err := c.doRequest("json")
37273	if res != nil && res.StatusCode == http.StatusNotModified {
37274		if res.Body != nil {
37275			res.Body.Close()
37276		}
37277		return nil, &googleapi.Error{
37278			Code:   res.StatusCode,
37279			Header: res.Header,
37280		}
37281	}
37282	if err != nil {
37283		return nil, err
37284	}
37285	defer googleapi.CloseBody(res)
37286	if err := googleapi.CheckResponse(res); err != nil {
37287		return nil, err
37288	}
37289	ret := &MobileCarrier{
37290		ServerResponse: googleapi.ServerResponse{
37291			Header:         res.Header,
37292			HTTPStatusCode: res.StatusCode,
37293		},
37294	}
37295	target := &ret
37296	if err := gensupport.DecodeResponse(target, res); err != nil {
37297		return nil, err
37298	}
37299	return ret, nil
37300	// {
37301	//   "description": "Gets one mobile carrier by ID.",
37302	//   "flatPath": "userprofiles/{profileId}/mobileCarriers/{id}",
37303	//   "httpMethod": "GET",
37304	//   "id": "dfareporting.mobileCarriers.get",
37305	//   "parameterOrder": [
37306	//     "profileId",
37307	//     "id"
37308	//   ],
37309	//   "parameters": {
37310	//     "id": {
37311	//       "description": "Mobile carrier ID.",
37312	//       "format": "int64",
37313	//       "location": "path",
37314	//       "required": true,
37315	//       "type": "string"
37316	//     },
37317	//     "profileId": {
37318	//       "description": "User profile ID associated with this request.",
37319	//       "format": "int64",
37320	//       "location": "path",
37321	//       "required": true,
37322	//       "type": "string"
37323	//     }
37324	//   },
37325	//   "path": "userprofiles/{profileId}/mobileCarriers/{id}",
37326	//   "response": {
37327	//     "$ref": "MobileCarrier"
37328	//   },
37329	//   "scopes": [
37330	//     "https://www.googleapis.com/auth/dfatrafficking"
37331	//   ]
37332	// }
37333
37334}
37335
37336// method id "dfareporting.mobileCarriers.list":
37337
37338type MobileCarriersListCall struct {
37339	s            *Service
37340	profileId    int64
37341	urlParams_   gensupport.URLParams
37342	ifNoneMatch_ string
37343	ctx_         context.Context
37344	header_      http.Header
37345}
37346
37347// List: Retrieves a list of mobile carriers.
37348//
37349// - profileId: User profile ID associated with this request.
37350func (r *MobileCarriersService) List(profileId int64) *MobileCarriersListCall {
37351	c := &MobileCarriersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37352	c.profileId = profileId
37353	return c
37354}
37355
37356// Fields allows partial responses to be retrieved. See
37357// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37358// for more information.
37359func (c *MobileCarriersListCall) Fields(s ...googleapi.Field) *MobileCarriersListCall {
37360	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37361	return c
37362}
37363
37364// IfNoneMatch sets the optional parameter which makes the operation
37365// fail if the object's ETag matches the given value. This is useful for
37366// getting updates only after the object has changed since the last
37367// request. Use googleapi.IsNotModified to check whether the response
37368// error from Do is the result of In-None-Match.
37369func (c *MobileCarriersListCall) IfNoneMatch(entityTag string) *MobileCarriersListCall {
37370	c.ifNoneMatch_ = entityTag
37371	return c
37372}
37373
37374// Context sets the context to be used in this call's Do method. Any
37375// pending HTTP request will be aborted if the provided context is
37376// canceled.
37377func (c *MobileCarriersListCall) Context(ctx context.Context) *MobileCarriersListCall {
37378	c.ctx_ = ctx
37379	return c
37380}
37381
37382// Header returns an http.Header that can be modified by the caller to
37383// add HTTP headers to the request.
37384func (c *MobileCarriersListCall) Header() http.Header {
37385	if c.header_ == nil {
37386		c.header_ = make(http.Header)
37387	}
37388	return c.header_
37389}
37390
37391func (c *MobileCarriersListCall) doRequest(alt string) (*http.Response, error) {
37392	reqHeaders := make(http.Header)
37393	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
37394	for k, v := range c.header_ {
37395		reqHeaders[k] = v
37396	}
37397	reqHeaders.Set("User-Agent", c.s.userAgent())
37398	if c.ifNoneMatch_ != "" {
37399		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37400	}
37401	var body io.Reader = nil
37402	c.urlParams_.Set("alt", alt)
37403	c.urlParams_.Set("prettyPrint", "false")
37404	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers")
37405	urls += "?" + c.urlParams_.Encode()
37406	req, err := http.NewRequest("GET", urls, body)
37407	if err != nil {
37408		return nil, err
37409	}
37410	req.Header = reqHeaders
37411	googleapi.Expand(req.URL, map[string]string{
37412		"profileId": strconv.FormatInt(c.profileId, 10),
37413	})
37414	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37415}
37416
37417// Do executes the "dfareporting.mobileCarriers.list" call.
37418// Exactly one of *MobileCarriersListResponse or error will be non-nil.
37419// Any non-2xx status code is an error. Response headers are in either
37420// *MobileCarriersListResponse.ServerResponse.Header or (if a response
37421// was returned at all) in error.(*googleapi.Error).Header. Use
37422// googleapi.IsNotModified to check whether the returned error was
37423// because http.StatusNotModified was returned.
37424func (c *MobileCarriersListCall) Do(opts ...googleapi.CallOption) (*MobileCarriersListResponse, error) {
37425	gensupport.SetOptions(c.urlParams_, opts...)
37426	res, err := c.doRequest("json")
37427	if res != nil && res.StatusCode == http.StatusNotModified {
37428		if res.Body != nil {
37429			res.Body.Close()
37430		}
37431		return nil, &googleapi.Error{
37432			Code:   res.StatusCode,
37433			Header: res.Header,
37434		}
37435	}
37436	if err != nil {
37437		return nil, err
37438	}
37439	defer googleapi.CloseBody(res)
37440	if err := googleapi.CheckResponse(res); err != nil {
37441		return nil, err
37442	}
37443	ret := &MobileCarriersListResponse{
37444		ServerResponse: googleapi.ServerResponse{
37445			Header:         res.Header,
37446			HTTPStatusCode: res.StatusCode,
37447		},
37448	}
37449	target := &ret
37450	if err := gensupport.DecodeResponse(target, res); err != nil {
37451		return nil, err
37452	}
37453	return ret, nil
37454	// {
37455	//   "description": "Retrieves a list of mobile carriers.",
37456	//   "flatPath": "userprofiles/{profileId}/mobileCarriers",
37457	//   "httpMethod": "GET",
37458	//   "id": "dfareporting.mobileCarriers.list",
37459	//   "parameterOrder": [
37460	//     "profileId"
37461	//   ],
37462	//   "parameters": {
37463	//     "profileId": {
37464	//       "description": "User profile ID associated with this request.",
37465	//       "format": "int64",
37466	//       "location": "path",
37467	//       "required": true,
37468	//       "type": "string"
37469	//     }
37470	//   },
37471	//   "path": "userprofiles/{profileId}/mobileCarriers",
37472	//   "response": {
37473	//     "$ref": "MobileCarriersListResponse"
37474	//   },
37475	//   "scopes": [
37476	//     "https://www.googleapis.com/auth/dfatrafficking"
37477	//   ]
37478	// }
37479
37480}
37481
37482// method id "dfareporting.operatingSystemVersions.get":
37483
37484type OperatingSystemVersionsGetCall struct {
37485	s            *Service
37486	profileId    int64
37487	id           int64
37488	urlParams_   gensupport.URLParams
37489	ifNoneMatch_ string
37490	ctx_         context.Context
37491	header_      http.Header
37492}
37493
37494// Get: Gets one operating system version by ID.
37495//
37496// - id: Operating system version ID.
37497// - profileId: User profile ID associated with this request.
37498func (r *OperatingSystemVersionsService) Get(profileId int64, id int64) *OperatingSystemVersionsGetCall {
37499	c := &OperatingSystemVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37500	c.profileId = profileId
37501	c.id = id
37502	return c
37503}
37504
37505// Fields allows partial responses to be retrieved. See
37506// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37507// for more information.
37508func (c *OperatingSystemVersionsGetCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsGetCall {
37509	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37510	return c
37511}
37512
37513// IfNoneMatch sets the optional parameter which makes the operation
37514// fail if the object's ETag matches the given value. This is useful for
37515// getting updates only after the object has changed since the last
37516// request. Use googleapi.IsNotModified to check whether the response
37517// error from Do is the result of In-None-Match.
37518func (c *OperatingSystemVersionsGetCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsGetCall {
37519	c.ifNoneMatch_ = entityTag
37520	return c
37521}
37522
37523// Context sets the context to be used in this call's Do method. Any
37524// pending HTTP request will be aborted if the provided context is
37525// canceled.
37526func (c *OperatingSystemVersionsGetCall) Context(ctx context.Context) *OperatingSystemVersionsGetCall {
37527	c.ctx_ = ctx
37528	return c
37529}
37530
37531// Header returns an http.Header that can be modified by the caller to
37532// add HTTP headers to the request.
37533func (c *OperatingSystemVersionsGetCall) Header() http.Header {
37534	if c.header_ == nil {
37535		c.header_ = make(http.Header)
37536	}
37537	return c.header_
37538}
37539
37540func (c *OperatingSystemVersionsGetCall) doRequest(alt string) (*http.Response, error) {
37541	reqHeaders := make(http.Header)
37542	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
37543	for k, v := range c.header_ {
37544		reqHeaders[k] = v
37545	}
37546	reqHeaders.Set("User-Agent", c.s.userAgent())
37547	if c.ifNoneMatch_ != "" {
37548		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37549	}
37550	var body io.Reader = nil
37551	c.urlParams_.Set("alt", alt)
37552	c.urlParams_.Set("prettyPrint", "false")
37553	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions/{id}")
37554	urls += "?" + c.urlParams_.Encode()
37555	req, err := http.NewRequest("GET", urls, body)
37556	if err != nil {
37557		return nil, err
37558	}
37559	req.Header = reqHeaders
37560	googleapi.Expand(req.URL, map[string]string{
37561		"profileId": strconv.FormatInt(c.profileId, 10),
37562		"id":        strconv.FormatInt(c.id, 10),
37563	})
37564	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37565}
37566
37567// Do executes the "dfareporting.operatingSystemVersions.get" call.
37568// Exactly one of *OperatingSystemVersion or error will be non-nil. Any
37569// non-2xx status code is an error. Response headers are in either
37570// *OperatingSystemVersion.ServerResponse.Header or (if a response was
37571// returned at all) in error.(*googleapi.Error).Header. Use
37572// googleapi.IsNotModified to check whether the returned error was
37573// because http.StatusNotModified was returned.
37574func (c *OperatingSystemVersionsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersion, error) {
37575	gensupport.SetOptions(c.urlParams_, opts...)
37576	res, err := c.doRequest("json")
37577	if res != nil && res.StatusCode == http.StatusNotModified {
37578		if res.Body != nil {
37579			res.Body.Close()
37580		}
37581		return nil, &googleapi.Error{
37582			Code:   res.StatusCode,
37583			Header: res.Header,
37584		}
37585	}
37586	if err != nil {
37587		return nil, err
37588	}
37589	defer googleapi.CloseBody(res)
37590	if err := googleapi.CheckResponse(res); err != nil {
37591		return nil, err
37592	}
37593	ret := &OperatingSystemVersion{
37594		ServerResponse: googleapi.ServerResponse{
37595			Header:         res.Header,
37596			HTTPStatusCode: res.StatusCode,
37597		},
37598	}
37599	target := &ret
37600	if err := gensupport.DecodeResponse(target, res); err != nil {
37601		return nil, err
37602	}
37603	return ret, nil
37604	// {
37605	//   "description": "Gets one operating system version by ID.",
37606	//   "flatPath": "userprofiles/{profileId}/operatingSystemVersions/{id}",
37607	//   "httpMethod": "GET",
37608	//   "id": "dfareporting.operatingSystemVersions.get",
37609	//   "parameterOrder": [
37610	//     "profileId",
37611	//     "id"
37612	//   ],
37613	//   "parameters": {
37614	//     "id": {
37615	//       "description": "Operating system version ID.",
37616	//       "format": "int64",
37617	//       "location": "path",
37618	//       "required": true,
37619	//       "type": "string"
37620	//     },
37621	//     "profileId": {
37622	//       "description": "User profile ID associated with this request.",
37623	//       "format": "int64",
37624	//       "location": "path",
37625	//       "required": true,
37626	//       "type": "string"
37627	//     }
37628	//   },
37629	//   "path": "userprofiles/{profileId}/operatingSystemVersions/{id}",
37630	//   "response": {
37631	//     "$ref": "OperatingSystemVersion"
37632	//   },
37633	//   "scopes": [
37634	//     "https://www.googleapis.com/auth/dfatrafficking"
37635	//   ]
37636	// }
37637
37638}
37639
37640// method id "dfareporting.operatingSystemVersions.list":
37641
37642type OperatingSystemVersionsListCall struct {
37643	s            *Service
37644	profileId    int64
37645	urlParams_   gensupport.URLParams
37646	ifNoneMatch_ string
37647	ctx_         context.Context
37648	header_      http.Header
37649}
37650
37651// List: Retrieves a list of operating system versions.
37652//
37653// - profileId: User profile ID associated with this request.
37654func (r *OperatingSystemVersionsService) List(profileId int64) *OperatingSystemVersionsListCall {
37655	c := &OperatingSystemVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37656	c.profileId = profileId
37657	return c
37658}
37659
37660// Fields allows partial responses to be retrieved. See
37661// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37662// for more information.
37663func (c *OperatingSystemVersionsListCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsListCall {
37664	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37665	return c
37666}
37667
37668// IfNoneMatch sets the optional parameter which makes the operation
37669// fail if the object's ETag matches the given value. This is useful for
37670// getting updates only after the object has changed since the last
37671// request. Use googleapi.IsNotModified to check whether the response
37672// error from Do is the result of In-None-Match.
37673func (c *OperatingSystemVersionsListCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsListCall {
37674	c.ifNoneMatch_ = entityTag
37675	return c
37676}
37677
37678// Context sets the context to be used in this call's Do method. Any
37679// pending HTTP request will be aborted if the provided context is
37680// canceled.
37681func (c *OperatingSystemVersionsListCall) Context(ctx context.Context) *OperatingSystemVersionsListCall {
37682	c.ctx_ = ctx
37683	return c
37684}
37685
37686// Header returns an http.Header that can be modified by the caller to
37687// add HTTP headers to the request.
37688func (c *OperatingSystemVersionsListCall) Header() http.Header {
37689	if c.header_ == nil {
37690		c.header_ = make(http.Header)
37691	}
37692	return c.header_
37693}
37694
37695func (c *OperatingSystemVersionsListCall) doRequest(alt string) (*http.Response, error) {
37696	reqHeaders := make(http.Header)
37697	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
37698	for k, v := range c.header_ {
37699		reqHeaders[k] = v
37700	}
37701	reqHeaders.Set("User-Agent", c.s.userAgent())
37702	if c.ifNoneMatch_ != "" {
37703		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37704	}
37705	var body io.Reader = nil
37706	c.urlParams_.Set("alt", alt)
37707	c.urlParams_.Set("prettyPrint", "false")
37708	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions")
37709	urls += "?" + c.urlParams_.Encode()
37710	req, err := http.NewRequest("GET", urls, body)
37711	if err != nil {
37712		return nil, err
37713	}
37714	req.Header = reqHeaders
37715	googleapi.Expand(req.URL, map[string]string{
37716		"profileId": strconv.FormatInt(c.profileId, 10),
37717	})
37718	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37719}
37720
37721// Do executes the "dfareporting.operatingSystemVersions.list" call.
37722// Exactly one of *OperatingSystemVersionsListResponse or error will be
37723// non-nil. Any non-2xx status code is an error. Response headers are in
37724// either *OperatingSystemVersionsListResponse.ServerResponse.Header or
37725// (if a response was returned at all) in
37726// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
37727// whether the returned error was because http.StatusNotModified was
37728// returned.
37729func (c *OperatingSystemVersionsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersionsListResponse, error) {
37730	gensupport.SetOptions(c.urlParams_, opts...)
37731	res, err := c.doRequest("json")
37732	if res != nil && res.StatusCode == http.StatusNotModified {
37733		if res.Body != nil {
37734			res.Body.Close()
37735		}
37736		return nil, &googleapi.Error{
37737			Code:   res.StatusCode,
37738			Header: res.Header,
37739		}
37740	}
37741	if err != nil {
37742		return nil, err
37743	}
37744	defer googleapi.CloseBody(res)
37745	if err := googleapi.CheckResponse(res); err != nil {
37746		return nil, err
37747	}
37748	ret := &OperatingSystemVersionsListResponse{
37749		ServerResponse: googleapi.ServerResponse{
37750			Header:         res.Header,
37751			HTTPStatusCode: res.StatusCode,
37752		},
37753	}
37754	target := &ret
37755	if err := gensupport.DecodeResponse(target, res); err != nil {
37756		return nil, err
37757	}
37758	return ret, nil
37759	// {
37760	//   "description": "Retrieves a list of operating system versions.",
37761	//   "flatPath": "userprofiles/{profileId}/operatingSystemVersions",
37762	//   "httpMethod": "GET",
37763	//   "id": "dfareporting.operatingSystemVersions.list",
37764	//   "parameterOrder": [
37765	//     "profileId"
37766	//   ],
37767	//   "parameters": {
37768	//     "profileId": {
37769	//       "description": "User profile ID associated with this request.",
37770	//       "format": "int64",
37771	//       "location": "path",
37772	//       "required": true,
37773	//       "type": "string"
37774	//     }
37775	//   },
37776	//   "path": "userprofiles/{profileId}/operatingSystemVersions",
37777	//   "response": {
37778	//     "$ref": "OperatingSystemVersionsListResponse"
37779	//   },
37780	//   "scopes": [
37781	//     "https://www.googleapis.com/auth/dfatrafficking"
37782	//   ]
37783	// }
37784
37785}
37786
37787// method id "dfareporting.operatingSystems.get":
37788
37789type OperatingSystemsGetCall struct {
37790	s            *Service
37791	profileId    int64
37792	dartId       int64
37793	urlParams_   gensupport.URLParams
37794	ifNoneMatch_ string
37795	ctx_         context.Context
37796	header_      http.Header
37797}
37798
37799// Get: Gets one operating system by DART ID.
37800//
37801// - dartId: Operating system DART ID.
37802// - profileId: User profile ID associated with this request.
37803func (r *OperatingSystemsService) Get(profileId int64, dartId int64) *OperatingSystemsGetCall {
37804	c := &OperatingSystemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37805	c.profileId = profileId
37806	c.dartId = dartId
37807	return c
37808}
37809
37810// Fields allows partial responses to be retrieved. See
37811// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37812// for more information.
37813func (c *OperatingSystemsGetCall) Fields(s ...googleapi.Field) *OperatingSystemsGetCall {
37814	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37815	return c
37816}
37817
37818// IfNoneMatch sets the optional parameter which makes the operation
37819// fail if the object's ETag matches the given value. This is useful for
37820// getting updates only after the object has changed since the last
37821// request. Use googleapi.IsNotModified to check whether the response
37822// error from Do is the result of In-None-Match.
37823func (c *OperatingSystemsGetCall) IfNoneMatch(entityTag string) *OperatingSystemsGetCall {
37824	c.ifNoneMatch_ = entityTag
37825	return c
37826}
37827
37828// Context sets the context to be used in this call's Do method. Any
37829// pending HTTP request will be aborted if the provided context is
37830// canceled.
37831func (c *OperatingSystemsGetCall) Context(ctx context.Context) *OperatingSystemsGetCall {
37832	c.ctx_ = ctx
37833	return c
37834}
37835
37836// Header returns an http.Header that can be modified by the caller to
37837// add HTTP headers to the request.
37838func (c *OperatingSystemsGetCall) Header() http.Header {
37839	if c.header_ == nil {
37840		c.header_ = make(http.Header)
37841	}
37842	return c.header_
37843}
37844
37845func (c *OperatingSystemsGetCall) doRequest(alt string) (*http.Response, error) {
37846	reqHeaders := make(http.Header)
37847	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
37848	for k, v := range c.header_ {
37849		reqHeaders[k] = v
37850	}
37851	reqHeaders.Set("User-Agent", c.s.userAgent())
37852	if c.ifNoneMatch_ != "" {
37853		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37854	}
37855	var body io.Reader = nil
37856	c.urlParams_.Set("alt", alt)
37857	c.urlParams_.Set("prettyPrint", "false")
37858	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems/{dartId}")
37859	urls += "?" + c.urlParams_.Encode()
37860	req, err := http.NewRequest("GET", urls, body)
37861	if err != nil {
37862		return nil, err
37863	}
37864	req.Header = reqHeaders
37865	googleapi.Expand(req.URL, map[string]string{
37866		"profileId": strconv.FormatInt(c.profileId, 10),
37867		"dartId":    strconv.FormatInt(c.dartId, 10),
37868	})
37869	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37870}
37871
37872// Do executes the "dfareporting.operatingSystems.get" call.
37873// Exactly one of *OperatingSystem or error will be non-nil. Any non-2xx
37874// status code is an error. Response headers are in either
37875// *OperatingSystem.ServerResponse.Header or (if a response was returned
37876// at all) in error.(*googleapi.Error).Header. Use
37877// googleapi.IsNotModified to check whether the returned error was
37878// because http.StatusNotModified was returned.
37879func (c *OperatingSystemsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystem, error) {
37880	gensupport.SetOptions(c.urlParams_, opts...)
37881	res, err := c.doRequest("json")
37882	if res != nil && res.StatusCode == http.StatusNotModified {
37883		if res.Body != nil {
37884			res.Body.Close()
37885		}
37886		return nil, &googleapi.Error{
37887			Code:   res.StatusCode,
37888			Header: res.Header,
37889		}
37890	}
37891	if err != nil {
37892		return nil, err
37893	}
37894	defer googleapi.CloseBody(res)
37895	if err := googleapi.CheckResponse(res); err != nil {
37896		return nil, err
37897	}
37898	ret := &OperatingSystem{
37899		ServerResponse: googleapi.ServerResponse{
37900			Header:         res.Header,
37901			HTTPStatusCode: res.StatusCode,
37902		},
37903	}
37904	target := &ret
37905	if err := gensupport.DecodeResponse(target, res); err != nil {
37906		return nil, err
37907	}
37908	return ret, nil
37909	// {
37910	//   "description": "Gets one operating system by DART ID.",
37911	//   "flatPath": "userprofiles/{profileId}/operatingSystems/{dartId}",
37912	//   "httpMethod": "GET",
37913	//   "id": "dfareporting.operatingSystems.get",
37914	//   "parameterOrder": [
37915	//     "profileId",
37916	//     "dartId"
37917	//   ],
37918	//   "parameters": {
37919	//     "dartId": {
37920	//       "description": "Operating system DART ID.",
37921	//       "format": "int64",
37922	//       "location": "path",
37923	//       "required": true,
37924	//       "type": "string"
37925	//     },
37926	//     "profileId": {
37927	//       "description": "User profile ID associated with this request.",
37928	//       "format": "int64",
37929	//       "location": "path",
37930	//       "required": true,
37931	//       "type": "string"
37932	//     }
37933	//   },
37934	//   "path": "userprofiles/{profileId}/operatingSystems/{dartId}",
37935	//   "response": {
37936	//     "$ref": "OperatingSystem"
37937	//   },
37938	//   "scopes": [
37939	//     "https://www.googleapis.com/auth/dfatrafficking"
37940	//   ]
37941	// }
37942
37943}
37944
37945// method id "dfareporting.operatingSystems.list":
37946
37947type OperatingSystemsListCall struct {
37948	s            *Service
37949	profileId    int64
37950	urlParams_   gensupport.URLParams
37951	ifNoneMatch_ string
37952	ctx_         context.Context
37953	header_      http.Header
37954}
37955
37956// List: Retrieves a list of operating systems.
37957//
37958// - profileId: User profile ID associated with this request.
37959func (r *OperatingSystemsService) List(profileId int64) *OperatingSystemsListCall {
37960	c := &OperatingSystemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37961	c.profileId = profileId
37962	return c
37963}
37964
37965// Fields allows partial responses to be retrieved. See
37966// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37967// for more information.
37968func (c *OperatingSystemsListCall) Fields(s ...googleapi.Field) *OperatingSystemsListCall {
37969	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37970	return c
37971}
37972
37973// IfNoneMatch sets the optional parameter which makes the operation
37974// fail if the object's ETag matches the given value. This is useful for
37975// getting updates only after the object has changed since the last
37976// request. Use googleapi.IsNotModified to check whether the response
37977// error from Do is the result of In-None-Match.
37978func (c *OperatingSystemsListCall) IfNoneMatch(entityTag string) *OperatingSystemsListCall {
37979	c.ifNoneMatch_ = entityTag
37980	return c
37981}
37982
37983// Context sets the context to be used in this call's Do method. Any
37984// pending HTTP request will be aborted if the provided context is
37985// canceled.
37986func (c *OperatingSystemsListCall) Context(ctx context.Context) *OperatingSystemsListCall {
37987	c.ctx_ = ctx
37988	return c
37989}
37990
37991// Header returns an http.Header that can be modified by the caller to
37992// add HTTP headers to the request.
37993func (c *OperatingSystemsListCall) Header() http.Header {
37994	if c.header_ == nil {
37995		c.header_ = make(http.Header)
37996	}
37997	return c.header_
37998}
37999
38000func (c *OperatingSystemsListCall) doRequest(alt string) (*http.Response, error) {
38001	reqHeaders := make(http.Header)
38002	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
38003	for k, v := range c.header_ {
38004		reqHeaders[k] = v
38005	}
38006	reqHeaders.Set("User-Agent", c.s.userAgent())
38007	if c.ifNoneMatch_ != "" {
38008		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38009	}
38010	var body io.Reader = nil
38011	c.urlParams_.Set("alt", alt)
38012	c.urlParams_.Set("prettyPrint", "false")
38013	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems")
38014	urls += "?" + c.urlParams_.Encode()
38015	req, err := http.NewRequest("GET", urls, body)
38016	if err != nil {
38017		return nil, err
38018	}
38019	req.Header = reqHeaders
38020	googleapi.Expand(req.URL, map[string]string{
38021		"profileId": strconv.FormatInt(c.profileId, 10),
38022	})
38023	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38024}
38025
38026// Do executes the "dfareporting.operatingSystems.list" call.
38027// Exactly one of *OperatingSystemsListResponse or error will be
38028// non-nil. Any non-2xx status code is an error. Response headers are in
38029// either *OperatingSystemsListResponse.ServerResponse.Header or (if a
38030// response was returned at all) in error.(*googleapi.Error).Header. Use
38031// googleapi.IsNotModified to check whether the returned error was
38032// because http.StatusNotModified was returned.
38033func (c *OperatingSystemsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemsListResponse, error) {
38034	gensupport.SetOptions(c.urlParams_, opts...)
38035	res, err := c.doRequest("json")
38036	if res != nil && res.StatusCode == http.StatusNotModified {
38037		if res.Body != nil {
38038			res.Body.Close()
38039		}
38040		return nil, &googleapi.Error{
38041			Code:   res.StatusCode,
38042			Header: res.Header,
38043		}
38044	}
38045	if err != nil {
38046		return nil, err
38047	}
38048	defer googleapi.CloseBody(res)
38049	if err := googleapi.CheckResponse(res); err != nil {
38050		return nil, err
38051	}
38052	ret := &OperatingSystemsListResponse{
38053		ServerResponse: googleapi.ServerResponse{
38054			Header:         res.Header,
38055			HTTPStatusCode: res.StatusCode,
38056		},
38057	}
38058	target := &ret
38059	if err := gensupport.DecodeResponse(target, res); err != nil {
38060		return nil, err
38061	}
38062	return ret, nil
38063	// {
38064	//   "description": "Retrieves a list of operating systems.",
38065	//   "flatPath": "userprofiles/{profileId}/operatingSystems",
38066	//   "httpMethod": "GET",
38067	//   "id": "dfareporting.operatingSystems.list",
38068	//   "parameterOrder": [
38069	//     "profileId"
38070	//   ],
38071	//   "parameters": {
38072	//     "profileId": {
38073	//       "description": "User profile ID associated with this request.",
38074	//       "format": "int64",
38075	//       "location": "path",
38076	//       "required": true,
38077	//       "type": "string"
38078	//     }
38079	//   },
38080	//   "path": "userprofiles/{profileId}/operatingSystems",
38081	//   "response": {
38082	//     "$ref": "OperatingSystemsListResponse"
38083	//   },
38084	//   "scopes": [
38085	//     "https://www.googleapis.com/auth/dfatrafficking"
38086	//   ]
38087	// }
38088
38089}
38090
38091// method id "dfareporting.orderDocuments.get":
38092
38093type OrderDocumentsGetCall struct {
38094	s            *Service
38095	profileId    int64
38096	projectId    int64
38097	id           int64
38098	urlParams_   gensupport.URLParams
38099	ifNoneMatch_ string
38100	ctx_         context.Context
38101	header_      http.Header
38102}
38103
38104// Get: Gets one order document by ID.
38105//
38106// - id: Order document ID.
38107// - profileId: User profile ID associated with this request.
38108// - projectId: Project ID for order documents.
38109func (r *OrderDocumentsService) Get(profileId int64, projectId int64, id int64) *OrderDocumentsGetCall {
38110	c := &OrderDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38111	c.profileId = profileId
38112	c.projectId = projectId
38113	c.id = id
38114	return c
38115}
38116
38117// Fields allows partial responses to be retrieved. See
38118// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38119// for more information.
38120func (c *OrderDocumentsGetCall) Fields(s ...googleapi.Field) *OrderDocumentsGetCall {
38121	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38122	return c
38123}
38124
38125// IfNoneMatch sets the optional parameter which makes the operation
38126// fail if the object's ETag matches the given value. This is useful for
38127// getting updates only after the object has changed since the last
38128// request. Use googleapi.IsNotModified to check whether the response
38129// error from Do is the result of In-None-Match.
38130func (c *OrderDocumentsGetCall) IfNoneMatch(entityTag string) *OrderDocumentsGetCall {
38131	c.ifNoneMatch_ = entityTag
38132	return c
38133}
38134
38135// Context sets the context to be used in this call's Do method. Any
38136// pending HTTP request will be aborted if the provided context is
38137// canceled.
38138func (c *OrderDocumentsGetCall) Context(ctx context.Context) *OrderDocumentsGetCall {
38139	c.ctx_ = ctx
38140	return c
38141}
38142
38143// Header returns an http.Header that can be modified by the caller to
38144// add HTTP headers to the request.
38145func (c *OrderDocumentsGetCall) Header() http.Header {
38146	if c.header_ == nil {
38147		c.header_ = make(http.Header)
38148	}
38149	return c.header_
38150}
38151
38152func (c *OrderDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
38153	reqHeaders := make(http.Header)
38154	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
38155	for k, v := range c.header_ {
38156		reqHeaders[k] = v
38157	}
38158	reqHeaders.Set("User-Agent", c.s.userAgent())
38159	if c.ifNoneMatch_ != "" {
38160		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38161	}
38162	var body io.Reader = nil
38163	c.urlParams_.Set("alt", alt)
38164	c.urlParams_.Set("prettyPrint", "false")
38165	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}")
38166	urls += "?" + c.urlParams_.Encode()
38167	req, err := http.NewRequest("GET", urls, body)
38168	if err != nil {
38169		return nil, err
38170	}
38171	req.Header = reqHeaders
38172	googleapi.Expand(req.URL, map[string]string{
38173		"profileId": strconv.FormatInt(c.profileId, 10),
38174		"projectId": strconv.FormatInt(c.projectId, 10),
38175		"id":        strconv.FormatInt(c.id, 10),
38176	})
38177	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38178}
38179
38180// Do executes the "dfareporting.orderDocuments.get" call.
38181// Exactly one of *OrderDocument or error will be non-nil. Any non-2xx
38182// status code is an error. Response headers are in either
38183// *OrderDocument.ServerResponse.Header or (if a response was returned
38184// at all) in error.(*googleapi.Error).Header. Use
38185// googleapi.IsNotModified to check whether the returned error was
38186// because http.StatusNotModified was returned.
38187func (c *OrderDocumentsGetCall) Do(opts ...googleapi.CallOption) (*OrderDocument, error) {
38188	gensupport.SetOptions(c.urlParams_, opts...)
38189	res, err := c.doRequest("json")
38190	if res != nil && res.StatusCode == http.StatusNotModified {
38191		if res.Body != nil {
38192			res.Body.Close()
38193		}
38194		return nil, &googleapi.Error{
38195			Code:   res.StatusCode,
38196			Header: res.Header,
38197		}
38198	}
38199	if err != nil {
38200		return nil, err
38201	}
38202	defer googleapi.CloseBody(res)
38203	if err := googleapi.CheckResponse(res); err != nil {
38204		return nil, err
38205	}
38206	ret := &OrderDocument{
38207		ServerResponse: googleapi.ServerResponse{
38208			Header:         res.Header,
38209			HTTPStatusCode: res.StatusCode,
38210		},
38211	}
38212	target := &ret
38213	if err := gensupport.DecodeResponse(target, res); err != nil {
38214		return nil, err
38215	}
38216	return ret, nil
38217	// {
38218	//   "description": "Gets one order document by ID.",
38219	//   "flatPath": "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}",
38220	//   "httpMethod": "GET",
38221	//   "id": "dfareporting.orderDocuments.get",
38222	//   "parameterOrder": [
38223	//     "profileId",
38224	//     "projectId",
38225	//     "id"
38226	//   ],
38227	//   "parameters": {
38228	//     "id": {
38229	//       "description": "Order document ID.",
38230	//       "format": "int64",
38231	//       "location": "path",
38232	//       "required": true,
38233	//       "type": "string"
38234	//     },
38235	//     "profileId": {
38236	//       "description": "User profile ID associated with this request.",
38237	//       "format": "int64",
38238	//       "location": "path",
38239	//       "required": true,
38240	//       "type": "string"
38241	//     },
38242	//     "projectId": {
38243	//       "description": "Project ID for order documents.",
38244	//       "format": "int64",
38245	//       "location": "path",
38246	//       "required": true,
38247	//       "type": "string"
38248	//     }
38249	//   },
38250	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}",
38251	//   "response": {
38252	//     "$ref": "OrderDocument"
38253	//   },
38254	//   "scopes": [
38255	//     "https://www.googleapis.com/auth/dfatrafficking"
38256	//   ]
38257	// }
38258
38259}
38260
38261// method id "dfareporting.orderDocuments.list":
38262
38263type OrderDocumentsListCall struct {
38264	s            *Service
38265	profileId    int64
38266	projectId    int64
38267	urlParams_   gensupport.URLParams
38268	ifNoneMatch_ string
38269	ctx_         context.Context
38270	header_      http.Header
38271}
38272
38273// List: Retrieves a list of order documents, possibly filtered. This
38274// method supports paging.
38275//
38276// - profileId: User profile ID associated with this request.
38277// - projectId: Project ID for order documents.
38278func (r *OrderDocumentsService) List(profileId int64, projectId int64) *OrderDocumentsListCall {
38279	c := &OrderDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38280	c.profileId = profileId
38281	c.projectId = projectId
38282	return c
38283}
38284
38285// Approved sets the optional parameter "approved": Select only order
38286// documents that have been approved by at least one user.
38287func (c *OrderDocumentsListCall) Approved(approved bool) *OrderDocumentsListCall {
38288	c.urlParams_.Set("approved", fmt.Sprint(approved))
38289	return c
38290}
38291
38292// Ids sets the optional parameter "ids": Select only order documents
38293// with these IDs.
38294func (c *OrderDocumentsListCall) Ids(ids ...int64) *OrderDocumentsListCall {
38295	var ids_ []string
38296	for _, v := range ids {
38297		ids_ = append(ids_, fmt.Sprint(v))
38298	}
38299	c.urlParams_.SetMulti("ids", ids_)
38300	return c
38301}
38302
38303// MaxResults sets the optional parameter "maxResults": Maximum number
38304// of results to return.
38305func (c *OrderDocumentsListCall) MaxResults(maxResults int64) *OrderDocumentsListCall {
38306	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38307	return c
38308}
38309
38310// OrderId sets the optional parameter "orderId": Select only order
38311// documents for specified orders.
38312func (c *OrderDocumentsListCall) OrderId(orderId ...int64) *OrderDocumentsListCall {
38313	var orderId_ []string
38314	for _, v := range orderId {
38315		orderId_ = append(orderId_, fmt.Sprint(v))
38316	}
38317	c.urlParams_.SetMulti("orderId", orderId_)
38318	return c
38319}
38320
38321// PageToken sets the optional parameter "pageToken": Value of the
38322// nextPageToken from the previous result page.
38323func (c *OrderDocumentsListCall) PageToken(pageToken string) *OrderDocumentsListCall {
38324	c.urlParams_.Set("pageToken", pageToken)
38325	return c
38326}
38327
38328// SearchString sets the optional parameter "searchString": Allows
38329// searching for order documents by name or ID. Wildcards (*) are
38330// allowed. For example, "orderdocument*2015" will return order
38331// documents with names like "orderdocument June 2015", "orderdocument
38332// April 2015", or simply "orderdocument 2015". Most of the searches
38333// also add wildcards implicitly at the start and the end of the search
38334// string. For example, a search string of "orderdocument" will match
38335// order documents with name "my orderdocument", "orderdocument 2015",
38336// or simply "orderdocument".
38337func (c *OrderDocumentsListCall) SearchString(searchString string) *OrderDocumentsListCall {
38338	c.urlParams_.Set("searchString", searchString)
38339	return c
38340}
38341
38342// SiteId sets the optional parameter "siteId": Select only order
38343// documents that are associated with these sites.
38344func (c *OrderDocumentsListCall) SiteId(siteId ...int64) *OrderDocumentsListCall {
38345	var siteId_ []string
38346	for _, v := range siteId {
38347		siteId_ = append(siteId_, fmt.Sprint(v))
38348	}
38349	c.urlParams_.SetMulti("siteId", siteId_)
38350	return c
38351}
38352
38353// SortField sets the optional parameter "sortField": Field by which to
38354// sort the list.
38355//
38356// Possible values:
38357//   "ID" (default)
38358//   "NAME"
38359func (c *OrderDocumentsListCall) SortField(sortField string) *OrderDocumentsListCall {
38360	c.urlParams_.Set("sortField", sortField)
38361	return c
38362}
38363
38364// SortOrder sets the optional parameter "sortOrder": Order of sorted
38365// results.
38366//
38367// Possible values:
38368//   "ASCENDING" (default)
38369//   "DESCENDING"
38370func (c *OrderDocumentsListCall) SortOrder(sortOrder string) *OrderDocumentsListCall {
38371	c.urlParams_.Set("sortOrder", sortOrder)
38372	return c
38373}
38374
38375// Fields allows partial responses to be retrieved. See
38376// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38377// for more information.
38378func (c *OrderDocumentsListCall) Fields(s ...googleapi.Field) *OrderDocumentsListCall {
38379	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38380	return c
38381}
38382
38383// IfNoneMatch sets the optional parameter which makes the operation
38384// fail if the object's ETag matches the given value. This is useful for
38385// getting updates only after the object has changed since the last
38386// request. Use googleapi.IsNotModified to check whether the response
38387// error from Do is the result of In-None-Match.
38388func (c *OrderDocumentsListCall) IfNoneMatch(entityTag string) *OrderDocumentsListCall {
38389	c.ifNoneMatch_ = entityTag
38390	return c
38391}
38392
38393// Context sets the context to be used in this call's Do method. Any
38394// pending HTTP request will be aborted if the provided context is
38395// canceled.
38396func (c *OrderDocumentsListCall) Context(ctx context.Context) *OrderDocumentsListCall {
38397	c.ctx_ = ctx
38398	return c
38399}
38400
38401// Header returns an http.Header that can be modified by the caller to
38402// add HTTP headers to the request.
38403func (c *OrderDocumentsListCall) Header() http.Header {
38404	if c.header_ == nil {
38405		c.header_ = make(http.Header)
38406	}
38407	return c.header_
38408}
38409
38410func (c *OrderDocumentsListCall) doRequest(alt string) (*http.Response, error) {
38411	reqHeaders := make(http.Header)
38412	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
38413	for k, v := range c.header_ {
38414		reqHeaders[k] = v
38415	}
38416	reqHeaders.Set("User-Agent", c.s.userAgent())
38417	if c.ifNoneMatch_ != "" {
38418		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38419	}
38420	var body io.Reader = nil
38421	c.urlParams_.Set("alt", alt)
38422	c.urlParams_.Set("prettyPrint", "false")
38423	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments")
38424	urls += "?" + c.urlParams_.Encode()
38425	req, err := http.NewRequest("GET", urls, body)
38426	if err != nil {
38427		return nil, err
38428	}
38429	req.Header = reqHeaders
38430	googleapi.Expand(req.URL, map[string]string{
38431		"profileId": strconv.FormatInt(c.profileId, 10),
38432		"projectId": strconv.FormatInt(c.projectId, 10),
38433	})
38434	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38435}
38436
38437// Do executes the "dfareporting.orderDocuments.list" call.
38438// Exactly one of *OrderDocumentsListResponse or error will be non-nil.
38439// Any non-2xx status code is an error. Response headers are in either
38440// *OrderDocumentsListResponse.ServerResponse.Header or (if a response
38441// was returned at all) in error.(*googleapi.Error).Header. Use
38442// googleapi.IsNotModified to check whether the returned error was
38443// because http.StatusNotModified was returned.
38444func (c *OrderDocumentsListCall) Do(opts ...googleapi.CallOption) (*OrderDocumentsListResponse, error) {
38445	gensupport.SetOptions(c.urlParams_, opts...)
38446	res, err := c.doRequest("json")
38447	if res != nil && res.StatusCode == http.StatusNotModified {
38448		if res.Body != nil {
38449			res.Body.Close()
38450		}
38451		return nil, &googleapi.Error{
38452			Code:   res.StatusCode,
38453			Header: res.Header,
38454		}
38455	}
38456	if err != nil {
38457		return nil, err
38458	}
38459	defer googleapi.CloseBody(res)
38460	if err := googleapi.CheckResponse(res); err != nil {
38461		return nil, err
38462	}
38463	ret := &OrderDocumentsListResponse{
38464		ServerResponse: googleapi.ServerResponse{
38465			Header:         res.Header,
38466			HTTPStatusCode: res.StatusCode,
38467		},
38468	}
38469	target := &ret
38470	if err := gensupport.DecodeResponse(target, res); err != nil {
38471		return nil, err
38472	}
38473	return ret, nil
38474	// {
38475	//   "description": "Retrieves a list of order documents, possibly filtered. This method supports paging.",
38476	//   "flatPath": "userprofiles/{profileId}/projects/{projectId}/orderDocuments",
38477	//   "httpMethod": "GET",
38478	//   "id": "dfareporting.orderDocuments.list",
38479	//   "parameterOrder": [
38480	//     "profileId",
38481	//     "projectId"
38482	//   ],
38483	//   "parameters": {
38484	//     "approved": {
38485	//       "description": "Select only order documents that have been approved by at least one user.",
38486	//       "location": "query",
38487	//       "type": "boolean"
38488	//     },
38489	//     "ids": {
38490	//       "description": "Select only order documents with these IDs.",
38491	//       "format": "int64",
38492	//       "location": "query",
38493	//       "repeated": true,
38494	//       "type": "string"
38495	//     },
38496	//     "maxResults": {
38497	//       "default": "1000",
38498	//       "description": "Maximum number of results to return.",
38499	//       "format": "int32",
38500	//       "location": "query",
38501	//       "maximum": "1000",
38502	//       "minimum": "0",
38503	//       "type": "integer"
38504	//     },
38505	//     "orderId": {
38506	//       "description": "Select only order documents for specified orders.",
38507	//       "format": "int64",
38508	//       "location": "query",
38509	//       "repeated": true,
38510	//       "type": "string"
38511	//     },
38512	//     "pageToken": {
38513	//       "description": "Value of the nextPageToken from the previous result page.",
38514	//       "location": "query",
38515	//       "type": "string"
38516	//     },
38517	//     "profileId": {
38518	//       "description": "User profile ID associated with this request.",
38519	//       "format": "int64",
38520	//       "location": "path",
38521	//       "required": true,
38522	//       "type": "string"
38523	//     },
38524	//     "projectId": {
38525	//       "description": "Project ID for order documents.",
38526	//       "format": "int64",
38527	//       "location": "path",
38528	//       "required": true,
38529	//       "type": "string"
38530	//     },
38531	//     "searchString": {
38532	//       "description": "Allows searching for order documents by name or ID. Wildcards (*) are allowed. For example, \"orderdocument*2015\" will return order documents with names like \"orderdocument June 2015\", \"orderdocument April 2015\", or simply \"orderdocument 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"orderdocument\" will match order documents with name \"my orderdocument\", \"orderdocument 2015\", or simply \"orderdocument\".",
38533	//       "location": "query",
38534	//       "type": "string"
38535	//     },
38536	//     "siteId": {
38537	//       "description": "Select only order documents that are associated with these sites.",
38538	//       "format": "int64",
38539	//       "location": "query",
38540	//       "repeated": true,
38541	//       "type": "string"
38542	//     },
38543	//     "sortField": {
38544	//       "default": "ID",
38545	//       "description": "Field by which to sort the list.",
38546	//       "enum": [
38547	//         "ID",
38548	//         "NAME"
38549	//       ],
38550	//       "enumDescriptions": [
38551	//         "",
38552	//         ""
38553	//       ],
38554	//       "location": "query",
38555	//       "type": "string"
38556	//     },
38557	//     "sortOrder": {
38558	//       "default": "ASCENDING",
38559	//       "description": "Order of sorted results.",
38560	//       "enum": [
38561	//         "ASCENDING",
38562	//         "DESCENDING"
38563	//       ],
38564	//       "enumDescriptions": [
38565	//         "",
38566	//         ""
38567	//       ],
38568	//       "location": "query",
38569	//       "type": "string"
38570	//     }
38571	//   },
38572	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments",
38573	//   "response": {
38574	//     "$ref": "OrderDocumentsListResponse"
38575	//   },
38576	//   "scopes": [
38577	//     "https://www.googleapis.com/auth/dfatrafficking"
38578	//   ]
38579	// }
38580
38581}
38582
38583// Pages invokes f for each page of results.
38584// A non-nil error returned from f will halt the iteration.
38585// The provided context supersedes any context provided to the Context method.
38586func (c *OrderDocumentsListCall) Pages(ctx context.Context, f func(*OrderDocumentsListResponse) error) error {
38587	c.ctx_ = ctx
38588	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38589	for {
38590		x, err := c.Do()
38591		if err != nil {
38592			return err
38593		}
38594		if err := f(x); err != nil {
38595			return err
38596		}
38597		if x.NextPageToken == "" {
38598			return nil
38599		}
38600		c.PageToken(x.NextPageToken)
38601	}
38602}
38603
38604// method id "dfareporting.orders.get":
38605
38606type OrdersGetCall struct {
38607	s            *Service
38608	profileId    int64
38609	projectId    int64
38610	id           int64
38611	urlParams_   gensupport.URLParams
38612	ifNoneMatch_ string
38613	ctx_         context.Context
38614	header_      http.Header
38615}
38616
38617// Get: Gets one order by ID.
38618//
38619// - id: Order ID.
38620// - profileId: User profile ID associated with this request.
38621// - projectId: Project ID for orders.
38622func (r *OrdersService) Get(profileId int64, projectId int64, id int64) *OrdersGetCall {
38623	c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38624	c.profileId = profileId
38625	c.projectId = projectId
38626	c.id = id
38627	return c
38628}
38629
38630// Fields allows partial responses to be retrieved. See
38631// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38632// for more information.
38633func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall {
38634	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38635	return c
38636}
38637
38638// IfNoneMatch sets the optional parameter which makes the operation
38639// fail if the object's ETag matches the given value. This is useful for
38640// getting updates only after the object has changed since the last
38641// request. Use googleapi.IsNotModified to check whether the response
38642// error from Do is the result of In-None-Match.
38643func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall {
38644	c.ifNoneMatch_ = entityTag
38645	return c
38646}
38647
38648// Context sets the context to be used in this call's Do method. Any
38649// pending HTTP request will be aborted if the provided context is
38650// canceled.
38651func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
38652	c.ctx_ = ctx
38653	return c
38654}
38655
38656// Header returns an http.Header that can be modified by the caller to
38657// add HTTP headers to the request.
38658func (c *OrdersGetCall) Header() http.Header {
38659	if c.header_ == nil {
38660		c.header_ = make(http.Header)
38661	}
38662	return c.header_
38663}
38664
38665func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
38666	reqHeaders := make(http.Header)
38667	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
38668	for k, v := range c.header_ {
38669		reqHeaders[k] = v
38670	}
38671	reqHeaders.Set("User-Agent", c.s.userAgent())
38672	if c.ifNoneMatch_ != "" {
38673		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38674	}
38675	var body io.Reader = nil
38676	c.urlParams_.Set("alt", alt)
38677	c.urlParams_.Set("prettyPrint", "false")
38678	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders/{id}")
38679	urls += "?" + c.urlParams_.Encode()
38680	req, err := http.NewRequest("GET", urls, body)
38681	if err != nil {
38682		return nil, err
38683	}
38684	req.Header = reqHeaders
38685	googleapi.Expand(req.URL, map[string]string{
38686		"profileId": strconv.FormatInt(c.profileId, 10),
38687		"projectId": strconv.FormatInt(c.projectId, 10),
38688		"id":        strconv.FormatInt(c.id, 10),
38689	})
38690	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38691}
38692
38693// Do executes the "dfareporting.orders.get" call.
38694// Exactly one of *Order or error will be non-nil. Any non-2xx status
38695// code is an error. Response headers are in either
38696// *Order.ServerResponse.Header or (if a response was returned at all)
38697// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
38698// check whether the returned error was because http.StatusNotModified
38699// was returned.
38700func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
38701	gensupport.SetOptions(c.urlParams_, opts...)
38702	res, err := c.doRequest("json")
38703	if res != nil && res.StatusCode == http.StatusNotModified {
38704		if res.Body != nil {
38705			res.Body.Close()
38706		}
38707		return nil, &googleapi.Error{
38708			Code:   res.StatusCode,
38709			Header: res.Header,
38710		}
38711	}
38712	if err != nil {
38713		return nil, err
38714	}
38715	defer googleapi.CloseBody(res)
38716	if err := googleapi.CheckResponse(res); err != nil {
38717		return nil, err
38718	}
38719	ret := &Order{
38720		ServerResponse: googleapi.ServerResponse{
38721			Header:         res.Header,
38722			HTTPStatusCode: res.StatusCode,
38723		},
38724	}
38725	target := &ret
38726	if err := gensupport.DecodeResponse(target, res); err != nil {
38727		return nil, err
38728	}
38729	return ret, nil
38730	// {
38731	//   "description": "Gets one order by ID.",
38732	//   "flatPath": "userprofiles/{profileId}/projects/{projectId}/orders/{id}",
38733	//   "httpMethod": "GET",
38734	//   "id": "dfareporting.orders.get",
38735	//   "parameterOrder": [
38736	//     "profileId",
38737	//     "projectId",
38738	//     "id"
38739	//   ],
38740	//   "parameters": {
38741	//     "id": {
38742	//       "description": "Order ID.",
38743	//       "format": "int64",
38744	//       "location": "path",
38745	//       "required": true,
38746	//       "type": "string"
38747	//     },
38748	//     "profileId": {
38749	//       "description": "User profile ID associated with this request.",
38750	//       "format": "int64",
38751	//       "location": "path",
38752	//       "required": true,
38753	//       "type": "string"
38754	//     },
38755	//     "projectId": {
38756	//       "description": "Project ID for orders.",
38757	//       "format": "int64",
38758	//       "location": "path",
38759	//       "required": true,
38760	//       "type": "string"
38761	//     }
38762	//   },
38763	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders/{id}",
38764	//   "response": {
38765	//     "$ref": "Order"
38766	//   },
38767	//   "scopes": [
38768	//     "https://www.googleapis.com/auth/dfatrafficking"
38769	//   ]
38770	// }
38771
38772}
38773
38774// method id "dfareporting.orders.list":
38775
38776type OrdersListCall struct {
38777	s            *Service
38778	profileId    int64
38779	projectId    int64
38780	urlParams_   gensupport.URLParams
38781	ifNoneMatch_ string
38782	ctx_         context.Context
38783	header_      http.Header
38784}
38785
38786// List: Retrieves a list of orders, possibly filtered. This method
38787// supports paging.
38788//
38789// - profileId: User profile ID associated with this request.
38790// - projectId: Project ID for orders.
38791func (r *OrdersService) List(profileId int64, projectId int64) *OrdersListCall {
38792	c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38793	c.profileId = profileId
38794	c.projectId = projectId
38795	return c
38796}
38797
38798// Ids sets the optional parameter "ids": Select only orders with these
38799// IDs.
38800func (c *OrdersListCall) Ids(ids ...int64) *OrdersListCall {
38801	var ids_ []string
38802	for _, v := range ids {
38803		ids_ = append(ids_, fmt.Sprint(v))
38804	}
38805	c.urlParams_.SetMulti("ids", ids_)
38806	return c
38807}
38808
38809// MaxResults sets the optional parameter "maxResults": Maximum number
38810// of results to return.
38811func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall {
38812	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38813	return c
38814}
38815
38816// PageToken sets the optional parameter "pageToken": Value of the
38817// nextPageToken from the previous result page.
38818func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall {
38819	c.urlParams_.Set("pageToken", pageToken)
38820	return c
38821}
38822
38823// SearchString sets the optional parameter "searchString": Allows
38824// searching for orders by name or ID. Wildcards (*) are allowed. For
38825// example, "order*2015" will return orders with names like "order June
38826// 2015", "order April 2015", or simply "order 2015". Most of the
38827// searches also add wildcards implicitly at the start and the end of
38828// the search string. For example, a search string of "order" will match
38829// orders with name "my order", "order 2015", or simply "order".
38830func (c *OrdersListCall) SearchString(searchString string) *OrdersListCall {
38831	c.urlParams_.Set("searchString", searchString)
38832	return c
38833}
38834
38835// SiteId sets the optional parameter "siteId": Select only orders that
38836// are associated with these site IDs.
38837func (c *OrdersListCall) SiteId(siteId ...int64) *OrdersListCall {
38838	var siteId_ []string
38839	for _, v := range siteId {
38840		siteId_ = append(siteId_, fmt.Sprint(v))
38841	}
38842	c.urlParams_.SetMulti("siteId", siteId_)
38843	return c
38844}
38845
38846// SortField sets the optional parameter "sortField": Field by which to
38847// sort the list.
38848//
38849// Possible values:
38850//   "ID" (default)
38851//   "NAME"
38852func (c *OrdersListCall) SortField(sortField string) *OrdersListCall {
38853	c.urlParams_.Set("sortField", sortField)
38854	return c
38855}
38856
38857// SortOrder sets the optional parameter "sortOrder": Order of sorted
38858// results.
38859//
38860// Possible values:
38861//   "ASCENDING" (default)
38862//   "DESCENDING"
38863func (c *OrdersListCall) SortOrder(sortOrder string) *OrdersListCall {
38864	c.urlParams_.Set("sortOrder", sortOrder)
38865	return c
38866}
38867
38868// Fields allows partial responses to be retrieved. See
38869// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38870// for more information.
38871func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall {
38872	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38873	return c
38874}
38875
38876// IfNoneMatch sets the optional parameter which makes the operation
38877// fail if the object's ETag matches the given value. This is useful for
38878// getting updates only after the object has changed since the last
38879// request. Use googleapi.IsNotModified to check whether the response
38880// error from Do is the result of In-None-Match.
38881func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall {
38882	c.ifNoneMatch_ = entityTag
38883	return c
38884}
38885
38886// Context sets the context to be used in this call's Do method. Any
38887// pending HTTP request will be aborted if the provided context is
38888// canceled.
38889func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
38890	c.ctx_ = ctx
38891	return c
38892}
38893
38894// Header returns an http.Header that can be modified by the caller to
38895// add HTTP headers to the request.
38896func (c *OrdersListCall) Header() http.Header {
38897	if c.header_ == nil {
38898		c.header_ = make(http.Header)
38899	}
38900	return c.header_
38901}
38902
38903func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
38904	reqHeaders := make(http.Header)
38905	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
38906	for k, v := range c.header_ {
38907		reqHeaders[k] = v
38908	}
38909	reqHeaders.Set("User-Agent", c.s.userAgent())
38910	if c.ifNoneMatch_ != "" {
38911		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38912	}
38913	var body io.Reader = nil
38914	c.urlParams_.Set("alt", alt)
38915	c.urlParams_.Set("prettyPrint", "false")
38916	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders")
38917	urls += "?" + c.urlParams_.Encode()
38918	req, err := http.NewRequest("GET", urls, body)
38919	if err != nil {
38920		return nil, err
38921	}
38922	req.Header = reqHeaders
38923	googleapi.Expand(req.URL, map[string]string{
38924		"profileId": strconv.FormatInt(c.profileId, 10),
38925		"projectId": strconv.FormatInt(c.projectId, 10),
38926	})
38927	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38928}
38929
38930// Do executes the "dfareporting.orders.list" call.
38931// Exactly one of *OrdersListResponse or error will be non-nil. Any
38932// non-2xx status code is an error. Response headers are in either
38933// *OrdersListResponse.ServerResponse.Header or (if a response was
38934// returned at all) in error.(*googleapi.Error).Header. Use
38935// googleapi.IsNotModified to check whether the returned error was
38936// because http.StatusNotModified was returned.
38937func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) {
38938	gensupport.SetOptions(c.urlParams_, opts...)
38939	res, err := c.doRequest("json")
38940	if res != nil && res.StatusCode == http.StatusNotModified {
38941		if res.Body != nil {
38942			res.Body.Close()
38943		}
38944		return nil, &googleapi.Error{
38945			Code:   res.StatusCode,
38946			Header: res.Header,
38947		}
38948	}
38949	if err != nil {
38950		return nil, err
38951	}
38952	defer googleapi.CloseBody(res)
38953	if err := googleapi.CheckResponse(res); err != nil {
38954		return nil, err
38955	}
38956	ret := &OrdersListResponse{
38957		ServerResponse: googleapi.ServerResponse{
38958			Header:         res.Header,
38959			HTTPStatusCode: res.StatusCode,
38960		},
38961	}
38962	target := &ret
38963	if err := gensupport.DecodeResponse(target, res); err != nil {
38964		return nil, err
38965	}
38966	return ret, nil
38967	// {
38968	//   "description": "Retrieves a list of orders, possibly filtered. This method supports paging.",
38969	//   "flatPath": "userprofiles/{profileId}/projects/{projectId}/orders",
38970	//   "httpMethod": "GET",
38971	//   "id": "dfareporting.orders.list",
38972	//   "parameterOrder": [
38973	//     "profileId",
38974	//     "projectId"
38975	//   ],
38976	//   "parameters": {
38977	//     "ids": {
38978	//       "description": "Select only orders with these IDs.",
38979	//       "format": "int64",
38980	//       "location": "query",
38981	//       "repeated": true,
38982	//       "type": "string"
38983	//     },
38984	//     "maxResults": {
38985	//       "default": "1000",
38986	//       "description": "Maximum number of results to return.",
38987	//       "format": "int32",
38988	//       "location": "query",
38989	//       "maximum": "1000",
38990	//       "minimum": "0",
38991	//       "type": "integer"
38992	//     },
38993	//     "pageToken": {
38994	//       "description": "Value of the nextPageToken from the previous result page.",
38995	//       "location": "query",
38996	//       "type": "string"
38997	//     },
38998	//     "profileId": {
38999	//       "description": "User profile ID associated with this request.",
39000	//       "format": "int64",
39001	//       "location": "path",
39002	//       "required": true,
39003	//       "type": "string"
39004	//     },
39005	//     "projectId": {
39006	//       "description": "Project ID for orders.",
39007	//       "format": "int64",
39008	//       "location": "path",
39009	//       "required": true,
39010	//       "type": "string"
39011	//     },
39012	//     "searchString": {
39013	//       "description": "Allows searching for orders by name or ID. Wildcards (*) are allowed. For example, \"order*2015\" will return orders with names like \"order June 2015\", \"order April 2015\", or simply \"order 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"order\" will match orders with name \"my order\", \"order 2015\", or simply \"order\".",
39014	//       "location": "query",
39015	//       "type": "string"
39016	//     },
39017	//     "siteId": {
39018	//       "description": "Select only orders that are associated with these site IDs.",
39019	//       "format": "int64",
39020	//       "location": "query",
39021	//       "repeated": true,
39022	//       "type": "string"
39023	//     },
39024	//     "sortField": {
39025	//       "default": "ID",
39026	//       "description": "Field by which to sort the list.",
39027	//       "enum": [
39028	//         "ID",
39029	//         "NAME"
39030	//       ],
39031	//       "enumDescriptions": [
39032	//         "",
39033	//         ""
39034	//       ],
39035	//       "location": "query",
39036	//       "type": "string"
39037	//     },
39038	//     "sortOrder": {
39039	//       "default": "ASCENDING",
39040	//       "description": "Order of sorted results.",
39041	//       "enum": [
39042	//         "ASCENDING",
39043	//         "DESCENDING"
39044	//       ],
39045	//       "enumDescriptions": [
39046	//         "",
39047	//         ""
39048	//       ],
39049	//       "location": "query",
39050	//       "type": "string"
39051	//     }
39052	//   },
39053	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders",
39054	//   "response": {
39055	//     "$ref": "OrdersListResponse"
39056	//   },
39057	//   "scopes": [
39058	//     "https://www.googleapis.com/auth/dfatrafficking"
39059	//   ]
39060	// }
39061
39062}
39063
39064// Pages invokes f for each page of results.
39065// A non-nil error returned from f will halt the iteration.
39066// The provided context supersedes any context provided to the Context method.
39067func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error {
39068	c.ctx_ = ctx
39069	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
39070	for {
39071		x, err := c.Do()
39072		if err != nil {
39073			return err
39074		}
39075		if err := f(x); err != nil {
39076			return err
39077		}
39078		if x.NextPageToken == "" {
39079			return nil
39080		}
39081		c.PageToken(x.NextPageToken)
39082	}
39083}
39084
39085// method id "dfareporting.placementGroups.get":
39086
39087type PlacementGroupsGetCall struct {
39088	s            *Service
39089	profileId    int64
39090	id           int64
39091	urlParams_   gensupport.URLParams
39092	ifNoneMatch_ string
39093	ctx_         context.Context
39094	header_      http.Header
39095}
39096
39097// Get: Gets one placement group by ID.
39098//
39099// - id: Placement group ID.
39100// - profileId: User profile ID associated with this request.
39101func (r *PlacementGroupsService) Get(profileId int64, id int64) *PlacementGroupsGetCall {
39102	c := &PlacementGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39103	c.profileId = profileId
39104	c.id = id
39105	return c
39106}
39107
39108// Fields allows partial responses to be retrieved. See
39109// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39110// for more information.
39111func (c *PlacementGroupsGetCall) Fields(s ...googleapi.Field) *PlacementGroupsGetCall {
39112	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39113	return c
39114}
39115
39116// IfNoneMatch sets the optional parameter which makes the operation
39117// fail if the object's ETag matches the given value. This is useful for
39118// getting updates only after the object has changed since the last
39119// request. Use googleapi.IsNotModified to check whether the response
39120// error from Do is the result of In-None-Match.
39121func (c *PlacementGroupsGetCall) IfNoneMatch(entityTag string) *PlacementGroupsGetCall {
39122	c.ifNoneMatch_ = entityTag
39123	return c
39124}
39125
39126// Context sets the context to be used in this call's Do method. Any
39127// pending HTTP request will be aborted if the provided context is
39128// canceled.
39129func (c *PlacementGroupsGetCall) Context(ctx context.Context) *PlacementGroupsGetCall {
39130	c.ctx_ = ctx
39131	return c
39132}
39133
39134// Header returns an http.Header that can be modified by the caller to
39135// add HTTP headers to the request.
39136func (c *PlacementGroupsGetCall) Header() http.Header {
39137	if c.header_ == nil {
39138		c.header_ = make(http.Header)
39139	}
39140	return c.header_
39141}
39142
39143func (c *PlacementGroupsGetCall) doRequest(alt string) (*http.Response, error) {
39144	reqHeaders := make(http.Header)
39145	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
39146	for k, v := range c.header_ {
39147		reqHeaders[k] = v
39148	}
39149	reqHeaders.Set("User-Agent", c.s.userAgent())
39150	if c.ifNoneMatch_ != "" {
39151		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39152	}
39153	var body io.Reader = nil
39154	c.urlParams_.Set("alt", alt)
39155	c.urlParams_.Set("prettyPrint", "false")
39156	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups/{id}")
39157	urls += "?" + c.urlParams_.Encode()
39158	req, err := http.NewRequest("GET", urls, body)
39159	if err != nil {
39160		return nil, err
39161	}
39162	req.Header = reqHeaders
39163	googleapi.Expand(req.URL, map[string]string{
39164		"profileId": strconv.FormatInt(c.profileId, 10),
39165		"id":        strconv.FormatInt(c.id, 10),
39166	})
39167	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39168}
39169
39170// Do executes the "dfareporting.placementGroups.get" call.
39171// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
39172// status code is an error. Response headers are in either
39173// *PlacementGroup.ServerResponse.Header or (if a response was returned
39174// at all) in error.(*googleapi.Error).Header. Use
39175// googleapi.IsNotModified to check whether the returned error was
39176// because http.StatusNotModified was returned.
39177func (c *PlacementGroupsGetCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
39178	gensupport.SetOptions(c.urlParams_, opts...)
39179	res, err := c.doRequest("json")
39180	if res != nil && res.StatusCode == http.StatusNotModified {
39181		if res.Body != nil {
39182			res.Body.Close()
39183		}
39184		return nil, &googleapi.Error{
39185			Code:   res.StatusCode,
39186			Header: res.Header,
39187		}
39188	}
39189	if err != nil {
39190		return nil, err
39191	}
39192	defer googleapi.CloseBody(res)
39193	if err := googleapi.CheckResponse(res); err != nil {
39194		return nil, err
39195	}
39196	ret := &PlacementGroup{
39197		ServerResponse: googleapi.ServerResponse{
39198			Header:         res.Header,
39199			HTTPStatusCode: res.StatusCode,
39200		},
39201	}
39202	target := &ret
39203	if err := gensupport.DecodeResponse(target, res); err != nil {
39204		return nil, err
39205	}
39206	return ret, nil
39207	// {
39208	//   "description": "Gets one placement group by ID.",
39209	//   "flatPath": "userprofiles/{profileId}/placementGroups/{id}",
39210	//   "httpMethod": "GET",
39211	//   "id": "dfareporting.placementGroups.get",
39212	//   "parameterOrder": [
39213	//     "profileId",
39214	//     "id"
39215	//   ],
39216	//   "parameters": {
39217	//     "id": {
39218	//       "description": "Placement group ID.",
39219	//       "format": "int64",
39220	//       "location": "path",
39221	//       "required": true,
39222	//       "type": "string"
39223	//     },
39224	//     "profileId": {
39225	//       "description": "User profile ID associated with this request.",
39226	//       "format": "int64",
39227	//       "location": "path",
39228	//       "required": true,
39229	//       "type": "string"
39230	//     }
39231	//   },
39232	//   "path": "userprofiles/{profileId}/placementGroups/{id}",
39233	//   "response": {
39234	//     "$ref": "PlacementGroup"
39235	//   },
39236	//   "scopes": [
39237	//     "https://www.googleapis.com/auth/dfatrafficking"
39238	//   ]
39239	// }
39240
39241}
39242
39243// method id "dfareporting.placementGroups.insert":
39244
39245type PlacementGroupsInsertCall struct {
39246	s              *Service
39247	profileId      int64
39248	placementgroup *PlacementGroup
39249	urlParams_     gensupport.URLParams
39250	ctx_           context.Context
39251	header_        http.Header
39252}
39253
39254// Insert: Inserts a new placement group.
39255//
39256// - profileId: User profile ID associated with this request.
39257func (r *PlacementGroupsService) Insert(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsInsertCall {
39258	c := &PlacementGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39259	c.profileId = profileId
39260	c.placementgroup = placementgroup
39261	return c
39262}
39263
39264// Fields allows partial responses to be retrieved. See
39265// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39266// for more information.
39267func (c *PlacementGroupsInsertCall) Fields(s ...googleapi.Field) *PlacementGroupsInsertCall {
39268	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39269	return c
39270}
39271
39272// Context sets the context to be used in this call's Do method. Any
39273// pending HTTP request will be aborted if the provided context is
39274// canceled.
39275func (c *PlacementGroupsInsertCall) Context(ctx context.Context) *PlacementGroupsInsertCall {
39276	c.ctx_ = ctx
39277	return c
39278}
39279
39280// Header returns an http.Header that can be modified by the caller to
39281// add HTTP headers to the request.
39282func (c *PlacementGroupsInsertCall) Header() http.Header {
39283	if c.header_ == nil {
39284		c.header_ = make(http.Header)
39285	}
39286	return c.header_
39287}
39288
39289func (c *PlacementGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
39290	reqHeaders := make(http.Header)
39291	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
39292	for k, v := range c.header_ {
39293		reqHeaders[k] = v
39294	}
39295	reqHeaders.Set("User-Agent", c.s.userAgent())
39296	var body io.Reader = nil
39297	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
39298	if err != nil {
39299		return nil, err
39300	}
39301	reqHeaders.Set("Content-Type", "application/json")
39302	c.urlParams_.Set("alt", alt)
39303	c.urlParams_.Set("prettyPrint", "false")
39304	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
39305	urls += "?" + c.urlParams_.Encode()
39306	req, err := http.NewRequest("POST", urls, body)
39307	if err != nil {
39308		return nil, err
39309	}
39310	req.Header = reqHeaders
39311	googleapi.Expand(req.URL, map[string]string{
39312		"profileId": strconv.FormatInt(c.profileId, 10),
39313	})
39314	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39315}
39316
39317// Do executes the "dfareporting.placementGroups.insert" call.
39318// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
39319// status code is an error. Response headers are in either
39320// *PlacementGroup.ServerResponse.Header or (if a response was returned
39321// at all) in error.(*googleapi.Error).Header. Use
39322// googleapi.IsNotModified to check whether the returned error was
39323// because http.StatusNotModified was returned.
39324func (c *PlacementGroupsInsertCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
39325	gensupport.SetOptions(c.urlParams_, opts...)
39326	res, err := c.doRequest("json")
39327	if res != nil && res.StatusCode == http.StatusNotModified {
39328		if res.Body != nil {
39329			res.Body.Close()
39330		}
39331		return nil, &googleapi.Error{
39332			Code:   res.StatusCode,
39333			Header: res.Header,
39334		}
39335	}
39336	if err != nil {
39337		return nil, err
39338	}
39339	defer googleapi.CloseBody(res)
39340	if err := googleapi.CheckResponse(res); err != nil {
39341		return nil, err
39342	}
39343	ret := &PlacementGroup{
39344		ServerResponse: googleapi.ServerResponse{
39345			Header:         res.Header,
39346			HTTPStatusCode: res.StatusCode,
39347		},
39348	}
39349	target := &ret
39350	if err := gensupport.DecodeResponse(target, res); err != nil {
39351		return nil, err
39352	}
39353	return ret, nil
39354	// {
39355	//   "description": "Inserts a new placement group.",
39356	//   "flatPath": "userprofiles/{profileId}/placementGroups",
39357	//   "httpMethod": "POST",
39358	//   "id": "dfareporting.placementGroups.insert",
39359	//   "parameterOrder": [
39360	//     "profileId"
39361	//   ],
39362	//   "parameters": {
39363	//     "profileId": {
39364	//       "description": "User profile ID associated with this request.",
39365	//       "format": "int64",
39366	//       "location": "path",
39367	//       "required": true,
39368	//       "type": "string"
39369	//     }
39370	//   },
39371	//   "path": "userprofiles/{profileId}/placementGroups",
39372	//   "request": {
39373	//     "$ref": "PlacementGroup"
39374	//   },
39375	//   "response": {
39376	//     "$ref": "PlacementGroup"
39377	//   },
39378	//   "scopes": [
39379	//     "https://www.googleapis.com/auth/dfatrafficking"
39380	//   ]
39381	// }
39382
39383}
39384
39385// method id "dfareporting.placementGroups.list":
39386
39387type PlacementGroupsListCall struct {
39388	s            *Service
39389	profileId    int64
39390	urlParams_   gensupport.URLParams
39391	ifNoneMatch_ string
39392	ctx_         context.Context
39393	header_      http.Header
39394}
39395
39396// List: Retrieves a list of placement groups, possibly filtered. This
39397// method supports paging.
39398//
39399// - profileId: User profile ID associated with this request.
39400func (r *PlacementGroupsService) List(profileId int64) *PlacementGroupsListCall {
39401	c := &PlacementGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39402	c.profileId = profileId
39403	return c
39404}
39405
39406// AdvertiserIds sets the optional parameter "advertiserIds": Select
39407// only placement groups that belong to these advertisers.
39408func (c *PlacementGroupsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementGroupsListCall {
39409	var advertiserIds_ []string
39410	for _, v := range advertiserIds {
39411		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
39412	}
39413	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
39414	return c
39415}
39416
39417// Archived sets the optional parameter "archived": Select only archived
39418// placements. Don't set this field to select both archived and
39419// non-archived placements.
39420func (c *PlacementGroupsListCall) Archived(archived bool) *PlacementGroupsListCall {
39421	c.urlParams_.Set("archived", fmt.Sprint(archived))
39422	return c
39423}
39424
39425// CampaignIds sets the optional parameter "campaignIds": Select only
39426// placement groups that belong to these campaigns.
39427func (c *PlacementGroupsListCall) CampaignIds(campaignIds ...int64) *PlacementGroupsListCall {
39428	var campaignIds_ []string
39429	for _, v := range campaignIds {
39430		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
39431	}
39432	c.urlParams_.SetMulti("campaignIds", campaignIds_)
39433	return c
39434}
39435
39436// ContentCategoryIds sets the optional parameter "contentCategoryIds":
39437// Select only placement groups that are associated with these content
39438// categories.
39439func (c *PlacementGroupsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementGroupsListCall {
39440	var contentCategoryIds_ []string
39441	for _, v := range contentCategoryIds {
39442		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
39443	}
39444	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
39445	return c
39446}
39447
39448// DirectorySiteIds sets the optional parameter "directorySiteIds":
39449// Select only placement groups that are associated with these directory
39450// sites.
39451func (c *PlacementGroupsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementGroupsListCall {
39452	var directorySiteIds_ []string
39453	for _, v := range directorySiteIds {
39454		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
39455	}
39456	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
39457	return c
39458}
39459
39460// Ids sets the optional parameter "ids": Select only placement groups
39461// with these IDs.
39462func (c *PlacementGroupsListCall) Ids(ids ...int64) *PlacementGroupsListCall {
39463	var ids_ []string
39464	for _, v := range ids {
39465		ids_ = append(ids_, fmt.Sprint(v))
39466	}
39467	c.urlParams_.SetMulti("ids", ids_)
39468	return c
39469}
39470
39471// MaxEndDate sets the optional parameter "maxEndDate": Select only
39472// placements or placement groups whose end date is on or before the
39473// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
39474func (c *PlacementGroupsListCall) MaxEndDate(maxEndDate string) *PlacementGroupsListCall {
39475	c.urlParams_.Set("maxEndDate", maxEndDate)
39476	return c
39477}
39478
39479// MaxResults sets the optional parameter "maxResults": Maximum number
39480// of results to return.
39481func (c *PlacementGroupsListCall) MaxResults(maxResults int64) *PlacementGroupsListCall {
39482	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
39483	return c
39484}
39485
39486// MaxStartDate sets the optional parameter "maxStartDate": Select only
39487// placements or placement groups whose start date is on or before the
39488// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
39489func (c *PlacementGroupsListCall) MaxStartDate(maxStartDate string) *PlacementGroupsListCall {
39490	c.urlParams_.Set("maxStartDate", maxStartDate)
39491	return c
39492}
39493
39494// MinEndDate sets the optional parameter "minEndDate": Select only
39495// placements or placement groups whose end date is on or after the
39496// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
39497func (c *PlacementGroupsListCall) MinEndDate(minEndDate string) *PlacementGroupsListCall {
39498	c.urlParams_.Set("minEndDate", minEndDate)
39499	return c
39500}
39501
39502// MinStartDate sets the optional parameter "minStartDate": Select only
39503// placements or placement groups whose start date is on or after the
39504// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
39505func (c *PlacementGroupsListCall) MinStartDate(minStartDate string) *PlacementGroupsListCall {
39506	c.urlParams_.Set("minStartDate", minStartDate)
39507	return c
39508}
39509
39510// PageToken sets the optional parameter "pageToken": Value of the
39511// nextPageToken from the previous result page.
39512func (c *PlacementGroupsListCall) PageToken(pageToken string) *PlacementGroupsListCall {
39513	c.urlParams_.Set("pageToken", pageToken)
39514	return c
39515}
39516
39517// PlacementGroupType sets the optional parameter "placementGroupType":
39518// Select only placement groups belonging with this group type. A
39519// package is a simple group of placements that acts as a single pricing
39520// point for a group of tags. A roadblock is a group of placements that
39521// not only acts as a single pricing point but also assumes that all the
39522// tags in it will be served at the same time. A roadblock requires one
39523// of its assigned placements to be marked as primary for reporting.
39524//
39525// Possible values:
39526//   "PLACEMENT_PACKAGE"
39527//   "PLACEMENT_ROADBLOCK"
39528func (c *PlacementGroupsListCall) PlacementGroupType(placementGroupType string) *PlacementGroupsListCall {
39529	c.urlParams_.Set("placementGroupType", placementGroupType)
39530	return c
39531}
39532
39533// PlacementStrategyIds sets the optional parameter
39534// "placementStrategyIds": Select only placement groups that are
39535// associated with these placement strategies.
39536func (c *PlacementGroupsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementGroupsListCall {
39537	var placementStrategyIds_ []string
39538	for _, v := range placementStrategyIds {
39539		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
39540	}
39541	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
39542	return c
39543}
39544
39545// PricingTypes sets the optional parameter "pricingTypes": Select only
39546// placement groups with these pricing types.
39547//
39548// Possible values:
39549//   "PRICING_TYPE_CPM"
39550//   "PRICING_TYPE_CPC"
39551//   "PRICING_TYPE_CPA"
39552//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
39553//   "PRICING_TYPE_FLAT_RATE_CLICKS"
39554//   "PRICING_TYPE_CPM_ACTIVEVIEW"
39555func (c *PlacementGroupsListCall) PricingTypes(pricingTypes ...string) *PlacementGroupsListCall {
39556	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
39557	return c
39558}
39559
39560// SearchString sets the optional parameter "searchString": Allows
39561// searching for placement groups by name or ID. Wildcards (*) are
39562// allowed. For example, "placement*2015" will return placement groups
39563// with names like "placement group June 2015", "placement group May
39564// 2015", or simply "placements 2015". Most of the searches also add
39565// wildcards implicitly at the start and the end of the search string.
39566// For example, a search string of "placementgroup" will match placement
39567// groups with name "my placementgroup", "placementgroup 2015", or
39568// simply "placementgroup".
39569func (c *PlacementGroupsListCall) SearchString(searchString string) *PlacementGroupsListCall {
39570	c.urlParams_.Set("searchString", searchString)
39571	return c
39572}
39573
39574// SiteIds sets the optional parameter "siteIds": Select only placement
39575// groups that are associated with these sites.
39576func (c *PlacementGroupsListCall) SiteIds(siteIds ...int64) *PlacementGroupsListCall {
39577	var siteIds_ []string
39578	for _, v := range siteIds {
39579		siteIds_ = append(siteIds_, fmt.Sprint(v))
39580	}
39581	c.urlParams_.SetMulti("siteIds", siteIds_)
39582	return c
39583}
39584
39585// SortField sets the optional parameter "sortField": Field by which to
39586// sort the list.
39587//
39588// Possible values:
39589//   "ID" (default)
39590//   "NAME"
39591func (c *PlacementGroupsListCall) SortField(sortField string) *PlacementGroupsListCall {
39592	c.urlParams_.Set("sortField", sortField)
39593	return c
39594}
39595
39596// SortOrder sets the optional parameter "sortOrder": Order of sorted
39597// results.
39598//
39599// Possible values:
39600//   "ASCENDING" (default)
39601//   "DESCENDING"
39602func (c *PlacementGroupsListCall) SortOrder(sortOrder string) *PlacementGroupsListCall {
39603	c.urlParams_.Set("sortOrder", sortOrder)
39604	return c
39605}
39606
39607// Fields allows partial responses to be retrieved. See
39608// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39609// for more information.
39610func (c *PlacementGroupsListCall) Fields(s ...googleapi.Field) *PlacementGroupsListCall {
39611	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39612	return c
39613}
39614
39615// IfNoneMatch sets the optional parameter which makes the operation
39616// fail if the object's ETag matches the given value. This is useful for
39617// getting updates only after the object has changed since the last
39618// request. Use googleapi.IsNotModified to check whether the response
39619// error from Do is the result of In-None-Match.
39620func (c *PlacementGroupsListCall) IfNoneMatch(entityTag string) *PlacementGroupsListCall {
39621	c.ifNoneMatch_ = entityTag
39622	return c
39623}
39624
39625// Context sets the context to be used in this call's Do method. Any
39626// pending HTTP request will be aborted if the provided context is
39627// canceled.
39628func (c *PlacementGroupsListCall) Context(ctx context.Context) *PlacementGroupsListCall {
39629	c.ctx_ = ctx
39630	return c
39631}
39632
39633// Header returns an http.Header that can be modified by the caller to
39634// add HTTP headers to the request.
39635func (c *PlacementGroupsListCall) Header() http.Header {
39636	if c.header_ == nil {
39637		c.header_ = make(http.Header)
39638	}
39639	return c.header_
39640}
39641
39642func (c *PlacementGroupsListCall) doRequest(alt string) (*http.Response, error) {
39643	reqHeaders := make(http.Header)
39644	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
39645	for k, v := range c.header_ {
39646		reqHeaders[k] = v
39647	}
39648	reqHeaders.Set("User-Agent", c.s.userAgent())
39649	if c.ifNoneMatch_ != "" {
39650		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39651	}
39652	var body io.Reader = nil
39653	c.urlParams_.Set("alt", alt)
39654	c.urlParams_.Set("prettyPrint", "false")
39655	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
39656	urls += "?" + c.urlParams_.Encode()
39657	req, err := http.NewRequest("GET", urls, body)
39658	if err != nil {
39659		return nil, err
39660	}
39661	req.Header = reqHeaders
39662	googleapi.Expand(req.URL, map[string]string{
39663		"profileId": strconv.FormatInt(c.profileId, 10),
39664	})
39665	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39666}
39667
39668// Do executes the "dfareporting.placementGroups.list" call.
39669// Exactly one of *PlacementGroupsListResponse or error will be non-nil.
39670// Any non-2xx status code is an error. Response headers are in either
39671// *PlacementGroupsListResponse.ServerResponse.Header or (if a response
39672// was returned at all) in error.(*googleapi.Error).Header. Use
39673// googleapi.IsNotModified to check whether the returned error was
39674// because http.StatusNotModified was returned.
39675func (c *PlacementGroupsListCall) Do(opts ...googleapi.CallOption) (*PlacementGroupsListResponse, error) {
39676	gensupport.SetOptions(c.urlParams_, opts...)
39677	res, err := c.doRequest("json")
39678	if res != nil && res.StatusCode == http.StatusNotModified {
39679		if res.Body != nil {
39680			res.Body.Close()
39681		}
39682		return nil, &googleapi.Error{
39683			Code:   res.StatusCode,
39684			Header: res.Header,
39685		}
39686	}
39687	if err != nil {
39688		return nil, err
39689	}
39690	defer googleapi.CloseBody(res)
39691	if err := googleapi.CheckResponse(res); err != nil {
39692		return nil, err
39693	}
39694	ret := &PlacementGroupsListResponse{
39695		ServerResponse: googleapi.ServerResponse{
39696			Header:         res.Header,
39697			HTTPStatusCode: res.StatusCode,
39698		},
39699	}
39700	target := &ret
39701	if err := gensupport.DecodeResponse(target, res); err != nil {
39702		return nil, err
39703	}
39704	return ret, nil
39705	// {
39706	//   "description": "Retrieves a list of placement groups, possibly filtered. This method supports paging.",
39707	//   "flatPath": "userprofiles/{profileId}/placementGroups",
39708	//   "httpMethod": "GET",
39709	//   "id": "dfareporting.placementGroups.list",
39710	//   "parameterOrder": [
39711	//     "profileId"
39712	//   ],
39713	//   "parameters": {
39714	//     "advertiserIds": {
39715	//       "description": "Select only placement groups that belong to these advertisers.",
39716	//       "format": "int64",
39717	//       "location": "query",
39718	//       "repeated": true,
39719	//       "type": "string"
39720	//     },
39721	//     "archived": {
39722	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
39723	//       "location": "query",
39724	//       "type": "boolean"
39725	//     },
39726	//     "campaignIds": {
39727	//       "description": "Select only placement groups that belong to these campaigns.",
39728	//       "format": "int64",
39729	//       "location": "query",
39730	//       "repeated": true,
39731	//       "type": "string"
39732	//     },
39733	//     "contentCategoryIds": {
39734	//       "description": "Select only placement groups that are associated with these content categories.",
39735	//       "format": "int64",
39736	//       "location": "query",
39737	//       "repeated": true,
39738	//       "type": "string"
39739	//     },
39740	//     "directorySiteIds": {
39741	//       "description": "Select only placement groups that are associated with these directory sites.",
39742	//       "format": "int64",
39743	//       "location": "query",
39744	//       "repeated": true,
39745	//       "type": "string"
39746	//     },
39747	//     "ids": {
39748	//       "description": "Select only placement groups with these IDs.",
39749	//       "format": "int64",
39750	//       "location": "query",
39751	//       "repeated": true,
39752	//       "type": "string"
39753	//     },
39754	//     "maxEndDate": {
39755	//       "description": "Select only placements or placement groups whose end date is on or before the specified maxEndDate. The date should be formatted as \"yyyy-MM-dd\".",
39756	//       "location": "query",
39757	//       "type": "string"
39758	//     },
39759	//     "maxResults": {
39760	//       "default": "800",
39761	//       "description": "Maximum number of results to return.",
39762	//       "format": "int32",
39763	//       "location": "query",
39764	//       "maximum": "800",
39765	//       "minimum": "0",
39766	//       "type": "integer"
39767	//     },
39768	//     "maxStartDate": {
39769	//       "description": "Select only placements or placement groups whose start date is on or before the specified maxStartDate. The date should be formatted as \"yyyy-MM-dd\".",
39770	//       "location": "query",
39771	//       "type": "string"
39772	//     },
39773	//     "minEndDate": {
39774	//       "description": "Select only placements or placement groups whose end date is on or after the specified minEndDate. The date should be formatted as \"yyyy-MM-dd\".",
39775	//       "location": "query",
39776	//       "type": "string"
39777	//     },
39778	//     "minStartDate": {
39779	//       "description": "Select only placements or placement groups whose start date is on or after the specified minStartDate. The date should be formatted as \"yyyy-MM-dd\".",
39780	//       "location": "query",
39781	//       "type": "string"
39782	//     },
39783	//     "pageToken": {
39784	//       "description": "Value of the nextPageToken from the previous result page.",
39785	//       "location": "query",
39786	//       "type": "string"
39787	//     },
39788	//     "placementGroupType": {
39789	//       "description": "Select only placement groups belonging with this group type. A package is a simple group of placements that acts as a single pricing point for a group of tags. A roadblock is a group of placements that not only acts as a single pricing point but also assumes that all the tags in it will be served at the same time. A roadblock requires one of its assigned placements to be marked as primary for reporting.",
39790	//       "enum": [
39791	//         "PLACEMENT_PACKAGE",
39792	//         "PLACEMENT_ROADBLOCK"
39793	//       ],
39794	//       "enumDescriptions": [
39795	//         "",
39796	//         ""
39797	//       ],
39798	//       "location": "query",
39799	//       "type": "string"
39800	//     },
39801	//     "placementStrategyIds": {
39802	//       "description": "Select only placement groups that are associated with these placement strategies.",
39803	//       "format": "int64",
39804	//       "location": "query",
39805	//       "repeated": true,
39806	//       "type": "string"
39807	//     },
39808	//     "pricingTypes": {
39809	//       "description": "Select only placement groups with these pricing types.",
39810	//       "enum": [
39811	//         "PRICING_TYPE_CPM",
39812	//         "PRICING_TYPE_CPC",
39813	//         "PRICING_TYPE_CPA",
39814	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS",
39815	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
39816	//         "PRICING_TYPE_CPM_ACTIVEVIEW"
39817	//       ],
39818	//       "enumDescriptions": [
39819	//         "",
39820	//         "",
39821	//         "",
39822	//         "",
39823	//         "",
39824	//         ""
39825	//       ],
39826	//       "location": "query",
39827	//       "repeated": true,
39828	//       "type": "string"
39829	//     },
39830	//     "profileId": {
39831	//       "description": "User profile ID associated with this request.",
39832	//       "format": "int64",
39833	//       "location": "path",
39834	//       "required": true,
39835	//       "type": "string"
39836	//     },
39837	//     "searchString": {
39838	//       "description": "Allows searching for placement groups by name or ID. Wildcards (*) are allowed. For example, \"placement*2015\" will return placement groups with names like \"placement group June 2015\", \"placement group May 2015\", or simply \"placements 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"placementgroup\" will match placement groups with name \"my placementgroup\", \"placementgroup 2015\", or simply \"placementgroup\".",
39839	//       "location": "query",
39840	//       "type": "string"
39841	//     },
39842	//     "siteIds": {
39843	//       "description": "Select only placement groups that are associated with these sites.",
39844	//       "format": "int64",
39845	//       "location": "query",
39846	//       "repeated": true,
39847	//       "type": "string"
39848	//     },
39849	//     "sortField": {
39850	//       "default": "ID",
39851	//       "description": "Field by which to sort the list.",
39852	//       "enum": [
39853	//         "ID",
39854	//         "NAME"
39855	//       ],
39856	//       "enumDescriptions": [
39857	//         "",
39858	//         ""
39859	//       ],
39860	//       "location": "query",
39861	//       "type": "string"
39862	//     },
39863	//     "sortOrder": {
39864	//       "default": "ASCENDING",
39865	//       "description": "Order of sorted results.",
39866	//       "enum": [
39867	//         "ASCENDING",
39868	//         "DESCENDING"
39869	//       ],
39870	//       "enumDescriptions": [
39871	//         "",
39872	//         ""
39873	//       ],
39874	//       "location": "query",
39875	//       "type": "string"
39876	//     }
39877	//   },
39878	//   "path": "userprofiles/{profileId}/placementGroups",
39879	//   "response": {
39880	//     "$ref": "PlacementGroupsListResponse"
39881	//   },
39882	//   "scopes": [
39883	//     "https://www.googleapis.com/auth/dfatrafficking"
39884	//   ]
39885	// }
39886
39887}
39888
39889// Pages invokes f for each page of results.
39890// A non-nil error returned from f will halt the iteration.
39891// The provided context supersedes any context provided to the Context method.
39892func (c *PlacementGroupsListCall) Pages(ctx context.Context, f func(*PlacementGroupsListResponse) error) error {
39893	c.ctx_ = ctx
39894	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
39895	for {
39896		x, err := c.Do()
39897		if err != nil {
39898			return err
39899		}
39900		if err := f(x); err != nil {
39901			return err
39902		}
39903		if x.NextPageToken == "" {
39904			return nil
39905		}
39906		c.PageToken(x.NextPageToken)
39907	}
39908}
39909
39910// method id "dfareporting.placementGroups.patch":
39911
39912type PlacementGroupsPatchCall struct {
39913	s              *Service
39914	profileId      int64
39915	placementgroup *PlacementGroup
39916	urlParams_     gensupport.URLParams
39917	ctx_           context.Context
39918	header_        http.Header
39919}
39920
39921// Patch: Updates an existing placement group. This method supports
39922// patch semantics.
39923//
39924// - id: PlacementGroup ID.
39925// - profileId: User profile ID associated with this request.
39926func (r *PlacementGroupsService) Patch(profileId int64, id int64, placementgroup *PlacementGroup) *PlacementGroupsPatchCall {
39927	c := &PlacementGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39928	c.profileId = profileId
39929	c.urlParams_.Set("id", fmt.Sprint(id))
39930	c.placementgroup = placementgroup
39931	return c
39932}
39933
39934// Fields allows partial responses to be retrieved. See
39935// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39936// for more information.
39937func (c *PlacementGroupsPatchCall) Fields(s ...googleapi.Field) *PlacementGroupsPatchCall {
39938	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39939	return c
39940}
39941
39942// Context sets the context to be used in this call's Do method. Any
39943// pending HTTP request will be aborted if the provided context is
39944// canceled.
39945func (c *PlacementGroupsPatchCall) Context(ctx context.Context) *PlacementGroupsPatchCall {
39946	c.ctx_ = ctx
39947	return c
39948}
39949
39950// Header returns an http.Header that can be modified by the caller to
39951// add HTTP headers to the request.
39952func (c *PlacementGroupsPatchCall) Header() http.Header {
39953	if c.header_ == nil {
39954		c.header_ = make(http.Header)
39955	}
39956	return c.header_
39957}
39958
39959func (c *PlacementGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
39960	reqHeaders := make(http.Header)
39961	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
39962	for k, v := range c.header_ {
39963		reqHeaders[k] = v
39964	}
39965	reqHeaders.Set("User-Agent", c.s.userAgent())
39966	var body io.Reader = nil
39967	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
39968	if err != nil {
39969		return nil, err
39970	}
39971	reqHeaders.Set("Content-Type", "application/json")
39972	c.urlParams_.Set("alt", alt)
39973	c.urlParams_.Set("prettyPrint", "false")
39974	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
39975	urls += "?" + c.urlParams_.Encode()
39976	req, err := http.NewRequest("PATCH", urls, body)
39977	if err != nil {
39978		return nil, err
39979	}
39980	req.Header = reqHeaders
39981	googleapi.Expand(req.URL, map[string]string{
39982		"profileId": strconv.FormatInt(c.profileId, 10),
39983	})
39984	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39985}
39986
39987// Do executes the "dfareporting.placementGroups.patch" call.
39988// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
39989// status code is an error. Response headers are in either
39990// *PlacementGroup.ServerResponse.Header or (if a response was returned
39991// at all) in error.(*googleapi.Error).Header. Use
39992// googleapi.IsNotModified to check whether the returned error was
39993// because http.StatusNotModified was returned.
39994func (c *PlacementGroupsPatchCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
39995	gensupport.SetOptions(c.urlParams_, opts...)
39996	res, err := c.doRequest("json")
39997	if res != nil && res.StatusCode == http.StatusNotModified {
39998		if res.Body != nil {
39999			res.Body.Close()
40000		}
40001		return nil, &googleapi.Error{
40002			Code:   res.StatusCode,
40003			Header: res.Header,
40004		}
40005	}
40006	if err != nil {
40007		return nil, err
40008	}
40009	defer googleapi.CloseBody(res)
40010	if err := googleapi.CheckResponse(res); err != nil {
40011		return nil, err
40012	}
40013	ret := &PlacementGroup{
40014		ServerResponse: googleapi.ServerResponse{
40015			Header:         res.Header,
40016			HTTPStatusCode: res.StatusCode,
40017		},
40018	}
40019	target := &ret
40020	if err := gensupport.DecodeResponse(target, res); err != nil {
40021		return nil, err
40022	}
40023	return ret, nil
40024	// {
40025	//   "description": "Updates an existing placement group. This method supports patch semantics.",
40026	//   "flatPath": "userprofiles/{profileId}/placementGroups",
40027	//   "httpMethod": "PATCH",
40028	//   "id": "dfareporting.placementGroups.patch",
40029	//   "parameterOrder": [
40030	//     "profileId",
40031	//     "id"
40032	//   ],
40033	//   "parameters": {
40034	//     "id": {
40035	//       "description": "PlacementGroup ID.",
40036	//       "format": "int64",
40037	//       "location": "query",
40038	//       "required": true,
40039	//       "type": "string"
40040	//     },
40041	//     "profileId": {
40042	//       "description": "User profile ID associated with this request.",
40043	//       "format": "int64",
40044	//       "location": "path",
40045	//       "required": true,
40046	//       "type": "string"
40047	//     }
40048	//   },
40049	//   "path": "userprofiles/{profileId}/placementGroups",
40050	//   "request": {
40051	//     "$ref": "PlacementGroup"
40052	//   },
40053	//   "response": {
40054	//     "$ref": "PlacementGroup"
40055	//   },
40056	//   "scopes": [
40057	//     "https://www.googleapis.com/auth/dfatrafficking"
40058	//   ]
40059	// }
40060
40061}
40062
40063// method id "dfareporting.placementGroups.update":
40064
40065type PlacementGroupsUpdateCall struct {
40066	s              *Service
40067	profileId      int64
40068	placementgroup *PlacementGroup
40069	urlParams_     gensupport.URLParams
40070	ctx_           context.Context
40071	header_        http.Header
40072}
40073
40074// Update: Updates an existing placement group.
40075//
40076// - profileId: User profile ID associated with this request.
40077func (r *PlacementGroupsService) Update(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsUpdateCall {
40078	c := &PlacementGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40079	c.profileId = profileId
40080	c.placementgroup = placementgroup
40081	return c
40082}
40083
40084// Fields allows partial responses to be retrieved. See
40085// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40086// for more information.
40087func (c *PlacementGroupsUpdateCall) Fields(s ...googleapi.Field) *PlacementGroupsUpdateCall {
40088	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40089	return c
40090}
40091
40092// Context sets the context to be used in this call's Do method. Any
40093// pending HTTP request will be aborted if the provided context is
40094// canceled.
40095func (c *PlacementGroupsUpdateCall) Context(ctx context.Context) *PlacementGroupsUpdateCall {
40096	c.ctx_ = ctx
40097	return c
40098}
40099
40100// Header returns an http.Header that can be modified by the caller to
40101// add HTTP headers to the request.
40102func (c *PlacementGroupsUpdateCall) Header() http.Header {
40103	if c.header_ == nil {
40104		c.header_ = make(http.Header)
40105	}
40106	return c.header_
40107}
40108
40109func (c *PlacementGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
40110	reqHeaders := make(http.Header)
40111	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
40112	for k, v := range c.header_ {
40113		reqHeaders[k] = v
40114	}
40115	reqHeaders.Set("User-Agent", c.s.userAgent())
40116	var body io.Reader = nil
40117	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
40118	if err != nil {
40119		return nil, err
40120	}
40121	reqHeaders.Set("Content-Type", "application/json")
40122	c.urlParams_.Set("alt", alt)
40123	c.urlParams_.Set("prettyPrint", "false")
40124	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
40125	urls += "?" + c.urlParams_.Encode()
40126	req, err := http.NewRequest("PUT", urls, body)
40127	if err != nil {
40128		return nil, err
40129	}
40130	req.Header = reqHeaders
40131	googleapi.Expand(req.URL, map[string]string{
40132		"profileId": strconv.FormatInt(c.profileId, 10),
40133	})
40134	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40135}
40136
40137// Do executes the "dfareporting.placementGroups.update" call.
40138// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
40139// status code is an error. Response headers are in either
40140// *PlacementGroup.ServerResponse.Header or (if a response was returned
40141// at all) in error.(*googleapi.Error).Header. Use
40142// googleapi.IsNotModified to check whether the returned error was
40143// because http.StatusNotModified was returned.
40144func (c *PlacementGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
40145	gensupport.SetOptions(c.urlParams_, opts...)
40146	res, err := c.doRequest("json")
40147	if res != nil && res.StatusCode == http.StatusNotModified {
40148		if res.Body != nil {
40149			res.Body.Close()
40150		}
40151		return nil, &googleapi.Error{
40152			Code:   res.StatusCode,
40153			Header: res.Header,
40154		}
40155	}
40156	if err != nil {
40157		return nil, err
40158	}
40159	defer googleapi.CloseBody(res)
40160	if err := googleapi.CheckResponse(res); err != nil {
40161		return nil, err
40162	}
40163	ret := &PlacementGroup{
40164		ServerResponse: googleapi.ServerResponse{
40165			Header:         res.Header,
40166			HTTPStatusCode: res.StatusCode,
40167		},
40168	}
40169	target := &ret
40170	if err := gensupport.DecodeResponse(target, res); err != nil {
40171		return nil, err
40172	}
40173	return ret, nil
40174	// {
40175	//   "description": "Updates an existing placement group.",
40176	//   "flatPath": "userprofiles/{profileId}/placementGroups",
40177	//   "httpMethod": "PUT",
40178	//   "id": "dfareporting.placementGroups.update",
40179	//   "parameterOrder": [
40180	//     "profileId"
40181	//   ],
40182	//   "parameters": {
40183	//     "profileId": {
40184	//       "description": "User profile ID associated with this request.",
40185	//       "format": "int64",
40186	//       "location": "path",
40187	//       "required": true,
40188	//       "type": "string"
40189	//     }
40190	//   },
40191	//   "path": "userprofiles/{profileId}/placementGroups",
40192	//   "request": {
40193	//     "$ref": "PlacementGroup"
40194	//   },
40195	//   "response": {
40196	//     "$ref": "PlacementGroup"
40197	//   },
40198	//   "scopes": [
40199	//     "https://www.googleapis.com/auth/dfatrafficking"
40200	//   ]
40201	// }
40202
40203}
40204
40205// method id "dfareporting.placementStrategies.delete":
40206
40207type PlacementStrategiesDeleteCall struct {
40208	s          *Service
40209	profileId  int64
40210	id         int64
40211	urlParams_ gensupport.URLParams
40212	ctx_       context.Context
40213	header_    http.Header
40214}
40215
40216// Delete: Deletes an existing placement strategy.
40217//
40218// - id: Placement strategy ID.
40219// - profileId: User profile ID associated with this request.
40220func (r *PlacementStrategiesService) Delete(profileId int64, id int64) *PlacementStrategiesDeleteCall {
40221	c := &PlacementStrategiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40222	c.profileId = profileId
40223	c.id = id
40224	return c
40225}
40226
40227// Fields allows partial responses to be retrieved. See
40228// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40229// for more information.
40230func (c *PlacementStrategiesDeleteCall) Fields(s ...googleapi.Field) *PlacementStrategiesDeleteCall {
40231	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40232	return c
40233}
40234
40235// Context sets the context to be used in this call's Do method. Any
40236// pending HTTP request will be aborted if the provided context is
40237// canceled.
40238func (c *PlacementStrategiesDeleteCall) Context(ctx context.Context) *PlacementStrategiesDeleteCall {
40239	c.ctx_ = ctx
40240	return c
40241}
40242
40243// Header returns an http.Header that can be modified by the caller to
40244// add HTTP headers to the request.
40245func (c *PlacementStrategiesDeleteCall) Header() http.Header {
40246	if c.header_ == nil {
40247		c.header_ = make(http.Header)
40248	}
40249	return c.header_
40250}
40251
40252func (c *PlacementStrategiesDeleteCall) doRequest(alt string) (*http.Response, error) {
40253	reqHeaders := make(http.Header)
40254	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
40255	for k, v := range c.header_ {
40256		reqHeaders[k] = v
40257	}
40258	reqHeaders.Set("User-Agent", c.s.userAgent())
40259	var body io.Reader = nil
40260	c.urlParams_.Set("alt", alt)
40261	c.urlParams_.Set("prettyPrint", "false")
40262	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
40263	urls += "?" + c.urlParams_.Encode()
40264	req, err := http.NewRequest("DELETE", urls, body)
40265	if err != nil {
40266		return nil, err
40267	}
40268	req.Header = reqHeaders
40269	googleapi.Expand(req.URL, map[string]string{
40270		"profileId": strconv.FormatInt(c.profileId, 10),
40271		"id":        strconv.FormatInt(c.id, 10),
40272	})
40273	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40274}
40275
40276// Do executes the "dfareporting.placementStrategies.delete" call.
40277func (c *PlacementStrategiesDeleteCall) Do(opts ...googleapi.CallOption) error {
40278	gensupport.SetOptions(c.urlParams_, opts...)
40279	res, err := c.doRequest("json")
40280	if err != nil {
40281		return err
40282	}
40283	defer googleapi.CloseBody(res)
40284	if err := googleapi.CheckResponse(res); err != nil {
40285		return err
40286	}
40287	return nil
40288	// {
40289	//   "description": "Deletes an existing placement strategy.",
40290	//   "flatPath": "userprofiles/{profileId}/placementStrategies/{id}",
40291	//   "httpMethod": "DELETE",
40292	//   "id": "dfareporting.placementStrategies.delete",
40293	//   "parameterOrder": [
40294	//     "profileId",
40295	//     "id"
40296	//   ],
40297	//   "parameters": {
40298	//     "id": {
40299	//       "description": "Placement strategy ID.",
40300	//       "format": "int64",
40301	//       "location": "path",
40302	//       "required": true,
40303	//       "type": "string"
40304	//     },
40305	//     "profileId": {
40306	//       "description": "User profile ID associated with this request.",
40307	//       "format": "int64",
40308	//       "location": "path",
40309	//       "required": true,
40310	//       "type": "string"
40311	//     }
40312	//   },
40313	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
40314	//   "scopes": [
40315	//     "https://www.googleapis.com/auth/dfatrafficking"
40316	//   ]
40317	// }
40318
40319}
40320
40321// method id "dfareporting.placementStrategies.get":
40322
40323type PlacementStrategiesGetCall struct {
40324	s            *Service
40325	profileId    int64
40326	id           int64
40327	urlParams_   gensupport.URLParams
40328	ifNoneMatch_ string
40329	ctx_         context.Context
40330	header_      http.Header
40331}
40332
40333// Get: Gets one placement strategy by ID.
40334//
40335// - id: Placement strategy ID.
40336// - profileId: User profile ID associated with this request.
40337func (r *PlacementStrategiesService) Get(profileId int64, id int64) *PlacementStrategiesGetCall {
40338	c := &PlacementStrategiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40339	c.profileId = profileId
40340	c.id = id
40341	return c
40342}
40343
40344// Fields allows partial responses to be retrieved. See
40345// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40346// for more information.
40347func (c *PlacementStrategiesGetCall) Fields(s ...googleapi.Field) *PlacementStrategiesGetCall {
40348	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40349	return c
40350}
40351
40352// IfNoneMatch sets the optional parameter which makes the operation
40353// fail if the object's ETag matches the given value. This is useful for
40354// getting updates only after the object has changed since the last
40355// request. Use googleapi.IsNotModified to check whether the response
40356// error from Do is the result of In-None-Match.
40357func (c *PlacementStrategiesGetCall) IfNoneMatch(entityTag string) *PlacementStrategiesGetCall {
40358	c.ifNoneMatch_ = entityTag
40359	return c
40360}
40361
40362// Context sets the context to be used in this call's Do method. Any
40363// pending HTTP request will be aborted if the provided context is
40364// canceled.
40365func (c *PlacementStrategiesGetCall) Context(ctx context.Context) *PlacementStrategiesGetCall {
40366	c.ctx_ = ctx
40367	return c
40368}
40369
40370// Header returns an http.Header that can be modified by the caller to
40371// add HTTP headers to the request.
40372func (c *PlacementStrategiesGetCall) Header() http.Header {
40373	if c.header_ == nil {
40374		c.header_ = make(http.Header)
40375	}
40376	return c.header_
40377}
40378
40379func (c *PlacementStrategiesGetCall) doRequest(alt string) (*http.Response, error) {
40380	reqHeaders := make(http.Header)
40381	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
40382	for k, v := range c.header_ {
40383		reqHeaders[k] = v
40384	}
40385	reqHeaders.Set("User-Agent", c.s.userAgent())
40386	if c.ifNoneMatch_ != "" {
40387		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40388	}
40389	var body io.Reader = nil
40390	c.urlParams_.Set("alt", alt)
40391	c.urlParams_.Set("prettyPrint", "false")
40392	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
40393	urls += "?" + c.urlParams_.Encode()
40394	req, err := http.NewRequest("GET", urls, body)
40395	if err != nil {
40396		return nil, err
40397	}
40398	req.Header = reqHeaders
40399	googleapi.Expand(req.URL, map[string]string{
40400		"profileId": strconv.FormatInt(c.profileId, 10),
40401		"id":        strconv.FormatInt(c.id, 10),
40402	})
40403	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40404}
40405
40406// Do executes the "dfareporting.placementStrategies.get" call.
40407// Exactly one of *PlacementStrategy or error will be non-nil. Any
40408// non-2xx status code is an error. Response headers are in either
40409// *PlacementStrategy.ServerResponse.Header or (if a response was
40410// returned at all) in error.(*googleapi.Error).Header. Use
40411// googleapi.IsNotModified to check whether the returned error was
40412// because http.StatusNotModified was returned.
40413func (c *PlacementStrategiesGetCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
40414	gensupport.SetOptions(c.urlParams_, opts...)
40415	res, err := c.doRequest("json")
40416	if res != nil && res.StatusCode == http.StatusNotModified {
40417		if res.Body != nil {
40418			res.Body.Close()
40419		}
40420		return nil, &googleapi.Error{
40421			Code:   res.StatusCode,
40422			Header: res.Header,
40423		}
40424	}
40425	if err != nil {
40426		return nil, err
40427	}
40428	defer googleapi.CloseBody(res)
40429	if err := googleapi.CheckResponse(res); err != nil {
40430		return nil, err
40431	}
40432	ret := &PlacementStrategy{
40433		ServerResponse: googleapi.ServerResponse{
40434			Header:         res.Header,
40435			HTTPStatusCode: res.StatusCode,
40436		},
40437	}
40438	target := &ret
40439	if err := gensupport.DecodeResponse(target, res); err != nil {
40440		return nil, err
40441	}
40442	return ret, nil
40443	// {
40444	//   "description": "Gets one placement strategy by ID.",
40445	//   "flatPath": "userprofiles/{profileId}/placementStrategies/{id}",
40446	//   "httpMethod": "GET",
40447	//   "id": "dfareporting.placementStrategies.get",
40448	//   "parameterOrder": [
40449	//     "profileId",
40450	//     "id"
40451	//   ],
40452	//   "parameters": {
40453	//     "id": {
40454	//       "description": "Placement strategy ID.",
40455	//       "format": "int64",
40456	//       "location": "path",
40457	//       "required": true,
40458	//       "type": "string"
40459	//     },
40460	//     "profileId": {
40461	//       "description": "User profile ID associated with this request.",
40462	//       "format": "int64",
40463	//       "location": "path",
40464	//       "required": true,
40465	//       "type": "string"
40466	//     }
40467	//   },
40468	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
40469	//   "response": {
40470	//     "$ref": "PlacementStrategy"
40471	//   },
40472	//   "scopes": [
40473	//     "https://www.googleapis.com/auth/dfatrafficking"
40474	//   ]
40475	// }
40476
40477}
40478
40479// method id "dfareporting.placementStrategies.insert":
40480
40481type PlacementStrategiesInsertCall struct {
40482	s                 *Service
40483	profileId         int64
40484	placementstrategy *PlacementStrategy
40485	urlParams_        gensupport.URLParams
40486	ctx_              context.Context
40487	header_           http.Header
40488}
40489
40490// Insert: Inserts a new placement strategy.
40491//
40492// - profileId: User profile ID associated with this request.
40493func (r *PlacementStrategiesService) Insert(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesInsertCall {
40494	c := &PlacementStrategiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40495	c.profileId = profileId
40496	c.placementstrategy = placementstrategy
40497	return c
40498}
40499
40500// Fields allows partial responses to be retrieved. See
40501// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40502// for more information.
40503func (c *PlacementStrategiesInsertCall) Fields(s ...googleapi.Field) *PlacementStrategiesInsertCall {
40504	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40505	return c
40506}
40507
40508// Context sets the context to be used in this call's Do method. Any
40509// pending HTTP request will be aborted if the provided context is
40510// canceled.
40511func (c *PlacementStrategiesInsertCall) Context(ctx context.Context) *PlacementStrategiesInsertCall {
40512	c.ctx_ = ctx
40513	return c
40514}
40515
40516// Header returns an http.Header that can be modified by the caller to
40517// add HTTP headers to the request.
40518func (c *PlacementStrategiesInsertCall) Header() http.Header {
40519	if c.header_ == nil {
40520		c.header_ = make(http.Header)
40521	}
40522	return c.header_
40523}
40524
40525func (c *PlacementStrategiesInsertCall) doRequest(alt string) (*http.Response, error) {
40526	reqHeaders := make(http.Header)
40527	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
40528	for k, v := range c.header_ {
40529		reqHeaders[k] = v
40530	}
40531	reqHeaders.Set("User-Agent", c.s.userAgent())
40532	var body io.Reader = nil
40533	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
40534	if err != nil {
40535		return nil, err
40536	}
40537	reqHeaders.Set("Content-Type", "application/json")
40538	c.urlParams_.Set("alt", alt)
40539	c.urlParams_.Set("prettyPrint", "false")
40540	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
40541	urls += "?" + c.urlParams_.Encode()
40542	req, err := http.NewRequest("POST", urls, body)
40543	if err != nil {
40544		return nil, err
40545	}
40546	req.Header = reqHeaders
40547	googleapi.Expand(req.URL, map[string]string{
40548		"profileId": strconv.FormatInt(c.profileId, 10),
40549	})
40550	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40551}
40552
40553// Do executes the "dfareporting.placementStrategies.insert" call.
40554// Exactly one of *PlacementStrategy or error will be non-nil. Any
40555// non-2xx status code is an error. Response headers are in either
40556// *PlacementStrategy.ServerResponse.Header or (if a response was
40557// returned at all) in error.(*googleapi.Error).Header. Use
40558// googleapi.IsNotModified to check whether the returned error was
40559// because http.StatusNotModified was returned.
40560func (c *PlacementStrategiesInsertCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
40561	gensupport.SetOptions(c.urlParams_, opts...)
40562	res, err := c.doRequest("json")
40563	if res != nil && res.StatusCode == http.StatusNotModified {
40564		if res.Body != nil {
40565			res.Body.Close()
40566		}
40567		return nil, &googleapi.Error{
40568			Code:   res.StatusCode,
40569			Header: res.Header,
40570		}
40571	}
40572	if err != nil {
40573		return nil, err
40574	}
40575	defer googleapi.CloseBody(res)
40576	if err := googleapi.CheckResponse(res); err != nil {
40577		return nil, err
40578	}
40579	ret := &PlacementStrategy{
40580		ServerResponse: googleapi.ServerResponse{
40581			Header:         res.Header,
40582			HTTPStatusCode: res.StatusCode,
40583		},
40584	}
40585	target := &ret
40586	if err := gensupport.DecodeResponse(target, res); err != nil {
40587		return nil, err
40588	}
40589	return ret, nil
40590	// {
40591	//   "description": "Inserts a new placement strategy.",
40592	//   "flatPath": "userprofiles/{profileId}/placementStrategies",
40593	//   "httpMethod": "POST",
40594	//   "id": "dfareporting.placementStrategies.insert",
40595	//   "parameterOrder": [
40596	//     "profileId"
40597	//   ],
40598	//   "parameters": {
40599	//     "profileId": {
40600	//       "description": "User profile ID associated with this request.",
40601	//       "format": "int64",
40602	//       "location": "path",
40603	//       "required": true,
40604	//       "type": "string"
40605	//     }
40606	//   },
40607	//   "path": "userprofiles/{profileId}/placementStrategies",
40608	//   "request": {
40609	//     "$ref": "PlacementStrategy"
40610	//   },
40611	//   "response": {
40612	//     "$ref": "PlacementStrategy"
40613	//   },
40614	//   "scopes": [
40615	//     "https://www.googleapis.com/auth/dfatrafficking"
40616	//   ]
40617	// }
40618
40619}
40620
40621// method id "dfareporting.placementStrategies.list":
40622
40623type PlacementStrategiesListCall struct {
40624	s            *Service
40625	profileId    int64
40626	urlParams_   gensupport.URLParams
40627	ifNoneMatch_ string
40628	ctx_         context.Context
40629	header_      http.Header
40630}
40631
40632// List: Retrieves a list of placement strategies, possibly filtered.
40633// This method supports paging.
40634//
40635// - profileId: User profile ID associated with this request.
40636func (r *PlacementStrategiesService) List(profileId int64) *PlacementStrategiesListCall {
40637	c := &PlacementStrategiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40638	c.profileId = profileId
40639	return c
40640}
40641
40642// Ids sets the optional parameter "ids": Select only placement
40643// strategies with these IDs.
40644func (c *PlacementStrategiesListCall) Ids(ids ...int64) *PlacementStrategiesListCall {
40645	var ids_ []string
40646	for _, v := range ids {
40647		ids_ = append(ids_, fmt.Sprint(v))
40648	}
40649	c.urlParams_.SetMulti("ids", ids_)
40650	return c
40651}
40652
40653// MaxResults sets the optional parameter "maxResults": Maximum number
40654// of results to return.
40655func (c *PlacementStrategiesListCall) MaxResults(maxResults int64) *PlacementStrategiesListCall {
40656	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
40657	return c
40658}
40659
40660// PageToken sets the optional parameter "pageToken": Value of the
40661// nextPageToken from the previous result page.
40662func (c *PlacementStrategiesListCall) PageToken(pageToken string) *PlacementStrategiesListCall {
40663	c.urlParams_.Set("pageToken", pageToken)
40664	return c
40665}
40666
40667// SearchString sets the optional parameter "searchString": Allows
40668// searching for objects by name or ID. Wildcards (*) are allowed. For
40669// example, "placementstrategy*2015" will return objects with names like
40670// "placementstrategy June 2015", "placementstrategy April 2015", or
40671// simply "placementstrategy 2015". Most of the searches also add
40672// wildcards implicitly at the start and the end of the search string.
40673// For example, a search string of "placementstrategy" will match
40674// objects with name "my placementstrategy", "placementstrategy 2015",
40675// or simply "placementstrategy".
40676func (c *PlacementStrategiesListCall) SearchString(searchString string) *PlacementStrategiesListCall {
40677	c.urlParams_.Set("searchString", searchString)
40678	return c
40679}
40680
40681// SortField sets the optional parameter "sortField": Field by which to
40682// sort the list.
40683//
40684// Possible values:
40685//   "ID" (default)
40686//   "NAME"
40687func (c *PlacementStrategiesListCall) SortField(sortField string) *PlacementStrategiesListCall {
40688	c.urlParams_.Set("sortField", sortField)
40689	return c
40690}
40691
40692// SortOrder sets the optional parameter "sortOrder": Order of sorted
40693// results.
40694//
40695// Possible values:
40696//   "ASCENDING" (default)
40697//   "DESCENDING"
40698func (c *PlacementStrategiesListCall) SortOrder(sortOrder string) *PlacementStrategiesListCall {
40699	c.urlParams_.Set("sortOrder", sortOrder)
40700	return c
40701}
40702
40703// Fields allows partial responses to be retrieved. See
40704// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40705// for more information.
40706func (c *PlacementStrategiesListCall) Fields(s ...googleapi.Field) *PlacementStrategiesListCall {
40707	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40708	return c
40709}
40710
40711// IfNoneMatch sets the optional parameter which makes the operation
40712// fail if the object's ETag matches the given value. This is useful for
40713// getting updates only after the object has changed since the last
40714// request. Use googleapi.IsNotModified to check whether the response
40715// error from Do is the result of In-None-Match.
40716func (c *PlacementStrategiesListCall) IfNoneMatch(entityTag string) *PlacementStrategiesListCall {
40717	c.ifNoneMatch_ = entityTag
40718	return c
40719}
40720
40721// Context sets the context to be used in this call's Do method. Any
40722// pending HTTP request will be aborted if the provided context is
40723// canceled.
40724func (c *PlacementStrategiesListCall) Context(ctx context.Context) *PlacementStrategiesListCall {
40725	c.ctx_ = ctx
40726	return c
40727}
40728
40729// Header returns an http.Header that can be modified by the caller to
40730// add HTTP headers to the request.
40731func (c *PlacementStrategiesListCall) Header() http.Header {
40732	if c.header_ == nil {
40733		c.header_ = make(http.Header)
40734	}
40735	return c.header_
40736}
40737
40738func (c *PlacementStrategiesListCall) doRequest(alt string) (*http.Response, error) {
40739	reqHeaders := make(http.Header)
40740	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
40741	for k, v := range c.header_ {
40742		reqHeaders[k] = v
40743	}
40744	reqHeaders.Set("User-Agent", c.s.userAgent())
40745	if c.ifNoneMatch_ != "" {
40746		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40747	}
40748	var body io.Reader = nil
40749	c.urlParams_.Set("alt", alt)
40750	c.urlParams_.Set("prettyPrint", "false")
40751	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
40752	urls += "?" + c.urlParams_.Encode()
40753	req, err := http.NewRequest("GET", urls, body)
40754	if err != nil {
40755		return nil, err
40756	}
40757	req.Header = reqHeaders
40758	googleapi.Expand(req.URL, map[string]string{
40759		"profileId": strconv.FormatInt(c.profileId, 10),
40760	})
40761	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40762}
40763
40764// Do executes the "dfareporting.placementStrategies.list" call.
40765// Exactly one of *PlacementStrategiesListResponse or error will be
40766// non-nil. Any non-2xx status code is an error. Response headers are in
40767// either *PlacementStrategiesListResponse.ServerResponse.Header or (if
40768// a response was returned at all) in error.(*googleapi.Error).Header.
40769// Use googleapi.IsNotModified to check whether the returned error was
40770// because http.StatusNotModified was returned.
40771func (c *PlacementStrategiesListCall) Do(opts ...googleapi.CallOption) (*PlacementStrategiesListResponse, error) {
40772	gensupport.SetOptions(c.urlParams_, opts...)
40773	res, err := c.doRequest("json")
40774	if res != nil && res.StatusCode == http.StatusNotModified {
40775		if res.Body != nil {
40776			res.Body.Close()
40777		}
40778		return nil, &googleapi.Error{
40779			Code:   res.StatusCode,
40780			Header: res.Header,
40781		}
40782	}
40783	if err != nil {
40784		return nil, err
40785	}
40786	defer googleapi.CloseBody(res)
40787	if err := googleapi.CheckResponse(res); err != nil {
40788		return nil, err
40789	}
40790	ret := &PlacementStrategiesListResponse{
40791		ServerResponse: googleapi.ServerResponse{
40792			Header:         res.Header,
40793			HTTPStatusCode: res.StatusCode,
40794		},
40795	}
40796	target := &ret
40797	if err := gensupport.DecodeResponse(target, res); err != nil {
40798		return nil, err
40799	}
40800	return ret, nil
40801	// {
40802	//   "description": "Retrieves a list of placement strategies, possibly filtered. This method supports paging.",
40803	//   "flatPath": "userprofiles/{profileId}/placementStrategies",
40804	//   "httpMethod": "GET",
40805	//   "id": "dfareporting.placementStrategies.list",
40806	//   "parameterOrder": [
40807	//     "profileId"
40808	//   ],
40809	//   "parameters": {
40810	//     "ids": {
40811	//       "description": "Select only placement strategies with these IDs.",
40812	//       "format": "int64",
40813	//       "location": "query",
40814	//       "repeated": true,
40815	//       "type": "string"
40816	//     },
40817	//     "maxResults": {
40818	//       "default": "1000",
40819	//       "description": "Maximum number of results to return.",
40820	//       "format": "int32",
40821	//       "location": "query",
40822	//       "maximum": "1000",
40823	//       "minimum": "0",
40824	//       "type": "integer"
40825	//     },
40826	//     "pageToken": {
40827	//       "description": "Value of the nextPageToken from the previous result page.",
40828	//       "location": "query",
40829	//       "type": "string"
40830	//     },
40831	//     "profileId": {
40832	//       "description": "User profile ID associated with this request.",
40833	//       "format": "int64",
40834	//       "location": "path",
40835	//       "required": true,
40836	//       "type": "string"
40837	//     },
40838	//     "searchString": {
40839	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"placementstrategy*2015\" will return objects with names like \"placementstrategy June 2015\", \"placementstrategy April 2015\", or simply \"placementstrategy 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"placementstrategy\" will match objects with name \"my placementstrategy\", \"placementstrategy 2015\", or simply \"placementstrategy\".",
40840	//       "location": "query",
40841	//       "type": "string"
40842	//     },
40843	//     "sortField": {
40844	//       "default": "ID",
40845	//       "description": "Field by which to sort the list.",
40846	//       "enum": [
40847	//         "ID",
40848	//         "NAME"
40849	//       ],
40850	//       "enumDescriptions": [
40851	//         "",
40852	//         ""
40853	//       ],
40854	//       "location": "query",
40855	//       "type": "string"
40856	//     },
40857	//     "sortOrder": {
40858	//       "default": "ASCENDING",
40859	//       "description": "Order of sorted results.",
40860	//       "enum": [
40861	//         "ASCENDING",
40862	//         "DESCENDING"
40863	//       ],
40864	//       "enumDescriptions": [
40865	//         "",
40866	//         ""
40867	//       ],
40868	//       "location": "query",
40869	//       "type": "string"
40870	//     }
40871	//   },
40872	//   "path": "userprofiles/{profileId}/placementStrategies",
40873	//   "response": {
40874	//     "$ref": "PlacementStrategiesListResponse"
40875	//   },
40876	//   "scopes": [
40877	//     "https://www.googleapis.com/auth/dfatrafficking"
40878	//   ]
40879	// }
40880
40881}
40882
40883// Pages invokes f for each page of results.
40884// A non-nil error returned from f will halt the iteration.
40885// The provided context supersedes any context provided to the Context method.
40886func (c *PlacementStrategiesListCall) Pages(ctx context.Context, f func(*PlacementStrategiesListResponse) error) error {
40887	c.ctx_ = ctx
40888	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
40889	for {
40890		x, err := c.Do()
40891		if err != nil {
40892			return err
40893		}
40894		if err := f(x); err != nil {
40895			return err
40896		}
40897		if x.NextPageToken == "" {
40898			return nil
40899		}
40900		c.PageToken(x.NextPageToken)
40901	}
40902}
40903
40904// method id "dfareporting.placementStrategies.patch":
40905
40906type PlacementStrategiesPatchCall struct {
40907	s                 *Service
40908	profileId         int64
40909	placementstrategy *PlacementStrategy
40910	urlParams_        gensupport.URLParams
40911	ctx_              context.Context
40912	header_           http.Header
40913}
40914
40915// Patch: Updates an existing placement strategy. This method supports
40916// patch semantics.
40917//
40918// - id: PlacementStrategy ID.
40919// - profileId: User profile ID associated with this request.
40920func (r *PlacementStrategiesService) Patch(profileId int64, id int64, placementstrategy *PlacementStrategy) *PlacementStrategiesPatchCall {
40921	c := &PlacementStrategiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40922	c.profileId = profileId
40923	c.urlParams_.Set("id", fmt.Sprint(id))
40924	c.placementstrategy = placementstrategy
40925	return c
40926}
40927
40928// Fields allows partial responses to be retrieved. See
40929// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40930// for more information.
40931func (c *PlacementStrategiesPatchCall) Fields(s ...googleapi.Field) *PlacementStrategiesPatchCall {
40932	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40933	return c
40934}
40935
40936// Context sets the context to be used in this call's Do method. Any
40937// pending HTTP request will be aborted if the provided context is
40938// canceled.
40939func (c *PlacementStrategiesPatchCall) Context(ctx context.Context) *PlacementStrategiesPatchCall {
40940	c.ctx_ = ctx
40941	return c
40942}
40943
40944// Header returns an http.Header that can be modified by the caller to
40945// add HTTP headers to the request.
40946func (c *PlacementStrategiesPatchCall) Header() http.Header {
40947	if c.header_ == nil {
40948		c.header_ = make(http.Header)
40949	}
40950	return c.header_
40951}
40952
40953func (c *PlacementStrategiesPatchCall) doRequest(alt string) (*http.Response, error) {
40954	reqHeaders := make(http.Header)
40955	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
40956	for k, v := range c.header_ {
40957		reqHeaders[k] = v
40958	}
40959	reqHeaders.Set("User-Agent", c.s.userAgent())
40960	var body io.Reader = nil
40961	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
40962	if err != nil {
40963		return nil, err
40964	}
40965	reqHeaders.Set("Content-Type", "application/json")
40966	c.urlParams_.Set("alt", alt)
40967	c.urlParams_.Set("prettyPrint", "false")
40968	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
40969	urls += "?" + c.urlParams_.Encode()
40970	req, err := http.NewRequest("PATCH", urls, body)
40971	if err != nil {
40972		return nil, err
40973	}
40974	req.Header = reqHeaders
40975	googleapi.Expand(req.URL, map[string]string{
40976		"profileId": strconv.FormatInt(c.profileId, 10),
40977	})
40978	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40979}
40980
40981// Do executes the "dfareporting.placementStrategies.patch" call.
40982// Exactly one of *PlacementStrategy or error will be non-nil. Any
40983// non-2xx status code is an error. Response headers are in either
40984// *PlacementStrategy.ServerResponse.Header or (if a response was
40985// returned at all) in error.(*googleapi.Error).Header. Use
40986// googleapi.IsNotModified to check whether the returned error was
40987// because http.StatusNotModified was returned.
40988func (c *PlacementStrategiesPatchCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
40989	gensupport.SetOptions(c.urlParams_, opts...)
40990	res, err := c.doRequest("json")
40991	if res != nil && res.StatusCode == http.StatusNotModified {
40992		if res.Body != nil {
40993			res.Body.Close()
40994		}
40995		return nil, &googleapi.Error{
40996			Code:   res.StatusCode,
40997			Header: res.Header,
40998		}
40999	}
41000	if err != nil {
41001		return nil, err
41002	}
41003	defer googleapi.CloseBody(res)
41004	if err := googleapi.CheckResponse(res); err != nil {
41005		return nil, err
41006	}
41007	ret := &PlacementStrategy{
41008		ServerResponse: googleapi.ServerResponse{
41009			Header:         res.Header,
41010			HTTPStatusCode: res.StatusCode,
41011		},
41012	}
41013	target := &ret
41014	if err := gensupport.DecodeResponse(target, res); err != nil {
41015		return nil, err
41016	}
41017	return ret, nil
41018	// {
41019	//   "description": "Updates an existing placement strategy. This method supports patch semantics.",
41020	//   "flatPath": "userprofiles/{profileId}/placementStrategies",
41021	//   "httpMethod": "PATCH",
41022	//   "id": "dfareporting.placementStrategies.patch",
41023	//   "parameterOrder": [
41024	//     "profileId",
41025	//     "id"
41026	//   ],
41027	//   "parameters": {
41028	//     "id": {
41029	//       "description": "PlacementStrategy ID.",
41030	//       "format": "int64",
41031	//       "location": "query",
41032	//       "required": true,
41033	//       "type": "string"
41034	//     },
41035	//     "profileId": {
41036	//       "description": "User profile ID associated with this request.",
41037	//       "format": "int64",
41038	//       "location": "path",
41039	//       "required": true,
41040	//       "type": "string"
41041	//     }
41042	//   },
41043	//   "path": "userprofiles/{profileId}/placementStrategies",
41044	//   "request": {
41045	//     "$ref": "PlacementStrategy"
41046	//   },
41047	//   "response": {
41048	//     "$ref": "PlacementStrategy"
41049	//   },
41050	//   "scopes": [
41051	//     "https://www.googleapis.com/auth/dfatrafficking"
41052	//   ]
41053	// }
41054
41055}
41056
41057// method id "dfareporting.placementStrategies.update":
41058
41059type PlacementStrategiesUpdateCall struct {
41060	s                 *Service
41061	profileId         int64
41062	placementstrategy *PlacementStrategy
41063	urlParams_        gensupport.URLParams
41064	ctx_              context.Context
41065	header_           http.Header
41066}
41067
41068// Update: Updates an existing placement strategy.
41069//
41070// - profileId: User profile ID associated with this request.
41071func (r *PlacementStrategiesService) Update(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesUpdateCall {
41072	c := &PlacementStrategiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41073	c.profileId = profileId
41074	c.placementstrategy = placementstrategy
41075	return c
41076}
41077
41078// Fields allows partial responses to be retrieved. See
41079// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41080// for more information.
41081func (c *PlacementStrategiesUpdateCall) Fields(s ...googleapi.Field) *PlacementStrategiesUpdateCall {
41082	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41083	return c
41084}
41085
41086// Context sets the context to be used in this call's Do method. Any
41087// pending HTTP request will be aborted if the provided context is
41088// canceled.
41089func (c *PlacementStrategiesUpdateCall) Context(ctx context.Context) *PlacementStrategiesUpdateCall {
41090	c.ctx_ = ctx
41091	return c
41092}
41093
41094// Header returns an http.Header that can be modified by the caller to
41095// add HTTP headers to the request.
41096func (c *PlacementStrategiesUpdateCall) Header() http.Header {
41097	if c.header_ == nil {
41098		c.header_ = make(http.Header)
41099	}
41100	return c.header_
41101}
41102
41103func (c *PlacementStrategiesUpdateCall) doRequest(alt string) (*http.Response, error) {
41104	reqHeaders := make(http.Header)
41105	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
41106	for k, v := range c.header_ {
41107		reqHeaders[k] = v
41108	}
41109	reqHeaders.Set("User-Agent", c.s.userAgent())
41110	var body io.Reader = nil
41111	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
41112	if err != nil {
41113		return nil, err
41114	}
41115	reqHeaders.Set("Content-Type", "application/json")
41116	c.urlParams_.Set("alt", alt)
41117	c.urlParams_.Set("prettyPrint", "false")
41118	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
41119	urls += "?" + c.urlParams_.Encode()
41120	req, err := http.NewRequest("PUT", urls, body)
41121	if err != nil {
41122		return nil, err
41123	}
41124	req.Header = reqHeaders
41125	googleapi.Expand(req.URL, map[string]string{
41126		"profileId": strconv.FormatInt(c.profileId, 10),
41127	})
41128	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41129}
41130
41131// Do executes the "dfareporting.placementStrategies.update" call.
41132// Exactly one of *PlacementStrategy or error will be non-nil. Any
41133// non-2xx status code is an error. Response headers are in either
41134// *PlacementStrategy.ServerResponse.Header or (if a response was
41135// returned at all) in error.(*googleapi.Error).Header. Use
41136// googleapi.IsNotModified to check whether the returned error was
41137// because http.StatusNotModified was returned.
41138func (c *PlacementStrategiesUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
41139	gensupport.SetOptions(c.urlParams_, opts...)
41140	res, err := c.doRequest("json")
41141	if res != nil && res.StatusCode == http.StatusNotModified {
41142		if res.Body != nil {
41143			res.Body.Close()
41144		}
41145		return nil, &googleapi.Error{
41146			Code:   res.StatusCode,
41147			Header: res.Header,
41148		}
41149	}
41150	if err != nil {
41151		return nil, err
41152	}
41153	defer googleapi.CloseBody(res)
41154	if err := googleapi.CheckResponse(res); err != nil {
41155		return nil, err
41156	}
41157	ret := &PlacementStrategy{
41158		ServerResponse: googleapi.ServerResponse{
41159			Header:         res.Header,
41160			HTTPStatusCode: res.StatusCode,
41161		},
41162	}
41163	target := &ret
41164	if err := gensupport.DecodeResponse(target, res); err != nil {
41165		return nil, err
41166	}
41167	return ret, nil
41168	// {
41169	//   "description": "Updates an existing placement strategy.",
41170	//   "flatPath": "userprofiles/{profileId}/placementStrategies",
41171	//   "httpMethod": "PUT",
41172	//   "id": "dfareporting.placementStrategies.update",
41173	//   "parameterOrder": [
41174	//     "profileId"
41175	//   ],
41176	//   "parameters": {
41177	//     "profileId": {
41178	//       "description": "User profile ID associated with this request.",
41179	//       "format": "int64",
41180	//       "location": "path",
41181	//       "required": true,
41182	//       "type": "string"
41183	//     }
41184	//   },
41185	//   "path": "userprofiles/{profileId}/placementStrategies",
41186	//   "request": {
41187	//     "$ref": "PlacementStrategy"
41188	//   },
41189	//   "response": {
41190	//     "$ref": "PlacementStrategy"
41191	//   },
41192	//   "scopes": [
41193	//     "https://www.googleapis.com/auth/dfatrafficking"
41194	//   ]
41195	// }
41196
41197}
41198
41199// method id "dfareporting.placements.generatetags":
41200
41201type PlacementsGeneratetagsCall struct {
41202	s          *Service
41203	profileId  int64
41204	urlParams_ gensupport.URLParams
41205	ctx_       context.Context
41206	header_    http.Header
41207}
41208
41209// Generatetags: Generates tags for a placement.
41210//
41211// - profileId: User profile ID associated with this request.
41212func (r *PlacementsService) Generatetags(profileId int64) *PlacementsGeneratetagsCall {
41213	c := &PlacementsGeneratetagsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41214	c.profileId = profileId
41215	return c
41216}
41217
41218// CampaignId sets the optional parameter "campaignId": Generate
41219// placements belonging to this campaign. This is a required field.
41220func (c *PlacementsGeneratetagsCall) CampaignId(campaignId int64) *PlacementsGeneratetagsCall {
41221	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
41222	return c
41223}
41224
41225// PlacementIds sets the optional parameter "placementIds": Generate
41226// tags for these placements.
41227func (c *PlacementsGeneratetagsCall) PlacementIds(placementIds ...int64) *PlacementsGeneratetagsCall {
41228	var placementIds_ []string
41229	for _, v := range placementIds {
41230		placementIds_ = append(placementIds_, fmt.Sprint(v))
41231	}
41232	c.urlParams_.SetMulti("placementIds", placementIds_)
41233	return c
41234}
41235
41236// TagFormats sets the optional parameter "tagFormats": Tag formats to
41237// generate for these placements. *Note:* PLACEMENT_TAG_STANDARD can
41238// only be generated for 1x1 placements.
41239//
41240// Possible values:
41241//   "PLACEMENT_TAG_STANDARD"
41242//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
41243//   "PLACEMENT_TAG_IFRAME_ILAYER"
41244//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
41245//   "PLACEMENT_TAG_JAVASCRIPT"
41246//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
41247//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
41248//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
41249//   "PLACEMENT_TAG_CLICK_COMMANDS"
41250//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
41251//   "PLACEMENT_TAG_TRACKING"
41252//   "PLACEMENT_TAG_TRACKING_IFRAME"
41253//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
41254//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
41255//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
41256//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
41257//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
41258//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
41259//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
41260func (c *PlacementsGeneratetagsCall) TagFormats(tagFormats ...string) *PlacementsGeneratetagsCall {
41261	c.urlParams_.SetMulti("tagFormats", append([]string{}, tagFormats...))
41262	return c
41263}
41264
41265// Fields allows partial responses to be retrieved. See
41266// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41267// for more information.
41268func (c *PlacementsGeneratetagsCall) Fields(s ...googleapi.Field) *PlacementsGeneratetagsCall {
41269	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41270	return c
41271}
41272
41273// Context sets the context to be used in this call's Do method. Any
41274// pending HTTP request will be aborted if the provided context is
41275// canceled.
41276func (c *PlacementsGeneratetagsCall) Context(ctx context.Context) *PlacementsGeneratetagsCall {
41277	c.ctx_ = ctx
41278	return c
41279}
41280
41281// Header returns an http.Header that can be modified by the caller to
41282// add HTTP headers to the request.
41283func (c *PlacementsGeneratetagsCall) Header() http.Header {
41284	if c.header_ == nil {
41285		c.header_ = make(http.Header)
41286	}
41287	return c.header_
41288}
41289
41290func (c *PlacementsGeneratetagsCall) doRequest(alt string) (*http.Response, error) {
41291	reqHeaders := make(http.Header)
41292	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
41293	for k, v := range c.header_ {
41294		reqHeaders[k] = v
41295	}
41296	reqHeaders.Set("User-Agent", c.s.userAgent())
41297	var body io.Reader = nil
41298	c.urlParams_.Set("alt", alt)
41299	c.urlParams_.Set("prettyPrint", "false")
41300	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/generatetags")
41301	urls += "?" + c.urlParams_.Encode()
41302	req, err := http.NewRequest("POST", urls, body)
41303	if err != nil {
41304		return nil, err
41305	}
41306	req.Header = reqHeaders
41307	googleapi.Expand(req.URL, map[string]string{
41308		"profileId": strconv.FormatInt(c.profileId, 10),
41309	})
41310	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41311}
41312
41313// Do executes the "dfareporting.placements.generatetags" call.
41314// Exactly one of *PlacementsGenerateTagsResponse or error will be
41315// non-nil. Any non-2xx status code is an error. Response headers are in
41316// either *PlacementsGenerateTagsResponse.ServerResponse.Header or (if a
41317// response was returned at all) in error.(*googleapi.Error).Header. Use
41318// googleapi.IsNotModified to check whether the returned error was
41319// because http.StatusNotModified was returned.
41320func (c *PlacementsGeneratetagsCall) Do(opts ...googleapi.CallOption) (*PlacementsGenerateTagsResponse, error) {
41321	gensupport.SetOptions(c.urlParams_, opts...)
41322	res, err := c.doRequest("json")
41323	if res != nil && res.StatusCode == http.StatusNotModified {
41324		if res.Body != nil {
41325			res.Body.Close()
41326		}
41327		return nil, &googleapi.Error{
41328			Code:   res.StatusCode,
41329			Header: res.Header,
41330		}
41331	}
41332	if err != nil {
41333		return nil, err
41334	}
41335	defer googleapi.CloseBody(res)
41336	if err := googleapi.CheckResponse(res); err != nil {
41337		return nil, err
41338	}
41339	ret := &PlacementsGenerateTagsResponse{
41340		ServerResponse: googleapi.ServerResponse{
41341			Header:         res.Header,
41342			HTTPStatusCode: res.StatusCode,
41343		},
41344	}
41345	target := &ret
41346	if err := gensupport.DecodeResponse(target, res); err != nil {
41347		return nil, err
41348	}
41349	return ret, nil
41350	// {
41351	//   "description": "Generates tags for a placement.",
41352	//   "flatPath": "userprofiles/{profileId}/placements/generatetags",
41353	//   "httpMethod": "POST",
41354	//   "id": "dfareporting.placements.generatetags",
41355	//   "parameterOrder": [
41356	//     "profileId"
41357	//   ],
41358	//   "parameters": {
41359	//     "campaignId": {
41360	//       "description": "Generate placements belonging to this campaign. This is a required field.",
41361	//       "format": "int64",
41362	//       "location": "query",
41363	//       "type": "string"
41364	//     },
41365	//     "placementIds": {
41366	//       "description": "Generate tags for these placements.",
41367	//       "format": "int64",
41368	//       "location": "query",
41369	//       "repeated": true,
41370	//       "type": "string"
41371	//     },
41372	//     "profileId": {
41373	//       "description": "User profile ID associated with this request.",
41374	//       "format": "int64",
41375	//       "location": "path",
41376	//       "required": true,
41377	//       "type": "string"
41378	//     },
41379	//     "tagFormats": {
41380	//       "description": "Tag formats to generate for these placements. *Note:* PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.",
41381	//       "enum": [
41382	//         "PLACEMENT_TAG_STANDARD",
41383	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT",
41384	//         "PLACEMENT_TAG_IFRAME_ILAYER",
41385	//         "PLACEMENT_TAG_INTERNAL_REDIRECT",
41386	//         "PLACEMENT_TAG_JAVASCRIPT",
41387	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT",
41388	//         "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT",
41389	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT",
41390	//         "PLACEMENT_TAG_CLICK_COMMANDS",
41391	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH",
41392	//         "PLACEMENT_TAG_TRACKING",
41393	//         "PLACEMENT_TAG_TRACKING_IFRAME",
41394	//         "PLACEMENT_TAG_TRACKING_JAVASCRIPT",
41395	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3",
41396	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY",
41397	//         "PLACEMENT_TAG_JAVASCRIPT_LEGACY",
41398	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY",
41399	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY",
41400	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
41401	//       ],
41402	//       "enumDescriptions": [
41403	//         "",
41404	//         "",
41405	//         "",
41406	//         "",
41407	//         "",
41408	//         "",
41409	//         "",
41410	//         "",
41411	//         "",
41412	//         "",
41413	//         "",
41414	//         "",
41415	//         "",
41416	//         "",
41417	//         "",
41418	//         "",
41419	//         "",
41420	//         "",
41421	//         ""
41422	//       ],
41423	//       "location": "query",
41424	//       "repeated": true,
41425	//       "type": "string"
41426	//     }
41427	//   },
41428	//   "path": "userprofiles/{profileId}/placements/generatetags",
41429	//   "response": {
41430	//     "$ref": "PlacementsGenerateTagsResponse"
41431	//   },
41432	//   "scopes": [
41433	//     "https://www.googleapis.com/auth/dfatrafficking"
41434	//   ]
41435	// }
41436
41437}
41438
41439// method id "dfareporting.placements.get":
41440
41441type PlacementsGetCall struct {
41442	s            *Service
41443	profileId    int64
41444	id           int64
41445	urlParams_   gensupport.URLParams
41446	ifNoneMatch_ string
41447	ctx_         context.Context
41448	header_      http.Header
41449}
41450
41451// Get: Gets one placement by ID.
41452//
41453// - id: Placement ID.
41454// - profileId: User profile ID associated with this request.
41455func (r *PlacementsService) Get(profileId int64, id int64) *PlacementsGetCall {
41456	c := &PlacementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41457	c.profileId = profileId
41458	c.id = id
41459	return c
41460}
41461
41462// Fields allows partial responses to be retrieved. See
41463// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41464// for more information.
41465func (c *PlacementsGetCall) Fields(s ...googleapi.Field) *PlacementsGetCall {
41466	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41467	return c
41468}
41469
41470// IfNoneMatch sets the optional parameter which makes the operation
41471// fail if the object's ETag matches the given value. This is useful for
41472// getting updates only after the object has changed since the last
41473// request. Use googleapi.IsNotModified to check whether the response
41474// error from Do is the result of In-None-Match.
41475func (c *PlacementsGetCall) IfNoneMatch(entityTag string) *PlacementsGetCall {
41476	c.ifNoneMatch_ = entityTag
41477	return c
41478}
41479
41480// Context sets the context to be used in this call's Do method. Any
41481// pending HTTP request will be aborted if the provided context is
41482// canceled.
41483func (c *PlacementsGetCall) Context(ctx context.Context) *PlacementsGetCall {
41484	c.ctx_ = ctx
41485	return c
41486}
41487
41488// Header returns an http.Header that can be modified by the caller to
41489// add HTTP headers to the request.
41490func (c *PlacementsGetCall) Header() http.Header {
41491	if c.header_ == nil {
41492		c.header_ = make(http.Header)
41493	}
41494	return c.header_
41495}
41496
41497func (c *PlacementsGetCall) doRequest(alt string) (*http.Response, error) {
41498	reqHeaders := make(http.Header)
41499	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
41500	for k, v := range c.header_ {
41501		reqHeaders[k] = v
41502	}
41503	reqHeaders.Set("User-Agent", c.s.userAgent())
41504	if c.ifNoneMatch_ != "" {
41505		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41506	}
41507	var body io.Reader = nil
41508	c.urlParams_.Set("alt", alt)
41509	c.urlParams_.Set("prettyPrint", "false")
41510	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/{id}")
41511	urls += "?" + c.urlParams_.Encode()
41512	req, err := http.NewRequest("GET", urls, body)
41513	if err != nil {
41514		return nil, err
41515	}
41516	req.Header = reqHeaders
41517	googleapi.Expand(req.URL, map[string]string{
41518		"profileId": strconv.FormatInt(c.profileId, 10),
41519		"id":        strconv.FormatInt(c.id, 10),
41520	})
41521	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41522}
41523
41524// Do executes the "dfareporting.placements.get" call.
41525// Exactly one of *Placement or error will be non-nil. Any non-2xx
41526// status code is an error. Response headers are in either
41527// *Placement.ServerResponse.Header or (if a response was returned at
41528// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41529// to check whether the returned error was because
41530// http.StatusNotModified was returned.
41531func (c *PlacementsGetCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
41532	gensupport.SetOptions(c.urlParams_, opts...)
41533	res, err := c.doRequest("json")
41534	if res != nil && res.StatusCode == http.StatusNotModified {
41535		if res.Body != nil {
41536			res.Body.Close()
41537		}
41538		return nil, &googleapi.Error{
41539			Code:   res.StatusCode,
41540			Header: res.Header,
41541		}
41542	}
41543	if err != nil {
41544		return nil, err
41545	}
41546	defer googleapi.CloseBody(res)
41547	if err := googleapi.CheckResponse(res); err != nil {
41548		return nil, err
41549	}
41550	ret := &Placement{
41551		ServerResponse: googleapi.ServerResponse{
41552			Header:         res.Header,
41553			HTTPStatusCode: res.StatusCode,
41554		},
41555	}
41556	target := &ret
41557	if err := gensupport.DecodeResponse(target, res); err != nil {
41558		return nil, err
41559	}
41560	return ret, nil
41561	// {
41562	//   "description": "Gets one placement by ID.",
41563	//   "flatPath": "userprofiles/{profileId}/placements/{id}",
41564	//   "httpMethod": "GET",
41565	//   "id": "dfareporting.placements.get",
41566	//   "parameterOrder": [
41567	//     "profileId",
41568	//     "id"
41569	//   ],
41570	//   "parameters": {
41571	//     "id": {
41572	//       "description": "Placement ID.",
41573	//       "format": "int64",
41574	//       "location": "path",
41575	//       "required": true,
41576	//       "type": "string"
41577	//     },
41578	//     "profileId": {
41579	//       "description": "User profile ID associated with this request.",
41580	//       "format": "int64",
41581	//       "location": "path",
41582	//       "required": true,
41583	//       "type": "string"
41584	//     }
41585	//   },
41586	//   "path": "userprofiles/{profileId}/placements/{id}",
41587	//   "response": {
41588	//     "$ref": "Placement"
41589	//   },
41590	//   "scopes": [
41591	//     "https://www.googleapis.com/auth/dfatrafficking"
41592	//   ]
41593	// }
41594
41595}
41596
41597// method id "dfareporting.placements.insert":
41598
41599type PlacementsInsertCall struct {
41600	s          *Service
41601	profileId  int64
41602	placement  *Placement
41603	urlParams_ gensupport.URLParams
41604	ctx_       context.Context
41605	header_    http.Header
41606}
41607
41608// Insert: Inserts a new placement.
41609//
41610// - profileId: User profile ID associated with this request.
41611func (r *PlacementsService) Insert(profileId int64, placement *Placement) *PlacementsInsertCall {
41612	c := &PlacementsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41613	c.profileId = profileId
41614	c.placement = placement
41615	return c
41616}
41617
41618// Fields allows partial responses to be retrieved. See
41619// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41620// for more information.
41621func (c *PlacementsInsertCall) Fields(s ...googleapi.Field) *PlacementsInsertCall {
41622	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41623	return c
41624}
41625
41626// Context sets the context to be used in this call's Do method. Any
41627// pending HTTP request will be aborted if the provided context is
41628// canceled.
41629func (c *PlacementsInsertCall) Context(ctx context.Context) *PlacementsInsertCall {
41630	c.ctx_ = ctx
41631	return c
41632}
41633
41634// Header returns an http.Header that can be modified by the caller to
41635// add HTTP headers to the request.
41636func (c *PlacementsInsertCall) Header() http.Header {
41637	if c.header_ == nil {
41638		c.header_ = make(http.Header)
41639	}
41640	return c.header_
41641}
41642
41643func (c *PlacementsInsertCall) doRequest(alt string) (*http.Response, error) {
41644	reqHeaders := make(http.Header)
41645	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
41646	for k, v := range c.header_ {
41647		reqHeaders[k] = v
41648	}
41649	reqHeaders.Set("User-Agent", c.s.userAgent())
41650	var body io.Reader = nil
41651	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
41652	if err != nil {
41653		return nil, err
41654	}
41655	reqHeaders.Set("Content-Type", "application/json")
41656	c.urlParams_.Set("alt", alt)
41657	c.urlParams_.Set("prettyPrint", "false")
41658	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
41659	urls += "?" + c.urlParams_.Encode()
41660	req, err := http.NewRequest("POST", urls, body)
41661	if err != nil {
41662		return nil, err
41663	}
41664	req.Header = reqHeaders
41665	googleapi.Expand(req.URL, map[string]string{
41666		"profileId": strconv.FormatInt(c.profileId, 10),
41667	})
41668	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41669}
41670
41671// Do executes the "dfareporting.placements.insert" call.
41672// Exactly one of *Placement or error will be non-nil. Any non-2xx
41673// status code is an error. Response headers are in either
41674// *Placement.ServerResponse.Header or (if a response was returned at
41675// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41676// to check whether the returned error was because
41677// http.StatusNotModified was returned.
41678func (c *PlacementsInsertCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
41679	gensupport.SetOptions(c.urlParams_, opts...)
41680	res, err := c.doRequest("json")
41681	if res != nil && res.StatusCode == http.StatusNotModified {
41682		if res.Body != nil {
41683			res.Body.Close()
41684		}
41685		return nil, &googleapi.Error{
41686			Code:   res.StatusCode,
41687			Header: res.Header,
41688		}
41689	}
41690	if err != nil {
41691		return nil, err
41692	}
41693	defer googleapi.CloseBody(res)
41694	if err := googleapi.CheckResponse(res); err != nil {
41695		return nil, err
41696	}
41697	ret := &Placement{
41698		ServerResponse: googleapi.ServerResponse{
41699			Header:         res.Header,
41700			HTTPStatusCode: res.StatusCode,
41701		},
41702	}
41703	target := &ret
41704	if err := gensupport.DecodeResponse(target, res); err != nil {
41705		return nil, err
41706	}
41707	return ret, nil
41708	// {
41709	//   "description": "Inserts a new placement.",
41710	//   "flatPath": "userprofiles/{profileId}/placements",
41711	//   "httpMethod": "POST",
41712	//   "id": "dfareporting.placements.insert",
41713	//   "parameterOrder": [
41714	//     "profileId"
41715	//   ],
41716	//   "parameters": {
41717	//     "profileId": {
41718	//       "description": "User profile ID associated with this request.",
41719	//       "format": "int64",
41720	//       "location": "path",
41721	//       "required": true,
41722	//       "type": "string"
41723	//     }
41724	//   },
41725	//   "path": "userprofiles/{profileId}/placements",
41726	//   "request": {
41727	//     "$ref": "Placement"
41728	//   },
41729	//   "response": {
41730	//     "$ref": "Placement"
41731	//   },
41732	//   "scopes": [
41733	//     "https://www.googleapis.com/auth/dfatrafficking"
41734	//   ]
41735	// }
41736
41737}
41738
41739// method id "dfareporting.placements.list":
41740
41741type PlacementsListCall struct {
41742	s            *Service
41743	profileId    int64
41744	urlParams_   gensupport.URLParams
41745	ifNoneMatch_ string
41746	ctx_         context.Context
41747	header_      http.Header
41748}
41749
41750// List: Retrieves a list of placements, possibly filtered. This method
41751// supports paging.
41752//
41753// - profileId: User profile ID associated with this request.
41754func (r *PlacementsService) List(profileId int64) *PlacementsListCall {
41755	c := &PlacementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41756	c.profileId = profileId
41757	return c
41758}
41759
41760// AdvertiserIds sets the optional parameter "advertiserIds": Select
41761// only placements that belong to these advertisers.
41762func (c *PlacementsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementsListCall {
41763	var advertiserIds_ []string
41764	for _, v := range advertiserIds {
41765		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
41766	}
41767	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
41768	return c
41769}
41770
41771// Archived sets the optional parameter "archived": Select only archived
41772// placements. Don't set this field to select both archived and
41773// non-archived placements.
41774func (c *PlacementsListCall) Archived(archived bool) *PlacementsListCall {
41775	c.urlParams_.Set("archived", fmt.Sprint(archived))
41776	return c
41777}
41778
41779// CampaignIds sets the optional parameter "campaignIds": Select only
41780// placements that belong to these campaigns.
41781func (c *PlacementsListCall) CampaignIds(campaignIds ...int64) *PlacementsListCall {
41782	var campaignIds_ []string
41783	for _, v := range campaignIds {
41784		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
41785	}
41786	c.urlParams_.SetMulti("campaignIds", campaignIds_)
41787	return c
41788}
41789
41790// Compatibilities sets the optional parameter "compatibilities": Select
41791// only placements that are associated with these compatibilities.
41792// DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop
41793// or on mobile devices for regular or interstitial ads respectively.
41794// APP and APP_INTERSTITIAL are for rendering in mobile apps.
41795// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
41796// with the VAST standard.
41797//
41798// Possible values:
41799//   "DISPLAY"
41800//   "DISPLAY_INTERSTITIAL"
41801//   "APP"
41802//   "APP_INTERSTITIAL"
41803//   "IN_STREAM_VIDEO"
41804//   "IN_STREAM_AUDIO"
41805func (c *PlacementsListCall) Compatibilities(compatibilities ...string) *PlacementsListCall {
41806	c.urlParams_.SetMulti("compatibilities", append([]string{}, compatibilities...))
41807	return c
41808}
41809
41810// ContentCategoryIds sets the optional parameter "contentCategoryIds":
41811// Select only placements that are associated with these content
41812// categories.
41813func (c *PlacementsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementsListCall {
41814	var contentCategoryIds_ []string
41815	for _, v := range contentCategoryIds {
41816		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
41817	}
41818	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
41819	return c
41820}
41821
41822// DirectorySiteIds sets the optional parameter "directorySiteIds":
41823// Select only placements that are associated with these directory
41824// sites.
41825func (c *PlacementsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementsListCall {
41826	var directorySiteIds_ []string
41827	for _, v := range directorySiteIds {
41828		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
41829	}
41830	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
41831	return c
41832}
41833
41834// GroupIds sets the optional parameter "groupIds": Select only
41835// placements that belong to these placement groups.
41836func (c *PlacementsListCall) GroupIds(groupIds ...int64) *PlacementsListCall {
41837	var groupIds_ []string
41838	for _, v := range groupIds {
41839		groupIds_ = append(groupIds_, fmt.Sprint(v))
41840	}
41841	c.urlParams_.SetMulti("groupIds", groupIds_)
41842	return c
41843}
41844
41845// Ids sets the optional parameter "ids": Select only placements with
41846// these IDs.
41847func (c *PlacementsListCall) Ids(ids ...int64) *PlacementsListCall {
41848	var ids_ []string
41849	for _, v := range ids {
41850		ids_ = append(ids_, fmt.Sprint(v))
41851	}
41852	c.urlParams_.SetMulti("ids", ids_)
41853	return c
41854}
41855
41856// MaxEndDate sets the optional parameter "maxEndDate": Select only
41857// placements or placement groups whose end date is on or before the
41858// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
41859func (c *PlacementsListCall) MaxEndDate(maxEndDate string) *PlacementsListCall {
41860	c.urlParams_.Set("maxEndDate", maxEndDate)
41861	return c
41862}
41863
41864// MaxResults sets the optional parameter "maxResults": Maximum number
41865// of results to return.
41866func (c *PlacementsListCall) MaxResults(maxResults int64) *PlacementsListCall {
41867	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
41868	return c
41869}
41870
41871// MaxStartDate sets the optional parameter "maxStartDate": Select only
41872// placements or placement groups whose start date is on or before the
41873// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
41874func (c *PlacementsListCall) MaxStartDate(maxStartDate string) *PlacementsListCall {
41875	c.urlParams_.Set("maxStartDate", maxStartDate)
41876	return c
41877}
41878
41879// MinEndDate sets the optional parameter "minEndDate": Select only
41880// placements or placement groups whose end date is on or after the
41881// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
41882func (c *PlacementsListCall) MinEndDate(minEndDate string) *PlacementsListCall {
41883	c.urlParams_.Set("minEndDate", minEndDate)
41884	return c
41885}
41886
41887// MinStartDate sets the optional parameter "minStartDate": Select only
41888// placements or placement groups whose start date is on or after the
41889// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
41890func (c *PlacementsListCall) MinStartDate(minStartDate string) *PlacementsListCall {
41891	c.urlParams_.Set("minStartDate", minStartDate)
41892	return c
41893}
41894
41895// PageToken sets the optional parameter "pageToken": Value of the
41896// nextPageToken from the previous result page.
41897func (c *PlacementsListCall) PageToken(pageToken string) *PlacementsListCall {
41898	c.urlParams_.Set("pageToken", pageToken)
41899	return c
41900}
41901
41902// PaymentSource sets the optional parameter "paymentSource": Select
41903// only placements with this payment source.
41904//
41905// Possible values:
41906//   "PLACEMENT_AGENCY_PAID"
41907//   "PLACEMENT_PUBLISHER_PAID"
41908func (c *PlacementsListCall) PaymentSource(paymentSource string) *PlacementsListCall {
41909	c.urlParams_.Set("paymentSource", paymentSource)
41910	return c
41911}
41912
41913// PlacementStrategyIds sets the optional parameter
41914// "placementStrategyIds": Select only placements that are associated
41915// with these placement strategies.
41916func (c *PlacementsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementsListCall {
41917	var placementStrategyIds_ []string
41918	for _, v := range placementStrategyIds {
41919		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
41920	}
41921	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
41922	return c
41923}
41924
41925// PricingTypes sets the optional parameter "pricingTypes": Select only
41926// placements with these pricing types.
41927//
41928// Possible values:
41929//   "PRICING_TYPE_CPM"
41930//   "PRICING_TYPE_CPC"
41931//   "PRICING_TYPE_CPA"
41932//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
41933//   "PRICING_TYPE_FLAT_RATE_CLICKS"
41934//   "PRICING_TYPE_CPM_ACTIVEVIEW"
41935func (c *PlacementsListCall) PricingTypes(pricingTypes ...string) *PlacementsListCall {
41936	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
41937	return c
41938}
41939
41940// SearchString sets the optional parameter "searchString": Allows
41941// searching for placements by name or ID. Wildcards (*) are allowed.
41942// For example, "placement*2015" will return placements with names like
41943// "placement June 2015", "placement May 2015", or simply "placements
41944// 2015". Most of the searches also add wildcards implicitly at the
41945// start and the end of the search string. For example, a search string
41946// of "placement" will match placements with name "my placement",
41947// "placement 2015", or simply "placement" .
41948func (c *PlacementsListCall) SearchString(searchString string) *PlacementsListCall {
41949	c.urlParams_.Set("searchString", searchString)
41950	return c
41951}
41952
41953// SiteIds sets the optional parameter "siteIds": Select only placements
41954// that are associated with these sites.
41955func (c *PlacementsListCall) SiteIds(siteIds ...int64) *PlacementsListCall {
41956	var siteIds_ []string
41957	for _, v := range siteIds {
41958		siteIds_ = append(siteIds_, fmt.Sprint(v))
41959	}
41960	c.urlParams_.SetMulti("siteIds", siteIds_)
41961	return c
41962}
41963
41964// SizeIds sets the optional parameter "sizeIds": Select only placements
41965// that are associated with these sizes.
41966func (c *PlacementsListCall) SizeIds(sizeIds ...int64) *PlacementsListCall {
41967	var sizeIds_ []string
41968	for _, v := range sizeIds {
41969		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
41970	}
41971	c.urlParams_.SetMulti("sizeIds", sizeIds_)
41972	return c
41973}
41974
41975// SortField sets the optional parameter "sortField": Field by which to
41976// sort the list.
41977//
41978// Possible values:
41979//   "ID" (default)
41980//   "NAME"
41981func (c *PlacementsListCall) SortField(sortField string) *PlacementsListCall {
41982	c.urlParams_.Set("sortField", sortField)
41983	return c
41984}
41985
41986// SortOrder sets the optional parameter "sortOrder": Order of sorted
41987// results.
41988//
41989// Possible values:
41990//   "ASCENDING" (default)
41991//   "DESCENDING"
41992func (c *PlacementsListCall) SortOrder(sortOrder string) *PlacementsListCall {
41993	c.urlParams_.Set("sortOrder", sortOrder)
41994	return c
41995}
41996
41997// Fields allows partial responses to be retrieved. See
41998// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41999// for more information.
42000func (c *PlacementsListCall) Fields(s ...googleapi.Field) *PlacementsListCall {
42001	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42002	return c
42003}
42004
42005// IfNoneMatch sets the optional parameter which makes the operation
42006// fail if the object's ETag matches the given value. This is useful for
42007// getting updates only after the object has changed since the last
42008// request. Use googleapi.IsNotModified to check whether the response
42009// error from Do is the result of In-None-Match.
42010func (c *PlacementsListCall) IfNoneMatch(entityTag string) *PlacementsListCall {
42011	c.ifNoneMatch_ = entityTag
42012	return c
42013}
42014
42015// Context sets the context to be used in this call's Do method. Any
42016// pending HTTP request will be aborted if the provided context is
42017// canceled.
42018func (c *PlacementsListCall) Context(ctx context.Context) *PlacementsListCall {
42019	c.ctx_ = ctx
42020	return c
42021}
42022
42023// Header returns an http.Header that can be modified by the caller to
42024// add HTTP headers to the request.
42025func (c *PlacementsListCall) Header() http.Header {
42026	if c.header_ == nil {
42027		c.header_ = make(http.Header)
42028	}
42029	return c.header_
42030}
42031
42032func (c *PlacementsListCall) doRequest(alt string) (*http.Response, error) {
42033	reqHeaders := make(http.Header)
42034	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
42035	for k, v := range c.header_ {
42036		reqHeaders[k] = v
42037	}
42038	reqHeaders.Set("User-Agent", c.s.userAgent())
42039	if c.ifNoneMatch_ != "" {
42040		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42041	}
42042	var body io.Reader = nil
42043	c.urlParams_.Set("alt", alt)
42044	c.urlParams_.Set("prettyPrint", "false")
42045	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
42046	urls += "?" + c.urlParams_.Encode()
42047	req, err := http.NewRequest("GET", urls, body)
42048	if err != nil {
42049		return nil, err
42050	}
42051	req.Header = reqHeaders
42052	googleapi.Expand(req.URL, map[string]string{
42053		"profileId": strconv.FormatInt(c.profileId, 10),
42054	})
42055	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42056}
42057
42058// Do executes the "dfareporting.placements.list" call.
42059// Exactly one of *PlacementsListResponse or error will be non-nil. Any
42060// non-2xx status code is an error. Response headers are in either
42061// *PlacementsListResponse.ServerResponse.Header or (if a response was
42062// returned at all) in error.(*googleapi.Error).Header. Use
42063// googleapi.IsNotModified to check whether the returned error was
42064// because http.StatusNotModified was returned.
42065func (c *PlacementsListCall) Do(opts ...googleapi.CallOption) (*PlacementsListResponse, error) {
42066	gensupport.SetOptions(c.urlParams_, opts...)
42067	res, err := c.doRequest("json")
42068	if res != nil && res.StatusCode == http.StatusNotModified {
42069		if res.Body != nil {
42070			res.Body.Close()
42071		}
42072		return nil, &googleapi.Error{
42073			Code:   res.StatusCode,
42074			Header: res.Header,
42075		}
42076	}
42077	if err != nil {
42078		return nil, err
42079	}
42080	defer googleapi.CloseBody(res)
42081	if err := googleapi.CheckResponse(res); err != nil {
42082		return nil, err
42083	}
42084	ret := &PlacementsListResponse{
42085		ServerResponse: googleapi.ServerResponse{
42086			Header:         res.Header,
42087			HTTPStatusCode: res.StatusCode,
42088		},
42089	}
42090	target := &ret
42091	if err := gensupport.DecodeResponse(target, res); err != nil {
42092		return nil, err
42093	}
42094	return ret, nil
42095	// {
42096	//   "description": "Retrieves a list of placements, possibly filtered. This method supports paging.",
42097	//   "flatPath": "userprofiles/{profileId}/placements",
42098	//   "httpMethod": "GET",
42099	//   "id": "dfareporting.placements.list",
42100	//   "parameterOrder": [
42101	//     "profileId"
42102	//   ],
42103	//   "parameters": {
42104	//     "advertiserIds": {
42105	//       "description": "Select only placements that belong to these advertisers.",
42106	//       "format": "int64",
42107	//       "location": "query",
42108	//       "repeated": true,
42109	//       "type": "string"
42110	//     },
42111	//     "archived": {
42112	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
42113	//       "location": "query",
42114	//       "type": "boolean"
42115	//     },
42116	//     "campaignIds": {
42117	//       "description": "Select only placements that belong to these campaigns.",
42118	//       "format": "int64",
42119	//       "location": "query",
42120	//       "repeated": true,
42121	//       "type": "string"
42122	//     },
42123	//     "compatibilities": {
42124	//       "description": "Select only placements that are associated with these compatibilities. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard.",
42125	//       "enum": [
42126	//         "DISPLAY",
42127	//         "DISPLAY_INTERSTITIAL",
42128	//         "APP",
42129	//         "APP_INTERSTITIAL",
42130	//         "IN_STREAM_VIDEO",
42131	//         "IN_STREAM_AUDIO"
42132	//       ],
42133	//       "enumDescriptions": [
42134	//         "",
42135	//         "",
42136	//         "",
42137	//         "",
42138	//         "",
42139	//         ""
42140	//       ],
42141	//       "location": "query",
42142	//       "repeated": true,
42143	//       "type": "string"
42144	//     },
42145	//     "contentCategoryIds": {
42146	//       "description": "Select only placements that are associated with these content categories.",
42147	//       "format": "int64",
42148	//       "location": "query",
42149	//       "repeated": true,
42150	//       "type": "string"
42151	//     },
42152	//     "directorySiteIds": {
42153	//       "description": "Select only placements that are associated with these directory sites.",
42154	//       "format": "int64",
42155	//       "location": "query",
42156	//       "repeated": true,
42157	//       "type": "string"
42158	//     },
42159	//     "groupIds": {
42160	//       "description": "Select only placements that belong to these placement groups.",
42161	//       "format": "int64",
42162	//       "location": "query",
42163	//       "repeated": true,
42164	//       "type": "string"
42165	//     },
42166	//     "ids": {
42167	//       "description": "Select only placements with these IDs.",
42168	//       "format": "int64",
42169	//       "location": "query",
42170	//       "repeated": true,
42171	//       "type": "string"
42172	//     },
42173	//     "maxEndDate": {
42174	//       "description": "Select only placements or placement groups whose end date is on or before the specified maxEndDate. The date should be formatted as \"yyyy-MM-dd\".",
42175	//       "location": "query",
42176	//       "type": "string"
42177	//     },
42178	//     "maxResults": {
42179	//       "default": "1000",
42180	//       "description": "Maximum number of results to return.",
42181	//       "format": "int32",
42182	//       "location": "query",
42183	//       "maximum": "1000",
42184	//       "minimum": "0",
42185	//       "type": "integer"
42186	//     },
42187	//     "maxStartDate": {
42188	//       "description": "Select only placements or placement groups whose start date is on or before the specified maxStartDate. The date should be formatted as \"yyyy-MM-dd\".",
42189	//       "location": "query",
42190	//       "type": "string"
42191	//     },
42192	//     "minEndDate": {
42193	//       "description": "Select only placements or placement groups whose end date is on or after the specified minEndDate. The date should be formatted as \"yyyy-MM-dd\".",
42194	//       "location": "query",
42195	//       "type": "string"
42196	//     },
42197	//     "minStartDate": {
42198	//       "description": "Select only placements or placement groups whose start date is on or after the specified minStartDate. The date should be formatted as \"yyyy-MM-dd\".",
42199	//       "location": "query",
42200	//       "type": "string"
42201	//     },
42202	//     "pageToken": {
42203	//       "description": "Value of the nextPageToken from the previous result page.",
42204	//       "location": "query",
42205	//       "type": "string"
42206	//     },
42207	//     "paymentSource": {
42208	//       "description": "Select only placements with this payment source.",
42209	//       "enum": [
42210	//         "PLACEMENT_AGENCY_PAID",
42211	//         "PLACEMENT_PUBLISHER_PAID"
42212	//       ],
42213	//       "enumDescriptions": [
42214	//         "",
42215	//         ""
42216	//       ],
42217	//       "location": "query",
42218	//       "type": "string"
42219	//     },
42220	//     "placementStrategyIds": {
42221	//       "description": "Select only placements that are associated with these placement strategies.",
42222	//       "format": "int64",
42223	//       "location": "query",
42224	//       "repeated": true,
42225	//       "type": "string"
42226	//     },
42227	//     "pricingTypes": {
42228	//       "description": "Select only placements with these pricing types.",
42229	//       "enum": [
42230	//         "PRICING_TYPE_CPM",
42231	//         "PRICING_TYPE_CPC",
42232	//         "PRICING_TYPE_CPA",
42233	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS",
42234	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
42235	//         "PRICING_TYPE_CPM_ACTIVEVIEW"
42236	//       ],
42237	//       "enumDescriptions": [
42238	//         "",
42239	//         "",
42240	//         "",
42241	//         "",
42242	//         "",
42243	//         ""
42244	//       ],
42245	//       "location": "query",
42246	//       "repeated": true,
42247	//       "type": "string"
42248	//     },
42249	//     "profileId": {
42250	//       "description": "User profile ID associated with this request.",
42251	//       "format": "int64",
42252	//       "location": "path",
42253	//       "required": true,
42254	//       "type": "string"
42255	//     },
42256	//     "searchString": {
42257	//       "description": "Allows searching for placements by name or ID. Wildcards (*) are allowed. For example, \"placement*2015\" will return placements with names like \"placement June 2015\", \"placement May 2015\", or simply \"placements 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"placement\" will match placements with name \"my placement\", \"placement 2015\", or simply \"placement\" .",
42258	//       "location": "query",
42259	//       "type": "string"
42260	//     },
42261	//     "siteIds": {
42262	//       "description": "Select only placements that are associated with these sites.",
42263	//       "format": "int64",
42264	//       "location": "query",
42265	//       "repeated": true,
42266	//       "type": "string"
42267	//     },
42268	//     "sizeIds": {
42269	//       "description": "Select only placements that are associated with these sizes.",
42270	//       "format": "int64",
42271	//       "location": "query",
42272	//       "repeated": true,
42273	//       "type": "string"
42274	//     },
42275	//     "sortField": {
42276	//       "default": "ID",
42277	//       "description": "Field by which to sort the list.",
42278	//       "enum": [
42279	//         "ID",
42280	//         "NAME"
42281	//       ],
42282	//       "enumDescriptions": [
42283	//         "",
42284	//         ""
42285	//       ],
42286	//       "location": "query",
42287	//       "type": "string"
42288	//     },
42289	//     "sortOrder": {
42290	//       "default": "ASCENDING",
42291	//       "description": "Order of sorted results.",
42292	//       "enum": [
42293	//         "ASCENDING",
42294	//         "DESCENDING"
42295	//       ],
42296	//       "enumDescriptions": [
42297	//         "",
42298	//         ""
42299	//       ],
42300	//       "location": "query",
42301	//       "type": "string"
42302	//     }
42303	//   },
42304	//   "path": "userprofiles/{profileId}/placements",
42305	//   "response": {
42306	//     "$ref": "PlacementsListResponse"
42307	//   },
42308	//   "scopes": [
42309	//     "https://www.googleapis.com/auth/dfatrafficking"
42310	//   ]
42311	// }
42312
42313}
42314
42315// Pages invokes f for each page of results.
42316// A non-nil error returned from f will halt the iteration.
42317// The provided context supersedes any context provided to the Context method.
42318func (c *PlacementsListCall) Pages(ctx context.Context, f func(*PlacementsListResponse) error) error {
42319	c.ctx_ = ctx
42320	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
42321	for {
42322		x, err := c.Do()
42323		if err != nil {
42324			return err
42325		}
42326		if err := f(x); err != nil {
42327			return err
42328		}
42329		if x.NextPageToken == "" {
42330			return nil
42331		}
42332		c.PageToken(x.NextPageToken)
42333	}
42334}
42335
42336// method id "dfareporting.placements.patch":
42337
42338type PlacementsPatchCall struct {
42339	s          *Service
42340	profileId  int64
42341	placement  *Placement
42342	urlParams_ gensupport.URLParams
42343	ctx_       context.Context
42344	header_    http.Header
42345}
42346
42347// Patch: Updates an existing placement. This method supports patch
42348// semantics.
42349//
42350// - id: Placement ID.
42351// - profileId: User profile ID associated with this request.
42352func (r *PlacementsService) Patch(profileId int64, id int64, placement *Placement) *PlacementsPatchCall {
42353	c := &PlacementsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42354	c.profileId = profileId
42355	c.urlParams_.Set("id", fmt.Sprint(id))
42356	c.placement = placement
42357	return c
42358}
42359
42360// Fields allows partial responses to be retrieved. See
42361// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42362// for more information.
42363func (c *PlacementsPatchCall) Fields(s ...googleapi.Field) *PlacementsPatchCall {
42364	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42365	return c
42366}
42367
42368// Context sets the context to be used in this call's Do method. Any
42369// pending HTTP request will be aborted if the provided context is
42370// canceled.
42371func (c *PlacementsPatchCall) Context(ctx context.Context) *PlacementsPatchCall {
42372	c.ctx_ = ctx
42373	return c
42374}
42375
42376// Header returns an http.Header that can be modified by the caller to
42377// add HTTP headers to the request.
42378func (c *PlacementsPatchCall) Header() http.Header {
42379	if c.header_ == nil {
42380		c.header_ = make(http.Header)
42381	}
42382	return c.header_
42383}
42384
42385func (c *PlacementsPatchCall) doRequest(alt string) (*http.Response, error) {
42386	reqHeaders := make(http.Header)
42387	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
42388	for k, v := range c.header_ {
42389		reqHeaders[k] = v
42390	}
42391	reqHeaders.Set("User-Agent", c.s.userAgent())
42392	var body io.Reader = nil
42393	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
42394	if err != nil {
42395		return nil, err
42396	}
42397	reqHeaders.Set("Content-Type", "application/json")
42398	c.urlParams_.Set("alt", alt)
42399	c.urlParams_.Set("prettyPrint", "false")
42400	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
42401	urls += "?" + c.urlParams_.Encode()
42402	req, err := http.NewRequest("PATCH", urls, body)
42403	if err != nil {
42404		return nil, err
42405	}
42406	req.Header = reqHeaders
42407	googleapi.Expand(req.URL, map[string]string{
42408		"profileId": strconv.FormatInt(c.profileId, 10),
42409	})
42410	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42411}
42412
42413// Do executes the "dfareporting.placements.patch" call.
42414// Exactly one of *Placement or error will be non-nil. Any non-2xx
42415// status code is an error. Response headers are in either
42416// *Placement.ServerResponse.Header or (if a response was returned at
42417// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
42418// to check whether the returned error was because
42419// http.StatusNotModified was returned.
42420func (c *PlacementsPatchCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
42421	gensupport.SetOptions(c.urlParams_, opts...)
42422	res, err := c.doRequest("json")
42423	if res != nil && res.StatusCode == http.StatusNotModified {
42424		if res.Body != nil {
42425			res.Body.Close()
42426		}
42427		return nil, &googleapi.Error{
42428			Code:   res.StatusCode,
42429			Header: res.Header,
42430		}
42431	}
42432	if err != nil {
42433		return nil, err
42434	}
42435	defer googleapi.CloseBody(res)
42436	if err := googleapi.CheckResponse(res); err != nil {
42437		return nil, err
42438	}
42439	ret := &Placement{
42440		ServerResponse: googleapi.ServerResponse{
42441			Header:         res.Header,
42442			HTTPStatusCode: res.StatusCode,
42443		},
42444	}
42445	target := &ret
42446	if err := gensupport.DecodeResponse(target, res); err != nil {
42447		return nil, err
42448	}
42449	return ret, nil
42450	// {
42451	//   "description": "Updates an existing placement. This method supports patch semantics.",
42452	//   "flatPath": "userprofiles/{profileId}/placements",
42453	//   "httpMethod": "PATCH",
42454	//   "id": "dfareporting.placements.patch",
42455	//   "parameterOrder": [
42456	//     "profileId",
42457	//     "id"
42458	//   ],
42459	//   "parameters": {
42460	//     "id": {
42461	//       "description": "Placement ID.",
42462	//       "format": "int64",
42463	//       "location": "query",
42464	//       "required": true,
42465	//       "type": "string"
42466	//     },
42467	//     "profileId": {
42468	//       "description": "User profile ID associated with this request.",
42469	//       "format": "int64",
42470	//       "location": "path",
42471	//       "required": true,
42472	//       "type": "string"
42473	//     }
42474	//   },
42475	//   "path": "userprofiles/{profileId}/placements",
42476	//   "request": {
42477	//     "$ref": "Placement"
42478	//   },
42479	//   "response": {
42480	//     "$ref": "Placement"
42481	//   },
42482	//   "scopes": [
42483	//     "https://www.googleapis.com/auth/dfatrafficking"
42484	//   ]
42485	// }
42486
42487}
42488
42489// method id "dfareporting.placements.update":
42490
42491type PlacementsUpdateCall struct {
42492	s          *Service
42493	profileId  int64
42494	placement  *Placement
42495	urlParams_ gensupport.URLParams
42496	ctx_       context.Context
42497	header_    http.Header
42498}
42499
42500// Update: Updates an existing placement.
42501//
42502// - profileId: User profile ID associated with this request.
42503func (r *PlacementsService) Update(profileId int64, placement *Placement) *PlacementsUpdateCall {
42504	c := &PlacementsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42505	c.profileId = profileId
42506	c.placement = placement
42507	return c
42508}
42509
42510// Fields allows partial responses to be retrieved. See
42511// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42512// for more information.
42513func (c *PlacementsUpdateCall) Fields(s ...googleapi.Field) *PlacementsUpdateCall {
42514	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42515	return c
42516}
42517
42518// Context sets the context to be used in this call's Do method. Any
42519// pending HTTP request will be aborted if the provided context is
42520// canceled.
42521func (c *PlacementsUpdateCall) Context(ctx context.Context) *PlacementsUpdateCall {
42522	c.ctx_ = ctx
42523	return c
42524}
42525
42526// Header returns an http.Header that can be modified by the caller to
42527// add HTTP headers to the request.
42528func (c *PlacementsUpdateCall) Header() http.Header {
42529	if c.header_ == nil {
42530		c.header_ = make(http.Header)
42531	}
42532	return c.header_
42533}
42534
42535func (c *PlacementsUpdateCall) doRequest(alt string) (*http.Response, error) {
42536	reqHeaders := make(http.Header)
42537	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
42538	for k, v := range c.header_ {
42539		reqHeaders[k] = v
42540	}
42541	reqHeaders.Set("User-Agent", c.s.userAgent())
42542	var body io.Reader = nil
42543	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
42544	if err != nil {
42545		return nil, err
42546	}
42547	reqHeaders.Set("Content-Type", "application/json")
42548	c.urlParams_.Set("alt", alt)
42549	c.urlParams_.Set("prettyPrint", "false")
42550	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
42551	urls += "?" + c.urlParams_.Encode()
42552	req, err := http.NewRequest("PUT", urls, body)
42553	if err != nil {
42554		return nil, err
42555	}
42556	req.Header = reqHeaders
42557	googleapi.Expand(req.URL, map[string]string{
42558		"profileId": strconv.FormatInt(c.profileId, 10),
42559	})
42560	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42561}
42562
42563// Do executes the "dfareporting.placements.update" call.
42564// Exactly one of *Placement or error will be non-nil. Any non-2xx
42565// status code is an error. Response headers are in either
42566// *Placement.ServerResponse.Header or (if a response was returned at
42567// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
42568// to check whether the returned error was because
42569// http.StatusNotModified was returned.
42570func (c *PlacementsUpdateCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
42571	gensupport.SetOptions(c.urlParams_, opts...)
42572	res, err := c.doRequest("json")
42573	if res != nil && res.StatusCode == http.StatusNotModified {
42574		if res.Body != nil {
42575			res.Body.Close()
42576		}
42577		return nil, &googleapi.Error{
42578			Code:   res.StatusCode,
42579			Header: res.Header,
42580		}
42581	}
42582	if err != nil {
42583		return nil, err
42584	}
42585	defer googleapi.CloseBody(res)
42586	if err := googleapi.CheckResponse(res); err != nil {
42587		return nil, err
42588	}
42589	ret := &Placement{
42590		ServerResponse: googleapi.ServerResponse{
42591			Header:         res.Header,
42592			HTTPStatusCode: res.StatusCode,
42593		},
42594	}
42595	target := &ret
42596	if err := gensupport.DecodeResponse(target, res); err != nil {
42597		return nil, err
42598	}
42599	return ret, nil
42600	// {
42601	//   "description": "Updates an existing placement.",
42602	//   "flatPath": "userprofiles/{profileId}/placements",
42603	//   "httpMethod": "PUT",
42604	//   "id": "dfareporting.placements.update",
42605	//   "parameterOrder": [
42606	//     "profileId"
42607	//   ],
42608	//   "parameters": {
42609	//     "profileId": {
42610	//       "description": "User profile ID associated with this request.",
42611	//       "format": "int64",
42612	//       "location": "path",
42613	//       "required": true,
42614	//       "type": "string"
42615	//     }
42616	//   },
42617	//   "path": "userprofiles/{profileId}/placements",
42618	//   "request": {
42619	//     "$ref": "Placement"
42620	//   },
42621	//   "response": {
42622	//     "$ref": "Placement"
42623	//   },
42624	//   "scopes": [
42625	//     "https://www.googleapis.com/auth/dfatrafficking"
42626	//   ]
42627	// }
42628
42629}
42630
42631// method id "dfareporting.platformTypes.get":
42632
42633type PlatformTypesGetCall struct {
42634	s            *Service
42635	profileId    int64
42636	id           int64
42637	urlParams_   gensupport.URLParams
42638	ifNoneMatch_ string
42639	ctx_         context.Context
42640	header_      http.Header
42641}
42642
42643// Get: Gets one platform type by ID.
42644//
42645// - id: Platform type ID.
42646// - profileId: User profile ID associated with this request.
42647func (r *PlatformTypesService) Get(profileId int64, id int64) *PlatformTypesGetCall {
42648	c := &PlatformTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42649	c.profileId = profileId
42650	c.id = id
42651	return c
42652}
42653
42654// Fields allows partial responses to be retrieved. See
42655// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42656// for more information.
42657func (c *PlatformTypesGetCall) Fields(s ...googleapi.Field) *PlatformTypesGetCall {
42658	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42659	return c
42660}
42661
42662// IfNoneMatch sets the optional parameter which makes the operation
42663// fail if the object's ETag matches the given value. This is useful for
42664// getting updates only after the object has changed since the last
42665// request. Use googleapi.IsNotModified to check whether the response
42666// error from Do is the result of In-None-Match.
42667func (c *PlatformTypesGetCall) IfNoneMatch(entityTag string) *PlatformTypesGetCall {
42668	c.ifNoneMatch_ = entityTag
42669	return c
42670}
42671
42672// Context sets the context to be used in this call's Do method. Any
42673// pending HTTP request will be aborted if the provided context is
42674// canceled.
42675func (c *PlatformTypesGetCall) Context(ctx context.Context) *PlatformTypesGetCall {
42676	c.ctx_ = ctx
42677	return c
42678}
42679
42680// Header returns an http.Header that can be modified by the caller to
42681// add HTTP headers to the request.
42682func (c *PlatformTypesGetCall) Header() http.Header {
42683	if c.header_ == nil {
42684		c.header_ = make(http.Header)
42685	}
42686	return c.header_
42687}
42688
42689func (c *PlatformTypesGetCall) doRequest(alt string) (*http.Response, error) {
42690	reqHeaders := make(http.Header)
42691	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
42692	for k, v := range c.header_ {
42693		reqHeaders[k] = v
42694	}
42695	reqHeaders.Set("User-Agent", c.s.userAgent())
42696	if c.ifNoneMatch_ != "" {
42697		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42698	}
42699	var body io.Reader = nil
42700	c.urlParams_.Set("alt", alt)
42701	c.urlParams_.Set("prettyPrint", "false")
42702	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes/{id}")
42703	urls += "?" + c.urlParams_.Encode()
42704	req, err := http.NewRequest("GET", urls, body)
42705	if err != nil {
42706		return nil, err
42707	}
42708	req.Header = reqHeaders
42709	googleapi.Expand(req.URL, map[string]string{
42710		"profileId": strconv.FormatInt(c.profileId, 10),
42711		"id":        strconv.FormatInt(c.id, 10),
42712	})
42713	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42714}
42715
42716// Do executes the "dfareporting.platformTypes.get" call.
42717// Exactly one of *PlatformType or error will be non-nil. Any non-2xx
42718// status code is an error. Response headers are in either
42719// *PlatformType.ServerResponse.Header or (if a response was returned at
42720// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
42721// to check whether the returned error was because
42722// http.StatusNotModified was returned.
42723func (c *PlatformTypesGetCall) Do(opts ...googleapi.CallOption) (*PlatformType, error) {
42724	gensupport.SetOptions(c.urlParams_, opts...)
42725	res, err := c.doRequest("json")
42726	if res != nil && res.StatusCode == http.StatusNotModified {
42727		if res.Body != nil {
42728			res.Body.Close()
42729		}
42730		return nil, &googleapi.Error{
42731			Code:   res.StatusCode,
42732			Header: res.Header,
42733		}
42734	}
42735	if err != nil {
42736		return nil, err
42737	}
42738	defer googleapi.CloseBody(res)
42739	if err := googleapi.CheckResponse(res); err != nil {
42740		return nil, err
42741	}
42742	ret := &PlatformType{
42743		ServerResponse: googleapi.ServerResponse{
42744			Header:         res.Header,
42745			HTTPStatusCode: res.StatusCode,
42746		},
42747	}
42748	target := &ret
42749	if err := gensupport.DecodeResponse(target, res); err != nil {
42750		return nil, err
42751	}
42752	return ret, nil
42753	// {
42754	//   "description": "Gets one platform type by ID.",
42755	//   "flatPath": "userprofiles/{profileId}/platformTypes/{id}",
42756	//   "httpMethod": "GET",
42757	//   "id": "dfareporting.platformTypes.get",
42758	//   "parameterOrder": [
42759	//     "profileId",
42760	//     "id"
42761	//   ],
42762	//   "parameters": {
42763	//     "id": {
42764	//       "description": "Platform type ID.",
42765	//       "format": "int64",
42766	//       "location": "path",
42767	//       "required": true,
42768	//       "type": "string"
42769	//     },
42770	//     "profileId": {
42771	//       "description": "User profile ID associated with this request.",
42772	//       "format": "int64",
42773	//       "location": "path",
42774	//       "required": true,
42775	//       "type": "string"
42776	//     }
42777	//   },
42778	//   "path": "userprofiles/{profileId}/platformTypes/{id}",
42779	//   "response": {
42780	//     "$ref": "PlatformType"
42781	//   },
42782	//   "scopes": [
42783	//     "https://www.googleapis.com/auth/dfatrafficking"
42784	//   ]
42785	// }
42786
42787}
42788
42789// method id "dfareporting.platformTypes.list":
42790
42791type PlatformTypesListCall struct {
42792	s            *Service
42793	profileId    int64
42794	urlParams_   gensupport.URLParams
42795	ifNoneMatch_ string
42796	ctx_         context.Context
42797	header_      http.Header
42798}
42799
42800// List: Retrieves a list of platform types.
42801//
42802// - profileId: User profile ID associated with this request.
42803func (r *PlatformTypesService) List(profileId int64) *PlatformTypesListCall {
42804	c := &PlatformTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42805	c.profileId = profileId
42806	return c
42807}
42808
42809// Fields allows partial responses to be retrieved. See
42810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42811// for more information.
42812func (c *PlatformTypesListCall) Fields(s ...googleapi.Field) *PlatformTypesListCall {
42813	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42814	return c
42815}
42816
42817// IfNoneMatch sets the optional parameter which makes the operation
42818// fail if the object's ETag matches the given value. This is useful for
42819// getting updates only after the object has changed since the last
42820// request. Use googleapi.IsNotModified to check whether the response
42821// error from Do is the result of In-None-Match.
42822func (c *PlatformTypesListCall) IfNoneMatch(entityTag string) *PlatformTypesListCall {
42823	c.ifNoneMatch_ = entityTag
42824	return c
42825}
42826
42827// Context sets the context to be used in this call's Do method. Any
42828// pending HTTP request will be aborted if the provided context is
42829// canceled.
42830func (c *PlatformTypesListCall) Context(ctx context.Context) *PlatformTypesListCall {
42831	c.ctx_ = ctx
42832	return c
42833}
42834
42835// Header returns an http.Header that can be modified by the caller to
42836// add HTTP headers to the request.
42837func (c *PlatformTypesListCall) Header() http.Header {
42838	if c.header_ == nil {
42839		c.header_ = make(http.Header)
42840	}
42841	return c.header_
42842}
42843
42844func (c *PlatformTypesListCall) doRequest(alt string) (*http.Response, error) {
42845	reqHeaders := make(http.Header)
42846	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
42847	for k, v := range c.header_ {
42848		reqHeaders[k] = v
42849	}
42850	reqHeaders.Set("User-Agent", c.s.userAgent())
42851	if c.ifNoneMatch_ != "" {
42852		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42853	}
42854	var body io.Reader = nil
42855	c.urlParams_.Set("alt", alt)
42856	c.urlParams_.Set("prettyPrint", "false")
42857	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes")
42858	urls += "?" + c.urlParams_.Encode()
42859	req, err := http.NewRequest("GET", urls, body)
42860	if err != nil {
42861		return nil, err
42862	}
42863	req.Header = reqHeaders
42864	googleapi.Expand(req.URL, map[string]string{
42865		"profileId": strconv.FormatInt(c.profileId, 10),
42866	})
42867	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42868}
42869
42870// Do executes the "dfareporting.platformTypes.list" call.
42871// Exactly one of *PlatformTypesListResponse or error will be non-nil.
42872// Any non-2xx status code is an error. Response headers are in either
42873// *PlatformTypesListResponse.ServerResponse.Header or (if a response
42874// was returned at all) in error.(*googleapi.Error).Header. Use
42875// googleapi.IsNotModified to check whether the returned error was
42876// because http.StatusNotModified was returned.
42877func (c *PlatformTypesListCall) Do(opts ...googleapi.CallOption) (*PlatformTypesListResponse, error) {
42878	gensupport.SetOptions(c.urlParams_, opts...)
42879	res, err := c.doRequest("json")
42880	if res != nil && res.StatusCode == http.StatusNotModified {
42881		if res.Body != nil {
42882			res.Body.Close()
42883		}
42884		return nil, &googleapi.Error{
42885			Code:   res.StatusCode,
42886			Header: res.Header,
42887		}
42888	}
42889	if err != nil {
42890		return nil, err
42891	}
42892	defer googleapi.CloseBody(res)
42893	if err := googleapi.CheckResponse(res); err != nil {
42894		return nil, err
42895	}
42896	ret := &PlatformTypesListResponse{
42897		ServerResponse: googleapi.ServerResponse{
42898			Header:         res.Header,
42899			HTTPStatusCode: res.StatusCode,
42900		},
42901	}
42902	target := &ret
42903	if err := gensupport.DecodeResponse(target, res); err != nil {
42904		return nil, err
42905	}
42906	return ret, nil
42907	// {
42908	//   "description": "Retrieves a list of platform types.",
42909	//   "flatPath": "userprofiles/{profileId}/platformTypes",
42910	//   "httpMethod": "GET",
42911	//   "id": "dfareporting.platformTypes.list",
42912	//   "parameterOrder": [
42913	//     "profileId"
42914	//   ],
42915	//   "parameters": {
42916	//     "profileId": {
42917	//       "description": "User profile ID associated with this request.",
42918	//       "format": "int64",
42919	//       "location": "path",
42920	//       "required": true,
42921	//       "type": "string"
42922	//     }
42923	//   },
42924	//   "path": "userprofiles/{profileId}/platformTypes",
42925	//   "response": {
42926	//     "$ref": "PlatformTypesListResponse"
42927	//   },
42928	//   "scopes": [
42929	//     "https://www.googleapis.com/auth/dfatrafficking"
42930	//   ]
42931	// }
42932
42933}
42934
42935// method id "dfareporting.postalCodes.get":
42936
42937type PostalCodesGetCall struct {
42938	s            *Service
42939	profileId    int64
42940	code         string
42941	urlParams_   gensupport.URLParams
42942	ifNoneMatch_ string
42943	ctx_         context.Context
42944	header_      http.Header
42945}
42946
42947// Get: Gets one postal code by ID.
42948//
42949// - code: Postal code ID.
42950// - profileId: User profile ID associated with this request.
42951func (r *PostalCodesService) Get(profileId int64, code string) *PostalCodesGetCall {
42952	c := &PostalCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42953	c.profileId = profileId
42954	c.code = code
42955	return c
42956}
42957
42958// Fields allows partial responses to be retrieved. See
42959// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42960// for more information.
42961func (c *PostalCodesGetCall) Fields(s ...googleapi.Field) *PostalCodesGetCall {
42962	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42963	return c
42964}
42965
42966// IfNoneMatch sets the optional parameter which makes the operation
42967// fail if the object's ETag matches the given value. This is useful for
42968// getting updates only after the object has changed since the last
42969// request. Use googleapi.IsNotModified to check whether the response
42970// error from Do is the result of In-None-Match.
42971func (c *PostalCodesGetCall) IfNoneMatch(entityTag string) *PostalCodesGetCall {
42972	c.ifNoneMatch_ = entityTag
42973	return c
42974}
42975
42976// Context sets the context to be used in this call's Do method. Any
42977// pending HTTP request will be aborted if the provided context is
42978// canceled.
42979func (c *PostalCodesGetCall) Context(ctx context.Context) *PostalCodesGetCall {
42980	c.ctx_ = ctx
42981	return c
42982}
42983
42984// Header returns an http.Header that can be modified by the caller to
42985// add HTTP headers to the request.
42986func (c *PostalCodesGetCall) Header() http.Header {
42987	if c.header_ == nil {
42988		c.header_ = make(http.Header)
42989	}
42990	return c.header_
42991}
42992
42993func (c *PostalCodesGetCall) doRequest(alt string) (*http.Response, error) {
42994	reqHeaders := make(http.Header)
42995	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
42996	for k, v := range c.header_ {
42997		reqHeaders[k] = v
42998	}
42999	reqHeaders.Set("User-Agent", c.s.userAgent())
43000	if c.ifNoneMatch_ != "" {
43001		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43002	}
43003	var body io.Reader = nil
43004	c.urlParams_.Set("alt", alt)
43005	c.urlParams_.Set("prettyPrint", "false")
43006	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes/{code}")
43007	urls += "?" + c.urlParams_.Encode()
43008	req, err := http.NewRequest("GET", urls, body)
43009	if err != nil {
43010		return nil, err
43011	}
43012	req.Header = reqHeaders
43013	googleapi.Expand(req.URL, map[string]string{
43014		"profileId": strconv.FormatInt(c.profileId, 10),
43015		"code":      c.code,
43016	})
43017	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43018}
43019
43020// Do executes the "dfareporting.postalCodes.get" call.
43021// Exactly one of *PostalCode or error will be non-nil. Any non-2xx
43022// status code is an error. Response headers are in either
43023// *PostalCode.ServerResponse.Header or (if a response was returned at
43024// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
43025// to check whether the returned error was because
43026// http.StatusNotModified was returned.
43027func (c *PostalCodesGetCall) Do(opts ...googleapi.CallOption) (*PostalCode, error) {
43028	gensupport.SetOptions(c.urlParams_, opts...)
43029	res, err := c.doRequest("json")
43030	if res != nil && res.StatusCode == http.StatusNotModified {
43031		if res.Body != nil {
43032			res.Body.Close()
43033		}
43034		return nil, &googleapi.Error{
43035			Code:   res.StatusCode,
43036			Header: res.Header,
43037		}
43038	}
43039	if err != nil {
43040		return nil, err
43041	}
43042	defer googleapi.CloseBody(res)
43043	if err := googleapi.CheckResponse(res); err != nil {
43044		return nil, err
43045	}
43046	ret := &PostalCode{
43047		ServerResponse: googleapi.ServerResponse{
43048			Header:         res.Header,
43049			HTTPStatusCode: res.StatusCode,
43050		},
43051	}
43052	target := &ret
43053	if err := gensupport.DecodeResponse(target, res); err != nil {
43054		return nil, err
43055	}
43056	return ret, nil
43057	// {
43058	//   "description": "Gets one postal code by ID.",
43059	//   "flatPath": "userprofiles/{profileId}/postalCodes/{code}",
43060	//   "httpMethod": "GET",
43061	//   "id": "dfareporting.postalCodes.get",
43062	//   "parameterOrder": [
43063	//     "profileId",
43064	//     "code"
43065	//   ],
43066	//   "parameters": {
43067	//     "code": {
43068	//       "description": "Postal code ID.",
43069	//       "location": "path",
43070	//       "required": true,
43071	//       "type": "string"
43072	//     },
43073	//     "profileId": {
43074	//       "description": "User profile ID associated with this request.",
43075	//       "format": "int64",
43076	//       "location": "path",
43077	//       "required": true,
43078	//       "type": "string"
43079	//     }
43080	//   },
43081	//   "path": "userprofiles/{profileId}/postalCodes/{code}",
43082	//   "response": {
43083	//     "$ref": "PostalCode"
43084	//   },
43085	//   "scopes": [
43086	//     "https://www.googleapis.com/auth/dfatrafficking"
43087	//   ]
43088	// }
43089
43090}
43091
43092// method id "dfareporting.postalCodes.list":
43093
43094type PostalCodesListCall struct {
43095	s            *Service
43096	profileId    int64
43097	urlParams_   gensupport.URLParams
43098	ifNoneMatch_ string
43099	ctx_         context.Context
43100	header_      http.Header
43101}
43102
43103// List: Retrieves a list of postal codes.
43104//
43105// - profileId: User profile ID associated with this request.
43106func (r *PostalCodesService) List(profileId int64) *PostalCodesListCall {
43107	c := &PostalCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43108	c.profileId = profileId
43109	return c
43110}
43111
43112// Fields allows partial responses to be retrieved. See
43113// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43114// for more information.
43115func (c *PostalCodesListCall) Fields(s ...googleapi.Field) *PostalCodesListCall {
43116	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43117	return c
43118}
43119
43120// IfNoneMatch sets the optional parameter which makes the operation
43121// fail if the object's ETag matches the given value. This is useful for
43122// getting updates only after the object has changed since the last
43123// request. Use googleapi.IsNotModified to check whether the response
43124// error from Do is the result of In-None-Match.
43125func (c *PostalCodesListCall) IfNoneMatch(entityTag string) *PostalCodesListCall {
43126	c.ifNoneMatch_ = entityTag
43127	return c
43128}
43129
43130// Context sets the context to be used in this call's Do method. Any
43131// pending HTTP request will be aborted if the provided context is
43132// canceled.
43133func (c *PostalCodesListCall) Context(ctx context.Context) *PostalCodesListCall {
43134	c.ctx_ = ctx
43135	return c
43136}
43137
43138// Header returns an http.Header that can be modified by the caller to
43139// add HTTP headers to the request.
43140func (c *PostalCodesListCall) Header() http.Header {
43141	if c.header_ == nil {
43142		c.header_ = make(http.Header)
43143	}
43144	return c.header_
43145}
43146
43147func (c *PostalCodesListCall) doRequest(alt string) (*http.Response, error) {
43148	reqHeaders := make(http.Header)
43149	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
43150	for k, v := range c.header_ {
43151		reqHeaders[k] = v
43152	}
43153	reqHeaders.Set("User-Agent", c.s.userAgent())
43154	if c.ifNoneMatch_ != "" {
43155		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43156	}
43157	var body io.Reader = nil
43158	c.urlParams_.Set("alt", alt)
43159	c.urlParams_.Set("prettyPrint", "false")
43160	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes")
43161	urls += "?" + c.urlParams_.Encode()
43162	req, err := http.NewRequest("GET", urls, body)
43163	if err != nil {
43164		return nil, err
43165	}
43166	req.Header = reqHeaders
43167	googleapi.Expand(req.URL, map[string]string{
43168		"profileId": strconv.FormatInt(c.profileId, 10),
43169	})
43170	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43171}
43172
43173// Do executes the "dfareporting.postalCodes.list" call.
43174// Exactly one of *PostalCodesListResponse or error will be non-nil. Any
43175// non-2xx status code is an error. Response headers are in either
43176// *PostalCodesListResponse.ServerResponse.Header or (if a response was
43177// returned at all) in error.(*googleapi.Error).Header. Use
43178// googleapi.IsNotModified to check whether the returned error was
43179// because http.StatusNotModified was returned.
43180func (c *PostalCodesListCall) Do(opts ...googleapi.CallOption) (*PostalCodesListResponse, error) {
43181	gensupport.SetOptions(c.urlParams_, opts...)
43182	res, err := c.doRequest("json")
43183	if res != nil && res.StatusCode == http.StatusNotModified {
43184		if res.Body != nil {
43185			res.Body.Close()
43186		}
43187		return nil, &googleapi.Error{
43188			Code:   res.StatusCode,
43189			Header: res.Header,
43190		}
43191	}
43192	if err != nil {
43193		return nil, err
43194	}
43195	defer googleapi.CloseBody(res)
43196	if err := googleapi.CheckResponse(res); err != nil {
43197		return nil, err
43198	}
43199	ret := &PostalCodesListResponse{
43200		ServerResponse: googleapi.ServerResponse{
43201			Header:         res.Header,
43202			HTTPStatusCode: res.StatusCode,
43203		},
43204	}
43205	target := &ret
43206	if err := gensupport.DecodeResponse(target, res); err != nil {
43207		return nil, err
43208	}
43209	return ret, nil
43210	// {
43211	//   "description": "Retrieves a list of postal codes.",
43212	//   "flatPath": "userprofiles/{profileId}/postalCodes",
43213	//   "httpMethod": "GET",
43214	//   "id": "dfareporting.postalCodes.list",
43215	//   "parameterOrder": [
43216	//     "profileId"
43217	//   ],
43218	//   "parameters": {
43219	//     "profileId": {
43220	//       "description": "User profile ID associated with this request.",
43221	//       "format": "int64",
43222	//       "location": "path",
43223	//       "required": true,
43224	//       "type": "string"
43225	//     }
43226	//   },
43227	//   "path": "userprofiles/{profileId}/postalCodes",
43228	//   "response": {
43229	//     "$ref": "PostalCodesListResponse"
43230	//   },
43231	//   "scopes": [
43232	//     "https://www.googleapis.com/auth/dfatrafficking"
43233	//   ]
43234	// }
43235
43236}
43237
43238// method id "dfareporting.projects.get":
43239
43240type ProjectsGetCall struct {
43241	s            *Service
43242	profileId    int64
43243	id           int64
43244	urlParams_   gensupport.URLParams
43245	ifNoneMatch_ string
43246	ctx_         context.Context
43247	header_      http.Header
43248}
43249
43250// Get: Gets one project by ID.
43251//
43252// - id: Project ID.
43253// - profileId: User profile ID associated with this request.
43254func (r *ProjectsService) Get(profileId int64, id int64) *ProjectsGetCall {
43255	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43256	c.profileId = profileId
43257	c.id = id
43258	return c
43259}
43260
43261// Fields allows partial responses to be retrieved. See
43262// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43263// for more information.
43264func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
43265	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43266	return c
43267}
43268
43269// IfNoneMatch sets the optional parameter which makes the operation
43270// fail if the object's ETag matches the given value. This is useful for
43271// getting updates only after the object has changed since the last
43272// request. Use googleapi.IsNotModified to check whether the response
43273// error from Do is the result of In-None-Match.
43274func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
43275	c.ifNoneMatch_ = entityTag
43276	return c
43277}
43278
43279// Context sets the context to be used in this call's Do method. Any
43280// pending HTTP request will be aborted if the provided context is
43281// canceled.
43282func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
43283	c.ctx_ = ctx
43284	return c
43285}
43286
43287// Header returns an http.Header that can be modified by the caller to
43288// add HTTP headers to the request.
43289func (c *ProjectsGetCall) Header() http.Header {
43290	if c.header_ == nil {
43291		c.header_ = make(http.Header)
43292	}
43293	return c.header_
43294}
43295
43296func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
43297	reqHeaders := make(http.Header)
43298	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
43299	for k, v := range c.header_ {
43300		reqHeaders[k] = v
43301	}
43302	reqHeaders.Set("User-Agent", c.s.userAgent())
43303	if c.ifNoneMatch_ != "" {
43304		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43305	}
43306	var body io.Reader = nil
43307	c.urlParams_.Set("alt", alt)
43308	c.urlParams_.Set("prettyPrint", "false")
43309	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{id}")
43310	urls += "?" + c.urlParams_.Encode()
43311	req, err := http.NewRequest("GET", urls, body)
43312	if err != nil {
43313		return nil, err
43314	}
43315	req.Header = reqHeaders
43316	googleapi.Expand(req.URL, map[string]string{
43317		"profileId": strconv.FormatInt(c.profileId, 10),
43318		"id":        strconv.FormatInt(c.id, 10),
43319	})
43320	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43321}
43322
43323// Do executes the "dfareporting.projects.get" call.
43324// Exactly one of *Project or error will be non-nil. Any non-2xx status
43325// code is an error. Response headers are in either
43326// *Project.ServerResponse.Header or (if a response was returned at all)
43327// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
43328// check whether the returned error was because http.StatusNotModified
43329// was returned.
43330func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
43331	gensupport.SetOptions(c.urlParams_, opts...)
43332	res, err := c.doRequest("json")
43333	if res != nil && res.StatusCode == http.StatusNotModified {
43334		if res.Body != nil {
43335			res.Body.Close()
43336		}
43337		return nil, &googleapi.Error{
43338			Code:   res.StatusCode,
43339			Header: res.Header,
43340		}
43341	}
43342	if err != nil {
43343		return nil, err
43344	}
43345	defer googleapi.CloseBody(res)
43346	if err := googleapi.CheckResponse(res); err != nil {
43347		return nil, err
43348	}
43349	ret := &Project{
43350		ServerResponse: googleapi.ServerResponse{
43351			Header:         res.Header,
43352			HTTPStatusCode: res.StatusCode,
43353		},
43354	}
43355	target := &ret
43356	if err := gensupport.DecodeResponse(target, res); err != nil {
43357		return nil, err
43358	}
43359	return ret, nil
43360	// {
43361	//   "description": "Gets one project by ID.",
43362	//   "flatPath": "userprofiles/{profileId}/projects/{id}",
43363	//   "httpMethod": "GET",
43364	//   "id": "dfareporting.projects.get",
43365	//   "parameterOrder": [
43366	//     "profileId",
43367	//     "id"
43368	//   ],
43369	//   "parameters": {
43370	//     "id": {
43371	//       "description": "Project ID.",
43372	//       "format": "int64",
43373	//       "location": "path",
43374	//       "required": true,
43375	//       "type": "string"
43376	//     },
43377	//     "profileId": {
43378	//       "description": "User profile ID associated with this request.",
43379	//       "format": "int64",
43380	//       "location": "path",
43381	//       "required": true,
43382	//       "type": "string"
43383	//     }
43384	//   },
43385	//   "path": "userprofiles/{profileId}/projects/{id}",
43386	//   "response": {
43387	//     "$ref": "Project"
43388	//   },
43389	//   "scopes": [
43390	//     "https://www.googleapis.com/auth/dfatrafficking"
43391	//   ]
43392	// }
43393
43394}
43395
43396// method id "dfareporting.projects.list":
43397
43398type ProjectsListCall struct {
43399	s            *Service
43400	profileId    int64
43401	urlParams_   gensupport.URLParams
43402	ifNoneMatch_ string
43403	ctx_         context.Context
43404	header_      http.Header
43405}
43406
43407// List: Retrieves a list of projects, possibly filtered. This method
43408// supports paging .
43409//
43410// - profileId: User profile ID associated with this request.
43411func (r *ProjectsService) List(profileId int64) *ProjectsListCall {
43412	c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43413	c.profileId = profileId
43414	return c
43415}
43416
43417// AdvertiserIds sets the optional parameter "advertiserIds": Select
43418// only projects with these advertiser IDs.
43419func (c *ProjectsListCall) AdvertiserIds(advertiserIds ...int64) *ProjectsListCall {
43420	var advertiserIds_ []string
43421	for _, v := range advertiserIds {
43422		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
43423	}
43424	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
43425	return c
43426}
43427
43428// Ids sets the optional parameter "ids": Select only projects with
43429// these IDs.
43430func (c *ProjectsListCall) Ids(ids ...int64) *ProjectsListCall {
43431	var ids_ []string
43432	for _, v := range ids {
43433		ids_ = append(ids_, fmt.Sprint(v))
43434	}
43435	c.urlParams_.SetMulti("ids", ids_)
43436	return c
43437}
43438
43439// MaxResults sets the optional parameter "maxResults": Maximum number
43440// of results to return.
43441func (c *ProjectsListCall) MaxResults(maxResults int64) *ProjectsListCall {
43442	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
43443	return c
43444}
43445
43446// PageToken sets the optional parameter "pageToken": Value of the
43447// nextPageToken from the previous result page.
43448func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall {
43449	c.urlParams_.Set("pageToken", pageToken)
43450	return c
43451}
43452
43453// SearchString sets the optional parameter "searchString": Allows
43454// searching for projects by name or ID. Wildcards (*) are allowed. For
43455// example, "project*2015" will return projects with names like "project
43456// June 2015", "project April 2015", or simply "project 2015". Most of
43457// the searches also add wildcards implicitly at the start and the end
43458// of the search string. For example, a search string of "project" will
43459// match projects with name "my project", "project 2015", or simply
43460// "project".
43461func (c *ProjectsListCall) SearchString(searchString string) *ProjectsListCall {
43462	c.urlParams_.Set("searchString", searchString)
43463	return c
43464}
43465
43466// SortField sets the optional parameter "sortField": Field by which to
43467// sort the list.
43468//
43469// Possible values:
43470//   "ID" (default)
43471//   "NAME"
43472func (c *ProjectsListCall) SortField(sortField string) *ProjectsListCall {
43473	c.urlParams_.Set("sortField", sortField)
43474	return c
43475}
43476
43477// SortOrder sets the optional parameter "sortOrder": Order of sorted
43478// results.
43479//
43480// Possible values:
43481//   "ASCENDING" (default)
43482//   "DESCENDING"
43483func (c *ProjectsListCall) SortOrder(sortOrder string) *ProjectsListCall {
43484	c.urlParams_.Set("sortOrder", sortOrder)
43485	return c
43486}
43487
43488// Fields allows partial responses to be retrieved. See
43489// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43490// for more information.
43491func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall {
43492	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43493	return c
43494}
43495
43496// IfNoneMatch sets the optional parameter which makes the operation
43497// fail if the object's ETag matches the given value. This is useful for
43498// getting updates only after the object has changed since the last
43499// request. Use googleapi.IsNotModified to check whether the response
43500// error from Do is the result of In-None-Match.
43501func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall {
43502	c.ifNoneMatch_ = entityTag
43503	return c
43504}
43505
43506// Context sets the context to be used in this call's Do method. Any
43507// pending HTTP request will be aborted if the provided context is
43508// canceled.
43509func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
43510	c.ctx_ = ctx
43511	return c
43512}
43513
43514// Header returns an http.Header that can be modified by the caller to
43515// add HTTP headers to the request.
43516func (c *ProjectsListCall) Header() http.Header {
43517	if c.header_ == nil {
43518		c.header_ = make(http.Header)
43519	}
43520	return c.header_
43521}
43522
43523func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
43524	reqHeaders := make(http.Header)
43525	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
43526	for k, v := range c.header_ {
43527		reqHeaders[k] = v
43528	}
43529	reqHeaders.Set("User-Agent", c.s.userAgent())
43530	if c.ifNoneMatch_ != "" {
43531		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43532	}
43533	var body io.Reader = nil
43534	c.urlParams_.Set("alt", alt)
43535	c.urlParams_.Set("prettyPrint", "false")
43536	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects")
43537	urls += "?" + c.urlParams_.Encode()
43538	req, err := http.NewRequest("GET", urls, body)
43539	if err != nil {
43540		return nil, err
43541	}
43542	req.Header = reqHeaders
43543	googleapi.Expand(req.URL, map[string]string{
43544		"profileId": strconv.FormatInt(c.profileId, 10),
43545	})
43546	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43547}
43548
43549// Do executes the "dfareporting.projects.list" call.
43550// Exactly one of *ProjectsListResponse or error will be non-nil. Any
43551// non-2xx status code is an error. Response headers are in either
43552// *ProjectsListResponse.ServerResponse.Header or (if a response was
43553// returned at all) in error.(*googleapi.Error).Header. Use
43554// googleapi.IsNotModified to check whether the returned error was
43555// because http.StatusNotModified was returned.
43556func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ProjectsListResponse, error) {
43557	gensupport.SetOptions(c.urlParams_, opts...)
43558	res, err := c.doRequest("json")
43559	if res != nil && res.StatusCode == http.StatusNotModified {
43560		if res.Body != nil {
43561			res.Body.Close()
43562		}
43563		return nil, &googleapi.Error{
43564			Code:   res.StatusCode,
43565			Header: res.Header,
43566		}
43567	}
43568	if err != nil {
43569		return nil, err
43570	}
43571	defer googleapi.CloseBody(res)
43572	if err := googleapi.CheckResponse(res); err != nil {
43573		return nil, err
43574	}
43575	ret := &ProjectsListResponse{
43576		ServerResponse: googleapi.ServerResponse{
43577			Header:         res.Header,
43578			HTTPStatusCode: res.StatusCode,
43579		},
43580	}
43581	target := &ret
43582	if err := gensupport.DecodeResponse(target, res); err != nil {
43583		return nil, err
43584	}
43585	return ret, nil
43586	// {
43587	//   "description": "Retrieves a list of projects, possibly filtered. This method supports paging .",
43588	//   "flatPath": "userprofiles/{profileId}/projects",
43589	//   "httpMethod": "GET",
43590	//   "id": "dfareporting.projects.list",
43591	//   "parameterOrder": [
43592	//     "profileId"
43593	//   ],
43594	//   "parameters": {
43595	//     "advertiserIds": {
43596	//       "description": "Select only projects with these advertiser IDs.",
43597	//       "format": "int64",
43598	//       "location": "query",
43599	//       "repeated": true,
43600	//       "type": "string"
43601	//     },
43602	//     "ids": {
43603	//       "description": "Select only projects with these IDs.",
43604	//       "format": "int64",
43605	//       "location": "query",
43606	//       "repeated": true,
43607	//       "type": "string"
43608	//     },
43609	//     "maxResults": {
43610	//       "default": "1000",
43611	//       "description": "Maximum number of results to return.",
43612	//       "format": "int32",
43613	//       "location": "query",
43614	//       "maximum": "1000",
43615	//       "minimum": "0",
43616	//       "type": "integer"
43617	//     },
43618	//     "pageToken": {
43619	//       "description": "Value of the nextPageToken from the previous result page.",
43620	//       "location": "query",
43621	//       "type": "string"
43622	//     },
43623	//     "profileId": {
43624	//       "description": "User profile ID associated with this request.",
43625	//       "format": "int64",
43626	//       "location": "path",
43627	//       "required": true,
43628	//       "type": "string"
43629	//     },
43630	//     "searchString": {
43631	//       "description": "Allows searching for projects by name or ID. Wildcards (*) are allowed. For example, \"project*2015\" will return projects with names like \"project June 2015\", \"project April 2015\", or simply \"project 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"project\" will match projects with name \"my project\", \"project 2015\", or simply \"project\".",
43632	//       "location": "query",
43633	//       "type": "string"
43634	//     },
43635	//     "sortField": {
43636	//       "default": "ID",
43637	//       "description": "Field by which to sort the list.",
43638	//       "enum": [
43639	//         "ID",
43640	//         "NAME"
43641	//       ],
43642	//       "enumDescriptions": [
43643	//         "",
43644	//         ""
43645	//       ],
43646	//       "location": "query",
43647	//       "type": "string"
43648	//     },
43649	//     "sortOrder": {
43650	//       "default": "ASCENDING",
43651	//       "description": "Order of sorted results.",
43652	//       "enum": [
43653	//         "ASCENDING",
43654	//         "DESCENDING"
43655	//       ],
43656	//       "enumDescriptions": [
43657	//         "",
43658	//         ""
43659	//       ],
43660	//       "location": "query",
43661	//       "type": "string"
43662	//     }
43663	//   },
43664	//   "path": "userprofiles/{profileId}/projects",
43665	//   "response": {
43666	//     "$ref": "ProjectsListResponse"
43667	//   },
43668	//   "scopes": [
43669	//     "https://www.googleapis.com/auth/dfatrafficking"
43670	//   ]
43671	// }
43672
43673}
43674
43675// Pages invokes f for each page of results.
43676// A non-nil error returned from f will halt the iteration.
43677// The provided context supersedes any context provided to the Context method.
43678func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ProjectsListResponse) error) error {
43679	c.ctx_ = ctx
43680	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
43681	for {
43682		x, err := c.Do()
43683		if err != nil {
43684			return err
43685		}
43686		if err := f(x); err != nil {
43687			return err
43688		}
43689		if x.NextPageToken == "" {
43690			return nil
43691		}
43692		c.PageToken(x.NextPageToken)
43693	}
43694}
43695
43696// method id "dfareporting.regions.list":
43697
43698type RegionsListCall struct {
43699	s            *Service
43700	profileId    int64
43701	urlParams_   gensupport.URLParams
43702	ifNoneMatch_ string
43703	ctx_         context.Context
43704	header_      http.Header
43705}
43706
43707// List: Retrieves a list of regions.
43708//
43709// - profileId: User profile ID associated with this request.
43710func (r *RegionsService) List(profileId int64) *RegionsListCall {
43711	c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43712	c.profileId = profileId
43713	return c
43714}
43715
43716// Fields allows partial responses to be retrieved. See
43717// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43718// for more information.
43719func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall {
43720	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43721	return c
43722}
43723
43724// IfNoneMatch sets the optional parameter which makes the operation
43725// fail if the object's ETag matches the given value. This is useful for
43726// getting updates only after the object has changed since the last
43727// request. Use googleapi.IsNotModified to check whether the response
43728// error from Do is the result of In-None-Match.
43729func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall {
43730	c.ifNoneMatch_ = entityTag
43731	return c
43732}
43733
43734// Context sets the context to be used in this call's Do method. Any
43735// pending HTTP request will be aborted if the provided context is
43736// canceled.
43737func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
43738	c.ctx_ = ctx
43739	return c
43740}
43741
43742// Header returns an http.Header that can be modified by the caller to
43743// add HTTP headers to the request.
43744func (c *RegionsListCall) Header() http.Header {
43745	if c.header_ == nil {
43746		c.header_ = make(http.Header)
43747	}
43748	return c.header_
43749}
43750
43751func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
43752	reqHeaders := make(http.Header)
43753	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
43754	for k, v := range c.header_ {
43755		reqHeaders[k] = v
43756	}
43757	reqHeaders.Set("User-Agent", c.s.userAgent())
43758	if c.ifNoneMatch_ != "" {
43759		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43760	}
43761	var body io.Reader = nil
43762	c.urlParams_.Set("alt", alt)
43763	c.urlParams_.Set("prettyPrint", "false")
43764	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/regions")
43765	urls += "?" + c.urlParams_.Encode()
43766	req, err := http.NewRequest("GET", urls, body)
43767	if err != nil {
43768		return nil, err
43769	}
43770	req.Header = reqHeaders
43771	googleapi.Expand(req.URL, map[string]string{
43772		"profileId": strconv.FormatInt(c.profileId, 10),
43773	})
43774	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43775}
43776
43777// Do executes the "dfareporting.regions.list" call.
43778// Exactly one of *RegionsListResponse or error will be non-nil. Any
43779// non-2xx status code is an error. Response headers are in either
43780// *RegionsListResponse.ServerResponse.Header or (if a response was
43781// returned at all) in error.(*googleapi.Error).Header. Use
43782// googleapi.IsNotModified to check whether the returned error was
43783// because http.StatusNotModified was returned.
43784func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionsListResponse, error) {
43785	gensupport.SetOptions(c.urlParams_, opts...)
43786	res, err := c.doRequest("json")
43787	if res != nil && res.StatusCode == http.StatusNotModified {
43788		if res.Body != nil {
43789			res.Body.Close()
43790		}
43791		return nil, &googleapi.Error{
43792			Code:   res.StatusCode,
43793			Header: res.Header,
43794		}
43795	}
43796	if err != nil {
43797		return nil, err
43798	}
43799	defer googleapi.CloseBody(res)
43800	if err := googleapi.CheckResponse(res); err != nil {
43801		return nil, err
43802	}
43803	ret := &RegionsListResponse{
43804		ServerResponse: googleapi.ServerResponse{
43805			Header:         res.Header,
43806			HTTPStatusCode: res.StatusCode,
43807		},
43808	}
43809	target := &ret
43810	if err := gensupport.DecodeResponse(target, res); err != nil {
43811		return nil, err
43812	}
43813	return ret, nil
43814	// {
43815	//   "description": "Retrieves a list of regions.",
43816	//   "flatPath": "userprofiles/{profileId}/regions",
43817	//   "httpMethod": "GET",
43818	//   "id": "dfareporting.regions.list",
43819	//   "parameterOrder": [
43820	//     "profileId"
43821	//   ],
43822	//   "parameters": {
43823	//     "profileId": {
43824	//       "description": "User profile ID associated with this request.",
43825	//       "format": "int64",
43826	//       "location": "path",
43827	//       "required": true,
43828	//       "type": "string"
43829	//     }
43830	//   },
43831	//   "path": "userprofiles/{profileId}/regions",
43832	//   "response": {
43833	//     "$ref": "RegionsListResponse"
43834	//   },
43835	//   "scopes": [
43836	//     "https://www.googleapis.com/auth/dfatrafficking"
43837	//   ]
43838	// }
43839
43840}
43841
43842// method id "dfareporting.remarketingListShares.get":
43843
43844type RemarketingListSharesGetCall struct {
43845	s                 *Service
43846	profileId         int64
43847	remarketingListId int64
43848	urlParams_        gensupport.URLParams
43849	ifNoneMatch_      string
43850	ctx_              context.Context
43851	header_           http.Header
43852}
43853
43854// Get: Gets one remarketing list share by remarketing list ID.
43855//
43856// - profileId: User profile ID associated with this request.
43857// - remarketingListId: Remarketing list ID.
43858func (r *RemarketingListSharesService) Get(profileId int64, remarketingListId int64) *RemarketingListSharesGetCall {
43859	c := &RemarketingListSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43860	c.profileId = profileId
43861	c.remarketingListId = remarketingListId
43862	return c
43863}
43864
43865// Fields allows partial responses to be retrieved. See
43866// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43867// for more information.
43868func (c *RemarketingListSharesGetCall) Fields(s ...googleapi.Field) *RemarketingListSharesGetCall {
43869	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43870	return c
43871}
43872
43873// IfNoneMatch sets the optional parameter which makes the operation
43874// fail if the object's ETag matches the given value. This is useful for
43875// getting updates only after the object has changed since the last
43876// request. Use googleapi.IsNotModified to check whether the response
43877// error from Do is the result of In-None-Match.
43878func (c *RemarketingListSharesGetCall) IfNoneMatch(entityTag string) *RemarketingListSharesGetCall {
43879	c.ifNoneMatch_ = entityTag
43880	return c
43881}
43882
43883// Context sets the context to be used in this call's Do method. Any
43884// pending HTTP request will be aborted if the provided context is
43885// canceled.
43886func (c *RemarketingListSharesGetCall) Context(ctx context.Context) *RemarketingListSharesGetCall {
43887	c.ctx_ = ctx
43888	return c
43889}
43890
43891// Header returns an http.Header that can be modified by the caller to
43892// add HTTP headers to the request.
43893func (c *RemarketingListSharesGetCall) Header() http.Header {
43894	if c.header_ == nil {
43895		c.header_ = make(http.Header)
43896	}
43897	return c.header_
43898}
43899
43900func (c *RemarketingListSharesGetCall) doRequest(alt string) (*http.Response, error) {
43901	reqHeaders := make(http.Header)
43902	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
43903	for k, v := range c.header_ {
43904		reqHeaders[k] = v
43905	}
43906	reqHeaders.Set("User-Agent", c.s.userAgent())
43907	if c.ifNoneMatch_ != "" {
43908		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43909	}
43910	var body io.Reader = nil
43911	c.urlParams_.Set("alt", alt)
43912	c.urlParams_.Set("prettyPrint", "false")
43913	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares/{remarketingListId}")
43914	urls += "?" + c.urlParams_.Encode()
43915	req, err := http.NewRequest("GET", urls, body)
43916	if err != nil {
43917		return nil, err
43918	}
43919	req.Header = reqHeaders
43920	googleapi.Expand(req.URL, map[string]string{
43921		"profileId":         strconv.FormatInt(c.profileId, 10),
43922		"remarketingListId": strconv.FormatInt(c.remarketingListId, 10),
43923	})
43924	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43925}
43926
43927// Do executes the "dfareporting.remarketingListShares.get" call.
43928// Exactly one of *RemarketingListShare or error will be non-nil. Any
43929// non-2xx status code is an error. Response headers are in either
43930// *RemarketingListShare.ServerResponse.Header or (if a response was
43931// returned at all) in error.(*googleapi.Error).Header. Use
43932// googleapi.IsNotModified to check whether the returned error was
43933// because http.StatusNotModified was returned.
43934func (c *RemarketingListSharesGetCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
43935	gensupport.SetOptions(c.urlParams_, opts...)
43936	res, err := c.doRequest("json")
43937	if res != nil && res.StatusCode == http.StatusNotModified {
43938		if res.Body != nil {
43939			res.Body.Close()
43940		}
43941		return nil, &googleapi.Error{
43942			Code:   res.StatusCode,
43943			Header: res.Header,
43944		}
43945	}
43946	if err != nil {
43947		return nil, err
43948	}
43949	defer googleapi.CloseBody(res)
43950	if err := googleapi.CheckResponse(res); err != nil {
43951		return nil, err
43952	}
43953	ret := &RemarketingListShare{
43954		ServerResponse: googleapi.ServerResponse{
43955			Header:         res.Header,
43956			HTTPStatusCode: res.StatusCode,
43957		},
43958	}
43959	target := &ret
43960	if err := gensupport.DecodeResponse(target, res); err != nil {
43961		return nil, err
43962	}
43963	return ret, nil
43964	// {
43965	//   "description": "Gets one remarketing list share by remarketing list ID.",
43966	//   "flatPath": "userprofiles/{profileId}/remarketingListShares/{remarketingListId}",
43967	//   "httpMethod": "GET",
43968	//   "id": "dfareporting.remarketingListShares.get",
43969	//   "parameterOrder": [
43970	//     "profileId",
43971	//     "remarketingListId"
43972	//   ],
43973	//   "parameters": {
43974	//     "profileId": {
43975	//       "description": "User profile ID associated with this request.",
43976	//       "format": "int64",
43977	//       "location": "path",
43978	//       "required": true,
43979	//       "type": "string"
43980	//     },
43981	//     "remarketingListId": {
43982	//       "description": "Remarketing list ID.",
43983	//       "format": "int64",
43984	//       "location": "path",
43985	//       "required": true,
43986	//       "type": "string"
43987	//     }
43988	//   },
43989	//   "path": "userprofiles/{profileId}/remarketingListShares/{remarketingListId}",
43990	//   "response": {
43991	//     "$ref": "RemarketingListShare"
43992	//   },
43993	//   "scopes": [
43994	//     "https://www.googleapis.com/auth/dfatrafficking"
43995	//   ]
43996	// }
43997
43998}
43999
44000// method id "dfareporting.remarketingListShares.patch":
44001
44002type RemarketingListSharesPatchCall struct {
44003	s                    *Service
44004	profileId            int64
44005	remarketinglistshare *RemarketingListShare
44006	urlParams_           gensupport.URLParams
44007	ctx_                 context.Context
44008	header_              http.Header
44009}
44010
44011// Patch: Updates an existing remarketing list share. This method
44012// supports patch semantics.
44013//
44014// - id: RemarketingList ID.
44015// - profileId: User profile ID associated with this request.
44016func (r *RemarketingListSharesService) Patch(profileId int64, id int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesPatchCall {
44017	c := &RemarketingListSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44018	c.profileId = profileId
44019	c.urlParams_.Set("id", fmt.Sprint(id))
44020	c.remarketinglistshare = remarketinglistshare
44021	return c
44022}
44023
44024// Fields allows partial responses to be retrieved. See
44025// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44026// for more information.
44027func (c *RemarketingListSharesPatchCall) Fields(s ...googleapi.Field) *RemarketingListSharesPatchCall {
44028	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44029	return c
44030}
44031
44032// Context sets the context to be used in this call's Do method. Any
44033// pending HTTP request will be aborted if the provided context is
44034// canceled.
44035func (c *RemarketingListSharesPatchCall) Context(ctx context.Context) *RemarketingListSharesPatchCall {
44036	c.ctx_ = ctx
44037	return c
44038}
44039
44040// Header returns an http.Header that can be modified by the caller to
44041// add HTTP headers to the request.
44042func (c *RemarketingListSharesPatchCall) Header() http.Header {
44043	if c.header_ == nil {
44044		c.header_ = make(http.Header)
44045	}
44046	return c.header_
44047}
44048
44049func (c *RemarketingListSharesPatchCall) doRequest(alt string) (*http.Response, error) {
44050	reqHeaders := make(http.Header)
44051	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
44052	for k, v := range c.header_ {
44053		reqHeaders[k] = v
44054	}
44055	reqHeaders.Set("User-Agent", c.s.userAgent())
44056	var body io.Reader = nil
44057	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
44058	if err != nil {
44059		return nil, err
44060	}
44061	reqHeaders.Set("Content-Type", "application/json")
44062	c.urlParams_.Set("alt", alt)
44063	c.urlParams_.Set("prettyPrint", "false")
44064	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
44065	urls += "?" + c.urlParams_.Encode()
44066	req, err := http.NewRequest("PATCH", urls, body)
44067	if err != nil {
44068		return nil, err
44069	}
44070	req.Header = reqHeaders
44071	googleapi.Expand(req.URL, map[string]string{
44072		"profileId": strconv.FormatInt(c.profileId, 10),
44073	})
44074	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44075}
44076
44077// Do executes the "dfareporting.remarketingListShares.patch" call.
44078// Exactly one of *RemarketingListShare or error will be non-nil. Any
44079// non-2xx status code is an error. Response headers are in either
44080// *RemarketingListShare.ServerResponse.Header or (if a response was
44081// returned at all) in error.(*googleapi.Error).Header. Use
44082// googleapi.IsNotModified to check whether the returned error was
44083// because http.StatusNotModified was returned.
44084func (c *RemarketingListSharesPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
44085	gensupport.SetOptions(c.urlParams_, opts...)
44086	res, err := c.doRequest("json")
44087	if res != nil && res.StatusCode == http.StatusNotModified {
44088		if res.Body != nil {
44089			res.Body.Close()
44090		}
44091		return nil, &googleapi.Error{
44092			Code:   res.StatusCode,
44093			Header: res.Header,
44094		}
44095	}
44096	if err != nil {
44097		return nil, err
44098	}
44099	defer googleapi.CloseBody(res)
44100	if err := googleapi.CheckResponse(res); err != nil {
44101		return nil, err
44102	}
44103	ret := &RemarketingListShare{
44104		ServerResponse: googleapi.ServerResponse{
44105			Header:         res.Header,
44106			HTTPStatusCode: res.StatusCode,
44107		},
44108	}
44109	target := &ret
44110	if err := gensupport.DecodeResponse(target, res); err != nil {
44111		return nil, err
44112	}
44113	return ret, nil
44114	// {
44115	//   "description": "Updates an existing remarketing list share. This method supports patch semantics.",
44116	//   "flatPath": "userprofiles/{profileId}/remarketingListShares",
44117	//   "httpMethod": "PATCH",
44118	//   "id": "dfareporting.remarketingListShares.patch",
44119	//   "parameterOrder": [
44120	//     "profileId",
44121	//     "id"
44122	//   ],
44123	//   "parameters": {
44124	//     "id": {
44125	//       "description": "RemarketingList ID.",
44126	//       "format": "int64",
44127	//       "location": "query",
44128	//       "required": true,
44129	//       "type": "string"
44130	//     },
44131	//     "profileId": {
44132	//       "description": "User profile ID associated with this request.",
44133	//       "format": "int64",
44134	//       "location": "path",
44135	//       "required": true,
44136	//       "type": "string"
44137	//     }
44138	//   },
44139	//   "path": "userprofiles/{profileId}/remarketingListShares",
44140	//   "request": {
44141	//     "$ref": "RemarketingListShare"
44142	//   },
44143	//   "response": {
44144	//     "$ref": "RemarketingListShare"
44145	//   },
44146	//   "scopes": [
44147	//     "https://www.googleapis.com/auth/dfatrafficking"
44148	//   ]
44149	// }
44150
44151}
44152
44153// method id "dfareporting.remarketingListShares.update":
44154
44155type RemarketingListSharesUpdateCall struct {
44156	s                    *Service
44157	profileId            int64
44158	remarketinglistshare *RemarketingListShare
44159	urlParams_           gensupport.URLParams
44160	ctx_                 context.Context
44161	header_              http.Header
44162}
44163
44164// Update: Updates an existing remarketing list share.
44165//
44166// - profileId: User profile ID associated with this request.
44167func (r *RemarketingListSharesService) Update(profileId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesUpdateCall {
44168	c := &RemarketingListSharesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44169	c.profileId = profileId
44170	c.remarketinglistshare = remarketinglistshare
44171	return c
44172}
44173
44174// Fields allows partial responses to be retrieved. See
44175// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44176// for more information.
44177func (c *RemarketingListSharesUpdateCall) Fields(s ...googleapi.Field) *RemarketingListSharesUpdateCall {
44178	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44179	return c
44180}
44181
44182// Context sets the context to be used in this call's Do method. Any
44183// pending HTTP request will be aborted if the provided context is
44184// canceled.
44185func (c *RemarketingListSharesUpdateCall) Context(ctx context.Context) *RemarketingListSharesUpdateCall {
44186	c.ctx_ = ctx
44187	return c
44188}
44189
44190// Header returns an http.Header that can be modified by the caller to
44191// add HTTP headers to the request.
44192func (c *RemarketingListSharesUpdateCall) Header() http.Header {
44193	if c.header_ == nil {
44194		c.header_ = make(http.Header)
44195	}
44196	return c.header_
44197}
44198
44199func (c *RemarketingListSharesUpdateCall) doRequest(alt string) (*http.Response, error) {
44200	reqHeaders := make(http.Header)
44201	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
44202	for k, v := range c.header_ {
44203		reqHeaders[k] = v
44204	}
44205	reqHeaders.Set("User-Agent", c.s.userAgent())
44206	var body io.Reader = nil
44207	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
44208	if err != nil {
44209		return nil, err
44210	}
44211	reqHeaders.Set("Content-Type", "application/json")
44212	c.urlParams_.Set("alt", alt)
44213	c.urlParams_.Set("prettyPrint", "false")
44214	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
44215	urls += "?" + c.urlParams_.Encode()
44216	req, err := http.NewRequest("PUT", urls, body)
44217	if err != nil {
44218		return nil, err
44219	}
44220	req.Header = reqHeaders
44221	googleapi.Expand(req.URL, map[string]string{
44222		"profileId": strconv.FormatInt(c.profileId, 10),
44223	})
44224	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44225}
44226
44227// Do executes the "dfareporting.remarketingListShares.update" call.
44228// Exactly one of *RemarketingListShare or error will be non-nil. Any
44229// non-2xx status code is an error. Response headers are in either
44230// *RemarketingListShare.ServerResponse.Header or (if a response was
44231// returned at all) in error.(*googleapi.Error).Header. Use
44232// googleapi.IsNotModified to check whether the returned error was
44233// because http.StatusNotModified was returned.
44234func (c *RemarketingListSharesUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
44235	gensupport.SetOptions(c.urlParams_, opts...)
44236	res, err := c.doRequest("json")
44237	if res != nil && res.StatusCode == http.StatusNotModified {
44238		if res.Body != nil {
44239			res.Body.Close()
44240		}
44241		return nil, &googleapi.Error{
44242			Code:   res.StatusCode,
44243			Header: res.Header,
44244		}
44245	}
44246	if err != nil {
44247		return nil, err
44248	}
44249	defer googleapi.CloseBody(res)
44250	if err := googleapi.CheckResponse(res); err != nil {
44251		return nil, err
44252	}
44253	ret := &RemarketingListShare{
44254		ServerResponse: googleapi.ServerResponse{
44255			Header:         res.Header,
44256			HTTPStatusCode: res.StatusCode,
44257		},
44258	}
44259	target := &ret
44260	if err := gensupport.DecodeResponse(target, res); err != nil {
44261		return nil, err
44262	}
44263	return ret, nil
44264	// {
44265	//   "description": "Updates an existing remarketing list share.",
44266	//   "flatPath": "userprofiles/{profileId}/remarketingListShares",
44267	//   "httpMethod": "PUT",
44268	//   "id": "dfareporting.remarketingListShares.update",
44269	//   "parameterOrder": [
44270	//     "profileId"
44271	//   ],
44272	//   "parameters": {
44273	//     "profileId": {
44274	//       "description": "User profile ID associated with this request.",
44275	//       "format": "int64",
44276	//       "location": "path",
44277	//       "required": true,
44278	//       "type": "string"
44279	//     }
44280	//   },
44281	//   "path": "userprofiles/{profileId}/remarketingListShares",
44282	//   "request": {
44283	//     "$ref": "RemarketingListShare"
44284	//   },
44285	//   "response": {
44286	//     "$ref": "RemarketingListShare"
44287	//   },
44288	//   "scopes": [
44289	//     "https://www.googleapis.com/auth/dfatrafficking"
44290	//   ]
44291	// }
44292
44293}
44294
44295// method id "dfareporting.remarketingLists.get":
44296
44297type RemarketingListsGetCall struct {
44298	s            *Service
44299	profileId    int64
44300	id           int64
44301	urlParams_   gensupport.URLParams
44302	ifNoneMatch_ string
44303	ctx_         context.Context
44304	header_      http.Header
44305}
44306
44307// Get: Gets one remarketing list by ID.
44308//
44309// - id: Remarketing list ID.
44310// - profileId: User profile ID associated with this request.
44311func (r *RemarketingListsService) Get(profileId int64, id int64) *RemarketingListsGetCall {
44312	c := &RemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44313	c.profileId = profileId
44314	c.id = id
44315	return c
44316}
44317
44318// Fields allows partial responses to be retrieved. See
44319// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44320// for more information.
44321func (c *RemarketingListsGetCall) Fields(s ...googleapi.Field) *RemarketingListsGetCall {
44322	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44323	return c
44324}
44325
44326// IfNoneMatch sets the optional parameter which makes the operation
44327// fail if the object's ETag matches the given value. This is useful for
44328// getting updates only after the object has changed since the last
44329// request. Use googleapi.IsNotModified to check whether the response
44330// error from Do is the result of In-None-Match.
44331func (c *RemarketingListsGetCall) IfNoneMatch(entityTag string) *RemarketingListsGetCall {
44332	c.ifNoneMatch_ = entityTag
44333	return c
44334}
44335
44336// Context sets the context to be used in this call's Do method. Any
44337// pending HTTP request will be aborted if the provided context is
44338// canceled.
44339func (c *RemarketingListsGetCall) Context(ctx context.Context) *RemarketingListsGetCall {
44340	c.ctx_ = ctx
44341	return c
44342}
44343
44344// Header returns an http.Header that can be modified by the caller to
44345// add HTTP headers to the request.
44346func (c *RemarketingListsGetCall) Header() http.Header {
44347	if c.header_ == nil {
44348		c.header_ = make(http.Header)
44349	}
44350	return c.header_
44351}
44352
44353func (c *RemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
44354	reqHeaders := make(http.Header)
44355	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
44356	for k, v := range c.header_ {
44357		reqHeaders[k] = v
44358	}
44359	reqHeaders.Set("User-Agent", c.s.userAgent())
44360	if c.ifNoneMatch_ != "" {
44361		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44362	}
44363	var body io.Reader = nil
44364	c.urlParams_.Set("alt", alt)
44365	c.urlParams_.Set("prettyPrint", "false")
44366	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists/{id}")
44367	urls += "?" + c.urlParams_.Encode()
44368	req, err := http.NewRequest("GET", urls, body)
44369	if err != nil {
44370		return nil, err
44371	}
44372	req.Header = reqHeaders
44373	googleapi.Expand(req.URL, map[string]string{
44374		"profileId": strconv.FormatInt(c.profileId, 10),
44375		"id":        strconv.FormatInt(c.id, 10),
44376	})
44377	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44378}
44379
44380// Do executes the "dfareporting.remarketingLists.get" call.
44381// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
44382// status code is an error. Response headers are in either
44383// *RemarketingList.ServerResponse.Header or (if a response was returned
44384// at all) in error.(*googleapi.Error).Header. Use
44385// googleapi.IsNotModified to check whether the returned error was
44386// because http.StatusNotModified was returned.
44387func (c *RemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
44388	gensupport.SetOptions(c.urlParams_, opts...)
44389	res, err := c.doRequest("json")
44390	if res != nil && res.StatusCode == http.StatusNotModified {
44391		if res.Body != nil {
44392			res.Body.Close()
44393		}
44394		return nil, &googleapi.Error{
44395			Code:   res.StatusCode,
44396			Header: res.Header,
44397		}
44398	}
44399	if err != nil {
44400		return nil, err
44401	}
44402	defer googleapi.CloseBody(res)
44403	if err := googleapi.CheckResponse(res); err != nil {
44404		return nil, err
44405	}
44406	ret := &RemarketingList{
44407		ServerResponse: googleapi.ServerResponse{
44408			Header:         res.Header,
44409			HTTPStatusCode: res.StatusCode,
44410		},
44411	}
44412	target := &ret
44413	if err := gensupport.DecodeResponse(target, res); err != nil {
44414		return nil, err
44415	}
44416	return ret, nil
44417	// {
44418	//   "description": "Gets one remarketing list by ID.",
44419	//   "flatPath": "userprofiles/{profileId}/remarketingLists/{id}",
44420	//   "httpMethod": "GET",
44421	//   "id": "dfareporting.remarketingLists.get",
44422	//   "parameterOrder": [
44423	//     "profileId",
44424	//     "id"
44425	//   ],
44426	//   "parameters": {
44427	//     "id": {
44428	//       "description": "Remarketing list ID.",
44429	//       "format": "int64",
44430	//       "location": "path",
44431	//       "required": true,
44432	//       "type": "string"
44433	//     },
44434	//     "profileId": {
44435	//       "description": "User profile ID associated with this request.",
44436	//       "format": "int64",
44437	//       "location": "path",
44438	//       "required": true,
44439	//       "type": "string"
44440	//     }
44441	//   },
44442	//   "path": "userprofiles/{profileId}/remarketingLists/{id}",
44443	//   "response": {
44444	//     "$ref": "RemarketingList"
44445	//   },
44446	//   "scopes": [
44447	//     "https://www.googleapis.com/auth/dfatrafficking"
44448	//   ]
44449	// }
44450
44451}
44452
44453// method id "dfareporting.remarketingLists.insert":
44454
44455type RemarketingListsInsertCall struct {
44456	s               *Service
44457	profileId       int64
44458	remarketinglist *RemarketingList
44459	urlParams_      gensupport.URLParams
44460	ctx_            context.Context
44461	header_         http.Header
44462}
44463
44464// Insert: Inserts a new remarketing list.
44465//
44466// - profileId: User profile ID associated with this request.
44467func (r *RemarketingListsService) Insert(profileId int64, remarketinglist *RemarketingList) *RemarketingListsInsertCall {
44468	c := &RemarketingListsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44469	c.profileId = profileId
44470	c.remarketinglist = remarketinglist
44471	return c
44472}
44473
44474// Fields allows partial responses to be retrieved. See
44475// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44476// for more information.
44477func (c *RemarketingListsInsertCall) Fields(s ...googleapi.Field) *RemarketingListsInsertCall {
44478	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44479	return c
44480}
44481
44482// Context sets the context to be used in this call's Do method. Any
44483// pending HTTP request will be aborted if the provided context is
44484// canceled.
44485func (c *RemarketingListsInsertCall) Context(ctx context.Context) *RemarketingListsInsertCall {
44486	c.ctx_ = ctx
44487	return c
44488}
44489
44490// Header returns an http.Header that can be modified by the caller to
44491// add HTTP headers to the request.
44492func (c *RemarketingListsInsertCall) Header() http.Header {
44493	if c.header_ == nil {
44494		c.header_ = make(http.Header)
44495	}
44496	return c.header_
44497}
44498
44499func (c *RemarketingListsInsertCall) doRequest(alt string) (*http.Response, error) {
44500	reqHeaders := make(http.Header)
44501	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
44502	for k, v := range c.header_ {
44503		reqHeaders[k] = v
44504	}
44505	reqHeaders.Set("User-Agent", c.s.userAgent())
44506	var body io.Reader = nil
44507	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
44508	if err != nil {
44509		return nil, err
44510	}
44511	reqHeaders.Set("Content-Type", "application/json")
44512	c.urlParams_.Set("alt", alt)
44513	c.urlParams_.Set("prettyPrint", "false")
44514	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
44515	urls += "?" + c.urlParams_.Encode()
44516	req, err := http.NewRequest("POST", urls, body)
44517	if err != nil {
44518		return nil, err
44519	}
44520	req.Header = reqHeaders
44521	googleapi.Expand(req.URL, map[string]string{
44522		"profileId": strconv.FormatInt(c.profileId, 10),
44523	})
44524	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44525}
44526
44527// Do executes the "dfareporting.remarketingLists.insert" call.
44528// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
44529// status code is an error. Response headers are in either
44530// *RemarketingList.ServerResponse.Header or (if a response was returned
44531// at all) in error.(*googleapi.Error).Header. Use
44532// googleapi.IsNotModified to check whether the returned error was
44533// because http.StatusNotModified was returned.
44534func (c *RemarketingListsInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
44535	gensupport.SetOptions(c.urlParams_, opts...)
44536	res, err := c.doRequest("json")
44537	if res != nil && res.StatusCode == http.StatusNotModified {
44538		if res.Body != nil {
44539			res.Body.Close()
44540		}
44541		return nil, &googleapi.Error{
44542			Code:   res.StatusCode,
44543			Header: res.Header,
44544		}
44545	}
44546	if err != nil {
44547		return nil, err
44548	}
44549	defer googleapi.CloseBody(res)
44550	if err := googleapi.CheckResponse(res); err != nil {
44551		return nil, err
44552	}
44553	ret := &RemarketingList{
44554		ServerResponse: googleapi.ServerResponse{
44555			Header:         res.Header,
44556			HTTPStatusCode: res.StatusCode,
44557		},
44558	}
44559	target := &ret
44560	if err := gensupport.DecodeResponse(target, res); err != nil {
44561		return nil, err
44562	}
44563	return ret, nil
44564	// {
44565	//   "description": "Inserts a new remarketing list.",
44566	//   "flatPath": "userprofiles/{profileId}/remarketingLists",
44567	//   "httpMethod": "POST",
44568	//   "id": "dfareporting.remarketingLists.insert",
44569	//   "parameterOrder": [
44570	//     "profileId"
44571	//   ],
44572	//   "parameters": {
44573	//     "profileId": {
44574	//       "description": "User profile ID associated with this request.",
44575	//       "format": "int64",
44576	//       "location": "path",
44577	//       "required": true,
44578	//       "type": "string"
44579	//     }
44580	//   },
44581	//   "path": "userprofiles/{profileId}/remarketingLists",
44582	//   "request": {
44583	//     "$ref": "RemarketingList"
44584	//   },
44585	//   "response": {
44586	//     "$ref": "RemarketingList"
44587	//   },
44588	//   "scopes": [
44589	//     "https://www.googleapis.com/auth/dfatrafficking"
44590	//   ]
44591	// }
44592
44593}
44594
44595// method id "dfareporting.remarketingLists.list":
44596
44597type RemarketingListsListCall struct {
44598	s            *Service
44599	profileId    int64
44600	urlParams_   gensupport.URLParams
44601	ifNoneMatch_ string
44602	ctx_         context.Context
44603	header_      http.Header
44604}
44605
44606// List: Retrieves a list of remarketing lists, possibly filtered. This
44607// method supports paging.
44608//
44609// - advertiserId: Select only remarketing lists owned by this
44610//   advertiser.
44611// - profileId: User profile ID associated with this request.
44612func (r *RemarketingListsService) List(profileId int64, advertiserId int64) *RemarketingListsListCall {
44613	c := &RemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44614	c.profileId = profileId
44615	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
44616	return c
44617}
44618
44619// Active sets the optional parameter "active": Select only active or
44620// only inactive remarketing lists.
44621func (c *RemarketingListsListCall) Active(active bool) *RemarketingListsListCall {
44622	c.urlParams_.Set("active", fmt.Sprint(active))
44623	return c
44624}
44625
44626// FloodlightActivityId sets the optional parameter
44627// "floodlightActivityId": Select only remarketing lists that have this
44628// floodlight activity ID.
44629func (c *RemarketingListsListCall) FloodlightActivityId(floodlightActivityId int64) *RemarketingListsListCall {
44630	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
44631	return c
44632}
44633
44634// MaxResults sets the optional parameter "maxResults": Maximum number
44635// of results to return.
44636func (c *RemarketingListsListCall) MaxResults(maxResults int64) *RemarketingListsListCall {
44637	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
44638	return c
44639}
44640
44641// Name sets the optional parameter "name": Allows searching for objects
44642// by name or ID. Wildcards (*) are allowed. For example, "remarketing
44643// list*2015" will return objects with names like "remarketing list June
44644// 2015", "remarketing list April 2015", or simply "remarketing list
44645// 2015". Most of the searches also add wildcards implicitly at the
44646// start and the end of the search string. For example, a search string
44647// of "remarketing list" will match objects with name "my remarketing
44648// list", "remarketing list 2015", or simply "remarketing list".
44649func (c *RemarketingListsListCall) Name(name string) *RemarketingListsListCall {
44650	c.urlParams_.Set("name", name)
44651	return c
44652}
44653
44654// PageToken sets the optional parameter "pageToken": Value of the
44655// nextPageToken from the previous result page.
44656func (c *RemarketingListsListCall) PageToken(pageToken string) *RemarketingListsListCall {
44657	c.urlParams_.Set("pageToken", pageToken)
44658	return c
44659}
44660
44661// SortField sets the optional parameter "sortField": Field by which to
44662// sort the list.
44663//
44664// Possible values:
44665//   "ID" (default)
44666//   "NAME"
44667func (c *RemarketingListsListCall) SortField(sortField string) *RemarketingListsListCall {
44668	c.urlParams_.Set("sortField", sortField)
44669	return c
44670}
44671
44672// SortOrder sets the optional parameter "sortOrder": Order of sorted
44673// results.
44674//
44675// Possible values:
44676//   "ASCENDING" (default)
44677//   "DESCENDING"
44678func (c *RemarketingListsListCall) SortOrder(sortOrder string) *RemarketingListsListCall {
44679	c.urlParams_.Set("sortOrder", sortOrder)
44680	return c
44681}
44682
44683// Fields allows partial responses to be retrieved. See
44684// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44685// for more information.
44686func (c *RemarketingListsListCall) Fields(s ...googleapi.Field) *RemarketingListsListCall {
44687	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44688	return c
44689}
44690
44691// IfNoneMatch sets the optional parameter which makes the operation
44692// fail if the object's ETag matches the given value. This is useful for
44693// getting updates only after the object has changed since the last
44694// request. Use googleapi.IsNotModified to check whether the response
44695// error from Do is the result of In-None-Match.
44696func (c *RemarketingListsListCall) IfNoneMatch(entityTag string) *RemarketingListsListCall {
44697	c.ifNoneMatch_ = entityTag
44698	return c
44699}
44700
44701// Context sets the context to be used in this call's Do method. Any
44702// pending HTTP request will be aborted if the provided context is
44703// canceled.
44704func (c *RemarketingListsListCall) Context(ctx context.Context) *RemarketingListsListCall {
44705	c.ctx_ = ctx
44706	return c
44707}
44708
44709// Header returns an http.Header that can be modified by the caller to
44710// add HTTP headers to the request.
44711func (c *RemarketingListsListCall) Header() http.Header {
44712	if c.header_ == nil {
44713		c.header_ = make(http.Header)
44714	}
44715	return c.header_
44716}
44717
44718func (c *RemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
44719	reqHeaders := make(http.Header)
44720	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
44721	for k, v := range c.header_ {
44722		reqHeaders[k] = v
44723	}
44724	reqHeaders.Set("User-Agent", c.s.userAgent())
44725	if c.ifNoneMatch_ != "" {
44726		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44727	}
44728	var body io.Reader = nil
44729	c.urlParams_.Set("alt", alt)
44730	c.urlParams_.Set("prettyPrint", "false")
44731	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
44732	urls += "?" + c.urlParams_.Encode()
44733	req, err := http.NewRequest("GET", urls, body)
44734	if err != nil {
44735		return nil, err
44736	}
44737	req.Header = reqHeaders
44738	googleapi.Expand(req.URL, map[string]string{
44739		"profileId": strconv.FormatInt(c.profileId, 10),
44740	})
44741	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44742}
44743
44744// Do executes the "dfareporting.remarketingLists.list" call.
44745// Exactly one of *RemarketingListsListResponse or error will be
44746// non-nil. Any non-2xx status code is an error. Response headers are in
44747// either *RemarketingListsListResponse.ServerResponse.Header or (if a
44748// response was returned at all) in error.(*googleapi.Error).Header. Use
44749// googleapi.IsNotModified to check whether the returned error was
44750// because http.StatusNotModified was returned.
44751func (c *RemarketingListsListCall) Do(opts ...googleapi.CallOption) (*RemarketingListsListResponse, error) {
44752	gensupport.SetOptions(c.urlParams_, opts...)
44753	res, err := c.doRequest("json")
44754	if res != nil && res.StatusCode == http.StatusNotModified {
44755		if res.Body != nil {
44756			res.Body.Close()
44757		}
44758		return nil, &googleapi.Error{
44759			Code:   res.StatusCode,
44760			Header: res.Header,
44761		}
44762	}
44763	if err != nil {
44764		return nil, err
44765	}
44766	defer googleapi.CloseBody(res)
44767	if err := googleapi.CheckResponse(res); err != nil {
44768		return nil, err
44769	}
44770	ret := &RemarketingListsListResponse{
44771		ServerResponse: googleapi.ServerResponse{
44772			Header:         res.Header,
44773			HTTPStatusCode: res.StatusCode,
44774		},
44775	}
44776	target := &ret
44777	if err := gensupport.DecodeResponse(target, res); err != nil {
44778		return nil, err
44779	}
44780	return ret, nil
44781	// {
44782	//   "description": "Retrieves a list of remarketing lists, possibly filtered. This method supports paging.",
44783	//   "flatPath": "userprofiles/{profileId}/remarketingLists",
44784	//   "httpMethod": "GET",
44785	//   "id": "dfareporting.remarketingLists.list",
44786	//   "parameterOrder": [
44787	//     "profileId",
44788	//     "advertiserId"
44789	//   ],
44790	//   "parameters": {
44791	//     "active": {
44792	//       "description": "Select only active or only inactive remarketing lists.",
44793	//       "location": "query",
44794	//       "type": "boolean"
44795	//     },
44796	//     "advertiserId": {
44797	//       "description": "Select only remarketing lists owned by this advertiser.",
44798	//       "format": "int64",
44799	//       "location": "query",
44800	//       "required": true,
44801	//       "type": "string"
44802	//     },
44803	//     "floodlightActivityId": {
44804	//       "description": "Select only remarketing lists that have this floodlight activity ID.",
44805	//       "format": "int64",
44806	//       "location": "query",
44807	//       "type": "string"
44808	//     },
44809	//     "maxResults": {
44810	//       "default": "1000",
44811	//       "description": "Maximum number of results to return.",
44812	//       "format": "int32",
44813	//       "location": "query",
44814	//       "maximum": "1000",
44815	//       "minimum": "0",
44816	//       "type": "integer"
44817	//     },
44818	//     "name": {
44819	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"remarketing list*2015\" will return objects with names like \"remarketing list June 2015\", \"remarketing list April 2015\", or simply \"remarketing list 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"remarketing list\" will match objects with name \"my remarketing list\", \"remarketing list 2015\", or simply \"remarketing list\".",
44820	//       "location": "query",
44821	//       "type": "string"
44822	//     },
44823	//     "pageToken": {
44824	//       "description": "Value of the nextPageToken from the previous result page.",
44825	//       "location": "query",
44826	//       "type": "string"
44827	//     },
44828	//     "profileId": {
44829	//       "description": "User profile ID associated with this request.",
44830	//       "format": "int64",
44831	//       "location": "path",
44832	//       "required": true,
44833	//       "type": "string"
44834	//     },
44835	//     "sortField": {
44836	//       "default": "ID",
44837	//       "description": "Field by which to sort the list.",
44838	//       "enum": [
44839	//         "ID",
44840	//         "NAME"
44841	//       ],
44842	//       "enumDescriptions": [
44843	//         "",
44844	//         ""
44845	//       ],
44846	//       "location": "query",
44847	//       "type": "string"
44848	//     },
44849	//     "sortOrder": {
44850	//       "default": "ASCENDING",
44851	//       "description": "Order of sorted results.",
44852	//       "enum": [
44853	//         "ASCENDING",
44854	//         "DESCENDING"
44855	//       ],
44856	//       "enumDescriptions": [
44857	//         "",
44858	//         ""
44859	//       ],
44860	//       "location": "query",
44861	//       "type": "string"
44862	//     }
44863	//   },
44864	//   "path": "userprofiles/{profileId}/remarketingLists",
44865	//   "response": {
44866	//     "$ref": "RemarketingListsListResponse"
44867	//   },
44868	//   "scopes": [
44869	//     "https://www.googleapis.com/auth/dfatrafficking"
44870	//   ]
44871	// }
44872
44873}
44874
44875// Pages invokes f for each page of results.
44876// A non-nil error returned from f will halt the iteration.
44877// The provided context supersedes any context provided to the Context method.
44878func (c *RemarketingListsListCall) Pages(ctx context.Context, f func(*RemarketingListsListResponse) error) error {
44879	c.ctx_ = ctx
44880	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
44881	for {
44882		x, err := c.Do()
44883		if err != nil {
44884			return err
44885		}
44886		if err := f(x); err != nil {
44887			return err
44888		}
44889		if x.NextPageToken == "" {
44890			return nil
44891		}
44892		c.PageToken(x.NextPageToken)
44893	}
44894}
44895
44896// method id "dfareporting.remarketingLists.patch":
44897
44898type RemarketingListsPatchCall struct {
44899	s               *Service
44900	profileId       int64
44901	remarketinglist *RemarketingList
44902	urlParams_      gensupport.URLParams
44903	ctx_            context.Context
44904	header_         http.Header
44905}
44906
44907// Patch: Updates an existing remarketing list. This method supports
44908// patch semantics.
44909//
44910// - id: RemarketingList ID.
44911// - profileId: User profile ID associated with this request.
44912func (r *RemarketingListsService) Patch(profileId int64, id int64, remarketinglist *RemarketingList) *RemarketingListsPatchCall {
44913	c := &RemarketingListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44914	c.profileId = profileId
44915	c.urlParams_.Set("id", fmt.Sprint(id))
44916	c.remarketinglist = remarketinglist
44917	return c
44918}
44919
44920// Fields allows partial responses to be retrieved. See
44921// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44922// for more information.
44923func (c *RemarketingListsPatchCall) Fields(s ...googleapi.Field) *RemarketingListsPatchCall {
44924	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44925	return c
44926}
44927
44928// Context sets the context to be used in this call's Do method. Any
44929// pending HTTP request will be aborted if the provided context is
44930// canceled.
44931func (c *RemarketingListsPatchCall) Context(ctx context.Context) *RemarketingListsPatchCall {
44932	c.ctx_ = ctx
44933	return c
44934}
44935
44936// Header returns an http.Header that can be modified by the caller to
44937// add HTTP headers to the request.
44938func (c *RemarketingListsPatchCall) Header() http.Header {
44939	if c.header_ == nil {
44940		c.header_ = make(http.Header)
44941	}
44942	return c.header_
44943}
44944
44945func (c *RemarketingListsPatchCall) doRequest(alt string) (*http.Response, error) {
44946	reqHeaders := make(http.Header)
44947	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
44948	for k, v := range c.header_ {
44949		reqHeaders[k] = v
44950	}
44951	reqHeaders.Set("User-Agent", c.s.userAgent())
44952	var body io.Reader = nil
44953	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
44954	if err != nil {
44955		return nil, err
44956	}
44957	reqHeaders.Set("Content-Type", "application/json")
44958	c.urlParams_.Set("alt", alt)
44959	c.urlParams_.Set("prettyPrint", "false")
44960	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
44961	urls += "?" + c.urlParams_.Encode()
44962	req, err := http.NewRequest("PATCH", urls, body)
44963	if err != nil {
44964		return nil, err
44965	}
44966	req.Header = reqHeaders
44967	googleapi.Expand(req.URL, map[string]string{
44968		"profileId": strconv.FormatInt(c.profileId, 10),
44969	})
44970	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44971}
44972
44973// Do executes the "dfareporting.remarketingLists.patch" call.
44974// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
44975// status code is an error. Response headers are in either
44976// *RemarketingList.ServerResponse.Header or (if a response was returned
44977// at all) in error.(*googleapi.Error).Header. Use
44978// googleapi.IsNotModified to check whether the returned error was
44979// because http.StatusNotModified was returned.
44980func (c *RemarketingListsPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
44981	gensupport.SetOptions(c.urlParams_, opts...)
44982	res, err := c.doRequest("json")
44983	if res != nil && res.StatusCode == http.StatusNotModified {
44984		if res.Body != nil {
44985			res.Body.Close()
44986		}
44987		return nil, &googleapi.Error{
44988			Code:   res.StatusCode,
44989			Header: res.Header,
44990		}
44991	}
44992	if err != nil {
44993		return nil, err
44994	}
44995	defer googleapi.CloseBody(res)
44996	if err := googleapi.CheckResponse(res); err != nil {
44997		return nil, err
44998	}
44999	ret := &RemarketingList{
45000		ServerResponse: googleapi.ServerResponse{
45001			Header:         res.Header,
45002			HTTPStatusCode: res.StatusCode,
45003		},
45004	}
45005	target := &ret
45006	if err := gensupport.DecodeResponse(target, res); err != nil {
45007		return nil, err
45008	}
45009	return ret, nil
45010	// {
45011	//   "description": "Updates an existing remarketing list. This method supports patch semantics.",
45012	//   "flatPath": "userprofiles/{profileId}/remarketingLists",
45013	//   "httpMethod": "PATCH",
45014	//   "id": "dfareporting.remarketingLists.patch",
45015	//   "parameterOrder": [
45016	//     "profileId",
45017	//     "id"
45018	//   ],
45019	//   "parameters": {
45020	//     "id": {
45021	//       "description": "RemarketingList ID.",
45022	//       "format": "int64",
45023	//       "location": "query",
45024	//       "required": true,
45025	//       "type": "string"
45026	//     },
45027	//     "profileId": {
45028	//       "description": "User profile ID associated with this request.",
45029	//       "format": "int64",
45030	//       "location": "path",
45031	//       "required": true,
45032	//       "type": "string"
45033	//     }
45034	//   },
45035	//   "path": "userprofiles/{profileId}/remarketingLists",
45036	//   "request": {
45037	//     "$ref": "RemarketingList"
45038	//   },
45039	//   "response": {
45040	//     "$ref": "RemarketingList"
45041	//   },
45042	//   "scopes": [
45043	//     "https://www.googleapis.com/auth/dfatrafficking"
45044	//   ]
45045	// }
45046
45047}
45048
45049// method id "dfareporting.remarketingLists.update":
45050
45051type RemarketingListsUpdateCall struct {
45052	s               *Service
45053	profileId       int64
45054	remarketinglist *RemarketingList
45055	urlParams_      gensupport.URLParams
45056	ctx_            context.Context
45057	header_         http.Header
45058}
45059
45060// Update: Updates an existing remarketing list.
45061//
45062// - profileId: User profile ID associated with this request.
45063func (r *RemarketingListsService) Update(profileId int64, remarketinglist *RemarketingList) *RemarketingListsUpdateCall {
45064	c := &RemarketingListsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45065	c.profileId = profileId
45066	c.remarketinglist = remarketinglist
45067	return c
45068}
45069
45070// Fields allows partial responses to be retrieved. See
45071// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45072// for more information.
45073func (c *RemarketingListsUpdateCall) Fields(s ...googleapi.Field) *RemarketingListsUpdateCall {
45074	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45075	return c
45076}
45077
45078// Context sets the context to be used in this call's Do method. Any
45079// pending HTTP request will be aborted if the provided context is
45080// canceled.
45081func (c *RemarketingListsUpdateCall) Context(ctx context.Context) *RemarketingListsUpdateCall {
45082	c.ctx_ = ctx
45083	return c
45084}
45085
45086// Header returns an http.Header that can be modified by the caller to
45087// add HTTP headers to the request.
45088func (c *RemarketingListsUpdateCall) Header() http.Header {
45089	if c.header_ == nil {
45090		c.header_ = make(http.Header)
45091	}
45092	return c.header_
45093}
45094
45095func (c *RemarketingListsUpdateCall) doRequest(alt string) (*http.Response, error) {
45096	reqHeaders := make(http.Header)
45097	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
45098	for k, v := range c.header_ {
45099		reqHeaders[k] = v
45100	}
45101	reqHeaders.Set("User-Agent", c.s.userAgent())
45102	var body io.Reader = nil
45103	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
45104	if err != nil {
45105		return nil, err
45106	}
45107	reqHeaders.Set("Content-Type", "application/json")
45108	c.urlParams_.Set("alt", alt)
45109	c.urlParams_.Set("prettyPrint", "false")
45110	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
45111	urls += "?" + c.urlParams_.Encode()
45112	req, err := http.NewRequest("PUT", urls, body)
45113	if err != nil {
45114		return nil, err
45115	}
45116	req.Header = reqHeaders
45117	googleapi.Expand(req.URL, map[string]string{
45118		"profileId": strconv.FormatInt(c.profileId, 10),
45119	})
45120	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45121}
45122
45123// Do executes the "dfareporting.remarketingLists.update" call.
45124// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
45125// status code is an error. Response headers are in either
45126// *RemarketingList.ServerResponse.Header or (if a response was returned
45127// at all) in error.(*googleapi.Error).Header. Use
45128// googleapi.IsNotModified to check whether the returned error was
45129// because http.StatusNotModified was returned.
45130func (c *RemarketingListsUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
45131	gensupport.SetOptions(c.urlParams_, opts...)
45132	res, err := c.doRequest("json")
45133	if res != nil && res.StatusCode == http.StatusNotModified {
45134		if res.Body != nil {
45135			res.Body.Close()
45136		}
45137		return nil, &googleapi.Error{
45138			Code:   res.StatusCode,
45139			Header: res.Header,
45140		}
45141	}
45142	if err != nil {
45143		return nil, err
45144	}
45145	defer googleapi.CloseBody(res)
45146	if err := googleapi.CheckResponse(res); err != nil {
45147		return nil, err
45148	}
45149	ret := &RemarketingList{
45150		ServerResponse: googleapi.ServerResponse{
45151			Header:         res.Header,
45152			HTTPStatusCode: res.StatusCode,
45153		},
45154	}
45155	target := &ret
45156	if err := gensupport.DecodeResponse(target, res); err != nil {
45157		return nil, err
45158	}
45159	return ret, nil
45160	// {
45161	//   "description": "Updates an existing remarketing list.",
45162	//   "flatPath": "userprofiles/{profileId}/remarketingLists",
45163	//   "httpMethod": "PUT",
45164	//   "id": "dfareporting.remarketingLists.update",
45165	//   "parameterOrder": [
45166	//     "profileId"
45167	//   ],
45168	//   "parameters": {
45169	//     "profileId": {
45170	//       "description": "User profile ID associated with this request.",
45171	//       "format": "int64",
45172	//       "location": "path",
45173	//       "required": true,
45174	//       "type": "string"
45175	//     }
45176	//   },
45177	//   "path": "userprofiles/{profileId}/remarketingLists",
45178	//   "request": {
45179	//     "$ref": "RemarketingList"
45180	//   },
45181	//   "response": {
45182	//     "$ref": "RemarketingList"
45183	//   },
45184	//   "scopes": [
45185	//     "https://www.googleapis.com/auth/dfatrafficking"
45186	//   ]
45187	// }
45188
45189}
45190
45191// method id "dfareporting.reports.delete":
45192
45193type ReportsDeleteCall struct {
45194	s          *Service
45195	profileId  int64
45196	reportId   int64
45197	urlParams_ gensupport.URLParams
45198	ctx_       context.Context
45199	header_    http.Header
45200}
45201
45202// Delete: Deletes a report by its ID.
45203//
45204// - profileId: The Campaign Manager 360 user profile ID.
45205// - reportId: The ID of the report.
45206func (r *ReportsService) Delete(profileId int64, reportId int64) *ReportsDeleteCall {
45207	c := &ReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45208	c.profileId = profileId
45209	c.reportId = reportId
45210	return c
45211}
45212
45213// Fields allows partial responses to be retrieved. See
45214// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45215// for more information.
45216func (c *ReportsDeleteCall) Fields(s ...googleapi.Field) *ReportsDeleteCall {
45217	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45218	return c
45219}
45220
45221// Context sets the context to be used in this call's Do method. Any
45222// pending HTTP request will be aborted if the provided context is
45223// canceled.
45224func (c *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
45225	c.ctx_ = ctx
45226	return c
45227}
45228
45229// Header returns an http.Header that can be modified by the caller to
45230// add HTTP headers to the request.
45231func (c *ReportsDeleteCall) Header() http.Header {
45232	if c.header_ == nil {
45233		c.header_ = make(http.Header)
45234	}
45235	return c.header_
45236}
45237
45238func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
45239	reqHeaders := make(http.Header)
45240	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
45241	for k, v := range c.header_ {
45242		reqHeaders[k] = v
45243	}
45244	reqHeaders.Set("User-Agent", c.s.userAgent())
45245	var body io.Reader = nil
45246	c.urlParams_.Set("alt", alt)
45247	c.urlParams_.Set("prettyPrint", "false")
45248	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
45249	urls += "?" + c.urlParams_.Encode()
45250	req, err := http.NewRequest("DELETE", urls, body)
45251	if err != nil {
45252		return nil, err
45253	}
45254	req.Header = reqHeaders
45255	googleapi.Expand(req.URL, map[string]string{
45256		"profileId": strconv.FormatInt(c.profileId, 10),
45257		"reportId":  strconv.FormatInt(c.reportId, 10),
45258	})
45259	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45260}
45261
45262// Do executes the "dfareporting.reports.delete" call.
45263func (c *ReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
45264	gensupport.SetOptions(c.urlParams_, opts...)
45265	res, err := c.doRequest("json")
45266	if err != nil {
45267		return err
45268	}
45269	defer googleapi.CloseBody(res)
45270	if err := googleapi.CheckResponse(res); err != nil {
45271		return err
45272	}
45273	return nil
45274	// {
45275	//   "description": "Deletes a report by its ID.",
45276	//   "flatPath": "userprofiles/{profileId}/reports/{reportId}",
45277	//   "httpMethod": "DELETE",
45278	//   "id": "dfareporting.reports.delete",
45279	//   "parameterOrder": [
45280	//     "profileId",
45281	//     "reportId"
45282	//   ],
45283	//   "parameters": {
45284	//     "profileId": {
45285	//       "description": "The Campaign Manager 360 user profile ID.",
45286	//       "format": "int64",
45287	//       "location": "path",
45288	//       "required": true,
45289	//       "type": "string"
45290	//     },
45291	//     "reportId": {
45292	//       "description": "The ID of the report.",
45293	//       "format": "int64",
45294	//       "location": "path",
45295	//       "required": true,
45296	//       "type": "string"
45297	//     }
45298	//   },
45299	//   "path": "userprofiles/{profileId}/reports/{reportId}",
45300	//   "scopes": [
45301	//     "https://www.googleapis.com/auth/dfareporting"
45302	//   ]
45303	// }
45304
45305}
45306
45307// method id "dfareporting.reports.get":
45308
45309type ReportsGetCall struct {
45310	s            *Service
45311	profileId    int64
45312	reportId     int64
45313	urlParams_   gensupport.URLParams
45314	ifNoneMatch_ string
45315	ctx_         context.Context
45316	header_      http.Header
45317}
45318
45319// Get: Retrieves a report by its ID.
45320//
45321// - profileId: The Campaign Manager 360 user profile ID.
45322// - reportId: The ID of the report.
45323func (r *ReportsService) Get(profileId int64, reportId int64) *ReportsGetCall {
45324	c := &ReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45325	c.profileId = profileId
45326	c.reportId = reportId
45327	return c
45328}
45329
45330// Fields allows partial responses to be retrieved. See
45331// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45332// for more information.
45333func (c *ReportsGetCall) Fields(s ...googleapi.Field) *ReportsGetCall {
45334	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45335	return c
45336}
45337
45338// IfNoneMatch sets the optional parameter which makes the operation
45339// fail if the object's ETag matches the given value. This is useful for
45340// getting updates only after the object has changed since the last
45341// request. Use googleapi.IsNotModified to check whether the response
45342// error from Do is the result of In-None-Match.
45343func (c *ReportsGetCall) IfNoneMatch(entityTag string) *ReportsGetCall {
45344	c.ifNoneMatch_ = entityTag
45345	return c
45346}
45347
45348// Context sets the context to be used in this call's Do method. Any
45349// pending HTTP request will be aborted if the provided context is
45350// canceled.
45351func (c *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
45352	c.ctx_ = ctx
45353	return c
45354}
45355
45356// Header returns an http.Header that can be modified by the caller to
45357// add HTTP headers to the request.
45358func (c *ReportsGetCall) Header() http.Header {
45359	if c.header_ == nil {
45360		c.header_ = make(http.Header)
45361	}
45362	return c.header_
45363}
45364
45365func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
45366	reqHeaders := make(http.Header)
45367	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
45368	for k, v := range c.header_ {
45369		reqHeaders[k] = v
45370	}
45371	reqHeaders.Set("User-Agent", c.s.userAgent())
45372	if c.ifNoneMatch_ != "" {
45373		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45374	}
45375	var body io.Reader = nil
45376	c.urlParams_.Set("alt", alt)
45377	c.urlParams_.Set("prettyPrint", "false")
45378	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
45379	urls += "?" + c.urlParams_.Encode()
45380	req, err := http.NewRequest("GET", urls, body)
45381	if err != nil {
45382		return nil, err
45383	}
45384	req.Header = reqHeaders
45385	googleapi.Expand(req.URL, map[string]string{
45386		"profileId": strconv.FormatInt(c.profileId, 10),
45387		"reportId":  strconv.FormatInt(c.reportId, 10),
45388	})
45389	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45390}
45391
45392// Do executes the "dfareporting.reports.get" call.
45393// Exactly one of *Report or error will be non-nil. Any non-2xx status
45394// code is an error. Response headers are in either
45395// *Report.ServerResponse.Header or (if a response was returned at all)
45396// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
45397// check whether the returned error was because http.StatusNotModified
45398// was returned.
45399func (c *ReportsGetCall) Do(opts ...googleapi.CallOption) (*Report, error) {
45400	gensupport.SetOptions(c.urlParams_, opts...)
45401	res, err := c.doRequest("json")
45402	if res != nil && res.StatusCode == http.StatusNotModified {
45403		if res.Body != nil {
45404			res.Body.Close()
45405		}
45406		return nil, &googleapi.Error{
45407			Code:   res.StatusCode,
45408			Header: res.Header,
45409		}
45410	}
45411	if err != nil {
45412		return nil, err
45413	}
45414	defer googleapi.CloseBody(res)
45415	if err := googleapi.CheckResponse(res); err != nil {
45416		return nil, err
45417	}
45418	ret := &Report{
45419		ServerResponse: googleapi.ServerResponse{
45420			Header:         res.Header,
45421			HTTPStatusCode: res.StatusCode,
45422		},
45423	}
45424	target := &ret
45425	if err := gensupport.DecodeResponse(target, res); err != nil {
45426		return nil, err
45427	}
45428	return ret, nil
45429	// {
45430	//   "description": "Retrieves a report by its ID.",
45431	//   "flatPath": "userprofiles/{profileId}/reports/{reportId}",
45432	//   "httpMethod": "GET",
45433	//   "id": "dfareporting.reports.get",
45434	//   "parameterOrder": [
45435	//     "profileId",
45436	//     "reportId"
45437	//   ],
45438	//   "parameters": {
45439	//     "profileId": {
45440	//       "description": "The Campaign Manager 360 user profile ID.",
45441	//       "format": "int64",
45442	//       "location": "path",
45443	//       "required": true,
45444	//       "type": "string"
45445	//     },
45446	//     "reportId": {
45447	//       "description": "The ID of the report.",
45448	//       "format": "int64",
45449	//       "location": "path",
45450	//       "required": true,
45451	//       "type": "string"
45452	//     }
45453	//   },
45454	//   "path": "userprofiles/{profileId}/reports/{reportId}",
45455	//   "response": {
45456	//     "$ref": "Report"
45457	//   },
45458	//   "scopes": [
45459	//     "https://www.googleapis.com/auth/dfareporting"
45460	//   ]
45461	// }
45462
45463}
45464
45465// method id "dfareporting.reports.insert":
45466
45467type ReportsInsertCall struct {
45468	s          *Service
45469	profileId  int64
45470	report     *Report
45471	urlParams_ gensupport.URLParams
45472	ctx_       context.Context
45473	header_    http.Header
45474}
45475
45476// Insert: Creates a report.
45477//
45478// - profileId: The Campaign Manager 360 user profile ID.
45479func (r *ReportsService) Insert(profileId int64, report *Report) *ReportsInsertCall {
45480	c := &ReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45481	c.profileId = profileId
45482	c.report = report
45483	return c
45484}
45485
45486// Fields allows partial responses to be retrieved. See
45487// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45488// for more information.
45489func (c *ReportsInsertCall) Fields(s ...googleapi.Field) *ReportsInsertCall {
45490	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45491	return c
45492}
45493
45494// Context sets the context to be used in this call's Do method. Any
45495// pending HTTP request will be aborted if the provided context is
45496// canceled.
45497func (c *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
45498	c.ctx_ = ctx
45499	return c
45500}
45501
45502// Header returns an http.Header that can be modified by the caller to
45503// add HTTP headers to the request.
45504func (c *ReportsInsertCall) Header() http.Header {
45505	if c.header_ == nil {
45506		c.header_ = make(http.Header)
45507	}
45508	return c.header_
45509}
45510
45511func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
45512	reqHeaders := make(http.Header)
45513	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
45514	for k, v := range c.header_ {
45515		reqHeaders[k] = v
45516	}
45517	reqHeaders.Set("User-Agent", c.s.userAgent())
45518	var body io.Reader = nil
45519	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
45520	if err != nil {
45521		return nil, err
45522	}
45523	reqHeaders.Set("Content-Type", "application/json")
45524	c.urlParams_.Set("alt", alt)
45525	c.urlParams_.Set("prettyPrint", "false")
45526	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
45527	urls += "?" + c.urlParams_.Encode()
45528	req, err := http.NewRequest("POST", urls, body)
45529	if err != nil {
45530		return nil, err
45531	}
45532	req.Header = reqHeaders
45533	googleapi.Expand(req.URL, map[string]string{
45534		"profileId": strconv.FormatInt(c.profileId, 10),
45535	})
45536	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45537}
45538
45539// Do executes the "dfareporting.reports.insert" call.
45540// Exactly one of *Report or error will be non-nil. Any non-2xx status
45541// code is an error. Response headers are in either
45542// *Report.ServerResponse.Header or (if a response was returned at all)
45543// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
45544// check whether the returned error was because http.StatusNotModified
45545// was returned.
45546func (c *ReportsInsertCall) Do(opts ...googleapi.CallOption) (*Report, error) {
45547	gensupport.SetOptions(c.urlParams_, opts...)
45548	res, err := c.doRequest("json")
45549	if res != nil && res.StatusCode == http.StatusNotModified {
45550		if res.Body != nil {
45551			res.Body.Close()
45552		}
45553		return nil, &googleapi.Error{
45554			Code:   res.StatusCode,
45555			Header: res.Header,
45556		}
45557	}
45558	if err != nil {
45559		return nil, err
45560	}
45561	defer googleapi.CloseBody(res)
45562	if err := googleapi.CheckResponse(res); err != nil {
45563		return nil, err
45564	}
45565	ret := &Report{
45566		ServerResponse: googleapi.ServerResponse{
45567			Header:         res.Header,
45568			HTTPStatusCode: res.StatusCode,
45569		},
45570	}
45571	target := &ret
45572	if err := gensupport.DecodeResponse(target, res); err != nil {
45573		return nil, err
45574	}
45575	return ret, nil
45576	// {
45577	//   "description": "Creates a report.",
45578	//   "flatPath": "userprofiles/{profileId}/reports",
45579	//   "httpMethod": "POST",
45580	//   "id": "dfareporting.reports.insert",
45581	//   "parameterOrder": [
45582	//     "profileId"
45583	//   ],
45584	//   "parameters": {
45585	//     "profileId": {
45586	//       "description": "The Campaign Manager 360 user profile ID.",
45587	//       "format": "int64",
45588	//       "location": "path",
45589	//       "required": true,
45590	//       "type": "string"
45591	//     }
45592	//   },
45593	//   "path": "userprofiles/{profileId}/reports",
45594	//   "request": {
45595	//     "$ref": "Report"
45596	//   },
45597	//   "response": {
45598	//     "$ref": "Report"
45599	//   },
45600	//   "scopes": [
45601	//     "https://www.googleapis.com/auth/dfareporting"
45602	//   ]
45603	// }
45604
45605}
45606
45607// method id "dfareporting.reports.list":
45608
45609type ReportsListCall struct {
45610	s            *Service
45611	profileId    int64
45612	urlParams_   gensupport.URLParams
45613	ifNoneMatch_ string
45614	ctx_         context.Context
45615	header_      http.Header
45616}
45617
45618// List: Retrieves list of reports.
45619//
45620// - profileId: The Campaign Manager 360 user profile ID.
45621func (r *ReportsService) List(profileId int64) *ReportsListCall {
45622	c := &ReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45623	c.profileId = profileId
45624	return c
45625}
45626
45627// MaxResults sets the optional parameter "maxResults": Maximum number
45628// of results to return.
45629func (c *ReportsListCall) MaxResults(maxResults int64) *ReportsListCall {
45630	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45631	return c
45632}
45633
45634// PageToken sets the optional parameter "pageToken": The value of the
45635// nextToken from the previous result page.
45636func (c *ReportsListCall) PageToken(pageToken string) *ReportsListCall {
45637	c.urlParams_.Set("pageToken", pageToken)
45638	return c
45639}
45640
45641// Scope sets the optional parameter "scope": The scope that defines
45642// which results are returned.
45643//
45644// Possible values:
45645//   "ALL" - All reports in account.
45646//   "MINE" (default) - My reports.
45647func (c *ReportsListCall) Scope(scope string) *ReportsListCall {
45648	c.urlParams_.Set("scope", scope)
45649	return c
45650}
45651
45652// SortField sets the optional parameter "sortField": The field by which
45653// to sort the list.
45654//
45655// Possible values:
45656//   "ID" - Sort by report ID.
45657//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastModifiedTime' field.
45658//   "NAME" - Sort by name of reports.
45659func (c *ReportsListCall) SortField(sortField string) *ReportsListCall {
45660	c.urlParams_.Set("sortField", sortField)
45661	return c
45662}
45663
45664// SortOrder sets the optional parameter "sortOrder": Order of sorted
45665// results.
45666//
45667// Possible values:
45668//   "ASCENDING" - Ascending order.
45669//   "DESCENDING" (default) - Descending order.
45670func (c *ReportsListCall) SortOrder(sortOrder string) *ReportsListCall {
45671	c.urlParams_.Set("sortOrder", sortOrder)
45672	return c
45673}
45674
45675// Fields allows partial responses to be retrieved. See
45676// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45677// for more information.
45678func (c *ReportsListCall) Fields(s ...googleapi.Field) *ReportsListCall {
45679	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45680	return c
45681}
45682
45683// IfNoneMatch sets the optional parameter which makes the operation
45684// fail if the object's ETag matches the given value. This is useful for
45685// getting updates only after the object has changed since the last
45686// request. Use googleapi.IsNotModified to check whether the response
45687// error from Do is the result of In-None-Match.
45688func (c *ReportsListCall) IfNoneMatch(entityTag string) *ReportsListCall {
45689	c.ifNoneMatch_ = entityTag
45690	return c
45691}
45692
45693// Context sets the context to be used in this call's Do method. Any
45694// pending HTTP request will be aborted if the provided context is
45695// canceled.
45696func (c *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
45697	c.ctx_ = ctx
45698	return c
45699}
45700
45701// Header returns an http.Header that can be modified by the caller to
45702// add HTTP headers to the request.
45703func (c *ReportsListCall) Header() http.Header {
45704	if c.header_ == nil {
45705		c.header_ = make(http.Header)
45706	}
45707	return c.header_
45708}
45709
45710func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
45711	reqHeaders := make(http.Header)
45712	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
45713	for k, v := range c.header_ {
45714		reqHeaders[k] = v
45715	}
45716	reqHeaders.Set("User-Agent", c.s.userAgent())
45717	if c.ifNoneMatch_ != "" {
45718		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45719	}
45720	var body io.Reader = nil
45721	c.urlParams_.Set("alt", alt)
45722	c.urlParams_.Set("prettyPrint", "false")
45723	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
45724	urls += "?" + c.urlParams_.Encode()
45725	req, err := http.NewRequest("GET", urls, body)
45726	if err != nil {
45727		return nil, err
45728	}
45729	req.Header = reqHeaders
45730	googleapi.Expand(req.URL, map[string]string{
45731		"profileId": strconv.FormatInt(c.profileId, 10),
45732	})
45733	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45734}
45735
45736// Do executes the "dfareporting.reports.list" call.
45737// Exactly one of *ReportList or error will be non-nil. Any non-2xx
45738// status code is an error. Response headers are in either
45739// *ReportList.ServerResponse.Header or (if a response was returned at
45740// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
45741// to check whether the returned error was because
45742// http.StatusNotModified was returned.
45743func (c *ReportsListCall) Do(opts ...googleapi.CallOption) (*ReportList, error) {
45744	gensupport.SetOptions(c.urlParams_, opts...)
45745	res, err := c.doRequest("json")
45746	if res != nil && res.StatusCode == http.StatusNotModified {
45747		if res.Body != nil {
45748			res.Body.Close()
45749		}
45750		return nil, &googleapi.Error{
45751			Code:   res.StatusCode,
45752			Header: res.Header,
45753		}
45754	}
45755	if err != nil {
45756		return nil, err
45757	}
45758	defer googleapi.CloseBody(res)
45759	if err := googleapi.CheckResponse(res); err != nil {
45760		return nil, err
45761	}
45762	ret := &ReportList{
45763		ServerResponse: googleapi.ServerResponse{
45764			Header:         res.Header,
45765			HTTPStatusCode: res.StatusCode,
45766		},
45767	}
45768	target := &ret
45769	if err := gensupport.DecodeResponse(target, res); err != nil {
45770		return nil, err
45771	}
45772	return ret, nil
45773	// {
45774	//   "description": "Retrieves list of reports.",
45775	//   "flatPath": "userprofiles/{profileId}/reports",
45776	//   "httpMethod": "GET",
45777	//   "id": "dfareporting.reports.list",
45778	//   "parameterOrder": [
45779	//     "profileId"
45780	//   ],
45781	//   "parameters": {
45782	//     "maxResults": {
45783	//       "default": "10",
45784	//       "description": "Maximum number of results to return.",
45785	//       "format": "int32",
45786	//       "location": "query",
45787	//       "maximum": "10",
45788	//       "minimum": "0",
45789	//       "type": "integer"
45790	//     },
45791	//     "pageToken": {
45792	//       "description": "The value of the nextToken from the previous result page.",
45793	//       "location": "query",
45794	//       "type": "string"
45795	//     },
45796	//     "profileId": {
45797	//       "description": "The Campaign Manager 360 user profile ID.",
45798	//       "format": "int64",
45799	//       "location": "path",
45800	//       "required": true,
45801	//       "type": "string"
45802	//     },
45803	//     "scope": {
45804	//       "default": "MINE",
45805	//       "description": "The scope that defines which results are returned.",
45806	//       "enum": [
45807	//         "ALL",
45808	//         "MINE"
45809	//       ],
45810	//       "enumDescriptions": [
45811	//         "All reports in account.",
45812	//         "My reports."
45813	//       ],
45814	//       "location": "query",
45815	//       "type": "string"
45816	//     },
45817	//     "sortField": {
45818	//       "default": "LAST_MODIFIED_TIME",
45819	//       "description": "The field by which to sort the list.",
45820	//       "enum": [
45821	//         "ID",
45822	//         "LAST_MODIFIED_TIME",
45823	//         "NAME"
45824	//       ],
45825	//       "enumDescriptions": [
45826	//         "Sort by report ID.",
45827	//         "Sort by 'lastModifiedTime' field.",
45828	//         "Sort by name of reports."
45829	//       ],
45830	//       "location": "query",
45831	//       "type": "string"
45832	//     },
45833	//     "sortOrder": {
45834	//       "default": "DESCENDING",
45835	//       "description": "Order of sorted results.",
45836	//       "enum": [
45837	//         "ASCENDING",
45838	//         "DESCENDING"
45839	//       ],
45840	//       "enumDescriptions": [
45841	//         "Ascending order.",
45842	//         "Descending order."
45843	//       ],
45844	//       "location": "query",
45845	//       "type": "string"
45846	//     }
45847	//   },
45848	//   "path": "userprofiles/{profileId}/reports",
45849	//   "response": {
45850	//     "$ref": "ReportList"
45851	//   },
45852	//   "scopes": [
45853	//     "https://www.googleapis.com/auth/dfareporting"
45854	//   ]
45855	// }
45856
45857}
45858
45859// Pages invokes f for each page of results.
45860// A non-nil error returned from f will halt the iteration.
45861// The provided context supersedes any context provided to the Context method.
45862func (c *ReportsListCall) Pages(ctx context.Context, f func(*ReportList) error) error {
45863	c.ctx_ = ctx
45864	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45865	for {
45866		x, err := c.Do()
45867		if err != nil {
45868			return err
45869		}
45870		if err := f(x); err != nil {
45871			return err
45872		}
45873		if x.NextPageToken == "" {
45874			return nil
45875		}
45876		c.PageToken(x.NextPageToken)
45877	}
45878}
45879
45880// method id "dfareporting.reports.patch":
45881
45882type ReportsPatchCall struct {
45883	s          *Service
45884	profileId  int64
45885	reportId   int64
45886	report     *Report
45887	urlParams_ gensupport.URLParams
45888	ctx_       context.Context
45889	header_    http.Header
45890}
45891
45892// Patch: Updates an existing report. This method supports patch
45893// semantics.
45894//
45895// - profileId: The DFA user profile ID.
45896// - reportId: The ID of the report.
45897func (r *ReportsService) Patch(profileId int64, reportId int64, report *Report) *ReportsPatchCall {
45898	c := &ReportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45899	c.profileId = profileId
45900	c.reportId = reportId
45901	c.report = report
45902	return c
45903}
45904
45905// Fields allows partial responses to be retrieved. See
45906// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45907// for more information.
45908func (c *ReportsPatchCall) Fields(s ...googleapi.Field) *ReportsPatchCall {
45909	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45910	return c
45911}
45912
45913// Context sets the context to be used in this call's Do method. Any
45914// pending HTTP request will be aborted if the provided context is
45915// canceled.
45916func (c *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
45917	c.ctx_ = ctx
45918	return c
45919}
45920
45921// Header returns an http.Header that can be modified by the caller to
45922// add HTTP headers to the request.
45923func (c *ReportsPatchCall) Header() http.Header {
45924	if c.header_ == nil {
45925		c.header_ = make(http.Header)
45926	}
45927	return c.header_
45928}
45929
45930func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
45931	reqHeaders := make(http.Header)
45932	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
45933	for k, v := range c.header_ {
45934		reqHeaders[k] = v
45935	}
45936	reqHeaders.Set("User-Agent", c.s.userAgent())
45937	var body io.Reader = nil
45938	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
45939	if err != nil {
45940		return nil, err
45941	}
45942	reqHeaders.Set("Content-Type", "application/json")
45943	c.urlParams_.Set("alt", alt)
45944	c.urlParams_.Set("prettyPrint", "false")
45945	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
45946	urls += "?" + c.urlParams_.Encode()
45947	req, err := http.NewRequest("PATCH", urls, body)
45948	if err != nil {
45949		return nil, err
45950	}
45951	req.Header = reqHeaders
45952	googleapi.Expand(req.URL, map[string]string{
45953		"profileId": strconv.FormatInt(c.profileId, 10),
45954		"reportId":  strconv.FormatInt(c.reportId, 10),
45955	})
45956	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45957}
45958
45959// Do executes the "dfareporting.reports.patch" call.
45960// Exactly one of *Report or error will be non-nil. Any non-2xx status
45961// code is an error. Response headers are in either
45962// *Report.ServerResponse.Header or (if a response was returned at all)
45963// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
45964// check whether the returned error was because http.StatusNotModified
45965// was returned.
45966func (c *ReportsPatchCall) Do(opts ...googleapi.CallOption) (*Report, error) {
45967	gensupport.SetOptions(c.urlParams_, opts...)
45968	res, err := c.doRequest("json")
45969	if res != nil && res.StatusCode == http.StatusNotModified {
45970		if res.Body != nil {
45971			res.Body.Close()
45972		}
45973		return nil, &googleapi.Error{
45974			Code:   res.StatusCode,
45975			Header: res.Header,
45976		}
45977	}
45978	if err != nil {
45979		return nil, err
45980	}
45981	defer googleapi.CloseBody(res)
45982	if err := googleapi.CheckResponse(res); err != nil {
45983		return nil, err
45984	}
45985	ret := &Report{
45986		ServerResponse: googleapi.ServerResponse{
45987			Header:         res.Header,
45988			HTTPStatusCode: res.StatusCode,
45989		},
45990	}
45991	target := &ret
45992	if err := gensupport.DecodeResponse(target, res); err != nil {
45993		return nil, err
45994	}
45995	return ret, nil
45996	// {
45997	//   "description": "Updates an existing report. This method supports patch semantics.",
45998	//   "flatPath": "userprofiles/{profileId}/reports/{reportId}",
45999	//   "httpMethod": "PATCH",
46000	//   "id": "dfareporting.reports.patch",
46001	//   "parameterOrder": [
46002	//     "profileId",
46003	//     "reportId"
46004	//   ],
46005	//   "parameters": {
46006	//     "profileId": {
46007	//       "description": "The DFA user profile ID.",
46008	//       "format": "int64",
46009	//       "location": "path",
46010	//       "required": true,
46011	//       "type": "string"
46012	//     },
46013	//     "reportId": {
46014	//       "description": "The ID of the report.",
46015	//       "format": "int64",
46016	//       "location": "path",
46017	//       "required": true,
46018	//       "type": "string"
46019	//     }
46020	//   },
46021	//   "path": "userprofiles/{profileId}/reports/{reportId}",
46022	//   "request": {
46023	//     "$ref": "Report"
46024	//   },
46025	//   "response": {
46026	//     "$ref": "Report"
46027	//   },
46028	//   "scopes": [
46029	//     "https://www.googleapis.com/auth/dfareporting"
46030	//   ]
46031	// }
46032
46033}
46034
46035// method id "dfareporting.reports.run":
46036
46037type ReportsRunCall struct {
46038	s          *Service
46039	profileId  int64
46040	reportId   int64
46041	urlParams_ gensupport.URLParams
46042	ctx_       context.Context
46043	header_    http.Header
46044}
46045
46046// Run: Runs a report.
46047//
46048// - profileId: The Campaign Manager 360 user profile ID.
46049// - reportId: The ID of the report.
46050func (r *ReportsService) Run(profileId int64, reportId int64) *ReportsRunCall {
46051	c := &ReportsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46052	c.profileId = profileId
46053	c.reportId = reportId
46054	return c
46055}
46056
46057// Synchronous sets the optional parameter "synchronous": If set and
46058// true, tries to run the report synchronously.
46059func (c *ReportsRunCall) Synchronous(synchronous bool) *ReportsRunCall {
46060	c.urlParams_.Set("synchronous", fmt.Sprint(synchronous))
46061	return c
46062}
46063
46064// Fields allows partial responses to be retrieved. See
46065// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46066// for more information.
46067func (c *ReportsRunCall) Fields(s ...googleapi.Field) *ReportsRunCall {
46068	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46069	return c
46070}
46071
46072// Context sets the context to be used in this call's Do method. Any
46073// pending HTTP request will be aborted if the provided context is
46074// canceled.
46075func (c *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
46076	c.ctx_ = ctx
46077	return c
46078}
46079
46080// Header returns an http.Header that can be modified by the caller to
46081// add HTTP headers to the request.
46082func (c *ReportsRunCall) Header() http.Header {
46083	if c.header_ == nil {
46084		c.header_ = make(http.Header)
46085	}
46086	return c.header_
46087}
46088
46089func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
46090	reqHeaders := make(http.Header)
46091	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
46092	for k, v := range c.header_ {
46093		reqHeaders[k] = v
46094	}
46095	reqHeaders.Set("User-Agent", c.s.userAgent())
46096	var body io.Reader = nil
46097	c.urlParams_.Set("alt", alt)
46098	c.urlParams_.Set("prettyPrint", "false")
46099	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/run")
46100	urls += "?" + c.urlParams_.Encode()
46101	req, err := http.NewRequest("POST", urls, body)
46102	if err != nil {
46103		return nil, err
46104	}
46105	req.Header = reqHeaders
46106	googleapi.Expand(req.URL, map[string]string{
46107		"profileId": strconv.FormatInt(c.profileId, 10),
46108		"reportId":  strconv.FormatInt(c.reportId, 10),
46109	})
46110	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46111}
46112
46113// Do executes the "dfareporting.reports.run" call.
46114// Exactly one of *File or error will be non-nil. Any non-2xx status
46115// code is an error. Response headers are in either
46116// *File.ServerResponse.Header or (if a response was returned at all) in
46117// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46118// whether the returned error was because http.StatusNotModified was
46119// returned.
46120func (c *ReportsRunCall) Do(opts ...googleapi.CallOption) (*File, error) {
46121	gensupport.SetOptions(c.urlParams_, opts...)
46122	res, err := c.doRequest("json")
46123	if res != nil && res.StatusCode == http.StatusNotModified {
46124		if res.Body != nil {
46125			res.Body.Close()
46126		}
46127		return nil, &googleapi.Error{
46128			Code:   res.StatusCode,
46129			Header: res.Header,
46130		}
46131	}
46132	if err != nil {
46133		return nil, err
46134	}
46135	defer googleapi.CloseBody(res)
46136	if err := googleapi.CheckResponse(res); err != nil {
46137		return nil, err
46138	}
46139	ret := &File{
46140		ServerResponse: googleapi.ServerResponse{
46141			Header:         res.Header,
46142			HTTPStatusCode: res.StatusCode,
46143		},
46144	}
46145	target := &ret
46146	if err := gensupport.DecodeResponse(target, res); err != nil {
46147		return nil, err
46148	}
46149	return ret, nil
46150	// {
46151	//   "description": "Runs a report.",
46152	//   "flatPath": "userprofiles/{profileId}/reports/{reportId}/run",
46153	//   "httpMethod": "POST",
46154	//   "id": "dfareporting.reports.run",
46155	//   "parameterOrder": [
46156	//     "profileId",
46157	//     "reportId"
46158	//   ],
46159	//   "parameters": {
46160	//     "profileId": {
46161	//       "description": "The Campaign Manager 360 user profile ID.",
46162	//       "format": "int64",
46163	//       "location": "path",
46164	//       "required": true,
46165	//       "type": "string"
46166	//     },
46167	//     "reportId": {
46168	//       "description": "The ID of the report.",
46169	//       "format": "int64",
46170	//       "location": "path",
46171	//       "required": true,
46172	//       "type": "string"
46173	//     },
46174	//     "synchronous": {
46175	//       "default": "false",
46176	//       "description": "If set and true, tries to run the report synchronously.",
46177	//       "location": "query",
46178	//       "type": "boolean"
46179	//     }
46180	//   },
46181	//   "path": "userprofiles/{profileId}/reports/{reportId}/run",
46182	//   "response": {
46183	//     "$ref": "File"
46184	//   },
46185	//   "scopes": [
46186	//     "https://www.googleapis.com/auth/dfareporting"
46187	//   ]
46188	// }
46189
46190}
46191
46192// method id "dfareporting.reports.update":
46193
46194type ReportsUpdateCall struct {
46195	s          *Service
46196	profileId  int64
46197	reportId   int64
46198	report     *Report
46199	urlParams_ gensupport.URLParams
46200	ctx_       context.Context
46201	header_    http.Header
46202}
46203
46204// Update: Updates a report.
46205//
46206// - profileId: The Campaign Manager 360 user profile ID.
46207// - reportId: The ID of the report.
46208func (r *ReportsService) Update(profileId int64, reportId int64, report *Report) *ReportsUpdateCall {
46209	c := &ReportsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46210	c.profileId = profileId
46211	c.reportId = reportId
46212	c.report = report
46213	return c
46214}
46215
46216// Fields allows partial responses to be retrieved. See
46217// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46218// for more information.
46219func (c *ReportsUpdateCall) Fields(s ...googleapi.Field) *ReportsUpdateCall {
46220	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46221	return c
46222}
46223
46224// Context sets the context to be used in this call's Do method. Any
46225// pending HTTP request will be aborted if the provided context is
46226// canceled.
46227func (c *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
46228	c.ctx_ = ctx
46229	return c
46230}
46231
46232// Header returns an http.Header that can be modified by the caller to
46233// add HTTP headers to the request.
46234func (c *ReportsUpdateCall) Header() http.Header {
46235	if c.header_ == nil {
46236		c.header_ = make(http.Header)
46237	}
46238	return c.header_
46239}
46240
46241func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
46242	reqHeaders := make(http.Header)
46243	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
46244	for k, v := range c.header_ {
46245		reqHeaders[k] = v
46246	}
46247	reqHeaders.Set("User-Agent", c.s.userAgent())
46248	var body io.Reader = nil
46249	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
46250	if err != nil {
46251		return nil, err
46252	}
46253	reqHeaders.Set("Content-Type", "application/json")
46254	c.urlParams_.Set("alt", alt)
46255	c.urlParams_.Set("prettyPrint", "false")
46256	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
46257	urls += "?" + c.urlParams_.Encode()
46258	req, err := http.NewRequest("PUT", urls, body)
46259	if err != nil {
46260		return nil, err
46261	}
46262	req.Header = reqHeaders
46263	googleapi.Expand(req.URL, map[string]string{
46264		"profileId": strconv.FormatInt(c.profileId, 10),
46265		"reportId":  strconv.FormatInt(c.reportId, 10),
46266	})
46267	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46268}
46269
46270// Do executes the "dfareporting.reports.update" call.
46271// Exactly one of *Report or error will be non-nil. Any non-2xx status
46272// code is an error. Response headers are in either
46273// *Report.ServerResponse.Header or (if a response was returned at all)
46274// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
46275// check whether the returned error was because http.StatusNotModified
46276// was returned.
46277func (c *ReportsUpdateCall) Do(opts ...googleapi.CallOption) (*Report, error) {
46278	gensupport.SetOptions(c.urlParams_, opts...)
46279	res, err := c.doRequest("json")
46280	if res != nil && res.StatusCode == http.StatusNotModified {
46281		if res.Body != nil {
46282			res.Body.Close()
46283		}
46284		return nil, &googleapi.Error{
46285			Code:   res.StatusCode,
46286			Header: res.Header,
46287		}
46288	}
46289	if err != nil {
46290		return nil, err
46291	}
46292	defer googleapi.CloseBody(res)
46293	if err := googleapi.CheckResponse(res); err != nil {
46294		return nil, err
46295	}
46296	ret := &Report{
46297		ServerResponse: googleapi.ServerResponse{
46298			Header:         res.Header,
46299			HTTPStatusCode: res.StatusCode,
46300		},
46301	}
46302	target := &ret
46303	if err := gensupport.DecodeResponse(target, res); err != nil {
46304		return nil, err
46305	}
46306	return ret, nil
46307	// {
46308	//   "description": "Updates a report.",
46309	//   "flatPath": "userprofiles/{profileId}/reports/{reportId}",
46310	//   "httpMethod": "PUT",
46311	//   "id": "dfareporting.reports.update",
46312	//   "parameterOrder": [
46313	//     "profileId",
46314	//     "reportId"
46315	//   ],
46316	//   "parameters": {
46317	//     "profileId": {
46318	//       "description": "The Campaign Manager 360 user profile ID.",
46319	//       "format": "int64",
46320	//       "location": "path",
46321	//       "required": true,
46322	//       "type": "string"
46323	//     },
46324	//     "reportId": {
46325	//       "description": "The ID of the report.",
46326	//       "format": "int64",
46327	//       "location": "path",
46328	//       "required": true,
46329	//       "type": "string"
46330	//     }
46331	//   },
46332	//   "path": "userprofiles/{profileId}/reports/{reportId}",
46333	//   "request": {
46334	//     "$ref": "Report"
46335	//   },
46336	//   "response": {
46337	//     "$ref": "Report"
46338	//   },
46339	//   "scopes": [
46340	//     "https://www.googleapis.com/auth/dfareporting"
46341	//   ]
46342	// }
46343
46344}
46345
46346// method id "dfareporting.reports.compatibleFields.query":
46347
46348type ReportsCompatibleFieldsQueryCall struct {
46349	s          *Service
46350	profileId  int64
46351	report     *Report
46352	urlParams_ gensupport.URLParams
46353	ctx_       context.Context
46354	header_    http.Header
46355}
46356
46357// Query: Returns the fields that are compatible to be selected in the
46358// respective sections of a report criteria, given the fields already
46359// selected in the input report and user permissions.
46360//
46361// - profileId: The Campaign Manager 360 user profile ID.
46362func (r *ReportsCompatibleFieldsService) Query(profileId int64, report *Report) *ReportsCompatibleFieldsQueryCall {
46363	c := &ReportsCompatibleFieldsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46364	c.profileId = profileId
46365	c.report = report
46366	return c
46367}
46368
46369// Fields allows partial responses to be retrieved. See
46370// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46371// for more information.
46372func (c *ReportsCompatibleFieldsQueryCall) Fields(s ...googleapi.Field) *ReportsCompatibleFieldsQueryCall {
46373	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46374	return c
46375}
46376
46377// Context sets the context to be used in this call's Do method. Any
46378// pending HTTP request will be aborted if the provided context is
46379// canceled.
46380func (c *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
46381	c.ctx_ = ctx
46382	return c
46383}
46384
46385// Header returns an http.Header that can be modified by the caller to
46386// add HTTP headers to the request.
46387func (c *ReportsCompatibleFieldsQueryCall) Header() http.Header {
46388	if c.header_ == nil {
46389		c.header_ = make(http.Header)
46390	}
46391	return c.header_
46392}
46393
46394func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
46395	reqHeaders := make(http.Header)
46396	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
46397	for k, v := range c.header_ {
46398		reqHeaders[k] = v
46399	}
46400	reqHeaders.Set("User-Agent", c.s.userAgent())
46401	var body io.Reader = nil
46402	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
46403	if err != nil {
46404		return nil, err
46405	}
46406	reqHeaders.Set("Content-Type", "application/json")
46407	c.urlParams_.Set("alt", alt)
46408	c.urlParams_.Set("prettyPrint", "false")
46409	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/compatiblefields/query")
46410	urls += "?" + c.urlParams_.Encode()
46411	req, err := http.NewRequest("POST", urls, body)
46412	if err != nil {
46413		return nil, err
46414	}
46415	req.Header = reqHeaders
46416	googleapi.Expand(req.URL, map[string]string{
46417		"profileId": strconv.FormatInt(c.profileId, 10),
46418	})
46419	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46420}
46421
46422// Do executes the "dfareporting.reports.compatibleFields.query" call.
46423// Exactly one of *CompatibleFields or error will be non-nil. Any
46424// non-2xx status code is an error. Response headers are in either
46425// *CompatibleFields.ServerResponse.Header or (if a response was
46426// returned at all) in error.(*googleapi.Error).Header. Use
46427// googleapi.IsNotModified to check whether the returned error was
46428// because http.StatusNotModified was returned.
46429func (c *ReportsCompatibleFieldsQueryCall) Do(opts ...googleapi.CallOption) (*CompatibleFields, error) {
46430	gensupport.SetOptions(c.urlParams_, opts...)
46431	res, err := c.doRequest("json")
46432	if res != nil && res.StatusCode == http.StatusNotModified {
46433		if res.Body != nil {
46434			res.Body.Close()
46435		}
46436		return nil, &googleapi.Error{
46437			Code:   res.StatusCode,
46438			Header: res.Header,
46439		}
46440	}
46441	if err != nil {
46442		return nil, err
46443	}
46444	defer googleapi.CloseBody(res)
46445	if err := googleapi.CheckResponse(res); err != nil {
46446		return nil, err
46447	}
46448	ret := &CompatibleFields{
46449		ServerResponse: googleapi.ServerResponse{
46450			Header:         res.Header,
46451			HTTPStatusCode: res.StatusCode,
46452		},
46453	}
46454	target := &ret
46455	if err := gensupport.DecodeResponse(target, res); err != nil {
46456		return nil, err
46457	}
46458	return ret, nil
46459	// {
46460	//   "description": "Returns the fields that are compatible to be selected in the respective sections of a report criteria, given the fields already selected in the input report and user permissions.",
46461	//   "flatPath": "userprofiles/{profileId}/reports/compatiblefields/query",
46462	//   "httpMethod": "POST",
46463	//   "id": "dfareporting.reports.compatibleFields.query",
46464	//   "parameterOrder": [
46465	//     "profileId"
46466	//   ],
46467	//   "parameters": {
46468	//     "profileId": {
46469	//       "description": "The Campaign Manager 360 user profile ID.",
46470	//       "format": "int64",
46471	//       "location": "path",
46472	//       "required": true,
46473	//       "type": "string"
46474	//     }
46475	//   },
46476	//   "path": "userprofiles/{profileId}/reports/compatiblefields/query",
46477	//   "request": {
46478	//     "$ref": "Report"
46479	//   },
46480	//   "response": {
46481	//     "$ref": "CompatibleFields"
46482	//   },
46483	//   "scopes": [
46484	//     "https://www.googleapis.com/auth/dfareporting"
46485	//   ]
46486	// }
46487
46488}
46489
46490// method id "dfareporting.reports.files.get":
46491
46492type ReportsFilesGetCall struct {
46493	s            *Service
46494	profileId    int64
46495	reportId     int64
46496	fileId       int64
46497	urlParams_   gensupport.URLParams
46498	ifNoneMatch_ string
46499	ctx_         context.Context
46500	header_      http.Header
46501}
46502
46503// Get: Retrieves a report file by its report ID and file ID. This
46504// method supports media download.
46505//
46506// - fileId: The ID of the report file.
46507// - profileId: The Campaign Manager 360 user profile ID.
46508// - reportId: The ID of the report.
46509func (r *ReportsFilesService) Get(profileId int64, reportId int64, fileId int64) *ReportsFilesGetCall {
46510	c := &ReportsFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46511	c.profileId = profileId
46512	c.reportId = reportId
46513	c.fileId = fileId
46514	return c
46515}
46516
46517// Fields allows partial responses to be retrieved. See
46518// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46519// for more information.
46520func (c *ReportsFilesGetCall) Fields(s ...googleapi.Field) *ReportsFilesGetCall {
46521	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46522	return c
46523}
46524
46525// IfNoneMatch sets the optional parameter which makes the operation
46526// fail if the object's ETag matches the given value. This is useful for
46527// getting updates only after the object has changed since the last
46528// request. Use googleapi.IsNotModified to check whether the response
46529// error from Do is the result of In-None-Match.
46530func (c *ReportsFilesGetCall) IfNoneMatch(entityTag string) *ReportsFilesGetCall {
46531	c.ifNoneMatch_ = entityTag
46532	return c
46533}
46534
46535// Context sets the context to be used in this call's Do and Download
46536// methods. Any pending HTTP request will be aborted if the provided
46537// context is canceled.
46538func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
46539	c.ctx_ = ctx
46540	return c
46541}
46542
46543// Header returns an http.Header that can be modified by the caller to
46544// add HTTP headers to the request.
46545func (c *ReportsFilesGetCall) Header() http.Header {
46546	if c.header_ == nil {
46547		c.header_ = make(http.Header)
46548	}
46549	return c.header_
46550}
46551
46552func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
46553	reqHeaders := make(http.Header)
46554	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
46555	for k, v := range c.header_ {
46556		reqHeaders[k] = v
46557	}
46558	reqHeaders.Set("User-Agent", c.s.userAgent())
46559	if c.ifNoneMatch_ != "" {
46560		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46561	}
46562	var body io.Reader = nil
46563	c.urlParams_.Set("alt", alt)
46564	c.urlParams_.Set("prettyPrint", "false")
46565	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files/{fileId}")
46566	urls += "?" + c.urlParams_.Encode()
46567	req, err := http.NewRequest("GET", urls, body)
46568	if err != nil {
46569		return nil, err
46570	}
46571	req.Header = reqHeaders
46572	googleapi.Expand(req.URL, map[string]string{
46573		"profileId": strconv.FormatInt(c.profileId, 10),
46574		"reportId":  strconv.FormatInt(c.reportId, 10),
46575		"fileId":    strconv.FormatInt(c.fileId, 10),
46576	})
46577	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46578}
46579
46580// Download fetches the API endpoint's "media" value, instead of the normal
46581// API response value. If the returned error is nil, the Response is guaranteed to
46582// have a 2xx status code. Callers must close the Response.Body as usual.
46583func (c *ReportsFilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
46584	gensupport.SetOptions(c.urlParams_, opts...)
46585	res, err := c.doRequest("media")
46586	if err != nil {
46587		return nil, err
46588	}
46589	if err := googleapi.CheckResponse(res); err != nil {
46590		res.Body.Close()
46591		return nil, err
46592	}
46593	return res, nil
46594}
46595
46596// Do executes the "dfareporting.reports.files.get" call.
46597// Exactly one of *File or error will be non-nil. Any non-2xx status
46598// code is an error. Response headers are in either
46599// *File.ServerResponse.Header or (if a response was returned at all) in
46600// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46601// whether the returned error was because http.StatusNotModified was
46602// returned.
46603func (c *ReportsFilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
46604	gensupport.SetOptions(c.urlParams_, opts...)
46605	res, err := c.doRequest("json")
46606	if res != nil && res.StatusCode == http.StatusNotModified {
46607		if res.Body != nil {
46608			res.Body.Close()
46609		}
46610		return nil, &googleapi.Error{
46611			Code:   res.StatusCode,
46612			Header: res.Header,
46613		}
46614	}
46615	if err != nil {
46616		return nil, err
46617	}
46618	defer googleapi.CloseBody(res)
46619	if err := googleapi.CheckResponse(res); err != nil {
46620		return nil, err
46621	}
46622	ret := &File{
46623		ServerResponse: googleapi.ServerResponse{
46624			Header:         res.Header,
46625			HTTPStatusCode: res.StatusCode,
46626		},
46627	}
46628	target := &ret
46629	if err := gensupport.DecodeResponse(target, res); err != nil {
46630		return nil, err
46631	}
46632	return ret, nil
46633	// {
46634	//   "description": "Retrieves a report file by its report ID and file ID. This method supports media download.",
46635	//   "flatPath": "userprofiles/{profileId}/reports/{reportId}/files/{fileId}",
46636	//   "httpMethod": "GET",
46637	//   "id": "dfareporting.reports.files.get",
46638	//   "parameterOrder": [
46639	//     "profileId",
46640	//     "reportId",
46641	//     "fileId"
46642	//   ],
46643	//   "parameters": {
46644	//     "fileId": {
46645	//       "description": "The ID of the report file.",
46646	//       "format": "int64",
46647	//       "location": "path",
46648	//       "required": true,
46649	//       "type": "string"
46650	//     },
46651	//     "profileId": {
46652	//       "description": "The Campaign Manager 360 user profile ID.",
46653	//       "format": "int64",
46654	//       "location": "path",
46655	//       "required": true,
46656	//       "type": "string"
46657	//     },
46658	//     "reportId": {
46659	//       "description": "The ID of the report.",
46660	//       "format": "int64",
46661	//       "location": "path",
46662	//       "required": true,
46663	//       "type": "string"
46664	//     }
46665	//   },
46666	//   "path": "userprofiles/{profileId}/reports/{reportId}/files/{fileId}",
46667	//   "response": {
46668	//     "$ref": "File"
46669	//   },
46670	//   "scopes": [
46671	//     "https://www.googleapis.com/auth/dfareporting"
46672	//   ],
46673	//   "supportsMediaDownload": true
46674	// }
46675
46676}
46677
46678// method id "dfareporting.reports.files.list":
46679
46680type ReportsFilesListCall struct {
46681	s            *Service
46682	profileId    int64
46683	reportId     int64
46684	urlParams_   gensupport.URLParams
46685	ifNoneMatch_ string
46686	ctx_         context.Context
46687	header_      http.Header
46688}
46689
46690// List: Lists files for a report.
46691//
46692// - profileId: The Campaign Manager 360 user profile ID.
46693// - reportId: The ID of the parent report.
46694func (r *ReportsFilesService) List(profileId int64, reportId int64) *ReportsFilesListCall {
46695	c := &ReportsFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46696	c.profileId = profileId
46697	c.reportId = reportId
46698	return c
46699}
46700
46701// MaxResults sets the optional parameter "maxResults": Maximum number
46702// of results to return.
46703func (c *ReportsFilesListCall) MaxResults(maxResults int64) *ReportsFilesListCall {
46704	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
46705	return c
46706}
46707
46708// PageToken sets the optional parameter "pageToken": The value of the
46709// nextToken from the previous result page.
46710func (c *ReportsFilesListCall) PageToken(pageToken string) *ReportsFilesListCall {
46711	c.urlParams_.Set("pageToken", pageToken)
46712	return c
46713}
46714
46715// SortField sets the optional parameter "sortField": The field by which
46716// to sort the list.
46717//
46718// Possible values:
46719//   "ID"
46720//   "LAST_MODIFIED_TIME" (default)
46721func (c *ReportsFilesListCall) SortField(sortField string) *ReportsFilesListCall {
46722	c.urlParams_.Set("sortField", sortField)
46723	return c
46724}
46725
46726// SortOrder sets the optional parameter "sortOrder": Order of sorted
46727// results.
46728//
46729// Possible values:
46730//   "ASCENDING"
46731//   "DESCENDING" (default)
46732func (c *ReportsFilesListCall) SortOrder(sortOrder string) *ReportsFilesListCall {
46733	c.urlParams_.Set("sortOrder", sortOrder)
46734	return c
46735}
46736
46737// Fields allows partial responses to be retrieved. See
46738// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46739// for more information.
46740func (c *ReportsFilesListCall) Fields(s ...googleapi.Field) *ReportsFilesListCall {
46741	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46742	return c
46743}
46744
46745// IfNoneMatch sets the optional parameter which makes the operation
46746// fail if the object's ETag matches the given value. This is useful for
46747// getting updates only after the object has changed since the last
46748// request. Use googleapi.IsNotModified to check whether the response
46749// error from Do is the result of In-None-Match.
46750func (c *ReportsFilesListCall) IfNoneMatch(entityTag string) *ReportsFilesListCall {
46751	c.ifNoneMatch_ = entityTag
46752	return c
46753}
46754
46755// Context sets the context to be used in this call's Do method. Any
46756// pending HTTP request will be aborted if the provided context is
46757// canceled.
46758func (c *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
46759	c.ctx_ = ctx
46760	return c
46761}
46762
46763// Header returns an http.Header that can be modified by the caller to
46764// add HTTP headers to the request.
46765func (c *ReportsFilesListCall) Header() http.Header {
46766	if c.header_ == nil {
46767		c.header_ = make(http.Header)
46768	}
46769	return c.header_
46770}
46771
46772func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
46773	reqHeaders := make(http.Header)
46774	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
46775	for k, v := range c.header_ {
46776		reqHeaders[k] = v
46777	}
46778	reqHeaders.Set("User-Agent", c.s.userAgent())
46779	if c.ifNoneMatch_ != "" {
46780		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46781	}
46782	var body io.Reader = nil
46783	c.urlParams_.Set("alt", alt)
46784	c.urlParams_.Set("prettyPrint", "false")
46785	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files")
46786	urls += "?" + c.urlParams_.Encode()
46787	req, err := http.NewRequest("GET", urls, body)
46788	if err != nil {
46789		return nil, err
46790	}
46791	req.Header = reqHeaders
46792	googleapi.Expand(req.URL, map[string]string{
46793		"profileId": strconv.FormatInt(c.profileId, 10),
46794		"reportId":  strconv.FormatInt(c.reportId, 10),
46795	})
46796	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46797}
46798
46799// Do executes the "dfareporting.reports.files.list" call.
46800// Exactly one of *FileList or error will be non-nil. Any non-2xx status
46801// code is an error. Response headers are in either
46802// *FileList.ServerResponse.Header or (if a response was returned at
46803// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46804// to check whether the returned error was because
46805// http.StatusNotModified was returned.
46806func (c *ReportsFilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
46807	gensupport.SetOptions(c.urlParams_, opts...)
46808	res, err := c.doRequest("json")
46809	if res != nil && res.StatusCode == http.StatusNotModified {
46810		if res.Body != nil {
46811			res.Body.Close()
46812		}
46813		return nil, &googleapi.Error{
46814			Code:   res.StatusCode,
46815			Header: res.Header,
46816		}
46817	}
46818	if err != nil {
46819		return nil, err
46820	}
46821	defer googleapi.CloseBody(res)
46822	if err := googleapi.CheckResponse(res); err != nil {
46823		return nil, err
46824	}
46825	ret := &FileList{
46826		ServerResponse: googleapi.ServerResponse{
46827			Header:         res.Header,
46828			HTTPStatusCode: res.StatusCode,
46829		},
46830	}
46831	target := &ret
46832	if err := gensupport.DecodeResponse(target, res); err != nil {
46833		return nil, err
46834	}
46835	return ret, nil
46836	// {
46837	//   "description": "Lists files for a report.",
46838	//   "flatPath": "userprofiles/{profileId}/reports/{reportId}/files",
46839	//   "httpMethod": "GET",
46840	//   "id": "dfareporting.reports.files.list",
46841	//   "parameterOrder": [
46842	//     "profileId",
46843	//     "reportId"
46844	//   ],
46845	//   "parameters": {
46846	//     "maxResults": {
46847	//       "default": "10",
46848	//       "description": "Maximum number of results to return.",
46849	//       "format": "int32",
46850	//       "location": "query",
46851	//       "maximum": "10",
46852	//       "minimum": "0",
46853	//       "type": "integer"
46854	//     },
46855	//     "pageToken": {
46856	//       "description": "The value of the nextToken from the previous result page.",
46857	//       "location": "query",
46858	//       "type": "string"
46859	//     },
46860	//     "profileId": {
46861	//       "description": "The Campaign Manager 360 user profile ID.",
46862	//       "format": "int64",
46863	//       "location": "path",
46864	//       "required": true,
46865	//       "type": "string"
46866	//     },
46867	//     "reportId": {
46868	//       "description": "The ID of the parent report.",
46869	//       "format": "int64",
46870	//       "location": "path",
46871	//       "required": true,
46872	//       "type": "string"
46873	//     },
46874	//     "sortField": {
46875	//       "default": "LAST_MODIFIED_TIME",
46876	//       "description": "The field by which to sort the list.",
46877	//       "enum": [
46878	//         "ID",
46879	//         "LAST_MODIFIED_TIME"
46880	//       ],
46881	//       "enumDescriptions": [
46882	//         "",
46883	//         ""
46884	//       ],
46885	//       "location": "query",
46886	//       "type": "string"
46887	//     },
46888	//     "sortOrder": {
46889	//       "default": "DESCENDING",
46890	//       "description": "Order of sorted results.",
46891	//       "enum": [
46892	//         "ASCENDING",
46893	//         "DESCENDING"
46894	//       ],
46895	//       "enumDescriptions": [
46896	//         "",
46897	//         ""
46898	//       ],
46899	//       "location": "query",
46900	//       "type": "string"
46901	//     }
46902	//   },
46903	//   "path": "userprofiles/{profileId}/reports/{reportId}/files",
46904	//   "response": {
46905	//     "$ref": "FileList"
46906	//   },
46907	//   "scopes": [
46908	//     "https://www.googleapis.com/auth/dfareporting"
46909	//   ]
46910	// }
46911
46912}
46913
46914// Pages invokes f for each page of results.
46915// A non-nil error returned from f will halt the iteration.
46916// The provided context supersedes any context provided to the Context method.
46917func (c *ReportsFilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
46918	c.ctx_ = ctx
46919	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
46920	for {
46921		x, err := c.Do()
46922		if err != nil {
46923			return err
46924		}
46925		if err := f(x); err != nil {
46926			return err
46927		}
46928		if x.NextPageToken == "" {
46929			return nil
46930		}
46931		c.PageToken(x.NextPageToken)
46932	}
46933}
46934
46935// method id "dfareporting.sites.get":
46936
46937type SitesGetCall struct {
46938	s            *Service
46939	profileId    int64
46940	id           int64
46941	urlParams_   gensupport.URLParams
46942	ifNoneMatch_ string
46943	ctx_         context.Context
46944	header_      http.Header
46945}
46946
46947// Get: Gets one site by ID.
46948//
46949// - id: Site ID.
46950// - profileId: User profile ID associated with this request.
46951func (r *SitesService) Get(profileId int64, id int64) *SitesGetCall {
46952	c := &SitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46953	c.profileId = profileId
46954	c.id = id
46955	return c
46956}
46957
46958// Fields allows partial responses to be retrieved. See
46959// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46960// for more information.
46961func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall {
46962	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46963	return c
46964}
46965
46966// IfNoneMatch sets the optional parameter which makes the operation
46967// fail if the object's ETag matches the given value. This is useful for
46968// getting updates only after the object has changed since the last
46969// request. Use googleapi.IsNotModified to check whether the response
46970// error from Do is the result of In-None-Match.
46971func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall {
46972	c.ifNoneMatch_ = entityTag
46973	return c
46974}
46975
46976// Context sets the context to be used in this call's Do method. Any
46977// pending HTTP request will be aborted if the provided context is
46978// canceled.
46979func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
46980	c.ctx_ = ctx
46981	return c
46982}
46983
46984// Header returns an http.Header that can be modified by the caller to
46985// add HTTP headers to the request.
46986func (c *SitesGetCall) Header() http.Header {
46987	if c.header_ == nil {
46988		c.header_ = make(http.Header)
46989	}
46990	return c.header_
46991}
46992
46993func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
46994	reqHeaders := make(http.Header)
46995	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
46996	for k, v := range c.header_ {
46997		reqHeaders[k] = v
46998	}
46999	reqHeaders.Set("User-Agent", c.s.userAgent())
47000	if c.ifNoneMatch_ != "" {
47001		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47002	}
47003	var body io.Reader = nil
47004	c.urlParams_.Set("alt", alt)
47005	c.urlParams_.Set("prettyPrint", "false")
47006	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites/{id}")
47007	urls += "?" + c.urlParams_.Encode()
47008	req, err := http.NewRequest("GET", urls, body)
47009	if err != nil {
47010		return nil, err
47011	}
47012	req.Header = reqHeaders
47013	googleapi.Expand(req.URL, map[string]string{
47014		"profileId": strconv.FormatInt(c.profileId, 10),
47015		"id":        strconv.FormatInt(c.id, 10),
47016	})
47017	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47018}
47019
47020// Do executes the "dfareporting.sites.get" call.
47021// Exactly one of *Site or error will be non-nil. Any non-2xx status
47022// code is an error. Response headers are in either
47023// *Site.ServerResponse.Header or (if a response was returned at all) in
47024// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
47025// whether the returned error was because http.StatusNotModified was
47026// returned.
47027func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*Site, error) {
47028	gensupport.SetOptions(c.urlParams_, opts...)
47029	res, err := c.doRequest("json")
47030	if res != nil && res.StatusCode == http.StatusNotModified {
47031		if res.Body != nil {
47032			res.Body.Close()
47033		}
47034		return nil, &googleapi.Error{
47035			Code:   res.StatusCode,
47036			Header: res.Header,
47037		}
47038	}
47039	if err != nil {
47040		return nil, err
47041	}
47042	defer googleapi.CloseBody(res)
47043	if err := googleapi.CheckResponse(res); err != nil {
47044		return nil, err
47045	}
47046	ret := &Site{
47047		ServerResponse: googleapi.ServerResponse{
47048			Header:         res.Header,
47049			HTTPStatusCode: res.StatusCode,
47050		},
47051	}
47052	target := &ret
47053	if err := gensupport.DecodeResponse(target, res); err != nil {
47054		return nil, err
47055	}
47056	return ret, nil
47057	// {
47058	//   "description": "Gets one site by ID.",
47059	//   "flatPath": "userprofiles/{profileId}/sites/{id}",
47060	//   "httpMethod": "GET",
47061	//   "id": "dfareporting.sites.get",
47062	//   "parameterOrder": [
47063	//     "profileId",
47064	//     "id"
47065	//   ],
47066	//   "parameters": {
47067	//     "id": {
47068	//       "description": "Site ID.",
47069	//       "format": "int64",
47070	//       "location": "path",
47071	//       "required": true,
47072	//       "type": "string"
47073	//     },
47074	//     "profileId": {
47075	//       "description": "User profile ID associated with this request.",
47076	//       "format": "int64",
47077	//       "location": "path",
47078	//       "required": true,
47079	//       "type": "string"
47080	//     }
47081	//   },
47082	//   "path": "userprofiles/{profileId}/sites/{id}",
47083	//   "response": {
47084	//     "$ref": "Site"
47085	//   },
47086	//   "scopes": [
47087	//     "https://www.googleapis.com/auth/dfatrafficking"
47088	//   ]
47089	// }
47090
47091}
47092
47093// method id "dfareporting.sites.insert":
47094
47095type SitesInsertCall struct {
47096	s          *Service
47097	profileId  int64
47098	site       *Site
47099	urlParams_ gensupport.URLParams
47100	ctx_       context.Context
47101	header_    http.Header
47102}
47103
47104// Insert: Inserts a new site.
47105//
47106// - profileId: User profile ID associated with this request.
47107func (r *SitesService) Insert(profileId int64, site *Site) *SitesInsertCall {
47108	c := &SitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47109	c.profileId = profileId
47110	c.site = site
47111	return c
47112}
47113
47114// Fields allows partial responses to be retrieved. See
47115// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47116// for more information.
47117func (c *SitesInsertCall) Fields(s ...googleapi.Field) *SitesInsertCall {
47118	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47119	return c
47120}
47121
47122// Context sets the context to be used in this call's Do method. Any
47123// pending HTTP request will be aborted if the provided context is
47124// canceled.
47125func (c *SitesInsertCall) Context(ctx context.Context) *SitesInsertCall {
47126	c.ctx_ = ctx
47127	return c
47128}
47129
47130// Header returns an http.Header that can be modified by the caller to
47131// add HTTP headers to the request.
47132func (c *SitesInsertCall) Header() http.Header {
47133	if c.header_ == nil {
47134		c.header_ = make(http.Header)
47135	}
47136	return c.header_
47137}
47138
47139func (c *SitesInsertCall) doRequest(alt string) (*http.Response, error) {
47140	reqHeaders := make(http.Header)
47141	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
47142	for k, v := range c.header_ {
47143		reqHeaders[k] = v
47144	}
47145	reqHeaders.Set("User-Agent", c.s.userAgent())
47146	var body io.Reader = nil
47147	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
47148	if err != nil {
47149		return nil, err
47150	}
47151	reqHeaders.Set("Content-Type", "application/json")
47152	c.urlParams_.Set("alt", alt)
47153	c.urlParams_.Set("prettyPrint", "false")
47154	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
47155	urls += "?" + c.urlParams_.Encode()
47156	req, err := http.NewRequest("POST", urls, body)
47157	if err != nil {
47158		return nil, err
47159	}
47160	req.Header = reqHeaders
47161	googleapi.Expand(req.URL, map[string]string{
47162		"profileId": strconv.FormatInt(c.profileId, 10),
47163	})
47164	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47165}
47166
47167// Do executes the "dfareporting.sites.insert" call.
47168// Exactly one of *Site or error will be non-nil. Any non-2xx status
47169// code is an error. Response headers are in either
47170// *Site.ServerResponse.Header or (if a response was returned at all) in
47171// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
47172// whether the returned error was because http.StatusNotModified was
47173// returned.
47174func (c *SitesInsertCall) Do(opts ...googleapi.CallOption) (*Site, error) {
47175	gensupport.SetOptions(c.urlParams_, opts...)
47176	res, err := c.doRequest("json")
47177	if res != nil && res.StatusCode == http.StatusNotModified {
47178		if res.Body != nil {
47179			res.Body.Close()
47180		}
47181		return nil, &googleapi.Error{
47182			Code:   res.StatusCode,
47183			Header: res.Header,
47184		}
47185	}
47186	if err != nil {
47187		return nil, err
47188	}
47189	defer googleapi.CloseBody(res)
47190	if err := googleapi.CheckResponse(res); err != nil {
47191		return nil, err
47192	}
47193	ret := &Site{
47194		ServerResponse: googleapi.ServerResponse{
47195			Header:         res.Header,
47196			HTTPStatusCode: res.StatusCode,
47197		},
47198	}
47199	target := &ret
47200	if err := gensupport.DecodeResponse(target, res); err != nil {
47201		return nil, err
47202	}
47203	return ret, nil
47204	// {
47205	//   "description": "Inserts a new site.",
47206	//   "flatPath": "userprofiles/{profileId}/sites",
47207	//   "httpMethod": "POST",
47208	//   "id": "dfareporting.sites.insert",
47209	//   "parameterOrder": [
47210	//     "profileId"
47211	//   ],
47212	//   "parameters": {
47213	//     "profileId": {
47214	//       "description": "User profile ID associated with this request.",
47215	//       "format": "int64",
47216	//       "location": "path",
47217	//       "required": true,
47218	//       "type": "string"
47219	//     }
47220	//   },
47221	//   "path": "userprofiles/{profileId}/sites",
47222	//   "request": {
47223	//     "$ref": "Site"
47224	//   },
47225	//   "response": {
47226	//     "$ref": "Site"
47227	//   },
47228	//   "scopes": [
47229	//     "https://www.googleapis.com/auth/dfatrafficking"
47230	//   ]
47231	// }
47232
47233}
47234
47235// method id "dfareporting.sites.list":
47236
47237type SitesListCall struct {
47238	s            *Service
47239	profileId    int64
47240	urlParams_   gensupport.URLParams
47241	ifNoneMatch_ string
47242	ctx_         context.Context
47243	header_      http.Header
47244}
47245
47246// List: Retrieves a list of sites, possibly filtered. This method
47247// supports paging.
47248//
47249// - profileId: User profile ID associated with this request.
47250func (r *SitesService) List(profileId int64) *SitesListCall {
47251	c := &SitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47252	c.profileId = profileId
47253	return c
47254}
47255
47256// AcceptsInStreamVideoPlacements sets the optional parameter
47257// "acceptsInStreamVideoPlacements": This search filter is no longer
47258// supported and will have no effect on the results returned.
47259func (c *SitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *SitesListCall {
47260	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
47261	return c
47262}
47263
47264// AcceptsInterstitialPlacements sets the optional parameter
47265// "acceptsInterstitialPlacements": This search filter is no longer
47266// supported and will have no effect on the results returned.
47267func (c *SitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *SitesListCall {
47268	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
47269	return c
47270}
47271
47272// AcceptsPublisherPaidPlacements sets the optional parameter
47273// "acceptsPublisherPaidPlacements": Select only sites that accept
47274// publisher paid placements.
47275func (c *SitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *SitesListCall {
47276	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
47277	return c
47278}
47279
47280// AdWordsSite sets the optional parameter "adWordsSite": Select only
47281// AdWords sites.
47282func (c *SitesListCall) AdWordsSite(adWordsSite bool) *SitesListCall {
47283	c.urlParams_.Set("adWordsSite", fmt.Sprint(adWordsSite))
47284	return c
47285}
47286
47287// Approved sets the optional parameter "approved": Select only approved
47288// sites.
47289func (c *SitesListCall) Approved(approved bool) *SitesListCall {
47290	c.urlParams_.Set("approved", fmt.Sprint(approved))
47291	return c
47292}
47293
47294// CampaignIds sets the optional parameter "campaignIds": Select only
47295// sites with these campaign IDs.
47296func (c *SitesListCall) CampaignIds(campaignIds ...int64) *SitesListCall {
47297	var campaignIds_ []string
47298	for _, v := range campaignIds {
47299		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
47300	}
47301	c.urlParams_.SetMulti("campaignIds", campaignIds_)
47302	return c
47303}
47304
47305// DirectorySiteIds sets the optional parameter "directorySiteIds":
47306// Select only sites with these directory site IDs.
47307func (c *SitesListCall) DirectorySiteIds(directorySiteIds ...int64) *SitesListCall {
47308	var directorySiteIds_ []string
47309	for _, v := range directorySiteIds {
47310		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
47311	}
47312	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
47313	return c
47314}
47315
47316// Ids sets the optional parameter "ids": Select only sites with these
47317// IDs.
47318func (c *SitesListCall) Ids(ids ...int64) *SitesListCall {
47319	var ids_ []string
47320	for _, v := range ids {
47321		ids_ = append(ids_, fmt.Sprint(v))
47322	}
47323	c.urlParams_.SetMulti("ids", ids_)
47324	return c
47325}
47326
47327// MaxResults sets the optional parameter "maxResults": Maximum number
47328// of results to return.
47329func (c *SitesListCall) MaxResults(maxResults int64) *SitesListCall {
47330	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47331	return c
47332}
47333
47334// PageToken sets the optional parameter "pageToken": Value of the
47335// nextPageToken from the previous result page.
47336func (c *SitesListCall) PageToken(pageToken string) *SitesListCall {
47337	c.urlParams_.Set("pageToken", pageToken)
47338	return c
47339}
47340
47341// SearchString sets the optional parameter "searchString": Allows
47342// searching for objects by name, ID or keyName. Wildcards (*) are
47343// allowed. For example, "site*2015" will return objects with names like
47344// "site June 2015", "site April 2015", or simply "site 2015". Most of
47345// the searches also add wildcards implicitly at the start and the end
47346// of the search string. For example, a search string of "site" will
47347// match objects with name "my site", "site 2015", or simply "site".
47348func (c *SitesListCall) SearchString(searchString string) *SitesListCall {
47349	c.urlParams_.Set("searchString", searchString)
47350	return c
47351}
47352
47353// SortField sets the optional parameter "sortField": Field by which to
47354// sort the list.
47355//
47356// Possible values:
47357//   "ID" (default)
47358//   "NAME"
47359func (c *SitesListCall) SortField(sortField string) *SitesListCall {
47360	c.urlParams_.Set("sortField", sortField)
47361	return c
47362}
47363
47364// SortOrder sets the optional parameter "sortOrder": Order of sorted
47365// results.
47366//
47367// Possible values:
47368//   "ASCENDING" (default)
47369//   "DESCENDING"
47370func (c *SitesListCall) SortOrder(sortOrder string) *SitesListCall {
47371	c.urlParams_.Set("sortOrder", sortOrder)
47372	return c
47373}
47374
47375// SubaccountId sets the optional parameter "subaccountId": Select only
47376// sites with this subaccount ID.
47377func (c *SitesListCall) SubaccountId(subaccountId int64) *SitesListCall {
47378	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
47379	return c
47380}
47381
47382// UnmappedSite sets the optional parameter "unmappedSite": Select only
47383// sites that have not been mapped to a directory site.
47384func (c *SitesListCall) UnmappedSite(unmappedSite bool) *SitesListCall {
47385	c.urlParams_.Set("unmappedSite", fmt.Sprint(unmappedSite))
47386	return c
47387}
47388
47389// Fields allows partial responses to be retrieved. See
47390// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47391// for more information.
47392func (c *SitesListCall) Fields(s ...googleapi.Field) *SitesListCall {
47393	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47394	return c
47395}
47396
47397// IfNoneMatch sets the optional parameter which makes the operation
47398// fail if the object's ETag matches the given value. This is useful for
47399// getting updates only after the object has changed since the last
47400// request. Use googleapi.IsNotModified to check whether the response
47401// error from Do is the result of In-None-Match.
47402func (c *SitesListCall) IfNoneMatch(entityTag string) *SitesListCall {
47403	c.ifNoneMatch_ = entityTag
47404	return c
47405}
47406
47407// Context sets the context to be used in this call's Do method. Any
47408// pending HTTP request will be aborted if the provided context is
47409// canceled.
47410func (c *SitesListCall) Context(ctx context.Context) *SitesListCall {
47411	c.ctx_ = ctx
47412	return c
47413}
47414
47415// Header returns an http.Header that can be modified by the caller to
47416// add HTTP headers to the request.
47417func (c *SitesListCall) Header() http.Header {
47418	if c.header_ == nil {
47419		c.header_ = make(http.Header)
47420	}
47421	return c.header_
47422}
47423
47424func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
47425	reqHeaders := make(http.Header)
47426	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
47427	for k, v := range c.header_ {
47428		reqHeaders[k] = v
47429	}
47430	reqHeaders.Set("User-Agent", c.s.userAgent())
47431	if c.ifNoneMatch_ != "" {
47432		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47433	}
47434	var body io.Reader = nil
47435	c.urlParams_.Set("alt", alt)
47436	c.urlParams_.Set("prettyPrint", "false")
47437	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
47438	urls += "?" + c.urlParams_.Encode()
47439	req, err := http.NewRequest("GET", urls, body)
47440	if err != nil {
47441		return nil, err
47442	}
47443	req.Header = reqHeaders
47444	googleapi.Expand(req.URL, map[string]string{
47445		"profileId": strconv.FormatInt(c.profileId, 10),
47446	})
47447	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47448}
47449
47450// Do executes the "dfareporting.sites.list" call.
47451// Exactly one of *SitesListResponse or error will be non-nil. Any
47452// non-2xx status code is an error. Response headers are in either
47453// *SitesListResponse.ServerResponse.Header or (if a response was
47454// returned at all) in error.(*googleapi.Error).Header. Use
47455// googleapi.IsNotModified to check whether the returned error was
47456// because http.StatusNotModified was returned.
47457func (c *SitesListCall) Do(opts ...googleapi.CallOption) (*SitesListResponse, error) {
47458	gensupport.SetOptions(c.urlParams_, opts...)
47459	res, err := c.doRequest("json")
47460	if res != nil && res.StatusCode == http.StatusNotModified {
47461		if res.Body != nil {
47462			res.Body.Close()
47463		}
47464		return nil, &googleapi.Error{
47465			Code:   res.StatusCode,
47466			Header: res.Header,
47467		}
47468	}
47469	if err != nil {
47470		return nil, err
47471	}
47472	defer googleapi.CloseBody(res)
47473	if err := googleapi.CheckResponse(res); err != nil {
47474		return nil, err
47475	}
47476	ret := &SitesListResponse{
47477		ServerResponse: googleapi.ServerResponse{
47478			Header:         res.Header,
47479			HTTPStatusCode: res.StatusCode,
47480		},
47481	}
47482	target := &ret
47483	if err := gensupport.DecodeResponse(target, res); err != nil {
47484		return nil, err
47485	}
47486	return ret, nil
47487	// {
47488	//   "description": "Retrieves a list of sites, possibly filtered. This method supports paging.",
47489	//   "flatPath": "userprofiles/{profileId}/sites",
47490	//   "httpMethod": "GET",
47491	//   "id": "dfareporting.sites.list",
47492	//   "parameterOrder": [
47493	//     "profileId"
47494	//   ],
47495	//   "parameters": {
47496	//     "acceptsInStreamVideoPlacements": {
47497	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
47498	//       "location": "query",
47499	//       "type": "boolean"
47500	//     },
47501	//     "acceptsInterstitialPlacements": {
47502	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
47503	//       "location": "query",
47504	//       "type": "boolean"
47505	//     },
47506	//     "acceptsPublisherPaidPlacements": {
47507	//       "description": "Select only sites that accept publisher paid placements.",
47508	//       "location": "query",
47509	//       "type": "boolean"
47510	//     },
47511	//     "adWordsSite": {
47512	//       "description": "Select only AdWords sites.",
47513	//       "location": "query",
47514	//       "type": "boolean"
47515	//     },
47516	//     "approved": {
47517	//       "description": "Select only approved sites.",
47518	//       "location": "query",
47519	//       "type": "boolean"
47520	//     },
47521	//     "campaignIds": {
47522	//       "description": "Select only sites with these campaign IDs.",
47523	//       "format": "int64",
47524	//       "location": "query",
47525	//       "repeated": true,
47526	//       "type": "string"
47527	//     },
47528	//     "directorySiteIds": {
47529	//       "description": "Select only sites with these directory site IDs.",
47530	//       "format": "int64",
47531	//       "location": "query",
47532	//       "repeated": true,
47533	//       "type": "string"
47534	//     },
47535	//     "ids": {
47536	//       "description": "Select only sites with these IDs.",
47537	//       "format": "int64",
47538	//       "location": "query",
47539	//       "repeated": true,
47540	//       "type": "string"
47541	//     },
47542	//     "maxResults": {
47543	//       "default": "1000",
47544	//       "description": "Maximum number of results to return.",
47545	//       "format": "int32",
47546	//       "location": "query",
47547	//       "maximum": "1000",
47548	//       "minimum": "0",
47549	//       "type": "integer"
47550	//     },
47551	//     "pageToken": {
47552	//       "description": "Value of the nextPageToken from the previous result page.",
47553	//       "location": "query",
47554	//       "type": "string"
47555	//     },
47556	//     "profileId": {
47557	//       "description": "User profile ID associated with this request.",
47558	//       "format": "int64",
47559	//       "location": "path",
47560	//       "required": true,
47561	//       "type": "string"
47562	//     },
47563	//     "searchString": {
47564	//       "description": "Allows searching for objects by name, ID or keyName. Wildcards (*) are allowed. For example, \"site*2015\" will return objects with names like \"site June 2015\", \"site April 2015\", or simply \"site 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"site\" will match objects with name \"my site\", \"site 2015\", or simply \"site\".",
47565	//       "location": "query",
47566	//       "type": "string"
47567	//     },
47568	//     "sortField": {
47569	//       "default": "ID",
47570	//       "description": "Field by which to sort the list.",
47571	//       "enum": [
47572	//         "ID",
47573	//         "NAME"
47574	//       ],
47575	//       "enumDescriptions": [
47576	//         "",
47577	//         ""
47578	//       ],
47579	//       "location": "query",
47580	//       "type": "string"
47581	//     },
47582	//     "sortOrder": {
47583	//       "default": "ASCENDING",
47584	//       "description": "Order of sorted results.",
47585	//       "enum": [
47586	//         "ASCENDING",
47587	//         "DESCENDING"
47588	//       ],
47589	//       "enumDescriptions": [
47590	//         "",
47591	//         ""
47592	//       ],
47593	//       "location": "query",
47594	//       "type": "string"
47595	//     },
47596	//     "subaccountId": {
47597	//       "description": "Select only sites with this subaccount ID.",
47598	//       "format": "int64",
47599	//       "location": "query",
47600	//       "type": "string"
47601	//     },
47602	//     "unmappedSite": {
47603	//       "description": "Select only sites that have not been mapped to a directory site.",
47604	//       "location": "query",
47605	//       "type": "boolean"
47606	//     }
47607	//   },
47608	//   "path": "userprofiles/{profileId}/sites",
47609	//   "response": {
47610	//     "$ref": "SitesListResponse"
47611	//   },
47612	//   "scopes": [
47613	//     "https://www.googleapis.com/auth/dfatrafficking"
47614	//   ]
47615	// }
47616
47617}
47618
47619// Pages invokes f for each page of results.
47620// A non-nil error returned from f will halt the iteration.
47621// The provided context supersedes any context provided to the Context method.
47622func (c *SitesListCall) Pages(ctx context.Context, f func(*SitesListResponse) error) error {
47623	c.ctx_ = ctx
47624	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47625	for {
47626		x, err := c.Do()
47627		if err != nil {
47628			return err
47629		}
47630		if err := f(x); err != nil {
47631			return err
47632		}
47633		if x.NextPageToken == "" {
47634			return nil
47635		}
47636		c.PageToken(x.NextPageToken)
47637	}
47638}
47639
47640// method id "dfareporting.sites.patch":
47641
47642type SitesPatchCall struct {
47643	s          *Service
47644	profileId  int64
47645	site       *Site
47646	urlParams_ gensupport.URLParams
47647	ctx_       context.Context
47648	header_    http.Header
47649}
47650
47651// Patch: Updates an existing site. This method supports patch
47652// semantics.
47653//
47654// - id: Site ID.
47655// - profileId: User profile ID associated with this request.
47656func (r *SitesService) Patch(profileId int64, id int64, site *Site) *SitesPatchCall {
47657	c := &SitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47658	c.profileId = profileId
47659	c.urlParams_.Set("id", fmt.Sprint(id))
47660	c.site = site
47661	return c
47662}
47663
47664// Fields allows partial responses to be retrieved. See
47665// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47666// for more information.
47667func (c *SitesPatchCall) Fields(s ...googleapi.Field) *SitesPatchCall {
47668	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47669	return c
47670}
47671
47672// Context sets the context to be used in this call's Do method. Any
47673// pending HTTP request will be aborted if the provided context is
47674// canceled.
47675func (c *SitesPatchCall) Context(ctx context.Context) *SitesPatchCall {
47676	c.ctx_ = ctx
47677	return c
47678}
47679
47680// Header returns an http.Header that can be modified by the caller to
47681// add HTTP headers to the request.
47682func (c *SitesPatchCall) Header() http.Header {
47683	if c.header_ == nil {
47684		c.header_ = make(http.Header)
47685	}
47686	return c.header_
47687}
47688
47689func (c *SitesPatchCall) doRequest(alt string) (*http.Response, error) {
47690	reqHeaders := make(http.Header)
47691	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
47692	for k, v := range c.header_ {
47693		reqHeaders[k] = v
47694	}
47695	reqHeaders.Set("User-Agent", c.s.userAgent())
47696	var body io.Reader = nil
47697	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
47698	if err != nil {
47699		return nil, err
47700	}
47701	reqHeaders.Set("Content-Type", "application/json")
47702	c.urlParams_.Set("alt", alt)
47703	c.urlParams_.Set("prettyPrint", "false")
47704	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
47705	urls += "?" + c.urlParams_.Encode()
47706	req, err := http.NewRequest("PATCH", urls, body)
47707	if err != nil {
47708		return nil, err
47709	}
47710	req.Header = reqHeaders
47711	googleapi.Expand(req.URL, map[string]string{
47712		"profileId": strconv.FormatInt(c.profileId, 10),
47713	})
47714	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47715}
47716
47717// Do executes the "dfareporting.sites.patch" call.
47718// Exactly one of *Site or error will be non-nil. Any non-2xx status
47719// code is an error. Response headers are in either
47720// *Site.ServerResponse.Header or (if a response was returned at all) in
47721// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
47722// whether the returned error was because http.StatusNotModified was
47723// returned.
47724func (c *SitesPatchCall) Do(opts ...googleapi.CallOption) (*Site, error) {
47725	gensupport.SetOptions(c.urlParams_, opts...)
47726	res, err := c.doRequest("json")
47727	if res != nil && res.StatusCode == http.StatusNotModified {
47728		if res.Body != nil {
47729			res.Body.Close()
47730		}
47731		return nil, &googleapi.Error{
47732			Code:   res.StatusCode,
47733			Header: res.Header,
47734		}
47735	}
47736	if err != nil {
47737		return nil, err
47738	}
47739	defer googleapi.CloseBody(res)
47740	if err := googleapi.CheckResponse(res); err != nil {
47741		return nil, err
47742	}
47743	ret := &Site{
47744		ServerResponse: googleapi.ServerResponse{
47745			Header:         res.Header,
47746			HTTPStatusCode: res.StatusCode,
47747		},
47748	}
47749	target := &ret
47750	if err := gensupport.DecodeResponse(target, res); err != nil {
47751		return nil, err
47752	}
47753	return ret, nil
47754	// {
47755	//   "description": "Updates an existing site. This method supports patch semantics.",
47756	//   "flatPath": "userprofiles/{profileId}/sites",
47757	//   "httpMethod": "PATCH",
47758	//   "id": "dfareporting.sites.patch",
47759	//   "parameterOrder": [
47760	//     "profileId",
47761	//     "id"
47762	//   ],
47763	//   "parameters": {
47764	//     "id": {
47765	//       "description": "Site ID.",
47766	//       "format": "int64",
47767	//       "location": "query",
47768	//       "required": true,
47769	//       "type": "string"
47770	//     },
47771	//     "profileId": {
47772	//       "description": "User profile ID associated with this request.",
47773	//       "format": "int64",
47774	//       "location": "path",
47775	//       "required": true,
47776	//       "type": "string"
47777	//     }
47778	//   },
47779	//   "path": "userprofiles/{profileId}/sites",
47780	//   "request": {
47781	//     "$ref": "Site"
47782	//   },
47783	//   "response": {
47784	//     "$ref": "Site"
47785	//   },
47786	//   "scopes": [
47787	//     "https://www.googleapis.com/auth/dfatrafficking"
47788	//   ]
47789	// }
47790
47791}
47792
47793// method id "dfareporting.sites.update":
47794
47795type SitesUpdateCall struct {
47796	s          *Service
47797	profileId  int64
47798	site       *Site
47799	urlParams_ gensupport.URLParams
47800	ctx_       context.Context
47801	header_    http.Header
47802}
47803
47804// Update: Updates an existing site.
47805//
47806// - profileId: User profile ID associated with this request.
47807func (r *SitesService) Update(profileId int64, site *Site) *SitesUpdateCall {
47808	c := &SitesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47809	c.profileId = profileId
47810	c.site = site
47811	return c
47812}
47813
47814// Fields allows partial responses to be retrieved. See
47815// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47816// for more information.
47817func (c *SitesUpdateCall) Fields(s ...googleapi.Field) *SitesUpdateCall {
47818	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47819	return c
47820}
47821
47822// Context sets the context to be used in this call's Do method. Any
47823// pending HTTP request will be aborted if the provided context is
47824// canceled.
47825func (c *SitesUpdateCall) Context(ctx context.Context) *SitesUpdateCall {
47826	c.ctx_ = ctx
47827	return c
47828}
47829
47830// Header returns an http.Header that can be modified by the caller to
47831// add HTTP headers to the request.
47832func (c *SitesUpdateCall) Header() http.Header {
47833	if c.header_ == nil {
47834		c.header_ = make(http.Header)
47835	}
47836	return c.header_
47837}
47838
47839func (c *SitesUpdateCall) doRequest(alt string) (*http.Response, error) {
47840	reqHeaders := make(http.Header)
47841	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
47842	for k, v := range c.header_ {
47843		reqHeaders[k] = v
47844	}
47845	reqHeaders.Set("User-Agent", c.s.userAgent())
47846	var body io.Reader = nil
47847	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
47848	if err != nil {
47849		return nil, err
47850	}
47851	reqHeaders.Set("Content-Type", "application/json")
47852	c.urlParams_.Set("alt", alt)
47853	c.urlParams_.Set("prettyPrint", "false")
47854	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
47855	urls += "?" + c.urlParams_.Encode()
47856	req, err := http.NewRequest("PUT", urls, body)
47857	if err != nil {
47858		return nil, err
47859	}
47860	req.Header = reqHeaders
47861	googleapi.Expand(req.URL, map[string]string{
47862		"profileId": strconv.FormatInt(c.profileId, 10),
47863	})
47864	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47865}
47866
47867// Do executes the "dfareporting.sites.update" call.
47868// Exactly one of *Site or error will be non-nil. Any non-2xx status
47869// code is an error. Response headers are in either
47870// *Site.ServerResponse.Header or (if a response was returned at all) in
47871// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
47872// whether the returned error was because http.StatusNotModified was
47873// returned.
47874func (c *SitesUpdateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
47875	gensupport.SetOptions(c.urlParams_, opts...)
47876	res, err := c.doRequest("json")
47877	if res != nil && res.StatusCode == http.StatusNotModified {
47878		if res.Body != nil {
47879			res.Body.Close()
47880		}
47881		return nil, &googleapi.Error{
47882			Code:   res.StatusCode,
47883			Header: res.Header,
47884		}
47885	}
47886	if err != nil {
47887		return nil, err
47888	}
47889	defer googleapi.CloseBody(res)
47890	if err := googleapi.CheckResponse(res); err != nil {
47891		return nil, err
47892	}
47893	ret := &Site{
47894		ServerResponse: googleapi.ServerResponse{
47895			Header:         res.Header,
47896			HTTPStatusCode: res.StatusCode,
47897		},
47898	}
47899	target := &ret
47900	if err := gensupport.DecodeResponse(target, res); err != nil {
47901		return nil, err
47902	}
47903	return ret, nil
47904	// {
47905	//   "description": "Updates an existing site.",
47906	//   "flatPath": "userprofiles/{profileId}/sites",
47907	//   "httpMethod": "PUT",
47908	//   "id": "dfareporting.sites.update",
47909	//   "parameterOrder": [
47910	//     "profileId"
47911	//   ],
47912	//   "parameters": {
47913	//     "profileId": {
47914	//       "description": "User profile ID associated with this request.",
47915	//       "format": "int64",
47916	//       "location": "path",
47917	//       "required": true,
47918	//       "type": "string"
47919	//     }
47920	//   },
47921	//   "path": "userprofiles/{profileId}/sites",
47922	//   "request": {
47923	//     "$ref": "Site"
47924	//   },
47925	//   "response": {
47926	//     "$ref": "Site"
47927	//   },
47928	//   "scopes": [
47929	//     "https://www.googleapis.com/auth/dfatrafficking"
47930	//   ]
47931	// }
47932
47933}
47934
47935// method id "dfareporting.sizes.get":
47936
47937type SizesGetCall struct {
47938	s            *Service
47939	profileId    int64
47940	id           int64
47941	urlParams_   gensupport.URLParams
47942	ifNoneMatch_ string
47943	ctx_         context.Context
47944	header_      http.Header
47945}
47946
47947// Get: Gets one size by ID.
47948//
47949// - id: Size ID.
47950// - profileId: User profile ID associated with this request.
47951func (r *SizesService) Get(profileId int64, id int64) *SizesGetCall {
47952	c := &SizesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47953	c.profileId = profileId
47954	c.id = id
47955	return c
47956}
47957
47958// Fields allows partial responses to be retrieved. See
47959// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47960// for more information.
47961func (c *SizesGetCall) Fields(s ...googleapi.Field) *SizesGetCall {
47962	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47963	return c
47964}
47965
47966// IfNoneMatch sets the optional parameter which makes the operation
47967// fail if the object's ETag matches the given value. This is useful for
47968// getting updates only after the object has changed since the last
47969// request. Use googleapi.IsNotModified to check whether the response
47970// error from Do is the result of In-None-Match.
47971func (c *SizesGetCall) IfNoneMatch(entityTag string) *SizesGetCall {
47972	c.ifNoneMatch_ = entityTag
47973	return c
47974}
47975
47976// Context sets the context to be used in this call's Do method. Any
47977// pending HTTP request will be aborted if the provided context is
47978// canceled.
47979func (c *SizesGetCall) Context(ctx context.Context) *SizesGetCall {
47980	c.ctx_ = ctx
47981	return c
47982}
47983
47984// Header returns an http.Header that can be modified by the caller to
47985// add HTTP headers to the request.
47986func (c *SizesGetCall) Header() http.Header {
47987	if c.header_ == nil {
47988		c.header_ = make(http.Header)
47989	}
47990	return c.header_
47991}
47992
47993func (c *SizesGetCall) doRequest(alt string) (*http.Response, error) {
47994	reqHeaders := make(http.Header)
47995	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
47996	for k, v := range c.header_ {
47997		reqHeaders[k] = v
47998	}
47999	reqHeaders.Set("User-Agent", c.s.userAgent())
48000	if c.ifNoneMatch_ != "" {
48001		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48002	}
48003	var body io.Reader = nil
48004	c.urlParams_.Set("alt", alt)
48005	c.urlParams_.Set("prettyPrint", "false")
48006	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes/{id}")
48007	urls += "?" + c.urlParams_.Encode()
48008	req, err := http.NewRequest("GET", urls, body)
48009	if err != nil {
48010		return nil, err
48011	}
48012	req.Header = reqHeaders
48013	googleapi.Expand(req.URL, map[string]string{
48014		"profileId": strconv.FormatInt(c.profileId, 10),
48015		"id":        strconv.FormatInt(c.id, 10),
48016	})
48017	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48018}
48019
48020// Do executes the "dfareporting.sizes.get" call.
48021// Exactly one of *Size or error will be non-nil. Any non-2xx status
48022// code is an error. Response headers are in either
48023// *Size.ServerResponse.Header or (if a response was returned at all) in
48024// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
48025// whether the returned error was because http.StatusNotModified was
48026// returned.
48027func (c *SizesGetCall) Do(opts ...googleapi.CallOption) (*Size, error) {
48028	gensupport.SetOptions(c.urlParams_, opts...)
48029	res, err := c.doRequest("json")
48030	if res != nil && res.StatusCode == http.StatusNotModified {
48031		if res.Body != nil {
48032			res.Body.Close()
48033		}
48034		return nil, &googleapi.Error{
48035			Code:   res.StatusCode,
48036			Header: res.Header,
48037		}
48038	}
48039	if err != nil {
48040		return nil, err
48041	}
48042	defer googleapi.CloseBody(res)
48043	if err := googleapi.CheckResponse(res); err != nil {
48044		return nil, err
48045	}
48046	ret := &Size{
48047		ServerResponse: googleapi.ServerResponse{
48048			Header:         res.Header,
48049			HTTPStatusCode: res.StatusCode,
48050		},
48051	}
48052	target := &ret
48053	if err := gensupport.DecodeResponse(target, res); err != nil {
48054		return nil, err
48055	}
48056	return ret, nil
48057	// {
48058	//   "description": "Gets one size by ID.",
48059	//   "flatPath": "userprofiles/{profileId}/sizes/{id}",
48060	//   "httpMethod": "GET",
48061	//   "id": "dfareporting.sizes.get",
48062	//   "parameterOrder": [
48063	//     "profileId",
48064	//     "id"
48065	//   ],
48066	//   "parameters": {
48067	//     "id": {
48068	//       "description": "Size ID.",
48069	//       "format": "int64",
48070	//       "location": "path",
48071	//       "required": true,
48072	//       "type": "string"
48073	//     },
48074	//     "profileId": {
48075	//       "description": "User profile ID associated with this request.",
48076	//       "format": "int64",
48077	//       "location": "path",
48078	//       "required": true,
48079	//       "type": "string"
48080	//     }
48081	//   },
48082	//   "path": "userprofiles/{profileId}/sizes/{id}",
48083	//   "response": {
48084	//     "$ref": "Size"
48085	//   },
48086	//   "scopes": [
48087	//     "https://www.googleapis.com/auth/dfatrafficking"
48088	//   ]
48089	// }
48090
48091}
48092
48093// method id "dfareporting.sizes.insert":
48094
48095type SizesInsertCall struct {
48096	s          *Service
48097	profileId  int64
48098	size       *Size
48099	urlParams_ gensupport.URLParams
48100	ctx_       context.Context
48101	header_    http.Header
48102}
48103
48104// Insert: Inserts a new size.
48105//
48106// - profileId: User profile ID associated with this request.
48107func (r *SizesService) Insert(profileId int64, size *Size) *SizesInsertCall {
48108	c := &SizesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48109	c.profileId = profileId
48110	c.size = size
48111	return c
48112}
48113
48114// Fields allows partial responses to be retrieved. See
48115// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48116// for more information.
48117func (c *SizesInsertCall) Fields(s ...googleapi.Field) *SizesInsertCall {
48118	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48119	return c
48120}
48121
48122// Context sets the context to be used in this call's Do method. Any
48123// pending HTTP request will be aborted if the provided context is
48124// canceled.
48125func (c *SizesInsertCall) Context(ctx context.Context) *SizesInsertCall {
48126	c.ctx_ = ctx
48127	return c
48128}
48129
48130// Header returns an http.Header that can be modified by the caller to
48131// add HTTP headers to the request.
48132func (c *SizesInsertCall) Header() http.Header {
48133	if c.header_ == nil {
48134		c.header_ = make(http.Header)
48135	}
48136	return c.header_
48137}
48138
48139func (c *SizesInsertCall) doRequest(alt string) (*http.Response, error) {
48140	reqHeaders := make(http.Header)
48141	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
48142	for k, v := range c.header_ {
48143		reqHeaders[k] = v
48144	}
48145	reqHeaders.Set("User-Agent", c.s.userAgent())
48146	var body io.Reader = nil
48147	body, err := googleapi.WithoutDataWrapper.JSONReader(c.size)
48148	if err != nil {
48149		return nil, err
48150	}
48151	reqHeaders.Set("Content-Type", "application/json")
48152	c.urlParams_.Set("alt", alt)
48153	c.urlParams_.Set("prettyPrint", "false")
48154	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
48155	urls += "?" + c.urlParams_.Encode()
48156	req, err := http.NewRequest("POST", urls, body)
48157	if err != nil {
48158		return nil, err
48159	}
48160	req.Header = reqHeaders
48161	googleapi.Expand(req.URL, map[string]string{
48162		"profileId": strconv.FormatInt(c.profileId, 10),
48163	})
48164	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48165}
48166
48167// Do executes the "dfareporting.sizes.insert" call.
48168// Exactly one of *Size or error will be non-nil. Any non-2xx status
48169// code is an error. Response headers are in either
48170// *Size.ServerResponse.Header or (if a response was returned at all) in
48171// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
48172// whether the returned error was because http.StatusNotModified was
48173// returned.
48174func (c *SizesInsertCall) Do(opts ...googleapi.CallOption) (*Size, error) {
48175	gensupport.SetOptions(c.urlParams_, opts...)
48176	res, err := c.doRequest("json")
48177	if res != nil && res.StatusCode == http.StatusNotModified {
48178		if res.Body != nil {
48179			res.Body.Close()
48180		}
48181		return nil, &googleapi.Error{
48182			Code:   res.StatusCode,
48183			Header: res.Header,
48184		}
48185	}
48186	if err != nil {
48187		return nil, err
48188	}
48189	defer googleapi.CloseBody(res)
48190	if err := googleapi.CheckResponse(res); err != nil {
48191		return nil, err
48192	}
48193	ret := &Size{
48194		ServerResponse: googleapi.ServerResponse{
48195			Header:         res.Header,
48196			HTTPStatusCode: res.StatusCode,
48197		},
48198	}
48199	target := &ret
48200	if err := gensupport.DecodeResponse(target, res); err != nil {
48201		return nil, err
48202	}
48203	return ret, nil
48204	// {
48205	//   "description": "Inserts a new size.",
48206	//   "flatPath": "userprofiles/{profileId}/sizes",
48207	//   "httpMethod": "POST",
48208	//   "id": "dfareporting.sizes.insert",
48209	//   "parameterOrder": [
48210	//     "profileId"
48211	//   ],
48212	//   "parameters": {
48213	//     "profileId": {
48214	//       "description": "User profile ID associated with this request.",
48215	//       "format": "int64",
48216	//       "location": "path",
48217	//       "required": true,
48218	//       "type": "string"
48219	//     }
48220	//   },
48221	//   "path": "userprofiles/{profileId}/sizes",
48222	//   "request": {
48223	//     "$ref": "Size"
48224	//   },
48225	//   "response": {
48226	//     "$ref": "Size"
48227	//   },
48228	//   "scopes": [
48229	//     "https://www.googleapis.com/auth/dfatrafficking"
48230	//   ]
48231	// }
48232
48233}
48234
48235// method id "dfareporting.sizes.list":
48236
48237type SizesListCall struct {
48238	s            *Service
48239	profileId    int64
48240	urlParams_   gensupport.URLParams
48241	ifNoneMatch_ string
48242	ctx_         context.Context
48243	header_      http.Header
48244}
48245
48246// List: Retrieves a list of sizes, possibly filtered. Retrieved sizes
48247// are globally unique and may include values not currently in use by
48248// your account. Due to this, the list of sizes returned by this method
48249// may differ from the list seen in the Trafficking UI.
48250//
48251// - profileId: User profile ID associated with this request.
48252func (r *SizesService) List(profileId int64) *SizesListCall {
48253	c := &SizesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48254	c.profileId = profileId
48255	return c
48256}
48257
48258// Height sets the optional parameter "height": Select only sizes with
48259// this height.
48260func (c *SizesListCall) Height(height int64) *SizesListCall {
48261	c.urlParams_.Set("height", fmt.Sprint(height))
48262	return c
48263}
48264
48265// IabStandard sets the optional parameter "iabStandard": Select only
48266// IAB standard sizes.
48267func (c *SizesListCall) IabStandard(iabStandard bool) *SizesListCall {
48268	c.urlParams_.Set("iabStandard", fmt.Sprint(iabStandard))
48269	return c
48270}
48271
48272// Ids sets the optional parameter "ids": Select only sizes with these
48273// IDs.
48274func (c *SizesListCall) Ids(ids ...int64) *SizesListCall {
48275	var ids_ []string
48276	for _, v := range ids {
48277		ids_ = append(ids_, fmt.Sprint(v))
48278	}
48279	c.urlParams_.SetMulti("ids", ids_)
48280	return c
48281}
48282
48283// Width sets the optional parameter "width": Select only sizes with
48284// this width.
48285func (c *SizesListCall) Width(width int64) *SizesListCall {
48286	c.urlParams_.Set("width", fmt.Sprint(width))
48287	return c
48288}
48289
48290// Fields allows partial responses to be retrieved. See
48291// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48292// for more information.
48293func (c *SizesListCall) Fields(s ...googleapi.Field) *SizesListCall {
48294	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48295	return c
48296}
48297
48298// IfNoneMatch sets the optional parameter which makes the operation
48299// fail if the object's ETag matches the given value. This is useful for
48300// getting updates only after the object has changed since the last
48301// request. Use googleapi.IsNotModified to check whether the response
48302// error from Do is the result of In-None-Match.
48303func (c *SizesListCall) IfNoneMatch(entityTag string) *SizesListCall {
48304	c.ifNoneMatch_ = entityTag
48305	return c
48306}
48307
48308// Context sets the context to be used in this call's Do method. Any
48309// pending HTTP request will be aborted if the provided context is
48310// canceled.
48311func (c *SizesListCall) Context(ctx context.Context) *SizesListCall {
48312	c.ctx_ = ctx
48313	return c
48314}
48315
48316// Header returns an http.Header that can be modified by the caller to
48317// add HTTP headers to the request.
48318func (c *SizesListCall) Header() http.Header {
48319	if c.header_ == nil {
48320		c.header_ = make(http.Header)
48321	}
48322	return c.header_
48323}
48324
48325func (c *SizesListCall) doRequest(alt string) (*http.Response, error) {
48326	reqHeaders := make(http.Header)
48327	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
48328	for k, v := range c.header_ {
48329		reqHeaders[k] = v
48330	}
48331	reqHeaders.Set("User-Agent", c.s.userAgent())
48332	if c.ifNoneMatch_ != "" {
48333		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48334	}
48335	var body io.Reader = nil
48336	c.urlParams_.Set("alt", alt)
48337	c.urlParams_.Set("prettyPrint", "false")
48338	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
48339	urls += "?" + c.urlParams_.Encode()
48340	req, err := http.NewRequest("GET", urls, body)
48341	if err != nil {
48342		return nil, err
48343	}
48344	req.Header = reqHeaders
48345	googleapi.Expand(req.URL, map[string]string{
48346		"profileId": strconv.FormatInt(c.profileId, 10),
48347	})
48348	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48349}
48350
48351// Do executes the "dfareporting.sizes.list" call.
48352// Exactly one of *SizesListResponse or error will be non-nil. Any
48353// non-2xx status code is an error. Response headers are in either
48354// *SizesListResponse.ServerResponse.Header or (if a response was
48355// returned at all) in error.(*googleapi.Error).Header. Use
48356// googleapi.IsNotModified to check whether the returned error was
48357// because http.StatusNotModified was returned.
48358func (c *SizesListCall) Do(opts ...googleapi.CallOption) (*SizesListResponse, error) {
48359	gensupport.SetOptions(c.urlParams_, opts...)
48360	res, err := c.doRequest("json")
48361	if res != nil && res.StatusCode == http.StatusNotModified {
48362		if res.Body != nil {
48363			res.Body.Close()
48364		}
48365		return nil, &googleapi.Error{
48366			Code:   res.StatusCode,
48367			Header: res.Header,
48368		}
48369	}
48370	if err != nil {
48371		return nil, err
48372	}
48373	defer googleapi.CloseBody(res)
48374	if err := googleapi.CheckResponse(res); err != nil {
48375		return nil, err
48376	}
48377	ret := &SizesListResponse{
48378		ServerResponse: googleapi.ServerResponse{
48379			Header:         res.Header,
48380			HTTPStatusCode: res.StatusCode,
48381		},
48382	}
48383	target := &ret
48384	if err := gensupport.DecodeResponse(target, res); err != nil {
48385		return nil, err
48386	}
48387	return ret, nil
48388	// {
48389	//   "description": "Retrieves a list of sizes, possibly filtered. Retrieved sizes are globally unique and may include values not currently in use by your account. Due to this, the list of sizes returned by this method may differ from the list seen in the Trafficking UI.",
48390	//   "flatPath": "userprofiles/{profileId}/sizes",
48391	//   "httpMethod": "GET",
48392	//   "id": "dfareporting.sizes.list",
48393	//   "parameterOrder": [
48394	//     "profileId"
48395	//   ],
48396	//   "parameters": {
48397	//     "height": {
48398	//       "description": "Select only sizes with this height.",
48399	//       "format": "int32",
48400	//       "location": "query",
48401	//       "maximum": "32767",
48402	//       "minimum": "0",
48403	//       "type": "integer"
48404	//     },
48405	//     "iabStandard": {
48406	//       "description": "Select only IAB standard sizes.",
48407	//       "location": "query",
48408	//       "type": "boolean"
48409	//     },
48410	//     "ids": {
48411	//       "description": "Select only sizes with these IDs.",
48412	//       "format": "int64",
48413	//       "location": "query",
48414	//       "repeated": true,
48415	//       "type": "string"
48416	//     },
48417	//     "profileId": {
48418	//       "description": "User profile ID associated with this request.",
48419	//       "format": "int64",
48420	//       "location": "path",
48421	//       "required": true,
48422	//       "type": "string"
48423	//     },
48424	//     "width": {
48425	//       "description": "Select only sizes with this width.",
48426	//       "format": "int32",
48427	//       "location": "query",
48428	//       "maximum": "32767",
48429	//       "minimum": "0",
48430	//       "type": "integer"
48431	//     }
48432	//   },
48433	//   "path": "userprofiles/{profileId}/sizes",
48434	//   "response": {
48435	//     "$ref": "SizesListResponse"
48436	//   },
48437	//   "scopes": [
48438	//     "https://www.googleapis.com/auth/dfatrafficking"
48439	//   ]
48440	// }
48441
48442}
48443
48444// method id "dfareporting.subaccounts.get":
48445
48446type SubaccountsGetCall struct {
48447	s            *Service
48448	profileId    int64
48449	id           int64
48450	urlParams_   gensupport.URLParams
48451	ifNoneMatch_ string
48452	ctx_         context.Context
48453	header_      http.Header
48454}
48455
48456// Get: Gets one subaccount by ID.
48457//
48458// - id: Subaccount ID.
48459// - profileId: User profile ID associated with this request.
48460func (r *SubaccountsService) Get(profileId int64, id int64) *SubaccountsGetCall {
48461	c := &SubaccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48462	c.profileId = profileId
48463	c.id = id
48464	return c
48465}
48466
48467// Fields allows partial responses to be retrieved. See
48468// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48469// for more information.
48470func (c *SubaccountsGetCall) Fields(s ...googleapi.Field) *SubaccountsGetCall {
48471	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48472	return c
48473}
48474
48475// IfNoneMatch sets the optional parameter which makes the operation
48476// fail if the object's ETag matches the given value. This is useful for
48477// getting updates only after the object has changed since the last
48478// request. Use googleapi.IsNotModified to check whether the response
48479// error from Do is the result of In-None-Match.
48480func (c *SubaccountsGetCall) IfNoneMatch(entityTag string) *SubaccountsGetCall {
48481	c.ifNoneMatch_ = entityTag
48482	return c
48483}
48484
48485// Context sets the context to be used in this call's Do method. Any
48486// pending HTTP request will be aborted if the provided context is
48487// canceled.
48488func (c *SubaccountsGetCall) Context(ctx context.Context) *SubaccountsGetCall {
48489	c.ctx_ = ctx
48490	return c
48491}
48492
48493// Header returns an http.Header that can be modified by the caller to
48494// add HTTP headers to the request.
48495func (c *SubaccountsGetCall) Header() http.Header {
48496	if c.header_ == nil {
48497		c.header_ = make(http.Header)
48498	}
48499	return c.header_
48500}
48501
48502func (c *SubaccountsGetCall) doRequest(alt string) (*http.Response, error) {
48503	reqHeaders := make(http.Header)
48504	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
48505	for k, v := range c.header_ {
48506		reqHeaders[k] = v
48507	}
48508	reqHeaders.Set("User-Agent", c.s.userAgent())
48509	if c.ifNoneMatch_ != "" {
48510		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48511	}
48512	var body io.Reader = nil
48513	c.urlParams_.Set("alt", alt)
48514	c.urlParams_.Set("prettyPrint", "false")
48515	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts/{id}")
48516	urls += "?" + c.urlParams_.Encode()
48517	req, err := http.NewRequest("GET", urls, body)
48518	if err != nil {
48519		return nil, err
48520	}
48521	req.Header = reqHeaders
48522	googleapi.Expand(req.URL, map[string]string{
48523		"profileId": strconv.FormatInt(c.profileId, 10),
48524		"id":        strconv.FormatInt(c.id, 10),
48525	})
48526	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48527}
48528
48529// Do executes the "dfareporting.subaccounts.get" call.
48530// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
48531// status code is an error. Response headers are in either
48532// *Subaccount.ServerResponse.Header or (if a response was returned at
48533// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
48534// to check whether the returned error was because
48535// http.StatusNotModified was returned.
48536func (c *SubaccountsGetCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
48537	gensupport.SetOptions(c.urlParams_, opts...)
48538	res, err := c.doRequest("json")
48539	if res != nil && res.StatusCode == http.StatusNotModified {
48540		if res.Body != nil {
48541			res.Body.Close()
48542		}
48543		return nil, &googleapi.Error{
48544			Code:   res.StatusCode,
48545			Header: res.Header,
48546		}
48547	}
48548	if err != nil {
48549		return nil, err
48550	}
48551	defer googleapi.CloseBody(res)
48552	if err := googleapi.CheckResponse(res); err != nil {
48553		return nil, err
48554	}
48555	ret := &Subaccount{
48556		ServerResponse: googleapi.ServerResponse{
48557			Header:         res.Header,
48558			HTTPStatusCode: res.StatusCode,
48559		},
48560	}
48561	target := &ret
48562	if err := gensupport.DecodeResponse(target, res); err != nil {
48563		return nil, err
48564	}
48565	return ret, nil
48566	// {
48567	//   "description": "Gets one subaccount by ID.",
48568	//   "flatPath": "userprofiles/{profileId}/subaccounts/{id}",
48569	//   "httpMethod": "GET",
48570	//   "id": "dfareporting.subaccounts.get",
48571	//   "parameterOrder": [
48572	//     "profileId",
48573	//     "id"
48574	//   ],
48575	//   "parameters": {
48576	//     "id": {
48577	//       "description": "Subaccount ID.",
48578	//       "format": "int64",
48579	//       "location": "path",
48580	//       "required": true,
48581	//       "type": "string"
48582	//     },
48583	//     "profileId": {
48584	//       "description": "User profile ID associated with this request.",
48585	//       "format": "int64",
48586	//       "location": "path",
48587	//       "required": true,
48588	//       "type": "string"
48589	//     }
48590	//   },
48591	//   "path": "userprofiles/{profileId}/subaccounts/{id}",
48592	//   "response": {
48593	//     "$ref": "Subaccount"
48594	//   },
48595	//   "scopes": [
48596	//     "https://www.googleapis.com/auth/dfatrafficking"
48597	//   ]
48598	// }
48599
48600}
48601
48602// method id "dfareporting.subaccounts.insert":
48603
48604type SubaccountsInsertCall struct {
48605	s          *Service
48606	profileId  int64
48607	subaccount *Subaccount
48608	urlParams_ gensupport.URLParams
48609	ctx_       context.Context
48610	header_    http.Header
48611}
48612
48613// Insert: Inserts a new subaccount.
48614//
48615// - profileId: User profile ID associated with this request.
48616func (r *SubaccountsService) Insert(profileId int64, subaccount *Subaccount) *SubaccountsInsertCall {
48617	c := &SubaccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48618	c.profileId = profileId
48619	c.subaccount = subaccount
48620	return c
48621}
48622
48623// Fields allows partial responses to be retrieved. See
48624// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48625// for more information.
48626func (c *SubaccountsInsertCall) Fields(s ...googleapi.Field) *SubaccountsInsertCall {
48627	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48628	return c
48629}
48630
48631// Context sets the context to be used in this call's Do method. Any
48632// pending HTTP request will be aborted if the provided context is
48633// canceled.
48634func (c *SubaccountsInsertCall) Context(ctx context.Context) *SubaccountsInsertCall {
48635	c.ctx_ = ctx
48636	return c
48637}
48638
48639// Header returns an http.Header that can be modified by the caller to
48640// add HTTP headers to the request.
48641func (c *SubaccountsInsertCall) Header() http.Header {
48642	if c.header_ == nil {
48643		c.header_ = make(http.Header)
48644	}
48645	return c.header_
48646}
48647
48648func (c *SubaccountsInsertCall) doRequest(alt string) (*http.Response, error) {
48649	reqHeaders := make(http.Header)
48650	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
48651	for k, v := range c.header_ {
48652		reqHeaders[k] = v
48653	}
48654	reqHeaders.Set("User-Agent", c.s.userAgent())
48655	var body io.Reader = nil
48656	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
48657	if err != nil {
48658		return nil, err
48659	}
48660	reqHeaders.Set("Content-Type", "application/json")
48661	c.urlParams_.Set("alt", alt)
48662	c.urlParams_.Set("prettyPrint", "false")
48663	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
48664	urls += "?" + c.urlParams_.Encode()
48665	req, err := http.NewRequest("POST", urls, body)
48666	if err != nil {
48667		return nil, err
48668	}
48669	req.Header = reqHeaders
48670	googleapi.Expand(req.URL, map[string]string{
48671		"profileId": strconv.FormatInt(c.profileId, 10),
48672	})
48673	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48674}
48675
48676// Do executes the "dfareporting.subaccounts.insert" call.
48677// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
48678// status code is an error. Response headers are in either
48679// *Subaccount.ServerResponse.Header or (if a response was returned at
48680// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
48681// to check whether the returned error was because
48682// http.StatusNotModified was returned.
48683func (c *SubaccountsInsertCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
48684	gensupport.SetOptions(c.urlParams_, opts...)
48685	res, err := c.doRequest("json")
48686	if res != nil && res.StatusCode == http.StatusNotModified {
48687		if res.Body != nil {
48688			res.Body.Close()
48689		}
48690		return nil, &googleapi.Error{
48691			Code:   res.StatusCode,
48692			Header: res.Header,
48693		}
48694	}
48695	if err != nil {
48696		return nil, err
48697	}
48698	defer googleapi.CloseBody(res)
48699	if err := googleapi.CheckResponse(res); err != nil {
48700		return nil, err
48701	}
48702	ret := &Subaccount{
48703		ServerResponse: googleapi.ServerResponse{
48704			Header:         res.Header,
48705			HTTPStatusCode: res.StatusCode,
48706		},
48707	}
48708	target := &ret
48709	if err := gensupport.DecodeResponse(target, res); err != nil {
48710		return nil, err
48711	}
48712	return ret, nil
48713	// {
48714	//   "description": "Inserts a new subaccount.",
48715	//   "flatPath": "userprofiles/{profileId}/subaccounts",
48716	//   "httpMethod": "POST",
48717	//   "id": "dfareporting.subaccounts.insert",
48718	//   "parameterOrder": [
48719	//     "profileId"
48720	//   ],
48721	//   "parameters": {
48722	//     "profileId": {
48723	//       "description": "User profile ID associated with this request.",
48724	//       "format": "int64",
48725	//       "location": "path",
48726	//       "required": true,
48727	//       "type": "string"
48728	//     }
48729	//   },
48730	//   "path": "userprofiles/{profileId}/subaccounts",
48731	//   "request": {
48732	//     "$ref": "Subaccount"
48733	//   },
48734	//   "response": {
48735	//     "$ref": "Subaccount"
48736	//   },
48737	//   "scopes": [
48738	//     "https://www.googleapis.com/auth/dfatrafficking"
48739	//   ]
48740	// }
48741
48742}
48743
48744// method id "dfareporting.subaccounts.list":
48745
48746type SubaccountsListCall struct {
48747	s            *Service
48748	profileId    int64
48749	urlParams_   gensupport.URLParams
48750	ifNoneMatch_ string
48751	ctx_         context.Context
48752	header_      http.Header
48753}
48754
48755// List: Gets a list of subaccounts, possibly filtered. This method
48756// supports paging.
48757//
48758// - profileId: User profile ID associated with this request.
48759func (r *SubaccountsService) List(profileId int64) *SubaccountsListCall {
48760	c := &SubaccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48761	c.profileId = profileId
48762	return c
48763}
48764
48765// Ids sets the optional parameter "ids": Select only subaccounts with
48766// these IDs.
48767func (c *SubaccountsListCall) Ids(ids ...int64) *SubaccountsListCall {
48768	var ids_ []string
48769	for _, v := range ids {
48770		ids_ = append(ids_, fmt.Sprint(v))
48771	}
48772	c.urlParams_.SetMulti("ids", ids_)
48773	return c
48774}
48775
48776// MaxResults sets the optional parameter "maxResults": Maximum number
48777// of results to return.
48778func (c *SubaccountsListCall) MaxResults(maxResults int64) *SubaccountsListCall {
48779	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
48780	return c
48781}
48782
48783// PageToken sets the optional parameter "pageToken": Value of the
48784// nextPageToken from the previous result page.
48785func (c *SubaccountsListCall) PageToken(pageToken string) *SubaccountsListCall {
48786	c.urlParams_.Set("pageToken", pageToken)
48787	return c
48788}
48789
48790// SearchString sets the optional parameter "searchString": Allows
48791// searching for objects by name or ID. Wildcards (*) are allowed. For
48792// example, "subaccount*2015" will return objects with names like
48793// "subaccount June 2015", "subaccount April 2015", or simply
48794// "subaccount 2015". Most of the searches also add wildcards implicitly
48795// at the start and the end of the search string. For example, a search
48796// string of "subaccount" will match objects with name "my subaccount",
48797// "subaccount 2015", or simply "subaccount" .
48798func (c *SubaccountsListCall) SearchString(searchString string) *SubaccountsListCall {
48799	c.urlParams_.Set("searchString", searchString)
48800	return c
48801}
48802
48803// SortField sets the optional parameter "sortField": Field by which to
48804// sort the list.
48805//
48806// Possible values:
48807//   "ID" (default)
48808//   "NAME"
48809func (c *SubaccountsListCall) SortField(sortField string) *SubaccountsListCall {
48810	c.urlParams_.Set("sortField", sortField)
48811	return c
48812}
48813
48814// SortOrder sets the optional parameter "sortOrder": Order of sorted
48815// results.
48816//
48817// Possible values:
48818//   "ASCENDING" (default)
48819//   "DESCENDING"
48820func (c *SubaccountsListCall) SortOrder(sortOrder string) *SubaccountsListCall {
48821	c.urlParams_.Set("sortOrder", sortOrder)
48822	return c
48823}
48824
48825// Fields allows partial responses to be retrieved. See
48826// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48827// for more information.
48828func (c *SubaccountsListCall) Fields(s ...googleapi.Field) *SubaccountsListCall {
48829	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48830	return c
48831}
48832
48833// IfNoneMatch sets the optional parameter which makes the operation
48834// fail if the object's ETag matches the given value. This is useful for
48835// getting updates only after the object has changed since the last
48836// request. Use googleapi.IsNotModified to check whether the response
48837// error from Do is the result of In-None-Match.
48838func (c *SubaccountsListCall) IfNoneMatch(entityTag string) *SubaccountsListCall {
48839	c.ifNoneMatch_ = entityTag
48840	return c
48841}
48842
48843// Context sets the context to be used in this call's Do method. Any
48844// pending HTTP request will be aborted if the provided context is
48845// canceled.
48846func (c *SubaccountsListCall) Context(ctx context.Context) *SubaccountsListCall {
48847	c.ctx_ = ctx
48848	return c
48849}
48850
48851// Header returns an http.Header that can be modified by the caller to
48852// add HTTP headers to the request.
48853func (c *SubaccountsListCall) Header() http.Header {
48854	if c.header_ == nil {
48855		c.header_ = make(http.Header)
48856	}
48857	return c.header_
48858}
48859
48860func (c *SubaccountsListCall) doRequest(alt string) (*http.Response, error) {
48861	reqHeaders := make(http.Header)
48862	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
48863	for k, v := range c.header_ {
48864		reqHeaders[k] = v
48865	}
48866	reqHeaders.Set("User-Agent", c.s.userAgent())
48867	if c.ifNoneMatch_ != "" {
48868		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48869	}
48870	var body io.Reader = nil
48871	c.urlParams_.Set("alt", alt)
48872	c.urlParams_.Set("prettyPrint", "false")
48873	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
48874	urls += "?" + c.urlParams_.Encode()
48875	req, err := http.NewRequest("GET", urls, body)
48876	if err != nil {
48877		return nil, err
48878	}
48879	req.Header = reqHeaders
48880	googleapi.Expand(req.URL, map[string]string{
48881		"profileId": strconv.FormatInt(c.profileId, 10),
48882	})
48883	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48884}
48885
48886// Do executes the "dfareporting.subaccounts.list" call.
48887// Exactly one of *SubaccountsListResponse or error will be non-nil. Any
48888// non-2xx status code is an error. Response headers are in either
48889// *SubaccountsListResponse.ServerResponse.Header or (if a response was
48890// returned at all) in error.(*googleapi.Error).Header. Use
48891// googleapi.IsNotModified to check whether the returned error was
48892// because http.StatusNotModified was returned.
48893func (c *SubaccountsListCall) Do(opts ...googleapi.CallOption) (*SubaccountsListResponse, error) {
48894	gensupport.SetOptions(c.urlParams_, opts...)
48895	res, err := c.doRequest("json")
48896	if res != nil && res.StatusCode == http.StatusNotModified {
48897		if res.Body != nil {
48898			res.Body.Close()
48899		}
48900		return nil, &googleapi.Error{
48901			Code:   res.StatusCode,
48902			Header: res.Header,
48903		}
48904	}
48905	if err != nil {
48906		return nil, err
48907	}
48908	defer googleapi.CloseBody(res)
48909	if err := googleapi.CheckResponse(res); err != nil {
48910		return nil, err
48911	}
48912	ret := &SubaccountsListResponse{
48913		ServerResponse: googleapi.ServerResponse{
48914			Header:         res.Header,
48915			HTTPStatusCode: res.StatusCode,
48916		},
48917	}
48918	target := &ret
48919	if err := gensupport.DecodeResponse(target, res); err != nil {
48920		return nil, err
48921	}
48922	return ret, nil
48923	// {
48924	//   "description": "Gets a list of subaccounts, possibly filtered. This method supports paging.",
48925	//   "flatPath": "userprofiles/{profileId}/subaccounts",
48926	//   "httpMethod": "GET",
48927	//   "id": "dfareporting.subaccounts.list",
48928	//   "parameterOrder": [
48929	//     "profileId"
48930	//   ],
48931	//   "parameters": {
48932	//     "ids": {
48933	//       "description": "Select only subaccounts with these IDs.",
48934	//       "format": "int64",
48935	//       "location": "query",
48936	//       "repeated": true,
48937	//       "type": "string"
48938	//     },
48939	//     "maxResults": {
48940	//       "default": "1000",
48941	//       "description": "Maximum number of results to return.",
48942	//       "format": "int32",
48943	//       "location": "query",
48944	//       "maximum": "1000",
48945	//       "minimum": "0",
48946	//       "type": "integer"
48947	//     },
48948	//     "pageToken": {
48949	//       "description": "Value of the nextPageToken from the previous result page.",
48950	//       "location": "query",
48951	//       "type": "string"
48952	//     },
48953	//     "profileId": {
48954	//       "description": "User profile ID associated with this request.",
48955	//       "format": "int64",
48956	//       "location": "path",
48957	//       "required": true,
48958	//       "type": "string"
48959	//     },
48960	//     "searchString": {
48961	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"subaccount*2015\" will return objects with names like \"subaccount June 2015\", \"subaccount April 2015\", or simply \"subaccount 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"subaccount\" will match objects with name \"my subaccount\", \"subaccount 2015\", or simply \"subaccount\" .",
48962	//       "location": "query",
48963	//       "type": "string"
48964	//     },
48965	//     "sortField": {
48966	//       "default": "ID",
48967	//       "description": "Field by which to sort the list.",
48968	//       "enum": [
48969	//         "ID",
48970	//         "NAME"
48971	//       ],
48972	//       "enumDescriptions": [
48973	//         "",
48974	//         ""
48975	//       ],
48976	//       "location": "query",
48977	//       "type": "string"
48978	//     },
48979	//     "sortOrder": {
48980	//       "default": "ASCENDING",
48981	//       "description": "Order of sorted results.",
48982	//       "enum": [
48983	//         "ASCENDING",
48984	//         "DESCENDING"
48985	//       ],
48986	//       "enumDescriptions": [
48987	//         "",
48988	//         ""
48989	//       ],
48990	//       "location": "query",
48991	//       "type": "string"
48992	//     }
48993	//   },
48994	//   "path": "userprofiles/{profileId}/subaccounts",
48995	//   "response": {
48996	//     "$ref": "SubaccountsListResponse"
48997	//   },
48998	//   "scopes": [
48999	//     "https://www.googleapis.com/auth/dfatrafficking"
49000	//   ]
49001	// }
49002
49003}
49004
49005// Pages invokes f for each page of results.
49006// A non-nil error returned from f will halt the iteration.
49007// The provided context supersedes any context provided to the Context method.
49008func (c *SubaccountsListCall) Pages(ctx context.Context, f func(*SubaccountsListResponse) error) error {
49009	c.ctx_ = ctx
49010	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
49011	for {
49012		x, err := c.Do()
49013		if err != nil {
49014			return err
49015		}
49016		if err := f(x); err != nil {
49017			return err
49018		}
49019		if x.NextPageToken == "" {
49020			return nil
49021		}
49022		c.PageToken(x.NextPageToken)
49023	}
49024}
49025
49026// method id "dfareporting.subaccounts.patch":
49027
49028type SubaccountsPatchCall struct {
49029	s          *Service
49030	profileId  int64
49031	subaccount *Subaccount
49032	urlParams_ gensupport.URLParams
49033	ctx_       context.Context
49034	header_    http.Header
49035}
49036
49037// Patch: Updates an existing subaccount. This method supports patch
49038// semantics.
49039//
49040// - id: Subaccount ID.
49041// - profileId: User profile ID associated with this request.
49042func (r *SubaccountsService) Patch(profileId int64, id int64, subaccount *Subaccount) *SubaccountsPatchCall {
49043	c := &SubaccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49044	c.profileId = profileId
49045	c.urlParams_.Set("id", fmt.Sprint(id))
49046	c.subaccount = subaccount
49047	return c
49048}
49049
49050// Fields allows partial responses to be retrieved. See
49051// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49052// for more information.
49053func (c *SubaccountsPatchCall) Fields(s ...googleapi.Field) *SubaccountsPatchCall {
49054	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49055	return c
49056}
49057
49058// Context sets the context to be used in this call's Do method. Any
49059// pending HTTP request will be aborted if the provided context is
49060// canceled.
49061func (c *SubaccountsPatchCall) Context(ctx context.Context) *SubaccountsPatchCall {
49062	c.ctx_ = ctx
49063	return c
49064}
49065
49066// Header returns an http.Header that can be modified by the caller to
49067// add HTTP headers to the request.
49068func (c *SubaccountsPatchCall) Header() http.Header {
49069	if c.header_ == nil {
49070		c.header_ = make(http.Header)
49071	}
49072	return c.header_
49073}
49074
49075func (c *SubaccountsPatchCall) doRequest(alt string) (*http.Response, error) {
49076	reqHeaders := make(http.Header)
49077	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
49078	for k, v := range c.header_ {
49079		reqHeaders[k] = v
49080	}
49081	reqHeaders.Set("User-Agent", c.s.userAgent())
49082	var body io.Reader = nil
49083	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
49084	if err != nil {
49085		return nil, err
49086	}
49087	reqHeaders.Set("Content-Type", "application/json")
49088	c.urlParams_.Set("alt", alt)
49089	c.urlParams_.Set("prettyPrint", "false")
49090	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
49091	urls += "?" + c.urlParams_.Encode()
49092	req, err := http.NewRequest("PATCH", urls, body)
49093	if err != nil {
49094		return nil, err
49095	}
49096	req.Header = reqHeaders
49097	googleapi.Expand(req.URL, map[string]string{
49098		"profileId": strconv.FormatInt(c.profileId, 10),
49099	})
49100	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49101}
49102
49103// Do executes the "dfareporting.subaccounts.patch" call.
49104// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
49105// status code is an error. Response headers are in either
49106// *Subaccount.ServerResponse.Header or (if a response was returned at
49107// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49108// to check whether the returned error was because
49109// http.StatusNotModified was returned.
49110func (c *SubaccountsPatchCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
49111	gensupport.SetOptions(c.urlParams_, opts...)
49112	res, err := c.doRequest("json")
49113	if res != nil && res.StatusCode == http.StatusNotModified {
49114		if res.Body != nil {
49115			res.Body.Close()
49116		}
49117		return nil, &googleapi.Error{
49118			Code:   res.StatusCode,
49119			Header: res.Header,
49120		}
49121	}
49122	if err != nil {
49123		return nil, err
49124	}
49125	defer googleapi.CloseBody(res)
49126	if err := googleapi.CheckResponse(res); err != nil {
49127		return nil, err
49128	}
49129	ret := &Subaccount{
49130		ServerResponse: googleapi.ServerResponse{
49131			Header:         res.Header,
49132			HTTPStatusCode: res.StatusCode,
49133		},
49134	}
49135	target := &ret
49136	if err := gensupport.DecodeResponse(target, res); err != nil {
49137		return nil, err
49138	}
49139	return ret, nil
49140	// {
49141	//   "description": "Updates an existing subaccount. This method supports patch semantics.",
49142	//   "flatPath": "userprofiles/{profileId}/subaccounts",
49143	//   "httpMethod": "PATCH",
49144	//   "id": "dfareporting.subaccounts.patch",
49145	//   "parameterOrder": [
49146	//     "profileId",
49147	//     "id"
49148	//   ],
49149	//   "parameters": {
49150	//     "id": {
49151	//       "description": "Subaccount ID.",
49152	//       "format": "int64",
49153	//       "location": "query",
49154	//       "required": true,
49155	//       "type": "string"
49156	//     },
49157	//     "profileId": {
49158	//       "description": "User profile ID associated with this request.",
49159	//       "format": "int64",
49160	//       "location": "path",
49161	//       "required": true,
49162	//       "type": "string"
49163	//     }
49164	//   },
49165	//   "path": "userprofiles/{profileId}/subaccounts",
49166	//   "request": {
49167	//     "$ref": "Subaccount"
49168	//   },
49169	//   "response": {
49170	//     "$ref": "Subaccount"
49171	//   },
49172	//   "scopes": [
49173	//     "https://www.googleapis.com/auth/dfatrafficking"
49174	//   ]
49175	// }
49176
49177}
49178
49179// method id "dfareporting.subaccounts.update":
49180
49181type SubaccountsUpdateCall struct {
49182	s          *Service
49183	profileId  int64
49184	subaccount *Subaccount
49185	urlParams_ gensupport.URLParams
49186	ctx_       context.Context
49187	header_    http.Header
49188}
49189
49190// Update: Updates an existing subaccount.
49191//
49192// - profileId: User profile ID associated with this request.
49193func (r *SubaccountsService) Update(profileId int64, subaccount *Subaccount) *SubaccountsUpdateCall {
49194	c := &SubaccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49195	c.profileId = profileId
49196	c.subaccount = subaccount
49197	return c
49198}
49199
49200// Fields allows partial responses to be retrieved. See
49201// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49202// for more information.
49203func (c *SubaccountsUpdateCall) Fields(s ...googleapi.Field) *SubaccountsUpdateCall {
49204	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49205	return c
49206}
49207
49208// Context sets the context to be used in this call's Do method. Any
49209// pending HTTP request will be aborted if the provided context is
49210// canceled.
49211func (c *SubaccountsUpdateCall) Context(ctx context.Context) *SubaccountsUpdateCall {
49212	c.ctx_ = ctx
49213	return c
49214}
49215
49216// Header returns an http.Header that can be modified by the caller to
49217// add HTTP headers to the request.
49218func (c *SubaccountsUpdateCall) Header() http.Header {
49219	if c.header_ == nil {
49220		c.header_ = make(http.Header)
49221	}
49222	return c.header_
49223}
49224
49225func (c *SubaccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
49226	reqHeaders := make(http.Header)
49227	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
49228	for k, v := range c.header_ {
49229		reqHeaders[k] = v
49230	}
49231	reqHeaders.Set("User-Agent", c.s.userAgent())
49232	var body io.Reader = nil
49233	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
49234	if err != nil {
49235		return nil, err
49236	}
49237	reqHeaders.Set("Content-Type", "application/json")
49238	c.urlParams_.Set("alt", alt)
49239	c.urlParams_.Set("prettyPrint", "false")
49240	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
49241	urls += "?" + c.urlParams_.Encode()
49242	req, err := http.NewRequest("PUT", urls, body)
49243	if err != nil {
49244		return nil, err
49245	}
49246	req.Header = reqHeaders
49247	googleapi.Expand(req.URL, map[string]string{
49248		"profileId": strconv.FormatInt(c.profileId, 10),
49249	})
49250	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49251}
49252
49253// Do executes the "dfareporting.subaccounts.update" call.
49254// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
49255// status code is an error. Response headers are in either
49256// *Subaccount.ServerResponse.Header or (if a response was returned at
49257// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49258// to check whether the returned error was because
49259// http.StatusNotModified was returned.
49260func (c *SubaccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
49261	gensupport.SetOptions(c.urlParams_, opts...)
49262	res, err := c.doRequest("json")
49263	if res != nil && res.StatusCode == http.StatusNotModified {
49264		if res.Body != nil {
49265			res.Body.Close()
49266		}
49267		return nil, &googleapi.Error{
49268			Code:   res.StatusCode,
49269			Header: res.Header,
49270		}
49271	}
49272	if err != nil {
49273		return nil, err
49274	}
49275	defer googleapi.CloseBody(res)
49276	if err := googleapi.CheckResponse(res); err != nil {
49277		return nil, err
49278	}
49279	ret := &Subaccount{
49280		ServerResponse: googleapi.ServerResponse{
49281			Header:         res.Header,
49282			HTTPStatusCode: res.StatusCode,
49283		},
49284	}
49285	target := &ret
49286	if err := gensupport.DecodeResponse(target, res); err != nil {
49287		return nil, err
49288	}
49289	return ret, nil
49290	// {
49291	//   "description": "Updates an existing subaccount.",
49292	//   "flatPath": "userprofiles/{profileId}/subaccounts",
49293	//   "httpMethod": "PUT",
49294	//   "id": "dfareporting.subaccounts.update",
49295	//   "parameterOrder": [
49296	//     "profileId"
49297	//   ],
49298	//   "parameters": {
49299	//     "profileId": {
49300	//       "description": "User profile ID associated with this request.",
49301	//       "format": "int64",
49302	//       "location": "path",
49303	//       "required": true,
49304	//       "type": "string"
49305	//     }
49306	//   },
49307	//   "path": "userprofiles/{profileId}/subaccounts",
49308	//   "request": {
49309	//     "$ref": "Subaccount"
49310	//   },
49311	//   "response": {
49312	//     "$ref": "Subaccount"
49313	//   },
49314	//   "scopes": [
49315	//     "https://www.googleapis.com/auth/dfatrafficking"
49316	//   ]
49317	// }
49318
49319}
49320
49321// method id "dfareporting.targetableRemarketingLists.get":
49322
49323type TargetableRemarketingListsGetCall struct {
49324	s            *Service
49325	profileId    int64
49326	id           int64
49327	urlParams_   gensupport.URLParams
49328	ifNoneMatch_ string
49329	ctx_         context.Context
49330	header_      http.Header
49331}
49332
49333// Get: Gets one remarketing list by ID.
49334//
49335// - id: Remarketing list ID.
49336// - profileId: User profile ID associated with this request.
49337func (r *TargetableRemarketingListsService) Get(profileId int64, id int64) *TargetableRemarketingListsGetCall {
49338	c := &TargetableRemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49339	c.profileId = profileId
49340	c.id = id
49341	return c
49342}
49343
49344// Fields allows partial responses to be retrieved. See
49345// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49346// for more information.
49347func (c *TargetableRemarketingListsGetCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsGetCall {
49348	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49349	return c
49350}
49351
49352// IfNoneMatch sets the optional parameter which makes the operation
49353// fail if the object's ETag matches the given value. This is useful for
49354// getting updates only after the object has changed since the last
49355// request. Use googleapi.IsNotModified to check whether the response
49356// error from Do is the result of In-None-Match.
49357func (c *TargetableRemarketingListsGetCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsGetCall {
49358	c.ifNoneMatch_ = entityTag
49359	return c
49360}
49361
49362// Context sets the context to be used in this call's Do method. Any
49363// pending HTTP request will be aborted if the provided context is
49364// canceled.
49365func (c *TargetableRemarketingListsGetCall) Context(ctx context.Context) *TargetableRemarketingListsGetCall {
49366	c.ctx_ = ctx
49367	return c
49368}
49369
49370// Header returns an http.Header that can be modified by the caller to
49371// add HTTP headers to the request.
49372func (c *TargetableRemarketingListsGetCall) Header() http.Header {
49373	if c.header_ == nil {
49374		c.header_ = make(http.Header)
49375	}
49376	return c.header_
49377}
49378
49379func (c *TargetableRemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
49380	reqHeaders := make(http.Header)
49381	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
49382	for k, v := range c.header_ {
49383		reqHeaders[k] = v
49384	}
49385	reqHeaders.Set("User-Agent", c.s.userAgent())
49386	if c.ifNoneMatch_ != "" {
49387		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49388	}
49389	var body io.Reader = nil
49390	c.urlParams_.Set("alt", alt)
49391	c.urlParams_.Set("prettyPrint", "false")
49392	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists/{id}")
49393	urls += "?" + c.urlParams_.Encode()
49394	req, err := http.NewRequest("GET", urls, body)
49395	if err != nil {
49396		return nil, err
49397	}
49398	req.Header = reqHeaders
49399	googleapi.Expand(req.URL, map[string]string{
49400		"profileId": strconv.FormatInt(c.profileId, 10),
49401		"id":        strconv.FormatInt(c.id, 10),
49402	})
49403	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49404}
49405
49406// Do executes the "dfareporting.targetableRemarketingLists.get" call.
49407// Exactly one of *TargetableRemarketingList or error will be non-nil.
49408// Any non-2xx status code is an error. Response headers are in either
49409// *TargetableRemarketingList.ServerResponse.Header or (if a response
49410// was returned at all) in error.(*googleapi.Error).Header. Use
49411// googleapi.IsNotModified to check whether the returned error was
49412// because http.StatusNotModified was returned.
49413func (c *TargetableRemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingList, error) {
49414	gensupport.SetOptions(c.urlParams_, opts...)
49415	res, err := c.doRequest("json")
49416	if res != nil && res.StatusCode == http.StatusNotModified {
49417		if res.Body != nil {
49418			res.Body.Close()
49419		}
49420		return nil, &googleapi.Error{
49421			Code:   res.StatusCode,
49422			Header: res.Header,
49423		}
49424	}
49425	if err != nil {
49426		return nil, err
49427	}
49428	defer googleapi.CloseBody(res)
49429	if err := googleapi.CheckResponse(res); err != nil {
49430		return nil, err
49431	}
49432	ret := &TargetableRemarketingList{
49433		ServerResponse: googleapi.ServerResponse{
49434			Header:         res.Header,
49435			HTTPStatusCode: res.StatusCode,
49436		},
49437	}
49438	target := &ret
49439	if err := gensupport.DecodeResponse(target, res); err != nil {
49440		return nil, err
49441	}
49442	return ret, nil
49443	// {
49444	//   "description": "Gets one remarketing list by ID.",
49445	//   "flatPath": "userprofiles/{profileId}/targetableRemarketingLists/{id}",
49446	//   "httpMethod": "GET",
49447	//   "id": "dfareporting.targetableRemarketingLists.get",
49448	//   "parameterOrder": [
49449	//     "profileId",
49450	//     "id"
49451	//   ],
49452	//   "parameters": {
49453	//     "id": {
49454	//       "description": "Remarketing list ID.",
49455	//       "format": "int64",
49456	//       "location": "path",
49457	//       "required": true,
49458	//       "type": "string"
49459	//     },
49460	//     "profileId": {
49461	//       "description": "User profile ID associated with this request.",
49462	//       "format": "int64",
49463	//       "location": "path",
49464	//       "required": true,
49465	//       "type": "string"
49466	//     }
49467	//   },
49468	//   "path": "userprofiles/{profileId}/targetableRemarketingLists/{id}",
49469	//   "response": {
49470	//     "$ref": "TargetableRemarketingList"
49471	//   },
49472	//   "scopes": [
49473	//     "https://www.googleapis.com/auth/dfatrafficking"
49474	//   ]
49475	// }
49476
49477}
49478
49479// method id "dfareporting.targetableRemarketingLists.list":
49480
49481type TargetableRemarketingListsListCall struct {
49482	s            *Service
49483	profileId    int64
49484	urlParams_   gensupport.URLParams
49485	ifNoneMatch_ string
49486	ctx_         context.Context
49487	header_      http.Header
49488}
49489
49490// List: Retrieves a list of targetable remarketing lists, possibly
49491// filtered. This method supports paging.
49492//
49493// - advertiserId: Select only targetable remarketing lists targetable
49494//   by these advertisers.
49495// - profileId: User profile ID associated with this request.
49496func (r *TargetableRemarketingListsService) List(profileId int64, advertiserId int64) *TargetableRemarketingListsListCall {
49497	c := &TargetableRemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49498	c.profileId = profileId
49499	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
49500	return c
49501}
49502
49503// Active sets the optional parameter "active": Select only active or
49504// only inactive targetable remarketing lists.
49505func (c *TargetableRemarketingListsListCall) Active(active bool) *TargetableRemarketingListsListCall {
49506	c.urlParams_.Set("active", fmt.Sprint(active))
49507	return c
49508}
49509
49510// MaxResults sets the optional parameter "maxResults": Maximum number
49511// of results to return.
49512func (c *TargetableRemarketingListsListCall) MaxResults(maxResults int64) *TargetableRemarketingListsListCall {
49513	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
49514	return c
49515}
49516
49517// Name sets the optional parameter "name": Allows searching for objects
49518// by name or ID. Wildcards (*) are allowed. For example, "remarketing
49519// list*2015" will return objects with names like "remarketing list June
49520// 2015", "remarketing list April 2015", or simply "remarketing list
49521// 2015". Most of the searches also add wildcards implicitly at the
49522// start and the end of the search string. For example, a search string
49523// of "remarketing list" will match objects with name "my remarketing
49524// list", "remarketing list 2015", or simply "remarketing list".
49525func (c *TargetableRemarketingListsListCall) Name(name string) *TargetableRemarketingListsListCall {
49526	c.urlParams_.Set("name", name)
49527	return c
49528}
49529
49530// PageToken sets the optional parameter "pageToken": Value of the
49531// nextPageToken from the previous result page.
49532func (c *TargetableRemarketingListsListCall) PageToken(pageToken string) *TargetableRemarketingListsListCall {
49533	c.urlParams_.Set("pageToken", pageToken)
49534	return c
49535}
49536
49537// SortField sets the optional parameter "sortField": Field by which to
49538// sort the list.
49539//
49540// Possible values:
49541//   "ID" (default)
49542//   "NAME"
49543func (c *TargetableRemarketingListsListCall) SortField(sortField string) *TargetableRemarketingListsListCall {
49544	c.urlParams_.Set("sortField", sortField)
49545	return c
49546}
49547
49548// SortOrder sets the optional parameter "sortOrder": Order of sorted
49549// results.
49550//
49551// Possible values:
49552//   "ASCENDING" (default)
49553//   "DESCENDING"
49554func (c *TargetableRemarketingListsListCall) SortOrder(sortOrder string) *TargetableRemarketingListsListCall {
49555	c.urlParams_.Set("sortOrder", sortOrder)
49556	return c
49557}
49558
49559// Fields allows partial responses to be retrieved. See
49560// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49561// for more information.
49562func (c *TargetableRemarketingListsListCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsListCall {
49563	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49564	return c
49565}
49566
49567// IfNoneMatch sets the optional parameter which makes the operation
49568// fail if the object's ETag matches the given value. This is useful for
49569// getting updates only after the object has changed since the last
49570// request. Use googleapi.IsNotModified to check whether the response
49571// error from Do is the result of In-None-Match.
49572func (c *TargetableRemarketingListsListCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsListCall {
49573	c.ifNoneMatch_ = entityTag
49574	return c
49575}
49576
49577// Context sets the context to be used in this call's Do method. Any
49578// pending HTTP request will be aborted if the provided context is
49579// canceled.
49580func (c *TargetableRemarketingListsListCall) Context(ctx context.Context) *TargetableRemarketingListsListCall {
49581	c.ctx_ = ctx
49582	return c
49583}
49584
49585// Header returns an http.Header that can be modified by the caller to
49586// add HTTP headers to the request.
49587func (c *TargetableRemarketingListsListCall) Header() http.Header {
49588	if c.header_ == nil {
49589		c.header_ = make(http.Header)
49590	}
49591	return c.header_
49592}
49593
49594func (c *TargetableRemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
49595	reqHeaders := make(http.Header)
49596	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
49597	for k, v := range c.header_ {
49598		reqHeaders[k] = v
49599	}
49600	reqHeaders.Set("User-Agent", c.s.userAgent())
49601	if c.ifNoneMatch_ != "" {
49602		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49603	}
49604	var body io.Reader = nil
49605	c.urlParams_.Set("alt", alt)
49606	c.urlParams_.Set("prettyPrint", "false")
49607	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists")
49608	urls += "?" + c.urlParams_.Encode()
49609	req, err := http.NewRequest("GET", urls, body)
49610	if err != nil {
49611		return nil, err
49612	}
49613	req.Header = reqHeaders
49614	googleapi.Expand(req.URL, map[string]string{
49615		"profileId": strconv.FormatInt(c.profileId, 10),
49616	})
49617	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49618}
49619
49620// Do executes the "dfareporting.targetableRemarketingLists.list" call.
49621// Exactly one of *TargetableRemarketingListsListResponse or error will
49622// be non-nil. Any non-2xx status code is an error. Response headers are
49623// in either
49624// *TargetableRemarketingListsListResponse.ServerResponse.Header or (if
49625// a response was returned at all) in error.(*googleapi.Error).Header.
49626// Use googleapi.IsNotModified to check whether the returned error was
49627// because http.StatusNotModified was returned.
49628func (c *TargetableRemarketingListsListCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingListsListResponse, error) {
49629	gensupport.SetOptions(c.urlParams_, opts...)
49630	res, err := c.doRequest("json")
49631	if res != nil && res.StatusCode == http.StatusNotModified {
49632		if res.Body != nil {
49633			res.Body.Close()
49634		}
49635		return nil, &googleapi.Error{
49636			Code:   res.StatusCode,
49637			Header: res.Header,
49638		}
49639	}
49640	if err != nil {
49641		return nil, err
49642	}
49643	defer googleapi.CloseBody(res)
49644	if err := googleapi.CheckResponse(res); err != nil {
49645		return nil, err
49646	}
49647	ret := &TargetableRemarketingListsListResponse{
49648		ServerResponse: googleapi.ServerResponse{
49649			Header:         res.Header,
49650			HTTPStatusCode: res.StatusCode,
49651		},
49652	}
49653	target := &ret
49654	if err := gensupport.DecodeResponse(target, res); err != nil {
49655		return nil, err
49656	}
49657	return ret, nil
49658	// {
49659	//   "description": "Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging.",
49660	//   "flatPath": "userprofiles/{profileId}/targetableRemarketingLists",
49661	//   "httpMethod": "GET",
49662	//   "id": "dfareporting.targetableRemarketingLists.list",
49663	//   "parameterOrder": [
49664	//     "profileId",
49665	//     "advertiserId"
49666	//   ],
49667	//   "parameters": {
49668	//     "active": {
49669	//       "description": "Select only active or only inactive targetable remarketing lists.",
49670	//       "location": "query",
49671	//       "type": "boolean"
49672	//     },
49673	//     "advertiserId": {
49674	//       "description": "Select only targetable remarketing lists targetable by these advertisers.",
49675	//       "format": "int64",
49676	//       "location": "query",
49677	//       "required": true,
49678	//       "type": "string"
49679	//     },
49680	//     "maxResults": {
49681	//       "default": "1000",
49682	//       "description": "Maximum number of results to return.",
49683	//       "format": "int32",
49684	//       "location": "query",
49685	//       "maximum": "1000",
49686	//       "minimum": "0",
49687	//       "type": "integer"
49688	//     },
49689	//     "name": {
49690	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"remarketing list*2015\" will return objects with names like \"remarketing list June 2015\", \"remarketing list April 2015\", or simply \"remarketing list 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"remarketing list\" will match objects with name \"my remarketing list\", \"remarketing list 2015\", or simply \"remarketing list\".",
49691	//       "location": "query",
49692	//       "type": "string"
49693	//     },
49694	//     "pageToken": {
49695	//       "description": "Value of the nextPageToken from the previous result page.",
49696	//       "location": "query",
49697	//       "type": "string"
49698	//     },
49699	//     "profileId": {
49700	//       "description": "User profile ID associated with this request.",
49701	//       "format": "int64",
49702	//       "location": "path",
49703	//       "required": true,
49704	//       "type": "string"
49705	//     },
49706	//     "sortField": {
49707	//       "default": "ID",
49708	//       "description": "Field by which to sort the list.",
49709	//       "enum": [
49710	//         "ID",
49711	//         "NAME"
49712	//       ],
49713	//       "enumDescriptions": [
49714	//         "",
49715	//         ""
49716	//       ],
49717	//       "location": "query",
49718	//       "type": "string"
49719	//     },
49720	//     "sortOrder": {
49721	//       "default": "ASCENDING",
49722	//       "description": "Order of sorted results.",
49723	//       "enum": [
49724	//         "ASCENDING",
49725	//         "DESCENDING"
49726	//       ],
49727	//       "enumDescriptions": [
49728	//         "",
49729	//         ""
49730	//       ],
49731	//       "location": "query",
49732	//       "type": "string"
49733	//     }
49734	//   },
49735	//   "path": "userprofiles/{profileId}/targetableRemarketingLists",
49736	//   "response": {
49737	//     "$ref": "TargetableRemarketingListsListResponse"
49738	//   },
49739	//   "scopes": [
49740	//     "https://www.googleapis.com/auth/dfatrafficking"
49741	//   ]
49742	// }
49743
49744}
49745
49746// Pages invokes f for each page of results.
49747// A non-nil error returned from f will halt the iteration.
49748// The provided context supersedes any context provided to the Context method.
49749func (c *TargetableRemarketingListsListCall) Pages(ctx context.Context, f func(*TargetableRemarketingListsListResponse) error) error {
49750	c.ctx_ = ctx
49751	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
49752	for {
49753		x, err := c.Do()
49754		if err != nil {
49755			return err
49756		}
49757		if err := f(x); err != nil {
49758			return err
49759		}
49760		if x.NextPageToken == "" {
49761			return nil
49762		}
49763		c.PageToken(x.NextPageToken)
49764	}
49765}
49766
49767// method id "dfareporting.targetingTemplates.get":
49768
49769type TargetingTemplatesGetCall struct {
49770	s            *Service
49771	profileId    int64
49772	id           int64
49773	urlParams_   gensupport.URLParams
49774	ifNoneMatch_ string
49775	ctx_         context.Context
49776	header_      http.Header
49777}
49778
49779// Get: Gets one targeting template by ID.
49780//
49781// - id: Targeting template ID.
49782// - profileId: User profile ID associated with this request.
49783func (r *TargetingTemplatesService) Get(profileId int64, id int64) *TargetingTemplatesGetCall {
49784	c := &TargetingTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49785	c.profileId = profileId
49786	c.id = id
49787	return c
49788}
49789
49790// Fields allows partial responses to be retrieved. See
49791// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49792// for more information.
49793func (c *TargetingTemplatesGetCall) Fields(s ...googleapi.Field) *TargetingTemplatesGetCall {
49794	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49795	return c
49796}
49797
49798// IfNoneMatch sets the optional parameter which makes the operation
49799// fail if the object's ETag matches the given value. This is useful for
49800// getting updates only after the object has changed since the last
49801// request. Use googleapi.IsNotModified to check whether the response
49802// error from Do is the result of In-None-Match.
49803func (c *TargetingTemplatesGetCall) IfNoneMatch(entityTag string) *TargetingTemplatesGetCall {
49804	c.ifNoneMatch_ = entityTag
49805	return c
49806}
49807
49808// Context sets the context to be used in this call's Do method. Any
49809// pending HTTP request will be aborted if the provided context is
49810// canceled.
49811func (c *TargetingTemplatesGetCall) Context(ctx context.Context) *TargetingTemplatesGetCall {
49812	c.ctx_ = ctx
49813	return c
49814}
49815
49816// Header returns an http.Header that can be modified by the caller to
49817// add HTTP headers to the request.
49818func (c *TargetingTemplatesGetCall) Header() http.Header {
49819	if c.header_ == nil {
49820		c.header_ = make(http.Header)
49821	}
49822	return c.header_
49823}
49824
49825func (c *TargetingTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
49826	reqHeaders := make(http.Header)
49827	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
49828	for k, v := range c.header_ {
49829		reqHeaders[k] = v
49830	}
49831	reqHeaders.Set("User-Agent", c.s.userAgent())
49832	if c.ifNoneMatch_ != "" {
49833		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49834	}
49835	var body io.Reader = nil
49836	c.urlParams_.Set("alt", alt)
49837	c.urlParams_.Set("prettyPrint", "false")
49838	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates/{id}")
49839	urls += "?" + c.urlParams_.Encode()
49840	req, err := http.NewRequest("GET", urls, body)
49841	if err != nil {
49842		return nil, err
49843	}
49844	req.Header = reqHeaders
49845	googleapi.Expand(req.URL, map[string]string{
49846		"profileId": strconv.FormatInt(c.profileId, 10),
49847		"id":        strconv.FormatInt(c.id, 10),
49848	})
49849	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49850}
49851
49852// Do executes the "dfareporting.targetingTemplates.get" call.
49853// Exactly one of *TargetingTemplate or error will be non-nil. Any
49854// non-2xx status code is an error. Response headers are in either
49855// *TargetingTemplate.ServerResponse.Header or (if a response was
49856// returned at all) in error.(*googleapi.Error).Header. Use
49857// googleapi.IsNotModified to check whether the returned error was
49858// because http.StatusNotModified was returned.
49859func (c *TargetingTemplatesGetCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
49860	gensupport.SetOptions(c.urlParams_, opts...)
49861	res, err := c.doRequest("json")
49862	if res != nil && res.StatusCode == http.StatusNotModified {
49863		if res.Body != nil {
49864			res.Body.Close()
49865		}
49866		return nil, &googleapi.Error{
49867			Code:   res.StatusCode,
49868			Header: res.Header,
49869		}
49870	}
49871	if err != nil {
49872		return nil, err
49873	}
49874	defer googleapi.CloseBody(res)
49875	if err := googleapi.CheckResponse(res); err != nil {
49876		return nil, err
49877	}
49878	ret := &TargetingTemplate{
49879		ServerResponse: googleapi.ServerResponse{
49880			Header:         res.Header,
49881			HTTPStatusCode: res.StatusCode,
49882		},
49883	}
49884	target := &ret
49885	if err := gensupport.DecodeResponse(target, res); err != nil {
49886		return nil, err
49887	}
49888	return ret, nil
49889	// {
49890	//   "description": "Gets one targeting template by ID.",
49891	//   "flatPath": "userprofiles/{profileId}/targetingTemplates/{id}",
49892	//   "httpMethod": "GET",
49893	//   "id": "dfareporting.targetingTemplates.get",
49894	//   "parameterOrder": [
49895	//     "profileId",
49896	//     "id"
49897	//   ],
49898	//   "parameters": {
49899	//     "id": {
49900	//       "description": "Targeting template ID.",
49901	//       "format": "int64",
49902	//       "location": "path",
49903	//       "required": true,
49904	//       "type": "string"
49905	//     },
49906	//     "profileId": {
49907	//       "description": "User profile ID associated with this request.",
49908	//       "format": "int64",
49909	//       "location": "path",
49910	//       "required": true,
49911	//       "type": "string"
49912	//     }
49913	//   },
49914	//   "path": "userprofiles/{profileId}/targetingTemplates/{id}",
49915	//   "response": {
49916	//     "$ref": "TargetingTemplate"
49917	//   },
49918	//   "scopes": [
49919	//     "https://www.googleapis.com/auth/dfatrafficking"
49920	//   ]
49921	// }
49922
49923}
49924
49925// method id "dfareporting.targetingTemplates.insert":
49926
49927type TargetingTemplatesInsertCall struct {
49928	s                 *Service
49929	profileId         int64
49930	targetingtemplate *TargetingTemplate
49931	urlParams_        gensupport.URLParams
49932	ctx_              context.Context
49933	header_           http.Header
49934}
49935
49936// Insert: Inserts a new targeting template.
49937//
49938// - profileId: User profile ID associated with this request.
49939func (r *TargetingTemplatesService) Insert(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesInsertCall {
49940	c := &TargetingTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49941	c.profileId = profileId
49942	c.targetingtemplate = targetingtemplate
49943	return c
49944}
49945
49946// Fields allows partial responses to be retrieved. See
49947// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49948// for more information.
49949func (c *TargetingTemplatesInsertCall) Fields(s ...googleapi.Field) *TargetingTemplatesInsertCall {
49950	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49951	return c
49952}
49953
49954// Context sets the context to be used in this call's Do method. Any
49955// pending HTTP request will be aborted if the provided context is
49956// canceled.
49957func (c *TargetingTemplatesInsertCall) Context(ctx context.Context) *TargetingTemplatesInsertCall {
49958	c.ctx_ = ctx
49959	return c
49960}
49961
49962// Header returns an http.Header that can be modified by the caller to
49963// add HTTP headers to the request.
49964func (c *TargetingTemplatesInsertCall) Header() http.Header {
49965	if c.header_ == nil {
49966		c.header_ = make(http.Header)
49967	}
49968	return c.header_
49969}
49970
49971func (c *TargetingTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
49972	reqHeaders := make(http.Header)
49973	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
49974	for k, v := range c.header_ {
49975		reqHeaders[k] = v
49976	}
49977	reqHeaders.Set("User-Agent", c.s.userAgent())
49978	var body io.Reader = nil
49979	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
49980	if err != nil {
49981		return nil, err
49982	}
49983	reqHeaders.Set("Content-Type", "application/json")
49984	c.urlParams_.Set("alt", alt)
49985	c.urlParams_.Set("prettyPrint", "false")
49986	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
49987	urls += "?" + c.urlParams_.Encode()
49988	req, err := http.NewRequest("POST", urls, body)
49989	if err != nil {
49990		return nil, err
49991	}
49992	req.Header = reqHeaders
49993	googleapi.Expand(req.URL, map[string]string{
49994		"profileId": strconv.FormatInt(c.profileId, 10),
49995	})
49996	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49997}
49998
49999// Do executes the "dfareporting.targetingTemplates.insert" call.
50000// Exactly one of *TargetingTemplate or error will be non-nil. Any
50001// non-2xx status code is an error. Response headers are in either
50002// *TargetingTemplate.ServerResponse.Header or (if a response was
50003// returned at all) in error.(*googleapi.Error).Header. Use
50004// googleapi.IsNotModified to check whether the returned error was
50005// because http.StatusNotModified was returned.
50006func (c *TargetingTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
50007	gensupport.SetOptions(c.urlParams_, opts...)
50008	res, err := c.doRequest("json")
50009	if res != nil && res.StatusCode == http.StatusNotModified {
50010		if res.Body != nil {
50011			res.Body.Close()
50012		}
50013		return nil, &googleapi.Error{
50014			Code:   res.StatusCode,
50015			Header: res.Header,
50016		}
50017	}
50018	if err != nil {
50019		return nil, err
50020	}
50021	defer googleapi.CloseBody(res)
50022	if err := googleapi.CheckResponse(res); err != nil {
50023		return nil, err
50024	}
50025	ret := &TargetingTemplate{
50026		ServerResponse: googleapi.ServerResponse{
50027			Header:         res.Header,
50028			HTTPStatusCode: res.StatusCode,
50029		},
50030	}
50031	target := &ret
50032	if err := gensupport.DecodeResponse(target, res); err != nil {
50033		return nil, err
50034	}
50035	return ret, nil
50036	// {
50037	//   "description": "Inserts a new targeting template.",
50038	//   "flatPath": "userprofiles/{profileId}/targetingTemplates",
50039	//   "httpMethod": "POST",
50040	//   "id": "dfareporting.targetingTemplates.insert",
50041	//   "parameterOrder": [
50042	//     "profileId"
50043	//   ],
50044	//   "parameters": {
50045	//     "profileId": {
50046	//       "description": "User profile ID associated with this request.",
50047	//       "format": "int64",
50048	//       "location": "path",
50049	//       "required": true,
50050	//       "type": "string"
50051	//     }
50052	//   },
50053	//   "path": "userprofiles/{profileId}/targetingTemplates",
50054	//   "request": {
50055	//     "$ref": "TargetingTemplate"
50056	//   },
50057	//   "response": {
50058	//     "$ref": "TargetingTemplate"
50059	//   },
50060	//   "scopes": [
50061	//     "https://www.googleapis.com/auth/dfatrafficking"
50062	//   ]
50063	// }
50064
50065}
50066
50067// method id "dfareporting.targetingTemplates.list":
50068
50069type TargetingTemplatesListCall struct {
50070	s            *Service
50071	profileId    int64
50072	urlParams_   gensupport.URLParams
50073	ifNoneMatch_ string
50074	ctx_         context.Context
50075	header_      http.Header
50076}
50077
50078// List: Retrieves a list of targeting templates, optionally filtered.
50079// This method supports paging.
50080//
50081// - profileId: User profile ID associated with this request.
50082func (r *TargetingTemplatesService) List(profileId int64) *TargetingTemplatesListCall {
50083	c := &TargetingTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50084	c.profileId = profileId
50085	return c
50086}
50087
50088// AdvertiserId sets the optional parameter "advertiserId": Select only
50089// targeting templates with this advertiser ID.
50090func (c *TargetingTemplatesListCall) AdvertiserId(advertiserId int64) *TargetingTemplatesListCall {
50091	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
50092	return c
50093}
50094
50095// Ids sets the optional parameter "ids": Select only targeting
50096// templates with these IDs.
50097func (c *TargetingTemplatesListCall) Ids(ids ...int64) *TargetingTemplatesListCall {
50098	var ids_ []string
50099	for _, v := range ids {
50100		ids_ = append(ids_, fmt.Sprint(v))
50101	}
50102	c.urlParams_.SetMulti("ids", ids_)
50103	return c
50104}
50105
50106// MaxResults sets the optional parameter "maxResults": Maximum number
50107// of results to return.
50108func (c *TargetingTemplatesListCall) MaxResults(maxResults int64) *TargetingTemplatesListCall {
50109	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
50110	return c
50111}
50112
50113// PageToken sets the optional parameter "pageToken": Value of the
50114// nextPageToken from the previous result page.
50115func (c *TargetingTemplatesListCall) PageToken(pageToken string) *TargetingTemplatesListCall {
50116	c.urlParams_.Set("pageToken", pageToken)
50117	return c
50118}
50119
50120// SearchString sets the optional parameter "searchString": Allows
50121// searching for objects by name or ID. Wildcards (*) are allowed. For
50122// example, "template*2015" will return objects with names like
50123// "template June 2015", "template April 2015", or simply "template
50124// 2015". Most of the searches also add wildcards implicitly at the
50125// start and the end of the search string. For example, a search string
50126// of "template" will match objects with name "my template", "template
50127// 2015", or simply "template".
50128func (c *TargetingTemplatesListCall) SearchString(searchString string) *TargetingTemplatesListCall {
50129	c.urlParams_.Set("searchString", searchString)
50130	return c
50131}
50132
50133// SortField sets the optional parameter "sortField": Field by which to
50134// sort the list.
50135//
50136// Possible values:
50137//   "ID" (default)
50138//   "NAME"
50139func (c *TargetingTemplatesListCall) SortField(sortField string) *TargetingTemplatesListCall {
50140	c.urlParams_.Set("sortField", sortField)
50141	return c
50142}
50143
50144// SortOrder sets the optional parameter "sortOrder": Order of sorted
50145// results.
50146//
50147// Possible values:
50148//   "ASCENDING" (default)
50149//   "DESCENDING"
50150func (c *TargetingTemplatesListCall) SortOrder(sortOrder string) *TargetingTemplatesListCall {
50151	c.urlParams_.Set("sortOrder", sortOrder)
50152	return c
50153}
50154
50155// Fields allows partial responses to be retrieved. See
50156// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50157// for more information.
50158func (c *TargetingTemplatesListCall) Fields(s ...googleapi.Field) *TargetingTemplatesListCall {
50159	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50160	return c
50161}
50162
50163// IfNoneMatch sets the optional parameter which makes the operation
50164// fail if the object's ETag matches the given value. This is useful for
50165// getting updates only after the object has changed since the last
50166// request. Use googleapi.IsNotModified to check whether the response
50167// error from Do is the result of In-None-Match.
50168func (c *TargetingTemplatesListCall) IfNoneMatch(entityTag string) *TargetingTemplatesListCall {
50169	c.ifNoneMatch_ = entityTag
50170	return c
50171}
50172
50173// Context sets the context to be used in this call's Do method. Any
50174// pending HTTP request will be aborted if the provided context is
50175// canceled.
50176func (c *TargetingTemplatesListCall) Context(ctx context.Context) *TargetingTemplatesListCall {
50177	c.ctx_ = ctx
50178	return c
50179}
50180
50181// Header returns an http.Header that can be modified by the caller to
50182// add HTTP headers to the request.
50183func (c *TargetingTemplatesListCall) Header() http.Header {
50184	if c.header_ == nil {
50185		c.header_ = make(http.Header)
50186	}
50187	return c.header_
50188}
50189
50190func (c *TargetingTemplatesListCall) doRequest(alt string) (*http.Response, error) {
50191	reqHeaders := make(http.Header)
50192	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
50193	for k, v := range c.header_ {
50194		reqHeaders[k] = v
50195	}
50196	reqHeaders.Set("User-Agent", c.s.userAgent())
50197	if c.ifNoneMatch_ != "" {
50198		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50199	}
50200	var body io.Reader = nil
50201	c.urlParams_.Set("alt", alt)
50202	c.urlParams_.Set("prettyPrint", "false")
50203	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
50204	urls += "?" + c.urlParams_.Encode()
50205	req, err := http.NewRequest("GET", urls, body)
50206	if err != nil {
50207		return nil, err
50208	}
50209	req.Header = reqHeaders
50210	googleapi.Expand(req.URL, map[string]string{
50211		"profileId": strconv.FormatInt(c.profileId, 10),
50212	})
50213	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50214}
50215
50216// Do executes the "dfareporting.targetingTemplates.list" call.
50217// Exactly one of *TargetingTemplatesListResponse or error will be
50218// non-nil. Any non-2xx status code is an error. Response headers are in
50219// either *TargetingTemplatesListResponse.ServerResponse.Header or (if a
50220// response was returned at all) in error.(*googleapi.Error).Header. Use
50221// googleapi.IsNotModified to check whether the returned error was
50222// because http.StatusNotModified was returned.
50223func (c *TargetingTemplatesListCall) Do(opts ...googleapi.CallOption) (*TargetingTemplatesListResponse, error) {
50224	gensupport.SetOptions(c.urlParams_, opts...)
50225	res, err := c.doRequest("json")
50226	if res != nil && res.StatusCode == http.StatusNotModified {
50227		if res.Body != nil {
50228			res.Body.Close()
50229		}
50230		return nil, &googleapi.Error{
50231			Code:   res.StatusCode,
50232			Header: res.Header,
50233		}
50234	}
50235	if err != nil {
50236		return nil, err
50237	}
50238	defer googleapi.CloseBody(res)
50239	if err := googleapi.CheckResponse(res); err != nil {
50240		return nil, err
50241	}
50242	ret := &TargetingTemplatesListResponse{
50243		ServerResponse: googleapi.ServerResponse{
50244			Header:         res.Header,
50245			HTTPStatusCode: res.StatusCode,
50246		},
50247	}
50248	target := &ret
50249	if err := gensupport.DecodeResponse(target, res); err != nil {
50250		return nil, err
50251	}
50252	return ret, nil
50253	// {
50254	//   "description": "Retrieves a list of targeting templates, optionally filtered. This method supports paging.",
50255	//   "flatPath": "userprofiles/{profileId}/targetingTemplates",
50256	//   "httpMethod": "GET",
50257	//   "id": "dfareporting.targetingTemplates.list",
50258	//   "parameterOrder": [
50259	//     "profileId"
50260	//   ],
50261	//   "parameters": {
50262	//     "advertiserId": {
50263	//       "description": "Select only targeting templates with this advertiser ID.",
50264	//       "format": "int64",
50265	//       "location": "query",
50266	//       "type": "string"
50267	//     },
50268	//     "ids": {
50269	//       "description": "Select only targeting templates with these IDs.",
50270	//       "format": "int64",
50271	//       "location": "query",
50272	//       "repeated": true,
50273	//       "type": "string"
50274	//     },
50275	//     "maxResults": {
50276	//       "default": "1000",
50277	//       "description": "Maximum number of results to return.",
50278	//       "format": "int32",
50279	//       "location": "query",
50280	//       "maximum": "1000",
50281	//       "minimum": "0",
50282	//       "type": "integer"
50283	//     },
50284	//     "pageToken": {
50285	//       "description": "Value of the nextPageToken from the previous result page.",
50286	//       "location": "query",
50287	//       "type": "string"
50288	//     },
50289	//     "profileId": {
50290	//       "description": "User profile ID associated with this request.",
50291	//       "format": "int64",
50292	//       "location": "path",
50293	//       "required": true,
50294	//       "type": "string"
50295	//     },
50296	//     "searchString": {
50297	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"template*2015\" will return objects with names like \"template June 2015\", \"template April 2015\", or simply \"template 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"template\" will match objects with name \"my template\", \"template 2015\", or simply \"template\".",
50298	//       "location": "query",
50299	//       "type": "string"
50300	//     },
50301	//     "sortField": {
50302	//       "default": "ID",
50303	//       "description": "Field by which to sort the list.",
50304	//       "enum": [
50305	//         "ID",
50306	//         "NAME"
50307	//       ],
50308	//       "enumDescriptions": [
50309	//         "",
50310	//         ""
50311	//       ],
50312	//       "location": "query",
50313	//       "type": "string"
50314	//     },
50315	//     "sortOrder": {
50316	//       "default": "ASCENDING",
50317	//       "description": "Order of sorted results.",
50318	//       "enum": [
50319	//         "ASCENDING",
50320	//         "DESCENDING"
50321	//       ],
50322	//       "enumDescriptions": [
50323	//         "",
50324	//         ""
50325	//       ],
50326	//       "location": "query",
50327	//       "type": "string"
50328	//     }
50329	//   },
50330	//   "path": "userprofiles/{profileId}/targetingTemplates",
50331	//   "response": {
50332	//     "$ref": "TargetingTemplatesListResponse"
50333	//   },
50334	//   "scopes": [
50335	//     "https://www.googleapis.com/auth/dfatrafficking"
50336	//   ]
50337	// }
50338
50339}
50340
50341// Pages invokes f for each page of results.
50342// A non-nil error returned from f will halt the iteration.
50343// The provided context supersedes any context provided to the Context method.
50344func (c *TargetingTemplatesListCall) Pages(ctx context.Context, f func(*TargetingTemplatesListResponse) error) error {
50345	c.ctx_ = ctx
50346	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
50347	for {
50348		x, err := c.Do()
50349		if err != nil {
50350			return err
50351		}
50352		if err := f(x); err != nil {
50353			return err
50354		}
50355		if x.NextPageToken == "" {
50356			return nil
50357		}
50358		c.PageToken(x.NextPageToken)
50359	}
50360}
50361
50362// method id "dfareporting.targetingTemplates.patch":
50363
50364type TargetingTemplatesPatchCall struct {
50365	s                 *Service
50366	profileId         int64
50367	targetingtemplate *TargetingTemplate
50368	urlParams_        gensupport.URLParams
50369	ctx_              context.Context
50370	header_           http.Header
50371}
50372
50373// Patch: Updates an existing targeting template. This method supports
50374// patch semantics.
50375//
50376// - id: TargetingTemplate ID.
50377// - profileId: User profile ID associated with this request.
50378func (r *TargetingTemplatesService) Patch(profileId int64, id int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesPatchCall {
50379	c := &TargetingTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50380	c.profileId = profileId
50381	c.urlParams_.Set("id", fmt.Sprint(id))
50382	c.targetingtemplate = targetingtemplate
50383	return c
50384}
50385
50386// Fields allows partial responses to be retrieved. See
50387// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50388// for more information.
50389func (c *TargetingTemplatesPatchCall) Fields(s ...googleapi.Field) *TargetingTemplatesPatchCall {
50390	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50391	return c
50392}
50393
50394// Context sets the context to be used in this call's Do method. Any
50395// pending HTTP request will be aborted if the provided context is
50396// canceled.
50397func (c *TargetingTemplatesPatchCall) Context(ctx context.Context) *TargetingTemplatesPatchCall {
50398	c.ctx_ = ctx
50399	return c
50400}
50401
50402// Header returns an http.Header that can be modified by the caller to
50403// add HTTP headers to the request.
50404func (c *TargetingTemplatesPatchCall) Header() http.Header {
50405	if c.header_ == nil {
50406		c.header_ = make(http.Header)
50407	}
50408	return c.header_
50409}
50410
50411func (c *TargetingTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
50412	reqHeaders := make(http.Header)
50413	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
50414	for k, v := range c.header_ {
50415		reqHeaders[k] = v
50416	}
50417	reqHeaders.Set("User-Agent", c.s.userAgent())
50418	var body io.Reader = nil
50419	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
50420	if err != nil {
50421		return nil, err
50422	}
50423	reqHeaders.Set("Content-Type", "application/json")
50424	c.urlParams_.Set("alt", alt)
50425	c.urlParams_.Set("prettyPrint", "false")
50426	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
50427	urls += "?" + c.urlParams_.Encode()
50428	req, err := http.NewRequest("PATCH", urls, body)
50429	if err != nil {
50430		return nil, err
50431	}
50432	req.Header = reqHeaders
50433	googleapi.Expand(req.URL, map[string]string{
50434		"profileId": strconv.FormatInt(c.profileId, 10),
50435	})
50436	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50437}
50438
50439// Do executes the "dfareporting.targetingTemplates.patch" call.
50440// Exactly one of *TargetingTemplate or error will be non-nil. Any
50441// non-2xx status code is an error. Response headers are in either
50442// *TargetingTemplate.ServerResponse.Header or (if a response was
50443// returned at all) in error.(*googleapi.Error).Header. Use
50444// googleapi.IsNotModified to check whether the returned error was
50445// because http.StatusNotModified was returned.
50446func (c *TargetingTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
50447	gensupport.SetOptions(c.urlParams_, opts...)
50448	res, err := c.doRequest("json")
50449	if res != nil && res.StatusCode == http.StatusNotModified {
50450		if res.Body != nil {
50451			res.Body.Close()
50452		}
50453		return nil, &googleapi.Error{
50454			Code:   res.StatusCode,
50455			Header: res.Header,
50456		}
50457	}
50458	if err != nil {
50459		return nil, err
50460	}
50461	defer googleapi.CloseBody(res)
50462	if err := googleapi.CheckResponse(res); err != nil {
50463		return nil, err
50464	}
50465	ret := &TargetingTemplate{
50466		ServerResponse: googleapi.ServerResponse{
50467			Header:         res.Header,
50468			HTTPStatusCode: res.StatusCode,
50469		},
50470	}
50471	target := &ret
50472	if err := gensupport.DecodeResponse(target, res); err != nil {
50473		return nil, err
50474	}
50475	return ret, nil
50476	// {
50477	//   "description": "Updates an existing targeting template. This method supports patch semantics.",
50478	//   "flatPath": "userprofiles/{profileId}/targetingTemplates",
50479	//   "httpMethod": "PATCH",
50480	//   "id": "dfareporting.targetingTemplates.patch",
50481	//   "parameterOrder": [
50482	//     "profileId",
50483	//     "id"
50484	//   ],
50485	//   "parameters": {
50486	//     "id": {
50487	//       "description": "TargetingTemplate ID.",
50488	//       "format": "int64",
50489	//       "location": "query",
50490	//       "required": true,
50491	//       "type": "string"
50492	//     },
50493	//     "profileId": {
50494	//       "description": "User profile ID associated with this request.",
50495	//       "format": "int64",
50496	//       "location": "path",
50497	//       "required": true,
50498	//       "type": "string"
50499	//     }
50500	//   },
50501	//   "path": "userprofiles/{profileId}/targetingTemplates",
50502	//   "request": {
50503	//     "$ref": "TargetingTemplate"
50504	//   },
50505	//   "response": {
50506	//     "$ref": "TargetingTemplate"
50507	//   },
50508	//   "scopes": [
50509	//     "https://www.googleapis.com/auth/dfatrafficking"
50510	//   ]
50511	// }
50512
50513}
50514
50515// method id "dfareporting.targetingTemplates.update":
50516
50517type TargetingTemplatesUpdateCall struct {
50518	s                 *Service
50519	profileId         int64
50520	targetingtemplate *TargetingTemplate
50521	urlParams_        gensupport.URLParams
50522	ctx_              context.Context
50523	header_           http.Header
50524}
50525
50526// Update: Updates an existing targeting template.
50527//
50528// - profileId: User profile ID associated with this request.
50529func (r *TargetingTemplatesService) Update(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesUpdateCall {
50530	c := &TargetingTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50531	c.profileId = profileId
50532	c.targetingtemplate = targetingtemplate
50533	return c
50534}
50535
50536// Fields allows partial responses to be retrieved. See
50537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50538// for more information.
50539func (c *TargetingTemplatesUpdateCall) Fields(s ...googleapi.Field) *TargetingTemplatesUpdateCall {
50540	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50541	return c
50542}
50543
50544// Context sets the context to be used in this call's Do method. Any
50545// pending HTTP request will be aborted if the provided context is
50546// canceled.
50547func (c *TargetingTemplatesUpdateCall) Context(ctx context.Context) *TargetingTemplatesUpdateCall {
50548	c.ctx_ = ctx
50549	return c
50550}
50551
50552// Header returns an http.Header that can be modified by the caller to
50553// add HTTP headers to the request.
50554func (c *TargetingTemplatesUpdateCall) Header() http.Header {
50555	if c.header_ == nil {
50556		c.header_ = make(http.Header)
50557	}
50558	return c.header_
50559}
50560
50561func (c *TargetingTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
50562	reqHeaders := make(http.Header)
50563	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
50564	for k, v := range c.header_ {
50565		reqHeaders[k] = v
50566	}
50567	reqHeaders.Set("User-Agent", c.s.userAgent())
50568	var body io.Reader = nil
50569	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
50570	if err != nil {
50571		return nil, err
50572	}
50573	reqHeaders.Set("Content-Type", "application/json")
50574	c.urlParams_.Set("alt", alt)
50575	c.urlParams_.Set("prettyPrint", "false")
50576	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
50577	urls += "?" + c.urlParams_.Encode()
50578	req, err := http.NewRequest("PUT", urls, body)
50579	if err != nil {
50580		return nil, err
50581	}
50582	req.Header = reqHeaders
50583	googleapi.Expand(req.URL, map[string]string{
50584		"profileId": strconv.FormatInt(c.profileId, 10),
50585	})
50586	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50587}
50588
50589// Do executes the "dfareporting.targetingTemplates.update" call.
50590// Exactly one of *TargetingTemplate or error will be non-nil. Any
50591// non-2xx status code is an error. Response headers are in either
50592// *TargetingTemplate.ServerResponse.Header or (if a response was
50593// returned at all) in error.(*googleapi.Error).Header. Use
50594// googleapi.IsNotModified to check whether the returned error was
50595// because http.StatusNotModified was returned.
50596func (c *TargetingTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
50597	gensupport.SetOptions(c.urlParams_, opts...)
50598	res, err := c.doRequest("json")
50599	if res != nil && res.StatusCode == http.StatusNotModified {
50600		if res.Body != nil {
50601			res.Body.Close()
50602		}
50603		return nil, &googleapi.Error{
50604			Code:   res.StatusCode,
50605			Header: res.Header,
50606		}
50607	}
50608	if err != nil {
50609		return nil, err
50610	}
50611	defer googleapi.CloseBody(res)
50612	if err := googleapi.CheckResponse(res); err != nil {
50613		return nil, err
50614	}
50615	ret := &TargetingTemplate{
50616		ServerResponse: googleapi.ServerResponse{
50617			Header:         res.Header,
50618			HTTPStatusCode: res.StatusCode,
50619		},
50620	}
50621	target := &ret
50622	if err := gensupport.DecodeResponse(target, res); err != nil {
50623		return nil, err
50624	}
50625	return ret, nil
50626	// {
50627	//   "description": "Updates an existing targeting template.",
50628	//   "flatPath": "userprofiles/{profileId}/targetingTemplates",
50629	//   "httpMethod": "PUT",
50630	//   "id": "dfareporting.targetingTemplates.update",
50631	//   "parameterOrder": [
50632	//     "profileId"
50633	//   ],
50634	//   "parameters": {
50635	//     "profileId": {
50636	//       "description": "User profile ID associated with this request.",
50637	//       "format": "int64",
50638	//       "location": "path",
50639	//       "required": true,
50640	//       "type": "string"
50641	//     }
50642	//   },
50643	//   "path": "userprofiles/{profileId}/targetingTemplates",
50644	//   "request": {
50645	//     "$ref": "TargetingTemplate"
50646	//   },
50647	//   "response": {
50648	//     "$ref": "TargetingTemplate"
50649	//   },
50650	//   "scopes": [
50651	//     "https://www.googleapis.com/auth/dfatrafficking"
50652	//   ]
50653	// }
50654
50655}
50656
50657// method id "dfareporting.userProfiles.get":
50658
50659type UserProfilesGetCall struct {
50660	s            *Service
50661	profileId    int64
50662	urlParams_   gensupport.URLParams
50663	ifNoneMatch_ string
50664	ctx_         context.Context
50665	header_      http.Header
50666}
50667
50668// Get: Gets one user profile by ID.
50669//
50670// - profileId: The user profile ID.
50671func (r *UserProfilesService) Get(profileId int64) *UserProfilesGetCall {
50672	c := &UserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50673	c.profileId = profileId
50674	return c
50675}
50676
50677// Fields allows partial responses to be retrieved. See
50678// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50679// for more information.
50680func (c *UserProfilesGetCall) Fields(s ...googleapi.Field) *UserProfilesGetCall {
50681	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50682	return c
50683}
50684
50685// IfNoneMatch sets the optional parameter which makes the operation
50686// fail if the object's ETag matches the given value. This is useful for
50687// getting updates only after the object has changed since the last
50688// request. Use googleapi.IsNotModified to check whether the response
50689// error from Do is the result of In-None-Match.
50690func (c *UserProfilesGetCall) IfNoneMatch(entityTag string) *UserProfilesGetCall {
50691	c.ifNoneMatch_ = entityTag
50692	return c
50693}
50694
50695// Context sets the context to be used in this call's Do method. Any
50696// pending HTTP request will be aborted if the provided context is
50697// canceled.
50698func (c *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
50699	c.ctx_ = ctx
50700	return c
50701}
50702
50703// Header returns an http.Header that can be modified by the caller to
50704// add HTTP headers to the request.
50705func (c *UserProfilesGetCall) Header() http.Header {
50706	if c.header_ == nil {
50707		c.header_ = make(http.Header)
50708	}
50709	return c.header_
50710}
50711
50712func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
50713	reqHeaders := make(http.Header)
50714	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
50715	for k, v := range c.header_ {
50716		reqHeaders[k] = v
50717	}
50718	reqHeaders.Set("User-Agent", c.s.userAgent())
50719	if c.ifNoneMatch_ != "" {
50720		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50721	}
50722	var body io.Reader = nil
50723	c.urlParams_.Set("alt", alt)
50724	c.urlParams_.Set("prettyPrint", "false")
50725	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}")
50726	urls += "?" + c.urlParams_.Encode()
50727	req, err := http.NewRequest("GET", urls, body)
50728	if err != nil {
50729		return nil, err
50730	}
50731	req.Header = reqHeaders
50732	googleapi.Expand(req.URL, map[string]string{
50733		"profileId": strconv.FormatInt(c.profileId, 10),
50734	})
50735	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50736}
50737
50738// Do executes the "dfareporting.userProfiles.get" call.
50739// Exactly one of *UserProfile or error will be non-nil. Any non-2xx
50740// status code is an error. Response headers are in either
50741// *UserProfile.ServerResponse.Header or (if a response was returned at
50742// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50743// to check whether the returned error was because
50744// http.StatusNotModified was returned.
50745func (c *UserProfilesGetCall) Do(opts ...googleapi.CallOption) (*UserProfile, error) {
50746	gensupport.SetOptions(c.urlParams_, opts...)
50747	res, err := c.doRequest("json")
50748	if res != nil && res.StatusCode == http.StatusNotModified {
50749		if res.Body != nil {
50750			res.Body.Close()
50751		}
50752		return nil, &googleapi.Error{
50753			Code:   res.StatusCode,
50754			Header: res.Header,
50755		}
50756	}
50757	if err != nil {
50758		return nil, err
50759	}
50760	defer googleapi.CloseBody(res)
50761	if err := googleapi.CheckResponse(res); err != nil {
50762		return nil, err
50763	}
50764	ret := &UserProfile{
50765		ServerResponse: googleapi.ServerResponse{
50766			Header:         res.Header,
50767			HTTPStatusCode: res.StatusCode,
50768		},
50769	}
50770	target := &ret
50771	if err := gensupport.DecodeResponse(target, res); err != nil {
50772		return nil, err
50773	}
50774	return ret, nil
50775	// {
50776	//   "description": "Gets one user profile by ID.",
50777	//   "flatPath": "userprofiles/{profileId}",
50778	//   "httpMethod": "GET",
50779	//   "id": "dfareporting.userProfiles.get",
50780	//   "parameterOrder": [
50781	//     "profileId"
50782	//   ],
50783	//   "parameters": {
50784	//     "profileId": {
50785	//       "description": "The user profile ID.",
50786	//       "format": "int64",
50787	//       "location": "path",
50788	//       "required": true,
50789	//       "type": "string"
50790	//     }
50791	//   },
50792	//   "path": "userprofiles/{profileId}",
50793	//   "response": {
50794	//     "$ref": "UserProfile"
50795	//   },
50796	//   "scopes": [
50797	//     "https://www.googleapis.com/auth/ddmconversions",
50798	//     "https://www.googleapis.com/auth/dfareporting",
50799	//     "https://www.googleapis.com/auth/dfatrafficking"
50800	//   ]
50801	// }
50802
50803}
50804
50805// method id "dfareporting.userProfiles.list":
50806
50807type UserProfilesListCall struct {
50808	s            *Service
50809	urlParams_   gensupport.URLParams
50810	ifNoneMatch_ string
50811	ctx_         context.Context
50812	header_      http.Header
50813}
50814
50815// List: Retrieves list of user profiles for a user.
50816func (r *UserProfilesService) List() *UserProfilesListCall {
50817	c := &UserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50818	return c
50819}
50820
50821// Fields allows partial responses to be retrieved. See
50822// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50823// for more information.
50824func (c *UserProfilesListCall) Fields(s ...googleapi.Field) *UserProfilesListCall {
50825	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50826	return c
50827}
50828
50829// IfNoneMatch sets the optional parameter which makes the operation
50830// fail if the object's ETag matches the given value. This is useful for
50831// getting updates only after the object has changed since the last
50832// request. Use googleapi.IsNotModified to check whether the response
50833// error from Do is the result of In-None-Match.
50834func (c *UserProfilesListCall) IfNoneMatch(entityTag string) *UserProfilesListCall {
50835	c.ifNoneMatch_ = entityTag
50836	return c
50837}
50838
50839// Context sets the context to be used in this call's Do method. Any
50840// pending HTTP request will be aborted if the provided context is
50841// canceled.
50842func (c *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
50843	c.ctx_ = ctx
50844	return c
50845}
50846
50847// Header returns an http.Header that can be modified by the caller to
50848// add HTTP headers to the request.
50849func (c *UserProfilesListCall) Header() http.Header {
50850	if c.header_ == nil {
50851		c.header_ = make(http.Header)
50852	}
50853	return c.header_
50854}
50855
50856func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
50857	reqHeaders := make(http.Header)
50858	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
50859	for k, v := range c.header_ {
50860		reqHeaders[k] = v
50861	}
50862	reqHeaders.Set("User-Agent", c.s.userAgent())
50863	if c.ifNoneMatch_ != "" {
50864		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50865	}
50866	var body io.Reader = nil
50867	c.urlParams_.Set("alt", alt)
50868	c.urlParams_.Set("prettyPrint", "false")
50869	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles")
50870	urls += "?" + c.urlParams_.Encode()
50871	req, err := http.NewRequest("GET", urls, body)
50872	if err != nil {
50873		return nil, err
50874	}
50875	req.Header = reqHeaders
50876	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50877}
50878
50879// Do executes the "dfareporting.userProfiles.list" call.
50880// Exactly one of *UserProfileList or error will be non-nil. Any non-2xx
50881// status code is an error. Response headers are in either
50882// *UserProfileList.ServerResponse.Header or (if a response was returned
50883// at all) in error.(*googleapi.Error).Header. Use
50884// googleapi.IsNotModified to check whether the returned error was
50885// because http.StatusNotModified was returned.
50886func (c *UserProfilesListCall) Do(opts ...googleapi.CallOption) (*UserProfileList, error) {
50887	gensupport.SetOptions(c.urlParams_, opts...)
50888	res, err := c.doRequest("json")
50889	if res != nil && res.StatusCode == http.StatusNotModified {
50890		if res.Body != nil {
50891			res.Body.Close()
50892		}
50893		return nil, &googleapi.Error{
50894			Code:   res.StatusCode,
50895			Header: res.Header,
50896		}
50897	}
50898	if err != nil {
50899		return nil, err
50900	}
50901	defer googleapi.CloseBody(res)
50902	if err := googleapi.CheckResponse(res); err != nil {
50903		return nil, err
50904	}
50905	ret := &UserProfileList{
50906		ServerResponse: googleapi.ServerResponse{
50907			Header:         res.Header,
50908			HTTPStatusCode: res.StatusCode,
50909		},
50910	}
50911	target := &ret
50912	if err := gensupport.DecodeResponse(target, res); err != nil {
50913		return nil, err
50914	}
50915	return ret, nil
50916	// {
50917	//   "description": "Retrieves list of user profiles for a user.",
50918	//   "flatPath": "userprofiles",
50919	//   "httpMethod": "GET",
50920	//   "id": "dfareporting.userProfiles.list",
50921	//   "parameterOrder": [],
50922	//   "parameters": {},
50923	//   "path": "userprofiles",
50924	//   "response": {
50925	//     "$ref": "UserProfileList"
50926	//   },
50927	//   "scopes": [
50928	//     "https://www.googleapis.com/auth/ddmconversions",
50929	//     "https://www.googleapis.com/auth/dfareporting",
50930	//     "https://www.googleapis.com/auth/dfatrafficking"
50931	//   ]
50932	// }
50933
50934}
50935
50936// method id "dfareporting.userRolePermissionGroups.get":
50937
50938type UserRolePermissionGroupsGetCall struct {
50939	s            *Service
50940	profileId    int64
50941	id           int64
50942	urlParams_   gensupport.URLParams
50943	ifNoneMatch_ string
50944	ctx_         context.Context
50945	header_      http.Header
50946}
50947
50948// Get: Gets one user role permission group by ID.
50949//
50950// - id: User role permission group ID.
50951// - profileId: User profile ID associated with this request.
50952func (r *UserRolePermissionGroupsService) Get(profileId int64, id int64) *UserRolePermissionGroupsGetCall {
50953	c := &UserRolePermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50954	c.profileId = profileId
50955	c.id = id
50956	return c
50957}
50958
50959// Fields allows partial responses to be retrieved. See
50960// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50961// for more information.
50962func (c *UserRolePermissionGroupsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsGetCall {
50963	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50964	return c
50965}
50966
50967// IfNoneMatch sets the optional parameter which makes the operation
50968// fail if the object's ETag matches the given value. This is useful for
50969// getting updates only after the object has changed since the last
50970// request. Use googleapi.IsNotModified to check whether the response
50971// error from Do is the result of In-None-Match.
50972func (c *UserRolePermissionGroupsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsGetCall {
50973	c.ifNoneMatch_ = entityTag
50974	return c
50975}
50976
50977// Context sets the context to be used in this call's Do method. Any
50978// pending HTTP request will be aborted if the provided context is
50979// canceled.
50980func (c *UserRolePermissionGroupsGetCall) Context(ctx context.Context) *UserRolePermissionGroupsGetCall {
50981	c.ctx_ = ctx
50982	return c
50983}
50984
50985// Header returns an http.Header that can be modified by the caller to
50986// add HTTP headers to the request.
50987func (c *UserRolePermissionGroupsGetCall) Header() http.Header {
50988	if c.header_ == nil {
50989		c.header_ = make(http.Header)
50990	}
50991	return c.header_
50992}
50993
50994func (c *UserRolePermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
50995	reqHeaders := make(http.Header)
50996	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
50997	for k, v := range c.header_ {
50998		reqHeaders[k] = v
50999	}
51000	reqHeaders.Set("User-Agent", c.s.userAgent())
51001	if c.ifNoneMatch_ != "" {
51002		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51003	}
51004	var body io.Reader = nil
51005	c.urlParams_.Set("alt", alt)
51006	c.urlParams_.Set("prettyPrint", "false")
51007	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups/{id}")
51008	urls += "?" + c.urlParams_.Encode()
51009	req, err := http.NewRequest("GET", urls, body)
51010	if err != nil {
51011		return nil, err
51012	}
51013	req.Header = reqHeaders
51014	googleapi.Expand(req.URL, map[string]string{
51015		"profileId": strconv.FormatInt(c.profileId, 10),
51016		"id":        strconv.FormatInt(c.id, 10),
51017	})
51018	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51019}
51020
51021// Do executes the "dfareporting.userRolePermissionGroups.get" call.
51022// Exactly one of *UserRolePermissionGroup or error will be non-nil. Any
51023// non-2xx status code is an error. Response headers are in either
51024// *UserRolePermissionGroup.ServerResponse.Header or (if a response was
51025// returned at all) in error.(*googleapi.Error).Header. Use
51026// googleapi.IsNotModified to check whether the returned error was
51027// because http.StatusNotModified was returned.
51028func (c *UserRolePermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroup, error) {
51029	gensupport.SetOptions(c.urlParams_, opts...)
51030	res, err := c.doRequest("json")
51031	if res != nil && res.StatusCode == http.StatusNotModified {
51032		if res.Body != nil {
51033			res.Body.Close()
51034		}
51035		return nil, &googleapi.Error{
51036			Code:   res.StatusCode,
51037			Header: res.Header,
51038		}
51039	}
51040	if err != nil {
51041		return nil, err
51042	}
51043	defer googleapi.CloseBody(res)
51044	if err := googleapi.CheckResponse(res); err != nil {
51045		return nil, err
51046	}
51047	ret := &UserRolePermissionGroup{
51048		ServerResponse: googleapi.ServerResponse{
51049			Header:         res.Header,
51050			HTTPStatusCode: res.StatusCode,
51051		},
51052	}
51053	target := &ret
51054	if err := gensupport.DecodeResponse(target, res); err != nil {
51055		return nil, err
51056	}
51057	return ret, nil
51058	// {
51059	//   "description": "Gets one user role permission group by ID.",
51060	//   "flatPath": "userprofiles/{profileId}/userRolePermissionGroups/{id}",
51061	//   "httpMethod": "GET",
51062	//   "id": "dfareporting.userRolePermissionGroups.get",
51063	//   "parameterOrder": [
51064	//     "profileId",
51065	//     "id"
51066	//   ],
51067	//   "parameters": {
51068	//     "id": {
51069	//       "description": "User role permission group ID.",
51070	//       "format": "int64",
51071	//       "location": "path",
51072	//       "required": true,
51073	//       "type": "string"
51074	//     },
51075	//     "profileId": {
51076	//       "description": "User profile ID associated with this request.",
51077	//       "format": "int64",
51078	//       "location": "path",
51079	//       "required": true,
51080	//       "type": "string"
51081	//     }
51082	//   },
51083	//   "path": "userprofiles/{profileId}/userRolePermissionGroups/{id}",
51084	//   "response": {
51085	//     "$ref": "UserRolePermissionGroup"
51086	//   },
51087	//   "scopes": [
51088	//     "https://www.googleapis.com/auth/dfatrafficking"
51089	//   ]
51090	// }
51091
51092}
51093
51094// method id "dfareporting.userRolePermissionGroups.list":
51095
51096type UserRolePermissionGroupsListCall struct {
51097	s            *Service
51098	profileId    int64
51099	urlParams_   gensupport.URLParams
51100	ifNoneMatch_ string
51101	ctx_         context.Context
51102	header_      http.Header
51103}
51104
51105// List: Gets a list of all supported user role permission groups.
51106//
51107// - profileId: User profile ID associated with this request.
51108func (r *UserRolePermissionGroupsService) List(profileId int64) *UserRolePermissionGroupsListCall {
51109	c := &UserRolePermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51110	c.profileId = profileId
51111	return c
51112}
51113
51114// Fields allows partial responses to be retrieved. See
51115// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51116// for more information.
51117func (c *UserRolePermissionGroupsListCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsListCall {
51118	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51119	return c
51120}
51121
51122// IfNoneMatch sets the optional parameter which makes the operation
51123// fail if the object's ETag matches the given value. This is useful for
51124// getting updates only after the object has changed since the last
51125// request. Use googleapi.IsNotModified to check whether the response
51126// error from Do is the result of In-None-Match.
51127func (c *UserRolePermissionGroupsListCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsListCall {
51128	c.ifNoneMatch_ = entityTag
51129	return c
51130}
51131
51132// Context sets the context to be used in this call's Do method. Any
51133// pending HTTP request will be aborted if the provided context is
51134// canceled.
51135func (c *UserRolePermissionGroupsListCall) Context(ctx context.Context) *UserRolePermissionGroupsListCall {
51136	c.ctx_ = ctx
51137	return c
51138}
51139
51140// Header returns an http.Header that can be modified by the caller to
51141// add HTTP headers to the request.
51142func (c *UserRolePermissionGroupsListCall) Header() http.Header {
51143	if c.header_ == nil {
51144		c.header_ = make(http.Header)
51145	}
51146	return c.header_
51147}
51148
51149func (c *UserRolePermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
51150	reqHeaders := make(http.Header)
51151	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
51152	for k, v := range c.header_ {
51153		reqHeaders[k] = v
51154	}
51155	reqHeaders.Set("User-Agent", c.s.userAgent())
51156	if c.ifNoneMatch_ != "" {
51157		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51158	}
51159	var body io.Reader = nil
51160	c.urlParams_.Set("alt", alt)
51161	c.urlParams_.Set("prettyPrint", "false")
51162	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups")
51163	urls += "?" + c.urlParams_.Encode()
51164	req, err := http.NewRequest("GET", urls, body)
51165	if err != nil {
51166		return nil, err
51167	}
51168	req.Header = reqHeaders
51169	googleapi.Expand(req.URL, map[string]string{
51170		"profileId": strconv.FormatInt(c.profileId, 10),
51171	})
51172	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51173}
51174
51175// Do executes the "dfareporting.userRolePermissionGroups.list" call.
51176// Exactly one of *UserRolePermissionGroupsListResponse or error will be
51177// non-nil. Any non-2xx status code is an error. Response headers are in
51178// either *UserRolePermissionGroupsListResponse.ServerResponse.Header or
51179// (if a response was returned at all) in
51180// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
51181// whether the returned error was because http.StatusNotModified was
51182// returned.
51183func (c *UserRolePermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroupsListResponse, error) {
51184	gensupport.SetOptions(c.urlParams_, opts...)
51185	res, err := c.doRequest("json")
51186	if res != nil && res.StatusCode == http.StatusNotModified {
51187		if res.Body != nil {
51188			res.Body.Close()
51189		}
51190		return nil, &googleapi.Error{
51191			Code:   res.StatusCode,
51192			Header: res.Header,
51193		}
51194	}
51195	if err != nil {
51196		return nil, err
51197	}
51198	defer googleapi.CloseBody(res)
51199	if err := googleapi.CheckResponse(res); err != nil {
51200		return nil, err
51201	}
51202	ret := &UserRolePermissionGroupsListResponse{
51203		ServerResponse: googleapi.ServerResponse{
51204			Header:         res.Header,
51205			HTTPStatusCode: res.StatusCode,
51206		},
51207	}
51208	target := &ret
51209	if err := gensupport.DecodeResponse(target, res); err != nil {
51210		return nil, err
51211	}
51212	return ret, nil
51213	// {
51214	//   "description": "Gets a list of all supported user role permission groups.",
51215	//   "flatPath": "userprofiles/{profileId}/userRolePermissionGroups",
51216	//   "httpMethod": "GET",
51217	//   "id": "dfareporting.userRolePermissionGroups.list",
51218	//   "parameterOrder": [
51219	//     "profileId"
51220	//   ],
51221	//   "parameters": {
51222	//     "profileId": {
51223	//       "description": "User profile ID associated with this request.",
51224	//       "format": "int64",
51225	//       "location": "path",
51226	//       "required": true,
51227	//       "type": "string"
51228	//     }
51229	//   },
51230	//   "path": "userprofiles/{profileId}/userRolePermissionGroups",
51231	//   "response": {
51232	//     "$ref": "UserRolePermissionGroupsListResponse"
51233	//   },
51234	//   "scopes": [
51235	//     "https://www.googleapis.com/auth/dfatrafficking"
51236	//   ]
51237	// }
51238
51239}
51240
51241// method id "dfareporting.userRolePermissions.get":
51242
51243type UserRolePermissionsGetCall struct {
51244	s            *Service
51245	profileId    int64
51246	id           int64
51247	urlParams_   gensupport.URLParams
51248	ifNoneMatch_ string
51249	ctx_         context.Context
51250	header_      http.Header
51251}
51252
51253// Get: Gets one user role permission by ID.
51254//
51255// - id: User role permission ID.
51256// - profileId: User profile ID associated with this request.
51257func (r *UserRolePermissionsService) Get(profileId int64, id int64) *UserRolePermissionsGetCall {
51258	c := &UserRolePermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51259	c.profileId = profileId
51260	c.id = id
51261	return c
51262}
51263
51264// Fields allows partial responses to be retrieved. See
51265// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51266// for more information.
51267func (c *UserRolePermissionsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionsGetCall {
51268	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51269	return c
51270}
51271
51272// IfNoneMatch sets the optional parameter which makes the operation
51273// fail if the object's ETag matches the given value. This is useful for
51274// getting updates only after the object has changed since the last
51275// request. Use googleapi.IsNotModified to check whether the response
51276// error from Do is the result of In-None-Match.
51277func (c *UserRolePermissionsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionsGetCall {
51278	c.ifNoneMatch_ = entityTag
51279	return c
51280}
51281
51282// Context sets the context to be used in this call's Do method. Any
51283// pending HTTP request will be aborted if the provided context is
51284// canceled.
51285func (c *UserRolePermissionsGetCall) Context(ctx context.Context) *UserRolePermissionsGetCall {
51286	c.ctx_ = ctx
51287	return c
51288}
51289
51290// Header returns an http.Header that can be modified by the caller to
51291// add HTTP headers to the request.
51292func (c *UserRolePermissionsGetCall) Header() http.Header {
51293	if c.header_ == nil {
51294		c.header_ = make(http.Header)
51295	}
51296	return c.header_
51297}
51298
51299func (c *UserRolePermissionsGetCall) doRequest(alt string) (*http.Response, error) {
51300	reqHeaders := make(http.Header)
51301	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
51302	for k, v := range c.header_ {
51303		reqHeaders[k] = v
51304	}
51305	reqHeaders.Set("User-Agent", c.s.userAgent())
51306	if c.ifNoneMatch_ != "" {
51307		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51308	}
51309	var body io.Reader = nil
51310	c.urlParams_.Set("alt", alt)
51311	c.urlParams_.Set("prettyPrint", "false")
51312	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions/{id}")
51313	urls += "?" + c.urlParams_.Encode()
51314	req, err := http.NewRequest("GET", urls, body)
51315	if err != nil {
51316		return nil, err
51317	}
51318	req.Header = reqHeaders
51319	googleapi.Expand(req.URL, map[string]string{
51320		"profileId": strconv.FormatInt(c.profileId, 10),
51321		"id":        strconv.FormatInt(c.id, 10),
51322	})
51323	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51324}
51325
51326// Do executes the "dfareporting.userRolePermissions.get" call.
51327// Exactly one of *UserRolePermission or error will be non-nil. Any
51328// non-2xx status code is an error. Response headers are in either
51329// *UserRolePermission.ServerResponse.Header or (if a response was
51330// returned at all) in error.(*googleapi.Error).Header. Use
51331// googleapi.IsNotModified to check whether the returned error was
51332// because http.StatusNotModified was returned.
51333func (c *UserRolePermissionsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermission, error) {
51334	gensupport.SetOptions(c.urlParams_, opts...)
51335	res, err := c.doRequest("json")
51336	if res != nil && res.StatusCode == http.StatusNotModified {
51337		if res.Body != nil {
51338			res.Body.Close()
51339		}
51340		return nil, &googleapi.Error{
51341			Code:   res.StatusCode,
51342			Header: res.Header,
51343		}
51344	}
51345	if err != nil {
51346		return nil, err
51347	}
51348	defer googleapi.CloseBody(res)
51349	if err := googleapi.CheckResponse(res); err != nil {
51350		return nil, err
51351	}
51352	ret := &UserRolePermission{
51353		ServerResponse: googleapi.ServerResponse{
51354			Header:         res.Header,
51355			HTTPStatusCode: res.StatusCode,
51356		},
51357	}
51358	target := &ret
51359	if err := gensupport.DecodeResponse(target, res); err != nil {
51360		return nil, err
51361	}
51362	return ret, nil
51363	// {
51364	//   "description": "Gets one user role permission by ID.",
51365	//   "flatPath": "userprofiles/{profileId}/userRolePermissions/{id}",
51366	//   "httpMethod": "GET",
51367	//   "id": "dfareporting.userRolePermissions.get",
51368	//   "parameterOrder": [
51369	//     "profileId",
51370	//     "id"
51371	//   ],
51372	//   "parameters": {
51373	//     "id": {
51374	//       "description": "User role permission ID.",
51375	//       "format": "int64",
51376	//       "location": "path",
51377	//       "required": true,
51378	//       "type": "string"
51379	//     },
51380	//     "profileId": {
51381	//       "description": "User profile ID associated with this request.",
51382	//       "format": "int64",
51383	//       "location": "path",
51384	//       "required": true,
51385	//       "type": "string"
51386	//     }
51387	//   },
51388	//   "path": "userprofiles/{profileId}/userRolePermissions/{id}",
51389	//   "response": {
51390	//     "$ref": "UserRolePermission"
51391	//   },
51392	//   "scopes": [
51393	//     "https://www.googleapis.com/auth/dfatrafficking"
51394	//   ]
51395	// }
51396
51397}
51398
51399// method id "dfareporting.userRolePermissions.list":
51400
51401type UserRolePermissionsListCall struct {
51402	s            *Service
51403	profileId    int64
51404	urlParams_   gensupport.URLParams
51405	ifNoneMatch_ string
51406	ctx_         context.Context
51407	header_      http.Header
51408}
51409
51410// List: Gets a list of user role permissions, possibly filtered.
51411//
51412// - profileId: User profile ID associated with this request.
51413func (r *UserRolePermissionsService) List(profileId int64) *UserRolePermissionsListCall {
51414	c := &UserRolePermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51415	c.profileId = profileId
51416	return c
51417}
51418
51419// Ids sets the optional parameter "ids": Select only user role
51420// permissions with these IDs.
51421func (c *UserRolePermissionsListCall) Ids(ids ...int64) *UserRolePermissionsListCall {
51422	var ids_ []string
51423	for _, v := range ids {
51424		ids_ = append(ids_, fmt.Sprint(v))
51425	}
51426	c.urlParams_.SetMulti("ids", ids_)
51427	return c
51428}
51429
51430// Fields allows partial responses to be retrieved. See
51431// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51432// for more information.
51433func (c *UserRolePermissionsListCall) Fields(s ...googleapi.Field) *UserRolePermissionsListCall {
51434	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51435	return c
51436}
51437
51438// IfNoneMatch sets the optional parameter which makes the operation
51439// fail if the object's ETag matches the given value. This is useful for
51440// getting updates only after the object has changed since the last
51441// request. Use googleapi.IsNotModified to check whether the response
51442// error from Do is the result of In-None-Match.
51443func (c *UserRolePermissionsListCall) IfNoneMatch(entityTag string) *UserRolePermissionsListCall {
51444	c.ifNoneMatch_ = entityTag
51445	return c
51446}
51447
51448// Context sets the context to be used in this call's Do method. Any
51449// pending HTTP request will be aborted if the provided context is
51450// canceled.
51451func (c *UserRolePermissionsListCall) Context(ctx context.Context) *UserRolePermissionsListCall {
51452	c.ctx_ = ctx
51453	return c
51454}
51455
51456// Header returns an http.Header that can be modified by the caller to
51457// add HTTP headers to the request.
51458func (c *UserRolePermissionsListCall) Header() http.Header {
51459	if c.header_ == nil {
51460		c.header_ = make(http.Header)
51461	}
51462	return c.header_
51463}
51464
51465func (c *UserRolePermissionsListCall) doRequest(alt string) (*http.Response, error) {
51466	reqHeaders := make(http.Header)
51467	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
51468	for k, v := range c.header_ {
51469		reqHeaders[k] = v
51470	}
51471	reqHeaders.Set("User-Agent", c.s.userAgent())
51472	if c.ifNoneMatch_ != "" {
51473		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51474	}
51475	var body io.Reader = nil
51476	c.urlParams_.Set("alt", alt)
51477	c.urlParams_.Set("prettyPrint", "false")
51478	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions")
51479	urls += "?" + c.urlParams_.Encode()
51480	req, err := http.NewRequest("GET", urls, body)
51481	if err != nil {
51482		return nil, err
51483	}
51484	req.Header = reqHeaders
51485	googleapi.Expand(req.URL, map[string]string{
51486		"profileId": strconv.FormatInt(c.profileId, 10),
51487	})
51488	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51489}
51490
51491// Do executes the "dfareporting.userRolePermissions.list" call.
51492// Exactly one of *UserRolePermissionsListResponse or error will be
51493// non-nil. Any non-2xx status code is an error. Response headers are in
51494// either *UserRolePermissionsListResponse.ServerResponse.Header or (if
51495// a response was returned at all) in error.(*googleapi.Error).Header.
51496// Use googleapi.IsNotModified to check whether the returned error was
51497// because http.StatusNotModified was returned.
51498func (c *UserRolePermissionsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionsListResponse, error) {
51499	gensupport.SetOptions(c.urlParams_, opts...)
51500	res, err := c.doRequest("json")
51501	if res != nil && res.StatusCode == http.StatusNotModified {
51502		if res.Body != nil {
51503			res.Body.Close()
51504		}
51505		return nil, &googleapi.Error{
51506			Code:   res.StatusCode,
51507			Header: res.Header,
51508		}
51509	}
51510	if err != nil {
51511		return nil, err
51512	}
51513	defer googleapi.CloseBody(res)
51514	if err := googleapi.CheckResponse(res); err != nil {
51515		return nil, err
51516	}
51517	ret := &UserRolePermissionsListResponse{
51518		ServerResponse: googleapi.ServerResponse{
51519			Header:         res.Header,
51520			HTTPStatusCode: res.StatusCode,
51521		},
51522	}
51523	target := &ret
51524	if err := gensupport.DecodeResponse(target, res); err != nil {
51525		return nil, err
51526	}
51527	return ret, nil
51528	// {
51529	//   "description": "Gets a list of user role permissions, possibly filtered.",
51530	//   "flatPath": "userprofiles/{profileId}/userRolePermissions",
51531	//   "httpMethod": "GET",
51532	//   "id": "dfareporting.userRolePermissions.list",
51533	//   "parameterOrder": [
51534	//     "profileId"
51535	//   ],
51536	//   "parameters": {
51537	//     "ids": {
51538	//       "description": "Select only user role permissions with these IDs.",
51539	//       "format": "int64",
51540	//       "location": "query",
51541	//       "repeated": true,
51542	//       "type": "string"
51543	//     },
51544	//     "profileId": {
51545	//       "description": "User profile ID associated with this request.",
51546	//       "format": "int64",
51547	//       "location": "path",
51548	//       "required": true,
51549	//       "type": "string"
51550	//     }
51551	//   },
51552	//   "path": "userprofiles/{profileId}/userRolePermissions",
51553	//   "response": {
51554	//     "$ref": "UserRolePermissionsListResponse"
51555	//   },
51556	//   "scopes": [
51557	//     "https://www.googleapis.com/auth/dfatrafficking"
51558	//   ]
51559	// }
51560
51561}
51562
51563// method id "dfareporting.userRoles.delete":
51564
51565type UserRolesDeleteCall struct {
51566	s          *Service
51567	profileId  int64
51568	id         int64
51569	urlParams_ gensupport.URLParams
51570	ctx_       context.Context
51571	header_    http.Header
51572}
51573
51574// Delete: Deletes an existing user role.
51575//
51576// - id: User role ID.
51577// - profileId: User profile ID associated with this request.
51578func (r *UserRolesService) Delete(profileId int64, id int64) *UserRolesDeleteCall {
51579	c := &UserRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51580	c.profileId = profileId
51581	c.id = id
51582	return c
51583}
51584
51585// Fields allows partial responses to be retrieved. See
51586// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51587// for more information.
51588func (c *UserRolesDeleteCall) Fields(s ...googleapi.Field) *UserRolesDeleteCall {
51589	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51590	return c
51591}
51592
51593// Context sets the context to be used in this call's Do method. Any
51594// pending HTTP request will be aborted if the provided context is
51595// canceled.
51596func (c *UserRolesDeleteCall) Context(ctx context.Context) *UserRolesDeleteCall {
51597	c.ctx_ = ctx
51598	return c
51599}
51600
51601// Header returns an http.Header that can be modified by the caller to
51602// add HTTP headers to the request.
51603func (c *UserRolesDeleteCall) Header() http.Header {
51604	if c.header_ == nil {
51605		c.header_ = make(http.Header)
51606	}
51607	return c.header_
51608}
51609
51610func (c *UserRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
51611	reqHeaders := make(http.Header)
51612	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
51613	for k, v := range c.header_ {
51614		reqHeaders[k] = v
51615	}
51616	reqHeaders.Set("User-Agent", c.s.userAgent())
51617	var body io.Reader = nil
51618	c.urlParams_.Set("alt", alt)
51619	c.urlParams_.Set("prettyPrint", "false")
51620	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
51621	urls += "?" + c.urlParams_.Encode()
51622	req, err := http.NewRequest("DELETE", urls, body)
51623	if err != nil {
51624		return nil, err
51625	}
51626	req.Header = reqHeaders
51627	googleapi.Expand(req.URL, map[string]string{
51628		"profileId": strconv.FormatInt(c.profileId, 10),
51629		"id":        strconv.FormatInt(c.id, 10),
51630	})
51631	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51632}
51633
51634// Do executes the "dfareporting.userRoles.delete" call.
51635func (c *UserRolesDeleteCall) Do(opts ...googleapi.CallOption) error {
51636	gensupport.SetOptions(c.urlParams_, opts...)
51637	res, err := c.doRequest("json")
51638	if err != nil {
51639		return err
51640	}
51641	defer googleapi.CloseBody(res)
51642	if err := googleapi.CheckResponse(res); err != nil {
51643		return err
51644	}
51645	return nil
51646	// {
51647	//   "description": "Deletes an existing user role.",
51648	//   "flatPath": "userprofiles/{profileId}/userRoles/{id}",
51649	//   "httpMethod": "DELETE",
51650	//   "id": "dfareporting.userRoles.delete",
51651	//   "parameterOrder": [
51652	//     "profileId",
51653	//     "id"
51654	//   ],
51655	//   "parameters": {
51656	//     "id": {
51657	//       "description": "User role ID.",
51658	//       "format": "int64",
51659	//       "location": "path",
51660	//       "required": true,
51661	//       "type": "string"
51662	//     },
51663	//     "profileId": {
51664	//       "description": "User profile ID associated with this request.",
51665	//       "format": "int64",
51666	//       "location": "path",
51667	//       "required": true,
51668	//       "type": "string"
51669	//     }
51670	//   },
51671	//   "path": "userprofiles/{profileId}/userRoles/{id}",
51672	//   "scopes": [
51673	//     "https://www.googleapis.com/auth/dfatrafficking"
51674	//   ]
51675	// }
51676
51677}
51678
51679// method id "dfareporting.userRoles.get":
51680
51681type UserRolesGetCall struct {
51682	s            *Service
51683	profileId    int64
51684	id           int64
51685	urlParams_   gensupport.URLParams
51686	ifNoneMatch_ string
51687	ctx_         context.Context
51688	header_      http.Header
51689}
51690
51691// Get: Gets one user role by ID.
51692//
51693// - id: User role ID.
51694// - profileId: User profile ID associated with this request.
51695func (r *UserRolesService) Get(profileId int64, id int64) *UserRolesGetCall {
51696	c := &UserRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51697	c.profileId = profileId
51698	c.id = id
51699	return c
51700}
51701
51702// Fields allows partial responses to be retrieved. See
51703// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51704// for more information.
51705func (c *UserRolesGetCall) Fields(s ...googleapi.Field) *UserRolesGetCall {
51706	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51707	return c
51708}
51709
51710// IfNoneMatch sets the optional parameter which makes the operation
51711// fail if the object's ETag matches the given value. This is useful for
51712// getting updates only after the object has changed since the last
51713// request. Use googleapi.IsNotModified to check whether the response
51714// error from Do is the result of In-None-Match.
51715func (c *UserRolesGetCall) IfNoneMatch(entityTag string) *UserRolesGetCall {
51716	c.ifNoneMatch_ = entityTag
51717	return c
51718}
51719
51720// Context sets the context to be used in this call's Do method. Any
51721// pending HTTP request will be aborted if the provided context is
51722// canceled.
51723func (c *UserRolesGetCall) Context(ctx context.Context) *UserRolesGetCall {
51724	c.ctx_ = ctx
51725	return c
51726}
51727
51728// Header returns an http.Header that can be modified by the caller to
51729// add HTTP headers to the request.
51730func (c *UserRolesGetCall) Header() http.Header {
51731	if c.header_ == nil {
51732		c.header_ = make(http.Header)
51733	}
51734	return c.header_
51735}
51736
51737func (c *UserRolesGetCall) doRequest(alt string) (*http.Response, error) {
51738	reqHeaders := make(http.Header)
51739	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
51740	for k, v := range c.header_ {
51741		reqHeaders[k] = v
51742	}
51743	reqHeaders.Set("User-Agent", c.s.userAgent())
51744	if c.ifNoneMatch_ != "" {
51745		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51746	}
51747	var body io.Reader = nil
51748	c.urlParams_.Set("alt", alt)
51749	c.urlParams_.Set("prettyPrint", "false")
51750	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
51751	urls += "?" + c.urlParams_.Encode()
51752	req, err := http.NewRequest("GET", urls, body)
51753	if err != nil {
51754		return nil, err
51755	}
51756	req.Header = reqHeaders
51757	googleapi.Expand(req.URL, map[string]string{
51758		"profileId": strconv.FormatInt(c.profileId, 10),
51759		"id":        strconv.FormatInt(c.id, 10),
51760	})
51761	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51762}
51763
51764// Do executes the "dfareporting.userRoles.get" call.
51765// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
51766// code is an error. Response headers are in either
51767// *UserRole.ServerResponse.Header or (if a response was returned at
51768// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
51769// to check whether the returned error was because
51770// http.StatusNotModified was returned.
51771func (c *UserRolesGetCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
51772	gensupport.SetOptions(c.urlParams_, opts...)
51773	res, err := c.doRequest("json")
51774	if res != nil && res.StatusCode == http.StatusNotModified {
51775		if res.Body != nil {
51776			res.Body.Close()
51777		}
51778		return nil, &googleapi.Error{
51779			Code:   res.StatusCode,
51780			Header: res.Header,
51781		}
51782	}
51783	if err != nil {
51784		return nil, err
51785	}
51786	defer googleapi.CloseBody(res)
51787	if err := googleapi.CheckResponse(res); err != nil {
51788		return nil, err
51789	}
51790	ret := &UserRole{
51791		ServerResponse: googleapi.ServerResponse{
51792			Header:         res.Header,
51793			HTTPStatusCode: res.StatusCode,
51794		},
51795	}
51796	target := &ret
51797	if err := gensupport.DecodeResponse(target, res); err != nil {
51798		return nil, err
51799	}
51800	return ret, nil
51801	// {
51802	//   "description": "Gets one user role by ID.",
51803	//   "flatPath": "userprofiles/{profileId}/userRoles/{id}",
51804	//   "httpMethod": "GET",
51805	//   "id": "dfareporting.userRoles.get",
51806	//   "parameterOrder": [
51807	//     "profileId",
51808	//     "id"
51809	//   ],
51810	//   "parameters": {
51811	//     "id": {
51812	//       "description": "User role ID.",
51813	//       "format": "int64",
51814	//       "location": "path",
51815	//       "required": true,
51816	//       "type": "string"
51817	//     },
51818	//     "profileId": {
51819	//       "description": "User profile ID associated with this request.",
51820	//       "format": "int64",
51821	//       "location": "path",
51822	//       "required": true,
51823	//       "type": "string"
51824	//     }
51825	//   },
51826	//   "path": "userprofiles/{profileId}/userRoles/{id}",
51827	//   "response": {
51828	//     "$ref": "UserRole"
51829	//   },
51830	//   "scopes": [
51831	//     "https://www.googleapis.com/auth/dfatrafficking"
51832	//   ]
51833	// }
51834
51835}
51836
51837// method id "dfareporting.userRoles.insert":
51838
51839type UserRolesInsertCall struct {
51840	s          *Service
51841	profileId  int64
51842	userrole   *UserRole
51843	urlParams_ gensupport.URLParams
51844	ctx_       context.Context
51845	header_    http.Header
51846}
51847
51848// Insert: Inserts a new user role.
51849//
51850// - profileId: User profile ID associated with this request.
51851func (r *UserRolesService) Insert(profileId int64, userrole *UserRole) *UserRolesInsertCall {
51852	c := &UserRolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51853	c.profileId = profileId
51854	c.userrole = userrole
51855	return c
51856}
51857
51858// Fields allows partial responses to be retrieved. See
51859// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51860// for more information.
51861func (c *UserRolesInsertCall) Fields(s ...googleapi.Field) *UserRolesInsertCall {
51862	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51863	return c
51864}
51865
51866// Context sets the context to be used in this call's Do method. Any
51867// pending HTTP request will be aborted if the provided context is
51868// canceled.
51869func (c *UserRolesInsertCall) Context(ctx context.Context) *UserRolesInsertCall {
51870	c.ctx_ = ctx
51871	return c
51872}
51873
51874// Header returns an http.Header that can be modified by the caller to
51875// add HTTP headers to the request.
51876func (c *UserRolesInsertCall) Header() http.Header {
51877	if c.header_ == nil {
51878		c.header_ = make(http.Header)
51879	}
51880	return c.header_
51881}
51882
51883func (c *UserRolesInsertCall) doRequest(alt string) (*http.Response, error) {
51884	reqHeaders := make(http.Header)
51885	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
51886	for k, v := range c.header_ {
51887		reqHeaders[k] = v
51888	}
51889	reqHeaders.Set("User-Agent", c.s.userAgent())
51890	var body io.Reader = nil
51891	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
51892	if err != nil {
51893		return nil, err
51894	}
51895	reqHeaders.Set("Content-Type", "application/json")
51896	c.urlParams_.Set("alt", alt)
51897	c.urlParams_.Set("prettyPrint", "false")
51898	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
51899	urls += "?" + c.urlParams_.Encode()
51900	req, err := http.NewRequest("POST", urls, body)
51901	if err != nil {
51902		return nil, err
51903	}
51904	req.Header = reqHeaders
51905	googleapi.Expand(req.URL, map[string]string{
51906		"profileId": strconv.FormatInt(c.profileId, 10),
51907	})
51908	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51909}
51910
51911// Do executes the "dfareporting.userRoles.insert" call.
51912// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
51913// code is an error. Response headers are in either
51914// *UserRole.ServerResponse.Header or (if a response was returned at
51915// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
51916// to check whether the returned error was because
51917// http.StatusNotModified was returned.
51918func (c *UserRolesInsertCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
51919	gensupport.SetOptions(c.urlParams_, opts...)
51920	res, err := c.doRequest("json")
51921	if res != nil && res.StatusCode == http.StatusNotModified {
51922		if res.Body != nil {
51923			res.Body.Close()
51924		}
51925		return nil, &googleapi.Error{
51926			Code:   res.StatusCode,
51927			Header: res.Header,
51928		}
51929	}
51930	if err != nil {
51931		return nil, err
51932	}
51933	defer googleapi.CloseBody(res)
51934	if err := googleapi.CheckResponse(res); err != nil {
51935		return nil, err
51936	}
51937	ret := &UserRole{
51938		ServerResponse: googleapi.ServerResponse{
51939			Header:         res.Header,
51940			HTTPStatusCode: res.StatusCode,
51941		},
51942	}
51943	target := &ret
51944	if err := gensupport.DecodeResponse(target, res); err != nil {
51945		return nil, err
51946	}
51947	return ret, nil
51948	// {
51949	//   "description": "Inserts a new user role.",
51950	//   "flatPath": "userprofiles/{profileId}/userRoles",
51951	//   "httpMethod": "POST",
51952	//   "id": "dfareporting.userRoles.insert",
51953	//   "parameterOrder": [
51954	//     "profileId"
51955	//   ],
51956	//   "parameters": {
51957	//     "profileId": {
51958	//       "description": "User profile ID associated with this request.",
51959	//       "format": "int64",
51960	//       "location": "path",
51961	//       "required": true,
51962	//       "type": "string"
51963	//     }
51964	//   },
51965	//   "path": "userprofiles/{profileId}/userRoles",
51966	//   "request": {
51967	//     "$ref": "UserRole"
51968	//   },
51969	//   "response": {
51970	//     "$ref": "UserRole"
51971	//   },
51972	//   "scopes": [
51973	//     "https://www.googleapis.com/auth/dfatrafficking"
51974	//   ]
51975	// }
51976
51977}
51978
51979// method id "dfareporting.userRoles.list":
51980
51981type UserRolesListCall struct {
51982	s            *Service
51983	profileId    int64
51984	urlParams_   gensupport.URLParams
51985	ifNoneMatch_ string
51986	ctx_         context.Context
51987	header_      http.Header
51988}
51989
51990// List: Retrieves a list of user roles, possibly filtered. This method
51991// supports paging.
51992//
51993// - profileId: User profile ID associated with this request.
51994func (r *UserRolesService) List(profileId int64) *UserRolesListCall {
51995	c := &UserRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51996	c.profileId = profileId
51997	return c
51998}
51999
52000// AccountUserRoleOnly sets the optional parameter
52001// "accountUserRoleOnly": Select only account level user roles not
52002// associated with any specific subaccount.
52003func (c *UserRolesListCall) AccountUserRoleOnly(accountUserRoleOnly bool) *UserRolesListCall {
52004	c.urlParams_.Set("accountUserRoleOnly", fmt.Sprint(accountUserRoleOnly))
52005	return c
52006}
52007
52008// Ids sets the optional parameter "ids": Select only user roles with
52009// the specified IDs.
52010func (c *UserRolesListCall) Ids(ids ...int64) *UserRolesListCall {
52011	var ids_ []string
52012	for _, v := range ids {
52013		ids_ = append(ids_, fmt.Sprint(v))
52014	}
52015	c.urlParams_.SetMulti("ids", ids_)
52016	return c
52017}
52018
52019// MaxResults sets the optional parameter "maxResults": Maximum number
52020// of results to return.
52021func (c *UserRolesListCall) MaxResults(maxResults int64) *UserRolesListCall {
52022	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
52023	return c
52024}
52025
52026// PageToken sets the optional parameter "pageToken": Value of the
52027// nextPageToken from the previous result page.
52028func (c *UserRolesListCall) PageToken(pageToken string) *UserRolesListCall {
52029	c.urlParams_.Set("pageToken", pageToken)
52030	return c
52031}
52032
52033// SearchString sets the optional parameter "searchString": Allows
52034// searching for objects by name or ID. Wildcards (*) are allowed. For
52035// example, "userrole*2015" will return objects with names like
52036// "userrole June 2015", "userrole April 2015", or simply "userrole
52037// 2015". Most of the searches also add wildcards implicitly at the
52038// start and the end of the search string. For example, a search string
52039// of "userrole" will match objects with name "my userrole", "userrole
52040// 2015", or simply "userrole".
52041func (c *UserRolesListCall) SearchString(searchString string) *UserRolesListCall {
52042	c.urlParams_.Set("searchString", searchString)
52043	return c
52044}
52045
52046// SortField sets the optional parameter "sortField": Field by which to
52047// sort the list.
52048//
52049// Possible values:
52050//   "ID" (default)
52051//   "NAME"
52052func (c *UserRolesListCall) SortField(sortField string) *UserRolesListCall {
52053	c.urlParams_.Set("sortField", sortField)
52054	return c
52055}
52056
52057// SortOrder sets the optional parameter "sortOrder": Order of sorted
52058// results.
52059//
52060// Possible values:
52061//   "ASCENDING" (default)
52062//   "DESCENDING"
52063func (c *UserRolesListCall) SortOrder(sortOrder string) *UserRolesListCall {
52064	c.urlParams_.Set("sortOrder", sortOrder)
52065	return c
52066}
52067
52068// SubaccountId sets the optional parameter "subaccountId": Select only
52069// user roles that belong to this subaccount.
52070func (c *UserRolesListCall) SubaccountId(subaccountId int64) *UserRolesListCall {
52071	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
52072	return c
52073}
52074
52075// Fields allows partial responses to be retrieved. See
52076// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
52077// for more information.
52078func (c *UserRolesListCall) Fields(s ...googleapi.Field) *UserRolesListCall {
52079	c.urlParams_.Set("fields", googleapi.CombineFields(s))
52080	return c
52081}
52082
52083// IfNoneMatch sets the optional parameter which makes the operation
52084// fail if the object's ETag matches the given value. This is useful for
52085// getting updates only after the object has changed since the last
52086// request. Use googleapi.IsNotModified to check whether the response
52087// error from Do is the result of In-None-Match.
52088func (c *UserRolesListCall) IfNoneMatch(entityTag string) *UserRolesListCall {
52089	c.ifNoneMatch_ = entityTag
52090	return c
52091}
52092
52093// Context sets the context to be used in this call's Do method. Any
52094// pending HTTP request will be aborted if the provided context is
52095// canceled.
52096func (c *UserRolesListCall) Context(ctx context.Context) *UserRolesListCall {
52097	c.ctx_ = ctx
52098	return c
52099}
52100
52101// Header returns an http.Header that can be modified by the caller to
52102// add HTTP headers to the request.
52103func (c *UserRolesListCall) Header() http.Header {
52104	if c.header_ == nil {
52105		c.header_ = make(http.Header)
52106	}
52107	return c.header_
52108}
52109
52110func (c *UserRolesListCall) doRequest(alt string) (*http.Response, error) {
52111	reqHeaders := make(http.Header)
52112	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
52113	for k, v := range c.header_ {
52114		reqHeaders[k] = v
52115	}
52116	reqHeaders.Set("User-Agent", c.s.userAgent())
52117	if c.ifNoneMatch_ != "" {
52118		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
52119	}
52120	var body io.Reader = nil
52121	c.urlParams_.Set("alt", alt)
52122	c.urlParams_.Set("prettyPrint", "false")
52123	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
52124	urls += "?" + c.urlParams_.Encode()
52125	req, err := http.NewRequest("GET", urls, body)
52126	if err != nil {
52127		return nil, err
52128	}
52129	req.Header = reqHeaders
52130	googleapi.Expand(req.URL, map[string]string{
52131		"profileId": strconv.FormatInt(c.profileId, 10),
52132	})
52133	return gensupport.SendRequest(c.ctx_, c.s.client, req)
52134}
52135
52136// Do executes the "dfareporting.userRoles.list" call.
52137// Exactly one of *UserRolesListResponse or error will be non-nil. Any
52138// non-2xx status code is an error. Response headers are in either
52139// *UserRolesListResponse.ServerResponse.Header or (if a response was
52140// returned at all) in error.(*googleapi.Error).Header. Use
52141// googleapi.IsNotModified to check whether the returned error was
52142// because http.StatusNotModified was returned.
52143func (c *UserRolesListCall) Do(opts ...googleapi.CallOption) (*UserRolesListResponse, error) {
52144	gensupport.SetOptions(c.urlParams_, opts...)
52145	res, err := c.doRequest("json")
52146	if res != nil && res.StatusCode == http.StatusNotModified {
52147		if res.Body != nil {
52148			res.Body.Close()
52149		}
52150		return nil, &googleapi.Error{
52151			Code:   res.StatusCode,
52152			Header: res.Header,
52153		}
52154	}
52155	if err != nil {
52156		return nil, err
52157	}
52158	defer googleapi.CloseBody(res)
52159	if err := googleapi.CheckResponse(res); err != nil {
52160		return nil, err
52161	}
52162	ret := &UserRolesListResponse{
52163		ServerResponse: googleapi.ServerResponse{
52164			Header:         res.Header,
52165			HTTPStatusCode: res.StatusCode,
52166		},
52167	}
52168	target := &ret
52169	if err := gensupport.DecodeResponse(target, res); err != nil {
52170		return nil, err
52171	}
52172	return ret, nil
52173	// {
52174	//   "description": "Retrieves a list of user roles, possibly filtered. This method supports paging.",
52175	//   "flatPath": "userprofiles/{profileId}/userRoles",
52176	//   "httpMethod": "GET",
52177	//   "id": "dfareporting.userRoles.list",
52178	//   "parameterOrder": [
52179	//     "profileId"
52180	//   ],
52181	//   "parameters": {
52182	//     "accountUserRoleOnly": {
52183	//       "description": "Select only account level user roles not associated with any specific subaccount.",
52184	//       "location": "query",
52185	//       "type": "boolean"
52186	//     },
52187	//     "ids": {
52188	//       "description": "Select only user roles with the specified IDs.",
52189	//       "format": "int64",
52190	//       "location": "query",
52191	//       "repeated": true,
52192	//       "type": "string"
52193	//     },
52194	//     "maxResults": {
52195	//       "default": "1000",
52196	//       "description": "Maximum number of results to return.",
52197	//       "format": "int32",
52198	//       "location": "query",
52199	//       "maximum": "1000",
52200	//       "minimum": "0",
52201	//       "type": "integer"
52202	//     },
52203	//     "pageToken": {
52204	//       "description": "Value of the nextPageToken from the previous result page.",
52205	//       "location": "query",
52206	//       "type": "string"
52207	//     },
52208	//     "profileId": {
52209	//       "description": "User profile ID associated with this request.",
52210	//       "format": "int64",
52211	//       "location": "path",
52212	//       "required": true,
52213	//       "type": "string"
52214	//     },
52215	//     "searchString": {
52216	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"userrole*2015\" will return objects with names like \"userrole June 2015\", \"userrole April 2015\", or simply \"userrole 2015\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"userrole\" will match objects with name \"my userrole\", \"userrole 2015\", or simply \"userrole\".",
52217	//       "location": "query",
52218	//       "type": "string"
52219	//     },
52220	//     "sortField": {
52221	//       "default": "ID",
52222	//       "description": "Field by which to sort the list.",
52223	//       "enum": [
52224	//         "ID",
52225	//         "NAME"
52226	//       ],
52227	//       "enumDescriptions": [
52228	//         "",
52229	//         ""
52230	//       ],
52231	//       "location": "query",
52232	//       "type": "string"
52233	//     },
52234	//     "sortOrder": {
52235	//       "default": "ASCENDING",
52236	//       "description": "Order of sorted results.",
52237	//       "enum": [
52238	//         "ASCENDING",
52239	//         "DESCENDING"
52240	//       ],
52241	//       "enumDescriptions": [
52242	//         "",
52243	//         ""
52244	//       ],
52245	//       "location": "query",
52246	//       "type": "string"
52247	//     },
52248	//     "subaccountId": {
52249	//       "description": "Select only user roles that belong to this subaccount.",
52250	//       "format": "int64",
52251	//       "location": "query",
52252	//       "type": "string"
52253	//     }
52254	//   },
52255	//   "path": "userprofiles/{profileId}/userRoles",
52256	//   "response": {
52257	//     "$ref": "UserRolesListResponse"
52258	//   },
52259	//   "scopes": [
52260	//     "https://www.googleapis.com/auth/dfatrafficking"
52261	//   ]
52262	// }
52263
52264}
52265
52266// Pages invokes f for each page of results.
52267// A non-nil error returned from f will halt the iteration.
52268// The provided context supersedes any context provided to the Context method.
52269func (c *UserRolesListCall) Pages(ctx context.Context, f func(*UserRolesListResponse) error) error {
52270	c.ctx_ = ctx
52271	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
52272	for {
52273		x, err := c.Do()
52274		if err != nil {
52275			return err
52276		}
52277		if err := f(x); err != nil {
52278			return err
52279		}
52280		if x.NextPageToken == "" {
52281			return nil
52282		}
52283		c.PageToken(x.NextPageToken)
52284	}
52285}
52286
52287// method id "dfareporting.userRoles.patch":
52288
52289type UserRolesPatchCall struct {
52290	s          *Service
52291	profileId  int64
52292	userrole   *UserRole
52293	urlParams_ gensupport.URLParams
52294	ctx_       context.Context
52295	header_    http.Header
52296}
52297
52298// Patch: Updates an existing user role. This method supports patch
52299// semantics.
52300//
52301// - id: UserRole ID.
52302// - profileId: User profile ID associated with this request.
52303func (r *UserRolesService) Patch(profileId int64, id int64, userrole *UserRole) *UserRolesPatchCall {
52304	c := &UserRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
52305	c.profileId = profileId
52306	c.urlParams_.Set("id", fmt.Sprint(id))
52307	c.userrole = userrole
52308	return c
52309}
52310
52311// Fields allows partial responses to be retrieved. See
52312// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
52313// for more information.
52314func (c *UserRolesPatchCall) Fields(s ...googleapi.Field) *UserRolesPatchCall {
52315	c.urlParams_.Set("fields", googleapi.CombineFields(s))
52316	return c
52317}
52318
52319// Context sets the context to be used in this call's Do method. Any
52320// pending HTTP request will be aborted if the provided context is
52321// canceled.
52322func (c *UserRolesPatchCall) Context(ctx context.Context) *UserRolesPatchCall {
52323	c.ctx_ = ctx
52324	return c
52325}
52326
52327// Header returns an http.Header that can be modified by the caller to
52328// add HTTP headers to the request.
52329func (c *UserRolesPatchCall) Header() http.Header {
52330	if c.header_ == nil {
52331		c.header_ = make(http.Header)
52332	}
52333	return c.header_
52334}
52335
52336func (c *UserRolesPatchCall) doRequest(alt string) (*http.Response, error) {
52337	reqHeaders := make(http.Header)
52338	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
52339	for k, v := range c.header_ {
52340		reqHeaders[k] = v
52341	}
52342	reqHeaders.Set("User-Agent", c.s.userAgent())
52343	var body io.Reader = nil
52344	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
52345	if err != nil {
52346		return nil, err
52347	}
52348	reqHeaders.Set("Content-Type", "application/json")
52349	c.urlParams_.Set("alt", alt)
52350	c.urlParams_.Set("prettyPrint", "false")
52351	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
52352	urls += "?" + c.urlParams_.Encode()
52353	req, err := http.NewRequest("PATCH", urls, body)
52354	if err != nil {
52355		return nil, err
52356	}
52357	req.Header = reqHeaders
52358	googleapi.Expand(req.URL, map[string]string{
52359		"profileId": strconv.FormatInt(c.profileId, 10),
52360	})
52361	return gensupport.SendRequest(c.ctx_, c.s.client, req)
52362}
52363
52364// Do executes the "dfareporting.userRoles.patch" call.
52365// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
52366// code is an error. Response headers are in either
52367// *UserRole.ServerResponse.Header or (if a response was returned at
52368// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
52369// to check whether the returned error was because
52370// http.StatusNotModified was returned.
52371func (c *UserRolesPatchCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
52372	gensupport.SetOptions(c.urlParams_, opts...)
52373	res, err := c.doRequest("json")
52374	if res != nil && res.StatusCode == http.StatusNotModified {
52375		if res.Body != nil {
52376			res.Body.Close()
52377		}
52378		return nil, &googleapi.Error{
52379			Code:   res.StatusCode,
52380			Header: res.Header,
52381		}
52382	}
52383	if err != nil {
52384		return nil, err
52385	}
52386	defer googleapi.CloseBody(res)
52387	if err := googleapi.CheckResponse(res); err != nil {
52388		return nil, err
52389	}
52390	ret := &UserRole{
52391		ServerResponse: googleapi.ServerResponse{
52392			Header:         res.Header,
52393			HTTPStatusCode: res.StatusCode,
52394		},
52395	}
52396	target := &ret
52397	if err := gensupport.DecodeResponse(target, res); err != nil {
52398		return nil, err
52399	}
52400	return ret, nil
52401	// {
52402	//   "description": "Updates an existing user role. This method supports patch semantics.",
52403	//   "flatPath": "userprofiles/{profileId}/userRoles",
52404	//   "httpMethod": "PATCH",
52405	//   "id": "dfareporting.userRoles.patch",
52406	//   "parameterOrder": [
52407	//     "profileId",
52408	//     "id"
52409	//   ],
52410	//   "parameters": {
52411	//     "id": {
52412	//       "description": "UserRole ID.",
52413	//       "format": "int64",
52414	//       "location": "query",
52415	//       "required": true,
52416	//       "type": "string"
52417	//     },
52418	//     "profileId": {
52419	//       "description": "User profile ID associated with this request.",
52420	//       "format": "int64",
52421	//       "location": "path",
52422	//       "required": true,
52423	//       "type": "string"
52424	//     }
52425	//   },
52426	//   "path": "userprofiles/{profileId}/userRoles",
52427	//   "request": {
52428	//     "$ref": "UserRole"
52429	//   },
52430	//   "response": {
52431	//     "$ref": "UserRole"
52432	//   },
52433	//   "scopes": [
52434	//     "https://www.googleapis.com/auth/dfatrafficking"
52435	//   ]
52436	// }
52437
52438}
52439
52440// method id "dfareporting.userRoles.update":
52441
52442type UserRolesUpdateCall struct {
52443	s          *Service
52444	profileId  int64
52445	userrole   *UserRole
52446	urlParams_ gensupport.URLParams
52447	ctx_       context.Context
52448	header_    http.Header
52449}
52450
52451// Update: Updates an existing user role.
52452//
52453// - profileId: User profile ID associated with this request.
52454func (r *UserRolesService) Update(profileId int64, userrole *UserRole) *UserRolesUpdateCall {
52455	c := &UserRolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
52456	c.profileId = profileId
52457	c.userrole = userrole
52458	return c
52459}
52460
52461// Fields allows partial responses to be retrieved. See
52462// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
52463// for more information.
52464func (c *UserRolesUpdateCall) Fields(s ...googleapi.Field) *UserRolesUpdateCall {
52465	c.urlParams_.Set("fields", googleapi.CombineFields(s))
52466	return c
52467}
52468
52469// Context sets the context to be used in this call's Do method. Any
52470// pending HTTP request will be aborted if the provided context is
52471// canceled.
52472func (c *UserRolesUpdateCall) Context(ctx context.Context) *UserRolesUpdateCall {
52473	c.ctx_ = ctx
52474	return c
52475}
52476
52477// Header returns an http.Header that can be modified by the caller to
52478// add HTTP headers to the request.
52479func (c *UserRolesUpdateCall) Header() http.Header {
52480	if c.header_ == nil {
52481		c.header_ = make(http.Header)
52482	}
52483	return c.header_
52484}
52485
52486func (c *UserRolesUpdateCall) doRequest(alt string) (*http.Response, error) {
52487	reqHeaders := make(http.Header)
52488	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
52489	for k, v := range c.header_ {
52490		reqHeaders[k] = v
52491	}
52492	reqHeaders.Set("User-Agent", c.s.userAgent())
52493	var body io.Reader = nil
52494	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
52495	if err != nil {
52496		return nil, err
52497	}
52498	reqHeaders.Set("Content-Type", "application/json")
52499	c.urlParams_.Set("alt", alt)
52500	c.urlParams_.Set("prettyPrint", "false")
52501	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
52502	urls += "?" + c.urlParams_.Encode()
52503	req, err := http.NewRequest("PUT", urls, body)
52504	if err != nil {
52505		return nil, err
52506	}
52507	req.Header = reqHeaders
52508	googleapi.Expand(req.URL, map[string]string{
52509		"profileId": strconv.FormatInt(c.profileId, 10),
52510	})
52511	return gensupport.SendRequest(c.ctx_, c.s.client, req)
52512}
52513
52514// Do executes the "dfareporting.userRoles.update" call.
52515// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
52516// code is an error. Response headers are in either
52517// *UserRole.ServerResponse.Header or (if a response was returned at
52518// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
52519// to check whether the returned error was because
52520// http.StatusNotModified was returned.
52521func (c *UserRolesUpdateCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
52522	gensupport.SetOptions(c.urlParams_, opts...)
52523	res, err := c.doRequest("json")
52524	if res != nil && res.StatusCode == http.StatusNotModified {
52525		if res.Body != nil {
52526			res.Body.Close()
52527		}
52528		return nil, &googleapi.Error{
52529			Code:   res.StatusCode,
52530			Header: res.Header,
52531		}
52532	}
52533	if err != nil {
52534		return nil, err
52535	}
52536	defer googleapi.CloseBody(res)
52537	if err := googleapi.CheckResponse(res); err != nil {
52538		return nil, err
52539	}
52540	ret := &UserRole{
52541		ServerResponse: googleapi.ServerResponse{
52542			Header:         res.Header,
52543			HTTPStatusCode: res.StatusCode,
52544		},
52545	}
52546	target := &ret
52547	if err := gensupport.DecodeResponse(target, res); err != nil {
52548		return nil, err
52549	}
52550	return ret, nil
52551	// {
52552	//   "description": "Updates an existing user role.",
52553	//   "flatPath": "userprofiles/{profileId}/userRoles",
52554	//   "httpMethod": "PUT",
52555	//   "id": "dfareporting.userRoles.update",
52556	//   "parameterOrder": [
52557	//     "profileId"
52558	//   ],
52559	//   "parameters": {
52560	//     "profileId": {
52561	//       "description": "User profile ID associated with this request.",
52562	//       "format": "int64",
52563	//       "location": "path",
52564	//       "required": true,
52565	//       "type": "string"
52566	//     }
52567	//   },
52568	//   "path": "userprofiles/{profileId}/userRoles",
52569	//   "request": {
52570	//     "$ref": "UserRole"
52571	//   },
52572	//   "response": {
52573	//     "$ref": "UserRole"
52574	//   },
52575	//   "scopes": [
52576	//     "https://www.googleapis.com/auth/dfatrafficking"
52577	//   ]
52578	// }
52579
52580}
52581
52582// method id "dfareporting.videoFormats.get":
52583
52584type VideoFormatsGetCall struct {
52585	s            *Service
52586	profileId    int64
52587	id           int64
52588	urlParams_   gensupport.URLParams
52589	ifNoneMatch_ string
52590	ctx_         context.Context
52591	header_      http.Header
52592}
52593
52594// Get: Gets one video format by ID.
52595//
52596// - id: Video format ID.
52597// - profileId: User profile ID associated with this request.
52598func (r *VideoFormatsService) Get(profileId int64, id int64) *VideoFormatsGetCall {
52599	c := &VideoFormatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
52600	c.profileId = profileId
52601	c.id = id
52602	return c
52603}
52604
52605// Fields allows partial responses to be retrieved. See
52606// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
52607// for more information.
52608func (c *VideoFormatsGetCall) Fields(s ...googleapi.Field) *VideoFormatsGetCall {
52609	c.urlParams_.Set("fields", googleapi.CombineFields(s))
52610	return c
52611}
52612
52613// IfNoneMatch sets the optional parameter which makes the operation
52614// fail if the object's ETag matches the given value. This is useful for
52615// getting updates only after the object has changed since the last
52616// request. Use googleapi.IsNotModified to check whether the response
52617// error from Do is the result of In-None-Match.
52618func (c *VideoFormatsGetCall) IfNoneMatch(entityTag string) *VideoFormatsGetCall {
52619	c.ifNoneMatch_ = entityTag
52620	return c
52621}
52622
52623// Context sets the context to be used in this call's Do method. Any
52624// pending HTTP request will be aborted if the provided context is
52625// canceled.
52626func (c *VideoFormatsGetCall) Context(ctx context.Context) *VideoFormatsGetCall {
52627	c.ctx_ = ctx
52628	return c
52629}
52630
52631// Header returns an http.Header that can be modified by the caller to
52632// add HTTP headers to the request.
52633func (c *VideoFormatsGetCall) Header() http.Header {
52634	if c.header_ == nil {
52635		c.header_ = make(http.Header)
52636	}
52637	return c.header_
52638}
52639
52640func (c *VideoFormatsGetCall) doRequest(alt string) (*http.Response, error) {
52641	reqHeaders := make(http.Header)
52642	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
52643	for k, v := range c.header_ {
52644		reqHeaders[k] = v
52645	}
52646	reqHeaders.Set("User-Agent", c.s.userAgent())
52647	if c.ifNoneMatch_ != "" {
52648		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
52649	}
52650	var body io.Reader = nil
52651	c.urlParams_.Set("alt", alt)
52652	c.urlParams_.Set("prettyPrint", "false")
52653	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats/{id}")
52654	urls += "?" + c.urlParams_.Encode()
52655	req, err := http.NewRequest("GET", urls, body)
52656	if err != nil {
52657		return nil, err
52658	}
52659	req.Header = reqHeaders
52660	googleapi.Expand(req.URL, map[string]string{
52661		"profileId": strconv.FormatInt(c.profileId, 10),
52662		"id":        strconv.FormatInt(c.id, 10),
52663	})
52664	return gensupport.SendRequest(c.ctx_, c.s.client, req)
52665}
52666
52667// Do executes the "dfareporting.videoFormats.get" call.
52668// Exactly one of *VideoFormat or error will be non-nil. Any non-2xx
52669// status code is an error. Response headers are in either
52670// *VideoFormat.ServerResponse.Header or (if a response was returned at
52671// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
52672// to check whether the returned error was because
52673// http.StatusNotModified was returned.
52674func (c *VideoFormatsGetCall) Do(opts ...googleapi.CallOption) (*VideoFormat, error) {
52675	gensupport.SetOptions(c.urlParams_, opts...)
52676	res, err := c.doRequest("json")
52677	if res != nil && res.StatusCode == http.StatusNotModified {
52678		if res.Body != nil {
52679			res.Body.Close()
52680		}
52681		return nil, &googleapi.Error{
52682			Code:   res.StatusCode,
52683			Header: res.Header,
52684		}
52685	}
52686	if err != nil {
52687		return nil, err
52688	}
52689	defer googleapi.CloseBody(res)
52690	if err := googleapi.CheckResponse(res); err != nil {
52691		return nil, err
52692	}
52693	ret := &VideoFormat{
52694		ServerResponse: googleapi.ServerResponse{
52695			Header:         res.Header,
52696			HTTPStatusCode: res.StatusCode,
52697		},
52698	}
52699	target := &ret
52700	if err := gensupport.DecodeResponse(target, res); err != nil {
52701		return nil, err
52702	}
52703	return ret, nil
52704	// {
52705	//   "description": "Gets one video format by ID.",
52706	//   "flatPath": "userprofiles/{profileId}/videoFormats/{id}",
52707	//   "httpMethod": "GET",
52708	//   "id": "dfareporting.videoFormats.get",
52709	//   "parameterOrder": [
52710	//     "profileId",
52711	//     "id"
52712	//   ],
52713	//   "parameters": {
52714	//     "id": {
52715	//       "description": "Video format ID.",
52716	//       "format": "int32",
52717	//       "location": "path",
52718	//       "required": true,
52719	//       "type": "integer"
52720	//     },
52721	//     "profileId": {
52722	//       "description": "User profile ID associated with this request.",
52723	//       "format": "int64",
52724	//       "location": "path",
52725	//       "required": true,
52726	//       "type": "string"
52727	//     }
52728	//   },
52729	//   "path": "userprofiles/{profileId}/videoFormats/{id}",
52730	//   "response": {
52731	//     "$ref": "VideoFormat"
52732	//   },
52733	//   "scopes": [
52734	//     "https://www.googleapis.com/auth/dfatrafficking"
52735	//   ]
52736	// }
52737
52738}
52739
52740// method id "dfareporting.videoFormats.list":
52741
52742type VideoFormatsListCall struct {
52743	s            *Service
52744	profileId    int64
52745	urlParams_   gensupport.URLParams
52746	ifNoneMatch_ string
52747	ctx_         context.Context
52748	header_      http.Header
52749}
52750
52751// List: Lists available video formats.
52752//
52753// - profileId: User profile ID associated with this request.
52754func (r *VideoFormatsService) List(profileId int64) *VideoFormatsListCall {
52755	c := &VideoFormatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
52756	c.profileId = profileId
52757	return c
52758}
52759
52760// Fields allows partial responses to be retrieved. See
52761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
52762// for more information.
52763func (c *VideoFormatsListCall) Fields(s ...googleapi.Field) *VideoFormatsListCall {
52764	c.urlParams_.Set("fields", googleapi.CombineFields(s))
52765	return c
52766}
52767
52768// IfNoneMatch sets the optional parameter which makes the operation
52769// fail if the object's ETag matches the given value. This is useful for
52770// getting updates only after the object has changed since the last
52771// request. Use googleapi.IsNotModified to check whether the response
52772// error from Do is the result of In-None-Match.
52773func (c *VideoFormatsListCall) IfNoneMatch(entityTag string) *VideoFormatsListCall {
52774	c.ifNoneMatch_ = entityTag
52775	return c
52776}
52777
52778// Context sets the context to be used in this call's Do method. Any
52779// pending HTTP request will be aborted if the provided context is
52780// canceled.
52781func (c *VideoFormatsListCall) Context(ctx context.Context) *VideoFormatsListCall {
52782	c.ctx_ = ctx
52783	return c
52784}
52785
52786// Header returns an http.Header that can be modified by the caller to
52787// add HTTP headers to the request.
52788func (c *VideoFormatsListCall) Header() http.Header {
52789	if c.header_ == nil {
52790		c.header_ = make(http.Header)
52791	}
52792	return c.header_
52793}
52794
52795func (c *VideoFormatsListCall) doRequest(alt string) (*http.Response, error) {
52796	reqHeaders := make(http.Header)
52797	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
52798	for k, v := range c.header_ {
52799		reqHeaders[k] = v
52800	}
52801	reqHeaders.Set("User-Agent", c.s.userAgent())
52802	if c.ifNoneMatch_ != "" {
52803		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
52804	}
52805	var body io.Reader = nil
52806	c.urlParams_.Set("alt", alt)
52807	c.urlParams_.Set("prettyPrint", "false")
52808	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats")
52809	urls += "?" + c.urlParams_.Encode()
52810	req, err := http.NewRequest("GET", urls, body)
52811	if err != nil {
52812		return nil, err
52813	}
52814	req.Header = reqHeaders
52815	googleapi.Expand(req.URL, map[string]string{
52816		"profileId": strconv.FormatInt(c.profileId, 10),
52817	})
52818	return gensupport.SendRequest(c.ctx_, c.s.client, req)
52819}
52820
52821// Do executes the "dfareporting.videoFormats.list" call.
52822// Exactly one of *VideoFormatsListResponse or error will be non-nil.
52823// Any non-2xx status code is an error. Response headers are in either
52824// *VideoFormatsListResponse.ServerResponse.Header or (if a response was
52825// returned at all) in error.(*googleapi.Error).Header. Use
52826// googleapi.IsNotModified to check whether the returned error was
52827// because http.StatusNotModified was returned.
52828func (c *VideoFormatsListCall) Do(opts ...googleapi.CallOption) (*VideoFormatsListResponse, error) {
52829	gensupport.SetOptions(c.urlParams_, opts...)
52830	res, err := c.doRequest("json")
52831	if res != nil && res.StatusCode == http.StatusNotModified {
52832		if res.Body != nil {
52833			res.Body.Close()
52834		}
52835		return nil, &googleapi.Error{
52836			Code:   res.StatusCode,
52837			Header: res.Header,
52838		}
52839	}
52840	if err != nil {
52841		return nil, err
52842	}
52843	defer googleapi.CloseBody(res)
52844	if err := googleapi.CheckResponse(res); err != nil {
52845		return nil, err
52846	}
52847	ret := &VideoFormatsListResponse{
52848		ServerResponse: googleapi.ServerResponse{
52849			Header:         res.Header,
52850			HTTPStatusCode: res.StatusCode,
52851		},
52852	}
52853	target := &ret
52854	if err := gensupport.DecodeResponse(target, res); err != nil {
52855		return nil, err
52856	}
52857	return ret, nil
52858	// {
52859	//   "description": "Lists available video formats.",
52860	//   "flatPath": "userprofiles/{profileId}/videoFormats",
52861	//   "httpMethod": "GET",
52862	//   "id": "dfareporting.videoFormats.list",
52863	//   "parameterOrder": [
52864	//     "profileId"
52865	//   ],
52866	//   "parameters": {
52867	//     "profileId": {
52868	//       "description": "User profile ID associated with this request.",
52869	//       "format": "int64",
52870	//       "location": "path",
52871	//       "required": true,
52872	//       "type": "string"
52873	//     }
52874	//   },
52875	//   "path": "userprofiles/{profileId}/videoFormats",
52876	//   "response": {
52877	//     "$ref": "VideoFormatsListResponse"
52878	//   },
52879	//   "scopes": [
52880	//     "https://www.googleapis.com/auth/dfatrafficking"
52881	//   ]
52882	// }
52883
52884}
52885