1// Copyright 2020 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 DCM/DFA Reporting And Trafficking 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.3"
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.3"
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.3"
79const apiName = "dfareporting"
80const apiVersion = "v3.3"
81const basePath = "https://www.googleapis.com/dfareporting/v3.3/"
82
83// OAuth2 scopes used by this API.
84const (
85	// Manage DoubleClick Digital Marketing conversions
86	DdmconversionsScope = "https://www.googleapis.com/auth/ddmconversions"
87
88	// View and manage DoubleClick for Advertisers reports
89	DfareportingScope = "https://www.googleapis.com/auth/dfareporting"
90
91	// View and manage your DoubleClick Campaign Manager's (DCM) display ad
92	// campaigns
93	DfatraffickingScope = "https://www.googleapis.com/auth/dfatrafficking"
94)
95
96// NewService creates a new Service.
97func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
98	scopesOption := option.WithScopes(
99		"https://www.googleapis.com/auth/ddmconversions",
100		"https://www.googleapis.com/auth/dfareporting",
101		"https://www.googleapis.com/auth/dfatrafficking",
102	)
103	// NOTE: prepend, so we don't override user-specified scopes.
104	opts = append([]option.ClientOption{scopesOption}, opts...)
105	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
106	client, endpoint, err := htransport.NewClient(ctx, opts...)
107	if err != nil {
108		return nil, err
109	}
110	s, err := New(client)
111	if err != nil {
112		return nil, err
113	}
114	if endpoint != "" {
115		s.BasePath = endpoint
116	}
117	return s, nil
118}
119
120// New creates a new Service. It uses the provided http.Client for requests.
121//
122// Deprecated: please use NewService instead.
123// To provide a custom HTTP client, use option.WithHTTPClient.
124// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
125func New(client *http.Client) (*Service, error) {
126	if client == nil {
127		return nil, errors.New("client is nil")
128	}
129	s := &Service{client: client, BasePath: basePath}
130	s.AccountActiveAdSummaries = NewAccountActiveAdSummariesService(s)
131	s.AccountPermissionGroups = NewAccountPermissionGroupsService(s)
132	s.AccountPermissions = NewAccountPermissionsService(s)
133	s.AccountUserProfiles = NewAccountUserProfilesService(s)
134	s.Accounts = NewAccountsService(s)
135	s.Ads = NewAdsService(s)
136	s.AdvertiserGroups = NewAdvertiserGroupsService(s)
137	s.AdvertiserLandingPages = NewAdvertiserLandingPagesService(s)
138	s.Advertisers = NewAdvertisersService(s)
139	s.Browsers = NewBrowsersService(s)
140	s.CampaignCreativeAssociations = NewCampaignCreativeAssociationsService(s)
141	s.Campaigns = NewCampaignsService(s)
142	s.ChangeLogs = NewChangeLogsService(s)
143	s.Cities = NewCitiesService(s)
144	s.ConnectionTypes = NewConnectionTypesService(s)
145	s.ContentCategories = NewContentCategoriesService(s)
146	s.Conversions = NewConversionsService(s)
147	s.Countries = NewCountriesService(s)
148	s.CreativeAssets = NewCreativeAssetsService(s)
149	s.CreativeFieldValues = NewCreativeFieldValuesService(s)
150	s.CreativeFields = NewCreativeFieldsService(s)
151	s.CreativeGroups = NewCreativeGroupsService(s)
152	s.Creatives = NewCreativesService(s)
153	s.DimensionValues = NewDimensionValuesService(s)
154	s.DirectorySites = NewDirectorySitesService(s)
155	s.DynamicTargetingKeys = NewDynamicTargetingKeysService(s)
156	s.EventTags = NewEventTagsService(s)
157	s.Files = NewFilesService(s)
158	s.FloodlightActivities = NewFloodlightActivitiesService(s)
159	s.FloodlightActivityGroups = NewFloodlightActivityGroupsService(s)
160	s.FloodlightConfigurations = NewFloodlightConfigurationsService(s)
161	s.InventoryItems = NewInventoryItemsService(s)
162	s.Languages = NewLanguagesService(s)
163	s.Metros = NewMetrosService(s)
164	s.MobileApps = NewMobileAppsService(s)
165	s.MobileCarriers = NewMobileCarriersService(s)
166	s.OperatingSystemVersions = NewOperatingSystemVersionsService(s)
167	s.OperatingSystems = NewOperatingSystemsService(s)
168	s.OrderDocuments = NewOrderDocumentsService(s)
169	s.Orders = NewOrdersService(s)
170	s.PlacementGroups = NewPlacementGroupsService(s)
171	s.PlacementStrategies = NewPlacementStrategiesService(s)
172	s.Placements = NewPlacementsService(s)
173	s.PlatformTypes = NewPlatformTypesService(s)
174	s.PostalCodes = NewPostalCodesService(s)
175	s.Projects = NewProjectsService(s)
176	s.Regions = NewRegionsService(s)
177	s.RemarketingListShares = NewRemarketingListSharesService(s)
178	s.RemarketingLists = NewRemarketingListsService(s)
179	s.Reports = NewReportsService(s)
180	s.Sites = NewSitesService(s)
181	s.Sizes = NewSizesService(s)
182	s.Subaccounts = NewSubaccountsService(s)
183	s.TargetableRemarketingLists = NewTargetableRemarketingListsService(s)
184	s.TargetingTemplates = NewTargetingTemplatesService(s)
185	s.UserProfiles = NewUserProfilesService(s)
186	s.UserRolePermissionGroups = NewUserRolePermissionGroupsService(s)
187	s.UserRolePermissions = NewUserRolePermissionsService(s)
188	s.UserRoles = NewUserRolesService(s)
189	s.VideoFormats = NewVideoFormatsService(s)
190	return s, nil
191}
192
193type Service struct {
194	client    *http.Client
195	BasePath  string // API endpoint base URL
196	UserAgent string // optional additional User-Agent fragment
197
198	AccountActiveAdSummaries *AccountActiveAdSummariesService
199
200	AccountPermissionGroups *AccountPermissionGroupsService
201
202	AccountPermissions *AccountPermissionsService
203
204	AccountUserProfiles *AccountUserProfilesService
205
206	Accounts *AccountsService
207
208	Ads *AdsService
209
210	AdvertiserGroups *AdvertiserGroupsService
211
212	AdvertiserLandingPages *AdvertiserLandingPagesService
213
214	Advertisers *AdvertisersService
215
216	Browsers *BrowsersService
217
218	CampaignCreativeAssociations *CampaignCreativeAssociationsService
219
220	Campaigns *CampaignsService
221
222	ChangeLogs *ChangeLogsService
223
224	Cities *CitiesService
225
226	ConnectionTypes *ConnectionTypesService
227
228	ContentCategories *ContentCategoriesService
229
230	Conversions *ConversionsService
231
232	Countries *CountriesService
233
234	CreativeAssets *CreativeAssetsService
235
236	CreativeFieldValues *CreativeFieldValuesService
237
238	CreativeFields *CreativeFieldsService
239
240	CreativeGroups *CreativeGroupsService
241
242	Creatives *CreativesService
243
244	DimensionValues *DimensionValuesService
245
246	DirectorySites *DirectorySitesService
247
248	DynamicTargetingKeys *DynamicTargetingKeysService
249
250	EventTags *EventTagsService
251
252	Files *FilesService
253
254	FloodlightActivities *FloodlightActivitiesService
255
256	FloodlightActivityGroups *FloodlightActivityGroupsService
257
258	FloodlightConfigurations *FloodlightConfigurationsService
259
260	InventoryItems *InventoryItemsService
261
262	Languages *LanguagesService
263
264	Metros *MetrosService
265
266	MobileApps *MobileAppsService
267
268	MobileCarriers *MobileCarriersService
269
270	OperatingSystemVersions *OperatingSystemVersionsService
271
272	OperatingSystems *OperatingSystemsService
273
274	OrderDocuments *OrderDocumentsService
275
276	Orders *OrdersService
277
278	PlacementGroups *PlacementGroupsService
279
280	PlacementStrategies *PlacementStrategiesService
281
282	Placements *PlacementsService
283
284	PlatformTypes *PlatformTypesService
285
286	PostalCodes *PostalCodesService
287
288	Projects *ProjectsService
289
290	Regions *RegionsService
291
292	RemarketingListShares *RemarketingListSharesService
293
294	RemarketingLists *RemarketingListsService
295
296	Reports *ReportsService
297
298	Sites *SitesService
299
300	Sizes *SizesService
301
302	Subaccounts *SubaccountsService
303
304	TargetableRemarketingLists *TargetableRemarketingListsService
305
306	TargetingTemplates *TargetingTemplatesService
307
308	UserProfiles *UserProfilesService
309
310	UserRolePermissionGroups *UserRolePermissionGroupsService
311
312	UserRolePermissions *UserRolePermissionsService
313
314	UserRoles *UserRolesService
315
316	VideoFormats *VideoFormatsService
317}
318
319func (s *Service) userAgent() string {
320	if s.UserAgent == "" {
321		return googleapi.UserAgent
322	}
323	return googleapi.UserAgent + " " + s.UserAgent
324}
325
326func NewAccountActiveAdSummariesService(s *Service) *AccountActiveAdSummariesService {
327	rs := &AccountActiveAdSummariesService{s: s}
328	return rs
329}
330
331type AccountActiveAdSummariesService struct {
332	s *Service
333}
334
335func NewAccountPermissionGroupsService(s *Service) *AccountPermissionGroupsService {
336	rs := &AccountPermissionGroupsService{s: s}
337	return rs
338}
339
340type AccountPermissionGroupsService struct {
341	s *Service
342}
343
344func NewAccountPermissionsService(s *Service) *AccountPermissionsService {
345	rs := &AccountPermissionsService{s: s}
346	return rs
347}
348
349type AccountPermissionsService struct {
350	s *Service
351}
352
353func NewAccountUserProfilesService(s *Service) *AccountUserProfilesService {
354	rs := &AccountUserProfilesService{s: s}
355	return rs
356}
357
358type AccountUserProfilesService struct {
359	s *Service
360}
361
362func NewAccountsService(s *Service) *AccountsService {
363	rs := &AccountsService{s: s}
364	return rs
365}
366
367type AccountsService struct {
368	s *Service
369}
370
371func NewAdsService(s *Service) *AdsService {
372	rs := &AdsService{s: s}
373	return rs
374}
375
376type AdsService struct {
377	s *Service
378}
379
380func NewAdvertiserGroupsService(s *Service) *AdvertiserGroupsService {
381	rs := &AdvertiserGroupsService{s: s}
382	return rs
383}
384
385type AdvertiserGroupsService struct {
386	s *Service
387}
388
389func NewAdvertiserLandingPagesService(s *Service) *AdvertiserLandingPagesService {
390	rs := &AdvertiserLandingPagesService{s: s}
391	return rs
392}
393
394type AdvertiserLandingPagesService struct {
395	s *Service
396}
397
398func NewAdvertisersService(s *Service) *AdvertisersService {
399	rs := &AdvertisersService{s: s}
400	return rs
401}
402
403type AdvertisersService struct {
404	s *Service
405}
406
407func NewBrowsersService(s *Service) *BrowsersService {
408	rs := &BrowsersService{s: s}
409	return rs
410}
411
412type BrowsersService struct {
413	s *Service
414}
415
416func NewCampaignCreativeAssociationsService(s *Service) *CampaignCreativeAssociationsService {
417	rs := &CampaignCreativeAssociationsService{s: s}
418	return rs
419}
420
421type CampaignCreativeAssociationsService struct {
422	s *Service
423}
424
425func NewCampaignsService(s *Service) *CampaignsService {
426	rs := &CampaignsService{s: s}
427	return rs
428}
429
430type CampaignsService struct {
431	s *Service
432}
433
434func NewChangeLogsService(s *Service) *ChangeLogsService {
435	rs := &ChangeLogsService{s: s}
436	return rs
437}
438
439type ChangeLogsService struct {
440	s *Service
441}
442
443func NewCitiesService(s *Service) *CitiesService {
444	rs := &CitiesService{s: s}
445	return rs
446}
447
448type CitiesService struct {
449	s *Service
450}
451
452func NewConnectionTypesService(s *Service) *ConnectionTypesService {
453	rs := &ConnectionTypesService{s: s}
454	return rs
455}
456
457type ConnectionTypesService struct {
458	s *Service
459}
460
461func NewContentCategoriesService(s *Service) *ContentCategoriesService {
462	rs := &ContentCategoriesService{s: s}
463	return rs
464}
465
466type ContentCategoriesService struct {
467	s *Service
468}
469
470func NewConversionsService(s *Service) *ConversionsService {
471	rs := &ConversionsService{s: s}
472	return rs
473}
474
475type ConversionsService struct {
476	s *Service
477}
478
479func NewCountriesService(s *Service) *CountriesService {
480	rs := &CountriesService{s: s}
481	return rs
482}
483
484type CountriesService struct {
485	s *Service
486}
487
488func NewCreativeAssetsService(s *Service) *CreativeAssetsService {
489	rs := &CreativeAssetsService{s: s}
490	return rs
491}
492
493type CreativeAssetsService struct {
494	s *Service
495}
496
497func NewCreativeFieldValuesService(s *Service) *CreativeFieldValuesService {
498	rs := &CreativeFieldValuesService{s: s}
499	return rs
500}
501
502type CreativeFieldValuesService struct {
503	s *Service
504}
505
506func NewCreativeFieldsService(s *Service) *CreativeFieldsService {
507	rs := &CreativeFieldsService{s: s}
508	return rs
509}
510
511type CreativeFieldsService struct {
512	s *Service
513}
514
515func NewCreativeGroupsService(s *Service) *CreativeGroupsService {
516	rs := &CreativeGroupsService{s: s}
517	return rs
518}
519
520type CreativeGroupsService struct {
521	s *Service
522}
523
524func NewCreativesService(s *Service) *CreativesService {
525	rs := &CreativesService{s: s}
526	return rs
527}
528
529type CreativesService struct {
530	s *Service
531}
532
533func NewDimensionValuesService(s *Service) *DimensionValuesService {
534	rs := &DimensionValuesService{s: s}
535	return rs
536}
537
538type DimensionValuesService struct {
539	s *Service
540}
541
542func NewDirectorySitesService(s *Service) *DirectorySitesService {
543	rs := &DirectorySitesService{s: s}
544	return rs
545}
546
547type DirectorySitesService struct {
548	s *Service
549}
550
551func NewDynamicTargetingKeysService(s *Service) *DynamicTargetingKeysService {
552	rs := &DynamicTargetingKeysService{s: s}
553	return rs
554}
555
556type DynamicTargetingKeysService struct {
557	s *Service
558}
559
560func NewEventTagsService(s *Service) *EventTagsService {
561	rs := &EventTagsService{s: s}
562	return rs
563}
564
565type EventTagsService struct {
566	s *Service
567}
568
569func NewFilesService(s *Service) *FilesService {
570	rs := &FilesService{s: s}
571	return rs
572}
573
574type FilesService struct {
575	s *Service
576}
577
578func NewFloodlightActivitiesService(s *Service) *FloodlightActivitiesService {
579	rs := &FloodlightActivitiesService{s: s}
580	return rs
581}
582
583type FloodlightActivitiesService struct {
584	s *Service
585}
586
587func NewFloodlightActivityGroupsService(s *Service) *FloodlightActivityGroupsService {
588	rs := &FloodlightActivityGroupsService{s: s}
589	return rs
590}
591
592type FloodlightActivityGroupsService struct {
593	s *Service
594}
595
596func NewFloodlightConfigurationsService(s *Service) *FloodlightConfigurationsService {
597	rs := &FloodlightConfigurationsService{s: s}
598	return rs
599}
600
601type FloodlightConfigurationsService struct {
602	s *Service
603}
604
605func NewInventoryItemsService(s *Service) *InventoryItemsService {
606	rs := &InventoryItemsService{s: s}
607	return rs
608}
609
610type InventoryItemsService struct {
611	s *Service
612}
613
614func NewLanguagesService(s *Service) *LanguagesService {
615	rs := &LanguagesService{s: s}
616	return rs
617}
618
619type LanguagesService struct {
620	s *Service
621}
622
623func NewMetrosService(s *Service) *MetrosService {
624	rs := &MetrosService{s: s}
625	return rs
626}
627
628type MetrosService struct {
629	s *Service
630}
631
632func NewMobileAppsService(s *Service) *MobileAppsService {
633	rs := &MobileAppsService{s: s}
634	return rs
635}
636
637type MobileAppsService struct {
638	s *Service
639}
640
641func NewMobileCarriersService(s *Service) *MobileCarriersService {
642	rs := &MobileCarriersService{s: s}
643	return rs
644}
645
646type MobileCarriersService struct {
647	s *Service
648}
649
650func NewOperatingSystemVersionsService(s *Service) *OperatingSystemVersionsService {
651	rs := &OperatingSystemVersionsService{s: s}
652	return rs
653}
654
655type OperatingSystemVersionsService struct {
656	s *Service
657}
658
659func NewOperatingSystemsService(s *Service) *OperatingSystemsService {
660	rs := &OperatingSystemsService{s: s}
661	return rs
662}
663
664type OperatingSystemsService struct {
665	s *Service
666}
667
668func NewOrderDocumentsService(s *Service) *OrderDocumentsService {
669	rs := &OrderDocumentsService{s: s}
670	return rs
671}
672
673type OrderDocumentsService struct {
674	s *Service
675}
676
677func NewOrdersService(s *Service) *OrdersService {
678	rs := &OrdersService{s: s}
679	return rs
680}
681
682type OrdersService struct {
683	s *Service
684}
685
686func NewPlacementGroupsService(s *Service) *PlacementGroupsService {
687	rs := &PlacementGroupsService{s: s}
688	return rs
689}
690
691type PlacementGroupsService struct {
692	s *Service
693}
694
695func NewPlacementStrategiesService(s *Service) *PlacementStrategiesService {
696	rs := &PlacementStrategiesService{s: s}
697	return rs
698}
699
700type PlacementStrategiesService struct {
701	s *Service
702}
703
704func NewPlacementsService(s *Service) *PlacementsService {
705	rs := &PlacementsService{s: s}
706	return rs
707}
708
709type PlacementsService struct {
710	s *Service
711}
712
713func NewPlatformTypesService(s *Service) *PlatformTypesService {
714	rs := &PlatformTypesService{s: s}
715	return rs
716}
717
718type PlatformTypesService struct {
719	s *Service
720}
721
722func NewPostalCodesService(s *Service) *PostalCodesService {
723	rs := &PostalCodesService{s: s}
724	return rs
725}
726
727type PostalCodesService struct {
728	s *Service
729}
730
731func NewProjectsService(s *Service) *ProjectsService {
732	rs := &ProjectsService{s: s}
733	return rs
734}
735
736type ProjectsService struct {
737	s *Service
738}
739
740func NewRegionsService(s *Service) *RegionsService {
741	rs := &RegionsService{s: s}
742	return rs
743}
744
745type RegionsService struct {
746	s *Service
747}
748
749func NewRemarketingListSharesService(s *Service) *RemarketingListSharesService {
750	rs := &RemarketingListSharesService{s: s}
751	return rs
752}
753
754type RemarketingListSharesService struct {
755	s *Service
756}
757
758func NewRemarketingListsService(s *Service) *RemarketingListsService {
759	rs := &RemarketingListsService{s: s}
760	return rs
761}
762
763type RemarketingListsService struct {
764	s *Service
765}
766
767func NewReportsService(s *Service) *ReportsService {
768	rs := &ReportsService{s: s}
769	rs.CompatibleFields = NewReportsCompatibleFieldsService(s)
770	rs.Files = NewReportsFilesService(s)
771	return rs
772}
773
774type ReportsService struct {
775	s *Service
776
777	CompatibleFields *ReportsCompatibleFieldsService
778
779	Files *ReportsFilesService
780}
781
782func NewReportsCompatibleFieldsService(s *Service) *ReportsCompatibleFieldsService {
783	rs := &ReportsCompatibleFieldsService{s: s}
784	return rs
785}
786
787type ReportsCompatibleFieldsService struct {
788	s *Service
789}
790
791func NewReportsFilesService(s *Service) *ReportsFilesService {
792	rs := &ReportsFilesService{s: s}
793	return rs
794}
795
796type ReportsFilesService struct {
797	s *Service
798}
799
800func NewSitesService(s *Service) *SitesService {
801	rs := &SitesService{s: s}
802	return rs
803}
804
805type SitesService struct {
806	s *Service
807}
808
809func NewSizesService(s *Service) *SizesService {
810	rs := &SizesService{s: s}
811	return rs
812}
813
814type SizesService struct {
815	s *Service
816}
817
818func NewSubaccountsService(s *Service) *SubaccountsService {
819	rs := &SubaccountsService{s: s}
820	return rs
821}
822
823type SubaccountsService struct {
824	s *Service
825}
826
827func NewTargetableRemarketingListsService(s *Service) *TargetableRemarketingListsService {
828	rs := &TargetableRemarketingListsService{s: s}
829	return rs
830}
831
832type TargetableRemarketingListsService struct {
833	s *Service
834}
835
836func NewTargetingTemplatesService(s *Service) *TargetingTemplatesService {
837	rs := &TargetingTemplatesService{s: s}
838	return rs
839}
840
841type TargetingTemplatesService struct {
842	s *Service
843}
844
845func NewUserProfilesService(s *Service) *UserProfilesService {
846	rs := &UserProfilesService{s: s}
847	return rs
848}
849
850type UserProfilesService struct {
851	s *Service
852}
853
854func NewUserRolePermissionGroupsService(s *Service) *UserRolePermissionGroupsService {
855	rs := &UserRolePermissionGroupsService{s: s}
856	return rs
857}
858
859type UserRolePermissionGroupsService struct {
860	s *Service
861}
862
863func NewUserRolePermissionsService(s *Service) *UserRolePermissionsService {
864	rs := &UserRolePermissionsService{s: s}
865	return rs
866}
867
868type UserRolePermissionsService struct {
869	s *Service
870}
871
872func NewUserRolesService(s *Service) *UserRolesService {
873	rs := &UserRolesService{s: s}
874	return rs
875}
876
877type UserRolesService struct {
878	s *Service
879}
880
881func NewVideoFormatsService(s *Service) *VideoFormatsService {
882	rs := &VideoFormatsService{s: s}
883	return rs
884}
885
886type VideoFormatsService struct {
887	s *Service
888}
889
890// Account: Contains properties of a Campaign Manager account.
891type Account struct {
892	// AccountPermissionIds: Account permissions assigned to this account.
893	AccountPermissionIds googleapi.Int64s `json:"accountPermissionIds,omitempty"`
894
895	// AccountProfile: Profile for this account. This is a read-only field
896	// that can be left blank.
897	//
898	// Possible values:
899	//   "ACCOUNT_PROFILE_BASIC"
900	//   "ACCOUNT_PROFILE_STANDARD"
901	AccountProfile string `json:"accountProfile,omitempty"`
902
903	// Active: Whether this account is active.
904	Active bool `json:"active,omitempty"`
905
906	// ActiveAdsLimitTier: Maximum number of active ads allowed for this
907	// account.
908	//
909	// Possible values:
910	//   "ACTIVE_ADS_TIER_100K"
911	//   "ACTIVE_ADS_TIER_1M"
912	//   "ACTIVE_ADS_TIER_200K"
913	//   "ACTIVE_ADS_TIER_300K"
914	//   "ACTIVE_ADS_TIER_40K"
915	//   "ACTIVE_ADS_TIER_500K"
916	//   "ACTIVE_ADS_TIER_750K"
917	//   "ACTIVE_ADS_TIER_75K"
918	ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
919
920	// ActiveViewOptOut: Whether to serve creatives with Active View tags.
921	// If disabled, viewability data will not be available for any
922	// impressions.
923	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
924
925	// AvailablePermissionIds: User role permissions available to the user
926	// roles of this account.
927	AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
928
929	// CountryId: ID of the country associated with this account.
930	CountryId int64 `json:"countryId,omitempty,string"`
931
932	// CurrencyId: ID of currency associated with this account. This is a
933	// required field.
934	// Acceptable values are:
935	// - "1" for USD
936	// - "2" for GBP
937	// - "3" for ESP
938	// - "4" for SEK
939	// - "5" for CAD
940	// - "6" for JPY
941	// - "7" for DEM
942	// - "8" for AUD
943	// - "9" for FRF
944	// - "10" for ITL
945	// - "11" for DKK
946	// - "12" for NOK
947	// - "13" for FIM
948	// - "14" for ZAR
949	// - "15" for IEP
950	// - "16" for NLG
951	// - "17" for EUR
952	// - "18" for KRW
953	// - "19" for TWD
954	// - "20" for SGD
955	// - "21" for CNY
956	// - "22" for HKD
957	// - "23" for NZD
958	// - "24" for MYR
959	// - "25" for BRL
960	// - "26" for PTE
961	// - "27" for MXP
962	// - "28" for CLP
963	// - "29" for TRY
964	// - "30" for ARS
965	// - "31" for PEN
966	// - "32" for ILS
967	// - "33" for CHF
968	// - "34" for VEF
969	// - "35" for COP
970	// - "36" for GTQ
971	// - "37" for PLN
972	// - "39" for INR
973	// - "40" for THB
974	// - "41" for IDR
975	// - "42" for CZK
976	// - "43" for RON
977	// - "44" for HUF
978	// - "45" for RUB
979	// - "46" for AED
980	// - "47" for BGN
981	// - "48" for HRK
982	// - "49" for MXN
983	// - "50" for NGN
984	// - "51" for EGP
985	CurrencyId int64 `json:"currencyId,omitempty,string"`
986
987	// DefaultCreativeSizeId: Default placement dimensions for this account.
988	DefaultCreativeSizeId int64 `json:"defaultCreativeSizeId,omitempty,string"`
989
990	// Description: Description of this account.
991	Description string `json:"description,omitempty"`
992
993	// Id: ID of this account. This is a read-only, auto-generated field.
994	Id int64 `json:"id,omitempty,string"`
995
996	// Kind: Identifies what kind of resource this is. Value: the fixed
997	// string "dfareporting#account".
998	Kind string `json:"kind,omitempty"`
999
1000	// Locale: Locale of this account.
1001	// Acceptable values are:
1002	// - "cs" (Czech)
1003	// - "de" (German)
1004	// - "en" (English)
1005	// - "en-GB" (English United Kingdom)
1006	// - "es" (Spanish)
1007	// - "fr" (French)
1008	// - "it" (Italian)
1009	// - "ja" (Japanese)
1010	// - "ko" (Korean)
1011	// - "pl" (Polish)
1012	// - "pt-BR" (Portuguese Brazil)
1013	// - "ru" (Russian)
1014	// - "sv" (Swedish)
1015	// - "tr" (Turkish)
1016	// - "zh-CN" (Chinese Simplified)
1017	// - "zh-TW" (Chinese Traditional)
1018	Locale string `json:"locale,omitempty"`
1019
1020	// MaximumImageSize: Maximum image size allowed for this account, in
1021	// kilobytes. Value must be greater than or equal to 1.
1022	MaximumImageSize int64 `json:"maximumImageSize,omitempty,string"`
1023
1024	// Name: Name of this account. This is a required field, and must be
1025	// less than 128 characters long and be globally unique.
1026	Name string `json:"name,omitempty"`
1027
1028	// NielsenOcrEnabled: Whether campaigns created in this account will be
1029	// enabled for Nielsen OCR reach ratings by default.
1030	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
1031
1032	// ReportsConfiguration: Reporting configuration of this account.
1033	ReportsConfiguration *ReportsConfiguration `json:"reportsConfiguration,omitempty"`
1034
1035	// ShareReportsWithTwitter: Share Path to Conversion reports with
1036	// Twitter.
1037	ShareReportsWithTwitter bool `json:"shareReportsWithTwitter,omitempty"`
1038
1039	// TeaserSizeLimit: File size limit in kilobytes of Rich Media teaser
1040	// creatives. Acceptable values are 1 to 10240, inclusive.
1041	TeaserSizeLimit int64 `json:"teaserSizeLimit,omitempty,string"`
1042
1043	// ServerResponse contains the HTTP response code and headers from the
1044	// server.
1045	googleapi.ServerResponse `json:"-"`
1046
1047	// ForceSendFields is a list of field names (e.g.
1048	// "AccountPermissionIds") to unconditionally include in API requests.
1049	// By default, fields with empty values are omitted from API requests.
1050	// However, any non-pointer, non-interface field appearing in
1051	// ForceSendFields will be sent to the server regardless of whether the
1052	// field is empty or not. This may be used to include empty fields in
1053	// Patch requests.
1054	ForceSendFields []string `json:"-"`
1055
1056	// NullFields is a list of field names (e.g. "AccountPermissionIds") to
1057	// include in API requests with the JSON null value. By default, fields
1058	// with empty values are omitted from API requests. However, any field
1059	// with an empty value appearing in NullFields will be sent to the
1060	// server as null. It is an error if a field in this list has a
1061	// non-empty value. This may be used to include null fields in Patch
1062	// requests.
1063	NullFields []string `json:"-"`
1064}
1065
1066func (s *Account) MarshalJSON() ([]byte, error) {
1067	type NoMethod Account
1068	raw := NoMethod(*s)
1069	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1070}
1071
1072// AccountActiveAdSummary: Gets a summary of active ads in an account.
1073type AccountActiveAdSummary struct {
1074	// AccountId: ID of the account.
1075	AccountId int64 `json:"accountId,omitempty,string"`
1076
1077	// ActiveAds: Ads that have been activated for the account
1078	ActiveAds int64 `json:"activeAds,omitempty,string"`
1079
1080	// ActiveAdsLimitTier: Maximum number of active ads allowed for the
1081	// account.
1082	//
1083	// Possible values:
1084	//   "ACTIVE_ADS_TIER_100K"
1085	//   "ACTIVE_ADS_TIER_1M"
1086	//   "ACTIVE_ADS_TIER_200K"
1087	//   "ACTIVE_ADS_TIER_300K"
1088	//   "ACTIVE_ADS_TIER_40K"
1089	//   "ACTIVE_ADS_TIER_500K"
1090	//   "ACTIVE_ADS_TIER_750K"
1091	//   "ACTIVE_ADS_TIER_75K"
1092	ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
1093
1094	// AvailableAds: Ads that can be activated for the account.
1095	AvailableAds int64 `json:"availableAds,omitempty,string"`
1096
1097	// Kind: Identifies what kind of resource this is. Value: the fixed
1098	// string "dfareporting#accountActiveAdSummary".
1099	Kind string `json:"kind,omitempty"`
1100
1101	// ServerResponse contains the HTTP response code and headers from the
1102	// server.
1103	googleapi.ServerResponse `json:"-"`
1104
1105	// ForceSendFields is a list of field names (e.g. "AccountId") to
1106	// unconditionally include in API requests. By default, fields with
1107	// empty values are omitted from API requests. However, any non-pointer,
1108	// non-interface field appearing in ForceSendFields will be sent to the
1109	// server regardless of whether the field is empty or not. This may be
1110	// used to include empty fields in Patch requests.
1111	ForceSendFields []string `json:"-"`
1112
1113	// NullFields is a list of field names (e.g. "AccountId") to include in
1114	// API requests with the JSON null value. By default, fields with empty
1115	// values are omitted from API requests. However, any field with an
1116	// empty value appearing in NullFields will be sent to the server as
1117	// null. It is an error if a field in this list has a non-empty value.
1118	// This may be used to include null fields in Patch requests.
1119	NullFields []string `json:"-"`
1120}
1121
1122func (s *AccountActiveAdSummary) MarshalJSON() ([]byte, error) {
1123	type NoMethod AccountActiveAdSummary
1124	raw := NoMethod(*s)
1125	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1126}
1127
1128// AccountPermission: AccountPermissions contains information about a
1129// particular account permission. Some features of Campaign Manager
1130// require an account permission to be present in the account.
1131type AccountPermission struct {
1132	// AccountProfiles: Account profiles associated with this account
1133	// permission.
1134	//
1135	// Possible values are:
1136	// - "ACCOUNT_PROFILE_BASIC"
1137	// - "ACCOUNT_PROFILE_STANDARD"
1138	//
1139	// Possible values:
1140	//   "ACCOUNT_PROFILE_BASIC"
1141	//   "ACCOUNT_PROFILE_STANDARD"
1142	AccountProfiles []string `json:"accountProfiles,omitempty"`
1143
1144	// Id: ID of this account permission.
1145	Id int64 `json:"id,omitempty,string"`
1146
1147	// Kind: Identifies what kind of resource this is. Value: the fixed
1148	// string "dfareporting#accountPermission".
1149	Kind string `json:"kind,omitempty"`
1150
1151	// Level: Administrative level required to enable this account
1152	// permission.
1153	//
1154	// Possible values:
1155	//   "ADMINISTRATOR"
1156	//   "USER"
1157	Level string `json:"level,omitempty"`
1158
1159	// Name: Name of this account permission.
1160	Name string `json:"name,omitempty"`
1161
1162	// PermissionGroupId: Permission group of this account permission.
1163	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
1164
1165	// ServerResponse contains the HTTP response code and headers from the
1166	// server.
1167	googleapi.ServerResponse `json:"-"`
1168
1169	// ForceSendFields is a list of field names (e.g. "AccountProfiles") to
1170	// unconditionally include in API requests. By default, fields with
1171	// empty values are omitted from API requests. However, any non-pointer,
1172	// non-interface field appearing in ForceSendFields will be sent to the
1173	// server regardless of whether the field is empty or not. This may be
1174	// used to include empty fields in Patch requests.
1175	ForceSendFields []string `json:"-"`
1176
1177	// NullFields is a list of field names (e.g. "AccountProfiles") to
1178	// include in API requests with the JSON null value. By default, fields
1179	// with empty values are omitted from API requests. However, any field
1180	// with an empty value appearing in NullFields will be sent to the
1181	// server as null. It is an error if a field in this list has a
1182	// non-empty value. This may be used to include null fields in Patch
1183	// requests.
1184	NullFields []string `json:"-"`
1185}
1186
1187func (s *AccountPermission) MarshalJSON() ([]byte, error) {
1188	type NoMethod AccountPermission
1189	raw := NoMethod(*s)
1190	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1191}
1192
1193// AccountPermissionGroup: AccountPermissionGroups contains a mapping of
1194// permission group IDs to names. A permission group is a grouping of
1195// account permissions.
1196type AccountPermissionGroup struct {
1197	// Id: ID of this account permission group.
1198	Id int64 `json:"id,omitempty,string"`
1199
1200	// Kind: Identifies what kind of resource this is. Value: the fixed
1201	// string "dfareporting#accountPermissionGroup".
1202	Kind string `json:"kind,omitempty"`
1203
1204	// Name: Name of this account permission group.
1205	Name string `json:"name,omitempty"`
1206
1207	// ServerResponse contains the HTTP response code and headers from the
1208	// server.
1209	googleapi.ServerResponse `json:"-"`
1210
1211	// ForceSendFields is a list of field names (e.g. "Id") to
1212	// unconditionally include in API requests. By default, fields with
1213	// empty values are omitted from API requests. However, any non-pointer,
1214	// non-interface field appearing in ForceSendFields will be sent to the
1215	// server regardless of whether the field is empty or not. This may be
1216	// used to include empty fields in Patch requests.
1217	ForceSendFields []string `json:"-"`
1218
1219	// NullFields is a list of field names (e.g. "Id") to include in API
1220	// requests with the JSON null value. By default, fields with empty
1221	// values are omitted from API requests. However, any field with an
1222	// empty value appearing in NullFields will be sent to the server as
1223	// null. It is an error if a field in this list has a non-empty value.
1224	// This may be used to include null fields in Patch requests.
1225	NullFields []string `json:"-"`
1226}
1227
1228func (s *AccountPermissionGroup) MarshalJSON() ([]byte, error) {
1229	type NoMethod AccountPermissionGroup
1230	raw := NoMethod(*s)
1231	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1232}
1233
1234// AccountPermissionGroupsListResponse: Account Permission Group List
1235// Response
1236type AccountPermissionGroupsListResponse struct {
1237	// AccountPermissionGroups: Account permission group collection.
1238	AccountPermissionGroups []*AccountPermissionGroup `json:"accountPermissionGroups,omitempty"`
1239
1240	// Kind: Identifies what kind of resource this is. Value: the fixed
1241	// string "dfareporting#accountPermissionGroupsListResponse".
1242	Kind string `json:"kind,omitempty"`
1243
1244	// ServerResponse contains the HTTP response code and headers from the
1245	// server.
1246	googleapi.ServerResponse `json:"-"`
1247
1248	// ForceSendFields is a list of field names (e.g.
1249	// "AccountPermissionGroups") to unconditionally include in API
1250	// requests. By default, fields with empty values are omitted from API
1251	// requests. However, any non-pointer, non-interface field appearing in
1252	// ForceSendFields will be sent to the server regardless of whether the
1253	// field is empty or not. This may be used to include empty fields in
1254	// Patch requests.
1255	ForceSendFields []string `json:"-"`
1256
1257	// NullFields is a list of field names (e.g. "AccountPermissionGroups")
1258	// to include in API requests with the JSON null value. By default,
1259	// fields with empty values are omitted from API requests. However, any
1260	// field with an empty value appearing in NullFields will be sent to the
1261	// server as null. It is an error if a field in this list has a
1262	// non-empty value. This may be used to include null fields in Patch
1263	// requests.
1264	NullFields []string `json:"-"`
1265}
1266
1267func (s *AccountPermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
1268	type NoMethod AccountPermissionGroupsListResponse
1269	raw := NoMethod(*s)
1270	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1271}
1272
1273// AccountPermissionsListResponse: Account Permission List Response
1274type AccountPermissionsListResponse struct {
1275	// AccountPermissions: Account permission collection.
1276	AccountPermissions []*AccountPermission `json:"accountPermissions,omitempty"`
1277
1278	// Kind: Identifies what kind of resource this is. Value: the fixed
1279	// string "dfareporting#accountPermissionsListResponse".
1280	Kind string `json:"kind,omitempty"`
1281
1282	// ServerResponse contains the HTTP response code and headers from the
1283	// server.
1284	googleapi.ServerResponse `json:"-"`
1285
1286	// ForceSendFields is a list of field names (e.g. "AccountPermissions")
1287	// to unconditionally include in API requests. By default, fields with
1288	// empty values are omitted from API requests. However, any non-pointer,
1289	// non-interface field appearing in ForceSendFields will be sent to the
1290	// server regardless of whether the field is empty or not. This may be
1291	// used to include empty fields in Patch requests.
1292	ForceSendFields []string `json:"-"`
1293
1294	// NullFields is a list of field names (e.g. "AccountPermissions") to
1295	// include in API requests with the JSON null value. By default, fields
1296	// with empty values are omitted from API requests. However, any field
1297	// with an empty value appearing in NullFields will be sent to the
1298	// server as null. It is an error if a field in this list has a
1299	// non-empty value. This may be used to include null fields in Patch
1300	// requests.
1301	NullFields []string `json:"-"`
1302}
1303
1304func (s *AccountPermissionsListResponse) MarshalJSON() ([]byte, error) {
1305	type NoMethod AccountPermissionsListResponse
1306	raw := NoMethod(*s)
1307	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1308}
1309
1310// AccountUserProfile: AccountUserProfiles contains properties of a
1311// Campaign Manager user profile. This resource is specifically for
1312// managing user profiles, whereas UserProfiles is for accessing the
1313// API.
1314type AccountUserProfile struct {
1315	// AccountId: Account ID of the user profile. This is a read-only field
1316	// that can be left blank.
1317	AccountId int64 `json:"accountId,omitempty,string"`
1318
1319	// Active: Whether this user profile is active. This defaults to false,
1320	// and must be set true on insert for the user profile to be usable.
1321	Active bool `json:"active,omitempty"`
1322
1323	// AdvertiserFilter: Filter that describes which advertisers are visible
1324	// to the user profile.
1325	AdvertiserFilter *ObjectFilter `json:"advertiserFilter,omitempty"`
1326
1327	// CampaignFilter: Filter that describes which campaigns are visible to
1328	// the user profile.
1329	CampaignFilter *ObjectFilter `json:"campaignFilter,omitempty"`
1330
1331	// Comments: Comments for this user profile.
1332	Comments string `json:"comments,omitempty"`
1333
1334	// Email: Email of the user profile. The email addresss must be linked
1335	// to a Google Account. This field is required on insertion and is
1336	// read-only after insertion.
1337	Email string `json:"email,omitempty"`
1338
1339	// Id: ID of the user profile. This is a read-only, auto-generated
1340	// field.
1341	Id int64 `json:"id,omitempty,string"`
1342
1343	// Kind: Identifies what kind of resource this is. Value: the fixed
1344	// string "dfareporting#accountUserProfile".
1345	Kind string `json:"kind,omitempty"`
1346
1347	// Locale: Locale of the user profile. This is a required
1348	// field.
1349	// Acceptable values are:
1350	// - "cs" (Czech)
1351	// - "de" (German)
1352	// - "en" (English)
1353	// - "en-GB" (English United Kingdom)
1354	// - "es" (Spanish)
1355	// - "fr" (French)
1356	// - "it" (Italian)
1357	// - "ja" (Japanese)
1358	// - "ko" (Korean)
1359	// - "pl" (Polish)
1360	// - "pt-BR" (Portuguese Brazil)
1361	// - "ru" (Russian)
1362	// - "sv" (Swedish)
1363	// - "tr" (Turkish)
1364	// - "zh-CN" (Chinese Simplified)
1365	// - "zh-TW" (Chinese Traditional)
1366	Locale string `json:"locale,omitempty"`
1367
1368	// Name: Name of the user profile. This is a required field. Must be
1369	// less than 64 characters long, must be globally unique, and cannot
1370	// contain whitespace or any of the following characters: "&;"#%,".
1371	Name string `json:"name,omitempty"`
1372
1373	// SiteFilter: Filter that describes which sites are visible to the user
1374	// profile.
1375	SiteFilter *ObjectFilter `json:"siteFilter,omitempty"`
1376
1377	// SubaccountId: Subaccount ID of the user profile. This is a read-only
1378	// field that can be left blank.
1379	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1380
1381	// TraffickerType: Trafficker type of this user profile. This is a
1382	// read-only field.
1383	//
1384	// Possible values:
1385	//   "EXTERNAL_TRAFFICKER"
1386	//   "INTERNAL_NON_TRAFFICKER"
1387	//   "INTERNAL_TRAFFICKER"
1388	TraffickerType string `json:"traffickerType,omitempty"`
1389
1390	// UserAccessType: User type of the user profile. This is a read-only
1391	// field that can be left blank.
1392	//
1393	// Possible values:
1394	//   "INTERNAL_ADMINISTRATOR"
1395	//   "NORMAL_USER"
1396	//   "READ_ONLY_SUPER_USER"
1397	//   "SUPER_USER"
1398	UserAccessType string `json:"userAccessType,omitempty"`
1399
1400	// UserRoleFilter: Filter that describes which user roles are visible to
1401	// the user profile.
1402	UserRoleFilter *ObjectFilter `json:"userRoleFilter,omitempty"`
1403
1404	// UserRoleId: User role ID of the user profile. This is a required
1405	// field.
1406	UserRoleId int64 `json:"userRoleId,omitempty,string"`
1407
1408	// ServerResponse contains the HTTP response code and headers from the
1409	// server.
1410	googleapi.ServerResponse `json:"-"`
1411
1412	// ForceSendFields is a list of field names (e.g. "AccountId") to
1413	// unconditionally include in API requests. By default, fields with
1414	// empty values are omitted from API requests. However, any non-pointer,
1415	// non-interface field appearing in ForceSendFields will be sent to the
1416	// server regardless of whether the field is empty or not. This may be
1417	// used to include empty fields in Patch requests.
1418	ForceSendFields []string `json:"-"`
1419
1420	// NullFields is a list of field names (e.g. "AccountId") to include in
1421	// API requests with the JSON null value. By default, fields with empty
1422	// values are omitted from API requests. However, any field with an
1423	// empty value appearing in NullFields will be sent to the server as
1424	// null. It is an error if a field in this list has a non-empty value.
1425	// This may be used to include null fields in Patch requests.
1426	NullFields []string `json:"-"`
1427}
1428
1429func (s *AccountUserProfile) MarshalJSON() ([]byte, error) {
1430	type NoMethod AccountUserProfile
1431	raw := NoMethod(*s)
1432	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1433}
1434
1435// AccountUserProfilesListResponse: Account User Profile List Response
1436type AccountUserProfilesListResponse struct {
1437	// AccountUserProfiles: Account user profile collection.
1438	AccountUserProfiles []*AccountUserProfile `json:"accountUserProfiles,omitempty"`
1439
1440	// Kind: Identifies what kind of resource this is. Value: the fixed
1441	// string "dfareporting#accountUserProfilesListResponse".
1442	Kind string `json:"kind,omitempty"`
1443
1444	// NextPageToken: Pagination token to be used for the next list
1445	// operation.
1446	NextPageToken string `json:"nextPageToken,omitempty"`
1447
1448	// ServerResponse contains the HTTP response code and headers from the
1449	// server.
1450	googleapi.ServerResponse `json:"-"`
1451
1452	// ForceSendFields is a list of field names (e.g. "AccountUserProfiles")
1453	// to unconditionally include in API requests. By default, fields with
1454	// empty values are omitted from API requests. However, any non-pointer,
1455	// non-interface field appearing in ForceSendFields will be sent to the
1456	// server regardless of whether the field is empty or not. This may be
1457	// used to include empty fields in Patch requests.
1458	ForceSendFields []string `json:"-"`
1459
1460	// NullFields is a list of field names (e.g. "AccountUserProfiles") to
1461	// include in API requests with the JSON null value. By default, fields
1462	// with empty values are omitted from API requests. However, any field
1463	// with an empty value appearing in NullFields will be sent to the
1464	// server as null. It is an error if a field in this list has a
1465	// non-empty value. This may be used to include null fields in Patch
1466	// requests.
1467	NullFields []string `json:"-"`
1468}
1469
1470func (s *AccountUserProfilesListResponse) MarshalJSON() ([]byte, error) {
1471	type NoMethod AccountUserProfilesListResponse
1472	raw := NoMethod(*s)
1473	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1474}
1475
1476// AccountsListResponse: Account List Response
1477type AccountsListResponse struct {
1478	// Accounts: Account collection.
1479	Accounts []*Account `json:"accounts,omitempty"`
1480
1481	// Kind: Identifies what kind of resource this is. Value: the fixed
1482	// string "dfareporting#accountsListResponse".
1483	Kind string `json:"kind,omitempty"`
1484
1485	// NextPageToken: Pagination token to be used for the next list
1486	// operation.
1487	NextPageToken string `json:"nextPageToken,omitempty"`
1488
1489	// ServerResponse contains the HTTP response code and headers from the
1490	// server.
1491	googleapi.ServerResponse `json:"-"`
1492
1493	// ForceSendFields is a list of field names (e.g. "Accounts") to
1494	// unconditionally include in API requests. By default, fields with
1495	// empty values are omitted from API requests. However, any non-pointer,
1496	// non-interface field appearing in ForceSendFields will be sent to the
1497	// server regardless of whether the field is empty or not. This may be
1498	// used to include empty fields in Patch requests.
1499	ForceSendFields []string `json:"-"`
1500
1501	// NullFields is a list of field names (e.g. "Accounts") to include in
1502	// API requests with the JSON null value. By default, fields with empty
1503	// values are omitted from API requests. However, any field with an
1504	// empty value appearing in NullFields will be sent to the server as
1505	// null. It is an error if a field in this list has a non-empty value.
1506	// This may be used to include null fields in Patch requests.
1507	NullFields []string `json:"-"`
1508}
1509
1510func (s *AccountsListResponse) MarshalJSON() ([]byte, error) {
1511	type NoMethod AccountsListResponse
1512	raw := NoMethod(*s)
1513	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1514}
1515
1516// Activities: Represents an activity group.
1517type Activities struct {
1518	// Filters: List of activity filters. The dimension values need to be
1519	// all either of type "dfa:activity" or "dfa:activityGroup".
1520	Filters []*DimensionValue `json:"filters,omitempty"`
1521
1522	// Kind: The kind of resource this is, in this case
1523	// dfareporting#activities.
1524	Kind string `json:"kind,omitempty"`
1525
1526	// MetricNames: List of names of floodlight activity metrics.
1527	MetricNames []string `json:"metricNames,omitempty"`
1528
1529	// ForceSendFields is a list of field names (e.g. "Filters") to
1530	// unconditionally include in API requests. By default, fields with
1531	// empty values are omitted from API requests. However, any non-pointer,
1532	// non-interface field appearing in ForceSendFields will be sent to the
1533	// server regardless of whether the field is empty or not. This may be
1534	// used to include empty fields in Patch requests.
1535	ForceSendFields []string `json:"-"`
1536
1537	// NullFields is a list of field names (e.g. "Filters") to include in
1538	// API requests with the JSON null value. By default, fields with empty
1539	// values are omitted from API requests. However, any field with an
1540	// empty value appearing in NullFields will be sent to the server as
1541	// null. It is an error if a field in this list has a non-empty value.
1542	// This may be used to include null fields in Patch requests.
1543	NullFields []string `json:"-"`
1544}
1545
1546func (s *Activities) MarshalJSON() ([]byte, error) {
1547	type NoMethod Activities
1548	raw := NoMethod(*s)
1549	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1550}
1551
1552// Ad: Contains properties of a Campaign Manager ad.
1553type Ad struct {
1554	// AccountId: Account ID of this ad. This is a read-only field that can
1555	// be left blank.
1556	AccountId int64 `json:"accountId,omitempty,string"`
1557
1558	// Active: Whether this ad is active. When true, archived must be false.
1559	Active bool `json:"active,omitempty"`
1560
1561	// AdvertiserId: Advertiser ID of this ad. This is a required field on
1562	// insertion.
1563	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
1564
1565	// AdvertiserIdDimensionValue: Dimension value for the ID of the
1566	// advertiser. This is a read-only, auto-generated field.
1567	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
1568
1569	// Archived: Whether this ad is archived. When true, active must be
1570	// false.
1571	Archived bool `json:"archived,omitempty"`
1572
1573	// AudienceSegmentId: Audience segment ID that is being targeted for
1574	// this ad. Applicable when type is AD_SERVING_STANDARD_AD.
1575	AudienceSegmentId int64 `json:"audienceSegmentId,omitempty,string"`
1576
1577	// CampaignId: Campaign ID of this ad. This is a required field on
1578	// insertion.
1579	CampaignId int64 `json:"campaignId,omitempty,string"`
1580
1581	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
1582	// This is a read-only, auto-generated field.
1583	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
1584
1585	// ClickThroughUrl: Click-through URL for this ad. This is a required
1586	// field on insertion. Applicable when type is AD_SERVING_CLICK_TRACKER.
1587	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
1588
1589	// ClickThroughUrlSuffixProperties: Click-through URL suffix properties
1590	// for this ad. Applies to the URL in the ad or (if overriding ad
1591	// properties) the URL in the creative.
1592	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
1593
1594	// Comments: Comments for this ad.
1595	Comments string `json:"comments,omitempty"`
1596
1597	// Compatibility: Compatibility of this ad. Applicable when type is
1598	// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
1599	// either rendering on desktop or on mobile devices or in mobile apps
1600	// for regular or interstitial ads, respectively. APP and
1601	// APP_INTERSTITIAL are only used for existing default ads. New mobile
1602	// placements must be assigned DISPLAY or DISPLAY_INTERSTITIAL and
1603	// default ads created for those placements will be limited to those
1604	// compatibility types. IN_STREAM_VIDEO refers to rendering in-stream
1605	// video ads developed with the VAST standard.
1606	//
1607	// Possible values:
1608	//   "APP"
1609	//   "APP_INTERSTITIAL"
1610	//   "DISPLAY"
1611	//   "DISPLAY_INTERSTITIAL"
1612	//   "IN_STREAM_AUDIO"
1613	//   "IN_STREAM_VIDEO"
1614	Compatibility string `json:"compatibility,omitempty"`
1615
1616	// CreateInfo: Information about the creation of this ad. This is a
1617	// read-only field.
1618	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
1619
1620	// CreativeGroupAssignments: Creative group assignments for this ad.
1621	// Applicable when type is AD_SERVING_CLICK_TRACKER. Only one assignment
1622	// per creative group number is allowed for a maximum of two
1623	// assignments.
1624	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
1625
1626	// CreativeRotation: Creative rotation for this ad. Applicable when type
1627	// is AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or
1628	// AD_SERVING_TRACKING. When type is AD_SERVING_DEFAULT_AD, this field
1629	// should have exactly one creativeAssignment.
1630	CreativeRotation *CreativeRotation `json:"creativeRotation,omitempty"`
1631
1632	// DayPartTargeting: Time and day targeting information for this ad.
1633	// This field must be left blank if the ad is using a targeting
1634	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1635	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
1636
1637	// DefaultClickThroughEventTagProperties: Default click-through event
1638	// tag properties for this ad.
1639	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
1640
1641	// DeliverySchedule: Delivery schedule information for this ad.
1642	// Applicable when type is AD_SERVING_STANDARD_AD or
1643	// AD_SERVING_TRACKING. This field along with subfields priority and
1644	// impressionRatio are required on insertion when type is
1645	// AD_SERVING_STANDARD_AD.
1646	DeliverySchedule *DeliverySchedule `json:"deliverySchedule,omitempty"`
1647
1648	// DynamicClickTracker: Whether this ad is a dynamic click tracker.
1649	// Applicable when type is AD_SERVING_CLICK_TRACKER. This is a required
1650	// field on insert, and is read-only after insert.
1651	DynamicClickTracker bool `json:"dynamicClickTracker,omitempty"`
1652
1653	// EndTime: Date and time that this ad should stop serving. Must be
1654	// later than the start time. This is a required field on insertion.
1655	EndTime string `json:"endTime,omitempty"`
1656
1657	// EventTagOverrides: Event tag overrides for this ad.
1658	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
1659
1660	// GeoTargeting: Geographical targeting information for this ad. This
1661	// field must be left blank if the ad is using a targeting template.
1662	// Applicable when type is AD_SERVING_STANDARD_AD.
1663	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
1664
1665	// Id: ID of this ad. This is a read-only, auto-generated field.
1666	Id int64 `json:"id,omitempty,string"`
1667
1668	// IdDimensionValue: Dimension value for the ID of this ad. This is a
1669	// read-only, auto-generated field.
1670	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1671
1672	// KeyValueTargetingExpression: Key-value targeting information for this
1673	// 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	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
1676
1677	// Kind: Identifies what kind of resource this is. Value: the fixed
1678	// string "dfareporting#ad".
1679	Kind string `json:"kind,omitempty"`
1680
1681	// LanguageTargeting: Language targeting information for this ad. This
1682	// field must be left blank if the ad is using a targeting template.
1683	// Applicable when type is AD_SERVING_STANDARD_AD.
1684	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
1685
1686	// LastModifiedInfo: Information about the most recent modification of
1687	// this ad. This is a read-only field.
1688	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
1689
1690	// Name: Name of this ad. This is a required field and must be less than
1691	// 256 characters long.
1692	Name string `json:"name,omitempty"`
1693
1694	// PlacementAssignments: Placement assignments for this ad.
1695	PlacementAssignments []*PlacementAssignment `json:"placementAssignments,omitempty"`
1696
1697	// RemarketingListExpression: Remarketing list targeting expression for
1698	// this ad. This field must be left blank if the ad is using a targeting
1699	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1700	RemarketingListExpression *ListTargetingExpression `json:"remarketingListExpression,omitempty"`
1701
1702	// Size: Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD.
1703	Size *Size `json:"size,omitempty"`
1704
1705	// SslCompliant: Whether this ad is ssl compliant. This is a read-only
1706	// field that is auto-generated when the ad is inserted or updated.
1707	SslCompliant bool `json:"sslCompliant,omitempty"`
1708
1709	// SslRequired: Whether this ad requires ssl. This is a read-only field
1710	// that is auto-generated when the ad is inserted or updated.
1711	SslRequired bool `json:"sslRequired,omitempty"`
1712
1713	// StartTime: Date and time that this ad should start serving. If
1714	// creating an ad, this field must be a time in the future. This is a
1715	// required field on insertion.
1716	StartTime string `json:"startTime,omitempty"`
1717
1718	// SubaccountId: Subaccount ID of this ad. This is a read-only field
1719	// that can be left blank.
1720	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1721
1722	// TargetingTemplateId: Targeting template ID, used to apply
1723	// preconfigured targeting information to this ad. This cannot be set
1724	// while any of dayPartTargeting, geoTargeting,
1725	// keyValueTargetingExpression, languageTargeting,
1726	// remarketingListExpression, or technologyTargeting are set. Applicable
1727	// when type is AD_SERVING_STANDARD_AD.
1728	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
1729
1730	// TechnologyTargeting: Technology platform targeting information for
1731	// this ad. This field must be left blank if the ad is using a targeting
1732	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1733	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
1734
1735	// Type: Type of ad. This is a required field on insertion. Note that
1736	// default ads (AD_SERVING_DEFAULT_AD) cannot be created directly (see
1737	// Creative resource).
1738	//
1739	// Possible values:
1740	//   "AD_SERVING_CLICK_TRACKER"
1741	//   "AD_SERVING_DEFAULT_AD"
1742	//   "AD_SERVING_STANDARD_AD"
1743	//   "AD_SERVING_TRACKING"
1744	Type string `json:"type,omitempty"`
1745
1746	// ServerResponse contains the HTTP response code and headers from the
1747	// server.
1748	googleapi.ServerResponse `json:"-"`
1749
1750	// ForceSendFields is a list of field names (e.g. "AccountId") to
1751	// unconditionally include in API requests. By default, fields with
1752	// empty values are omitted from API requests. However, any non-pointer,
1753	// non-interface field appearing in ForceSendFields will be sent to the
1754	// server regardless of whether the field is empty or not. This may be
1755	// used to include empty fields in Patch requests.
1756	ForceSendFields []string `json:"-"`
1757
1758	// NullFields is a list of field names (e.g. "AccountId") to include in
1759	// API requests with the JSON null value. By default, fields with empty
1760	// values are omitted from API requests. However, any field with an
1761	// empty value appearing in NullFields will be sent to the server as
1762	// null. It is an error if a field in this list has a non-empty value.
1763	// This may be used to include null fields in Patch requests.
1764	NullFields []string `json:"-"`
1765}
1766
1767func (s *Ad) MarshalJSON() ([]byte, error) {
1768	type NoMethod Ad
1769	raw := NoMethod(*s)
1770	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1771}
1772
1773// AdBlockingConfiguration: Campaign ad blocking settings.
1774type AdBlockingConfiguration struct {
1775	// ClickThroughUrl: Click-through URL used by brand-neutral ads. This is
1776	// a required field when overrideClickThroughUrl is set to true.
1777	ClickThroughUrl string `json:"clickThroughUrl,omitempty"`
1778
1779	// CreativeBundleId: ID of a creative bundle to use for this campaign.
1780	// If set, brand-neutral ads will select creatives from this bundle.
1781	// Otherwise, a default transparent pixel will be used.
1782	CreativeBundleId int64 `json:"creativeBundleId,omitempty,string"`
1783
1784	// Enabled: Whether this campaign has enabled ad blocking. When true, ad
1785	// blocking is enabled for placements in the campaign, but this may be
1786	// overridden by site and placement settings. When false, ad blocking is
1787	// disabled for all placements under the campaign, regardless of site
1788	// and placement settings.
1789	Enabled bool `json:"enabled,omitempty"`
1790
1791	// OverrideClickThroughUrl: Whether the brand-neutral ad's click-through
1792	// URL comes from the campaign's creative bundle or the override URL.
1793	// Must be set to true if ad blocking is enabled and no creative bundle
1794	// is configured.
1795	OverrideClickThroughUrl bool `json:"overrideClickThroughUrl,omitempty"`
1796
1797	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
1798	// unconditionally include in API requests. By default, fields with
1799	// empty values are omitted from API requests. However, any non-pointer,
1800	// non-interface field appearing in ForceSendFields will be sent to the
1801	// server regardless of whether the field is empty or not. This may be
1802	// used to include empty fields in Patch requests.
1803	ForceSendFields []string `json:"-"`
1804
1805	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
1806	// include in API requests with the JSON null value. By default, fields
1807	// with empty values are omitted from API requests. However, any field
1808	// with an empty value appearing in NullFields will be sent to the
1809	// server as null. It is an error if a field in this list has a
1810	// non-empty value. This may be used to include null fields in Patch
1811	// requests.
1812	NullFields []string `json:"-"`
1813}
1814
1815func (s *AdBlockingConfiguration) MarshalJSON() ([]byte, error) {
1816	type NoMethod AdBlockingConfiguration
1817	raw := NoMethod(*s)
1818	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1819}
1820
1821// AdSlot: Ad Slot
1822type AdSlot struct {
1823	// Comment: Comment for this ad slot.
1824	Comment string `json:"comment,omitempty"`
1825
1826	// Compatibility: Ad slot compatibility. DISPLAY and
1827	// DISPLAY_INTERSTITIAL refer to rendering either on desktop, mobile
1828	// devices or in mobile apps for regular or interstitial ads
1829	// respectively. APP and APP_INTERSTITIAL are for rendering in mobile
1830	// apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads
1831	// developed with the VAST standard.
1832	//
1833	// Possible values:
1834	//   "APP"
1835	//   "APP_INTERSTITIAL"
1836	//   "DISPLAY"
1837	//   "DISPLAY_INTERSTITIAL"
1838	//   "IN_STREAM_AUDIO"
1839	//   "IN_STREAM_VIDEO"
1840	Compatibility string `json:"compatibility,omitempty"`
1841
1842	// Height: Height of this ad slot.
1843	Height int64 `json:"height,omitempty,string"`
1844
1845	// LinkedPlacementId: ID of the placement from an external platform that
1846	// is linked to this ad slot.
1847	LinkedPlacementId int64 `json:"linkedPlacementId,omitempty,string"`
1848
1849	// Name: Name of this ad slot.
1850	Name string `json:"name,omitempty"`
1851
1852	// PaymentSourceType: Payment source type of this ad slot.
1853	//
1854	// Possible values:
1855	//   "PLANNING_PAYMENT_SOURCE_TYPE_AGENCY_PAID"
1856	//   "PLANNING_PAYMENT_SOURCE_TYPE_PUBLISHER_PAID"
1857	PaymentSourceType string `json:"paymentSourceType,omitempty"`
1858
1859	// Primary: Primary ad slot of a roadblock inventory item.
1860	Primary bool `json:"primary,omitempty"`
1861
1862	// Width: Width of this ad slot.
1863	Width int64 `json:"width,omitempty,string"`
1864
1865	// ForceSendFields is a list of field names (e.g. "Comment") to
1866	// unconditionally include in API requests. By default, fields with
1867	// empty values are omitted from API requests. However, any non-pointer,
1868	// non-interface field appearing in ForceSendFields will be sent to the
1869	// server regardless of whether the field is empty or not. This may be
1870	// used to include empty fields in Patch requests.
1871	ForceSendFields []string `json:"-"`
1872
1873	// NullFields is a list of field names (e.g. "Comment") to include in
1874	// API requests with the JSON null value. By default, fields with empty
1875	// values are omitted from API requests. However, any field with an
1876	// empty value appearing in NullFields will be sent to the server as
1877	// null. It is an error if a field in this list has a non-empty value.
1878	// This may be used to include null fields in Patch requests.
1879	NullFields []string `json:"-"`
1880}
1881
1882func (s *AdSlot) MarshalJSON() ([]byte, error) {
1883	type NoMethod AdSlot
1884	raw := NoMethod(*s)
1885	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1886}
1887
1888// AdsListResponse: Ad List Response
1889type AdsListResponse struct {
1890	// Ads: Ad collection.
1891	Ads []*Ad `json:"ads,omitempty"`
1892
1893	// Kind: Identifies what kind of resource this is. Value: the fixed
1894	// string "dfareporting#adsListResponse".
1895	Kind string `json:"kind,omitempty"`
1896
1897	// NextPageToken: Pagination token to be used for the next list
1898	// operation.
1899	NextPageToken string `json:"nextPageToken,omitempty"`
1900
1901	// ServerResponse contains the HTTP response code and headers from the
1902	// server.
1903	googleapi.ServerResponse `json:"-"`
1904
1905	// ForceSendFields is a list of field names (e.g. "Ads") to
1906	// unconditionally include in API requests. By default, fields with
1907	// empty values are omitted from API requests. However, any non-pointer,
1908	// non-interface field appearing in ForceSendFields will be sent to the
1909	// server regardless of whether the field is empty or not. This may be
1910	// used to include empty fields in Patch requests.
1911	ForceSendFields []string `json:"-"`
1912
1913	// NullFields is a list of field names (e.g. "Ads") to include in API
1914	// requests with the JSON null value. By default, fields with empty
1915	// values are omitted from API requests. However, any field with an
1916	// empty value appearing in NullFields will be sent to the server as
1917	// null. It is an error if a field in this list has a non-empty value.
1918	// This may be used to include null fields in Patch requests.
1919	NullFields []string `json:"-"`
1920}
1921
1922func (s *AdsListResponse) MarshalJSON() ([]byte, error) {
1923	type NoMethod AdsListResponse
1924	raw := NoMethod(*s)
1925	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1926}
1927
1928// Advertiser: Contains properties of a Campaign Manager advertiser.
1929type Advertiser struct {
1930	// AccountId: Account ID of this advertiser.This is a read-only field
1931	// that can be left blank.
1932	AccountId int64 `json:"accountId,omitempty,string"`
1933
1934	// AdvertiserGroupId: ID of the advertiser group this advertiser belongs
1935	// to. You can group advertisers for reporting purposes, allowing you to
1936	// see aggregated information for all advertisers in each group.
1937	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
1938
1939	// ClickThroughUrlSuffix: Suffix added to click-through URL of ad
1940	// creative associations under this advertiser. Must be less than 129
1941	// characters long.
1942	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
1943
1944	// DefaultClickThroughEventTagId: ID of the click-through event tag to
1945	// apply by default to the landing pages of this advertiser's campaigns.
1946	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
1947
1948	// DefaultEmail: Default email address used in sender field for tag
1949	// emails.
1950	DefaultEmail string `json:"defaultEmail,omitempty"`
1951
1952	// FloodlightConfigurationId: Floodlight configuration ID of this
1953	// advertiser. The floodlight configuration ID will be created
1954	// automatically, so on insert this field should be left blank. This
1955	// field can be set to another advertiser's floodlight configuration ID
1956	// in order to share that advertiser's floodlight configuration with
1957	// this advertiser, so long as:
1958	// - This advertiser's original floodlight configuration is not already
1959	// associated with floodlight activities or floodlight activity groups.
1960	//
1961	// - This advertiser's original floodlight configuration is not already
1962	// shared with another advertiser.
1963	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
1964
1965	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
1966	// of the floodlight configuration. This is a read-only, auto-generated
1967	// field.
1968	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
1969
1970	// Id: ID of this advertiser. This is a read-only, auto-generated field.
1971	Id int64 `json:"id,omitempty,string"`
1972
1973	// IdDimensionValue: Dimension value for the ID of this advertiser. This
1974	// is a read-only, auto-generated field.
1975	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1976
1977	// Kind: Identifies what kind of resource this is. Value: the fixed
1978	// string "dfareporting#advertiser".
1979	Kind string `json:"kind,omitempty"`
1980
1981	// Name: Name of this advertiser. This is a required field and must be
1982	// less than 256 characters long and unique among advertisers of the
1983	// same account.
1984	Name string `json:"name,omitempty"`
1985
1986	// OriginalFloodlightConfigurationId: Original floodlight configuration
1987	// before any sharing occurred. Set the floodlightConfigurationId of
1988	// this advertiser to originalFloodlightConfigurationId to unshare the
1989	// advertiser's current floodlight configuration. You cannot unshare an
1990	// advertiser's floodlight configuration if the shared configuration has
1991	// activities associated with any campaign or placement.
1992	OriginalFloodlightConfigurationId int64 `json:"originalFloodlightConfigurationId,omitempty,string"`
1993
1994	// Status: Status of this advertiser.
1995	//
1996	// Possible values:
1997	//   "APPROVED"
1998	//   "ON_HOLD"
1999	Status string `json:"status,omitempty"`
2000
2001	// SubaccountId: Subaccount ID of this advertiser.This is a read-only
2002	// field that can be left blank.
2003	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2004
2005	// Suspended: Suspension status of this advertiser.
2006	Suspended bool `json:"suspended,omitempty"`
2007
2008	// ServerResponse contains the HTTP response code and headers from the
2009	// server.
2010	googleapi.ServerResponse `json:"-"`
2011
2012	// ForceSendFields is a list of field names (e.g. "AccountId") to
2013	// unconditionally include in API requests. By default, fields with
2014	// empty values are omitted from API requests. However, any non-pointer,
2015	// non-interface field appearing in ForceSendFields will be sent to the
2016	// server regardless of whether the field is empty or not. This may be
2017	// used to include empty fields in Patch requests.
2018	ForceSendFields []string `json:"-"`
2019
2020	// NullFields is a list of field names (e.g. "AccountId") to include in
2021	// API requests with the JSON null value. By default, fields with empty
2022	// values are omitted from API requests. However, any field with an
2023	// empty value appearing in NullFields will be sent to the server as
2024	// null. It is an error if a field in this list has a non-empty value.
2025	// This may be used to include null fields in Patch requests.
2026	NullFields []string `json:"-"`
2027}
2028
2029func (s *Advertiser) MarshalJSON() ([]byte, error) {
2030	type NoMethod Advertiser
2031	raw := NoMethod(*s)
2032	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2033}
2034
2035// AdvertiserGroup: Groups advertisers together so that reports can be
2036// generated for the entire group at once.
2037type AdvertiserGroup struct {
2038	// AccountId: Account ID of this advertiser group. This is a read-only
2039	// field that can be left blank.
2040	AccountId int64 `json:"accountId,omitempty,string"`
2041
2042	// Id: ID of this advertiser group. This is a read-only, auto-generated
2043	// field.
2044	Id int64 `json:"id,omitempty,string"`
2045
2046	// Kind: Identifies what kind of resource this is. Value: the fixed
2047	// string "dfareporting#advertiserGroup".
2048	Kind string `json:"kind,omitempty"`
2049
2050	// Name: Name of this advertiser group. This is a required field and
2051	// must be less than 256 characters long and unique among advertiser
2052	// groups of the same account.
2053	Name string `json:"name,omitempty"`
2054
2055	// ServerResponse contains the HTTP response code and headers from the
2056	// server.
2057	googleapi.ServerResponse `json:"-"`
2058
2059	// ForceSendFields is a list of field names (e.g. "AccountId") to
2060	// unconditionally include in API requests. By default, fields with
2061	// empty values are omitted from API requests. However, any non-pointer,
2062	// non-interface field appearing in ForceSendFields will be sent to the
2063	// server regardless of whether the field is empty or not. This may be
2064	// used to include empty fields in Patch requests.
2065	ForceSendFields []string `json:"-"`
2066
2067	// NullFields is a list of field names (e.g. "AccountId") to include in
2068	// API requests with the JSON null value. By default, fields with empty
2069	// values are omitted from API requests. However, any field with an
2070	// empty value appearing in NullFields will be sent to the server as
2071	// null. It is an error if a field in this list has a non-empty value.
2072	// This may be used to include null fields in Patch requests.
2073	NullFields []string `json:"-"`
2074}
2075
2076func (s *AdvertiserGroup) MarshalJSON() ([]byte, error) {
2077	type NoMethod AdvertiserGroup
2078	raw := NoMethod(*s)
2079	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2080}
2081
2082// AdvertiserGroupsListResponse: Advertiser Group List Response
2083type AdvertiserGroupsListResponse struct {
2084	// AdvertiserGroups: Advertiser group collection.
2085	AdvertiserGroups []*AdvertiserGroup `json:"advertiserGroups,omitempty"`
2086
2087	// Kind: Identifies what kind of resource this is. Value: the fixed
2088	// string "dfareporting#advertiserGroupsListResponse".
2089	Kind string `json:"kind,omitempty"`
2090
2091	// NextPageToken: Pagination token to be used for the next list
2092	// operation.
2093	NextPageToken string `json:"nextPageToken,omitempty"`
2094
2095	// ServerResponse contains the HTTP response code and headers from the
2096	// server.
2097	googleapi.ServerResponse `json:"-"`
2098
2099	// ForceSendFields is a list of field names (e.g. "AdvertiserGroups") to
2100	// unconditionally include in API requests. By default, fields with
2101	// empty values are omitted from API requests. However, any non-pointer,
2102	// non-interface field appearing in ForceSendFields will be sent to the
2103	// server regardless of whether the field is empty or not. This may be
2104	// used to include empty fields in Patch requests.
2105	ForceSendFields []string `json:"-"`
2106
2107	// NullFields is a list of field names (e.g. "AdvertiserGroups") to
2108	// include in API requests with the JSON null value. By default, fields
2109	// with empty values are omitted from API requests. However, any field
2110	// with an empty value appearing in NullFields will be sent to the
2111	// server as null. It is an error if a field in this list has a
2112	// non-empty value. This may be used to include null fields in Patch
2113	// requests.
2114	NullFields []string `json:"-"`
2115}
2116
2117func (s *AdvertiserGroupsListResponse) MarshalJSON() ([]byte, error) {
2118	type NoMethod AdvertiserGroupsListResponse
2119	raw := NoMethod(*s)
2120	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2121}
2122
2123// AdvertiserLandingPagesListResponse: Landing Page List Response
2124type AdvertiserLandingPagesListResponse struct {
2125	// Kind: Identifies what kind of resource this is. Value: the fixed
2126	// string "dfareporting#advertiserLandingPagesListResponse".
2127	Kind string `json:"kind,omitempty"`
2128
2129	// LandingPages: Landing page collection
2130	LandingPages []*LandingPage `json:"landingPages,omitempty"`
2131
2132	// NextPageToken: Pagination token to be used for the next list
2133	// operation.
2134	NextPageToken string `json:"nextPageToken,omitempty"`
2135
2136	// ServerResponse contains the HTTP response code and headers from the
2137	// server.
2138	googleapi.ServerResponse `json:"-"`
2139
2140	// ForceSendFields is a list of field names (e.g. "Kind") to
2141	// unconditionally include in API requests. By default, fields with
2142	// empty values are omitted from API requests. However, any non-pointer,
2143	// non-interface field appearing in ForceSendFields will be sent to the
2144	// server regardless of whether the field is empty or not. This may be
2145	// used to include empty fields in Patch requests.
2146	ForceSendFields []string `json:"-"`
2147
2148	// NullFields is a list of field names (e.g. "Kind") to include in API
2149	// requests with the JSON null value. By default, fields with empty
2150	// values are omitted from API requests. However, any field with an
2151	// empty value appearing in NullFields will be sent to the server as
2152	// null. It is an error if a field in this list has a non-empty value.
2153	// This may be used to include null fields in Patch requests.
2154	NullFields []string `json:"-"`
2155}
2156
2157func (s *AdvertiserLandingPagesListResponse) MarshalJSON() ([]byte, error) {
2158	type NoMethod AdvertiserLandingPagesListResponse
2159	raw := NoMethod(*s)
2160	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2161}
2162
2163// AdvertisersListResponse: Advertiser List Response
2164type AdvertisersListResponse struct {
2165	// Advertisers: Advertiser collection.
2166	Advertisers []*Advertiser `json:"advertisers,omitempty"`
2167
2168	// Kind: Identifies what kind of resource this is. Value: the fixed
2169	// string "dfareporting#advertisersListResponse".
2170	Kind string `json:"kind,omitempty"`
2171
2172	// NextPageToken: Pagination token to be used for the next list
2173	// operation.
2174	NextPageToken string `json:"nextPageToken,omitempty"`
2175
2176	// ServerResponse contains the HTTP response code and headers from the
2177	// server.
2178	googleapi.ServerResponse `json:"-"`
2179
2180	// ForceSendFields is a list of field names (e.g. "Advertisers") to
2181	// unconditionally include in API requests. By default, fields with
2182	// empty values are omitted from API requests. However, any non-pointer,
2183	// non-interface field appearing in ForceSendFields will be sent to the
2184	// server regardless of whether the field is empty or not. This may be
2185	// used to include empty fields in Patch requests.
2186	ForceSendFields []string `json:"-"`
2187
2188	// NullFields is a list of field names (e.g. "Advertisers") to include
2189	// in API requests with the JSON null value. By default, fields with
2190	// empty values are omitted from API requests. However, any field with
2191	// an empty value appearing in NullFields will be sent to the server as
2192	// null. It is an error if a field in this list has a non-empty value.
2193	// This may be used to include null fields in Patch requests.
2194	NullFields []string `json:"-"`
2195}
2196
2197func (s *AdvertisersListResponse) MarshalJSON() ([]byte, error) {
2198	type NoMethod AdvertisersListResponse
2199	raw := NoMethod(*s)
2200	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2201}
2202
2203// AudienceSegment: Audience Segment.
2204type AudienceSegment struct {
2205	// Allocation: Weight allocated to this segment. The weight assigned
2206	// will be understood in proportion to the weights assigned to other
2207	// segments in the same segment group. Acceptable values are 1 to 1000,
2208	// inclusive.
2209	Allocation int64 `json:"allocation,omitempty"`
2210
2211	// Id: ID of this audience segment. This is a read-only, auto-generated
2212	// field.
2213	Id int64 `json:"id,omitempty,string"`
2214
2215	// Name: Name of this audience segment. This is a required field and
2216	// must be less than 65 characters long.
2217	Name string `json:"name,omitempty"`
2218
2219	// ForceSendFields is a list of field names (e.g. "Allocation") to
2220	// unconditionally include in API requests. By default, fields with
2221	// empty values are omitted from API requests. However, any non-pointer,
2222	// non-interface field appearing in ForceSendFields will be sent to the
2223	// server regardless of whether the field is empty or not. This may be
2224	// used to include empty fields in Patch requests.
2225	ForceSendFields []string `json:"-"`
2226
2227	// NullFields is a list of field names (e.g. "Allocation") to include in
2228	// API requests with the JSON null value. By default, fields with empty
2229	// values are omitted from API requests. However, any field with an
2230	// empty value appearing in NullFields will be sent to the server as
2231	// null. It is an error if a field in this list has a non-empty value.
2232	// This may be used to include null fields in Patch requests.
2233	NullFields []string `json:"-"`
2234}
2235
2236func (s *AudienceSegment) MarshalJSON() ([]byte, error) {
2237	type NoMethod AudienceSegment
2238	raw := NoMethod(*s)
2239	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2240}
2241
2242// AudienceSegmentGroup: Audience Segment Group.
2243type AudienceSegmentGroup struct {
2244	// AudienceSegments: Audience segments assigned to this group. The
2245	// number of segments must be between 2 and 100.
2246	AudienceSegments []*AudienceSegment `json:"audienceSegments,omitempty"`
2247
2248	// Id: ID of this audience segment group. This is a read-only,
2249	// auto-generated field.
2250	Id int64 `json:"id,omitempty,string"`
2251
2252	// Name: Name of this audience segment group. This is a required field
2253	// and must be less than 65 characters long.
2254	Name string `json:"name,omitempty"`
2255
2256	// ForceSendFields is a list of field names (e.g. "AudienceSegments") to
2257	// unconditionally include in API requests. By default, fields with
2258	// empty values are omitted from API requests. However, any non-pointer,
2259	// non-interface field appearing in ForceSendFields will be sent to the
2260	// server regardless of whether the field is empty or not. This may be
2261	// used to include empty fields in Patch requests.
2262	ForceSendFields []string `json:"-"`
2263
2264	// NullFields is a list of field names (e.g. "AudienceSegments") to
2265	// include in API requests with the JSON null value. By default, fields
2266	// with empty values are omitted from API requests. However, any field
2267	// with an empty value appearing in NullFields will be sent to the
2268	// server as null. It is an error if a field in this list has a
2269	// non-empty value. This may be used to include null fields in Patch
2270	// requests.
2271	NullFields []string `json:"-"`
2272}
2273
2274func (s *AudienceSegmentGroup) MarshalJSON() ([]byte, error) {
2275	type NoMethod AudienceSegmentGroup
2276	raw := NoMethod(*s)
2277	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2278}
2279
2280// Browser: Contains information about a browser that can be targeted by
2281// ads.
2282type Browser struct {
2283	// BrowserVersionId: ID referring to this grouping of browser and
2284	// version numbers. This is the ID used for targeting.
2285	BrowserVersionId int64 `json:"browserVersionId,omitempty,string"`
2286
2287	// DartId: DART ID of this browser. This is the ID used when generating
2288	// reports.
2289	DartId int64 `json:"dartId,omitempty,string"`
2290
2291	// Kind: Identifies what kind of resource this is. Value: the fixed
2292	// string "dfareporting#browser".
2293	Kind string `json:"kind,omitempty"`
2294
2295	// MajorVersion: Major version number (leftmost number) of this browser.
2296	// For example, for Chrome 5.0.376.86 beta, this field should be set to
2297	// 5. An asterisk (*) may be used to target any version number, and a
2298	// question mark (?) may be used to target cases where the version
2299	// number cannot be identified. For example, Chrome *.* targets any
2300	// version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2301	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2302	// server knows the browser is Firefox but can't tell which version it
2303	// is.
2304	MajorVersion string `json:"majorVersion,omitempty"`
2305
2306	// MinorVersion: Minor version number (number after first dot on left)
2307	// of this browser. For example, for Chrome 5.0.375.86 beta, this field
2308	// should be set to 0. An asterisk (*) may be used to target any version
2309	// number, and a question mark (?) may be used to target cases where the
2310	// version number cannot be identified. For example, Chrome *.* targets
2311	// any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2312	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2313	// server knows the browser is Firefox but can't tell which version it
2314	// is.
2315	MinorVersion string `json:"minorVersion,omitempty"`
2316
2317	// Name: Name of this browser.
2318	Name string `json:"name,omitempty"`
2319
2320	// ForceSendFields is a list of field names (e.g. "BrowserVersionId") to
2321	// unconditionally include in API requests. By default, fields with
2322	// empty values are omitted from API requests. However, any non-pointer,
2323	// non-interface field appearing in ForceSendFields will be sent to the
2324	// server regardless of whether the field is empty or not. This may be
2325	// used to include empty fields in Patch requests.
2326	ForceSendFields []string `json:"-"`
2327
2328	// NullFields is a list of field names (e.g. "BrowserVersionId") to
2329	// include in API requests with the JSON null value. By default, fields
2330	// with empty values are omitted from API requests. However, any field
2331	// with an empty value appearing in NullFields will be sent to the
2332	// server as null. It is an error if a field in this list has a
2333	// non-empty value. This may be used to include null fields in Patch
2334	// requests.
2335	NullFields []string `json:"-"`
2336}
2337
2338func (s *Browser) MarshalJSON() ([]byte, error) {
2339	type NoMethod Browser
2340	raw := NoMethod(*s)
2341	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2342}
2343
2344// BrowsersListResponse: Browser List Response
2345type BrowsersListResponse struct {
2346	// Browsers: Browser collection.
2347	Browsers []*Browser `json:"browsers,omitempty"`
2348
2349	// Kind: Identifies what kind of resource this is. Value: the fixed
2350	// string "dfareporting#browsersListResponse".
2351	Kind string `json:"kind,omitempty"`
2352
2353	// ServerResponse contains the HTTP response code and headers from the
2354	// server.
2355	googleapi.ServerResponse `json:"-"`
2356
2357	// ForceSendFields is a list of field names (e.g. "Browsers") to
2358	// unconditionally include in API requests. By default, fields with
2359	// empty values are omitted from API requests. However, any non-pointer,
2360	// non-interface field appearing in ForceSendFields will be sent to the
2361	// server regardless of whether the field is empty or not. This may be
2362	// used to include empty fields in Patch requests.
2363	ForceSendFields []string `json:"-"`
2364
2365	// NullFields is a list of field names (e.g. "Browsers") to include in
2366	// API requests with the JSON null value. By default, fields with empty
2367	// values are omitted from API requests. However, any field with an
2368	// empty value appearing in NullFields will be sent to the server as
2369	// null. It is an error if a field in this list has a non-empty value.
2370	// This may be used to include null fields in Patch requests.
2371	NullFields []string `json:"-"`
2372}
2373
2374func (s *BrowsersListResponse) MarshalJSON() ([]byte, error) {
2375	type NoMethod BrowsersListResponse
2376	raw := NoMethod(*s)
2377	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2378}
2379
2380// Campaign: Contains properties of a Campaign Manager campaign.
2381type Campaign struct {
2382	// AccountId: Account ID of this campaign. This is a read-only field
2383	// that can be left blank.
2384	AccountId int64 `json:"accountId,omitempty,string"`
2385
2386	// AdBlockingConfiguration: Ad blocking settings for this campaign.
2387	AdBlockingConfiguration *AdBlockingConfiguration `json:"adBlockingConfiguration,omitempty"`
2388
2389	// AdditionalCreativeOptimizationConfigurations: Additional creative
2390	// optimization configurations for the campaign.
2391	AdditionalCreativeOptimizationConfigurations []*CreativeOptimizationConfiguration `json:"additionalCreativeOptimizationConfigurations,omitempty"`
2392
2393	// AdvertiserGroupId: Advertiser group ID of the associated advertiser.
2394	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
2395
2396	// AdvertiserId: Advertiser ID of this campaign. This is a required
2397	// field.
2398	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2399
2400	// AdvertiserIdDimensionValue: Dimension value for the advertiser ID of
2401	// this campaign. This is a read-only, auto-generated field.
2402	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
2403
2404	// Archived: Whether this campaign has been archived.
2405	Archived bool `json:"archived,omitempty"`
2406
2407	// AudienceSegmentGroups: Audience segment groups assigned to this
2408	// campaign. Cannot have more than 300 segment groups.
2409	AudienceSegmentGroups []*AudienceSegmentGroup `json:"audienceSegmentGroups,omitempty"`
2410
2411	// BillingInvoiceCode: Billing invoice code included in the Campaign
2412	// Manager client billing invoices associated with the campaign.
2413	BillingInvoiceCode string `json:"billingInvoiceCode,omitempty"`
2414
2415	// ClickThroughUrlSuffixProperties: Click-through URL suffix override
2416	// properties for this campaign.
2417	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
2418
2419	// Comment: Arbitrary comments about this campaign. Must be less than
2420	// 256 characters long.
2421	Comment string `json:"comment,omitempty"`
2422
2423	// CreateInfo: Information about the creation of this campaign. This is
2424	// a read-only field.
2425	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
2426
2427	// CreativeGroupIds: List of creative group IDs that are assigned to the
2428	// campaign.
2429	CreativeGroupIds googleapi.Int64s `json:"creativeGroupIds,omitempty"`
2430
2431	// CreativeOptimizationConfiguration: Creative optimization
2432	// configuration for the campaign.
2433	CreativeOptimizationConfiguration *CreativeOptimizationConfiguration `json:"creativeOptimizationConfiguration,omitempty"`
2434
2435	// DefaultClickThroughEventTagProperties: Click-through event tag ID
2436	// override properties for this campaign.
2437	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
2438
2439	// DefaultLandingPageId: The default landing page ID for this campaign.
2440	DefaultLandingPageId int64 `json:"defaultLandingPageId,omitempty,string"`
2441
2442	// EndDate: Date on which the campaign will stop running. On insert, the
2443	// end date must be today or a future date. The end date must be later
2444	// than or be the same as the start date. If, for example, you set
2445	// 6/25/2015 as both the start and end dates, the effective campaign run
2446	// date is just that day only, 6/25/2015. The hours, minutes, and
2447	// seconds of the end date should not be set, as doing so will result in
2448	// an error. This is a required field.
2449	EndDate string `json:"endDate,omitempty"`
2450
2451	// EventTagOverrides: Overrides that can be used to activate or
2452	// deactivate advertiser event tags.
2453	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
2454
2455	// ExternalId: External ID for this campaign.
2456	ExternalId string `json:"externalId,omitempty"`
2457
2458	// Id: ID of this campaign. This is a read-only auto-generated field.
2459	Id int64 `json:"id,omitempty,string"`
2460
2461	// IdDimensionValue: Dimension value for the ID of this campaign. This
2462	// is a read-only, auto-generated field.
2463	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
2464
2465	// Kind: Identifies what kind of resource this is. Value: the fixed
2466	// string "dfareporting#campaign".
2467	Kind string `json:"kind,omitempty"`
2468
2469	// LastModifiedInfo: Information about the most recent modification of
2470	// this campaign. This is a read-only field.
2471	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
2472
2473	// Name: Name of this campaign. This is a required field and must be
2474	// less than 256 characters long and unique among campaigns of the same
2475	// advertiser.
2476	Name string `json:"name,omitempty"`
2477
2478	// NielsenOcrEnabled: Whether Nielsen reports are enabled for this
2479	// campaign.
2480	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
2481
2482	// StartDate: Date on which the campaign starts running. The start date
2483	// can be any date. The hours, minutes, and seconds of the start date
2484	// should not be set, as doing so will result in an error. This is a
2485	// required field.
2486	StartDate string `json:"startDate,omitempty"`
2487
2488	// SubaccountId: Subaccount ID of this campaign. This is a read-only
2489	// field that can be left blank.
2490	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2491
2492	// TraffickerEmails: Campaign trafficker contact emails.
2493	TraffickerEmails []string `json:"traffickerEmails,omitempty"`
2494
2495	// ServerResponse contains the HTTP response code and headers from the
2496	// server.
2497	googleapi.ServerResponse `json:"-"`
2498
2499	// ForceSendFields is a list of field names (e.g. "AccountId") to
2500	// unconditionally include in API requests. By default, fields with
2501	// empty values are omitted from API requests. However, any non-pointer,
2502	// non-interface field appearing in ForceSendFields will be sent to the
2503	// server regardless of whether the field is empty or not. This may be
2504	// used to include empty fields in Patch requests.
2505	ForceSendFields []string `json:"-"`
2506
2507	// NullFields is a list of field names (e.g. "AccountId") to include in
2508	// API requests with the JSON null value. By default, fields with empty
2509	// values are omitted from API requests. However, any field with an
2510	// empty value appearing in NullFields will be sent to the server as
2511	// null. It is an error if a field in this list has a non-empty value.
2512	// This may be used to include null fields in Patch requests.
2513	NullFields []string `json:"-"`
2514}
2515
2516func (s *Campaign) MarshalJSON() ([]byte, error) {
2517	type NoMethod Campaign
2518	raw := NoMethod(*s)
2519	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2520}
2521
2522// CampaignCreativeAssociation: Identifies a creative which has been
2523// associated with a given campaign.
2524type CampaignCreativeAssociation struct {
2525	// CreativeId: ID of the creative associated with the campaign. This is
2526	// a required field.
2527	CreativeId int64 `json:"creativeId,omitempty,string"`
2528
2529	// Kind: Identifies what kind of resource this is. Value: the fixed
2530	// string "dfareporting#campaignCreativeAssociation".
2531	Kind string `json:"kind,omitempty"`
2532
2533	// ServerResponse contains the HTTP response code and headers from the
2534	// server.
2535	googleapi.ServerResponse `json:"-"`
2536
2537	// ForceSendFields is a list of field names (e.g. "CreativeId") to
2538	// unconditionally include in API requests. By default, fields with
2539	// empty values are omitted from API requests. However, any non-pointer,
2540	// non-interface field appearing in ForceSendFields will be sent to the
2541	// server regardless of whether the field is empty or not. This may be
2542	// used to include empty fields in Patch requests.
2543	ForceSendFields []string `json:"-"`
2544
2545	// NullFields is a list of field names (e.g. "CreativeId") to include in
2546	// API requests with the JSON null value. By default, fields with empty
2547	// values are omitted from API requests. However, any field with an
2548	// empty value appearing in NullFields will be sent to the server as
2549	// null. It is an error if a field in this list has a non-empty value.
2550	// This may be used to include null fields in Patch requests.
2551	NullFields []string `json:"-"`
2552}
2553
2554func (s *CampaignCreativeAssociation) MarshalJSON() ([]byte, error) {
2555	type NoMethod CampaignCreativeAssociation
2556	raw := NoMethod(*s)
2557	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2558}
2559
2560// CampaignCreativeAssociationsListResponse: Campaign Creative
2561// Association List Response
2562type CampaignCreativeAssociationsListResponse struct {
2563	// CampaignCreativeAssociations: Campaign creative association
2564	// collection
2565	CampaignCreativeAssociations []*CampaignCreativeAssociation `json:"campaignCreativeAssociations,omitempty"`
2566
2567	// Kind: Identifies what kind of resource this is. Value: the fixed
2568	// string "dfareporting#campaignCreativeAssociationsListResponse".
2569	Kind string `json:"kind,omitempty"`
2570
2571	// NextPageToken: Pagination token to be used for the next list
2572	// operation.
2573	NextPageToken string `json:"nextPageToken,omitempty"`
2574
2575	// ServerResponse contains the HTTP response code and headers from the
2576	// server.
2577	googleapi.ServerResponse `json:"-"`
2578
2579	// ForceSendFields is a list of field names (e.g.
2580	// "CampaignCreativeAssociations") to unconditionally include in API
2581	// requests. By default, fields with empty values are omitted from API
2582	// requests. However, any non-pointer, non-interface field appearing in
2583	// ForceSendFields will be sent to the server regardless of whether the
2584	// field is empty or not. This may be used to include empty fields in
2585	// Patch requests.
2586	ForceSendFields []string `json:"-"`
2587
2588	// NullFields is a list of field names (e.g.
2589	// "CampaignCreativeAssociations") to include in API requests with the
2590	// JSON null value. By default, fields with empty values are omitted
2591	// from API requests. However, any field with an empty value appearing
2592	// in NullFields will be sent to the server as null. It is an error if a
2593	// field in this list has a non-empty value. This may be used to include
2594	// null fields in Patch requests.
2595	NullFields []string `json:"-"`
2596}
2597
2598func (s *CampaignCreativeAssociationsListResponse) MarshalJSON() ([]byte, error) {
2599	type NoMethod CampaignCreativeAssociationsListResponse
2600	raw := NoMethod(*s)
2601	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2602}
2603
2604// CampaignsListResponse: Campaign List Response
2605type CampaignsListResponse struct {
2606	// Campaigns: Campaign collection.
2607	Campaigns []*Campaign `json:"campaigns,omitempty"`
2608
2609	// Kind: Identifies what kind of resource this is. Value: the fixed
2610	// string "dfareporting#campaignsListResponse".
2611	Kind string `json:"kind,omitempty"`
2612
2613	// NextPageToken: Pagination token to be used for the next list
2614	// operation.
2615	NextPageToken string `json:"nextPageToken,omitempty"`
2616
2617	// ServerResponse contains the HTTP response code and headers from the
2618	// server.
2619	googleapi.ServerResponse `json:"-"`
2620
2621	// ForceSendFields is a list of field names (e.g. "Campaigns") to
2622	// unconditionally include in API requests. By default, fields with
2623	// empty values are omitted from API requests. However, any non-pointer,
2624	// non-interface field appearing in ForceSendFields will be sent to the
2625	// server regardless of whether the field is empty or not. This may be
2626	// used to include empty fields in Patch requests.
2627	ForceSendFields []string `json:"-"`
2628
2629	// NullFields is a list of field names (e.g. "Campaigns") to include in
2630	// API requests with the JSON null value. By default, fields with empty
2631	// values are omitted from API requests. However, any field with an
2632	// empty value appearing in NullFields will be sent to the server as
2633	// null. It is an error if a field in this list has a non-empty value.
2634	// This may be used to include null fields in Patch requests.
2635	NullFields []string `json:"-"`
2636}
2637
2638func (s *CampaignsListResponse) MarshalJSON() ([]byte, error) {
2639	type NoMethod CampaignsListResponse
2640	raw := NoMethod(*s)
2641	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2642}
2643
2644// ChangeLog: Describes a change that a user has made to a resource.
2645type ChangeLog struct {
2646	// AccountId: Account ID of the modified object.
2647	AccountId int64 `json:"accountId,omitempty,string"`
2648
2649	// Action: Action which caused the change.
2650	Action string `json:"action,omitempty"`
2651
2652	// ChangeTime: Time when the object was modified.
2653	ChangeTime string `json:"changeTime,omitempty"`
2654
2655	// FieldName: Field name of the object which changed.
2656	FieldName string `json:"fieldName,omitempty"`
2657
2658	// Id: ID of this change log.
2659	Id int64 `json:"id,omitempty,string"`
2660
2661	// Kind: Identifies what kind of resource this is. Value: the fixed
2662	// string "dfareporting#changeLog".
2663	Kind string `json:"kind,omitempty"`
2664
2665	// NewValue: New value of the object field.
2666	NewValue string `json:"newValue,omitempty"`
2667
2668	// ObjectId: ID of the object of this change log. The object could be a
2669	// campaign, placement, ad, or other type.
2670	ObjectId int64 `json:"objectId,omitempty,string"`
2671
2672	// ObjectType: Object type of the change log.
2673	ObjectType string `json:"objectType,omitempty"`
2674
2675	// OldValue: Old value of the object field.
2676	OldValue string `json:"oldValue,omitempty"`
2677
2678	// SubaccountId: Subaccount ID of the modified object.
2679	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2680
2681	// TransactionId: Transaction ID of this change log. When a single API
2682	// call results in many changes, each change will have a separate ID in
2683	// the change log but will share the same transactionId.
2684	TransactionId int64 `json:"transactionId,omitempty,string"`
2685
2686	// UserProfileId: ID of the user who modified the object.
2687	UserProfileId int64 `json:"userProfileId,omitempty,string"`
2688
2689	// UserProfileName: User profile name of the user who modified the
2690	// object.
2691	UserProfileName string `json:"userProfileName,omitempty"`
2692
2693	// ServerResponse contains the HTTP response code and headers from the
2694	// server.
2695	googleapi.ServerResponse `json:"-"`
2696
2697	// ForceSendFields is a list of field names (e.g. "AccountId") to
2698	// unconditionally include in API requests. By default, fields with
2699	// empty values are omitted from API requests. However, any non-pointer,
2700	// non-interface field appearing in ForceSendFields will be sent to the
2701	// server regardless of whether the field is empty or not. This may be
2702	// used to include empty fields in Patch requests.
2703	ForceSendFields []string `json:"-"`
2704
2705	// NullFields is a list of field names (e.g. "AccountId") to include in
2706	// API requests with the JSON null value. By default, fields with empty
2707	// values are omitted from API requests. However, any field with an
2708	// empty value appearing in NullFields will be sent to the server as
2709	// null. It is an error if a field in this list has a non-empty value.
2710	// This may be used to include null fields in Patch requests.
2711	NullFields []string `json:"-"`
2712}
2713
2714func (s *ChangeLog) MarshalJSON() ([]byte, error) {
2715	type NoMethod ChangeLog
2716	raw := NoMethod(*s)
2717	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2718}
2719
2720// ChangeLogsListResponse: Change Log List Response
2721type ChangeLogsListResponse struct {
2722	// ChangeLogs: Change log collection.
2723	ChangeLogs []*ChangeLog `json:"changeLogs,omitempty"`
2724
2725	// Kind: Identifies what kind of resource this is. Value: the fixed
2726	// string "dfareporting#changeLogsListResponse".
2727	Kind string `json:"kind,omitempty"`
2728
2729	// NextPageToken: Pagination token to be used for the next list
2730	// operation.
2731	NextPageToken string `json:"nextPageToken,omitempty"`
2732
2733	// ServerResponse contains the HTTP response code and headers from the
2734	// server.
2735	googleapi.ServerResponse `json:"-"`
2736
2737	// ForceSendFields is a list of field names (e.g. "ChangeLogs") to
2738	// unconditionally include in API requests. By default, fields with
2739	// empty values are omitted from API requests. However, any non-pointer,
2740	// non-interface field appearing in ForceSendFields will be sent to the
2741	// server regardless of whether the field is empty or not. This may be
2742	// used to include empty fields in Patch requests.
2743	ForceSendFields []string `json:"-"`
2744
2745	// NullFields is a list of field names (e.g. "ChangeLogs") to include in
2746	// API requests with the JSON null value. By default, fields with empty
2747	// values are omitted from API requests. However, any field with an
2748	// empty value appearing in NullFields will be sent to the server as
2749	// null. It is an error if a field in this list has a non-empty value.
2750	// This may be used to include null fields in Patch requests.
2751	NullFields []string `json:"-"`
2752}
2753
2754func (s *ChangeLogsListResponse) MarshalJSON() ([]byte, error) {
2755	type NoMethod ChangeLogsListResponse
2756	raw := NoMethod(*s)
2757	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2758}
2759
2760// CitiesListResponse: City List Response
2761type CitiesListResponse struct {
2762	// Cities: City collection.
2763	Cities []*City `json:"cities,omitempty"`
2764
2765	// Kind: Identifies what kind of resource this is. Value: the fixed
2766	// string "dfareporting#citiesListResponse".
2767	Kind string `json:"kind,omitempty"`
2768
2769	// ServerResponse contains the HTTP response code and headers from the
2770	// server.
2771	googleapi.ServerResponse `json:"-"`
2772
2773	// ForceSendFields is a list of field names (e.g. "Cities") to
2774	// unconditionally include in API requests. By default, fields with
2775	// empty values are omitted from API requests. However, any non-pointer,
2776	// non-interface field appearing in ForceSendFields will be sent to the
2777	// server regardless of whether the field is empty or not. This may be
2778	// used to include empty fields in Patch requests.
2779	ForceSendFields []string `json:"-"`
2780
2781	// NullFields is a list of field names (e.g. "Cities") to include in API
2782	// requests with the JSON null value. By default, fields with empty
2783	// values are omitted from API requests. However, any field with an
2784	// empty value appearing in NullFields will be sent to the server as
2785	// null. It is an error if a field in this list has a non-empty value.
2786	// This may be used to include null fields in Patch requests.
2787	NullFields []string `json:"-"`
2788}
2789
2790func (s *CitiesListResponse) MarshalJSON() ([]byte, error) {
2791	type NoMethod CitiesListResponse
2792	raw := NoMethod(*s)
2793	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2794}
2795
2796// City: Contains information about a city that can be targeted by ads.
2797type City struct {
2798	// CountryCode: Country code of the country to which this city belongs.
2799	CountryCode string `json:"countryCode,omitempty"`
2800
2801	// CountryDartId: DART ID of the country to which this city belongs.
2802	CountryDartId int64 `json:"countryDartId,omitempty,string"`
2803
2804	// DartId: DART ID of this city. This is the ID used for targeting and
2805	// generating reports.
2806	DartId int64 `json:"dartId,omitempty,string"`
2807
2808	// Kind: Identifies what kind of resource this is. Value: the fixed
2809	// string "dfareporting#city".
2810	Kind string `json:"kind,omitempty"`
2811
2812	// MetroCode: Metro region code of the metro region (DMA) to which this
2813	// city belongs.
2814	MetroCode string `json:"metroCode,omitempty"`
2815
2816	// MetroDmaId: ID of the metro region (DMA) to which this city belongs.
2817	MetroDmaId int64 `json:"metroDmaId,omitempty,string"`
2818
2819	// Name: Name of this city.
2820	Name string `json:"name,omitempty"`
2821
2822	// RegionCode: Region code of the region to which this city belongs.
2823	RegionCode string `json:"regionCode,omitempty"`
2824
2825	// RegionDartId: DART ID of the region to which this city belongs.
2826	RegionDartId int64 `json:"regionDartId,omitempty,string"`
2827
2828	// ForceSendFields is a list of field names (e.g. "CountryCode") to
2829	// unconditionally include in API requests. By default, fields with
2830	// empty values are omitted from API requests. However, any non-pointer,
2831	// non-interface field appearing in ForceSendFields will be sent to the
2832	// server regardless of whether the field is empty or not. This may be
2833	// used to include empty fields in Patch requests.
2834	ForceSendFields []string `json:"-"`
2835
2836	// NullFields is a list of field names (e.g. "CountryCode") to include
2837	// in API requests with the JSON null value. By default, fields with
2838	// empty values are omitted from API requests. However, any field with
2839	// an empty value appearing in NullFields will be sent to the server as
2840	// null. It is an error if a field in this list has a non-empty value.
2841	// This may be used to include null fields in Patch requests.
2842	NullFields []string `json:"-"`
2843}
2844
2845func (s *City) MarshalJSON() ([]byte, error) {
2846	type NoMethod City
2847	raw := NoMethod(*s)
2848	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2849}
2850
2851// ClickTag: Creative Click Tag.
2852type ClickTag struct {
2853	// ClickThroughUrl: Parameter value for the specified click tag. This
2854	// field contains a click-through url.
2855	ClickThroughUrl *CreativeClickThroughUrl `json:"clickThroughUrl,omitempty"`
2856
2857	// EventName: Advertiser event name associated with the click tag. This
2858	// field is used by DISPLAY_IMAGE_GALLERY and HTML5_BANNER creatives.
2859	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
2860	EventName string `json:"eventName,omitempty"`
2861
2862	// Name: Parameter name for the specified click tag. For
2863	// DISPLAY_IMAGE_GALLERY creative assets, this field must match the
2864	// value of the creative asset's creativeAssetId.name field.
2865	Name string `json:"name,omitempty"`
2866
2867	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
2868	// unconditionally include in API requests. By default, fields with
2869	// empty values are omitted from API requests. However, any non-pointer,
2870	// non-interface field appearing in ForceSendFields will be sent to the
2871	// server regardless of whether the field is empty or not. This may be
2872	// used to include empty fields in Patch requests.
2873	ForceSendFields []string `json:"-"`
2874
2875	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
2876	// include in API requests with the JSON null value. By default, fields
2877	// with empty values are omitted from API requests. However, any field
2878	// with an empty value appearing in NullFields will be sent to the
2879	// server as null. It is an error if a field in this list has a
2880	// non-empty value. This may be used to include null fields in Patch
2881	// requests.
2882	NullFields []string `json:"-"`
2883}
2884
2885func (s *ClickTag) MarshalJSON() ([]byte, error) {
2886	type NoMethod ClickTag
2887	raw := NoMethod(*s)
2888	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2889}
2890
2891// ClickThroughUrl: Click-through URL
2892type ClickThroughUrl struct {
2893	// ComputedClickThroughUrl: Read-only convenience field representing the
2894	// actual URL that will be used for this click-through. The URL is
2895	// computed as follows:
2896	// - If defaultLandingPage is enabled then the campaign's default
2897	// landing page URL is assigned to this field.
2898	// - If defaultLandingPage is not enabled and a landingPageId is
2899	// specified then that landing page's URL is assigned to this field.
2900	// - If neither of the above cases apply, then the customClickThroughUrl
2901	// is assigned to this field.
2902	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
2903
2904	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
2905	// defaultLandingPage field is set to false and the landingPageId field
2906	// is left unset.
2907	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
2908
2909	// DefaultLandingPage: Whether the campaign default landing page is
2910	// used.
2911	DefaultLandingPage bool `json:"defaultLandingPage,omitempty"`
2912
2913	// LandingPageId: ID of the landing page for the click-through URL.
2914	// Applicable if the defaultLandingPage field is set to false.
2915	LandingPageId int64 `json:"landingPageId,omitempty,string"`
2916
2917	// ForceSendFields is a list of field names (e.g.
2918	// "ComputedClickThroughUrl") to unconditionally include in API
2919	// requests. By default, fields with empty values are omitted from API
2920	// requests. However, any non-pointer, non-interface field appearing in
2921	// ForceSendFields will be sent to the server regardless of whether the
2922	// field is empty or not. This may be used to include empty fields in
2923	// Patch requests.
2924	ForceSendFields []string `json:"-"`
2925
2926	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
2927	// to include in API requests with the JSON null value. By default,
2928	// fields with empty values are omitted from API requests. However, any
2929	// field with an empty value appearing in NullFields will be sent to the
2930	// server as null. It is an error if a field in this list has a
2931	// non-empty value. This may be used to include null fields in Patch
2932	// requests.
2933	NullFields []string `json:"-"`
2934}
2935
2936func (s *ClickThroughUrl) MarshalJSON() ([]byte, error) {
2937	type NoMethod ClickThroughUrl
2938	raw := NoMethod(*s)
2939	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2940}
2941
2942// ClickThroughUrlSuffixProperties: Click Through URL Suffix settings.
2943type ClickThroughUrlSuffixProperties struct {
2944	// ClickThroughUrlSuffix: Click-through URL suffix to apply to all ads
2945	// in this entity's scope. Must be less than 128 characters long.
2946	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
2947
2948	// OverrideInheritedSuffix: Whether this entity should override the
2949	// inherited click-through URL suffix with its own defined value.
2950	OverrideInheritedSuffix bool `json:"overrideInheritedSuffix,omitempty"`
2951
2952	// ForceSendFields is a list of field names (e.g.
2953	// "ClickThroughUrlSuffix") to unconditionally include in API requests.
2954	// By default, fields with empty values are omitted from API requests.
2955	// However, any non-pointer, non-interface field appearing in
2956	// ForceSendFields will be sent to the server regardless of whether the
2957	// field is empty or not. This may be used to include empty fields in
2958	// Patch requests.
2959	ForceSendFields []string `json:"-"`
2960
2961	// NullFields is a list of field names (e.g. "ClickThroughUrlSuffix") to
2962	// include in API requests with the JSON null value. By default, fields
2963	// with empty values are omitted from API requests. However, any field
2964	// with an empty value appearing in NullFields will be sent to the
2965	// server as null. It is an error if a field in this list has a
2966	// non-empty value. This may be used to include null fields in Patch
2967	// requests.
2968	NullFields []string `json:"-"`
2969}
2970
2971func (s *ClickThroughUrlSuffixProperties) MarshalJSON() ([]byte, error) {
2972	type NoMethod ClickThroughUrlSuffixProperties
2973	raw := NoMethod(*s)
2974	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2975}
2976
2977// CompanionClickThroughOverride: Companion Click-through override.
2978type CompanionClickThroughOverride struct {
2979	// ClickThroughUrl: Click-through URL of this companion click-through
2980	// override.
2981	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
2982
2983	// CreativeId: ID of the creative for this companion click-through
2984	// override.
2985	CreativeId int64 `json:"creativeId,omitempty,string"`
2986
2987	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
2988	// unconditionally include in API requests. By default, fields with
2989	// empty values are omitted from API requests. However, any non-pointer,
2990	// non-interface field appearing in ForceSendFields will be sent to the
2991	// server regardless of whether the field is empty or not. This may be
2992	// used to include empty fields in Patch requests.
2993	ForceSendFields []string `json:"-"`
2994
2995	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
2996	// include in API requests with the JSON null value. By default, fields
2997	// with empty values are omitted from API requests. However, any field
2998	// with an empty value appearing in NullFields will be sent to the
2999	// server as null. It is an error if a field in this list has a
3000	// non-empty value. This may be used to include null fields in Patch
3001	// requests.
3002	NullFields []string `json:"-"`
3003}
3004
3005func (s *CompanionClickThroughOverride) MarshalJSON() ([]byte, error) {
3006	type NoMethod CompanionClickThroughOverride
3007	raw := NoMethod(*s)
3008	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3009}
3010
3011// CompanionSetting: Companion Settings
3012type CompanionSetting struct {
3013	// CompanionsDisabled: Whether companions are disabled for this
3014	// placement.
3015	CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
3016
3017	// EnabledSizes: Whitelist of companion sizes to be served to this
3018	// placement. Set this list to null or empty to serve all companion
3019	// sizes.
3020	EnabledSizes []*Size `json:"enabledSizes,omitempty"`
3021
3022	// ImageOnly: Whether to serve only static images as companions.
3023	ImageOnly bool `json:"imageOnly,omitempty"`
3024
3025	// Kind: Identifies what kind of resource this is. Value: the fixed
3026	// string "dfareporting#companionSetting".
3027	Kind string `json:"kind,omitempty"`
3028
3029	// ForceSendFields is a list of field names (e.g. "CompanionsDisabled")
3030	// to unconditionally include in API requests. By default, fields with
3031	// empty values are omitted from API requests. However, any non-pointer,
3032	// non-interface field appearing in ForceSendFields will be sent to the
3033	// server regardless of whether the field is empty or not. This may be
3034	// used to include empty fields in Patch requests.
3035	ForceSendFields []string `json:"-"`
3036
3037	// NullFields is a list of field names (e.g. "CompanionsDisabled") to
3038	// include in API requests with the JSON null value. By default, fields
3039	// with empty values are omitted from API requests. However, any field
3040	// with an empty value appearing in NullFields will be sent to the
3041	// server as null. It is an error if a field in this list has a
3042	// non-empty value. This may be used to include null fields in Patch
3043	// requests.
3044	NullFields []string `json:"-"`
3045}
3046
3047func (s *CompanionSetting) MarshalJSON() ([]byte, error) {
3048	type NoMethod CompanionSetting
3049	raw := NoMethod(*s)
3050	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3051}
3052
3053// CompatibleFields: Represents a response to the queryCompatibleFields
3054// method.
3055type CompatibleFields struct {
3056	// CrossDimensionReachReportCompatibleFields: Contains items that are
3057	// compatible to be selected for a report of type
3058	// "CROSS_DIMENSION_REACH".
3059	CrossDimensionReachReportCompatibleFields *CrossDimensionReachReportCompatibleFields `json:"crossDimensionReachReportCompatibleFields,omitempty"`
3060
3061	// FloodlightReportCompatibleFields: Contains items that are compatible
3062	// to be selected for a report of type "FLOODLIGHT".
3063	FloodlightReportCompatibleFields *FloodlightReportCompatibleFields `json:"floodlightReportCompatibleFields,omitempty"`
3064
3065	// Kind: The kind of resource this is, in this case
3066	// dfareporting#compatibleFields.
3067	Kind string `json:"kind,omitempty"`
3068
3069	// PathToConversionReportCompatibleFields: Contains items that are
3070	// compatible to be selected for a report of type "PATH_TO_CONVERSION".
3071	PathToConversionReportCompatibleFields *PathToConversionReportCompatibleFields `json:"pathToConversionReportCompatibleFields,omitempty"`
3072
3073	// ReachReportCompatibleFields: Contains items that are compatible to be
3074	// selected for a report of type "REACH".
3075	ReachReportCompatibleFields *ReachReportCompatibleFields `json:"reachReportCompatibleFields,omitempty"`
3076
3077	// ReportCompatibleFields: Contains items that are compatible to be
3078	// selected for a report of type "STANDARD".
3079	ReportCompatibleFields *ReportCompatibleFields `json:"reportCompatibleFields,omitempty"`
3080
3081	// ServerResponse contains the HTTP response code and headers from the
3082	// server.
3083	googleapi.ServerResponse `json:"-"`
3084
3085	// ForceSendFields is a list of field names (e.g.
3086	// "CrossDimensionReachReportCompatibleFields") to unconditionally
3087	// include in API requests. By default, fields with empty values are
3088	// omitted from API requests. However, any non-pointer, non-interface
3089	// field appearing in ForceSendFields will be sent to the server
3090	// regardless of whether the field is empty or not. This may be used to
3091	// include empty fields in Patch requests.
3092	ForceSendFields []string `json:"-"`
3093
3094	// NullFields is a list of field names (e.g.
3095	// "CrossDimensionReachReportCompatibleFields") to include in API
3096	// requests with the JSON null value. By default, fields with empty
3097	// values are omitted from API requests. However, any field with an
3098	// empty value appearing in NullFields will be sent to the server as
3099	// null. It is an error if a field in this list has a non-empty value.
3100	// This may be used to include null fields in Patch requests.
3101	NullFields []string `json:"-"`
3102}
3103
3104func (s *CompatibleFields) MarshalJSON() ([]byte, error) {
3105	type NoMethod CompatibleFields
3106	raw := NoMethod(*s)
3107	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3108}
3109
3110// ConnectionType: Contains information about an internet connection
3111// type that can be targeted by ads. Clients can use the connection type
3112// to target mobile vs. broadband users.
3113type ConnectionType struct {
3114	// Id: ID of this connection type.
3115	Id int64 `json:"id,omitempty,string"`
3116
3117	// Kind: Identifies what kind of resource this is. Value: the fixed
3118	// string "dfareporting#connectionType".
3119	Kind string `json:"kind,omitempty"`
3120
3121	// Name: Name of this connection type.
3122	Name string `json:"name,omitempty"`
3123
3124	// ServerResponse contains the HTTP response code and headers from the
3125	// server.
3126	googleapi.ServerResponse `json:"-"`
3127
3128	// ForceSendFields is a list of field names (e.g. "Id") to
3129	// unconditionally include in API requests. By default, fields with
3130	// empty values are omitted from API requests. However, any non-pointer,
3131	// non-interface field appearing in ForceSendFields will be sent to the
3132	// server regardless of whether the field is empty or not. This may be
3133	// used to include empty fields in Patch requests.
3134	ForceSendFields []string `json:"-"`
3135
3136	// NullFields is a list of field names (e.g. "Id") to include in API
3137	// requests with the JSON null value. By default, fields with empty
3138	// values are omitted from API requests. However, any field with an
3139	// empty value appearing in NullFields will be sent to the server as
3140	// null. It is an error if a field in this list has a non-empty value.
3141	// This may be used to include null fields in Patch requests.
3142	NullFields []string `json:"-"`
3143}
3144
3145func (s *ConnectionType) MarshalJSON() ([]byte, error) {
3146	type NoMethod ConnectionType
3147	raw := NoMethod(*s)
3148	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3149}
3150
3151// ConnectionTypesListResponse: Connection Type List Response
3152type ConnectionTypesListResponse struct {
3153	// ConnectionTypes: Collection of connection types such as broadband and
3154	// mobile.
3155	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
3156
3157	// Kind: Identifies what kind of resource this is. Value: the fixed
3158	// string "dfareporting#connectionTypesListResponse".
3159	Kind string `json:"kind,omitempty"`
3160
3161	// ServerResponse contains the HTTP response code and headers from the
3162	// server.
3163	googleapi.ServerResponse `json:"-"`
3164
3165	// ForceSendFields is a list of field names (e.g. "ConnectionTypes") to
3166	// unconditionally include in API requests. By default, fields with
3167	// empty values are omitted from API requests. However, any non-pointer,
3168	// non-interface field appearing in ForceSendFields will be sent to the
3169	// server regardless of whether the field is empty or not. This may be
3170	// used to include empty fields in Patch requests.
3171	ForceSendFields []string `json:"-"`
3172
3173	// NullFields is a list of field names (e.g. "ConnectionTypes") to
3174	// include in API requests with the JSON null value. By default, fields
3175	// with empty values are omitted from API requests. However, any field
3176	// with an empty value appearing in NullFields will be sent to the
3177	// server as null. It is an error if a field in this list has a
3178	// non-empty value. This may be used to include null fields in Patch
3179	// requests.
3180	NullFields []string `json:"-"`
3181}
3182
3183func (s *ConnectionTypesListResponse) MarshalJSON() ([]byte, error) {
3184	type NoMethod ConnectionTypesListResponse
3185	raw := NoMethod(*s)
3186	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3187}
3188
3189// ContentCategoriesListResponse: Content Category List Response
3190type ContentCategoriesListResponse struct {
3191	// ContentCategories: Content category collection.
3192	ContentCategories []*ContentCategory `json:"contentCategories,omitempty"`
3193
3194	// Kind: Identifies what kind of resource this is. Value: the fixed
3195	// string "dfareporting#contentCategoriesListResponse".
3196	Kind string `json:"kind,omitempty"`
3197
3198	// NextPageToken: Pagination token to be used for the next list
3199	// operation.
3200	NextPageToken string `json:"nextPageToken,omitempty"`
3201
3202	// ServerResponse contains the HTTP response code and headers from the
3203	// server.
3204	googleapi.ServerResponse `json:"-"`
3205
3206	// ForceSendFields is a list of field names (e.g. "ContentCategories")
3207	// to unconditionally include in API requests. By default, fields with
3208	// empty values are omitted from API requests. However, any non-pointer,
3209	// non-interface field appearing in ForceSendFields will be sent to the
3210	// server regardless of whether the field is empty or not. This may be
3211	// used to include empty fields in Patch requests.
3212	ForceSendFields []string `json:"-"`
3213
3214	// NullFields is a list of field names (e.g. "ContentCategories") to
3215	// include in API requests with the JSON null value. By default, fields
3216	// with empty values are omitted from API requests. However, any field
3217	// with an empty value appearing in NullFields will be sent to the
3218	// server as null. It is an error if a field in this list has a
3219	// non-empty value. This may be used to include null fields in Patch
3220	// requests.
3221	NullFields []string `json:"-"`
3222}
3223
3224func (s *ContentCategoriesListResponse) MarshalJSON() ([]byte, error) {
3225	type NoMethod ContentCategoriesListResponse
3226	raw := NoMethod(*s)
3227	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3228}
3229
3230// ContentCategory: Organizes placements according to the contents of
3231// their associated webpages.
3232type ContentCategory struct {
3233	// AccountId: Account ID of this content category. This is a read-only
3234	// field that can be left blank.
3235	AccountId int64 `json:"accountId,omitempty,string"`
3236
3237	// Id: ID of this content category. This is a read-only, auto-generated
3238	// field.
3239	Id int64 `json:"id,omitempty,string"`
3240
3241	// Kind: Identifies what kind of resource this is. Value: the fixed
3242	// string "dfareporting#contentCategory".
3243	Kind string `json:"kind,omitempty"`
3244
3245	// Name: Name of this content category. This is a required field and
3246	// must be less than 256 characters long and unique among content
3247	// categories of the same account.
3248	Name string `json:"name,omitempty"`
3249
3250	// ServerResponse contains the HTTP response code and headers from the
3251	// server.
3252	googleapi.ServerResponse `json:"-"`
3253
3254	// ForceSendFields is a list of field names (e.g. "AccountId") to
3255	// unconditionally include in API requests. By default, fields with
3256	// empty values are omitted from API requests. However, any non-pointer,
3257	// non-interface field appearing in ForceSendFields will be sent to the
3258	// server regardless of whether the field is empty or not. This may be
3259	// used to include empty fields in Patch requests.
3260	ForceSendFields []string `json:"-"`
3261
3262	// NullFields is a list of field names (e.g. "AccountId") to include in
3263	// API requests with the JSON null value. By default, fields with empty
3264	// values are omitted from API requests. However, any field with an
3265	// empty value appearing in NullFields will be sent to the server as
3266	// null. It is an error if a field in this list has a non-empty value.
3267	// This may be used to include null fields in Patch requests.
3268	NullFields []string `json:"-"`
3269}
3270
3271func (s *ContentCategory) MarshalJSON() ([]byte, error) {
3272	type NoMethod ContentCategory
3273	raw := NoMethod(*s)
3274	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3275}
3276
3277// Conversion: A Conversion represents when a user successfully performs
3278// a desired action after seeing an ad.
3279type Conversion struct {
3280	// ChildDirectedTreatment: Whether this particular request may come from
3281	// a user under the age of 13, under COPPA compliance.
3282	ChildDirectedTreatment bool `json:"childDirectedTreatment,omitempty"`
3283
3284	// CustomVariables: Custom floodlight variables.
3285	CustomVariables []*CustomFloodlightVariable `json:"customVariables,omitempty"`
3286
3287	// EncryptedUserId: The alphanumeric encrypted user ID. When set,
3288	// encryptionInfo should also be specified. This field is mutually
3289	// exclusive with encryptedUserIdCandidates[], matchId, mobileDeviceId
3290	// and gclid. This or encryptedUserIdCandidates[] or matchId or
3291	// mobileDeviceId or gclid is a required field.
3292	EncryptedUserId string `json:"encryptedUserId,omitempty"`
3293
3294	// EncryptedUserIdCandidates: A list of the alphanumeric encrypted user
3295	// IDs. Any user ID with exposure prior to the conversion timestamp will
3296	// be used in the inserted conversion. If no such user ID is found then
3297	// the conversion will be rejected with INVALID_ARGUMENT error. When
3298	// set, encryptionInfo should also be specified. This field may only be
3299	// used when calling batchinsert; it is not supported by batchupdate.
3300	// This field is mutually exclusive with encryptedUserId, matchId,
3301	// mobileDeviceId and gclid. This or encryptedUserId or matchId or
3302	// mobileDeviceId or gclid is a required field.
3303	EncryptedUserIdCandidates []string `json:"encryptedUserIdCandidates,omitempty"`
3304
3305	// FloodlightActivityId: Floodlight Activity ID of this conversion. This
3306	// is a required field.
3307	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
3308
3309	// FloodlightConfigurationId: Floodlight Configuration ID of this
3310	// conversion. This is a required field.
3311	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
3312
3313	// Gclid: The Google click ID. This field is mutually exclusive with
3314	// encryptedUserId, encryptedUserIdCandidates[], matchId and
3315	// mobileDeviceId. This or encryptedUserId or
3316	// encryptedUserIdCandidates[] or matchId or mobileDeviceId is a
3317	// required field.
3318	Gclid string `json:"gclid,omitempty"`
3319
3320	// Kind: Identifies what kind of resource this is. Value: the fixed
3321	// string "dfareporting#conversion".
3322	Kind string `json:"kind,omitempty"`
3323
3324	// LimitAdTracking: Whether Limit Ad Tracking is enabled. When set to
3325	// true, the conversion will be used for reporting but not targeting.
3326	// This will prevent remarketing.
3327	LimitAdTracking bool `json:"limitAdTracking,omitempty"`
3328
3329	// MatchId: The match ID field. A match ID is your own first-party
3330	// identifier that has been synced with Google using the match ID
3331	// feature in Floodlight. This field is mutually exclusive with
3332	// encryptedUserId, encryptedUserIdCandidates[],mobileDeviceId and
3333	// gclid. This or encryptedUserId or encryptedUserIdCandidates[] or
3334	// mobileDeviceId or gclid is a required field.
3335	MatchId string `json:"matchId,omitempty"`
3336
3337	// MobileDeviceId: The mobile device ID. This field is mutually
3338	// exclusive with encryptedUserId, encryptedUserIdCandidates[], matchId
3339	// and gclid. This or encryptedUserId or encryptedUserIdCandidates[] or
3340	// matchId or gclid is a required field.
3341	MobileDeviceId string `json:"mobileDeviceId,omitempty"`
3342
3343	// NonPersonalizedAd: Whether the conversion was for a non personalized
3344	// ad.
3345	NonPersonalizedAd bool `json:"nonPersonalizedAd,omitempty"`
3346
3347	// Ordinal: The ordinal of the conversion. Use this field to control how
3348	// conversions of the same user and day are de-duplicated. This is a
3349	// required field.
3350	Ordinal string `json:"ordinal,omitempty"`
3351
3352	// Quantity: The quantity of the conversion.
3353	Quantity int64 `json:"quantity,omitempty,string"`
3354
3355	// TimestampMicros: The timestamp of conversion, in Unix epoch micros.
3356	// This is a required field.
3357	TimestampMicros int64 `json:"timestampMicros,omitempty,string"`
3358
3359	// TreatmentForUnderage: Whether this particular request may come from a
3360	// user under the age of 16 (may differ by country), under compliance
3361	// with the European Union's General Data Protection Regulation (GDPR).
3362	TreatmentForUnderage bool `json:"treatmentForUnderage,omitempty"`
3363
3364	// Value: The value of the conversion.
3365	Value float64 `json:"value,omitempty"`
3366
3367	// ForceSendFields is a list of field names (e.g.
3368	// "ChildDirectedTreatment") to unconditionally include in API requests.
3369	// By default, fields with empty values are omitted from API requests.
3370	// However, any non-pointer, non-interface field appearing in
3371	// ForceSendFields will be sent to the server regardless of whether the
3372	// field is empty or not. This may be used to include empty fields in
3373	// Patch requests.
3374	ForceSendFields []string `json:"-"`
3375
3376	// NullFields is a list of field names (e.g. "ChildDirectedTreatment")
3377	// to include in API requests with the JSON null value. By default,
3378	// fields with empty values are omitted from API requests. However, any
3379	// field with an empty value appearing in NullFields will be sent to the
3380	// server as null. It is an error if a field in this list has a
3381	// non-empty value. This may be used to include null fields in Patch
3382	// requests.
3383	NullFields []string `json:"-"`
3384}
3385
3386func (s *Conversion) MarshalJSON() ([]byte, error) {
3387	type NoMethod Conversion
3388	raw := NoMethod(*s)
3389	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3390}
3391
3392func (s *Conversion) UnmarshalJSON(data []byte) error {
3393	type NoMethod Conversion
3394	var s1 struct {
3395		Value gensupport.JSONFloat64 `json:"value"`
3396		*NoMethod
3397	}
3398	s1.NoMethod = (*NoMethod)(s)
3399	if err := json.Unmarshal(data, &s1); err != nil {
3400		return err
3401	}
3402	s.Value = float64(s1.Value)
3403	return nil
3404}
3405
3406// ConversionError: The error code and description for a conversion that
3407// failed to insert or update.
3408type ConversionError struct {
3409	// Code: The error code.
3410	//
3411	// Possible values:
3412	//   "INTERNAL"
3413	//   "INVALID_ARGUMENT"
3414	//   "NOT_FOUND"
3415	//   "PERMISSION_DENIED"
3416	Code string `json:"code,omitempty"`
3417
3418	// Kind: Identifies what kind of resource this is. Value: the fixed
3419	// string "dfareporting#conversionError".
3420	Kind string `json:"kind,omitempty"`
3421
3422	// Message: A description of the error.
3423	Message string `json:"message,omitempty"`
3424
3425	// ForceSendFields is a list of field names (e.g. "Code") to
3426	// unconditionally include in API requests. By default, fields with
3427	// empty values are omitted from API requests. However, any non-pointer,
3428	// non-interface field appearing in ForceSendFields will be sent to the
3429	// server regardless of whether the field is empty or not. This may be
3430	// used to include empty fields in Patch requests.
3431	ForceSendFields []string `json:"-"`
3432
3433	// NullFields is a list of field names (e.g. "Code") to include in API
3434	// requests with the JSON null value. By default, fields with empty
3435	// values are omitted from API requests. However, any field with an
3436	// empty value appearing in NullFields will be sent to the server as
3437	// null. It is an error if a field in this list has a non-empty value.
3438	// This may be used to include null fields in Patch requests.
3439	NullFields []string `json:"-"`
3440}
3441
3442func (s *ConversionError) MarshalJSON() ([]byte, error) {
3443	type NoMethod ConversionError
3444	raw := NoMethod(*s)
3445	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3446}
3447
3448// ConversionStatus: The original conversion that was inserted or
3449// updated and whether there were any errors.
3450type ConversionStatus struct {
3451	// Conversion: The original conversion that was inserted or updated.
3452	Conversion *Conversion `json:"conversion,omitempty"`
3453
3454	// Errors: A list of errors related to this conversion.
3455	Errors []*ConversionError `json:"errors,omitempty"`
3456
3457	// Kind: Identifies what kind of resource this is. Value: the fixed
3458	// string "dfareporting#conversionStatus".
3459	Kind string `json:"kind,omitempty"`
3460
3461	// ForceSendFields is a list of field names (e.g. "Conversion") to
3462	// unconditionally include in API requests. By default, fields with
3463	// empty values are omitted from API requests. However, any non-pointer,
3464	// non-interface field appearing in ForceSendFields will be sent to the
3465	// server regardless of whether the field is empty or not. This may be
3466	// used to include empty fields in Patch requests.
3467	ForceSendFields []string `json:"-"`
3468
3469	// NullFields is a list of field names (e.g. "Conversion") to include in
3470	// API requests with the JSON null value. By default, fields with empty
3471	// values are omitted from API requests. However, any field with an
3472	// empty value appearing in NullFields will be sent to the server as
3473	// null. It is an error if a field in this list has a non-empty value.
3474	// This may be used to include null fields in Patch requests.
3475	NullFields []string `json:"-"`
3476}
3477
3478func (s *ConversionStatus) MarshalJSON() ([]byte, error) {
3479	type NoMethod ConversionStatus
3480	raw := NoMethod(*s)
3481	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3482}
3483
3484// ConversionsBatchInsertRequest: Insert Conversions Request.
3485type ConversionsBatchInsertRequest struct {
3486	// Conversions: The set of conversions to insert.
3487	Conversions []*Conversion `json:"conversions,omitempty"`
3488
3489	// EncryptionInfo: Describes how encryptedUserId or
3490	// encryptedUserIdCandidates[] is encrypted. This is a required field if
3491	// encryptedUserId or encryptedUserIdCandidates[] is used.
3492	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3493
3494	// Kind: Identifies what kind of resource this is. Value: the fixed
3495	// string "dfareporting#conversionsBatchInsertRequest".
3496	Kind string `json:"kind,omitempty"`
3497
3498	// ForceSendFields is a list of field names (e.g. "Conversions") to
3499	// unconditionally include in API requests. By default, fields with
3500	// empty values are omitted from API requests. However, any non-pointer,
3501	// non-interface field appearing in ForceSendFields will be sent to the
3502	// server regardless of whether the field is empty or not. This may be
3503	// used to include empty fields in Patch requests.
3504	ForceSendFields []string `json:"-"`
3505
3506	// NullFields is a list of field names (e.g. "Conversions") to include
3507	// in API requests with the JSON null value. By default, fields with
3508	// empty values are omitted from API requests. However, any field with
3509	// an empty value appearing in NullFields will be sent to the server as
3510	// null. It is an error if a field in this list has a non-empty value.
3511	// This may be used to include null fields in Patch requests.
3512	NullFields []string `json:"-"`
3513}
3514
3515func (s *ConversionsBatchInsertRequest) MarshalJSON() ([]byte, error) {
3516	type NoMethod ConversionsBatchInsertRequest
3517	raw := NoMethod(*s)
3518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3519}
3520
3521// ConversionsBatchInsertResponse: Insert Conversions Response.
3522type ConversionsBatchInsertResponse struct {
3523	// HasFailures: Indicates that some or all conversions failed to insert.
3524	HasFailures bool `json:"hasFailures,omitempty"`
3525
3526	// Kind: Identifies what kind of resource this is. Value: the fixed
3527	// string "dfareporting#conversionsBatchInsertResponse".
3528	Kind string `json:"kind,omitempty"`
3529
3530	// Status: The insert status of each conversion. Statuses are returned
3531	// in the same order that conversions are inserted.
3532	Status []*ConversionStatus `json:"status,omitempty"`
3533
3534	// ServerResponse contains the HTTP response code and headers from the
3535	// server.
3536	googleapi.ServerResponse `json:"-"`
3537
3538	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3539	// unconditionally include in API requests. By default, fields with
3540	// empty values are omitted from API requests. However, any non-pointer,
3541	// non-interface field appearing in ForceSendFields will be sent to the
3542	// server regardless of whether the field is empty or not. This may be
3543	// used to include empty fields in Patch requests.
3544	ForceSendFields []string `json:"-"`
3545
3546	// NullFields is a list of field names (e.g. "HasFailures") to include
3547	// in API requests with the JSON null value. By default, fields with
3548	// empty values are omitted from API requests. However, any field with
3549	// an empty value appearing in NullFields will be sent to the server as
3550	// null. It is an error if a field in this list has a non-empty value.
3551	// This may be used to include null fields in Patch requests.
3552	NullFields []string `json:"-"`
3553}
3554
3555func (s *ConversionsBatchInsertResponse) MarshalJSON() ([]byte, error) {
3556	type NoMethod ConversionsBatchInsertResponse
3557	raw := NoMethod(*s)
3558	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3559}
3560
3561// ConversionsBatchUpdateRequest: Update Conversions Request.
3562type ConversionsBatchUpdateRequest struct {
3563	// Conversions: The set of conversions to update.
3564	Conversions []*Conversion `json:"conversions,omitempty"`
3565
3566	// EncryptionInfo: Describes how encryptedUserId is encrypted. This is a
3567	// required field if encryptedUserId is used.
3568	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3569
3570	// Kind: Identifies what kind of resource this is. Value: the fixed
3571	// string "dfareporting#conversionsBatchUpdateRequest".
3572	Kind string `json:"kind,omitempty"`
3573
3574	// ForceSendFields is a list of field names (e.g. "Conversions") to
3575	// unconditionally include in API requests. By default, fields with
3576	// empty values are omitted from API requests. However, any non-pointer,
3577	// non-interface field appearing in ForceSendFields will be sent to the
3578	// server regardless of whether the field is empty or not. This may be
3579	// used to include empty fields in Patch requests.
3580	ForceSendFields []string `json:"-"`
3581
3582	// NullFields is a list of field names (e.g. "Conversions") to include
3583	// in API requests with the JSON null value. By default, fields with
3584	// empty values are omitted from API requests. However, any field with
3585	// an empty value appearing in NullFields will be sent to the server as
3586	// null. It is an error if a field in this list has a non-empty value.
3587	// This may be used to include null fields in Patch requests.
3588	NullFields []string `json:"-"`
3589}
3590
3591func (s *ConversionsBatchUpdateRequest) MarshalJSON() ([]byte, error) {
3592	type NoMethod ConversionsBatchUpdateRequest
3593	raw := NoMethod(*s)
3594	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3595}
3596
3597// ConversionsBatchUpdateResponse: Update Conversions Response.
3598type ConversionsBatchUpdateResponse struct {
3599	// HasFailures: Indicates that some or all conversions failed to update.
3600	HasFailures bool `json:"hasFailures,omitempty"`
3601
3602	// Kind: Identifies what kind of resource this is. Value: the fixed
3603	// string "dfareporting#conversionsBatchUpdateResponse".
3604	Kind string `json:"kind,omitempty"`
3605
3606	// Status: The update status of each conversion. Statuses are returned
3607	// in the same order that conversions are updated.
3608	Status []*ConversionStatus `json:"status,omitempty"`
3609
3610	// ServerResponse contains the HTTP response code and headers from the
3611	// server.
3612	googleapi.ServerResponse `json:"-"`
3613
3614	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3615	// unconditionally include in API requests. By default, fields with
3616	// empty values are omitted from API requests. However, any non-pointer,
3617	// non-interface field appearing in ForceSendFields will be sent to the
3618	// server regardless of whether the field is empty or not. This may be
3619	// used to include empty fields in Patch requests.
3620	ForceSendFields []string `json:"-"`
3621
3622	// NullFields is a list of field names (e.g. "HasFailures") to include
3623	// in API requests with the JSON null value. By default, fields with
3624	// empty values are omitted from API requests. However, any field with
3625	// an empty value appearing in NullFields will be sent to the server as
3626	// null. It is an error if a field in this list has a non-empty value.
3627	// This may be used to include null fields in Patch requests.
3628	NullFields []string `json:"-"`
3629}
3630
3631func (s *ConversionsBatchUpdateResponse) MarshalJSON() ([]byte, error) {
3632	type NoMethod ConversionsBatchUpdateResponse
3633	raw := NoMethod(*s)
3634	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3635}
3636
3637// CountriesListResponse: Country List Response
3638type CountriesListResponse struct {
3639	// Countries: Country collection.
3640	Countries []*Country `json:"countries,omitempty"`
3641
3642	// Kind: Identifies what kind of resource this is. Value: the fixed
3643	// string "dfareporting#countriesListResponse".
3644	Kind string `json:"kind,omitempty"`
3645
3646	// ServerResponse contains the HTTP response code and headers from the
3647	// server.
3648	googleapi.ServerResponse `json:"-"`
3649
3650	// ForceSendFields is a list of field names (e.g. "Countries") to
3651	// unconditionally include in API requests. By default, fields with
3652	// empty values are omitted from API requests. However, any non-pointer,
3653	// non-interface field appearing in ForceSendFields will be sent to the
3654	// server regardless of whether the field is empty or not. This may be
3655	// used to include empty fields in Patch requests.
3656	ForceSendFields []string `json:"-"`
3657
3658	// NullFields is a list of field names (e.g. "Countries") to include in
3659	// API requests with the JSON null value. By default, fields with empty
3660	// values are omitted from API requests. However, any field with an
3661	// empty value appearing in NullFields will be sent to the server as
3662	// null. It is an error if a field in this list has a non-empty value.
3663	// This may be used to include null fields in Patch requests.
3664	NullFields []string `json:"-"`
3665}
3666
3667func (s *CountriesListResponse) MarshalJSON() ([]byte, error) {
3668	type NoMethod CountriesListResponse
3669	raw := NoMethod(*s)
3670	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3671}
3672
3673// Country: Contains information about a country that can be targeted by
3674// ads.
3675type Country struct {
3676	// CountryCode: Country code.
3677	CountryCode string `json:"countryCode,omitempty"`
3678
3679	// DartId: DART ID of this country. This is the ID used for targeting
3680	// and generating reports.
3681	DartId int64 `json:"dartId,omitempty,string"`
3682
3683	// Kind: Identifies what kind of resource this is. Value: the fixed
3684	// string "dfareporting#country".
3685	Kind string `json:"kind,omitempty"`
3686
3687	// Name: Name of this country.
3688	Name string `json:"name,omitempty"`
3689
3690	// SslEnabled: Whether ad serving supports secure servers in this
3691	// country.
3692	SslEnabled bool `json:"sslEnabled,omitempty"`
3693
3694	// ServerResponse contains the HTTP response code and headers from the
3695	// server.
3696	googleapi.ServerResponse `json:"-"`
3697
3698	// ForceSendFields is a list of field names (e.g. "CountryCode") to
3699	// unconditionally include in API requests. By default, fields with
3700	// empty values are omitted from API requests. However, any non-pointer,
3701	// non-interface field appearing in ForceSendFields will be sent to the
3702	// server regardless of whether the field is empty or not. This may be
3703	// used to include empty fields in Patch requests.
3704	ForceSendFields []string `json:"-"`
3705
3706	// NullFields is a list of field names (e.g. "CountryCode") to include
3707	// in API requests with the JSON null value. By default, fields with
3708	// empty values are omitted from API requests. However, any field with
3709	// an empty value appearing in NullFields will be sent to the server as
3710	// null. It is an error if a field in this list has a non-empty value.
3711	// This may be used to include null fields in Patch requests.
3712	NullFields []string `json:"-"`
3713}
3714
3715func (s *Country) MarshalJSON() ([]byte, error) {
3716	type NoMethod Country
3717	raw := NoMethod(*s)
3718	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3719}
3720
3721// Creative: Contains properties of a Creative.
3722type Creative struct {
3723	// AccountId: Account ID of this creative. This field, if left unset,
3724	// will be auto-generated for both insert and update operations.
3725	// Applicable to all creative types.
3726	AccountId int64 `json:"accountId,omitempty,string"`
3727
3728	// Active: Whether the creative is active. Applicable to all creative
3729	// types.
3730	Active bool `json:"active,omitempty"`
3731
3732	// AdParameters: Ad parameters user for VPAID creative. This is a
3733	// read-only field. Applicable to the following creative types: all
3734	// VPAID.
3735	AdParameters string `json:"adParameters,omitempty"`
3736
3737	// AdTagKeys: Keywords for a Rich Media creative. Keywords let you
3738	// customize the creative settings of a Rich Media ad running on your
3739	// site without having to contact the advertiser. You can use keywords
3740	// to dynamically change the look or functionality of a creative.
3741	// Applicable to the following creative types: all RICH_MEDIA, and all
3742	// VPAID.
3743	AdTagKeys []string `json:"adTagKeys,omitempty"`
3744
3745	// AdditionalSizes: Additional sizes associated with a responsive
3746	// creative. When inserting or updating a creative either the size ID
3747	// field or size width and height fields can be used. Applicable to
3748	// DISPLAY creatives when the primary asset type is HTML_IMAGE.
3749	AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
3750
3751	// AdvertiserId: Advertiser ID of this creative. This is a required
3752	// field. Applicable to all creative types.
3753	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3754
3755	// AllowScriptAccess: Whether script access is allowed for this
3756	// creative. This is a read-only and deprecated field which will
3757	// automatically be set to true on update. Applicable to the following
3758	// creative types: FLASH_INPAGE.
3759	AllowScriptAccess bool `json:"allowScriptAccess,omitempty"`
3760
3761	// Archived: Whether the creative is archived. Applicable to all
3762	// creative types.
3763	Archived bool `json:"archived,omitempty"`
3764
3765	// ArtworkType: Type of artwork used for the creative. This is a
3766	// read-only field. Applicable to the following creative types: all
3767	// RICH_MEDIA, and all VPAID.
3768	//
3769	// Possible values:
3770	//   "ARTWORK_TYPE_FLASH"
3771	//   "ARTWORK_TYPE_HTML5"
3772	//   "ARTWORK_TYPE_IMAGE"
3773	//   "ARTWORK_TYPE_MIXED"
3774	ArtworkType string `json:"artworkType,omitempty"`
3775
3776	// AuthoringSource: Source application where creative was authored.
3777	// Presently, only DBM authored creatives will have this field set.
3778	// Applicable to all creative types.
3779	//
3780	// Possible values:
3781	//   "CREATIVE_AUTHORING_SOURCE_DBM"
3782	//   "CREATIVE_AUTHORING_SOURCE_DCM"
3783	//   "CREATIVE_AUTHORING_SOURCE_STUDIO"
3784	AuthoringSource string `json:"authoringSource,omitempty"`
3785
3786	// AuthoringTool: Authoring tool for HTML5 banner creatives. This is a
3787	// read-only field. Applicable to the following creative types:
3788	// HTML5_BANNER.
3789	//
3790	// Possible values:
3791	//   "NINJA"
3792	//   "SWIFFY"
3793	AuthoringTool string `json:"authoringTool,omitempty"`
3794
3795	// AutoAdvanceImages: Whether images are automatically advanced for
3796	// image gallery creatives. Applicable to the following creative types:
3797	// DISPLAY_IMAGE_GALLERY.
3798	AutoAdvanceImages bool `json:"autoAdvanceImages,omitempty"`
3799
3800	// BackgroundColor: The 6-character HTML color code, beginning with #,
3801	// for the background of the window area where the Flash file is
3802	// displayed. Default is white. Applicable to the following creative
3803	// types: FLASH_INPAGE.
3804	BackgroundColor string `json:"backgroundColor,omitempty"`
3805
3806	// BackupImageClickThroughUrl: Click-through URL for backup image.
3807	// Applicable to ENHANCED_BANNER when the primary asset type is not
3808	// HTML_IMAGE.
3809	BackupImageClickThroughUrl *CreativeClickThroughUrl `json:"backupImageClickThroughUrl,omitempty"`
3810
3811	// BackupImageFeatures: List of feature dependencies that will cause a
3812	// backup image to be served if the browser that serves the ad does not
3813	// support them. Feature dependencies are features that a browser must
3814	// be able to support in order to render your HTML5 creative asset
3815	// correctly. This field is initially auto-generated to contain all
3816	// features detected by Campaign Manager for all the assets of this
3817	// creative and can then be modified by the client. To reset this field,
3818	// copy over all the creativeAssets' detected features. Applicable to
3819	// the following creative types: HTML5_BANNER. Applicable to DISPLAY
3820	// when the primary asset type is not HTML_IMAGE.
3821	//
3822	// Possible values:
3823	//   "APPLICATION_CACHE"
3824	//   "AUDIO"
3825	//   "CANVAS"
3826	//   "CANVAS_TEXT"
3827	//   "CSS_ANIMATIONS"
3828	//   "CSS_BACKGROUND_SIZE"
3829	//   "CSS_BORDER_IMAGE"
3830	//   "CSS_BORDER_RADIUS"
3831	//   "CSS_BOX_SHADOW"
3832	//   "CSS_COLUMNS"
3833	//   "CSS_FLEX_BOX"
3834	//   "CSS_FONT_FACE"
3835	//   "CSS_GENERATED_CONTENT"
3836	//   "CSS_GRADIENTS"
3837	//   "CSS_HSLA"
3838	//   "CSS_MULTIPLE_BGS"
3839	//   "CSS_OPACITY"
3840	//   "CSS_REFLECTIONS"
3841	//   "CSS_RGBA"
3842	//   "CSS_TEXT_SHADOW"
3843	//   "CSS_TRANSFORMS"
3844	//   "CSS_TRANSFORMS3D"
3845	//   "CSS_TRANSITIONS"
3846	//   "DRAG_AND_DROP"
3847	//   "GEO_LOCATION"
3848	//   "HASH_CHANGE"
3849	//   "HISTORY"
3850	//   "INDEXED_DB"
3851	//   "INLINE_SVG"
3852	//   "INPUT_ATTR_AUTOCOMPLETE"
3853	//   "INPUT_ATTR_AUTOFOCUS"
3854	//   "INPUT_ATTR_LIST"
3855	//   "INPUT_ATTR_MAX"
3856	//   "INPUT_ATTR_MIN"
3857	//   "INPUT_ATTR_MULTIPLE"
3858	//   "INPUT_ATTR_PATTERN"
3859	//   "INPUT_ATTR_PLACEHOLDER"
3860	//   "INPUT_ATTR_REQUIRED"
3861	//   "INPUT_ATTR_STEP"
3862	//   "INPUT_TYPE_COLOR"
3863	//   "INPUT_TYPE_DATE"
3864	//   "INPUT_TYPE_DATETIME"
3865	//   "INPUT_TYPE_DATETIME_LOCAL"
3866	//   "INPUT_TYPE_EMAIL"
3867	//   "INPUT_TYPE_MONTH"
3868	//   "INPUT_TYPE_NUMBER"
3869	//   "INPUT_TYPE_RANGE"
3870	//   "INPUT_TYPE_SEARCH"
3871	//   "INPUT_TYPE_TEL"
3872	//   "INPUT_TYPE_TIME"
3873	//   "INPUT_TYPE_URL"
3874	//   "INPUT_TYPE_WEEK"
3875	//   "LOCAL_STORAGE"
3876	//   "POST_MESSAGE"
3877	//   "SESSION_STORAGE"
3878	//   "SMIL"
3879	//   "SVG_CLIP_PATHS"
3880	//   "SVG_FE_IMAGE"
3881	//   "SVG_FILTERS"
3882	//   "SVG_HREF"
3883	//   "TOUCH"
3884	//   "VIDEO"
3885	//   "WEBGL"
3886	//   "WEB_SOCKETS"
3887	//   "WEB_SQL_DATABASE"
3888	//   "WEB_WORKERS"
3889	BackupImageFeatures []string `json:"backupImageFeatures,omitempty"`
3890
3891	// BackupImageReportingLabel: Reporting label used for HTML5 banner
3892	// backup image. Applicable to the following creative types: DISPLAY
3893	// when the primary asset type is not HTML_IMAGE.
3894	BackupImageReportingLabel string `json:"backupImageReportingLabel,omitempty"`
3895
3896	// BackupImageTargetWindow: Target window for backup image. Applicable
3897	// to the following creative types: FLASH_INPAGE and HTML5_BANNER.
3898	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
3899	BackupImageTargetWindow *TargetWindow `json:"backupImageTargetWindow,omitempty"`
3900
3901	// ClickTags: Click tags of the creative. For DISPLAY, FLASH_INPAGE, and
3902	// HTML5_BANNER creatives, this is a subset of detected click tags for
3903	// the assets associated with this creative. After creating a flash
3904	// asset, detected click tags will be returned in the
3905	// creativeAssetMetadata. When inserting the creative, populate the
3906	// creative clickTags field using the creativeAssetMetadata.clickTags
3907	// field. For DISPLAY_IMAGE_GALLERY creatives, there should be exactly
3908	// one entry in this list for each image creative asset. A click tag is
3909	// matched with a corresponding creative asset by matching the
3910	// clickTag.name field with the creativeAsset.assetIdentifier.name
3911	// field. Applicable to the following creative types:
3912	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER. Applicable to
3913	// DISPLAY when the primary asset type is not HTML_IMAGE.
3914	ClickTags []*ClickTag `json:"clickTags,omitempty"`
3915
3916	// CommercialId: Industry standard ID assigned to creative for reach and
3917	// frequency. Applicable to INSTREAM_VIDEO_REDIRECT creatives.
3918	CommercialId string `json:"commercialId,omitempty"`
3919
3920	// CompanionCreatives: List of companion creatives assigned to an
3921	// in-Stream video creative. Acceptable values include IDs of existing
3922	// flash and image creatives. Applicable to the following creative
3923	// types: all VPAID, all INSTREAM_AUDIO and all INSTREAM_VIDEO with
3924	// dynamicAssetSelection set to false.
3925	CompanionCreatives googleapi.Int64s `json:"companionCreatives,omitempty"`
3926
3927	// Compatibility: Compatibilities associated with this creative. This is
3928	// a read-only field. DISPLAY and DISPLAY_INTERSTITIAL refer to
3929	// rendering either on desktop or on mobile devices or in mobile apps
3930	// for regular or interstitial ads, respectively. APP and
3931	// APP_INTERSTITIAL are for rendering in mobile apps. Only pre-existing
3932	// creatives may have these compatibilities since new creatives will
3933	// either be assigned DISPLAY or DISPLAY_INTERSTITIAL instead.
3934	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
3935	// with the VAST standard. IN_STREAM_AUDIO refers to rendering in
3936	// in-stream audio ads developed with the VAST standard. Applicable to
3937	// all creative types.
3938	//
3939	// Acceptable values are:
3940	// - "APP"
3941	// - "APP_INTERSTITIAL"
3942	// - "IN_STREAM_VIDEO"
3943	// - "IN_STREAM_AUDIO"
3944	// - "DISPLAY"
3945	// - "DISPLAY_INTERSTITIAL"
3946	//
3947	// Possible values:
3948	//   "APP"
3949	//   "APP_INTERSTITIAL"
3950	//   "DISPLAY"
3951	//   "DISPLAY_INTERSTITIAL"
3952	//   "IN_STREAM_AUDIO"
3953	//   "IN_STREAM_VIDEO"
3954	Compatibility []string `json:"compatibility,omitempty"`
3955
3956	// ConvertFlashToHtml5: Whether Flash assets associated with the
3957	// creative need to be automatically converted to HTML5. This flag is
3958	// enabled by default and users can choose to disable it if they don't
3959	// want the system to generate and use HTML5 asset for this creative.
3960	// Applicable to the following creative type: FLASH_INPAGE. Applicable
3961	// to DISPLAY when the primary asset type is not HTML_IMAGE.
3962	ConvertFlashToHtml5 bool `json:"convertFlashToHtml5,omitempty"`
3963
3964	// CounterCustomEvents: List of counter events configured for the
3965	// creative. For DISPLAY_IMAGE_GALLERY creatives, these are read-only
3966	// and auto-generated from clickTags. Applicable to the following
3967	// creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
3968	CounterCustomEvents []*CreativeCustomEvent `json:"counterCustomEvents,omitempty"`
3969
3970	// CreativeAssetSelection: Required if dynamicAssetSelection is true.
3971	CreativeAssetSelection *CreativeAssetSelection `json:"creativeAssetSelection,omitempty"`
3972
3973	// CreativeAssets: Assets associated with a creative. Applicable to all
3974	// but the following creative types: INTERNAL_REDIRECT,
3975	// INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT
3976	CreativeAssets []*CreativeAsset `json:"creativeAssets,omitempty"`
3977
3978	// CreativeFieldAssignments: Creative field assignments for this
3979	// creative. Applicable to all creative types.
3980	CreativeFieldAssignments []*CreativeFieldAssignment `json:"creativeFieldAssignments,omitempty"`
3981
3982	// CustomKeyValues: Custom key-values for a Rich Media creative.
3983	// Key-values let you customize the creative settings of a Rich Media ad
3984	// running on your site without having to contact the advertiser. You
3985	// can use key-values to dynamically change the look or functionality of
3986	// a creative. Applicable to the following creative types: all
3987	// RICH_MEDIA, and all VPAID.
3988	CustomKeyValues []string `json:"customKeyValues,omitempty"`
3989
3990	// DynamicAssetSelection: Set this to true to enable the use of rules to
3991	// target individual assets in this creative. When set to true
3992	// creativeAssetSelection must be set. This also controls asset-level
3993	// companions. When this is true, companion creatives should be assigned
3994	// to creative assets. Learn more. Applicable to INSTREAM_VIDEO
3995	// creatives.
3996	DynamicAssetSelection bool `json:"dynamicAssetSelection,omitempty"`
3997
3998	// ExitCustomEvents: List of exit events configured for the creative.
3999	// For DISPLAY and DISPLAY_IMAGE_GALLERY creatives, these are read-only
4000	// and auto-generated from clickTags, For DISPLAY, an event is also
4001	// created from the backupImageReportingLabel. Applicable to the
4002	// following creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and
4003	// all VPAID. Applicable to DISPLAY when the primary asset type is not
4004	// HTML_IMAGE.
4005	ExitCustomEvents []*CreativeCustomEvent `json:"exitCustomEvents,omitempty"`
4006
4007	// FsCommand: OpenWindow FSCommand of this creative. This lets the SWF
4008	// file communicate with either Flash Player or the program hosting
4009	// Flash Player, such as a web browser. This is only triggered if
4010	// allowScriptAccess field is true. Applicable to the following creative
4011	// types: FLASH_INPAGE.
4012	FsCommand *FsCommand `json:"fsCommand,omitempty"`
4013
4014	// HtmlCode: HTML code for the creative. This is a required field when
4015	// applicable. This field is ignored if htmlCodeLocked is true.
4016	// Applicable to the following creative types: all CUSTOM, FLASH_INPAGE,
4017	// and HTML5_BANNER, and all RICH_MEDIA.
4018	HtmlCode string `json:"htmlCode,omitempty"`
4019
4020	// HtmlCodeLocked: Whether HTML code is generated by Campaign Manager or
4021	// manually entered. Set to true to ignore changes to htmlCode.
4022	// Applicable to the following creative types: FLASH_INPAGE and
4023	// HTML5_BANNER.
4024	HtmlCodeLocked bool `json:"htmlCodeLocked,omitempty"`
4025
4026	// Id: ID of this creative. This is a read-only, auto-generated field.
4027	// Applicable to all creative types.
4028	Id int64 `json:"id,omitempty,string"`
4029
4030	// IdDimensionValue: Dimension value for the ID of this creative. This
4031	// is a read-only field. Applicable to all creative types.
4032	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4033
4034	// Kind: Identifies what kind of resource this is. Value: the fixed
4035	// string "dfareporting#creative".
4036	Kind string `json:"kind,omitempty"`
4037
4038	// LastModifiedInfo: Creative last modification information. This is a
4039	// read-only field. Applicable to all creative types.
4040	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
4041
4042	// LatestTraffickedCreativeId: Latest Studio trafficked creative ID
4043	// associated with rich media and VPAID creatives. This is a read-only
4044	// field. Applicable to the following creative types: all RICH_MEDIA,
4045	// and all VPAID.
4046	LatestTraffickedCreativeId int64 `json:"latestTraffickedCreativeId,omitempty,string"`
4047
4048	// MediaDescription: Description of the audio or video ad. Applicable to
4049	// the following creative types: all INSTREAM_VIDEO, INSTREAM_AUDIO, and
4050	// all VPAID.
4051	MediaDescription string `json:"mediaDescription,omitempty"`
4052
4053	// MediaDuration: Creative audio or video duration in seconds. This is a
4054	// read-only field. Applicable to the following creative types:
4055	// INSTREAM_VIDEO, INSTREAM_AUDIO, all RICH_MEDIA, and all VPAID.
4056	MediaDuration float64 `json:"mediaDuration,omitempty"`
4057
4058	// Name: Name of the creative. This is a required field and must be less
4059	// than 256 characters long. Applicable to all creative types.
4060	Name string `json:"name,omitempty"`
4061
4062	// OverrideCss: Override CSS value for rich media creatives. Applicable
4063	// to the following creative types: all RICH_MEDIA.
4064	OverrideCss string `json:"overrideCss,omitempty"`
4065
4066	// ProgressOffset: Amount of time to play the video before counting a
4067	// view. Applicable to the following creative types: all INSTREAM_VIDEO.
4068	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
4069
4070	// RedirectUrl: URL of hosted image or hosted video or another ad tag.
4071	// For INSTREAM_VIDEO_REDIRECT creatives this is the in-stream video
4072	// redirect URL. The standard for a VAST (Video Ad Serving Template) ad
4073	// response allows for a redirect link to another VAST 2.0 or 3.0 call.
4074	// This is a required field when applicable. Applicable to the following
4075	// creative types: DISPLAY_REDIRECT, INTERNAL_REDIRECT,
4076	// INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO_REDIRECT
4077	RedirectUrl string `json:"redirectUrl,omitempty"`
4078
4079	// RenderingId: ID of current rendering version. This is a read-only
4080	// field. Applicable to all creative types.
4081	RenderingId int64 `json:"renderingId,omitempty,string"`
4082
4083	// RenderingIdDimensionValue: Dimension value for the rendering ID of
4084	// this creative. This is a read-only field. Applicable to all creative
4085	// types.
4086	RenderingIdDimensionValue *DimensionValue `json:"renderingIdDimensionValue,omitempty"`
4087
4088	// RequiredFlashPluginVersion: The minimum required Flash plugin version
4089	// for this creative. For example, 11.2.202.235. This is a read-only
4090	// field. Applicable to the following creative types: all RICH_MEDIA,
4091	// and all VPAID.
4092	RequiredFlashPluginVersion string `json:"requiredFlashPluginVersion,omitempty"`
4093
4094	// RequiredFlashVersion: The internal Flash version for this creative as
4095	// calculated by Studio. This is a read-only field. Applicable to the
4096	// following creative types: FLASH_INPAGE all RICH_MEDIA, and all VPAID.
4097	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
4098	RequiredFlashVersion int64 `json:"requiredFlashVersion,omitempty"`
4099
4100	// Size: Size associated with this creative. When inserting or updating
4101	// a creative either the size ID field or size width and height fields
4102	// can be used. This is a required field when applicable; however for
4103	// IMAGE, FLASH_INPAGE creatives, and for DISPLAY creatives with a
4104	// primary asset of type HTML_IMAGE, if left blank, this field will be
4105	// automatically set using the actual size of the associated image
4106	// assets. Applicable to the following creative types: DISPLAY,
4107	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all
4108	// RICH_MEDIA.
4109	Size *Size `json:"size,omitempty"`
4110
4111	// SkipOffset: Amount of time to play the video before the skip button
4112	// appears. Applicable to the following creative types: all
4113	// INSTREAM_VIDEO.
4114	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
4115
4116	// Skippable: Whether the user can choose to skip the creative.
4117	// Applicable to the following creative types: all INSTREAM_VIDEO and
4118	// all VPAID.
4119	Skippable bool `json:"skippable,omitempty"`
4120
4121	// SslCompliant: Whether the creative is SSL-compliant. This is a
4122	// read-only field. Applicable to all creative types.
4123	SslCompliant bool `json:"sslCompliant,omitempty"`
4124
4125	// SslOverride: Whether creative should be treated as SSL compliant even
4126	// if the system scan shows it's not. Applicable to all creative types.
4127	SslOverride bool `json:"sslOverride,omitempty"`
4128
4129	// StudioAdvertiserId: Studio advertiser ID associated with rich media
4130	// and VPAID creatives. This is a read-only field. Applicable to the
4131	// following creative types: all RICH_MEDIA, and all VPAID.
4132	StudioAdvertiserId int64 `json:"studioAdvertiserId,omitempty,string"`
4133
4134	// StudioCreativeId: Studio creative ID associated with rich media and
4135	// VPAID creatives. This is a read-only field. Applicable to the
4136	// following creative types: all RICH_MEDIA, and all VPAID.
4137	StudioCreativeId int64 `json:"studioCreativeId,omitempty,string"`
4138
4139	// StudioTraffickedCreativeId: Studio trafficked creative ID associated
4140	// with rich media and VPAID creatives. This is a read-only field.
4141	// Applicable to the following creative types: all RICH_MEDIA, and all
4142	// VPAID.
4143	StudioTraffickedCreativeId int64 `json:"studioTraffickedCreativeId,omitempty,string"`
4144
4145	// SubaccountId: Subaccount ID of this creative. This field, if left
4146	// unset, will be auto-generated for both insert and update operations.
4147	// Applicable to all creative types.
4148	SubaccountId int64 `json:"subaccountId,omitempty,string"`
4149
4150	// ThirdPartyBackupImageImpressionsUrl: Third-party URL used to record
4151	// backup image impressions. Applicable to the following creative types:
4152	// all RICH_MEDIA.
4153	ThirdPartyBackupImageImpressionsUrl string `json:"thirdPartyBackupImageImpressionsUrl,omitempty"`
4154
4155	// ThirdPartyRichMediaImpressionsUrl: Third-party URL used to record
4156	// rich media impressions. Applicable to the following creative types:
4157	// all RICH_MEDIA.
4158	ThirdPartyRichMediaImpressionsUrl string `json:"thirdPartyRichMediaImpressionsUrl,omitempty"`
4159
4160	// ThirdPartyUrls: Third-party URLs for tracking in-stream creative
4161	// events. Applicable to the following creative types: all
4162	// INSTREAM_VIDEO, all INSTREAM_AUDIO, and all VPAID.
4163	ThirdPartyUrls []*ThirdPartyTrackingUrl `json:"thirdPartyUrls,omitempty"`
4164
4165	// TimerCustomEvents: List of timer events configured for the creative.
4166	// For DISPLAY_IMAGE_GALLERY creatives, these are read-only and
4167	// auto-generated from clickTags. Applicable to the following creative
4168	// types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
4169	// Applicable to DISPLAY when the primary asset is not HTML_IMAGE.
4170	TimerCustomEvents []*CreativeCustomEvent `json:"timerCustomEvents,omitempty"`
4171
4172	// TotalFileSize: Combined size of all creative assets. This is a
4173	// read-only field. Applicable to the following creative types: all
4174	// RICH_MEDIA, and all VPAID.
4175	TotalFileSize int64 `json:"totalFileSize,omitempty,string"`
4176
4177	// Type: Type of this creative. This is a required field. Applicable to
4178	// all creative types.
4179	//
4180	// Note: FLASH_INPAGE, HTML5_BANNER, and IMAGE are only used for
4181	// existing creatives. New creatives should use DISPLAY as a replacement
4182	// for these types.
4183	//
4184	// Possible values:
4185	//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
4186	//   "CUSTOM_DISPLAY"
4187	//   "CUSTOM_DISPLAY_INTERSTITIAL"
4188	//   "DISPLAY"
4189	//   "DISPLAY_IMAGE_GALLERY"
4190	//   "DISPLAY_REDIRECT"
4191	//   "FLASH_INPAGE"
4192	//   "HTML5_BANNER"
4193	//   "IMAGE"
4194	//   "INSTREAM_AUDIO"
4195	//   "INSTREAM_VIDEO"
4196	//   "INSTREAM_VIDEO_REDIRECT"
4197	//   "INTERNAL_REDIRECT"
4198	//   "INTERSTITIAL_INTERNAL_REDIRECT"
4199	//   "RICH_MEDIA_DISPLAY_BANNER"
4200	//   "RICH_MEDIA_DISPLAY_EXPANDING"
4201	//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
4202	//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
4203	//   "RICH_MEDIA_IM_EXPAND"
4204	//   "RICH_MEDIA_INPAGE_FLOATING"
4205	//   "RICH_MEDIA_MOBILE_IN_APP"
4206	//   "RICH_MEDIA_PEEL_DOWN"
4207	//   "TRACKING_TEXT"
4208	//   "VPAID_LINEAR_VIDEO"
4209	//   "VPAID_NON_LINEAR_VIDEO"
4210	Type string `json:"type,omitempty"`
4211
4212	// UniversalAdId: A Universal Ad ID as per the VAST 4.0 spec. Applicable
4213	// to the following creative types: INSTREAM_AUDIO and INSTREAM_VIDEO
4214	// and VPAID.
4215	UniversalAdId *UniversalAdId `json:"universalAdId,omitempty"`
4216
4217	// Version: The version number helps you keep track of multiple versions
4218	// of your creative in your reports. The version number will always be
4219	// auto-generated during insert operations to start at 1. For tracking
4220	// creatives the version cannot be incremented and will always remain at
4221	// 1. For all other creative types the version can be incremented only
4222	// by 1 during update operations. In addition, the version will be
4223	// automatically incremented by 1 when undergoing Rich Media creative
4224	// merging. Applicable to all creative types.
4225	Version int64 `json:"version,omitempty"`
4226
4227	// ServerResponse contains the HTTP response code and headers from the
4228	// server.
4229	googleapi.ServerResponse `json:"-"`
4230
4231	// ForceSendFields is a list of field names (e.g. "AccountId") to
4232	// unconditionally include in API requests. By default, fields with
4233	// empty values are omitted from API requests. However, any non-pointer,
4234	// non-interface field appearing in ForceSendFields will be sent to the
4235	// server regardless of whether the field is empty or not. This may be
4236	// used to include empty fields in Patch requests.
4237	ForceSendFields []string `json:"-"`
4238
4239	// NullFields is a list of field names (e.g. "AccountId") to include in
4240	// API requests with the JSON null value. By default, fields with empty
4241	// values are omitted from API requests. However, any field with an
4242	// empty value appearing in NullFields will be sent to the server as
4243	// null. It is an error if a field in this list has a non-empty value.
4244	// This may be used to include null fields in Patch requests.
4245	NullFields []string `json:"-"`
4246}
4247
4248func (s *Creative) MarshalJSON() ([]byte, error) {
4249	type NoMethod Creative
4250	raw := NoMethod(*s)
4251	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4252}
4253
4254func (s *Creative) UnmarshalJSON(data []byte) error {
4255	type NoMethod Creative
4256	var s1 struct {
4257		MediaDuration gensupport.JSONFloat64 `json:"mediaDuration"`
4258		*NoMethod
4259	}
4260	s1.NoMethod = (*NoMethod)(s)
4261	if err := json.Unmarshal(data, &s1); err != nil {
4262		return err
4263	}
4264	s.MediaDuration = float64(s1.MediaDuration)
4265	return nil
4266}
4267
4268// CreativeAsset: Creative Asset.
4269type CreativeAsset struct {
4270	// ActionScript3: Whether ActionScript3 is enabled for the flash asset.
4271	// This is a read-only field. Applicable to the following creative type:
4272	// FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is
4273	// not HTML_IMAGE.
4274	ActionScript3 bool `json:"actionScript3,omitempty"`
4275
4276	// Active: Whether the video or audio asset is active. This is a
4277	// read-only field for VPAID_NON_LINEAR_VIDEO assets. Applicable to the
4278	// following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and all
4279	// VPAID.
4280	Active bool `json:"active,omitempty"`
4281
4282	// AdditionalSizes: Additional sizes associated with this creative
4283	// asset. HTML5 asset generated by compatible software such as GWD will
4284	// be able to support more sizes this creative asset can render.
4285	AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
4286
4287	// Alignment: Possible alignments for an asset. This is a read-only
4288	// field. Applicable to the following creative types:
4289	// RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL.
4290	//
4291	// Possible values:
4292	//   "ALIGNMENT_BOTTOM"
4293	//   "ALIGNMENT_LEFT"
4294	//   "ALIGNMENT_RIGHT"
4295	//   "ALIGNMENT_TOP"
4296	Alignment string `json:"alignment,omitempty"`
4297
4298	// ArtworkType: Artwork type of rich media creative. This is a read-only
4299	// field. Applicable to the following creative types: all RICH_MEDIA.
4300	//
4301	// Possible values:
4302	//   "ARTWORK_TYPE_FLASH"
4303	//   "ARTWORK_TYPE_HTML5"
4304	//   "ARTWORK_TYPE_IMAGE"
4305	//   "ARTWORK_TYPE_MIXED"
4306	ArtworkType string `json:"artworkType,omitempty"`
4307
4308	// AssetIdentifier: Identifier of this asset. This is the same
4309	// identifier returned during creative asset insert operation. This is a
4310	// required field. Applicable to all but the following creative types:
4311	// all REDIRECT and TRACKING_TEXT.
4312	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4313
4314	// AudioBitRate: Audio stream bit rate in kbps. This is a read-only
4315	// field. Applicable to the following creative types: INSTREAM_AUDIO,
4316	// INSTREAM_VIDEO and all VPAID.
4317	AudioBitRate int64 `json:"audioBitRate,omitempty"`
4318
4319	// AudioSampleRate: Audio sample bit rate in hertz. This is a read-only
4320	// field. Applicable to the following creative types: INSTREAM_AUDIO,
4321	// INSTREAM_VIDEO and all VPAID.
4322	AudioSampleRate int64 `json:"audioSampleRate,omitempty"`
4323
4324	// BackupImageExit: Exit event configured for the backup image.
4325	// Applicable to the following creative types: all RICH_MEDIA.
4326	BackupImageExit *CreativeCustomEvent `json:"backupImageExit,omitempty"`
4327
4328	// BitRate: Detected bit-rate for audio or video asset. This is a
4329	// read-only field. Applicable to the following creative types:
4330	// INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
4331	BitRate int64 `json:"bitRate,omitempty"`
4332
4333	// ChildAssetType: Rich media child asset type. This is a read-only
4334	// field. Applicable to the following creative types: all VPAID.
4335	//
4336	// Possible values:
4337	//   "CHILD_ASSET_TYPE_DATA"
4338	//   "CHILD_ASSET_TYPE_FLASH"
4339	//   "CHILD_ASSET_TYPE_IMAGE"
4340	//   "CHILD_ASSET_TYPE_VIDEO"
4341	ChildAssetType string `json:"childAssetType,omitempty"`
4342
4343	// CollapsedSize: Size of an asset when collapsed. This is a read-only
4344	// field. Applicable to the following creative types: all RICH_MEDIA and
4345	// all VPAID. Additionally, applicable to assets whose displayType is
4346	// ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN.
4347	CollapsedSize *Size `json:"collapsedSize,omitempty"`
4348
4349	// CompanionCreativeIds: List of companion creatives assigned to an
4350	// in-stream video creative asset. Acceptable values include IDs of
4351	// existing flash and image creatives. Applicable to INSTREAM_VIDEO
4352	// creative type with dynamicAssetSelection set to true.
4353	CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"`
4354
4355	// CustomStartTimeValue: Custom start time in seconds for making the
4356	// asset visible. Applicable to the following creative types: all
4357	// RICH_MEDIA. Value must be greater than or equal to 0.
4358	CustomStartTimeValue int64 `json:"customStartTimeValue,omitempty"`
4359
4360	// DetectedFeatures: List of feature dependencies for the creative asset
4361	// that are detected by Campaign Manager. Feature dependencies are
4362	// features that a browser must be able to support in order to render
4363	// your HTML5 creative correctly. This is a read-only, auto-generated
4364	// field. Applicable to the following creative types: HTML5_BANNER.
4365	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
4366	//
4367	// Possible values:
4368	//   "APPLICATION_CACHE"
4369	//   "AUDIO"
4370	//   "CANVAS"
4371	//   "CANVAS_TEXT"
4372	//   "CSS_ANIMATIONS"
4373	//   "CSS_BACKGROUND_SIZE"
4374	//   "CSS_BORDER_IMAGE"
4375	//   "CSS_BORDER_RADIUS"
4376	//   "CSS_BOX_SHADOW"
4377	//   "CSS_COLUMNS"
4378	//   "CSS_FLEX_BOX"
4379	//   "CSS_FONT_FACE"
4380	//   "CSS_GENERATED_CONTENT"
4381	//   "CSS_GRADIENTS"
4382	//   "CSS_HSLA"
4383	//   "CSS_MULTIPLE_BGS"
4384	//   "CSS_OPACITY"
4385	//   "CSS_REFLECTIONS"
4386	//   "CSS_RGBA"
4387	//   "CSS_TEXT_SHADOW"
4388	//   "CSS_TRANSFORMS"
4389	//   "CSS_TRANSFORMS3D"
4390	//   "CSS_TRANSITIONS"
4391	//   "DRAG_AND_DROP"
4392	//   "GEO_LOCATION"
4393	//   "HASH_CHANGE"
4394	//   "HISTORY"
4395	//   "INDEXED_DB"
4396	//   "INLINE_SVG"
4397	//   "INPUT_ATTR_AUTOCOMPLETE"
4398	//   "INPUT_ATTR_AUTOFOCUS"
4399	//   "INPUT_ATTR_LIST"
4400	//   "INPUT_ATTR_MAX"
4401	//   "INPUT_ATTR_MIN"
4402	//   "INPUT_ATTR_MULTIPLE"
4403	//   "INPUT_ATTR_PATTERN"
4404	//   "INPUT_ATTR_PLACEHOLDER"
4405	//   "INPUT_ATTR_REQUIRED"
4406	//   "INPUT_ATTR_STEP"
4407	//   "INPUT_TYPE_COLOR"
4408	//   "INPUT_TYPE_DATE"
4409	//   "INPUT_TYPE_DATETIME"
4410	//   "INPUT_TYPE_DATETIME_LOCAL"
4411	//   "INPUT_TYPE_EMAIL"
4412	//   "INPUT_TYPE_MONTH"
4413	//   "INPUT_TYPE_NUMBER"
4414	//   "INPUT_TYPE_RANGE"
4415	//   "INPUT_TYPE_SEARCH"
4416	//   "INPUT_TYPE_TEL"
4417	//   "INPUT_TYPE_TIME"
4418	//   "INPUT_TYPE_URL"
4419	//   "INPUT_TYPE_WEEK"
4420	//   "LOCAL_STORAGE"
4421	//   "POST_MESSAGE"
4422	//   "SESSION_STORAGE"
4423	//   "SMIL"
4424	//   "SVG_CLIP_PATHS"
4425	//   "SVG_FE_IMAGE"
4426	//   "SVG_FILTERS"
4427	//   "SVG_HREF"
4428	//   "TOUCH"
4429	//   "VIDEO"
4430	//   "WEBGL"
4431	//   "WEB_SOCKETS"
4432	//   "WEB_SQL_DATABASE"
4433	//   "WEB_WORKERS"
4434	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4435
4436	// DisplayType: Type of rich media asset. This is a read-only field.
4437	// Applicable to the following creative types: all RICH_MEDIA.
4438	//
4439	// Possible values:
4440	//   "ASSET_DISPLAY_TYPE_BACKDROP"
4441	//   "ASSET_DISPLAY_TYPE_EXPANDING"
4442	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH"
4443	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH_EXPANDING"
4444	//   "ASSET_DISPLAY_TYPE_FLOATING"
4445	//   "ASSET_DISPLAY_TYPE_INPAGE"
4446	//   "ASSET_DISPLAY_TYPE_OVERLAY"
4447	//   "ASSET_DISPLAY_TYPE_PEEL_DOWN"
4448	//   "ASSET_DISPLAY_TYPE_VPAID_LINEAR"
4449	//   "ASSET_DISPLAY_TYPE_VPAID_NON_LINEAR"
4450	DisplayType string `json:"displayType,omitempty"`
4451
4452	// Duration: Duration in seconds for which an asset will be displayed.
4453	// Applicable to the following creative types: INSTREAM_AUDIO,
4454	// INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. Value must be greater than or
4455	// equal to 1.
4456	Duration int64 `json:"duration,omitempty"`
4457
4458	// DurationType: Duration type for which an asset will be displayed.
4459	// Applicable to the following creative types: all RICH_MEDIA.
4460	//
4461	// Possible values:
4462	//   "ASSET_DURATION_TYPE_AUTO"
4463	//   "ASSET_DURATION_TYPE_CUSTOM"
4464	//   "ASSET_DURATION_TYPE_NONE"
4465	DurationType string `json:"durationType,omitempty"`
4466
4467	// ExpandedDimension: Detected expanded dimension for video asset. This
4468	// is a read-only field. Applicable to the following creative types:
4469	// INSTREAM_VIDEO and all VPAID.
4470	ExpandedDimension *Size `json:"expandedDimension,omitempty"`
4471
4472	// FileSize: File size associated with this creative asset. This is a
4473	// read-only field. Applicable to all but the following creative types:
4474	// all REDIRECT and TRACKING_TEXT.
4475	FileSize int64 `json:"fileSize,omitempty,string"`
4476
4477	// FlashVersion: Flash version of the asset. This is a read-only field.
4478	// Applicable to the following creative types: FLASH_INPAGE, all
4479	// RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
4480	// asset type is not HTML_IMAGE.
4481	FlashVersion int64 `json:"flashVersion,omitempty"`
4482
4483	// FrameRate: Video frame rate for video asset in frames per second.
4484	// This is a read-only field. Applicable to the following creative
4485	// types: INSTREAM_VIDEO and all VPAID.
4486	FrameRate float64 `json:"frameRate,omitempty"`
4487
4488	// HideFlashObjects: Whether to hide Flash objects flag for an asset.
4489	// Applicable to the following creative types: all RICH_MEDIA.
4490	HideFlashObjects bool `json:"hideFlashObjects,omitempty"`
4491
4492	// HideSelectionBoxes: Whether to hide selection boxes flag for an
4493	// asset. Applicable to the following creative types: all RICH_MEDIA.
4494	HideSelectionBoxes bool `json:"hideSelectionBoxes,omitempty"`
4495
4496	// HorizontallyLocked: Whether the asset is horizontally locked. This is
4497	// a read-only field. Applicable to the following creative types: all
4498	// RICH_MEDIA.
4499	HorizontallyLocked bool `json:"horizontallyLocked,omitempty"`
4500
4501	// Id: Numeric ID of this creative asset. This is a required field and
4502	// should not be modified. Applicable to all but the following creative
4503	// types: all REDIRECT and TRACKING_TEXT.
4504	Id int64 `json:"id,omitempty,string"`
4505
4506	// IdDimensionValue: Dimension value for the ID of the asset. This is a
4507	// read-only, auto-generated field.
4508	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4509
4510	// MediaDuration: Detected duration for audio or video asset. This is a
4511	// read-only field. Applicable to the following creative types:
4512	// INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
4513	MediaDuration float64 `json:"mediaDuration,omitempty"`
4514
4515	// MimeType: Detected MIME type for audio or video asset. This is a
4516	// read-only field. Applicable to the following creative types:
4517	// INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
4518	MimeType string `json:"mimeType,omitempty"`
4519
4520	// Offset: Offset position for an asset in collapsed mode. This is a
4521	// read-only field. Applicable to the following creative types: all
4522	// RICH_MEDIA and all VPAID. Additionally, only applicable to assets
4523	// whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or
4524	// ASSET_DISPLAY_TYPE_PEEL_DOWN.
4525	Offset *OffsetPosition `json:"offset,omitempty"`
4526
4527	// Orientation: Orientation of video asset. This is a read-only,
4528	// auto-generated field.
4529	//
4530	// Possible values:
4531	//   "LANDSCAPE"
4532	//   "PORTRAIT"
4533	//   "SQUARE"
4534	Orientation string `json:"orientation,omitempty"`
4535
4536	// OriginalBackup: Whether the backup asset is original or changed by
4537	// the user in Campaign Manager. Applicable to the following creative
4538	// types: all RICH_MEDIA.
4539	OriginalBackup bool `json:"originalBackup,omitempty"`
4540
4541	// PoliteLoad: Whether this asset is used as a polite load asset.
4542	PoliteLoad bool `json:"politeLoad,omitempty"`
4543
4544	// Position: Offset position for an asset. Applicable to the following
4545	// creative types: all RICH_MEDIA.
4546	Position *OffsetPosition `json:"position,omitempty"`
4547
4548	// PositionLeftUnit: Offset left unit for an asset. This is a read-only
4549	// field. Applicable to the following creative types: all RICH_MEDIA.
4550	//
4551	// Possible values:
4552	//   "OFFSET_UNIT_PERCENT"
4553	//   "OFFSET_UNIT_PIXEL"
4554	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4555	PositionLeftUnit string `json:"positionLeftUnit,omitempty"`
4556
4557	// PositionTopUnit: Offset top unit for an asset. This is a read-only
4558	// field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY.
4559	// Applicable to the following creative types: all RICH_MEDIA.
4560	//
4561	// Possible values:
4562	//   "OFFSET_UNIT_PERCENT"
4563	//   "OFFSET_UNIT_PIXEL"
4564	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4565	PositionTopUnit string `json:"positionTopUnit,omitempty"`
4566
4567	// ProgressiveServingUrl: Progressive URL for video asset. This is a
4568	// read-only field. Applicable to the following creative types:
4569	// INSTREAM_VIDEO and all VPAID.
4570	ProgressiveServingUrl string `json:"progressiveServingUrl,omitempty"`
4571
4572	// Pushdown: Whether the asset pushes down other content. Applicable to
4573	// the following creative types: all RICH_MEDIA. Additionally, only
4574	// applicable when the asset offsets are 0, the collapsedSize.width
4575	// matches size.width, and the collapsedSize.height is less than
4576	// size.height.
4577	Pushdown bool `json:"pushdown,omitempty"`
4578
4579	// PushdownDuration: Pushdown duration in seconds for an asset.
4580	// Applicable to the following creative types: all
4581	// RICH_MEDIA.Additionally, only applicable when the asset pushdown
4582	// field is true, the offsets are 0, the collapsedSize.width matches
4583	// size.width, and the collapsedSize.height is less than size.height.
4584	// Acceptable values are 0 to 9.99, inclusive.
4585	PushdownDuration float64 `json:"pushdownDuration,omitempty"`
4586
4587	// Role: Role of the asset in relation to creative. Applicable to all
4588	// but the following creative types: all REDIRECT and TRACKING_TEXT.
4589	// This is a required field.
4590	// PRIMARY applies to DISPLAY, FLASH_INPAGE, HTML5_BANNER, IMAGE,
4591	// DISPLAY_IMAGE_GALLERY, all RICH_MEDIA (which may contain multiple
4592	// primary assets), and all VPAID creatives.
4593	// BACKUP_IMAGE applies to FLASH_INPAGE, HTML5_BANNER, all RICH_MEDIA,
4594	// and all VPAID creatives. Applicable to DISPLAY when the primary asset
4595	// type is not HTML_IMAGE.
4596	// ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply to FLASH_INPAGE
4597	// creatives.
4598	// OTHER refers to assets from sources other than Campaign Manager, such
4599	// as Studio uploaded assets, applicable to all RICH_MEDIA and all VPAID
4600	// creatives.
4601	// PARENT_VIDEO refers to videos uploaded by the user in Campaign
4602	// Manager and is applicable to INSTREAM_VIDEO and VPAID_LINEAR_VIDEO
4603	// creatives.
4604	// TRANSCODED_VIDEO refers to videos transcoded by Campaign Manager from
4605	// PARENT_VIDEO assets and is applicable to INSTREAM_VIDEO and
4606	// VPAID_LINEAR_VIDEO creatives.
4607	// ALTERNATE_VIDEO refers to the Campaign Manager representation of
4608	// child asset videos from Studio, and is applicable to
4609	// VPAID_LINEAR_VIDEO creatives. These cannot be added or removed within
4610	// Campaign Manager.
4611	// For VPAID_LINEAR_VIDEO creatives, PARENT_VIDEO, TRANSCODED_VIDEO and
4612	// ALTERNATE_VIDEO assets that are marked active serve as backup in case
4613	// the VPAID creative cannot be served. Only PARENT_VIDEO assets can be
4614	// added or removed for an INSTREAM_VIDEO or VPAID_LINEAR_VIDEO
4615	// creative.
4616	// PARENT_AUDIO refers to audios uploaded by the user in Campaign
4617	// Manager and is applicable to INSTREAM_AUDIO
4618	// creatives.
4619	// TRANSCODED_AUDIO refers to audios transcoded by Campaign Manager from
4620	// PARENT_AUDIO assets and is applicable to INSTREAM_AUDIO creatives.
4621	//
4622	// Possible values:
4623	//   "ADDITIONAL_FLASH"
4624	//   "ADDITIONAL_IMAGE"
4625	//   "ALTERNATE_VIDEO"
4626	//   "BACKUP_IMAGE"
4627	//   "OTHER"
4628	//   "PARENT_AUDIO"
4629	//   "PARENT_VIDEO"
4630	//   "PRIMARY"
4631	//   "TRANSCODED_AUDIO"
4632	//   "TRANSCODED_VIDEO"
4633	Role string `json:"role,omitempty"`
4634
4635	// Size: Size associated with this creative asset. This is a required
4636	// field when applicable; however for IMAGE and FLASH_INPAGE, creatives
4637	// if left blank, this field will be automatically set using the actual
4638	// size of the associated image asset. Applicable to the following
4639	// creative types: DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER,
4640	// IMAGE, and all RICH_MEDIA. Applicable to DISPLAY when the primary
4641	// asset type is not HTML_IMAGE.
4642	Size *Size `json:"size,omitempty"`
4643
4644	// SslCompliant: Whether the asset is SSL-compliant. This is a read-only
4645	// field. Applicable to all but the following creative types: all
4646	// REDIRECT and TRACKING_TEXT.
4647	SslCompliant bool `json:"sslCompliant,omitempty"`
4648
4649	// StartTimeType: Initial wait time type before making the asset
4650	// visible. Applicable to the following creative types: all RICH_MEDIA.
4651	//
4652	// Possible values:
4653	//   "ASSET_START_TIME_TYPE_CUSTOM"
4654	//   "ASSET_START_TIME_TYPE_NONE"
4655	StartTimeType string `json:"startTimeType,omitempty"`
4656
4657	// StreamingServingUrl: Streaming URL for video asset. This is a
4658	// read-only field. Applicable to the following creative types:
4659	// INSTREAM_VIDEO and all VPAID.
4660	StreamingServingUrl string `json:"streamingServingUrl,omitempty"`
4661
4662	// Transparency: Whether the asset is transparent. Applicable to the
4663	// following creative types: all RICH_MEDIA. Additionally, only
4664	// applicable to HTML5 assets.
4665	Transparency bool `json:"transparency,omitempty"`
4666
4667	// VerticallyLocked: Whether the asset is vertically locked. This is a
4668	// read-only field. Applicable to the following creative types: all
4669	// RICH_MEDIA.
4670	VerticallyLocked bool `json:"verticallyLocked,omitempty"`
4671
4672	// WindowMode: Window mode options for flash assets. Applicable to the
4673	// following creative types: FLASH_INPAGE, RICH_MEDIA_DISPLAY_EXPANDING,
4674	// RICH_MEDIA_IM_EXPAND, RICH_MEDIA_DISPLAY_BANNER, and
4675	// RICH_MEDIA_INPAGE_FLOATING.
4676	//
4677	// Possible values:
4678	//   "OPAQUE"
4679	//   "TRANSPARENT"
4680	//   "WINDOW"
4681	WindowMode string `json:"windowMode,omitempty"`
4682
4683	// ZIndex: zIndex value of an asset. Applicable to the following
4684	// creative types: all RICH_MEDIA.Additionally, only applicable to
4685	// assets whose displayType is NOT one of the following types:
4686	// ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable
4687	// values are -999999999 to 999999999, inclusive.
4688	ZIndex int64 `json:"zIndex,omitempty"`
4689
4690	// ZipFilename: File name of zip file. This is a read-only field.
4691	// Applicable to the following creative types: HTML5_BANNER.
4692	ZipFilename string `json:"zipFilename,omitempty"`
4693
4694	// ZipFilesize: Size of zip file. This is a read-only field. Applicable
4695	// to the following creative types: HTML5_BANNER.
4696	ZipFilesize string `json:"zipFilesize,omitempty"`
4697
4698	// ForceSendFields is a list of field names (e.g. "ActionScript3") to
4699	// unconditionally include in API requests. By default, fields with
4700	// empty values are omitted from API requests. However, any non-pointer,
4701	// non-interface field appearing in ForceSendFields will be sent to the
4702	// server regardless of whether the field is empty or not. This may be
4703	// used to include empty fields in Patch requests.
4704	ForceSendFields []string `json:"-"`
4705
4706	// NullFields is a list of field names (e.g. "ActionScript3") to include
4707	// in API requests with the JSON null value. By default, fields with
4708	// empty values are omitted from API requests. However, any field with
4709	// an empty value appearing in NullFields will be sent to the server as
4710	// null. It is an error if a field in this list has a non-empty value.
4711	// This may be used to include null fields in Patch requests.
4712	NullFields []string `json:"-"`
4713}
4714
4715func (s *CreativeAsset) MarshalJSON() ([]byte, error) {
4716	type NoMethod CreativeAsset
4717	raw := NoMethod(*s)
4718	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4719}
4720
4721func (s *CreativeAsset) UnmarshalJSON(data []byte) error {
4722	type NoMethod CreativeAsset
4723	var s1 struct {
4724		FrameRate        gensupport.JSONFloat64 `json:"frameRate"`
4725		MediaDuration    gensupport.JSONFloat64 `json:"mediaDuration"`
4726		PushdownDuration gensupport.JSONFloat64 `json:"pushdownDuration"`
4727		*NoMethod
4728	}
4729	s1.NoMethod = (*NoMethod)(s)
4730	if err := json.Unmarshal(data, &s1); err != nil {
4731		return err
4732	}
4733	s.FrameRate = float64(s1.FrameRate)
4734	s.MediaDuration = float64(s1.MediaDuration)
4735	s.PushdownDuration = float64(s1.PushdownDuration)
4736	return nil
4737}
4738
4739// CreativeAssetId: Creative Asset ID.
4740type CreativeAssetId struct {
4741	// Name: Name of the creative asset. This is a required field while
4742	// inserting an asset. After insertion, this assetIdentifier is used to
4743	// identify the uploaded asset. Characters in the name must be
4744	// alphanumeric or one of the following: ".-_ ". Spaces are allowed.
4745	Name string `json:"name,omitempty"`
4746
4747	// Type: Type of asset to upload. This is a required field. FLASH and
4748	// IMAGE are no longer supported for new uploads. All image assets
4749	// should use HTML_IMAGE.
4750	//
4751	// Possible values:
4752	//   "AUDIO"
4753	//   "FLASH"
4754	//   "HTML"
4755	//   "HTML_IMAGE"
4756	//   "IMAGE"
4757	//   "VIDEO"
4758	Type string `json:"type,omitempty"`
4759
4760	// ForceSendFields is a list of field names (e.g. "Name") to
4761	// unconditionally include in API requests. By default, fields with
4762	// empty values are omitted from API requests. However, any non-pointer,
4763	// non-interface field appearing in ForceSendFields will be sent to the
4764	// server regardless of whether the field is empty or not. This may be
4765	// used to include empty fields in Patch requests.
4766	ForceSendFields []string `json:"-"`
4767
4768	// NullFields is a list of field names (e.g. "Name") to include in API
4769	// requests with the JSON null value. By default, fields with empty
4770	// values are omitted from API requests. However, any field with an
4771	// empty value appearing in NullFields will be sent to the server as
4772	// null. It is an error if a field in this list has a non-empty value.
4773	// This may be used to include null fields in Patch requests.
4774	NullFields []string `json:"-"`
4775}
4776
4777func (s *CreativeAssetId) MarshalJSON() ([]byte, error) {
4778	type NoMethod CreativeAssetId
4779	raw := NoMethod(*s)
4780	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4781}
4782
4783// CreativeAssetMetadata: CreativeAssets contains properties of a
4784// creative asset file which will be uploaded or has already been
4785// uploaded. Refer to the creative sample code for how to upload assets
4786// and insert a creative.
4787type CreativeAssetMetadata struct {
4788	// AssetIdentifier: ID of the creative asset. This is a required field.
4789	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4790
4791	// ClickTags: List of detected click tags for assets. This is a
4792	// read-only auto-generated field.
4793	ClickTags []*ClickTag `json:"clickTags,omitempty"`
4794
4795	// DetectedFeatures: List of feature dependencies for the creative asset
4796	// that are detected by Campaign Manager. Feature dependencies are
4797	// features that a browser must be able to support in order to render
4798	// your HTML5 creative correctly. This is a read-only, auto-generated
4799	// field.
4800	//
4801	// Possible values:
4802	//   "APPLICATION_CACHE"
4803	//   "AUDIO"
4804	//   "CANVAS"
4805	//   "CANVAS_TEXT"
4806	//   "CSS_ANIMATIONS"
4807	//   "CSS_BACKGROUND_SIZE"
4808	//   "CSS_BORDER_IMAGE"
4809	//   "CSS_BORDER_RADIUS"
4810	//   "CSS_BOX_SHADOW"
4811	//   "CSS_COLUMNS"
4812	//   "CSS_FLEX_BOX"
4813	//   "CSS_FONT_FACE"
4814	//   "CSS_GENERATED_CONTENT"
4815	//   "CSS_GRADIENTS"
4816	//   "CSS_HSLA"
4817	//   "CSS_MULTIPLE_BGS"
4818	//   "CSS_OPACITY"
4819	//   "CSS_REFLECTIONS"
4820	//   "CSS_RGBA"
4821	//   "CSS_TEXT_SHADOW"
4822	//   "CSS_TRANSFORMS"
4823	//   "CSS_TRANSFORMS3D"
4824	//   "CSS_TRANSITIONS"
4825	//   "DRAG_AND_DROP"
4826	//   "GEO_LOCATION"
4827	//   "HASH_CHANGE"
4828	//   "HISTORY"
4829	//   "INDEXED_DB"
4830	//   "INLINE_SVG"
4831	//   "INPUT_ATTR_AUTOCOMPLETE"
4832	//   "INPUT_ATTR_AUTOFOCUS"
4833	//   "INPUT_ATTR_LIST"
4834	//   "INPUT_ATTR_MAX"
4835	//   "INPUT_ATTR_MIN"
4836	//   "INPUT_ATTR_MULTIPLE"
4837	//   "INPUT_ATTR_PATTERN"
4838	//   "INPUT_ATTR_PLACEHOLDER"
4839	//   "INPUT_ATTR_REQUIRED"
4840	//   "INPUT_ATTR_STEP"
4841	//   "INPUT_TYPE_COLOR"
4842	//   "INPUT_TYPE_DATE"
4843	//   "INPUT_TYPE_DATETIME"
4844	//   "INPUT_TYPE_DATETIME_LOCAL"
4845	//   "INPUT_TYPE_EMAIL"
4846	//   "INPUT_TYPE_MONTH"
4847	//   "INPUT_TYPE_NUMBER"
4848	//   "INPUT_TYPE_RANGE"
4849	//   "INPUT_TYPE_SEARCH"
4850	//   "INPUT_TYPE_TEL"
4851	//   "INPUT_TYPE_TIME"
4852	//   "INPUT_TYPE_URL"
4853	//   "INPUT_TYPE_WEEK"
4854	//   "LOCAL_STORAGE"
4855	//   "POST_MESSAGE"
4856	//   "SESSION_STORAGE"
4857	//   "SMIL"
4858	//   "SVG_CLIP_PATHS"
4859	//   "SVG_FE_IMAGE"
4860	//   "SVG_FILTERS"
4861	//   "SVG_HREF"
4862	//   "TOUCH"
4863	//   "VIDEO"
4864	//   "WEBGL"
4865	//   "WEB_SOCKETS"
4866	//   "WEB_SQL_DATABASE"
4867	//   "WEB_WORKERS"
4868	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4869
4870	// Id: Numeric ID of the asset. This is a read-only, auto-generated
4871	// field.
4872	Id int64 `json:"id,omitempty,string"`
4873
4874	// IdDimensionValue: Dimension value for the numeric ID of the asset.
4875	// This is a read-only, auto-generated field.
4876	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4877
4878	// Kind: Identifies what kind of resource this is. Value: the fixed
4879	// string "dfareporting#creativeAssetMetadata".
4880	Kind string `json:"kind,omitempty"`
4881
4882	// WarnedValidationRules: Rules validated during code generation that
4883	// generated a warning. This is a read-only, auto-generated
4884	// field.
4885	//
4886	// Possible values are:
4887	// - "ADMOB_REFERENCED"
4888	// - "ASSET_FORMAT_UNSUPPORTED_DCM"
4889	// - "ASSET_INVALID"
4890	// - "CLICK_TAG_HARD_CODED"
4891	// - "CLICK_TAG_INVALID"
4892	// - "CLICK_TAG_IN_GWD"
4893	// - "CLICK_TAG_MISSING"
4894	// - "CLICK_TAG_MORE_THAN_ONE"
4895	// - "CLICK_TAG_NON_TOP_LEVEL"
4896	// - "COMPONENT_UNSUPPORTED_DCM"
4897	// - "ENABLER_UNSUPPORTED_METHOD_DCM"
4898	// - "EXTERNAL_FILE_REFERENCED"
4899	// - "FILE_DETAIL_EMPTY"
4900	// - "FILE_TYPE_INVALID"
4901	// - "GWD_PROPERTIES_INVALID"
4902	// - "HTML5_FEATURE_UNSUPPORTED"
4903	// - "LINKED_FILE_NOT_FOUND"
4904	// - "MAX_FLASH_VERSION_11"
4905	// - "MRAID_REFERENCED"
4906	// - "NOT_SSL_COMPLIANT"
4907	// - "ORPHANED_ASSET"
4908	// - "PRIMARY_HTML_MISSING"
4909	// - "SVG_INVALID"
4910	// - "ZIP_INVALID"
4911	//
4912	// Possible values:
4913	//   "ADMOB_REFERENCED"
4914	//   "ASSET_FORMAT_UNSUPPORTED_DCM"
4915	//   "ASSET_INVALID"
4916	//   "CLICK_TAG_HARD_CODED"
4917	//   "CLICK_TAG_INVALID"
4918	//   "CLICK_TAG_IN_GWD"
4919	//   "CLICK_TAG_MISSING"
4920	//   "CLICK_TAG_MORE_THAN_ONE"
4921	//   "CLICK_TAG_NON_TOP_LEVEL"
4922	//   "COMPONENT_UNSUPPORTED_DCM"
4923	//   "ENABLER_UNSUPPORTED_METHOD_DCM"
4924	//   "EXTERNAL_FILE_REFERENCED"
4925	//   "FILE_DETAIL_EMPTY"
4926	//   "FILE_TYPE_INVALID"
4927	//   "GWD_PROPERTIES_INVALID"
4928	//   "HTML5_FEATURE_UNSUPPORTED"
4929	//   "LINKED_FILE_NOT_FOUND"
4930	//   "MAX_FLASH_VERSION_11"
4931	//   "MRAID_REFERENCED"
4932	//   "NOT_SSL_COMPLIANT"
4933	//   "ORPHANED_ASSET"
4934	//   "PRIMARY_HTML_MISSING"
4935	//   "SVG_INVALID"
4936	//   "ZIP_INVALID"
4937	WarnedValidationRules []string `json:"warnedValidationRules,omitempty"`
4938
4939	// ServerResponse contains the HTTP response code and headers from the
4940	// server.
4941	googleapi.ServerResponse `json:"-"`
4942
4943	// ForceSendFields is a list of field names (e.g. "AssetIdentifier") to
4944	// unconditionally include in API requests. By default, fields with
4945	// empty values are omitted from API requests. However, any non-pointer,
4946	// non-interface field appearing in ForceSendFields will be sent to the
4947	// server regardless of whether the field is empty or not. This may be
4948	// used to include empty fields in Patch requests.
4949	ForceSendFields []string `json:"-"`
4950
4951	// NullFields is a list of field names (e.g. "AssetIdentifier") to
4952	// include in API requests with the JSON null value. By default, fields
4953	// with empty values are omitted from API requests. However, any field
4954	// with an empty value appearing in NullFields will be sent to the
4955	// server as null. It is an error if a field in this list has a
4956	// non-empty value. This may be used to include null fields in Patch
4957	// requests.
4958	NullFields []string `json:"-"`
4959}
4960
4961func (s *CreativeAssetMetadata) MarshalJSON() ([]byte, error) {
4962	type NoMethod CreativeAssetMetadata
4963	raw := NoMethod(*s)
4964	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4965}
4966
4967// CreativeAssetSelection: Encapsulates the list of rules for asset
4968// selection and a default asset in case none of the rules match.
4969// Applicable to INSTREAM_VIDEO creatives.
4970type CreativeAssetSelection struct {
4971	// DefaultAssetId: A creativeAssets[].id. This should refer to one of
4972	// the parent assets in this creative, and will be served if none of the
4973	// rules match. This is a required field.
4974	DefaultAssetId int64 `json:"defaultAssetId,omitempty,string"`
4975
4976	// Rules: Rules determine which asset will be served to a viewer. Rules
4977	// will be evaluated in the order in which they are stored in this list.
4978	// This list must contain at least one rule. Applicable to
4979	// INSTREAM_VIDEO creatives.
4980	Rules []*Rule `json:"rules,omitempty"`
4981
4982	// ForceSendFields is a list of field names (e.g. "DefaultAssetId") to
4983	// unconditionally include in API requests. By default, fields with
4984	// empty values are omitted from API requests. However, any non-pointer,
4985	// non-interface field appearing in ForceSendFields will be sent to the
4986	// server regardless of whether the field is empty or not. This may be
4987	// used to include empty fields in Patch requests.
4988	ForceSendFields []string `json:"-"`
4989
4990	// NullFields is a list of field names (e.g. "DefaultAssetId") to
4991	// include in API requests with the JSON null value. By default, fields
4992	// with empty values are omitted from API requests. However, any field
4993	// with an empty value appearing in NullFields will be sent to the
4994	// server as null. It is an error if a field in this list has a
4995	// non-empty value. This may be used to include null fields in Patch
4996	// requests.
4997	NullFields []string `json:"-"`
4998}
4999
5000func (s *CreativeAssetSelection) MarshalJSON() ([]byte, error) {
5001	type NoMethod CreativeAssetSelection
5002	raw := NoMethod(*s)
5003	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5004}
5005
5006// CreativeAssignment: Creative Assignment.
5007type CreativeAssignment struct {
5008	// Active: Whether this creative assignment is active. When true, the
5009	// creative will be included in the ad's rotation.
5010	Active bool `json:"active,omitempty"`
5011
5012	// ApplyEventTags: Whether applicable event tags should fire when this
5013	// creative assignment is rendered. If this value is unset when the ad
5014	// is inserted or updated, it will default to true for all creative
5015	// types EXCEPT for INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT,
5016	// and INSTREAM_VIDEO.
5017	ApplyEventTags bool `json:"applyEventTags,omitempty"`
5018
5019	// ClickThroughUrl: Click-through URL of the creative assignment.
5020	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
5021
5022	// CompanionCreativeOverrides: Companion creative overrides for this
5023	// creative assignment. Applicable to video ads.
5024	CompanionCreativeOverrides []*CompanionClickThroughOverride `json:"companionCreativeOverrides,omitempty"`
5025
5026	// CreativeGroupAssignments: Creative group assignments for this
5027	// creative assignment. Only one assignment per creative group number is
5028	// allowed for a maximum of two assignments.
5029	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
5030
5031	// CreativeId: ID of the creative to be assigned. This is a required
5032	// field.
5033	CreativeId int64 `json:"creativeId,omitempty,string"`
5034
5035	// CreativeIdDimensionValue: Dimension value for the ID of the creative.
5036	// This is a read-only, auto-generated field.
5037	CreativeIdDimensionValue *DimensionValue `json:"creativeIdDimensionValue,omitempty"`
5038
5039	// EndTime: Date and time that the assigned creative should stop
5040	// serving. Must be later than the start time.
5041	EndTime string `json:"endTime,omitempty"`
5042
5043	// RichMediaExitOverrides: Rich media exit overrides for this creative
5044	// assignment.
5045	// Applicable when the creative type is any of the following:
5046	// - DISPLAY
5047	// - RICH_MEDIA_INPAGE
5048	// - RICH_MEDIA_INPAGE_FLOATING
5049	// - RICH_MEDIA_IM_EXPAND
5050	// - RICH_MEDIA_EXPANDING
5051	// - RICH_MEDIA_INTERSTITIAL_FLOAT
5052	// - RICH_MEDIA_MOBILE_IN_APP
5053	// - RICH_MEDIA_MULTI_FLOATING
5054	// - RICH_MEDIA_PEEL_DOWN
5055	// - VPAID_LINEAR
5056	// - VPAID_NON_LINEAR
5057	RichMediaExitOverrides []*RichMediaExitOverride `json:"richMediaExitOverrides,omitempty"`
5058
5059	// Sequence: Sequence number of the creative assignment, applicable when
5060	// the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable
5061	// values are 1 to 65535, inclusive.
5062	Sequence int64 `json:"sequence,omitempty"`
5063
5064	// SslCompliant: Whether the creative to be assigned is SSL-compliant.
5065	// This is a read-only field that is auto-generated when the ad is
5066	// inserted or updated.
5067	SslCompliant bool `json:"sslCompliant,omitempty"`
5068
5069	// StartTime: Date and time that the assigned creative should start
5070	// serving.
5071	StartTime string `json:"startTime,omitempty"`
5072
5073	// Weight: Weight of the creative assignment, applicable when the
5074	// rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater
5075	// than or equal to 1.
5076	Weight int64 `json:"weight,omitempty"`
5077
5078	// ForceSendFields is a list of field names (e.g. "Active") to
5079	// unconditionally include in API requests. By default, fields with
5080	// empty values are omitted from API requests. However, any non-pointer,
5081	// non-interface field appearing in ForceSendFields will be sent to the
5082	// server regardless of whether the field is empty or not. This may be
5083	// used to include empty fields in Patch requests.
5084	ForceSendFields []string `json:"-"`
5085
5086	// NullFields is a list of field names (e.g. "Active") to include in API
5087	// requests with the JSON null value. By default, fields with empty
5088	// values are omitted from API requests. However, any field with an
5089	// empty value appearing in NullFields will be sent to the server as
5090	// null. It is an error if a field in this list has a non-empty value.
5091	// This may be used to include null fields in Patch requests.
5092	NullFields []string `json:"-"`
5093}
5094
5095func (s *CreativeAssignment) MarshalJSON() ([]byte, error) {
5096	type NoMethod CreativeAssignment
5097	raw := NoMethod(*s)
5098	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5099}
5100
5101// CreativeClickThroughUrl: Click-through URL
5102type CreativeClickThroughUrl struct {
5103	// ComputedClickThroughUrl: Read-only convenience field representing the
5104	// actual URL that will be used for this click-through. The URL is
5105	// computed as follows:
5106	// - If landingPageId is specified then that landing page's URL is
5107	// assigned to this field.
5108	// - Otherwise, the customClickThroughUrl is assigned to this field.
5109	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
5110
5111	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
5112	// landingPageId field is left unset.
5113	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
5114
5115	// LandingPageId: ID of the landing page for the click-through URL.
5116	LandingPageId int64 `json:"landingPageId,omitempty,string"`
5117
5118	// ForceSendFields is a list of field names (e.g.
5119	// "ComputedClickThroughUrl") to unconditionally include in API
5120	// requests. By default, fields with empty values are omitted from API
5121	// requests. However, any non-pointer, non-interface field appearing in
5122	// ForceSendFields will be sent to the server regardless of whether the
5123	// field is empty or not. This may be used to include empty fields in
5124	// Patch requests.
5125	ForceSendFields []string `json:"-"`
5126
5127	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
5128	// to include in API requests with the JSON null value. By default,
5129	// fields with empty values are omitted from API requests. However, any
5130	// field with an empty value appearing in NullFields will be sent to the
5131	// server as null. It is an error if a field in this list has a
5132	// non-empty value. This may be used to include null fields in Patch
5133	// requests.
5134	NullFields []string `json:"-"`
5135}
5136
5137func (s *CreativeClickThroughUrl) MarshalJSON() ([]byte, error) {
5138	type NoMethod CreativeClickThroughUrl
5139	raw := NoMethod(*s)
5140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5141}
5142
5143// CreativeCustomEvent: Creative Custom Event.
5144type CreativeCustomEvent struct {
5145	// AdvertiserCustomEventId: Unique ID of this event used by Reporting
5146	// and Data Transfer. This is a read-only field.
5147	AdvertiserCustomEventId int64 `json:"advertiserCustomEventId,omitempty,string"`
5148
5149	// AdvertiserCustomEventName: User-entered name for the event.
5150	AdvertiserCustomEventName string `json:"advertiserCustomEventName,omitempty"`
5151
5152	// AdvertiserCustomEventType: Type of the event. This is a read-only
5153	// field.
5154	//
5155	// Possible values:
5156	//   "ADVERTISER_EVENT_COUNTER"
5157	//   "ADVERTISER_EVENT_EXIT"
5158	//   "ADVERTISER_EVENT_TIMER"
5159	AdvertiserCustomEventType string `json:"advertiserCustomEventType,omitempty"`
5160
5161	// ArtworkLabel: Artwork label column, used to link events in Campaign
5162	// Manager back to events in Studio. This is a required field and should
5163	// not be modified after insertion.
5164	ArtworkLabel string `json:"artworkLabel,omitempty"`
5165
5166	// ArtworkType: Artwork type used by the creative.This is a read-only
5167	// field.
5168	//
5169	// Possible values:
5170	//   "ARTWORK_TYPE_FLASH"
5171	//   "ARTWORK_TYPE_HTML5"
5172	//   "ARTWORK_TYPE_IMAGE"
5173	//   "ARTWORK_TYPE_MIXED"
5174	ArtworkType string `json:"artworkType,omitempty"`
5175
5176	// ExitClickThroughUrl: Exit click-through URL for the event. This field
5177	// is used only for exit events.
5178	ExitClickThroughUrl *CreativeClickThroughUrl `json:"exitClickThroughUrl,omitempty"`
5179
5180	// Id: ID of this event. This is a required field and should not be
5181	// modified after insertion.
5182	Id int64 `json:"id,omitempty,string"`
5183
5184	// PopupWindowProperties: Properties for rich media popup windows. This
5185	// field is used only for exit events.
5186	PopupWindowProperties *PopupWindowProperties `json:"popupWindowProperties,omitempty"`
5187
5188	// TargetType: Target type used by the event.
5189	//
5190	// Possible values:
5191	//   "TARGET_BLANK"
5192	//   "TARGET_PARENT"
5193	//   "TARGET_POPUP"
5194	//   "TARGET_SELF"
5195	//   "TARGET_TOP"
5196	TargetType string `json:"targetType,omitempty"`
5197
5198	// VideoReportingId: Video reporting ID, used to differentiate multiple
5199	// videos in a single creative. This is a read-only field.
5200	VideoReportingId string `json:"videoReportingId,omitempty"`
5201
5202	// ForceSendFields is a list of field names (e.g.
5203	// "AdvertiserCustomEventId") to unconditionally include in API
5204	// requests. By default, fields with empty values are omitted from API
5205	// requests. However, any non-pointer, non-interface field appearing in
5206	// ForceSendFields will be sent to the server regardless of whether the
5207	// field is empty or not. This may be used to include empty fields in
5208	// Patch requests.
5209	ForceSendFields []string `json:"-"`
5210
5211	// NullFields is a list of field names (e.g. "AdvertiserCustomEventId")
5212	// to include in API requests with the JSON null value. By default,
5213	// fields with empty values are omitted from API requests. However, any
5214	// field with an empty value appearing in NullFields will be sent to the
5215	// server as null. It is an error if a field in this list has a
5216	// non-empty value. This may be used to include null fields in Patch
5217	// requests.
5218	NullFields []string `json:"-"`
5219}
5220
5221func (s *CreativeCustomEvent) MarshalJSON() ([]byte, error) {
5222	type NoMethod CreativeCustomEvent
5223	raw := NoMethod(*s)
5224	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5225}
5226
5227// CreativeField: Contains properties of a creative field.
5228type CreativeField struct {
5229	// AccountId: Account ID of this creative field. This is a read-only
5230	// field that can be left blank.
5231	AccountId int64 `json:"accountId,omitempty,string"`
5232
5233	// AdvertiserId: Advertiser ID of this creative field. This is a
5234	// required field on insertion.
5235	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5236
5237	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5238	// advertiser. This is a read-only, auto-generated field.
5239	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5240
5241	// Id: ID of this creative field. This is a read-only, auto-generated
5242	// field.
5243	Id int64 `json:"id,omitempty,string"`
5244
5245	// Kind: Identifies what kind of resource this is. Value: the fixed
5246	// string "dfareporting#creativeField".
5247	Kind string `json:"kind,omitempty"`
5248
5249	// Name: Name of this creative field. This is a required field and must
5250	// be less than 256 characters long and unique among creative fields of
5251	// the same advertiser.
5252	Name string `json:"name,omitempty"`
5253
5254	// SubaccountId: Subaccount ID of this creative field. This is a
5255	// read-only field that can be left blank.
5256	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5257
5258	// ServerResponse contains the HTTP response code and headers from the
5259	// server.
5260	googleapi.ServerResponse `json:"-"`
5261
5262	// ForceSendFields is a list of field names (e.g. "AccountId") to
5263	// unconditionally include in API requests. By default, fields with
5264	// empty values are omitted from API requests. However, any non-pointer,
5265	// non-interface field appearing in ForceSendFields will be sent to the
5266	// server regardless of whether the field is empty or not. This may be
5267	// used to include empty fields in Patch requests.
5268	ForceSendFields []string `json:"-"`
5269
5270	// NullFields is a list of field names (e.g. "AccountId") to include in
5271	// API requests with the JSON null value. By default, fields with empty
5272	// values are omitted from API requests. However, any field with an
5273	// empty value appearing in NullFields will be sent to the server as
5274	// null. It is an error if a field in this list has a non-empty value.
5275	// This may be used to include null fields in Patch requests.
5276	NullFields []string `json:"-"`
5277}
5278
5279func (s *CreativeField) MarshalJSON() ([]byte, error) {
5280	type NoMethod CreativeField
5281	raw := NoMethod(*s)
5282	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5283}
5284
5285// CreativeFieldAssignment: Creative Field Assignment.
5286type CreativeFieldAssignment struct {
5287	// CreativeFieldId: ID of the creative field.
5288	CreativeFieldId int64 `json:"creativeFieldId,omitempty,string"`
5289
5290	// CreativeFieldValueId: ID of the creative field value.
5291	CreativeFieldValueId int64 `json:"creativeFieldValueId,omitempty,string"`
5292
5293	// ForceSendFields is a list of field names (e.g. "CreativeFieldId") to
5294	// unconditionally include in API requests. By default, fields with
5295	// empty values are omitted from API requests. However, any non-pointer,
5296	// non-interface field appearing in ForceSendFields will be sent to the
5297	// server regardless of whether the field is empty or not. This may be
5298	// used to include empty fields in Patch requests.
5299	ForceSendFields []string `json:"-"`
5300
5301	// NullFields is a list of field names (e.g. "CreativeFieldId") to
5302	// include in API requests with the JSON null value. By default, fields
5303	// with empty values are omitted from API requests. However, any field
5304	// with an empty value appearing in NullFields will be sent to the
5305	// server as null. It is an error if a field in this list has a
5306	// non-empty value. This may be used to include null fields in Patch
5307	// requests.
5308	NullFields []string `json:"-"`
5309}
5310
5311func (s *CreativeFieldAssignment) MarshalJSON() ([]byte, error) {
5312	type NoMethod CreativeFieldAssignment
5313	raw := NoMethod(*s)
5314	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5315}
5316
5317// CreativeFieldValue: Contains properties of a creative field value.
5318type CreativeFieldValue struct {
5319	// Id: ID of this creative field value. This is a read-only,
5320	// auto-generated field.
5321	Id int64 `json:"id,omitempty,string"`
5322
5323	// Kind: Identifies what kind of resource this is. Value: the fixed
5324	// string "dfareporting#creativeFieldValue".
5325	Kind string `json:"kind,omitempty"`
5326
5327	// Value: Value of this creative field value. It needs to be less than
5328	// 256 characters in length and unique per creative field.
5329	Value string `json:"value,omitempty"`
5330
5331	// ServerResponse contains the HTTP response code and headers from the
5332	// server.
5333	googleapi.ServerResponse `json:"-"`
5334
5335	// ForceSendFields is a list of field names (e.g. "Id") to
5336	// unconditionally include in API requests. By default, fields with
5337	// empty values are omitted from API requests. However, any non-pointer,
5338	// non-interface field appearing in ForceSendFields will be sent to the
5339	// server regardless of whether the field is empty or not. This may be
5340	// used to include empty fields in Patch requests.
5341	ForceSendFields []string `json:"-"`
5342
5343	// NullFields is a list of field names (e.g. "Id") to include in API
5344	// requests with the JSON null value. By default, fields with empty
5345	// values are omitted from API requests. However, any field with an
5346	// empty value appearing in NullFields will be sent to the server as
5347	// null. It is an error if a field in this list has a non-empty value.
5348	// This may be used to include null fields in Patch requests.
5349	NullFields []string `json:"-"`
5350}
5351
5352func (s *CreativeFieldValue) MarshalJSON() ([]byte, error) {
5353	type NoMethod CreativeFieldValue
5354	raw := NoMethod(*s)
5355	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5356}
5357
5358// CreativeFieldValuesListResponse: Creative Field Value List Response
5359type CreativeFieldValuesListResponse struct {
5360	// CreativeFieldValues: Creative field value collection.
5361	CreativeFieldValues []*CreativeFieldValue `json:"creativeFieldValues,omitempty"`
5362
5363	// Kind: Identifies what kind of resource this is. Value: the fixed
5364	// string "dfareporting#creativeFieldValuesListResponse".
5365	Kind string `json:"kind,omitempty"`
5366
5367	// NextPageToken: Pagination token to be used for the next list
5368	// operation.
5369	NextPageToken string `json:"nextPageToken,omitempty"`
5370
5371	// ServerResponse contains the HTTP response code and headers from the
5372	// server.
5373	googleapi.ServerResponse `json:"-"`
5374
5375	// ForceSendFields is a list of field names (e.g. "CreativeFieldValues")
5376	// to unconditionally include in API requests. By default, fields with
5377	// empty values are omitted from API requests. However, any non-pointer,
5378	// non-interface field appearing in ForceSendFields will be sent to the
5379	// server regardless of whether the field is empty or not. This may be
5380	// used to include empty fields in Patch requests.
5381	ForceSendFields []string `json:"-"`
5382
5383	// NullFields is a list of field names (e.g. "CreativeFieldValues") to
5384	// include in API requests with the JSON null value. By default, fields
5385	// with empty values are omitted from API requests. However, any field
5386	// with an empty value appearing in NullFields will be sent to the
5387	// server as null. It is an error if a field in this list has a
5388	// non-empty value. This may be used to include null fields in Patch
5389	// requests.
5390	NullFields []string `json:"-"`
5391}
5392
5393func (s *CreativeFieldValuesListResponse) MarshalJSON() ([]byte, error) {
5394	type NoMethod CreativeFieldValuesListResponse
5395	raw := NoMethod(*s)
5396	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5397}
5398
5399// CreativeFieldsListResponse: Creative Field List Response
5400type CreativeFieldsListResponse struct {
5401	// CreativeFields: Creative field collection.
5402	CreativeFields []*CreativeField `json:"creativeFields,omitempty"`
5403
5404	// Kind: Identifies what kind of resource this is. Value: the fixed
5405	// string "dfareporting#creativeFieldsListResponse".
5406	Kind string `json:"kind,omitempty"`
5407
5408	// NextPageToken: Pagination token to be used for the next list
5409	// operation.
5410	NextPageToken string `json:"nextPageToken,omitempty"`
5411
5412	// ServerResponse contains the HTTP response code and headers from the
5413	// server.
5414	googleapi.ServerResponse `json:"-"`
5415
5416	// ForceSendFields is a list of field names (e.g. "CreativeFields") to
5417	// unconditionally include in API requests. By default, fields with
5418	// empty values are omitted from API requests. However, any non-pointer,
5419	// non-interface field appearing in ForceSendFields will be sent to the
5420	// server regardless of whether the field is empty or not. This may be
5421	// used to include empty fields in Patch requests.
5422	ForceSendFields []string `json:"-"`
5423
5424	// NullFields is a list of field names (e.g. "CreativeFields") to
5425	// include in API requests with the JSON null value. By default, fields
5426	// with empty values are omitted from API requests. However, any field
5427	// with an empty value appearing in NullFields will be sent to the
5428	// server as null. It is an error if a field in this list has a
5429	// non-empty value. This may be used to include null fields in Patch
5430	// requests.
5431	NullFields []string `json:"-"`
5432}
5433
5434func (s *CreativeFieldsListResponse) MarshalJSON() ([]byte, error) {
5435	type NoMethod CreativeFieldsListResponse
5436	raw := NoMethod(*s)
5437	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5438}
5439
5440// CreativeGroup: Contains properties of a creative group.
5441type CreativeGroup struct {
5442	// AccountId: Account ID of this creative group. This is a read-only
5443	// field that can be left blank.
5444	AccountId int64 `json:"accountId,omitempty,string"`
5445
5446	// AdvertiserId: Advertiser ID of this creative group. This is a
5447	// required field on insertion.
5448	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5449
5450	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5451	// advertiser. This is a read-only, auto-generated field.
5452	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5453
5454	// GroupNumber: Subgroup of the creative group. Assign your creative
5455	// groups to a subgroup in order to filter or manage them more easily.
5456	// This field is required on insertion and is read-only after insertion.
5457	// Acceptable values are 1 to 2, inclusive.
5458	GroupNumber int64 `json:"groupNumber,omitempty"`
5459
5460	// Id: ID of this creative group. This is a read-only, auto-generated
5461	// field.
5462	Id int64 `json:"id,omitempty,string"`
5463
5464	// Kind: Identifies what kind of resource this is. Value: the fixed
5465	// string "dfareporting#creativeGroup".
5466	Kind string `json:"kind,omitempty"`
5467
5468	// Name: Name of this creative group. This is a required field and must
5469	// be less than 256 characters long and unique among creative groups of
5470	// the same advertiser.
5471	Name string `json:"name,omitempty"`
5472
5473	// SubaccountId: Subaccount ID of this creative group. This is a
5474	// read-only field that can be left blank.
5475	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5476
5477	// ServerResponse contains the HTTP response code and headers from the
5478	// server.
5479	googleapi.ServerResponse `json:"-"`
5480
5481	// ForceSendFields is a list of field names (e.g. "AccountId") to
5482	// unconditionally include in API requests. By default, fields with
5483	// empty values are omitted from API requests. However, any non-pointer,
5484	// non-interface field appearing in ForceSendFields will be sent to the
5485	// server regardless of whether the field is empty or not. This may be
5486	// used to include empty fields in Patch requests.
5487	ForceSendFields []string `json:"-"`
5488
5489	// NullFields is a list of field names (e.g. "AccountId") to include in
5490	// API requests with the JSON null value. By default, fields with empty
5491	// values are omitted from API requests. However, any field with an
5492	// empty value appearing in NullFields will be sent to the server as
5493	// null. It is an error if a field in this list has a non-empty value.
5494	// This may be used to include null fields in Patch requests.
5495	NullFields []string `json:"-"`
5496}
5497
5498func (s *CreativeGroup) MarshalJSON() ([]byte, error) {
5499	type NoMethod CreativeGroup
5500	raw := NoMethod(*s)
5501	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5502}
5503
5504// CreativeGroupAssignment: Creative Group Assignment.
5505type CreativeGroupAssignment struct {
5506	// CreativeGroupId: ID of the creative group to be assigned.
5507	CreativeGroupId int64 `json:"creativeGroupId,omitempty,string"`
5508
5509	// CreativeGroupNumber: Creative group number of the creative group
5510	// assignment.
5511	//
5512	// Possible values:
5513	//   "CREATIVE_GROUP_ONE"
5514	//   "CREATIVE_GROUP_TWO"
5515	CreativeGroupNumber string `json:"creativeGroupNumber,omitempty"`
5516
5517	// ForceSendFields is a list of field names (e.g. "CreativeGroupId") to
5518	// unconditionally include in API requests. By default, fields with
5519	// empty values are omitted from API requests. However, any non-pointer,
5520	// non-interface field appearing in ForceSendFields will be sent to the
5521	// server regardless of whether the field is empty or not. This may be
5522	// used to include empty fields in Patch requests.
5523	ForceSendFields []string `json:"-"`
5524
5525	// NullFields is a list of field names (e.g. "CreativeGroupId") to
5526	// include in API requests with the JSON null value. By default, fields
5527	// with empty values are omitted from API requests. However, any field
5528	// with an empty value appearing in NullFields will be sent to the
5529	// server as null. It is an error if a field in this list has a
5530	// non-empty value. This may be used to include null fields in Patch
5531	// requests.
5532	NullFields []string `json:"-"`
5533}
5534
5535func (s *CreativeGroupAssignment) MarshalJSON() ([]byte, error) {
5536	type NoMethod CreativeGroupAssignment
5537	raw := NoMethod(*s)
5538	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5539}
5540
5541// CreativeGroupsListResponse: Creative Group List Response
5542type CreativeGroupsListResponse struct {
5543	// CreativeGroups: Creative group collection.
5544	CreativeGroups []*CreativeGroup `json:"creativeGroups,omitempty"`
5545
5546	// Kind: Identifies what kind of resource this is. Value: the fixed
5547	// string "dfareporting#creativeGroupsListResponse".
5548	Kind string `json:"kind,omitempty"`
5549
5550	// NextPageToken: Pagination token to be used for the next list
5551	// operation.
5552	NextPageToken string `json:"nextPageToken,omitempty"`
5553
5554	// ServerResponse contains the HTTP response code and headers from the
5555	// server.
5556	googleapi.ServerResponse `json:"-"`
5557
5558	// ForceSendFields is a list of field names (e.g. "CreativeGroups") to
5559	// unconditionally include in API requests. By default, fields with
5560	// empty values are omitted from API requests. However, any non-pointer,
5561	// non-interface field appearing in ForceSendFields will be sent to the
5562	// server regardless of whether the field is empty or not. This may be
5563	// used to include empty fields in Patch requests.
5564	ForceSendFields []string `json:"-"`
5565
5566	// NullFields is a list of field names (e.g. "CreativeGroups") to
5567	// include in API requests with the JSON null value. By default, fields
5568	// with empty values are omitted from API requests. However, any field
5569	// with an empty value appearing in NullFields will be sent to the
5570	// server as null. It is an error if a field in this list has a
5571	// non-empty value. This may be used to include null fields in Patch
5572	// requests.
5573	NullFields []string `json:"-"`
5574}
5575
5576func (s *CreativeGroupsListResponse) MarshalJSON() ([]byte, error) {
5577	type NoMethod CreativeGroupsListResponse
5578	raw := NoMethod(*s)
5579	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5580}
5581
5582// CreativeOptimizationConfiguration: Creative optimization settings.
5583type CreativeOptimizationConfiguration struct {
5584	// Id: ID of this creative optimization config. This field is
5585	// auto-generated when the campaign is inserted or updated. It can be
5586	// null for existing campaigns.
5587	Id int64 `json:"id,omitempty,string"`
5588
5589	// Name: Name of this creative optimization config. This is a required
5590	// field and must be less than 129 characters long.
5591	Name string `json:"name,omitempty"`
5592
5593	// OptimizationActivitys: List of optimization activities associated
5594	// with this configuration.
5595	OptimizationActivitys []*OptimizationActivity `json:"optimizationActivitys,omitempty"`
5596
5597	// OptimizationModel: Optimization model for this configuration.
5598	//
5599	// Possible values:
5600	//   "CLICK"
5601	//   "POST_CLICK"
5602	//   "POST_CLICK_AND_IMPRESSION"
5603	//   "POST_IMPRESSION"
5604	//   "VIDEO_COMPLETION"
5605	OptimizationModel string `json:"optimizationModel,omitempty"`
5606
5607	// ForceSendFields is a list of field names (e.g. "Id") to
5608	// unconditionally include in API requests. By default, fields with
5609	// empty values are omitted from API requests. However, any non-pointer,
5610	// non-interface field appearing in ForceSendFields will be sent to the
5611	// server regardless of whether the field is empty or not. This may be
5612	// used to include empty fields in Patch requests.
5613	ForceSendFields []string `json:"-"`
5614
5615	// NullFields is a list of field names (e.g. "Id") to include in API
5616	// requests with the JSON null value. By default, fields with empty
5617	// values are omitted from API requests. However, any field with an
5618	// empty value appearing in NullFields will be sent to the server as
5619	// null. It is an error if a field in this list has a non-empty value.
5620	// This may be used to include null fields in Patch requests.
5621	NullFields []string `json:"-"`
5622}
5623
5624func (s *CreativeOptimizationConfiguration) MarshalJSON() ([]byte, error) {
5625	type NoMethod CreativeOptimizationConfiguration
5626	raw := NoMethod(*s)
5627	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5628}
5629
5630// CreativeRotation: Creative Rotation.
5631type CreativeRotation struct {
5632	// CreativeAssignments: Creative assignments in this creative rotation.
5633	CreativeAssignments []*CreativeAssignment `json:"creativeAssignments,omitempty"`
5634
5635	// CreativeOptimizationConfigurationId: Creative optimization
5636	// configuration that is used by this ad. It should refer to one of the
5637	// existing optimization configurations in the ad's campaign. If it is
5638	// unset or set to 0, then the campaign's default optimization
5639	// configuration will be used for this ad.
5640	CreativeOptimizationConfigurationId int64 `json:"creativeOptimizationConfigurationId,omitempty,string"`
5641
5642	// Type: Type of creative rotation. Can be used to specify whether to
5643	// use sequential or random rotation.
5644	//
5645	// Possible values:
5646	//   "CREATIVE_ROTATION_TYPE_RANDOM"
5647	//   "CREATIVE_ROTATION_TYPE_SEQUENTIAL"
5648	Type string `json:"type,omitempty"`
5649
5650	// WeightCalculationStrategy: Strategy for calculating weights. Used
5651	// with CREATIVE_ROTATION_TYPE_RANDOM.
5652	//
5653	// Possible values:
5654	//   "WEIGHT_STRATEGY_CUSTOM"
5655	//   "WEIGHT_STRATEGY_EQUAL"
5656	//   "WEIGHT_STRATEGY_HIGHEST_CTR"
5657	//   "WEIGHT_STRATEGY_OPTIMIZED"
5658	WeightCalculationStrategy string `json:"weightCalculationStrategy,omitempty"`
5659
5660	// ForceSendFields is a list of field names (e.g. "CreativeAssignments")
5661	// to unconditionally include in API requests. By default, fields with
5662	// empty values are omitted from API requests. However, any non-pointer,
5663	// non-interface field appearing in ForceSendFields will be sent to the
5664	// server regardless of whether the field is empty or not. This may be
5665	// used to include empty fields in Patch requests.
5666	ForceSendFields []string `json:"-"`
5667
5668	// NullFields is a list of field names (e.g. "CreativeAssignments") to
5669	// include in API requests with the JSON null value. By default, fields
5670	// with empty values are omitted from API requests. However, any field
5671	// with an empty value appearing in NullFields will be sent to the
5672	// server as null. It is an error if a field in this list has a
5673	// non-empty value. This may be used to include null fields in Patch
5674	// requests.
5675	NullFields []string `json:"-"`
5676}
5677
5678func (s *CreativeRotation) MarshalJSON() ([]byte, error) {
5679	type NoMethod CreativeRotation
5680	raw := NoMethod(*s)
5681	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5682}
5683
5684// CreativesListResponse: Creative List Response
5685type CreativesListResponse struct {
5686	// Creatives: Creative collection.
5687	Creatives []*Creative `json:"creatives,omitempty"`
5688
5689	// Kind: Identifies what kind of resource this is. Value: the fixed
5690	// string "dfareporting#creativesListResponse".
5691	Kind string `json:"kind,omitempty"`
5692
5693	// NextPageToken: Pagination token to be used for the next list
5694	// operation.
5695	NextPageToken string `json:"nextPageToken,omitempty"`
5696
5697	// ServerResponse contains the HTTP response code and headers from the
5698	// server.
5699	googleapi.ServerResponse `json:"-"`
5700
5701	// ForceSendFields is a list of field names (e.g. "Creatives") to
5702	// unconditionally include in API requests. By default, fields with
5703	// empty values are omitted from API requests. However, any non-pointer,
5704	// non-interface field appearing in ForceSendFields will be sent to the
5705	// server regardless of whether the field is empty or not. This may be
5706	// used to include empty fields in Patch requests.
5707	ForceSendFields []string `json:"-"`
5708
5709	// NullFields is a list of field names (e.g. "Creatives") to include in
5710	// API requests with the JSON null value. By default, fields with empty
5711	// values are omitted from API requests. However, any field with an
5712	// empty value appearing in NullFields will be sent to the server as
5713	// null. It is an error if a field in this list has a non-empty value.
5714	// This may be used to include null fields in Patch requests.
5715	NullFields []string `json:"-"`
5716}
5717
5718func (s *CreativesListResponse) MarshalJSON() ([]byte, error) {
5719	type NoMethod CreativesListResponse
5720	raw := NoMethod(*s)
5721	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5722}
5723
5724// CrossDimensionReachReportCompatibleFields: Represents fields that are
5725// compatible to be selected for a report of type
5726// "CROSS_DIMENSION_REACH".
5727type CrossDimensionReachReportCompatibleFields struct {
5728	// Breakdown: Dimensions which are compatible to be selected in the
5729	// "breakdown" section of the report.
5730	Breakdown []*Dimension `json:"breakdown,omitempty"`
5731
5732	// DimensionFilters: Dimensions which are compatible to be selected in
5733	// the "dimensionFilters" section of the report.
5734	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
5735
5736	// Kind: The kind of resource this is, in this case
5737	// dfareporting#crossDimensionReachReportCompatibleFields.
5738	Kind string `json:"kind,omitempty"`
5739
5740	// Metrics: Metrics which are compatible to be selected in the
5741	// "metricNames" section of the report.
5742	Metrics []*Metric `json:"metrics,omitempty"`
5743
5744	// OverlapMetrics: Metrics which are compatible to be selected in the
5745	// "overlapMetricNames" section of the report.
5746	OverlapMetrics []*Metric `json:"overlapMetrics,omitempty"`
5747
5748	// ForceSendFields is a list of field names (e.g. "Breakdown") to
5749	// unconditionally include in API requests. By default, fields with
5750	// empty values are omitted from API requests. However, any non-pointer,
5751	// non-interface field appearing in ForceSendFields will be sent to the
5752	// server regardless of whether the field is empty or not. This may be
5753	// used to include empty fields in Patch requests.
5754	ForceSendFields []string `json:"-"`
5755
5756	// NullFields is a list of field names (e.g. "Breakdown") to include in
5757	// API requests with the JSON null value. By default, fields with empty
5758	// values are omitted from API requests. However, any field with an
5759	// empty value appearing in NullFields will be sent to the server as
5760	// null. It is an error if a field in this list has a non-empty value.
5761	// This may be used to include null fields in Patch requests.
5762	NullFields []string `json:"-"`
5763}
5764
5765func (s *CrossDimensionReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
5766	type NoMethod CrossDimensionReachReportCompatibleFields
5767	raw := NoMethod(*s)
5768	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5769}
5770
5771// CustomFloodlightVariable: A custom floodlight variable.
5772type CustomFloodlightVariable struct {
5773	// Kind: Identifies what kind of resource this is. Value: the fixed
5774	// string "dfareporting#customFloodlightVariable".
5775	Kind string `json:"kind,omitempty"`
5776
5777	// Type: The type of custom floodlight variable to supply a value for.
5778	// These map to the "u[1-20]=" in the tags.
5779	//
5780	// Possible values:
5781	//   "U1"
5782	//   "U10"
5783	//   "U100"
5784	//   "U11"
5785	//   "U12"
5786	//   "U13"
5787	//   "U14"
5788	//   "U15"
5789	//   "U16"
5790	//   "U17"
5791	//   "U18"
5792	//   "U19"
5793	//   "U2"
5794	//   "U20"
5795	//   "U21"
5796	//   "U22"
5797	//   "U23"
5798	//   "U24"
5799	//   "U25"
5800	//   "U26"
5801	//   "U27"
5802	//   "U28"
5803	//   "U29"
5804	//   "U3"
5805	//   "U30"
5806	//   "U31"
5807	//   "U32"
5808	//   "U33"
5809	//   "U34"
5810	//   "U35"
5811	//   "U36"
5812	//   "U37"
5813	//   "U38"
5814	//   "U39"
5815	//   "U4"
5816	//   "U40"
5817	//   "U41"
5818	//   "U42"
5819	//   "U43"
5820	//   "U44"
5821	//   "U45"
5822	//   "U46"
5823	//   "U47"
5824	//   "U48"
5825	//   "U49"
5826	//   "U5"
5827	//   "U50"
5828	//   "U51"
5829	//   "U52"
5830	//   "U53"
5831	//   "U54"
5832	//   "U55"
5833	//   "U56"
5834	//   "U57"
5835	//   "U58"
5836	//   "U59"
5837	//   "U6"
5838	//   "U60"
5839	//   "U61"
5840	//   "U62"
5841	//   "U63"
5842	//   "U64"
5843	//   "U65"
5844	//   "U66"
5845	//   "U67"
5846	//   "U68"
5847	//   "U69"
5848	//   "U7"
5849	//   "U70"
5850	//   "U71"
5851	//   "U72"
5852	//   "U73"
5853	//   "U74"
5854	//   "U75"
5855	//   "U76"
5856	//   "U77"
5857	//   "U78"
5858	//   "U79"
5859	//   "U8"
5860	//   "U80"
5861	//   "U81"
5862	//   "U82"
5863	//   "U83"
5864	//   "U84"
5865	//   "U85"
5866	//   "U86"
5867	//   "U87"
5868	//   "U88"
5869	//   "U89"
5870	//   "U9"
5871	//   "U90"
5872	//   "U91"
5873	//   "U92"
5874	//   "U93"
5875	//   "U94"
5876	//   "U95"
5877	//   "U96"
5878	//   "U97"
5879	//   "U98"
5880	//   "U99"
5881	Type string `json:"type,omitempty"`
5882
5883	// Value: The value of the custom floodlight variable. The length of
5884	// string must not exceed 50 characters.
5885	Value string `json:"value,omitempty"`
5886
5887	// ForceSendFields is a list of field names (e.g. "Kind") to
5888	// unconditionally include in API requests. By default, fields with
5889	// empty values are omitted from API requests. However, any non-pointer,
5890	// non-interface field appearing in ForceSendFields will be sent to the
5891	// server regardless of whether the field is empty or not. This may be
5892	// used to include empty fields in Patch requests.
5893	ForceSendFields []string `json:"-"`
5894
5895	// NullFields is a list of field names (e.g. "Kind") to include in API
5896	// requests with the JSON null value. By default, fields with empty
5897	// values are omitted from API requests. However, any field with an
5898	// empty value appearing in NullFields will be sent to the server as
5899	// null. It is an error if a field in this list has a non-empty value.
5900	// This may be used to include null fields in Patch requests.
5901	NullFields []string `json:"-"`
5902}
5903
5904func (s *CustomFloodlightVariable) MarshalJSON() ([]byte, error) {
5905	type NoMethod CustomFloodlightVariable
5906	raw := NoMethod(*s)
5907	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5908}
5909
5910// CustomRichMediaEvents: Represents a Custom Rich Media Events group.
5911type CustomRichMediaEvents struct {
5912	// FilteredEventIds: List of custom rich media event IDs. Dimension
5913	// values must be all of type dfa:richMediaEventTypeIdAndName.
5914	FilteredEventIds []*DimensionValue `json:"filteredEventIds,omitempty"`
5915
5916	// Kind: The kind of resource this is, in this case
5917	// dfareporting#customRichMediaEvents.
5918	Kind string `json:"kind,omitempty"`
5919
5920	// ForceSendFields is a list of field names (e.g. "FilteredEventIds") to
5921	// unconditionally include in API requests. By default, fields with
5922	// empty values are omitted from API requests. However, any non-pointer,
5923	// non-interface field appearing in ForceSendFields will be sent to the
5924	// server regardless of whether the field is empty or not. This may be
5925	// used to include empty fields in Patch requests.
5926	ForceSendFields []string `json:"-"`
5927
5928	// NullFields is a list of field names (e.g. "FilteredEventIds") to
5929	// include in API requests with the JSON null value. By default, fields
5930	// with empty values are omitted from API requests. However, any field
5931	// with an empty value appearing in NullFields will be sent to the
5932	// server as null. It is an error if a field in this list has a
5933	// non-empty value. This may be used to include null fields in Patch
5934	// requests.
5935	NullFields []string `json:"-"`
5936}
5937
5938func (s *CustomRichMediaEvents) MarshalJSON() ([]byte, error) {
5939	type NoMethod CustomRichMediaEvents
5940	raw := NoMethod(*s)
5941	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5942}
5943
5944// CustomViewabilityMetric: Custom Viewability Metric
5945type CustomViewabilityMetric struct {
5946	// Configuration: Configuration of the custom viewability metric.
5947	Configuration *CustomViewabilityMetricConfiguration `json:"configuration,omitempty"`
5948
5949	// Id: ID of the custom viewability metric.
5950	Id int64 `json:"id,omitempty,string"`
5951
5952	// Name: Name of the custom viewability metric.
5953	Name string `json:"name,omitempty"`
5954
5955	// ForceSendFields is a list of field names (e.g. "Configuration") to
5956	// unconditionally include in API requests. By default, fields with
5957	// empty values are omitted from API requests. However, any non-pointer,
5958	// non-interface field appearing in ForceSendFields will be sent to the
5959	// server regardless of whether the field is empty or not. This may be
5960	// used to include empty fields in Patch requests.
5961	ForceSendFields []string `json:"-"`
5962
5963	// NullFields is a list of field names (e.g. "Configuration") to include
5964	// in API requests with the JSON null value. By default, fields with
5965	// empty values are omitted from API requests. However, any field with
5966	// an empty value appearing in NullFields will be sent to the server as
5967	// null. It is an error if a field in this list has a non-empty value.
5968	// This may be used to include null fields in Patch requests.
5969	NullFields []string `json:"-"`
5970}
5971
5972func (s *CustomViewabilityMetric) MarshalJSON() ([]byte, error) {
5973	type NoMethod CustomViewabilityMetric
5974	raw := NoMethod(*s)
5975	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5976}
5977
5978// CustomViewabilityMetricConfiguration: The attributes, like playtime
5979// and percent onscreen, that define the Custom Viewability Metric.
5980type CustomViewabilityMetricConfiguration struct {
5981	// Audible: Whether the video must be audible to count an impression.
5982	Audible bool `json:"audible,omitempty"`
5983
5984	// TimeMillis: The time in milliseconds the video must play for the
5985	// Custom Viewability Metric to count an impression. If both this and
5986	// timePercent are specified, the earlier of the two will be used.
5987	TimeMillis int64 `json:"timeMillis,omitempty"`
5988
5989	// TimePercent: The percentage of video that must play for the Custom
5990	// Viewability Metric to count an impression. If both this and
5991	// timeMillis are specified, the earlier of the two will be used.
5992	TimePercent int64 `json:"timePercent,omitempty"`
5993
5994	// ViewabilityPercent: The percentage of video that must be on screen
5995	// for the Custom Viewability Metric to count an impression.
5996	ViewabilityPercent int64 `json:"viewabilityPercent,omitempty"`
5997
5998	// ForceSendFields is a list of field names (e.g. "Audible") to
5999	// unconditionally include in API requests. By default, fields with
6000	// empty values are omitted from API requests. However, any non-pointer,
6001	// non-interface field appearing in ForceSendFields will be sent to the
6002	// server regardless of whether the field is empty or not. This may be
6003	// used to include empty fields in Patch requests.
6004	ForceSendFields []string `json:"-"`
6005
6006	// NullFields is a list of field names (e.g. "Audible") to include in
6007	// API requests with the JSON null value. By default, fields with empty
6008	// values are omitted from API requests. However, any field with an
6009	// empty value appearing in NullFields will be sent to the server as
6010	// null. It is an error if a field in this list has a non-empty value.
6011	// This may be used to include null fields in Patch requests.
6012	NullFields []string `json:"-"`
6013}
6014
6015func (s *CustomViewabilityMetricConfiguration) MarshalJSON() ([]byte, error) {
6016	type NoMethod CustomViewabilityMetricConfiguration
6017	raw := NoMethod(*s)
6018	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6019}
6020
6021// DateRange: Represents a date range.
6022type DateRange struct {
6023	// EndDate: The end date of the date range, inclusive. A string of the
6024	// format: "yyyy-MM-dd".
6025	EndDate string `json:"endDate,omitempty"`
6026
6027	// Kind: The kind of resource this is, in this case
6028	// dfareporting#dateRange.
6029	Kind string `json:"kind,omitempty"`
6030
6031	// RelativeDateRange: The date range relative to the date of when the
6032	// report is run.
6033	//
6034	// Possible values:
6035	//   "LAST_14_DAYS"
6036	//   "LAST_24_MONTHS"
6037	//   "LAST_30_DAYS"
6038	//   "LAST_365_DAYS"
6039	//   "LAST_60_DAYS"
6040	//   "LAST_7_DAYS"
6041	//   "LAST_90_DAYS"
6042	//   "MONTH_TO_DATE"
6043	//   "PREVIOUS_MONTH"
6044	//   "PREVIOUS_QUARTER"
6045	//   "PREVIOUS_WEEK"
6046	//   "PREVIOUS_YEAR"
6047	//   "QUARTER_TO_DATE"
6048	//   "TODAY"
6049	//   "WEEK_TO_DATE"
6050	//   "YEAR_TO_DATE"
6051	//   "YESTERDAY"
6052	RelativeDateRange string `json:"relativeDateRange,omitempty"`
6053
6054	// StartDate: The start date of the date range, inclusive. A string of
6055	// the format: "yyyy-MM-dd".
6056	StartDate string `json:"startDate,omitempty"`
6057
6058	// ForceSendFields is a list of field names (e.g. "EndDate") to
6059	// unconditionally include in API requests. By default, fields with
6060	// empty values are omitted from API requests. However, any non-pointer,
6061	// non-interface field appearing in ForceSendFields will be sent to the
6062	// server regardless of whether the field is empty or not. This may be
6063	// used to include empty fields in Patch requests.
6064	ForceSendFields []string `json:"-"`
6065
6066	// NullFields is a list of field names (e.g. "EndDate") to include in
6067	// API requests with the JSON null value. By default, fields with empty
6068	// values are omitted from API requests. However, any field with an
6069	// empty value appearing in NullFields will be sent to the server as
6070	// null. It is an error if a field in this list has a non-empty value.
6071	// This may be used to include null fields in Patch requests.
6072	NullFields []string `json:"-"`
6073}
6074
6075func (s *DateRange) MarshalJSON() ([]byte, error) {
6076	type NoMethod DateRange
6077	raw := NoMethod(*s)
6078	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6079}
6080
6081// DayPartTargeting: Day Part Targeting.
6082type DayPartTargeting struct {
6083	// DaysOfWeek: Days of the week when the ad will serve.
6084	//
6085	// Acceptable values are:
6086	// - "SUNDAY"
6087	// - "MONDAY"
6088	// - "TUESDAY"
6089	// - "WEDNESDAY"
6090	// - "THURSDAY"
6091	// - "FRIDAY"
6092	// - "SATURDAY"
6093	//
6094	// Possible values:
6095	//   "FRIDAY"
6096	//   "MONDAY"
6097	//   "SATURDAY"
6098	//   "SUNDAY"
6099	//   "THURSDAY"
6100	//   "TUESDAY"
6101	//   "WEDNESDAY"
6102	DaysOfWeek []string `json:"daysOfWeek,omitempty"`
6103
6104	// HoursOfDay: Hours of the day when the ad will serve, where 0 is
6105	// midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with
6106	// days of week, in which case the ad would serve during these hours on
6107	// the specified days. For example if Monday, Wednesday, Friday are the
6108	// days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is
6109	// specified, the ad would serve Monday, Wednesdays, and Fridays at
6110	// 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive.
6111	HoursOfDay []int64 `json:"hoursOfDay,omitempty"`
6112
6113	// UserLocalTime: Whether or not to use the user's local time. If false,
6114	// the America/New York time zone applies.
6115	UserLocalTime bool `json:"userLocalTime,omitempty"`
6116
6117	// ForceSendFields is a list of field names (e.g. "DaysOfWeek") to
6118	// unconditionally include in API requests. By default, fields with
6119	// empty values are omitted from API requests. However, any non-pointer,
6120	// non-interface field appearing in ForceSendFields will be sent to the
6121	// server regardless of whether the field is empty or not. This may be
6122	// used to include empty fields in Patch requests.
6123	ForceSendFields []string `json:"-"`
6124
6125	// NullFields is a list of field names (e.g. "DaysOfWeek") to include in
6126	// API requests with the JSON null value. By default, fields with empty
6127	// values are omitted from API requests. However, any field with an
6128	// empty value appearing in NullFields will be sent to the server as
6129	// null. It is an error if a field in this list has a non-empty value.
6130	// This may be used to include null fields in Patch requests.
6131	NullFields []string `json:"-"`
6132}
6133
6134func (s *DayPartTargeting) MarshalJSON() ([]byte, error) {
6135	type NoMethod DayPartTargeting
6136	raw := NoMethod(*s)
6137	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6138}
6139
6140// DeepLink: Contains information about a landing page deep link.
6141type DeepLink struct {
6142	// AppUrl: The URL of the mobile app being linked to.
6143	AppUrl string `json:"appUrl,omitempty"`
6144
6145	// FallbackUrl: The fallback URL. This URL will be served to users who
6146	// do not have the mobile app installed.
6147	FallbackUrl string `json:"fallbackUrl,omitempty"`
6148
6149	// Kind: Identifies what kind of resource this is. Value: the fixed
6150	// string "dfareporting#deepLink".
6151	Kind string `json:"kind,omitempty"`
6152
6153	// MobileApp: The mobile app targeted by this deep link.
6154	MobileApp *MobileApp `json:"mobileApp,omitempty"`
6155
6156	// RemarketingListIds: Ads served to users on these remarketing lists
6157	// will use this deep link. Applicable when mobileApp.directory is
6158	// APPLE_APP_STORE.
6159	RemarketingListIds googleapi.Int64s `json:"remarketingListIds,omitempty"`
6160
6161	// ForceSendFields is a list of field names (e.g. "AppUrl") to
6162	// unconditionally include in API requests. By default, fields with
6163	// empty values are omitted from API requests. However, any non-pointer,
6164	// non-interface field appearing in ForceSendFields will be sent to the
6165	// server regardless of whether the field is empty or not. This may be
6166	// used to include empty fields in Patch requests.
6167	ForceSendFields []string `json:"-"`
6168
6169	// NullFields is a list of field names (e.g. "AppUrl") to include in API
6170	// requests with the JSON null value. By default, fields with empty
6171	// values are omitted from API requests. However, any field with an
6172	// empty value appearing in NullFields will be sent to the server as
6173	// null. It is an error if a field in this list has a non-empty value.
6174	// This may be used to include null fields in Patch requests.
6175	NullFields []string `json:"-"`
6176}
6177
6178func (s *DeepLink) MarshalJSON() ([]byte, error) {
6179	type NoMethod DeepLink
6180	raw := NoMethod(*s)
6181	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6182}
6183
6184// DefaultClickThroughEventTagProperties: Properties of inheriting and
6185// overriding the default click-through event tag. A campaign may
6186// override the event tag defined at the advertiser level, and an ad may
6187// also override the campaign's setting further.
6188type DefaultClickThroughEventTagProperties struct {
6189	// DefaultClickThroughEventTagId: ID of the click-through event tag to
6190	// apply to all ads in this entity's scope.
6191	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
6192
6193	// OverrideInheritedEventTag: Whether this entity should override the
6194	// inherited default click-through event tag with its own defined value.
6195	OverrideInheritedEventTag bool `json:"overrideInheritedEventTag,omitempty"`
6196
6197	// ForceSendFields is a list of field names (e.g.
6198	// "DefaultClickThroughEventTagId") to unconditionally include in API
6199	// requests. By default, fields with empty values are omitted from API
6200	// requests. However, any non-pointer, non-interface field appearing in
6201	// ForceSendFields will be sent to the server regardless of whether the
6202	// field is empty or not. This may be used to include empty fields in
6203	// Patch requests.
6204	ForceSendFields []string `json:"-"`
6205
6206	// NullFields is a list of field names (e.g.
6207	// "DefaultClickThroughEventTagId") to include in API requests with the
6208	// JSON null value. By default, fields with empty values are omitted
6209	// from API requests. However, any field with an empty value appearing
6210	// in NullFields will be sent to the server as null. It is an error if a
6211	// field in this list has a non-empty value. This may be used to include
6212	// null fields in Patch requests.
6213	NullFields []string `json:"-"`
6214}
6215
6216func (s *DefaultClickThroughEventTagProperties) MarshalJSON() ([]byte, error) {
6217	type NoMethod DefaultClickThroughEventTagProperties
6218	raw := NoMethod(*s)
6219	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6220}
6221
6222// DeliverySchedule: Delivery Schedule.
6223type DeliverySchedule struct {
6224	// FrequencyCap: Limit on the number of times an individual user can be
6225	// served the ad within a specified period of time.
6226	FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
6227
6228	// HardCutoff: Whether or not hard cutoff is enabled. If true, the ad
6229	// will not serve after the end date and time. Otherwise the ad will
6230	// continue to be served until it has reached its delivery goals.
6231	HardCutoff bool `json:"hardCutoff,omitempty"`
6232
6233	// ImpressionRatio: Impression ratio for this ad. This ratio determines
6234	// how often each ad is served relative to the others. For example, if
6235	// ad A has an impression ratio of 1 and ad B has an impression ratio of
6236	// 3, then Campaign Manager will serve ad B three times as often as ad
6237	// A. Acceptable values are 1 to 10, inclusive.
6238	ImpressionRatio int64 `json:"impressionRatio,omitempty,string"`
6239
6240	// Priority: Serving priority of an ad, with respect to other ads. The
6241	// lower the priority number, the greater the priority with which it is
6242	// served.
6243	//
6244	// Possible values:
6245	//   "AD_PRIORITY_01"
6246	//   "AD_PRIORITY_02"
6247	//   "AD_PRIORITY_03"
6248	//   "AD_PRIORITY_04"
6249	//   "AD_PRIORITY_05"
6250	//   "AD_PRIORITY_06"
6251	//   "AD_PRIORITY_07"
6252	//   "AD_PRIORITY_08"
6253	//   "AD_PRIORITY_09"
6254	//   "AD_PRIORITY_10"
6255	//   "AD_PRIORITY_11"
6256	//   "AD_PRIORITY_12"
6257	//   "AD_PRIORITY_13"
6258	//   "AD_PRIORITY_14"
6259	//   "AD_PRIORITY_15"
6260	//   "AD_PRIORITY_16"
6261	Priority string `json:"priority,omitempty"`
6262
6263	// ForceSendFields is a list of field names (e.g. "FrequencyCap") to
6264	// unconditionally include in API requests. By default, fields with
6265	// empty values are omitted from API requests. However, any non-pointer,
6266	// non-interface field appearing in ForceSendFields will be sent to the
6267	// server regardless of whether the field is empty or not. This may be
6268	// used to include empty fields in Patch requests.
6269	ForceSendFields []string `json:"-"`
6270
6271	// NullFields is a list of field names (e.g. "FrequencyCap") to include
6272	// in API requests with the JSON null value. By default, fields with
6273	// empty values are omitted from API requests. However, any field with
6274	// an empty value appearing in NullFields will be sent to the server as
6275	// null. It is an error if a field in this list has a non-empty value.
6276	// This may be used to include null fields in Patch requests.
6277	NullFields []string `json:"-"`
6278}
6279
6280func (s *DeliverySchedule) MarshalJSON() ([]byte, error) {
6281	type NoMethod DeliverySchedule
6282	raw := NoMethod(*s)
6283	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6284}
6285
6286// DfpSettings: Google Ad Manager Settings
6287type DfpSettings struct {
6288	// DfpNetworkCode: Ad Manager network code for this directory site.
6289	DfpNetworkCode string `json:"dfpNetworkCode,omitempty"`
6290
6291	// DfpNetworkName: Ad Manager network name for this directory site.
6292	DfpNetworkName string `json:"dfpNetworkName,omitempty"`
6293
6294	// ProgrammaticPlacementAccepted: Whether this directory site accepts
6295	// programmatic placements.
6296	ProgrammaticPlacementAccepted bool `json:"programmaticPlacementAccepted,omitempty"`
6297
6298	// PubPaidPlacementAccepted: Whether this directory site accepts
6299	// publisher-paid tags.
6300	PubPaidPlacementAccepted bool `json:"pubPaidPlacementAccepted,omitempty"`
6301
6302	// PublisherPortalOnly: Whether this directory site is available only
6303	// via Publisher Portal.
6304	PublisherPortalOnly bool `json:"publisherPortalOnly,omitempty"`
6305
6306	// ForceSendFields is a list of field names (e.g. "DfpNetworkCode") to
6307	// unconditionally include in API requests. By default, fields with
6308	// empty values are omitted from API requests. However, any non-pointer,
6309	// non-interface field appearing in ForceSendFields will be sent to the
6310	// server regardless of whether the field is empty or not. This may be
6311	// used to include empty fields in Patch requests.
6312	ForceSendFields []string `json:"-"`
6313
6314	// NullFields is a list of field names (e.g. "DfpNetworkCode") to
6315	// include in API requests with the JSON null value. By default, fields
6316	// with empty values are omitted from API requests. However, any field
6317	// with an empty value appearing in NullFields will be sent to the
6318	// server as null. It is an error if a field in this list has a
6319	// non-empty value. This may be used to include null fields in Patch
6320	// requests.
6321	NullFields []string `json:"-"`
6322}
6323
6324func (s *DfpSettings) MarshalJSON() ([]byte, error) {
6325	type NoMethod DfpSettings
6326	raw := NoMethod(*s)
6327	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6328}
6329
6330// Dimension: Represents a dimension.
6331type Dimension struct {
6332	// Kind: The kind of resource this is, in this case
6333	// dfareporting#dimension.
6334	Kind string `json:"kind,omitempty"`
6335
6336	// Name: The dimension name, e.g. dfa:advertiser
6337	Name string `json:"name,omitempty"`
6338
6339	// ForceSendFields is a list of field names (e.g. "Kind") to
6340	// unconditionally include in API requests. By default, fields with
6341	// empty values are omitted from API requests. However, any non-pointer,
6342	// non-interface field appearing in ForceSendFields will be sent to the
6343	// server regardless of whether the field is empty or not. This may be
6344	// used to include empty fields in Patch requests.
6345	ForceSendFields []string `json:"-"`
6346
6347	// NullFields is a list of field names (e.g. "Kind") to include in API
6348	// requests with the JSON null value. By default, fields with empty
6349	// values are omitted from API requests. However, any field with an
6350	// empty value appearing in NullFields will be sent to the server as
6351	// null. It is an error if a field in this list has a non-empty value.
6352	// This may be used to include null fields in Patch requests.
6353	NullFields []string `json:"-"`
6354}
6355
6356func (s *Dimension) MarshalJSON() ([]byte, error) {
6357	type NoMethod Dimension
6358	raw := NoMethod(*s)
6359	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6360}
6361
6362// DimensionFilter: Represents a dimension filter.
6363type DimensionFilter struct {
6364	// DimensionName: The name of the dimension to filter.
6365	DimensionName string `json:"dimensionName,omitempty"`
6366
6367	// Kind: The kind of resource this is, in this case
6368	// dfareporting#dimensionFilter.
6369	Kind string `json:"kind,omitempty"`
6370
6371	// Value: The value of the dimension to filter.
6372	Value string `json:"value,omitempty"`
6373
6374	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6375	// unconditionally include in API requests. By default, fields with
6376	// empty values are omitted from API requests. However, any non-pointer,
6377	// non-interface field appearing in ForceSendFields will be sent to the
6378	// server regardless of whether the field is empty or not. This may be
6379	// used to include empty fields in Patch requests.
6380	ForceSendFields []string `json:"-"`
6381
6382	// NullFields is a list of field names (e.g. "DimensionName") to include
6383	// in API requests with the JSON null value. By default, fields with
6384	// empty values are omitted from API requests. However, any field with
6385	// an empty value appearing in NullFields will be sent to the server as
6386	// null. It is an error if a field in this list has a non-empty value.
6387	// This may be used to include null fields in Patch requests.
6388	NullFields []string `json:"-"`
6389}
6390
6391func (s *DimensionFilter) MarshalJSON() ([]byte, error) {
6392	type NoMethod DimensionFilter
6393	raw := NoMethod(*s)
6394	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6395}
6396
6397// DimensionValue: Represents a DimensionValue resource.
6398type DimensionValue struct {
6399	// DimensionName: The name of the dimension.
6400	DimensionName string `json:"dimensionName,omitempty"`
6401
6402	// Etag: The eTag of this response for caching purposes.
6403	Etag string `json:"etag,omitempty"`
6404
6405	// Id: The ID associated with the value if available.
6406	Id string `json:"id,omitempty"`
6407
6408	// Kind: The kind of resource this is, in this case
6409	// dfareporting#dimensionValue.
6410	Kind string `json:"kind,omitempty"`
6411
6412	// MatchType: Determines how the 'value' field is matched when
6413	// filtering. If not specified, defaults to EXACT. If set to
6414	// WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable
6415	// length character sequences, and it can be escaped with a backslash.
6416	// Note, only paid search dimensions ('dfa:paidSearch*') allow a
6417	// matchType other than EXACT.
6418	//
6419	// Possible values:
6420	//   "BEGINS_WITH"
6421	//   "CONTAINS"
6422	//   "EXACT"
6423	//   "WILDCARD_EXPRESSION"
6424	MatchType string `json:"matchType,omitempty"`
6425
6426	// Value: The value of the dimension.
6427	Value string `json:"value,omitempty"`
6428
6429	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6430	// unconditionally include in API requests. By default, fields with
6431	// empty values are omitted from API requests. However, any non-pointer,
6432	// non-interface field appearing in ForceSendFields will be sent to the
6433	// server regardless of whether the field is empty or not. This may be
6434	// used to include empty fields in Patch requests.
6435	ForceSendFields []string `json:"-"`
6436
6437	// NullFields is a list of field names (e.g. "DimensionName") to include
6438	// in API requests with the JSON null value. By default, fields with
6439	// empty values are omitted from API requests. However, any field with
6440	// an empty value appearing in NullFields will be sent to the server as
6441	// null. It is an error if a field in this list has a non-empty value.
6442	// This may be used to include null fields in Patch requests.
6443	NullFields []string `json:"-"`
6444}
6445
6446func (s *DimensionValue) MarshalJSON() ([]byte, error) {
6447	type NoMethod DimensionValue
6448	raw := NoMethod(*s)
6449	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6450}
6451
6452// DimensionValueList: Represents the list of DimensionValue resources.
6453type DimensionValueList struct {
6454	// Etag: The eTag of this response for caching purposes.
6455	Etag string `json:"etag,omitempty"`
6456
6457	// Items: The dimension values returned in this response.
6458	Items []*DimensionValue `json:"items,omitempty"`
6459
6460	// Kind: The kind of list this is, in this case
6461	// dfareporting#dimensionValueList.
6462	Kind string `json:"kind,omitempty"`
6463
6464	// NextPageToken: Continuation token used to page through dimension
6465	// values. To retrieve the next page of results, set the next request's
6466	// "pageToken" to the value of this field. The page token is only valid
6467	// for a limited amount of time and should not be persisted.
6468	NextPageToken string `json:"nextPageToken,omitempty"`
6469
6470	// ServerResponse contains the HTTP response code and headers from the
6471	// server.
6472	googleapi.ServerResponse `json:"-"`
6473
6474	// ForceSendFields is a list of field names (e.g. "Etag") to
6475	// unconditionally include in API requests. By default, fields with
6476	// empty values are omitted from API requests. However, any non-pointer,
6477	// non-interface field appearing in ForceSendFields will be sent to the
6478	// server regardless of whether the field is empty or not. This may be
6479	// used to include empty fields in Patch requests.
6480	ForceSendFields []string `json:"-"`
6481
6482	// NullFields is a list of field names (e.g. "Etag") to include in API
6483	// requests with the JSON null value. By default, fields with empty
6484	// values are omitted from API requests. However, any field with an
6485	// empty value appearing in NullFields will be sent to the server as
6486	// null. It is an error if a field in this list has a non-empty value.
6487	// This may be used to include null fields in Patch requests.
6488	NullFields []string `json:"-"`
6489}
6490
6491func (s *DimensionValueList) MarshalJSON() ([]byte, error) {
6492	type NoMethod DimensionValueList
6493	raw := NoMethod(*s)
6494	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6495}
6496
6497// DimensionValueRequest: Represents a DimensionValuesRequest.
6498type DimensionValueRequest struct {
6499	// DimensionName: The name of the dimension for which values should be
6500	// requested.
6501	DimensionName string `json:"dimensionName,omitempty"`
6502
6503	// EndDate: The end date of the date range for which to retrieve
6504	// dimension values. A string of the format "yyyy-MM-dd".
6505	EndDate string `json:"endDate,omitempty"`
6506
6507	// Filters: The list of filters by which to filter values. The filters
6508	// are ANDed.
6509	Filters []*DimensionFilter `json:"filters,omitempty"`
6510
6511	// Kind: The kind of request this is, in this case
6512	// dfareporting#dimensionValueRequest.
6513	Kind string `json:"kind,omitempty"`
6514
6515	// StartDate: The start date of the date range for which to retrieve
6516	// dimension values. A string of the format "yyyy-MM-dd".
6517	StartDate string `json:"startDate,omitempty"`
6518
6519	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6520	// unconditionally include in API requests. By default, fields with
6521	// empty values are omitted from API requests. However, any non-pointer,
6522	// non-interface field appearing in ForceSendFields will be sent to the
6523	// server regardless of whether the field is empty or not. This may be
6524	// used to include empty fields in Patch requests.
6525	ForceSendFields []string `json:"-"`
6526
6527	// NullFields is a list of field names (e.g. "DimensionName") to include
6528	// in API requests with the JSON null value. By default, fields with
6529	// empty values are omitted from API requests. However, any field with
6530	// an empty value appearing in NullFields will be sent to the server as
6531	// null. It is an error if a field in this list has a non-empty value.
6532	// This may be used to include null fields in Patch requests.
6533	NullFields []string `json:"-"`
6534}
6535
6536func (s *DimensionValueRequest) MarshalJSON() ([]byte, error) {
6537	type NoMethod DimensionValueRequest
6538	raw := NoMethod(*s)
6539	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6540}
6541
6542// DirectorySite: DirectorySites contains properties of a website from
6543// the Site Directory. Sites need to be added to an account via the
6544// Sites resource before they can be assigned to a placement.
6545type DirectorySite struct {
6546	// Active: Whether this directory site is active.
6547	Active bool `json:"active,omitempty"`
6548
6549	// Id: ID of this directory site. This is a read-only, auto-generated
6550	// field.
6551	Id int64 `json:"id,omitempty,string"`
6552
6553	// IdDimensionValue: Dimension value for the ID of this directory site.
6554	// This is a read-only, auto-generated field.
6555	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
6556
6557	// InpageTagFormats: Tag types for regular placements.
6558	//
6559	// Acceptable values are:
6560	// - "STANDARD"
6561	// - "IFRAME_JAVASCRIPT_INPAGE"
6562	// - "INTERNAL_REDIRECT_INPAGE"
6563	// - "JAVASCRIPT_INPAGE"
6564	//
6565	// Possible values:
6566	//   "IFRAME_JAVASCRIPT_INPAGE"
6567	//   "INTERNAL_REDIRECT_INPAGE"
6568	//   "JAVASCRIPT_INPAGE"
6569	//   "STANDARD"
6570	InpageTagFormats []string `json:"inpageTagFormats,omitempty"`
6571
6572	// InterstitialTagFormats: Tag types for interstitial
6573	// placements.
6574	//
6575	// Acceptable values are:
6576	// - "IFRAME_JAVASCRIPT_INTERSTITIAL"
6577	// - "INTERNAL_REDIRECT_INTERSTITIAL"
6578	// - "JAVASCRIPT_INTERSTITIAL"
6579	//
6580	// Possible values:
6581	//   "IFRAME_JAVASCRIPT_INTERSTITIAL"
6582	//   "INTERNAL_REDIRECT_INTERSTITIAL"
6583	//   "JAVASCRIPT_INTERSTITIAL"
6584	InterstitialTagFormats []string `json:"interstitialTagFormats,omitempty"`
6585
6586	// Kind: Identifies what kind of resource this is. Value: the fixed
6587	// string "dfareporting#directorySite".
6588	Kind string `json:"kind,omitempty"`
6589
6590	// Name: Name of this directory site.
6591	Name string `json:"name,omitempty"`
6592
6593	// Settings: Directory site settings.
6594	Settings *DirectorySiteSettings `json:"settings,omitempty"`
6595
6596	// Url: URL of this directory site.
6597	Url string `json:"url,omitempty"`
6598
6599	// ServerResponse contains the HTTP response code and headers from the
6600	// server.
6601	googleapi.ServerResponse `json:"-"`
6602
6603	// ForceSendFields is a list of field names (e.g. "Active") to
6604	// unconditionally include in API requests. By default, fields with
6605	// empty values are omitted from API requests. However, any non-pointer,
6606	// non-interface field appearing in ForceSendFields will be sent to the
6607	// server regardless of whether the field is empty or not. This may be
6608	// used to include empty fields in Patch requests.
6609	ForceSendFields []string `json:"-"`
6610
6611	// NullFields is a list of field names (e.g. "Active") to include in API
6612	// requests with the JSON null value. By default, fields with empty
6613	// values are omitted from API requests. However, any field with an
6614	// empty value appearing in NullFields will be sent to the server as
6615	// null. It is an error if a field in this list has a non-empty value.
6616	// This may be used to include null fields in Patch requests.
6617	NullFields []string `json:"-"`
6618}
6619
6620func (s *DirectorySite) MarshalJSON() ([]byte, error) {
6621	type NoMethod DirectorySite
6622	raw := NoMethod(*s)
6623	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6624}
6625
6626// DirectorySiteSettings: Directory Site Settings
6627type DirectorySiteSettings struct {
6628	// ActiveViewOptOut: Whether this directory site has disabled active
6629	// view creatives.
6630	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
6631
6632	// DfpSettings: Directory site Ad Manager settings.
6633	DfpSettings *DfpSettings `json:"dfpSettings,omitempty"`
6634
6635	// InstreamVideoPlacementAccepted: Whether this site accepts in-stream
6636	// video ads.
6637	InstreamVideoPlacementAccepted bool `json:"instreamVideoPlacementAccepted,omitempty"`
6638
6639	// InterstitialPlacementAccepted: Whether this site accepts interstitial
6640	// ads.
6641	InterstitialPlacementAccepted bool `json:"interstitialPlacementAccepted,omitempty"`
6642
6643	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
6644	// unconditionally include in API requests. By default, fields with
6645	// empty values are omitted from API requests. However, any non-pointer,
6646	// non-interface field appearing in ForceSendFields will be sent to the
6647	// server regardless of whether the field is empty or not. This may be
6648	// used to include empty fields in Patch requests.
6649	ForceSendFields []string `json:"-"`
6650
6651	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
6652	// include in API requests with the JSON null value. By default, fields
6653	// with empty values are omitted from API requests. However, any field
6654	// with an empty value appearing in NullFields will be sent to the
6655	// server as null. It is an error if a field in this list has a
6656	// non-empty value. This may be used to include null fields in Patch
6657	// requests.
6658	NullFields []string `json:"-"`
6659}
6660
6661func (s *DirectorySiteSettings) MarshalJSON() ([]byte, error) {
6662	type NoMethod DirectorySiteSettings
6663	raw := NoMethod(*s)
6664	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6665}
6666
6667// DirectorySitesListResponse: Directory Site List Response
6668type DirectorySitesListResponse struct {
6669	// DirectorySites: Directory site collection.
6670	DirectorySites []*DirectorySite `json:"directorySites,omitempty"`
6671
6672	// Kind: Identifies what kind of resource this is. Value: the fixed
6673	// string "dfareporting#directorySitesListResponse".
6674	Kind string `json:"kind,omitempty"`
6675
6676	// NextPageToken: Pagination token to be used for the next list
6677	// operation.
6678	NextPageToken string `json:"nextPageToken,omitempty"`
6679
6680	// ServerResponse contains the HTTP response code and headers from the
6681	// server.
6682	googleapi.ServerResponse `json:"-"`
6683
6684	// ForceSendFields is a list of field names (e.g. "DirectorySites") to
6685	// unconditionally include in API requests. By default, fields with
6686	// empty values are omitted from API requests. However, any non-pointer,
6687	// non-interface field appearing in ForceSendFields will be sent to the
6688	// server regardless of whether the field is empty or not. This may be
6689	// used to include empty fields in Patch requests.
6690	ForceSendFields []string `json:"-"`
6691
6692	// NullFields is a list of field names (e.g. "DirectorySites") to
6693	// include in API requests with the JSON null value. By default, fields
6694	// with empty values are omitted from API requests. However, any field
6695	// with an empty value appearing in NullFields will be sent to the
6696	// server as null. It is an error if a field in this list has a
6697	// non-empty value. This may be used to include null fields in Patch
6698	// requests.
6699	NullFields []string `json:"-"`
6700}
6701
6702func (s *DirectorySitesListResponse) MarshalJSON() ([]byte, error) {
6703	type NoMethod DirectorySitesListResponse
6704	raw := NoMethod(*s)
6705	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6706}
6707
6708// DynamicTargetingKey: Contains properties of a dynamic targeting key.
6709// Dynamic targeting keys are unique, user-friendly labels, created at
6710// the advertiser level in DCM, that can be assigned to ads, creatives,
6711// and placements and used for targeting with Studio dynamic creatives.
6712// Use these labels instead of numeric Campaign Manager IDs (such as
6713// placement IDs) to save time and avoid errors in your dynamic feeds.
6714type DynamicTargetingKey struct {
6715	// Kind: Identifies what kind of resource this is. Value: the fixed
6716	// string "dfareporting#dynamicTargetingKey".
6717	Kind string `json:"kind,omitempty"`
6718
6719	// Name: Name of this dynamic targeting key. This is a required field.
6720	// Must be less than 256 characters long and cannot contain commas. All
6721	// characters are converted to lowercase.
6722	Name string `json:"name,omitempty"`
6723
6724	// ObjectId: ID of the object of this dynamic targeting key. This is a
6725	// required field.
6726	ObjectId int64 `json:"objectId,omitempty,string"`
6727
6728	// ObjectType: Type of the object of this dynamic targeting key. This is
6729	// a required field.
6730	//
6731	// Possible values:
6732	//   "OBJECT_AD"
6733	//   "OBJECT_ADVERTISER"
6734	//   "OBJECT_CREATIVE"
6735	//   "OBJECT_PLACEMENT"
6736	ObjectType string `json:"objectType,omitempty"`
6737
6738	// ServerResponse contains the HTTP response code and headers from the
6739	// server.
6740	googleapi.ServerResponse `json:"-"`
6741
6742	// ForceSendFields is a list of field names (e.g. "Kind") to
6743	// unconditionally include in API requests. By default, fields with
6744	// empty values are omitted from API requests. However, any non-pointer,
6745	// non-interface field appearing in ForceSendFields will be sent to the
6746	// server regardless of whether the field is empty or not. This may be
6747	// used to include empty fields in Patch requests.
6748	ForceSendFields []string `json:"-"`
6749
6750	// NullFields is a list of field names (e.g. "Kind") to include in API
6751	// requests with the JSON null value. By default, fields with empty
6752	// values are omitted from API requests. However, any field with an
6753	// empty value appearing in NullFields will be sent to the server as
6754	// null. It is an error if a field in this list has a non-empty value.
6755	// This may be used to include null fields in Patch requests.
6756	NullFields []string `json:"-"`
6757}
6758
6759func (s *DynamicTargetingKey) MarshalJSON() ([]byte, error) {
6760	type NoMethod DynamicTargetingKey
6761	raw := NoMethod(*s)
6762	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6763}
6764
6765// DynamicTargetingKeysListResponse: Dynamic Targeting Key List Response
6766type DynamicTargetingKeysListResponse struct {
6767	// DynamicTargetingKeys: Dynamic targeting key collection.
6768	DynamicTargetingKeys []*DynamicTargetingKey `json:"dynamicTargetingKeys,omitempty"`
6769
6770	// Kind: Identifies what kind of resource this is. Value: the fixed
6771	// string "dfareporting#dynamicTargetingKeysListResponse".
6772	Kind string `json:"kind,omitempty"`
6773
6774	// ServerResponse contains the HTTP response code and headers from the
6775	// server.
6776	googleapi.ServerResponse `json:"-"`
6777
6778	// ForceSendFields is a list of field names (e.g.
6779	// "DynamicTargetingKeys") to unconditionally include in API requests.
6780	// By default, fields with empty values are omitted from API requests.
6781	// However, any non-pointer, non-interface field appearing in
6782	// ForceSendFields will be sent to the server regardless of whether the
6783	// field is empty or not. This may be used to include empty fields in
6784	// Patch requests.
6785	ForceSendFields []string `json:"-"`
6786
6787	// NullFields is a list of field names (e.g. "DynamicTargetingKeys") to
6788	// include in API requests with the JSON null value. By default, fields
6789	// with empty values are omitted from API requests. However, any field
6790	// with an empty value appearing in NullFields will be sent to the
6791	// server as null. It is an error if a field in this list has a
6792	// non-empty value. This may be used to include null fields in Patch
6793	// requests.
6794	NullFields []string `json:"-"`
6795}
6796
6797func (s *DynamicTargetingKeysListResponse) MarshalJSON() ([]byte, error) {
6798	type NoMethod DynamicTargetingKeysListResponse
6799	raw := NoMethod(*s)
6800	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6801}
6802
6803// EncryptionInfo: A description of how user IDs are encrypted.
6804type EncryptionInfo struct {
6805	// EncryptionEntityId: The encryption entity ID. This should match the
6806	// encryption configuration for ad serving or Data Transfer.
6807	EncryptionEntityId int64 `json:"encryptionEntityId,omitempty,string"`
6808
6809	// EncryptionEntityType: The encryption entity type. This should match
6810	// the encryption configuration for ad serving or Data Transfer.
6811	//
6812	// Possible values:
6813	//   "ADWORDS_CUSTOMER"
6814	//   "DBM_ADVERTISER"
6815	//   "DBM_PARTNER"
6816	//   "DCM_ACCOUNT"
6817	//   "DCM_ADVERTISER"
6818	//   "DFP_NETWORK_CODE"
6819	//   "ENCRYPTION_ENTITY_TYPE_UNKNOWN"
6820	EncryptionEntityType string `json:"encryptionEntityType,omitempty"`
6821
6822	// EncryptionSource: Describes whether the encrypted cookie was received
6823	// from ad serving (the %m macro) or from Data Transfer.
6824	//
6825	// Possible values:
6826	//   "AD_SERVING"
6827	//   "DATA_TRANSFER"
6828	//   "ENCRYPTION_SCOPE_UNKNOWN"
6829	EncryptionSource string `json:"encryptionSource,omitempty"`
6830
6831	// Kind: Identifies what kind of resource this is. Value: the fixed
6832	// string "dfareporting#encryptionInfo".
6833	Kind string `json:"kind,omitempty"`
6834
6835	// ForceSendFields is a list of field names (e.g. "EncryptionEntityId")
6836	// to unconditionally include in API requests. By default, fields with
6837	// empty values are omitted from API requests. However, any non-pointer,
6838	// non-interface field appearing in ForceSendFields will be sent to the
6839	// server regardless of whether the field is empty or not. This may be
6840	// used to include empty fields in Patch requests.
6841	ForceSendFields []string `json:"-"`
6842
6843	// NullFields is a list of field names (e.g. "EncryptionEntityId") to
6844	// include in API requests with the JSON null value. By default, fields
6845	// with empty values are omitted from API requests. However, any field
6846	// with an empty value appearing in NullFields will be sent to the
6847	// server as null. It is an error if a field in this list has a
6848	// non-empty value. This may be used to include null fields in Patch
6849	// requests.
6850	NullFields []string `json:"-"`
6851}
6852
6853func (s *EncryptionInfo) MarshalJSON() ([]byte, error) {
6854	type NoMethod EncryptionInfo
6855	raw := NoMethod(*s)
6856	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6857}
6858
6859// EventTag: Contains properties of an event tag.
6860type EventTag struct {
6861	// AccountId: Account ID of this event tag. This is a read-only field
6862	// that can be left blank.
6863	AccountId int64 `json:"accountId,omitempty,string"`
6864
6865	// AdvertiserId: Advertiser ID of this event tag. This field or the
6866	// campaignId field is required on insertion.
6867	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6868
6869	// AdvertiserIdDimensionValue: Dimension value for the ID of the
6870	// advertiser. This is a read-only, auto-generated field.
6871	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
6872
6873	// CampaignId: Campaign ID of this event tag. This field or the
6874	// advertiserId field is required on insertion.
6875	CampaignId int64 `json:"campaignId,omitempty,string"`
6876
6877	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
6878	// This is a read-only, auto-generated field.
6879	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
6880
6881	// EnabledByDefault: Whether this event tag should be automatically
6882	// enabled for all of the advertiser's campaigns and ads.
6883	EnabledByDefault bool `json:"enabledByDefault,omitempty"`
6884
6885	// ExcludeFromAdxRequests: Whether to remove this event tag from ads
6886	// that are trafficked through Display & Video 360 to Ad Exchange. This
6887	// may be useful if the event tag uses a pixel that is unapproved for Ad
6888	// Exchange bids on one or more networks, such as the Google Display
6889	// Network.
6890	ExcludeFromAdxRequests bool `json:"excludeFromAdxRequests,omitempty"`
6891
6892	// Id: ID of this event tag. This is a read-only, auto-generated field.
6893	Id int64 `json:"id,omitempty,string"`
6894
6895	// Kind: Identifies what kind of resource this is. Value: the fixed
6896	// string "dfareporting#eventTag".
6897	Kind string `json:"kind,omitempty"`
6898
6899	// Name: Name of this event tag. This is a required field and must be
6900	// less than 256 characters long.
6901	Name string `json:"name,omitempty"`
6902
6903	// SiteFilterType: Site filter type for this event tag. If no type is
6904	// specified then the event tag will be applied to all sites.
6905	//
6906	// Possible values:
6907	//   "BLACKLIST"
6908	//   "WHITELIST"
6909	SiteFilterType string `json:"siteFilterType,omitempty"`
6910
6911	// SiteIds: Filter list of site IDs associated with this event tag. The
6912	// siteFilterType determines whether this is a whitelist or blacklist
6913	// filter.
6914	SiteIds googleapi.Int64s `json:"siteIds,omitempty"`
6915
6916	// SslCompliant: Whether this tag is SSL-compliant or not. This is a
6917	// read-only field.
6918	SslCompliant bool `json:"sslCompliant,omitempty"`
6919
6920	// Status: Status of this event tag. Must be ENABLED for this event tag
6921	// to fire. This is a required field.
6922	//
6923	// Possible values:
6924	//   "DISABLED"
6925	//   "ENABLED"
6926	Status string `json:"status,omitempty"`
6927
6928	// SubaccountId: Subaccount ID of this event tag. This is a read-only
6929	// field that can be left blank.
6930	SubaccountId int64 `json:"subaccountId,omitempty,string"`
6931
6932	// Type: Event tag type. Can be used to specify whether to use a
6933	// third-party pixel, a third-party JavaScript URL, or a third-party
6934	// click-through URL for either impression or click tracking. This is a
6935	// required field.
6936	//
6937	// Possible values:
6938	//   "CLICK_THROUGH_EVENT_TAG"
6939	//   "IMPRESSION_IMAGE_EVENT_TAG"
6940	//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
6941	Type string `json:"type,omitempty"`
6942
6943	// Url: Payload URL for this event tag. The URL on a click-through event
6944	// tag should have a landing page URL appended to the end of it. This
6945	// field is required on insertion.
6946	Url string `json:"url,omitempty"`
6947
6948	// UrlEscapeLevels: Number of times the landing page URL should be
6949	// URL-escaped before being appended to the click-through event tag URL.
6950	// Only applies to click-through event tags as specified by the event
6951	// tag type.
6952	UrlEscapeLevels int64 `json:"urlEscapeLevels,omitempty"`
6953
6954	// ServerResponse contains the HTTP response code and headers from the
6955	// server.
6956	googleapi.ServerResponse `json:"-"`
6957
6958	// ForceSendFields is a list of field names (e.g. "AccountId") to
6959	// unconditionally include in API requests. By default, fields with
6960	// empty values are omitted from API requests. However, any non-pointer,
6961	// non-interface field appearing in ForceSendFields will be sent to the
6962	// server regardless of whether the field is empty or not. This may be
6963	// used to include empty fields in Patch requests.
6964	ForceSendFields []string `json:"-"`
6965
6966	// NullFields is a list of field names (e.g. "AccountId") to include in
6967	// API requests with the JSON null value. By default, fields with empty
6968	// values are omitted from API requests. However, any field with an
6969	// empty value appearing in NullFields will be sent to the server as
6970	// null. It is an error if a field in this list has a non-empty value.
6971	// This may be used to include null fields in Patch requests.
6972	NullFields []string `json:"-"`
6973}
6974
6975func (s *EventTag) MarshalJSON() ([]byte, error) {
6976	type NoMethod EventTag
6977	raw := NoMethod(*s)
6978	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6979}
6980
6981// EventTagOverride: Event tag override information.
6982type EventTagOverride struct {
6983	// Enabled: Whether this override is enabled.
6984	Enabled bool `json:"enabled,omitempty"`
6985
6986	// Id: ID of this event tag override. This is a read-only,
6987	// auto-generated field.
6988	Id int64 `json:"id,omitempty,string"`
6989
6990	// ForceSendFields is a list of field names (e.g. "Enabled") to
6991	// unconditionally include in API requests. By default, fields with
6992	// empty values are omitted from API requests. However, any non-pointer,
6993	// non-interface field appearing in ForceSendFields will be sent to the
6994	// server regardless of whether the field is empty or not. This may be
6995	// used to include empty fields in Patch requests.
6996	ForceSendFields []string `json:"-"`
6997
6998	// NullFields is a list of field names (e.g. "Enabled") to include in
6999	// API requests with the JSON null value. By default, fields with empty
7000	// values are omitted from API requests. However, any field with an
7001	// empty value appearing in NullFields will be sent to the server as
7002	// null. It is an error if a field in this list has a non-empty value.
7003	// This may be used to include null fields in Patch requests.
7004	NullFields []string `json:"-"`
7005}
7006
7007func (s *EventTagOverride) MarshalJSON() ([]byte, error) {
7008	type NoMethod EventTagOverride
7009	raw := NoMethod(*s)
7010	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7011}
7012
7013// EventTagsListResponse: Event Tag List Response
7014type EventTagsListResponse struct {
7015	// EventTags: Event tag collection.
7016	EventTags []*EventTag `json:"eventTags,omitempty"`
7017
7018	// Kind: Identifies what kind of resource this is. Value: the fixed
7019	// string "dfareporting#eventTagsListResponse".
7020	Kind string `json:"kind,omitempty"`
7021
7022	// ServerResponse contains the HTTP response code and headers from the
7023	// server.
7024	googleapi.ServerResponse `json:"-"`
7025
7026	// ForceSendFields is a list of field names (e.g. "EventTags") to
7027	// unconditionally include in API requests. By default, fields with
7028	// empty values are omitted from API requests. However, any non-pointer,
7029	// non-interface field appearing in ForceSendFields will be sent to the
7030	// server regardless of whether the field is empty or not. This may be
7031	// used to include empty fields in Patch requests.
7032	ForceSendFields []string `json:"-"`
7033
7034	// NullFields is a list of field names (e.g. "EventTags") to include in
7035	// API requests with the JSON null value. By default, fields with empty
7036	// values are omitted from API requests. However, any field with an
7037	// empty value appearing in NullFields will be sent to the server as
7038	// null. It is an error if a field in this list has a non-empty value.
7039	// This may be used to include null fields in Patch requests.
7040	NullFields []string `json:"-"`
7041}
7042
7043func (s *EventTagsListResponse) MarshalJSON() ([]byte, error) {
7044	type NoMethod EventTagsListResponse
7045	raw := NoMethod(*s)
7046	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7047}
7048
7049// File: Represents a File resource. A file contains the metadata for a
7050// report run. It shows the status of the run and holds the URLs to the
7051// generated report data if the run is finished and the status is
7052// "REPORT_AVAILABLE".
7053type File struct {
7054	// DateRange: The date range for which the file has report data. The
7055	// date range will always be the absolute date range for which the
7056	// report is run.
7057	DateRange *DateRange `json:"dateRange,omitempty"`
7058
7059	// Etag: The eTag of this response for caching purposes.
7060	Etag string `json:"etag,omitempty"`
7061
7062	// FileName: The filename of the file.
7063	FileName string `json:"fileName,omitempty"`
7064
7065	// Format: The output format of the report. Only available once the file
7066	// is available.
7067	//
7068	// Possible values:
7069	//   "CSV"
7070	//   "EXCEL"
7071	Format string `json:"format,omitempty"`
7072
7073	// Id: The unique ID of this report file.
7074	Id int64 `json:"id,omitempty,string"`
7075
7076	// Kind: The kind of resource this is, in this case dfareporting#file.
7077	Kind string `json:"kind,omitempty"`
7078
7079	// LastModifiedTime: The timestamp in milliseconds since epoch when this
7080	// file was last modified.
7081	LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"`
7082
7083	// ReportId: The ID of the report this file was generated from.
7084	ReportId int64 `json:"reportId,omitempty,string"`
7085
7086	// Status: The status of the report file.
7087	//
7088	// Possible values:
7089	//   "CANCELLED"
7090	//   "FAILED"
7091	//   "PROCESSING"
7092	//   "REPORT_AVAILABLE"
7093	Status string `json:"status,omitempty"`
7094
7095	// Urls: The URLs where the completed report file can be downloaded.
7096	Urls *FileUrls `json:"urls,omitempty"`
7097
7098	// ServerResponse contains the HTTP response code and headers from the
7099	// server.
7100	googleapi.ServerResponse `json:"-"`
7101
7102	// ForceSendFields is a list of field names (e.g. "DateRange") to
7103	// unconditionally include in API requests. By default, fields with
7104	// empty values are omitted from API requests. However, any non-pointer,
7105	// non-interface field appearing in ForceSendFields will be sent to the
7106	// server regardless of whether the field is empty or not. This may be
7107	// used to include empty fields in Patch requests.
7108	ForceSendFields []string `json:"-"`
7109
7110	// NullFields is a list of field names (e.g. "DateRange") to include in
7111	// API requests with the JSON null value. By default, fields with empty
7112	// values are omitted from API requests. However, any field with an
7113	// empty value appearing in NullFields will be sent to the server as
7114	// null. It is an error if a field in this list has a non-empty value.
7115	// This may be used to include null fields in Patch requests.
7116	NullFields []string `json:"-"`
7117}
7118
7119func (s *File) MarshalJSON() ([]byte, error) {
7120	type NoMethod File
7121	raw := NoMethod(*s)
7122	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7123}
7124
7125// FileUrls: The URLs where the completed report file can be downloaded.
7126type FileUrls struct {
7127	// ApiUrl: The URL for downloading the report data through the API.
7128	ApiUrl string `json:"apiUrl,omitempty"`
7129
7130	// BrowserUrl: The URL for downloading the report data through a
7131	// browser.
7132	BrowserUrl string `json:"browserUrl,omitempty"`
7133
7134	// ForceSendFields is a list of field names (e.g. "ApiUrl") to
7135	// unconditionally include in API requests. By default, fields with
7136	// empty values are omitted from API requests. However, any non-pointer,
7137	// non-interface field appearing in ForceSendFields will be sent to the
7138	// server regardless of whether the field is empty or not. This may be
7139	// used to include empty fields in Patch requests.
7140	ForceSendFields []string `json:"-"`
7141
7142	// NullFields is a list of field names (e.g. "ApiUrl") to include in API
7143	// requests with the JSON null value. By default, fields with empty
7144	// values are omitted from API requests. However, any field with an
7145	// empty value appearing in NullFields will be sent to the server as
7146	// null. It is an error if a field in this list has a non-empty value.
7147	// This may be used to include null fields in Patch requests.
7148	NullFields []string `json:"-"`
7149}
7150
7151func (s *FileUrls) MarshalJSON() ([]byte, error) {
7152	type NoMethod FileUrls
7153	raw := NoMethod(*s)
7154	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7155}
7156
7157// FileList: Represents the list of File resources.
7158type FileList struct {
7159	// Etag: The eTag of this response for caching purposes.
7160	Etag string `json:"etag,omitempty"`
7161
7162	// Items: The files returned in this response.
7163	Items []*File `json:"items,omitempty"`
7164
7165	// Kind: The kind of list this is, in this case dfareporting#fileList.
7166	Kind string `json:"kind,omitempty"`
7167
7168	// NextPageToken: Continuation token used to page through files. To
7169	// retrieve the next page of results, set the next request's "pageToken"
7170	// to the value of this field. The page token is only valid for a
7171	// limited amount of time and should not be persisted.
7172	NextPageToken string `json:"nextPageToken,omitempty"`
7173
7174	// ServerResponse contains the HTTP response code and headers from the
7175	// server.
7176	googleapi.ServerResponse `json:"-"`
7177
7178	// ForceSendFields is a list of field names (e.g. "Etag") to
7179	// unconditionally include in API requests. By default, fields with
7180	// empty values are omitted from API requests. However, any non-pointer,
7181	// non-interface field appearing in ForceSendFields will be sent to the
7182	// server regardless of whether the field is empty or not. This may be
7183	// used to include empty fields in Patch requests.
7184	ForceSendFields []string `json:"-"`
7185
7186	// NullFields is a list of field names (e.g. "Etag") to include in API
7187	// requests with the JSON null value. By default, fields with empty
7188	// values are omitted from API requests. However, any field with an
7189	// empty value appearing in NullFields will be sent to the server as
7190	// null. It is an error if a field in this list has a non-empty value.
7191	// This may be used to include null fields in Patch requests.
7192	NullFields []string `json:"-"`
7193}
7194
7195func (s *FileList) MarshalJSON() ([]byte, error) {
7196	type NoMethod FileList
7197	raw := NoMethod(*s)
7198	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7199}
7200
7201// Flight: Flight
7202type Flight struct {
7203	// EndDate: Inventory item flight end date.
7204	EndDate string `json:"endDate,omitempty"`
7205
7206	// RateOrCost: Rate or cost of this flight.
7207	RateOrCost int64 `json:"rateOrCost,omitempty,string"`
7208
7209	// StartDate: Inventory item flight start date.
7210	StartDate string `json:"startDate,omitempty"`
7211
7212	// Units: Units of this flight.
7213	Units int64 `json:"units,omitempty,string"`
7214
7215	// ForceSendFields is a list of field names (e.g. "EndDate") to
7216	// unconditionally include in API requests. By default, fields with
7217	// empty values are omitted from API requests. However, any non-pointer,
7218	// non-interface field appearing in ForceSendFields will be sent to the
7219	// server regardless of whether the field is empty or not. This may be
7220	// used to include empty fields in Patch requests.
7221	ForceSendFields []string `json:"-"`
7222
7223	// NullFields is a list of field names (e.g. "EndDate") to include in
7224	// API requests with the JSON null value. By default, fields with empty
7225	// values are omitted from API requests. However, any field with an
7226	// empty value appearing in NullFields will be sent to the server as
7227	// null. It is an error if a field in this list has a non-empty value.
7228	// This may be used to include null fields in Patch requests.
7229	NullFields []string `json:"-"`
7230}
7231
7232func (s *Flight) MarshalJSON() ([]byte, error) {
7233	type NoMethod Flight
7234	raw := NoMethod(*s)
7235	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7236}
7237
7238// FloodlightActivitiesGenerateTagResponse: Floodlight Activity
7239// GenerateTag Response
7240type FloodlightActivitiesGenerateTagResponse struct {
7241	// FloodlightActivityTag: Generated tag for this Floodlight activity.
7242	// For global site tags, this is the event snippet.
7243	FloodlightActivityTag string `json:"floodlightActivityTag,omitempty"`
7244
7245	// GlobalSiteTagGlobalSnippet: The global snippet section of a global
7246	// site tag. The global site tag sets new cookies on your domain, which
7247	// will store a unique identifier for a user or the ad click that
7248	// brought the user to your site. Learn more.
7249	GlobalSiteTagGlobalSnippet string `json:"globalSiteTagGlobalSnippet,omitempty"`
7250
7251	// Kind: Identifies what kind of resource this is. Value: the fixed
7252	// string "dfareporting#floodlightActivitiesGenerateTagResponse".
7253	Kind string `json:"kind,omitempty"`
7254
7255	// ServerResponse contains the HTTP response code and headers from the
7256	// server.
7257	googleapi.ServerResponse `json:"-"`
7258
7259	// ForceSendFields is a list of field names (e.g.
7260	// "FloodlightActivityTag") to unconditionally include in API requests.
7261	// By default, fields with empty values are omitted from API requests.
7262	// However, any non-pointer, non-interface field appearing in
7263	// ForceSendFields will be sent to the server regardless of whether the
7264	// field is empty or not. This may be used to include empty fields in
7265	// Patch requests.
7266	ForceSendFields []string `json:"-"`
7267
7268	// NullFields is a list of field names (e.g. "FloodlightActivityTag") to
7269	// include in API requests with the JSON null value. By default, fields
7270	// with empty values are omitted from API requests. However, any field
7271	// with an empty value appearing in NullFields will be sent to the
7272	// server as null. It is an error if a field in this list has a
7273	// non-empty value. This may be used to include null fields in Patch
7274	// requests.
7275	NullFields []string `json:"-"`
7276}
7277
7278func (s *FloodlightActivitiesGenerateTagResponse) MarshalJSON() ([]byte, error) {
7279	type NoMethod FloodlightActivitiesGenerateTagResponse
7280	raw := NoMethod(*s)
7281	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7282}
7283
7284// FloodlightActivitiesListResponse: Floodlight Activity List Response
7285type FloodlightActivitiesListResponse struct {
7286	// FloodlightActivities: Floodlight activity collection.
7287	FloodlightActivities []*FloodlightActivity `json:"floodlightActivities,omitempty"`
7288
7289	// Kind: Identifies what kind of resource this is. Value: the fixed
7290	// string "dfareporting#floodlightActivitiesListResponse".
7291	Kind string `json:"kind,omitempty"`
7292
7293	// NextPageToken: Pagination token to be used for the next list
7294	// operation.
7295	NextPageToken string `json:"nextPageToken,omitempty"`
7296
7297	// ServerResponse contains the HTTP response code and headers from the
7298	// server.
7299	googleapi.ServerResponse `json:"-"`
7300
7301	// ForceSendFields is a list of field names (e.g.
7302	// "FloodlightActivities") to unconditionally include in API requests.
7303	// By default, fields with empty values are omitted from API requests.
7304	// However, any non-pointer, non-interface field appearing in
7305	// ForceSendFields will be sent to the server regardless of whether the
7306	// field is empty or not. This may be used to include empty fields in
7307	// Patch requests.
7308	ForceSendFields []string `json:"-"`
7309
7310	// NullFields is a list of field names (e.g. "FloodlightActivities") to
7311	// include in API requests with the JSON null value. By default, fields
7312	// with empty values are omitted from API requests. However, any field
7313	// with an empty value appearing in NullFields will be sent to the
7314	// server as null. It is an error if a field in this list has a
7315	// non-empty value. This may be used to include null fields in Patch
7316	// requests.
7317	NullFields []string `json:"-"`
7318}
7319
7320func (s *FloodlightActivitiesListResponse) MarshalJSON() ([]byte, error) {
7321	type NoMethod FloodlightActivitiesListResponse
7322	raw := NoMethod(*s)
7323	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7324}
7325
7326// FloodlightActivity: Contains properties of a Floodlight activity.
7327type FloodlightActivity struct {
7328	// AccountId: Account ID of this floodlight activity. This is a
7329	// read-only field that can be left blank.
7330	AccountId int64 `json:"accountId,omitempty,string"`
7331
7332	// AdvertiserId: Advertiser ID of this floodlight activity. If this
7333	// field is left blank, the value will be copied over either from the
7334	// activity group's advertiser or the existing activity's advertiser.
7335	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7336
7337	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7338	// advertiser. This is a read-only, auto-generated field.
7339	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7340
7341	// CacheBustingType: Code type used for cache busting in the generated
7342	// tag. Applicable only when floodlightActivityGroupType is COUNTER and
7343	// countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING.
7344	//
7345	// Possible values:
7346	//   "ACTIVE_SERVER_PAGE"
7347	//   "COLD_FUSION"
7348	//   "JAVASCRIPT"
7349	//   "JSP"
7350	//   "PHP"
7351	CacheBustingType string `json:"cacheBustingType,omitempty"`
7352
7353	// CountingMethod: Counting method for conversions for this floodlight
7354	// activity. This is a required field.
7355	//
7356	// Possible values:
7357	//   "ITEMS_SOLD_COUNTING"
7358	//   "SESSION_COUNTING"
7359	//   "STANDARD_COUNTING"
7360	//   "TRANSACTIONS_COUNTING"
7361	//   "UNIQUE_COUNTING"
7362	CountingMethod string `json:"countingMethod,omitempty"`
7363
7364	// DefaultTags: Dynamic floodlight tags.
7365	DefaultTags []*FloodlightActivityDynamicTag `json:"defaultTags,omitempty"`
7366
7367	// ExpectedUrl: URL where this tag will be deployed. If specified, must
7368	// be less than 256 characters long.
7369	ExpectedUrl string `json:"expectedUrl,omitempty"`
7370
7371	// FloodlightActivityGroupId: Floodlight activity group ID of this
7372	// floodlight activity. This is a required field.
7373	FloodlightActivityGroupId int64 `json:"floodlightActivityGroupId,omitempty,string"`
7374
7375	// FloodlightActivityGroupName: Name of the associated floodlight
7376	// activity group. This is a read-only field.
7377	FloodlightActivityGroupName string `json:"floodlightActivityGroupName,omitempty"`
7378
7379	// FloodlightActivityGroupTagString: Tag string of the associated
7380	// floodlight activity group. This is a read-only field.
7381	FloodlightActivityGroupTagString string `json:"floodlightActivityGroupTagString,omitempty"`
7382
7383	// FloodlightActivityGroupType: Type of the associated floodlight
7384	// activity group. This is a read-only field.
7385	//
7386	// Possible values:
7387	//   "COUNTER"
7388	//   "SALE"
7389	FloodlightActivityGroupType string `json:"floodlightActivityGroupType,omitempty"`
7390
7391	// FloodlightConfigurationId: Floodlight configuration ID of this
7392	// floodlight activity. If this field is left blank, the value will be
7393	// copied over either from the activity group's floodlight configuration
7394	// or from the existing activity's floodlight configuration.
7395	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7396
7397	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7398	// of the floodlight configuration. This is a read-only, auto-generated
7399	// field.
7400	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7401
7402	// FloodlightTagType: The type of Floodlight tag this activity will
7403	// generate. This is a required field.
7404	//
7405	// Possible values:
7406	//   "GLOBAL_SITE_TAG"
7407	//   "IFRAME"
7408	//   "IMAGE"
7409	FloodlightTagType string `json:"floodlightTagType,omitempty"`
7410
7411	// Hidden: Whether this activity is archived.
7412	Hidden bool `json:"hidden,omitempty"`
7413
7414	// Id: ID of this floodlight activity. This is a read-only,
7415	// auto-generated field.
7416	Id int64 `json:"id,omitempty,string"`
7417
7418	// IdDimensionValue: Dimension value for the ID of this floodlight
7419	// activity. This is a read-only, auto-generated field.
7420	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7421
7422	// Kind: Identifies what kind of resource this is. Value: the fixed
7423	// string "dfareporting#floodlightActivity".
7424	Kind string `json:"kind,omitempty"`
7425
7426	// Name: Name of this floodlight activity. This is a required field.
7427	// Must be less than 129 characters long and cannot contain quotes.
7428	Name string `json:"name,omitempty"`
7429
7430	// Notes: General notes or implementation instructions for the tag.
7431	Notes string `json:"notes,omitempty"`
7432
7433	// PublisherTags: Publisher dynamic floodlight tags.
7434	PublisherTags []*FloodlightActivityPublisherDynamicTag `json:"publisherTags,omitempty"`
7435
7436	// Secure: Whether this tag should use SSL.
7437	Secure bool `json:"secure,omitempty"`
7438
7439	// SslCompliant: Whether the floodlight activity is SSL-compliant. This
7440	// is a read-only field, its value detected by the system from the
7441	// floodlight tags.
7442	SslCompliant bool `json:"sslCompliant,omitempty"`
7443
7444	// SslRequired: Whether this floodlight activity must be SSL-compliant.
7445	SslRequired bool `json:"sslRequired,omitempty"`
7446
7447	// SubaccountId: Subaccount ID of this floodlight activity. This is a
7448	// read-only field that can be left blank.
7449	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7450
7451	// TagFormat: Tag format type for the floodlight activity. If left
7452	// blank, the tag format will default to HTML.
7453	//
7454	// Possible values:
7455	//   "HTML"
7456	//   "XHTML"
7457	TagFormat string `json:"tagFormat,omitempty"`
7458
7459	// TagString: Value of the cat= parameter in the floodlight tag, which
7460	// the ad servers use to identify the activity. This is optional: if
7461	// empty, a new tag string will be generated for you. This string must
7462	// be 1 to 8 characters long, with valid characters being
7463	// [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among
7464	// activities of the same activity group. This field is read-only after
7465	// insertion.
7466	TagString string `json:"tagString,omitempty"`
7467
7468	// UserDefinedVariableTypes: List of the user-defined variables used by
7469	// this conversion tag. These map to the "u[1-100]=" in the tags. Each
7470	// of these can have a user defined type.
7471	// Acceptable values are U1 to U100, inclusive.
7472	//
7473	// Possible values:
7474	//   "U1"
7475	//   "U10"
7476	//   "U100"
7477	//   "U11"
7478	//   "U12"
7479	//   "U13"
7480	//   "U14"
7481	//   "U15"
7482	//   "U16"
7483	//   "U17"
7484	//   "U18"
7485	//   "U19"
7486	//   "U2"
7487	//   "U20"
7488	//   "U21"
7489	//   "U22"
7490	//   "U23"
7491	//   "U24"
7492	//   "U25"
7493	//   "U26"
7494	//   "U27"
7495	//   "U28"
7496	//   "U29"
7497	//   "U3"
7498	//   "U30"
7499	//   "U31"
7500	//   "U32"
7501	//   "U33"
7502	//   "U34"
7503	//   "U35"
7504	//   "U36"
7505	//   "U37"
7506	//   "U38"
7507	//   "U39"
7508	//   "U4"
7509	//   "U40"
7510	//   "U41"
7511	//   "U42"
7512	//   "U43"
7513	//   "U44"
7514	//   "U45"
7515	//   "U46"
7516	//   "U47"
7517	//   "U48"
7518	//   "U49"
7519	//   "U5"
7520	//   "U50"
7521	//   "U51"
7522	//   "U52"
7523	//   "U53"
7524	//   "U54"
7525	//   "U55"
7526	//   "U56"
7527	//   "U57"
7528	//   "U58"
7529	//   "U59"
7530	//   "U6"
7531	//   "U60"
7532	//   "U61"
7533	//   "U62"
7534	//   "U63"
7535	//   "U64"
7536	//   "U65"
7537	//   "U66"
7538	//   "U67"
7539	//   "U68"
7540	//   "U69"
7541	//   "U7"
7542	//   "U70"
7543	//   "U71"
7544	//   "U72"
7545	//   "U73"
7546	//   "U74"
7547	//   "U75"
7548	//   "U76"
7549	//   "U77"
7550	//   "U78"
7551	//   "U79"
7552	//   "U8"
7553	//   "U80"
7554	//   "U81"
7555	//   "U82"
7556	//   "U83"
7557	//   "U84"
7558	//   "U85"
7559	//   "U86"
7560	//   "U87"
7561	//   "U88"
7562	//   "U89"
7563	//   "U9"
7564	//   "U90"
7565	//   "U91"
7566	//   "U92"
7567	//   "U93"
7568	//   "U94"
7569	//   "U95"
7570	//   "U96"
7571	//   "U97"
7572	//   "U98"
7573	//   "U99"
7574	UserDefinedVariableTypes []string `json:"userDefinedVariableTypes,omitempty"`
7575
7576	// ServerResponse contains the HTTP response code and headers from the
7577	// server.
7578	googleapi.ServerResponse `json:"-"`
7579
7580	// ForceSendFields is a list of field names (e.g. "AccountId") to
7581	// unconditionally include in API requests. By default, fields with
7582	// empty values are omitted from API requests. However, any non-pointer,
7583	// non-interface field appearing in ForceSendFields will be sent to the
7584	// server regardless of whether the field is empty or not. This may be
7585	// used to include empty fields in Patch requests.
7586	ForceSendFields []string `json:"-"`
7587
7588	// NullFields is a list of field names (e.g. "AccountId") to include in
7589	// API requests with the JSON null value. By default, fields with empty
7590	// values are omitted from API requests. However, any field with an
7591	// empty value appearing in NullFields will be sent to the server as
7592	// null. It is an error if a field in this list has a non-empty value.
7593	// This may be used to include null fields in Patch requests.
7594	NullFields []string `json:"-"`
7595}
7596
7597func (s *FloodlightActivity) MarshalJSON() ([]byte, error) {
7598	type NoMethod FloodlightActivity
7599	raw := NoMethod(*s)
7600	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7601}
7602
7603// FloodlightActivityDynamicTag: Dynamic Tag
7604type FloodlightActivityDynamicTag struct {
7605	// Id: ID of this dynamic tag. This is a read-only, auto-generated
7606	// field.
7607	Id int64 `json:"id,omitempty,string"`
7608
7609	// Name: Name of this tag.
7610	Name string `json:"name,omitempty"`
7611
7612	// Tag: Tag code.
7613	Tag string `json:"tag,omitempty"`
7614
7615	// ForceSendFields is a list of field names (e.g. "Id") 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. "Id") to include in API
7624	// 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 *FloodlightActivityDynamicTag) MarshalJSON() ([]byte, error) {
7633	type NoMethod FloodlightActivityDynamicTag
7634	raw := NoMethod(*s)
7635	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7636}
7637
7638// FloodlightActivityGroup: Contains properties of a Floodlight activity
7639// group.
7640type FloodlightActivityGroup struct {
7641	// AccountId: Account ID of this floodlight activity group. This is a
7642	// read-only field that can be left blank.
7643	AccountId int64 `json:"accountId,omitempty,string"`
7644
7645	// AdvertiserId: Advertiser ID of this floodlight activity group. If
7646	// this field is left blank, the value will be copied over either from
7647	// the floodlight configuration's advertiser or from the existing
7648	// activity group's advertiser.
7649	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7650
7651	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7652	// advertiser. This is a read-only, auto-generated field.
7653	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7654
7655	// FloodlightConfigurationId: Floodlight configuration ID of this
7656	// floodlight activity group. This is a required field.
7657	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7658
7659	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7660	// of the floodlight configuration. This is a read-only, auto-generated
7661	// field.
7662	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7663
7664	// Id: ID of this floodlight activity group. This is a read-only,
7665	// auto-generated field.
7666	Id int64 `json:"id,omitempty,string"`
7667
7668	// IdDimensionValue: Dimension value for the ID of this floodlight
7669	// activity group. This is a read-only, auto-generated field.
7670	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7671
7672	// Kind: Identifies what kind of resource this is. Value: the fixed
7673	// string "dfareporting#floodlightActivityGroup".
7674	Kind string `json:"kind,omitempty"`
7675
7676	// Name: Name of this floodlight activity group. This is a required
7677	// field. Must be less than 65 characters long and cannot contain
7678	// quotes.
7679	Name string `json:"name,omitempty"`
7680
7681	// SubaccountId: Subaccount ID of this floodlight activity group. This
7682	// is a read-only field that can be left blank.
7683	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7684
7685	// TagString: Value of the type= parameter in the floodlight tag, which
7686	// the ad servers use to identify the activity group that the activity
7687	// belongs to. This is optional: if empty, a new tag string will be
7688	// generated for you. This string must be 1 to 8 characters long, with
7689	// valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must
7690	// also be unique among activity groups of the same floodlight
7691	// configuration. This field is read-only after insertion.
7692	TagString string `json:"tagString,omitempty"`
7693
7694	// Type: Type of the floodlight activity group. This is a required field
7695	// that is read-only after insertion.
7696	//
7697	// Possible values:
7698	//   "COUNTER"
7699	//   "SALE"
7700	Type string `json:"type,omitempty"`
7701
7702	// ServerResponse contains the HTTP response code and headers from the
7703	// server.
7704	googleapi.ServerResponse `json:"-"`
7705
7706	// ForceSendFields is a list of field names (e.g. "AccountId") to
7707	// unconditionally include in API requests. By default, fields with
7708	// empty values are omitted from API requests. However, any non-pointer,
7709	// non-interface field appearing in ForceSendFields will be sent to the
7710	// server regardless of whether the field is empty or not. This may be
7711	// used to include empty fields in Patch requests.
7712	ForceSendFields []string `json:"-"`
7713
7714	// NullFields is a list of field names (e.g. "AccountId") to include in
7715	// API requests with the JSON null value. By default, fields with empty
7716	// values are omitted from API requests. However, any field with an
7717	// empty value appearing in NullFields will be sent to the server as
7718	// null. It is an error if a field in this list has a non-empty value.
7719	// This may be used to include null fields in Patch requests.
7720	NullFields []string `json:"-"`
7721}
7722
7723func (s *FloodlightActivityGroup) MarshalJSON() ([]byte, error) {
7724	type NoMethod FloodlightActivityGroup
7725	raw := NoMethod(*s)
7726	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7727}
7728
7729// FloodlightActivityGroupsListResponse: Floodlight Activity Group List
7730// Response
7731type FloodlightActivityGroupsListResponse struct {
7732	// FloodlightActivityGroups: Floodlight activity group collection.
7733	FloodlightActivityGroups []*FloodlightActivityGroup `json:"floodlightActivityGroups,omitempty"`
7734
7735	// Kind: Identifies what kind of resource this is. Value: the fixed
7736	// string "dfareporting#floodlightActivityGroupsListResponse".
7737	Kind string `json:"kind,omitempty"`
7738
7739	// NextPageToken: Pagination token to be used for the next list
7740	// operation.
7741	NextPageToken string `json:"nextPageToken,omitempty"`
7742
7743	// ServerResponse contains the HTTP response code and headers from the
7744	// server.
7745	googleapi.ServerResponse `json:"-"`
7746
7747	// ForceSendFields is a list of field names (e.g.
7748	// "FloodlightActivityGroups") to unconditionally include in API
7749	// requests. By default, fields with empty values are omitted from API
7750	// requests. However, any non-pointer, non-interface field appearing in
7751	// ForceSendFields will be sent to the server regardless of whether the
7752	// field is empty or not. This may be used to include empty fields in
7753	// Patch requests.
7754	ForceSendFields []string `json:"-"`
7755
7756	// NullFields is a list of field names (e.g. "FloodlightActivityGroups")
7757	// to include in API requests with the JSON null value. By default,
7758	// fields with empty values are omitted from API requests. However, any
7759	// field with an empty value appearing in NullFields will be sent to the
7760	// server as null. It is an error if a field in this list has a
7761	// non-empty value. This may be used to include null fields in Patch
7762	// requests.
7763	NullFields []string `json:"-"`
7764}
7765
7766func (s *FloodlightActivityGroupsListResponse) MarshalJSON() ([]byte, error) {
7767	type NoMethod FloodlightActivityGroupsListResponse
7768	raw := NoMethod(*s)
7769	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7770}
7771
7772// FloodlightActivityPublisherDynamicTag: Publisher Dynamic Tag
7773type FloodlightActivityPublisherDynamicTag struct {
7774	// ClickThrough: Whether this tag is applicable only for click-throughs.
7775	ClickThrough bool `json:"clickThrough,omitempty"`
7776
7777	// DirectorySiteId: Directory site ID of this dynamic tag. This is a
7778	// write-only field that can be used as an alternative to the siteId
7779	// field. When this resource is retrieved, only the siteId field will be
7780	// populated.
7781	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
7782
7783	// DynamicTag: Dynamic floodlight tag.
7784	DynamicTag *FloodlightActivityDynamicTag `json:"dynamicTag,omitempty"`
7785
7786	// SiteId: Site ID of this dynamic tag.
7787	SiteId int64 `json:"siteId,omitempty,string"`
7788
7789	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
7790	// a read-only, auto-generated field.
7791	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
7792
7793	// ViewThrough: Whether this tag is applicable only for view-throughs.
7794	ViewThrough bool `json:"viewThrough,omitempty"`
7795
7796	// ForceSendFields is a list of field names (e.g. "ClickThrough") to
7797	// unconditionally include in API requests. By default, fields with
7798	// empty values are omitted from API requests. However, any non-pointer,
7799	// non-interface field appearing in ForceSendFields will be sent to the
7800	// server regardless of whether the field is empty or not. This may be
7801	// used to include empty fields in Patch requests.
7802	ForceSendFields []string `json:"-"`
7803
7804	// NullFields is a list of field names (e.g. "ClickThrough") to include
7805	// in API requests with the JSON null value. By default, fields with
7806	// empty values are omitted from API requests. However, any field with
7807	// an empty value appearing in NullFields will be sent to the server as
7808	// null. It is an error if a field in this list has a non-empty value.
7809	// This may be used to include null fields in Patch requests.
7810	NullFields []string `json:"-"`
7811}
7812
7813func (s *FloodlightActivityPublisherDynamicTag) MarshalJSON() ([]byte, error) {
7814	type NoMethod FloodlightActivityPublisherDynamicTag
7815	raw := NoMethod(*s)
7816	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7817}
7818
7819// FloodlightConfiguration: Contains properties of a Floodlight
7820// configuration.
7821type FloodlightConfiguration struct {
7822	// AccountId: Account ID of this floodlight configuration. This is a
7823	// read-only field that can be left blank.
7824	AccountId int64 `json:"accountId,omitempty,string"`
7825
7826	// AdvertiserId: Advertiser ID of the parent advertiser of this
7827	// floodlight configuration.
7828	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7829
7830	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7831	// advertiser. This is a read-only, auto-generated field.
7832	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7833
7834	// AnalyticsDataSharingEnabled: Whether advertiser data is shared with
7835	// Google Analytics.
7836	AnalyticsDataSharingEnabled bool `json:"analyticsDataSharingEnabled,omitempty"`
7837
7838	// CustomViewabilityMetric: Custom Viewability metric for the floodlight
7839	// configuration.
7840	CustomViewabilityMetric *CustomViewabilityMetric `json:"customViewabilityMetric,omitempty"`
7841
7842	// ExposureToConversionEnabled: Whether the exposure-to-conversion
7843	// report is enabled. This report shows detailed pathway information on
7844	// up to 10 of the most recent ad exposures seen by a user before
7845	// converting.
7846	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
7847
7848	// FirstDayOfWeek: Day that will be counted as the first day of the week
7849	// in reports. This is a required field.
7850	//
7851	// Possible values:
7852	//   "MONDAY"
7853	//   "SUNDAY"
7854	FirstDayOfWeek string `json:"firstDayOfWeek,omitempty"`
7855
7856	// Id: ID of this floodlight configuration. This is a read-only,
7857	// auto-generated field.
7858	Id int64 `json:"id,omitempty,string"`
7859
7860	// IdDimensionValue: Dimension value for the ID of this floodlight
7861	// configuration. This is a read-only, auto-generated field.
7862	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7863
7864	// InAppAttributionTrackingEnabled: Whether in-app attribution tracking
7865	// is enabled.
7866	InAppAttributionTrackingEnabled bool `json:"inAppAttributionTrackingEnabled,omitempty"`
7867
7868	// Kind: Identifies what kind of resource this is. Value: the fixed
7869	// string "dfareporting#floodlightConfiguration".
7870	Kind string `json:"kind,omitempty"`
7871
7872	// LookbackConfiguration: Lookback window settings for this floodlight
7873	// configuration.
7874	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
7875
7876	// NaturalSearchConversionAttributionOption: Types of attribution
7877	// options for natural search conversions.
7878	//
7879	// Possible values:
7880	//   "EXCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
7881	//   "INCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
7882	//   "INCLUDE_NATURAL_SEARCH_TIERED_CONVERSION_ATTRIBUTION"
7883	NaturalSearchConversionAttributionOption string `json:"naturalSearchConversionAttributionOption,omitempty"`
7884
7885	// OmnitureSettings: Settings for Campaign Manager Omniture integration.
7886	OmnitureSettings *OmnitureSettings `json:"omnitureSettings,omitempty"`
7887
7888	// SubaccountId: Subaccount ID of this floodlight configuration. This is
7889	// a read-only field that can be left blank.
7890	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7891
7892	// TagSettings: Configuration settings for dynamic and image floodlight
7893	// tags.
7894	TagSettings *TagSettings `json:"tagSettings,omitempty"`
7895
7896	// ThirdPartyAuthenticationTokens: List of third-party authentication
7897	// tokens enabled for this configuration.
7898	ThirdPartyAuthenticationTokens []*ThirdPartyAuthenticationToken `json:"thirdPartyAuthenticationTokens,omitempty"`
7899
7900	// UserDefinedVariableConfigurations: List of user defined variables
7901	// enabled for this configuration.
7902	UserDefinedVariableConfigurations []*UserDefinedVariableConfiguration `json:"userDefinedVariableConfigurations,omitempty"`
7903
7904	// ServerResponse contains the HTTP response code and headers from the
7905	// server.
7906	googleapi.ServerResponse `json:"-"`
7907
7908	// ForceSendFields is a list of field names (e.g. "AccountId") to
7909	// unconditionally include in API requests. By default, fields with
7910	// empty values are omitted from API requests. However, any non-pointer,
7911	// non-interface field appearing in ForceSendFields will be sent to the
7912	// server regardless of whether the field is empty or not. This may be
7913	// used to include empty fields in Patch requests.
7914	ForceSendFields []string `json:"-"`
7915
7916	// NullFields is a list of field names (e.g. "AccountId") to include in
7917	// API requests with the JSON null value. By default, fields with empty
7918	// values are omitted from API requests. However, any field with an
7919	// empty value appearing in NullFields will be sent to the server as
7920	// null. It is an error if a field in this list has a non-empty value.
7921	// This may be used to include null fields in Patch requests.
7922	NullFields []string `json:"-"`
7923}
7924
7925func (s *FloodlightConfiguration) MarshalJSON() ([]byte, error) {
7926	type NoMethod FloodlightConfiguration
7927	raw := NoMethod(*s)
7928	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7929}
7930
7931// FloodlightConfigurationsListResponse: Floodlight Configuration List
7932// Response
7933type FloodlightConfigurationsListResponse struct {
7934	// FloodlightConfigurations: Floodlight configuration collection.
7935	FloodlightConfigurations []*FloodlightConfiguration `json:"floodlightConfigurations,omitempty"`
7936
7937	// Kind: Identifies what kind of resource this is. Value: the fixed
7938	// string "dfareporting#floodlightConfigurationsListResponse".
7939	Kind string `json:"kind,omitempty"`
7940
7941	// ServerResponse contains the HTTP response code and headers from the
7942	// server.
7943	googleapi.ServerResponse `json:"-"`
7944
7945	// ForceSendFields is a list of field names (e.g.
7946	// "FloodlightConfigurations") to unconditionally include in API
7947	// requests. By default, fields with empty values are omitted from API
7948	// requests. However, any non-pointer, non-interface field appearing in
7949	// ForceSendFields will be sent to the server regardless of whether the
7950	// field is empty or not. This may be used to include empty fields in
7951	// Patch requests.
7952	ForceSendFields []string `json:"-"`
7953
7954	// NullFields is a list of field names (e.g. "FloodlightConfigurations")
7955	// to include in API requests with the JSON null value. By default,
7956	// fields with empty values are omitted from API requests. However, any
7957	// field with an empty value appearing in NullFields will be sent to the
7958	// server as null. It is an error if a field in this list has a
7959	// non-empty value. This may be used to include null fields in Patch
7960	// requests.
7961	NullFields []string `json:"-"`
7962}
7963
7964func (s *FloodlightConfigurationsListResponse) MarshalJSON() ([]byte, error) {
7965	type NoMethod FloodlightConfigurationsListResponse
7966	raw := NoMethod(*s)
7967	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7968}
7969
7970// FloodlightReportCompatibleFields: Represents fields that are
7971// compatible to be selected for a report of type "FlOODLIGHT".
7972type FloodlightReportCompatibleFields struct {
7973	// DimensionFilters: Dimensions which are compatible to be selected in
7974	// the "dimensionFilters" section of the report.
7975	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
7976
7977	// Dimensions: Dimensions which are compatible to be selected in the
7978	// "dimensions" section of the report.
7979	Dimensions []*Dimension `json:"dimensions,omitempty"`
7980
7981	// Kind: The kind of resource this is, in this case
7982	// dfareporting#floodlightReportCompatibleFields.
7983	Kind string `json:"kind,omitempty"`
7984
7985	// Metrics: Metrics which are compatible to be selected in the
7986	// "metricNames" section of the report.
7987	Metrics []*Metric `json:"metrics,omitempty"`
7988
7989	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
7990	// unconditionally include in API requests. By default, fields with
7991	// empty values are omitted from API requests. However, any non-pointer,
7992	// non-interface field appearing in ForceSendFields will be sent to the
7993	// server regardless of whether the field is empty or not. This may be
7994	// used to include empty fields in Patch requests.
7995	ForceSendFields []string `json:"-"`
7996
7997	// NullFields is a list of field names (e.g. "DimensionFilters") to
7998	// include in API requests with the JSON null value. By default, fields
7999	// with empty values are omitted from API requests. However, any field
8000	// with an empty value appearing in NullFields will be sent to the
8001	// server as null. It is an error if a field in this list has a
8002	// non-empty value. This may be used to include null fields in Patch
8003	// requests.
8004	NullFields []string `json:"-"`
8005}
8006
8007func (s *FloodlightReportCompatibleFields) MarshalJSON() ([]byte, error) {
8008	type NoMethod FloodlightReportCompatibleFields
8009	raw := NoMethod(*s)
8010	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8011}
8012
8013// FrequencyCap: Frequency Cap.
8014type FrequencyCap struct {
8015	// Duration: Duration of time, in seconds, for this frequency cap. The
8016	// maximum duration is 90 days. Acceptable values are 1 to 7776000,
8017	// inclusive.
8018	Duration int64 `json:"duration,omitempty,string"`
8019
8020	// Impressions: Number of times an individual user can be served the ad
8021	// within the specified duration. Acceptable values are 1 to 15,
8022	// inclusive.
8023	Impressions int64 `json:"impressions,omitempty,string"`
8024
8025	// ForceSendFields is a list of field names (e.g. "Duration") to
8026	// unconditionally include in API requests. By default, fields with
8027	// empty values are omitted from API requests. However, any non-pointer,
8028	// non-interface field appearing in ForceSendFields will be sent to the
8029	// server regardless of whether the field is empty or not. This may be
8030	// used to include empty fields in Patch requests.
8031	ForceSendFields []string `json:"-"`
8032
8033	// NullFields is a list of field names (e.g. "Duration") to include in
8034	// API requests with the JSON null value. By default, fields with empty
8035	// values are omitted from API requests. However, any field with an
8036	// empty value appearing in NullFields will be sent to the server as
8037	// null. It is an error if a field in this list has a non-empty value.
8038	// This may be used to include null fields in Patch requests.
8039	NullFields []string `json:"-"`
8040}
8041
8042func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
8043	type NoMethod FrequencyCap
8044	raw := NoMethod(*s)
8045	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8046}
8047
8048// FsCommand: FsCommand.
8049type FsCommand struct {
8050	// Left: Distance from the left of the browser.Applicable when
8051	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
8052	Left int64 `json:"left,omitempty"`
8053
8054	// PositionOption: Position in the browser where the window will open.
8055	//
8056	// Possible values:
8057	//   "CENTERED"
8058	//   "DISTANCE_FROM_TOP_LEFT_CORNER"
8059	PositionOption string `json:"positionOption,omitempty"`
8060
8061	// Top: Distance from the top of the browser. Applicable when
8062	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
8063	Top int64 `json:"top,omitempty"`
8064
8065	// WindowHeight: Height of the window.
8066	WindowHeight int64 `json:"windowHeight,omitempty"`
8067
8068	// WindowWidth: Width of the window.
8069	WindowWidth int64 `json:"windowWidth,omitempty"`
8070
8071	// ForceSendFields is a list of field names (e.g. "Left") to
8072	// unconditionally include in API requests. By default, fields with
8073	// empty values are omitted from API requests. However, any non-pointer,
8074	// non-interface field appearing in ForceSendFields will be sent to the
8075	// server regardless of whether the field is empty or not. This may be
8076	// used to include empty fields in Patch requests.
8077	ForceSendFields []string `json:"-"`
8078
8079	// NullFields is a list of field names (e.g. "Left") to include in API
8080	// requests with the JSON null value. By default, fields with empty
8081	// values are omitted from API requests. However, any field with an
8082	// empty value appearing in NullFields will be sent to the server as
8083	// null. It is an error if a field in this list has a non-empty value.
8084	// This may be used to include null fields in Patch requests.
8085	NullFields []string `json:"-"`
8086}
8087
8088func (s *FsCommand) MarshalJSON() ([]byte, error) {
8089	type NoMethod FsCommand
8090	raw := NoMethod(*s)
8091	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8092}
8093
8094// GeoTargeting: Geographical Targeting.
8095type GeoTargeting struct {
8096	// Cities: Cities to be targeted. For each city only dartId is required.
8097	// The other fields are populated automatically when the ad is inserted
8098	// or updated. If targeting a city, do not target or exclude the country
8099	// of the city, and do not target the metro or region of the city.
8100	Cities []*City `json:"cities,omitempty"`
8101
8102	// Countries: Countries to be targeted or excluded from targeting,
8103	// depending on the setting of the excludeCountries field. For each
8104	// country only dartId is required. The other fields are populated
8105	// automatically when the ad is inserted or updated. If targeting or
8106	// excluding a country, do not target regions, cities, metros, or postal
8107	// codes in the same country.
8108	Countries []*Country `json:"countries,omitempty"`
8109
8110	// ExcludeCountries: Whether or not to exclude the countries in the
8111	// countries field from targeting. If false, the countries field refers
8112	// to countries which will be targeted by the ad.
8113	ExcludeCountries bool `json:"excludeCountries,omitempty"`
8114
8115	// Metros: Metros to be targeted. For each metro only dmaId is required.
8116	// The other fields are populated automatically when the ad is inserted
8117	// or updated. If targeting a metro, do not target or exclude the
8118	// country of the metro.
8119	Metros []*Metro `json:"metros,omitempty"`
8120
8121	// PostalCodes: Postal codes to be targeted. For each postal code only
8122	// id is required. The other fields are populated automatically when the
8123	// ad is inserted or updated. If targeting a postal code, do not target
8124	// or exclude the country of the postal code.
8125	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
8126
8127	// Regions: Regions to be targeted. For each region only dartId is
8128	// required. The other fields are populated automatically when the ad is
8129	// inserted or updated. If targeting a region, do not target or exclude
8130	// the country of the region.
8131	Regions []*Region `json:"regions,omitempty"`
8132
8133	// ForceSendFields is a list of field names (e.g. "Cities") to
8134	// unconditionally include in API requests. By default, fields with
8135	// empty values are omitted from API requests. However, any non-pointer,
8136	// non-interface field appearing in ForceSendFields will be sent to the
8137	// server regardless of whether the field is empty or not. This may be
8138	// used to include empty fields in Patch requests.
8139	ForceSendFields []string `json:"-"`
8140
8141	// NullFields is a list of field names (e.g. "Cities") to include in API
8142	// requests with the JSON null value. By default, fields with empty
8143	// values are omitted from API requests. However, any field with an
8144	// empty value appearing in NullFields will be sent to the server as
8145	// null. It is an error if a field in this list has a non-empty value.
8146	// This may be used to include null fields in Patch requests.
8147	NullFields []string `json:"-"`
8148}
8149
8150func (s *GeoTargeting) MarshalJSON() ([]byte, error) {
8151	type NoMethod GeoTargeting
8152	raw := NoMethod(*s)
8153	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8154}
8155
8156// InventoryItem: Represents a buy from the Planning inventory store.
8157type InventoryItem struct {
8158	// AccountId: Account ID of this inventory item.
8159	AccountId int64 `json:"accountId,omitempty,string"`
8160
8161	// AdSlots: Ad slots of this inventory item. If this inventory item
8162	// represents a standalone placement, there will be exactly one ad slot.
8163	// If this inventory item represents a placement group, there will be
8164	// more than one ad slot, each representing one child placement in that
8165	// placement group.
8166	AdSlots []*AdSlot `json:"adSlots,omitempty"`
8167
8168	// AdvertiserId: Advertiser ID of this inventory item.
8169	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8170
8171	// ContentCategoryId: Content category ID of this inventory item.
8172	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
8173
8174	// EstimatedClickThroughRate: Estimated click-through rate of this
8175	// inventory item.
8176	EstimatedClickThroughRate int64 `json:"estimatedClickThroughRate,omitempty,string"`
8177
8178	// EstimatedConversionRate: Estimated conversion rate of this inventory
8179	// item.
8180	EstimatedConversionRate int64 `json:"estimatedConversionRate,omitempty,string"`
8181
8182	// Id: ID of this inventory item.
8183	Id int64 `json:"id,omitempty,string"`
8184
8185	// InPlan: Whether this inventory item is in plan.
8186	InPlan bool `json:"inPlan,omitempty"`
8187
8188	// Kind: Identifies what kind of resource this is. Value: the fixed
8189	// string "dfareporting#inventoryItem".
8190	Kind string `json:"kind,omitempty"`
8191
8192	// LastModifiedInfo: Information about the most recent modification of
8193	// this inventory item.
8194	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
8195
8196	// Name: Name of this inventory item. For standalone inventory items,
8197	// this is the same name as that of its only ad slot. For group
8198	// inventory items, this can differ from the name of any of its ad
8199	// slots.
8200	Name string `json:"name,omitempty"`
8201
8202	// NegotiationChannelId: Negotiation channel ID of this inventory item.
8203	NegotiationChannelId int64 `json:"negotiationChannelId,omitempty,string"`
8204
8205	// OrderId: Order ID of this inventory item.
8206	OrderId int64 `json:"orderId,omitempty,string"`
8207
8208	// PlacementStrategyId: Placement strategy ID of this inventory item.
8209	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
8210
8211	// Pricing: Pricing of this inventory item.
8212	Pricing *Pricing `json:"pricing,omitempty"`
8213
8214	// ProjectId: Project ID of this inventory item.
8215	ProjectId int64 `json:"projectId,omitempty,string"`
8216
8217	// RfpId: RFP ID of this inventory item.
8218	RfpId int64 `json:"rfpId,omitempty,string"`
8219
8220	// SiteId: ID of the site this inventory item is associated with.
8221	SiteId int64 `json:"siteId,omitempty,string"`
8222
8223	// SubaccountId: Subaccount ID of this inventory item.
8224	SubaccountId int64 `json:"subaccountId,omitempty,string"`
8225
8226	// Type: Type of inventory item.
8227	//
8228	// Possible values:
8229	//   "PLANNING_PLACEMENT_TYPE_CREDIT"
8230	//   "PLANNING_PLACEMENT_TYPE_REGULAR"
8231	Type string `json:"type,omitempty"`
8232
8233	// ServerResponse contains the HTTP response code and headers from the
8234	// server.
8235	googleapi.ServerResponse `json:"-"`
8236
8237	// ForceSendFields is a list of field names (e.g. "AccountId") to
8238	// unconditionally include in API requests. By default, fields with
8239	// empty values are omitted from API requests. However, any non-pointer,
8240	// non-interface field appearing in ForceSendFields will be sent to the
8241	// server regardless of whether the field is empty or not. This may be
8242	// used to include empty fields in Patch requests.
8243	ForceSendFields []string `json:"-"`
8244
8245	// NullFields is a list of field names (e.g. "AccountId") to include in
8246	// API requests with the JSON null value. By default, fields with empty
8247	// values are omitted from API requests. However, any field with an
8248	// empty value appearing in NullFields will be sent to the server as
8249	// null. It is an error if a field in this list has a non-empty value.
8250	// This may be used to include null fields in Patch requests.
8251	NullFields []string `json:"-"`
8252}
8253
8254func (s *InventoryItem) MarshalJSON() ([]byte, error) {
8255	type NoMethod InventoryItem
8256	raw := NoMethod(*s)
8257	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8258}
8259
8260// InventoryItemsListResponse: Inventory item List Response
8261type InventoryItemsListResponse struct {
8262	// InventoryItems: Inventory item collection
8263	InventoryItems []*InventoryItem `json:"inventoryItems,omitempty"`
8264
8265	// Kind: Identifies what kind of resource this is. Value: the fixed
8266	// string "dfareporting#inventoryItemsListResponse".
8267	Kind string `json:"kind,omitempty"`
8268
8269	// NextPageToken: Pagination token to be used for the next list
8270	// operation.
8271	NextPageToken string `json:"nextPageToken,omitempty"`
8272
8273	// ServerResponse contains the HTTP response code and headers from the
8274	// server.
8275	googleapi.ServerResponse `json:"-"`
8276
8277	// ForceSendFields is a list of field names (e.g. "InventoryItems") to
8278	// unconditionally include in API requests. By default, fields with
8279	// empty values are omitted from API requests. However, any non-pointer,
8280	// non-interface field appearing in ForceSendFields will be sent to the
8281	// server regardless of whether the field is empty or not. This may be
8282	// used to include empty fields in Patch requests.
8283	ForceSendFields []string `json:"-"`
8284
8285	// NullFields is a list of field names (e.g. "InventoryItems") to
8286	// include in API requests with the JSON null value. By default, fields
8287	// with empty values are omitted from API requests. However, any field
8288	// with an empty value appearing in NullFields will be sent to the
8289	// server as null. It is an error if a field in this list has a
8290	// non-empty value. This may be used to include null fields in Patch
8291	// requests.
8292	NullFields []string `json:"-"`
8293}
8294
8295func (s *InventoryItemsListResponse) MarshalJSON() ([]byte, error) {
8296	type NoMethod InventoryItemsListResponse
8297	raw := NoMethod(*s)
8298	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8299}
8300
8301// KeyValueTargetingExpression: Key Value Targeting Expression.
8302type KeyValueTargetingExpression struct {
8303	// Expression: Keyword expression being targeted by the ad.
8304	Expression string `json:"expression,omitempty"`
8305
8306	// ForceSendFields is a list of field names (e.g. "Expression") to
8307	// unconditionally include in API requests. By default, fields with
8308	// empty values are omitted from API requests. However, any non-pointer,
8309	// non-interface field appearing in ForceSendFields will be sent to the
8310	// server regardless of whether the field is empty or not. This may be
8311	// used to include empty fields in Patch requests.
8312	ForceSendFields []string `json:"-"`
8313
8314	// NullFields is a list of field names (e.g. "Expression") to include in
8315	// API requests with the JSON null value. By default, fields with empty
8316	// values are omitted from API requests. However, any field with an
8317	// empty value appearing in NullFields will be sent to the server as
8318	// null. It is an error if a field in this list has a non-empty value.
8319	// This may be used to include null fields in Patch requests.
8320	NullFields []string `json:"-"`
8321}
8322
8323func (s *KeyValueTargetingExpression) MarshalJSON() ([]byte, error) {
8324	type NoMethod KeyValueTargetingExpression
8325	raw := NoMethod(*s)
8326	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8327}
8328
8329// LandingPage: Contains information about where a user's browser is
8330// taken after the user clicks an ad.
8331type LandingPage struct {
8332	// AdvertiserId: Advertiser ID of this landing page. This is a required
8333	// field.
8334	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8335
8336	// Archived: Whether this landing page has been archived.
8337	Archived bool `json:"archived,omitempty"`
8338
8339	// DeepLinks: Links that will direct the user to a mobile app, if
8340	// installed.
8341	DeepLinks []*DeepLink `json:"deepLinks,omitempty"`
8342
8343	// Id: ID of this landing page. This is a read-only, auto-generated
8344	// field.
8345	Id int64 `json:"id,omitempty,string"`
8346
8347	// Kind: Identifies what kind of resource this is. Value: the fixed
8348	// string "dfareporting#landingPage".
8349	Kind string `json:"kind,omitempty"`
8350
8351	// Name: Name of this landing page. This is a required field. It must be
8352	// less than 256 characters long.
8353	Name string `json:"name,omitempty"`
8354
8355	// Url: URL of this landing page. This is a required field.
8356	Url string `json:"url,omitempty"`
8357
8358	// ServerResponse contains the HTTP response code and headers from the
8359	// server.
8360	googleapi.ServerResponse `json:"-"`
8361
8362	// ForceSendFields is a list of field names (e.g. "AdvertiserId") to
8363	// unconditionally include in API requests. By default, fields with
8364	// empty values are omitted from API requests. However, any non-pointer,
8365	// non-interface field appearing in ForceSendFields will be sent to the
8366	// server regardless of whether the field is empty or not. This may be
8367	// used to include empty fields in Patch requests.
8368	ForceSendFields []string `json:"-"`
8369
8370	// NullFields is a list of field names (e.g. "AdvertiserId") to include
8371	// in API requests with the JSON null value. By default, fields with
8372	// empty values are omitted from API requests. However, any field with
8373	// an empty value appearing in NullFields will be sent to the server as
8374	// null. It is an error if a field in this list has a non-empty value.
8375	// This may be used to include null fields in Patch requests.
8376	NullFields []string `json:"-"`
8377}
8378
8379func (s *LandingPage) MarshalJSON() ([]byte, error) {
8380	type NoMethod LandingPage
8381	raw := NoMethod(*s)
8382	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8383}
8384
8385// Language: Contains information about a language that can be targeted
8386// by ads.
8387type Language struct {
8388	// Id: Language ID of this language. This is the ID used for targeting
8389	// and generating reports.
8390	Id int64 `json:"id,omitempty,string"`
8391
8392	// Kind: Identifies what kind of resource this is. Value: the fixed
8393	// string "dfareporting#language".
8394	Kind string `json:"kind,omitempty"`
8395
8396	// LanguageCode: Format of language code is an ISO 639 two-letter
8397	// language code optionally followed by an underscore followed by an ISO
8398	// 3166 code. Examples are "en" for English or "zh_CN" for Simplified
8399	// Chinese.
8400	LanguageCode string `json:"languageCode,omitempty"`
8401
8402	// Name: Name of this language.
8403	Name string `json:"name,omitempty"`
8404
8405	// ForceSendFields is a list of field names (e.g. "Id") to
8406	// unconditionally include in API requests. By default, fields with
8407	// empty values are omitted from API requests. However, any non-pointer,
8408	// non-interface field appearing in ForceSendFields will be sent to the
8409	// server regardless of whether the field is empty or not. This may be
8410	// used to include empty fields in Patch requests.
8411	ForceSendFields []string `json:"-"`
8412
8413	// NullFields is a list of field names (e.g. "Id") to include in API
8414	// requests with the JSON null value. By default, fields with empty
8415	// values are omitted from API requests. However, any field with an
8416	// empty value appearing in NullFields will be sent to the server as
8417	// null. It is an error if a field in this list has a non-empty value.
8418	// This may be used to include null fields in Patch requests.
8419	NullFields []string `json:"-"`
8420}
8421
8422func (s *Language) MarshalJSON() ([]byte, error) {
8423	type NoMethod Language
8424	raw := NoMethod(*s)
8425	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8426}
8427
8428// LanguageTargeting: Language Targeting.
8429type LanguageTargeting struct {
8430	// Languages: Languages that this ad targets. For each language only
8431	// languageId is required. The other fields are populated automatically
8432	// when the ad is inserted or updated.
8433	Languages []*Language `json:"languages,omitempty"`
8434
8435	// ForceSendFields is a list of field names (e.g. "Languages") to
8436	// unconditionally include in API requests. By default, fields with
8437	// empty values are omitted from API requests. However, any non-pointer,
8438	// non-interface field appearing in ForceSendFields will be sent to the
8439	// server regardless of whether the field is empty or not. This may be
8440	// used to include empty fields in Patch requests.
8441	ForceSendFields []string `json:"-"`
8442
8443	// NullFields is a list of field names (e.g. "Languages") to include in
8444	// API requests with the JSON null value. By default, fields with empty
8445	// values are omitted from API requests. However, any field with an
8446	// empty value appearing in NullFields will be sent to the server as
8447	// null. It is an error if a field in this list has a non-empty value.
8448	// This may be used to include null fields in Patch requests.
8449	NullFields []string `json:"-"`
8450}
8451
8452func (s *LanguageTargeting) MarshalJSON() ([]byte, error) {
8453	type NoMethod LanguageTargeting
8454	raw := NoMethod(*s)
8455	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8456}
8457
8458// LanguagesListResponse: Language List Response
8459type LanguagesListResponse struct {
8460	// Kind: Identifies what kind of resource this is. Value: the fixed
8461	// string "dfareporting#languagesListResponse".
8462	Kind string `json:"kind,omitempty"`
8463
8464	// Languages: Language collection.
8465	Languages []*Language `json:"languages,omitempty"`
8466
8467	// ServerResponse contains the HTTP response code and headers from the
8468	// server.
8469	googleapi.ServerResponse `json:"-"`
8470
8471	// ForceSendFields is a list of field names (e.g. "Kind") to
8472	// unconditionally include in API requests. By default, fields with
8473	// empty values are omitted from API requests. However, any non-pointer,
8474	// non-interface field appearing in ForceSendFields will be sent to the
8475	// server regardless of whether the field is empty or not. This may be
8476	// used to include empty fields in Patch requests.
8477	ForceSendFields []string `json:"-"`
8478
8479	// NullFields is a list of field names (e.g. "Kind") to include in API
8480	// requests with the JSON null value. By default, fields with empty
8481	// values are omitted from API requests. However, any field with an
8482	// empty value appearing in NullFields will be sent to the server as
8483	// null. It is an error if a field in this list has a non-empty value.
8484	// This may be used to include null fields in Patch requests.
8485	NullFields []string `json:"-"`
8486}
8487
8488func (s *LanguagesListResponse) MarshalJSON() ([]byte, error) {
8489	type NoMethod LanguagesListResponse
8490	raw := NoMethod(*s)
8491	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8492}
8493
8494// LastModifiedInfo: Modification timestamp.
8495type LastModifiedInfo struct {
8496	// Time: Timestamp of the last change in milliseconds since epoch.
8497	Time int64 `json:"time,omitempty,string"`
8498
8499	// ForceSendFields is a list of field names (e.g. "Time") to
8500	// unconditionally include in API requests. By default, fields with
8501	// empty values are omitted from API requests. However, any non-pointer,
8502	// non-interface field appearing in ForceSendFields will be sent to the
8503	// server regardless of whether the field is empty or not. This may be
8504	// used to include empty fields in Patch requests.
8505	ForceSendFields []string `json:"-"`
8506
8507	// NullFields is a list of field names (e.g. "Time") to include in API
8508	// requests with the JSON null value. By default, fields with empty
8509	// values are omitted from API requests. However, any field with an
8510	// empty value appearing in NullFields will be sent to the server as
8511	// null. It is an error if a field in this list has a non-empty value.
8512	// This may be used to include null fields in Patch requests.
8513	NullFields []string `json:"-"`
8514}
8515
8516func (s *LastModifiedInfo) MarshalJSON() ([]byte, error) {
8517	type NoMethod LastModifiedInfo
8518	raw := NoMethod(*s)
8519	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8520}
8521
8522// ListPopulationClause: A group clause made up of list population terms
8523// representing constraints joined by ORs.
8524type ListPopulationClause struct {
8525	// Terms: Terms of this list population clause. Each clause is made up
8526	// of list population terms representing constraints and are joined by
8527	// ORs.
8528	Terms []*ListPopulationTerm `json:"terms,omitempty"`
8529
8530	// ForceSendFields is a list of field names (e.g. "Terms") to
8531	// unconditionally include in API requests. By default, fields with
8532	// empty values are omitted from API requests. However, any non-pointer,
8533	// non-interface field appearing in ForceSendFields will be sent to the
8534	// server regardless of whether the field is empty or not. This may be
8535	// used to include empty fields in Patch requests.
8536	ForceSendFields []string `json:"-"`
8537
8538	// NullFields is a list of field names (e.g. "Terms") to include in API
8539	// requests with the JSON null value. By default, fields with empty
8540	// values are omitted from API requests. However, any field with an
8541	// empty value appearing in NullFields will be sent to the server as
8542	// null. It is an error if a field in this list has a non-empty value.
8543	// This may be used to include null fields in Patch requests.
8544	NullFields []string `json:"-"`
8545}
8546
8547func (s *ListPopulationClause) MarshalJSON() ([]byte, error) {
8548	type NoMethod ListPopulationClause
8549	raw := NoMethod(*s)
8550	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8551}
8552
8553// ListPopulationRule: Remarketing List Population Rule.
8554type ListPopulationRule struct {
8555	// FloodlightActivityId: Floodlight activity ID associated with this
8556	// rule. This field can be left blank.
8557	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
8558
8559	// FloodlightActivityName: Name of floodlight activity associated with
8560	// this rule. This is a read-only, auto-generated field.
8561	FloodlightActivityName string `json:"floodlightActivityName,omitempty"`
8562
8563	// ListPopulationClauses: Clauses that make up this list population
8564	// rule. Clauses are joined by ANDs, and the clauses themselves are made
8565	// up of list population terms which are joined by ORs.
8566	ListPopulationClauses []*ListPopulationClause `json:"listPopulationClauses,omitempty"`
8567
8568	// ForceSendFields is a list of field names (e.g.
8569	// "FloodlightActivityId") to unconditionally include in API requests.
8570	// By default, fields with empty values are omitted from API requests.
8571	// However, any non-pointer, non-interface field appearing in
8572	// ForceSendFields will be sent to the server regardless of whether the
8573	// field is empty or not. This may be used to include empty fields in
8574	// Patch requests.
8575	ForceSendFields []string `json:"-"`
8576
8577	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
8578	// include in API requests with the JSON null value. By default, fields
8579	// with empty values are omitted from API requests. However, any field
8580	// with an empty value appearing in NullFields will be sent to the
8581	// server as null. It is an error if a field in this list has a
8582	// non-empty value. This may be used to include null fields in Patch
8583	// requests.
8584	NullFields []string `json:"-"`
8585}
8586
8587func (s *ListPopulationRule) MarshalJSON() ([]byte, error) {
8588	type NoMethod ListPopulationRule
8589	raw := NoMethod(*s)
8590	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8591}
8592
8593// ListPopulationTerm: Remarketing List Population Rule Term.
8594type ListPopulationTerm struct {
8595	// Contains: Will be true if the term should check if the user is in the
8596	// list and false if the term should check if the user is not in the
8597	// list. This field is only relevant when type is set to
8598	// LIST_MEMBERSHIP_TERM. False by default.
8599	Contains bool `json:"contains,omitempty"`
8600
8601	// Negation: Whether to negate the comparison result of this term during
8602	// rule evaluation. This field is only relevant when type is left unset
8603	// or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM.
8604	Negation bool `json:"negation,omitempty"`
8605
8606	// Operator: Comparison operator of this term. This field is only
8607	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
8608	// REFERRER_TERM.
8609	//
8610	// Possible values:
8611	//   "NUM_EQUALS"
8612	//   "NUM_GREATER_THAN"
8613	//   "NUM_GREATER_THAN_EQUAL"
8614	//   "NUM_LESS_THAN"
8615	//   "NUM_LESS_THAN_EQUAL"
8616	//   "STRING_CONTAINS"
8617	//   "STRING_EQUALS"
8618	Operator string `json:"operator,omitempty"`
8619
8620	// RemarketingListId: ID of the list in question. This field is only
8621	// relevant when type is set to LIST_MEMBERSHIP_TERM.
8622	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
8623
8624	// Type: List population term type determines the applicable fields in
8625	// this object. If left unset or set to CUSTOM_VARIABLE_TERM, then
8626	// variableName, variableFriendlyName, operator, value, and negation are
8627	// applicable. If set to LIST_MEMBERSHIP_TERM then remarketingListId and
8628	// contains are applicable. If set to REFERRER_TERM then operator,
8629	// value, and negation are applicable.
8630	//
8631	// Possible values:
8632	//   "CUSTOM_VARIABLE_TERM"
8633	//   "LIST_MEMBERSHIP_TERM"
8634	//   "REFERRER_TERM"
8635	Type string `json:"type,omitempty"`
8636
8637	// Value: Literal to compare the variable to. This field is only
8638	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
8639	// REFERRER_TERM.
8640	Value string `json:"value,omitempty"`
8641
8642	// VariableFriendlyName: Friendly name of this term's variable. This is
8643	// a read-only, auto-generated field. This field is only relevant when
8644	// type is left unset or set to CUSTOM_VARIABLE_TERM.
8645	VariableFriendlyName string `json:"variableFriendlyName,omitempty"`
8646
8647	// VariableName: Name of the variable (U1, U2, etc.) being compared in
8648	// this term. This field is only relevant when type is set to null,
8649	// CUSTOM_VARIABLE_TERM or REFERRER_TERM.
8650	VariableName string `json:"variableName,omitempty"`
8651
8652	// ForceSendFields is a list of field names (e.g. "Contains") to
8653	// unconditionally include in API requests. By default, fields with
8654	// empty values are omitted from API requests. However, any non-pointer,
8655	// non-interface field appearing in ForceSendFields will be sent to the
8656	// server regardless of whether the field is empty or not. This may be
8657	// used to include empty fields in Patch requests.
8658	ForceSendFields []string `json:"-"`
8659
8660	// NullFields is a list of field names (e.g. "Contains") to include in
8661	// API requests with the JSON null value. By default, fields with empty
8662	// values are omitted from API requests. However, any field with an
8663	// empty value appearing in NullFields will be sent to the server as
8664	// null. It is an error if a field in this list has a non-empty value.
8665	// This may be used to include null fields in Patch requests.
8666	NullFields []string `json:"-"`
8667}
8668
8669func (s *ListPopulationTerm) MarshalJSON() ([]byte, error) {
8670	type NoMethod ListPopulationTerm
8671	raw := NoMethod(*s)
8672	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8673}
8674
8675// ListTargetingExpression: Remarketing List Targeting Expression.
8676type ListTargetingExpression struct {
8677	// Expression: Expression describing which lists are being targeted by
8678	// the ad.
8679	Expression string `json:"expression,omitempty"`
8680
8681	// ForceSendFields is a list of field names (e.g. "Expression") to
8682	// unconditionally include in API requests. By default, fields with
8683	// empty values are omitted from API requests. However, any non-pointer,
8684	// non-interface field appearing in ForceSendFields will be sent to the
8685	// server regardless of whether the field is empty or not. This may be
8686	// used to include empty fields in Patch requests.
8687	ForceSendFields []string `json:"-"`
8688
8689	// NullFields is a list of field names (e.g. "Expression") to include in
8690	// API requests with the JSON null value. By default, fields with empty
8691	// values are omitted from API requests. However, any field with an
8692	// empty value appearing in NullFields will be sent to the server as
8693	// null. It is an error if a field in this list has a non-empty value.
8694	// This may be used to include null fields in Patch requests.
8695	NullFields []string `json:"-"`
8696}
8697
8698func (s *ListTargetingExpression) MarshalJSON() ([]byte, error) {
8699	type NoMethod ListTargetingExpression
8700	raw := NoMethod(*s)
8701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8702}
8703
8704// LookbackConfiguration: Lookback configuration settings.
8705type LookbackConfiguration struct {
8706	// ClickDuration: Lookback window, in days, from the last time a given
8707	// user clicked on one of your ads. If you enter 0, clicks will not be
8708	// considered as triggering events for floodlight tracking. If you leave
8709	// this field blank, the default value for your account will be used.
8710	// Acceptable values are 0 to 90, inclusive.
8711	ClickDuration int64 `json:"clickDuration,omitempty"`
8712
8713	// PostImpressionActivitiesDuration: Lookback window, in days, from the
8714	// last time a given user viewed one of your ads. If you enter 0,
8715	// impressions will not be considered as triggering events for
8716	// floodlight tracking. If you leave this field blank, the default value
8717	// for your account will be used. Acceptable values are 0 to 90,
8718	// inclusive.
8719	PostImpressionActivitiesDuration int64 `json:"postImpressionActivitiesDuration,omitempty"`
8720
8721	// ForceSendFields is a list of field names (e.g. "ClickDuration") to
8722	// unconditionally include in API requests. By default, fields with
8723	// empty values are omitted from API requests. However, any non-pointer,
8724	// non-interface field appearing in ForceSendFields will be sent to the
8725	// server regardless of whether the field is empty or not. This may be
8726	// used to include empty fields in Patch requests.
8727	ForceSendFields []string `json:"-"`
8728
8729	// NullFields is a list of field names (e.g. "ClickDuration") to include
8730	// in API requests with the JSON null value. By default, fields with
8731	// empty values are omitted from API requests. However, any field with
8732	// an empty value appearing in NullFields will be sent to the server as
8733	// null. It is an error if a field in this list has a non-empty value.
8734	// This may be used to include null fields in Patch requests.
8735	NullFields []string `json:"-"`
8736}
8737
8738func (s *LookbackConfiguration) MarshalJSON() ([]byte, error) {
8739	type NoMethod LookbackConfiguration
8740	raw := NoMethod(*s)
8741	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8742}
8743
8744// Metric: Represents a metric.
8745type Metric struct {
8746	// Kind: The kind of resource this is, in this case dfareporting#metric.
8747	Kind string `json:"kind,omitempty"`
8748
8749	// Name: The metric name, e.g. dfa:impressions
8750	Name string `json:"name,omitempty"`
8751
8752	// ForceSendFields is a list of field names (e.g. "Kind") to
8753	// unconditionally include in API requests. By default, fields with
8754	// empty values are omitted from API requests. However, any non-pointer,
8755	// non-interface field appearing in ForceSendFields will be sent to the
8756	// server regardless of whether the field is empty or not. This may be
8757	// used to include empty fields in Patch requests.
8758	ForceSendFields []string `json:"-"`
8759
8760	// NullFields is a list of field names (e.g. "Kind") to include in API
8761	// requests with the JSON null value. By default, fields with empty
8762	// values are omitted from API requests. However, any field with an
8763	// empty value appearing in NullFields will be sent to the server as
8764	// null. It is an error if a field in this list has a non-empty value.
8765	// This may be used to include null fields in Patch requests.
8766	NullFields []string `json:"-"`
8767}
8768
8769func (s *Metric) MarshalJSON() ([]byte, error) {
8770	type NoMethod Metric
8771	raw := NoMethod(*s)
8772	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8773}
8774
8775// Metro: Contains information about a metro region that can be targeted
8776// by ads.
8777type Metro struct {
8778	// CountryCode: Country code of the country to which this metro region
8779	// belongs.
8780	CountryCode string `json:"countryCode,omitempty"`
8781
8782	// CountryDartId: DART ID of the country to which this metro region
8783	// belongs.
8784	CountryDartId int64 `json:"countryDartId,omitempty,string"`
8785
8786	// DartId: DART ID of this metro region.
8787	DartId int64 `json:"dartId,omitempty,string"`
8788
8789	// DmaId: DMA ID of this metro region. This is the ID used for targeting
8790	// and generating reports, and is equivalent to metro_code.
8791	DmaId int64 `json:"dmaId,omitempty,string"`
8792
8793	// Kind: Identifies what kind of resource this is. Value: the fixed
8794	// string "dfareporting#metro".
8795	Kind string `json:"kind,omitempty"`
8796
8797	// MetroCode: Metro code of this metro region. This is equivalent to
8798	// dma_id.
8799	MetroCode string `json:"metroCode,omitempty"`
8800
8801	// Name: Name of this metro region.
8802	Name string `json:"name,omitempty"`
8803
8804	// ForceSendFields is a list of field names (e.g. "CountryCode") to
8805	// unconditionally include in API requests. By default, fields with
8806	// empty values are omitted from API requests. However, any non-pointer,
8807	// non-interface field appearing in ForceSendFields will be sent to the
8808	// server regardless of whether the field is empty or not. This may be
8809	// used to include empty fields in Patch requests.
8810	ForceSendFields []string `json:"-"`
8811
8812	// NullFields is a list of field names (e.g. "CountryCode") to include
8813	// in API requests with the JSON null value. By default, fields with
8814	// empty values are omitted from API requests. However, any field with
8815	// an empty value appearing in NullFields will be sent to the server as
8816	// null. It is an error if a field in this list has a non-empty value.
8817	// This may be used to include null fields in Patch requests.
8818	NullFields []string `json:"-"`
8819}
8820
8821func (s *Metro) MarshalJSON() ([]byte, error) {
8822	type NoMethod Metro
8823	raw := NoMethod(*s)
8824	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8825}
8826
8827// MetrosListResponse: Metro List Response
8828type MetrosListResponse struct {
8829	// Kind: Identifies what kind of resource this is. Value: the fixed
8830	// string "dfareporting#metrosListResponse".
8831	Kind string `json:"kind,omitempty"`
8832
8833	// Metros: Metro collection.
8834	Metros []*Metro `json:"metros,omitempty"`
8835
8836	// ServerResponse contains the HTTP response code and headers from the
8837	// server.
8838	googleapi.ServerResponse `json:"-"`
8839
8840	// ForceSendFields is a list of field names (e.g. "Kind") to
8841	// unconditionally include in API requests. By default, fields with
8842	// empty values are omitted from API requests. However, any non-pointer,
8843	// non-interface field appearing in ForceSendFields will be sent to the
8844	// server regardless of whether the field is empty or not. This may be
8845	// used to include empty fields in Patch requests.
8846	ForceSendFields []string `json:"-"`
8847
8848	// NullFields is a list of field names (e.g. "Kind") to include in API
8849	// requests with the JSON null value. By default, fields with empty
8850	// values are omitted from API requests. However, any field with an
8851	// empty value appearing in NullFields will be sent to the server as
8852	// null. It is an error if a field in this list has a non-empty value.
8853	// This may be used to include null fields in Patch requests.
8854	NullFields []string `json:"-"`
8855}
8856
8857func (s *MetrosListResponse) MarshalJSON() ([]byte, error) {
8858	type NoMethod MetrosListResponse
8859	raw := NoMethod(*s)
8860	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8861}
8862
8863// MobileApp: Contains information about a mobile app. Used as a landing
8864// page deep link.
8865type MobileApp struct {
8866	// Directory: Mobile app directory.
8867	//
8868	// Possible values:
8869	//   "APPLE_APP_STORE"
8870	//   "GOOGLE_PLAY_STORE"
8871	//   "UNKNOWN"
8872	Directory string `json:"directory,omitempty"`
8873
8874	// Id: ID of this mobile app.
8875	Id string `json:"id,omitempty"`
8876
8877	// Kind: Identifies what kind of resource this is. Value: the fixed
8878	// string "dfareporting#mobileApp".
8879	Kind string `json:"kind,omitempty"`
8880
8881	// PublisherName: Publisher name.
8882	PublisherName string `json:"publisherName,omitempty"`
8883
8884	// Title: Title of this mobile app.
8885	Title string `json:"title,omitempty"`
8886
8887	// ServerResponse contains the HTTP response code and headers from the
8888	// server.
8889	googleapi.ServerResponse `json:"-"`
8890
8891	// ForceSendFields is a list of field names (e.g. "Directory") to
8892	// unconditionally include in API requests. By default, fields with
8893	// empty values are omitted from API requests. However, any non-pointer,
8894	// non-interface field appearing in ForceSendFields will be sent to the
8895	// server regardless of whether the field is empty or not. This may be
8896	// used to include empty fields in Patch requests.
8897	ForceSendFields []string `json:"-"`
8898
8899	// NullFields is a list of field names (e.g. "Directory") to include in
8900	// API requests with the JSON null value. By default, fields with empty
8901	// values are omitted from API requests. However, any field with an
8902	// empty value appearing in NullFields will be sent to the server as
8903	// null. It is an error if a field in this list has a non-empty value.
8904	// This may be used to include null fields in Patch requests.
8905	NullFields []string `json:"-"`
8906}
8907
8908func (s *MobileApp) MarshalJSON() ([]byte, error) {
8909	type NoMethod MobileApp
8910	raw := NoMethod(*s)
8911	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8912}
8913
8914// MobileAppsListResponse: Mobile app List Response
8915type MobileAppsListResponse struct {
8916	// Kind: Identifies what kind of resource this is. Value: the fixed
8917	// string "dfareporting#mobileAppsListResponse".
8918	Kind string `json:"kind,omitempty"`
8919
8920	// MobileApps: Mobile apps collection.
8921	MobileApps []*MobileApp `json:"mobileApps,omitempty"`
8922
8923	// NextPageToken: Pagination token to be used for the next list
8924	// operation.
8925	NextPageToken string `json:"nextPageToken,omitempty"`
8926
8927	// ServerResponse contains the HTTP response code and headers from the
8928	// server.
8929	googleapi.ServerResponse `json:"-"`
8930
8931	// ForceSendFields is a list of field names (e.g. "Kind") to
8932	// unconditionally include in API requests. By default, fields with
8933	// empty values are omitted from API requests. However, any non-pointer,
8934	// non-interface field appearing in ForceSendFields will be sent to the
8935	// server regardless of whether the field is empty or not. This may be
8936	// used to include empty fields in Patch requests.
8937	ForceSendFields []string `json:"-"`
8938
8939	// NullFields is a list of field names (e.g. "Kind") to include in API
8940	// requests with the JSON null value. By default, fields with empty
8941	// values are omitted from API requests. However, any field with an
8942	// empty value appearing in NullFields will be sent to the server as
8943	// null. It is an error if a field in this list has a non-empty value.
8944	// This may be used to include null fields in Patch requests.
8945	NullFields []string `json:"-"`
8946}
8947
8948func (s *MobileAppsListResponse) MarshalJSON() ([]byte, error) {
8949	type NoMethod MobileAppsListResponse
8950	raw := NoMethod(*s)
8951	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8952}
8953
8954// MobileCarrier: Contains information about a mobile carrier that can
8955// be targeted by ads.
8956type MobileCarrier struct {
8957	// CountryCode: Country code of the country to which this mobile carrier
8958	// belongs.
8959	CountryCode string `json:"countryCode,omitempty"`
8960
8961	// CountryDartId: DART ID of the country to which this mobile carrier
8962	// belongs.
8963	CountryDartId int64 `json:"countryDartId,omitempty,string"`
8964
8965	// Id: ID of this mobile carrier.
8966	Id int64 `json:"id,omitempty,string"`
8967
8968	// Kind: Identifies what kind of resource this is. Value: the fixed
8969	// string "dfareporting#mobileCarrier".
8970	Kind string `json:"kind,omitempty"`
8971
8972	// Name: Name of this mobile carrier.
8973	Name string `json:"name,omitempty"`
8974
8975	// ServerResponse contains the HTTP response code and headers from the
8976	// server.
8977	googleapi.ServerResponse `json:"-"`
8978
8979	// ForceSendFields is a list of field names (e.g. "CountryCode") to
8980	// unconditionally include in API requests. By default, fields with
8981	// empty values are omitted from API requests. However, any non-pointer,
8982	// non-interface field appearing in ForceSendFields will be sent to the
8983	// server regardless of whether the field is empty or not. This may be
8984	// used to include empty fields in Patch requests.
8985	ForceSendFields []string `json:"-"`
8986
8987	// NullFields is a list of field names (e.g. "CountryCode") to include
8988	// in API requests with the JSON null value. By default, fields with
8989	// empty values are omitted from API requests. However, any field with
8990	// an empty value appearing in NullFields will be sent to the server as
8991	// null. It is an error if a field in this list has a non-empty value.
8992	// This may be used to include null fields in Patch requests.
8993	NullFields []string `json:"-"`
8994}
8995
8996func (s *MobileCarrier) MarshalJSON() ([]byte, error) {
8997	type NoMethod MobileCarrier
8998	raw := NoMethod(*s)
8999	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9000}
9001
9002// MobileCarriersListResponse: Mobile Carrier List Response
9003type MobileCarriersListResponse struct {
9004	// Kind: Identifies what kind of resource this is. Value: the fixed
9005	// string "dfareporting#mobileCarriersListResponse".
9006	Kind string `json:"kind,omitempty"`
9007
9008	// MobileCarriers: Mobile carrier collection.
9009	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
9010
9011	// ServerResponse contains the HTTP response code and headers from the
9012	// server.
9013	googleapi.ServerResponse `json:"-"`
9014
9015	// ForceSendFields is a list of field names (e.g. "Kind") to
9016	// unconditionally include in API requests. By default, fields with
9017	// empty values are omitted from API requests. However, any non-pointer,
9018	// non-interface field appearing in ForceSendFields will be sent to the
9019	// server regardless of whether the field is empty or not. This may be
9020	// used to include empty fields in Patch requests.
9021	ForceSendFields []string `json:"-"`
9022
9023	// NullFields is a list of field names (e.g. "Kind") to include in API
9024	// requests with the JSON null value. By default, fields with empty
9025	// values are omitted from API requests. However, any field with an
9026	// empty value appearing in NullFields will be sent to the server as
9027	// null. It is an error if a field in this list has a non-empty value.
9028	// This may be used to include null fields in Patch requests.
9029	NullFields []string `json:"-"`
9030}
9031
9032func (s *MobileCarriersListResponse) MarshalJSON() ([]byte, error) {
9033	type NoMethod MobileCarriersListResponse
9034	raw := NoMethod(*s)
9035	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9036}
9037
9038// ObjectFilter: Object Filter.
9039type ObjectFilter struct {
9040	// Kind: Identifies what kind of resource this is. Value: the fixed
9041	// string "dfareporting#objectFilter".
9042	Kind string `json:"kind,omitempty"`
9043
9044	// ObjectIds: Applicable when status is ASSIGNED. The user has access to
9045	// objects with these object IDs.
9046	ObjectIds googleapi.Int64s `json:"objectIds,omitempty"`
9047
9048	// Status: Status of the filter. NONE means the user has access to none
9049	// of the objects. ALL means the user has access to all objects.
9050	// ASSIGNED means the user has access to the objects with IDs in the
9051	// objectIds list.
9052	//
9053	// Possible values:
9054	//   "ALL"
9055	//   "ASSIGNED"
9056	//   "NONE"
9057	Status string `json:"status,omitempty"`
9058
9059	// ForceSendFields is a list of field names (e.g. "Kind") to
9060	// unconditionally include in API requests. By default, fields with
9061	// empty values are omitted from API requests. However, any non-pointer,
9062	// non-interface field appearing in ForceSendFields will be sent to the
9063	// server regardless of whether the field is empty or not. This may be
9064	// used to include empty fields in Patch requests.
9065	ForceSendFields []string `json:"-"`
9066
9067	// NullFields is a list of field names (e.g. "Kind") to include in API
9068	// requests with the JSON null value. By default, fields with empty
9069	// values are omitted from API requests. However, any field with an
9070	// empty value appearing in NullFields will be sent to the server as
9071	// null. It is an error if a field in this list has a non-empty value.
9072	// This may be used to include null fields in Patch requests.
9073	NullFields []string `json:"-"`
9074}
9075
9076func (s *ObjectFilter) MarshalJSON() ([]byte, error) {
9077	type NoMethod ObjectFilter
9078	raw := NoMethod(*s)
9079	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9080}
9081
9082// OffsetPosition: Offset Position.
9083type OffsetPosition struct {
9084	// Left: Offset distance from left side of an asset or a window.
9085	Left int64 `json:"left,omitempty"`
9086
9087	// Top: Offset distance from top side of an asset or a window.
9088	Top int64 `json:"top,omitempty"`
9089
9090	// ForceSendFields is a list of field names (e.g. "Left") to
9091	// unconditionally include in API requests. By default, fields with
9092	// empty values are omitted from API requests. However, any non-pointer,
9093	// non-interface field appearing in ForceSendFields will be sent to the
9094	// server regardless of whether the field is empty or not. This may be
9095	// used to include empty fields in Patch requests.
9096	ForceSendFields []string `json:"-"`
9097
9098	// NullFields is a list of field names (e.g. "Left") to include in API
9099	// requests with the JSON null value. By default, fields with empty
9100	// values are omitted from API requests. However, any field with an
9101	// empty value appearing in NullFields will be sent to the server as
9102	// null. It is an error if a field in this list has a non-empty value.
9103	// This may be used to include null fields in Patch requests.
9104	NullFields []string `json:"-"`
9105}
9106
9107func (s *OffsetPosition) MarshalJSON() ([]byte, error) {
9108	type NoMethod OffsetPosition
9109	raw := NoMethod(*s)
9110	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9111}
9112
9113// OmnitureSettings: Omniture Integration Settings.
9114type OmnitureSettings struct {
9115	// OmnitureCostDataEnabled: Whether placement cost data will be sent to
9116	// Omniture. This property can be enabled only if
9117	// omnitureIntegrationEnabled is true.
9118	OmnitureCostDataEnabled bool `json:"omnitureCostDataEnabled,omitempty"`
9119
9120	// OmnitureIntegrationEnabled: Whether Omniture integration is enabled.
9121	// This property can be enabled only when the "Advanced Ad Serving"
9122	// account setting is enabled.
9123	OmnitureIntegrationEnabled bool `json:"omnitureIntegrationEnabled,omitempty"`
9124
9125	// ForceSendFields is a list of field names (e.g.
9126	// "OmnitureCostDataEnabled") to unconditionally include in API
9127	// requests. By default, fields with empty values are omitted from API
9128	// requests. However, any non-pointer, non-interface field appearing in
9129	// ForceSendFields will be sent to the server regardless of whether the
9130	// field is empty or not. This may be used to include empty fields in
9131	// Patch requests.
9132	ForceSendFields []string `json:"-"`
9133
9134	// NullFields is a list of field names (e.g. "OmnitureCostDataEnabled")
9135	// to include in API requests with the JSON null value. By default,
9136	// fields with empty values are omitted from API requests. However, any
9137	// field with an empty value appearing in NullFields will be sent to the
9138	// server as null. It is an error if a field in this list has a
9139	// non-empty value. This may be used to include null fields in Patch
9140	// requests.
9141	NullFields []string `json:"-"`
9142}
9143
9144func (s *OmnitureSettings) MarshalJSON() ([]byte, error) {
9145	type NoMethod OmnitureSettings
9146	raw := NoMethod(*s)
9147	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9148}
9149
9150// OperatingSystem: Contains information about an operating system that
9151// can be targeted by ads.
9152type OperatingSystem struct {
9153	// DartId: DART ID of this operating system. This is the ID used for
9154	// targeting.
9155	DartId int64 `json:"dartId,omitempty,string"`
9156
9157	// Desktop: Whether this operating system is for desktop.
9158	Desktop bool `json:"desktop,omitempty"`
9159
9160	// Kind: Identifies what kind of resource this is. Value: the fixed
9161	// string "dfareporting#operatingSystem".
9162	Kind string `json:"kind,omitempty"`
9163
9164	// Mobile: Whether this operating system is for mobile.
9165	Mobile bool `json:"mobile,omitempty"`
9166
9167	// Name: Name of this operating system.
9168	Name string `json:"name,omitempty"`
9169
9170	// ServerResponse contains the HTTP response code and headers from the
9171	// server.
9172	googleapi.ServerResponse `json:"-"`
9173
9174	// ForceSendFields is a list of field names (e.g. "DartId") to
9175	// unconditionally include in API requests. By default, fields with
9176	// empty values are omitted from API requests. However, any non-pointer,
9177	// non-interface field appearing in ForceSendFields will be sent to the
9178	// server regardless of whether the field is empty or not. This may be
9179	// used to include empty fields in Patch requests.
9180	ForceSendFields []string `json:"-"`
9181
9182	// NullFields is a list of field names (e.g. "DartId") to include in API
9183	// requests with the JSON null value. By default, fields with empty
9184	// values are omitted from API requests. However, any field with an
9185	// empty value appearing in NullFields will be sent to the server as
9186	// null. It is an error if a field in this list has a non-empty value.
9187	// This may be used to include null fields in Patch requests.
9188	NullFields []string `json:"-"`
9189}
9190
9191func (s *OperatingSystem) MarshalJSON() ([]byte, error) {
9192	type NoMethod OperatingSystem
9193	raw := NoMethod(*s)
9194	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9195}
9196
9197// OperatingSystemVersion: Contains information about a particular
9198// version of an operating system that can be targeted by ads.
9199type OperatingSystemVersion struct {
9200	// Id: ID of this operating system version.
9201	Id int64 `json:"id,omitempty,string"`
9202
9203	// Kind: Identifies what kind of resource this is. Value: the fixed
9204	// string "dfareporting#operatingSystemVersion".
9205	Kind string `json:"kind,omitempty"`
9206
9207	// MajorVersion: Major version (leftmost number) of this operating
9208	// system version.
9209	MajorVersion string `json:"majorVersion,omitempty"`
9210
9211	// MinorVersion: Minor version (number after the first dot) of this
9212	// operating system version.
9213	MinorVersion string `json:"minorVersion,omitempty"`
9214
9215	// Name: Name of this operating system version.
9216	Name string `json:"name,omitempty"`
9217
9218	// OperatingSystem: Operating system of this operating system version.
9219	OperatingSystem *OperatingSystem `json:"operatingSystem,omitempty"`
9220
9221	// ServerResponse contains the HTTP response code and headers from the
9222	// server.
9223	googleapi.ServerResponse `json:"-"`
9224
9225	// ForceSendFields is a list of field names (e.g. "Id") to
9226	// unconditionally include in API requests. By default, fields with
9227	// empty values are omitted from API requests. However, any non-pointer,
9228	// non-interface field appearing in ForceSendFields will be sent to the
9229	// server regardless of whether the field is empty or not. This may be
9230	// used to include empty fields in Patch requests.
9231	ForceSendFields []string `json:"-"`
9232
9233	// NullFields is a list of field names (e.g. "Id") to include in API
9234	// requests with the JSON null value. By default, fields with empty
9235	// values are omitted from API requests. However, any field with an
9236	// empty value appearing in NullFields will be sent to the server as
9237	// null. It is an error if a field in this list has a non-empty value.
9238	// This may be used to include null fields in Patch requests.
9239	NullFields []string `json:"-"`
9240}
9241
9242func (s *OperatingSystemVersion) MarshalJSON() ([]byte, error) {
9243	type NoMethod OperatingSystemVersion
9244	raw := NoMethod(*s)
9245	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9246}
9247
9248// OperatingSystemVersionsListResponse: Operating System Version List
9249// Response
9250type OperatingSystemVersionsListResponse struct {
9251	// Kind: Identifies what kind of resource this is. Value: the fixed
9252	// string "dfareporting#operatingSystemVersionsListResponse".
9253	Kind string `json:"kind,omitempty"`
9254
9255	// OperatingSystemVersions: Operating system version collection.
9256	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
9257
9258	// ServerResponse contains the HTTP response code and headers from the
9259	// server.
9260	googleapi.ServerResponse `json:"-"`
9261
9262	// ForceSendFields is a list of field names (e.g. "Kind") to
9263	// unconditionally include in API requests. By default, fields with
9264	// empty values are omitted from API requests. However, any non-pointer,
9265	// non-interface field appearing in ForceSendFields will be sent to the
9266	// server regardless of whether the field is empty or not. This may be
9267	// used to include empty fields in Patch requests.
9268	ForceSendFields []string `json:"-"`
9269
9270	// NullFields is a list of field names (e.g. "Kind") to include in API
9271	// requests with the JSON null value. By default, fields with empty
9272	// values are omitted from API requests. However, any field with an
9273	// empty value appearing in NullFields will be sent to the server as
9274	// null. It is an error if a field in this list has a non-empty value.
9275	// This may be used to include null fields in Patch requests.
9276	NullFields []string `json:"-"`
9277}
9278
9279func (s *OperatingSystemVersionsListResponse) MarshalJSON() ([]byte, error) {
9280	type NoMethod OperatingSystemVersionsListResponse
9281	raw := NoMethod(*s)
9282	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9283}
9284
9285// OperatingSystemsListResponse: Operating System List Response
9286type OperatingSystemsListResponse struct {
9287	// Kind: Identifies what kind of resource this is. Value: the fixed
9288	// string "dfareporting#operatingSystemsListResponse".
9289	Kind string `json:"kind,omitempty"`
9290
9291	// OperatingSystems: Operating system collection.
9292	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
9293
9294	// ServerResponse contains the HTTP response code and headers from the
9295	// server.
9296	googleapi.ServerResponse `json:"-"`
9297
9298	// ForceSendFields is a list of field names (e.g. "Kind") to
9299	// unconditionally include in API requests. By default, fields with
9300	// empty values are omitted from API requests. However, any non-pointer,
9301	// non-interface field appearing in ForceSendFields will be sent to the
9302	// server regardless of whether the field is empty or not. This may be
9303	// used to include empty fields in Patch requests.
9304	ForceSendFields []string `json:"-"`
9305
9306	// NullFields is a list of field names (e.g. "Kind") to include in API
9307	// requests with the JSON null value. By default, fields with empty
9308	// values are omitted from API requests. However, any field with an
9309	// empty value appearing in NullFields will be sent to the server as
9310	// null. It is an error if a field in this list has a non-empty value.
9311	// This may be used to include null fields in Patch requests.
9312	NullFields []string `json:"-"`
9313}
9314
9315func (s *OperatingSystemsListResponse) MarshalJSON() ([]byte, error) {
9316	type NoMethod OperatingSystemsListResponse
9317	raw := NoMethod(*s)
9318	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9319}
9320
9321// OptimizationActivity: Creative optimization activity.
9322type OptimizationActivity struct {
9323	// FloodlightActivityId: Floodlight activity ID of this optimization
9324	// activity. This is a required field.
9325	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
9326
9327	// FloodlightActivityIdDimensionValue: Dimension value for the ID of the
9328	// floodlight activity. This is a read-only, auto-generated field.
9329	FloodlightActivityIdDimensionValue *DimensionValue `json:"floodlightActivityIdDimensionValue,omitempty"`
9330
9331	// Weight: Weight associated with this optimization. The weight assigned
9332	// will be understood in proportion to the weights assigned to the other
9333	// optimization activities. Value must be greater than or equal to 1.
9334	Weight int64 `json:"weight,omitempty"`
9335
9336	// ForceSendFields is a list of field names (e.g.
9337	// "FloodlightActivityId") to unconditionally include in API requests.
9338	// By default, fields with empty values are omitted from API requests.
9339	// However, any non-pointer, non-interface field appearing in
9340	// ForceSendFields will be sent to the server regardless of whether the
9341	// field is empty or not. This may be used to include empty fields in
9342	// Patch requests.
9343	ForceSendFields []string `json:"-"`
9344
9345	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
9346	// include in API requests with the JSON null value. By default, fields
9347	// with empty values are omitted from API requests. However, any field
9348	// with an empty value appearing in NullFields will be sent to the
9349	// server as null. It is an error if a field in this list has a
9350	// non-empty value. This may be used to include null fields in Patch
9351	// requests.
9352	NullFields []string `json:"-"`
9353}
9354
9355func (s *OptimizationActivity) MarshalJSON() ([]byte, error) {
9356	type NoMethod OptimizationActivity
9357	raw := NoMethod(*s)
9358	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9359}
9360
9361// Order: Describes properties of a Planning order.
9362type Order struct {
9363	// AccountId: Account ID of this order.
9364	AccountId int64 `json:"accountId,omitempty,string"`
9365
9366	// AdvertiserId: Advertiser ID of this order.
9367	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9368
9369	// ApproverUserProfileIds: IDs for users that have to approve documents
9370	// created for this order.
9371	ApproverUserProfileIds googleapi.Int64s `json:"approverUserProfileIds,omitempty"`
9372
9373	// BuyerInvoiceId: Buyer invoice ID associated with this order.
9374	BuyerInvoiceId string `json:"buyerInvoiceId,omitempty"`
9375
9376	// BuyerOrganizationName: Name of the buyer organization.
9377	BuyerOrganizationName string `json:"buyerOrganizationName,omitempty"`
9378
9379	// Comments: Comments in this order.
9380	Comments string `json:"comments,omitempty"`
9381
9382	// Contacts: Contacts for this order.
9383	Contacts []*OrderContact `json:"contacts,omitempty"`
9384
9385	// Id: ID of this order. This is a read-only, auto-generated field.
9386	Id int64 `json:"id,omitempty,string"`
9387
9388	// Kind: Identifies what kind of resource this is. Value: the fixed
9389	// string "dfareporting#order".
9390	Kind string `json:"kind,omitempty"`
9391
9392	// LastModifiedInfo: Information about the most recent modification of
9393	// this order.
9394	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9395
9396	// Name: Name of this order.
9397	Name string `json:"name,omitempty"`
9398
9399	// Notes: Notes of this order.
9400	Notes string `json:"notes,omitempty"`
9401
9402	// PlanningTermId: ID of the terms and conditions template used in this
9403	// order.
9404	PlanningTermId int64 `json:"planningTermId,omitempty,string"`
9405
9406	// ProjectId: Project ID of this order.
9407	ProjectId int64 `json:"projectId,omitempty,string"`
9408
9409	// SellerOrderId: Seller order ID associated with this order.
9410	SellerOrderId string `json:"sellerOrderId,omitempty"`
9411
9412	// SellerOrganizationName: Name of the seller organization.
9413	SellerOrganizationName string `json:"sellerOrganizationName,omitempty"`
9414
9415	// SiteId: Site IDs this order is associated with.
9416	SiteId googleapi.Int64s `json:"siteId,omitempty"`
9417
9418	// SiteNames: Free-form site names this order is associated with.
9419	SiteNames []string `json:"siteNames,omitempty"`
9420
9421	// SubaccountId: Subaccount ID of this order.
9422	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9423
9424	// TermsAndConditions: Terms and conditions of this order.
9425	TermsAndConditions string `json:"termsAndConditions,omitempty"`
9426
9427	// ServerResponse contains the HTTP response code and headers from the
9428	// server.
9429	googleapi.ServerResponse `json:"-"`
9430
9431	// ForceSendFields is a list of field names (e.g. "AccountId") to
9432	// unconditionally include in API requests. By default, fields with
9433	// empty values are omitted from API requests. However, any non-pointer,
9434	// non-interface field appearing in ForceSendFields will be sent to the
9435	// server regardless of whether the field is empty or not. This may be
9436	// used to include empty fields in Patch requests.
9437	ForceSendFields []string `json:"-"`
9438
9439	// NullFields is a list of field names (e.g. "AccountId") to include in
9440	// API requests with the JSON null value. By default, fields with empty
9441	// values are omitted from API requests. However, any field with an
9442	// empty value appearing in NullFields will be sent to the server as
9443	// null. It is an error if a field in this list has a non-empty value.
9444	// This may be used to include null fields in Patch requests.
9445	NullFields []string `json:"-"`
9446}
9447
9448func (s *Order) MarshalJSON() ([]byte, error) {
9449	type NoMethod Order
9450	raw := NoMethod(*s)
9451	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9452}
9453
9454// OrderContact: Contact of an order.
9455type OrderContact struct {
9456	// ContactInfo: Free-form information about this contact. It could be
9457	// any information related to this contact in addition to type, title,
9458	// name, and signature user profile ID.
9459	ContactInfo string `json:"contactInfo,omitempty"`
9460
9461	// ContactName: Name of this contact.
9462	ContactName string `json:"contactName,omitempty"`
9463
9464	// ContactTitle: Title of this contact.
9465	ContactTitle string `json:"contactTitle,omitempty"`
9466
9467	// ContactType: Type of this contact.
9468	//
9469	// Possible values:
9470	//   "PLANNING_ORDER_CONTACT_BUYER_BILLING_CONTACT"
9471	//   "PLANNING_ORDER_CONTACT_BUYER_CONTACT"
9472	//   "PLANNING_ORDER_CONTACT_SELLER_CONTACT"
9473	ContactType string `json:"contactType,omitempty"`
9474
9475	// SignatureUserProfileId: ID of the user profile containing the
9476	// signature that will be embedded into order documents.
9477	SignatureUserProfileId int64 `json:"signatureUserProfileId,omitempty,string"`
9478
9479	// ForceSendFields is a list of field names (e.g. "ContactInfo") to
9480	// unconditionally include in API requests. By default, fields with
9481	// empty values are omitted from API requests. However, any non-pointer,
9482	// non-interface field appearing in ForceSendFields will be sent to the
9483	// server regardless of whether the field is empty or not. This may be
9484	// used to include empty fields in Patch requests.
9485	ForceSendFields []string `json:"-"`
9486
9487	// NullFields is a list of field names (e.g. "ContactInfo") to include
9488	// in API requests with the JSON null value. By default, fields with
9489	// empty values are omitted from API requests. However, any field with
9490	// an empty value appearing in NullFields will be sent to the server as
9491	// null. It is an error if a field in this list has a non-empty value.
9492	// This may be used to include null fields in Patch requests.
9493	NullFields []string `json:"-"`
9494}
9495
9496func (s *OrderContact) MarshalJSON() ([]byte, error) {
9497	type NoMethod OrderContact
9498	raw := NoMethod(*s)
9499	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9500}
9501
9502// OrderDocument: Contains properties of a Planning order document.
9503type OrderDocument struct {
9504	// AccountId: Account ID of this order document.
9505	AccountId int64 `json:"accountId,omitempty,string"`
9506
9507	// AdvertiserId: Advertiser ID of this order document.
9508	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9509
9510	// AmendedOrderDocumentId: The amended order document ID of this order
9511	// document. An order document can be created by optionally amending
9512	// another order document so that the change history can be preserved.
9513	AmendedOrderDocumentId int64 `json:"amendedOrderDocumentId,omitempty,string"`
9514
9515	// ApprovedByUserProfileIds: IDs of users who have approved this order
9516	// document.
9517	ApprovedByUserProfileIds googleapi.Int64s `json:"approvedByUserProfileIds,omitempty"`
9518
9519	// Cancelled: Whether this order document is cancelled.
9520	Cancelled bool `json:"cancelled,omitempty"`
9521
9522	// CreatedInfo: Information about the creation of this order document.
9523	CreatedInfo *LastModifiedInfo `json:"createdInfo,omitempty"`
9524
9525	// EffectiveDate: Effective date of this order document.
9526	EffectiveDate string `json:"effectiveDate,omitempty"`
9527
9528	// Id: ID of this order document.
9529	Id int64 `json:"id,omitempty,string"`
9530
9531	// Kind: Identifies what kind of resource this is. Value: the fixed
9532	// string "dfareporting#orderDocument".
9533	Kind string `json:"kind,omitempty"`
9534
9535	// LastSentRecipients: List of email addresses that received the last
9536	// sent document.
9537	LastSentRecipients []string `json:"lastSentRecipients,omitempty"`
9538
9539	// LastSentTime: Timestamp of the last email sent with this order
9540	// document.
9541	LastSentTime string `json:"lastSentTime,omitempty"`
9542
9543	// OrderId: ID of the order from which this order document is created.
9544	OrderId int64 `json:"orderId,omitempty,string"`
9545
9546	// ProjectId: Project ID of this order document.
9547	ProjectId int64 `json:"projectId,omitempty,string"`
9548
9549	// Signed: Whether this order document has been signed.
9550	Signed bool `json:"signed,omitempty"`
9551
9552	// SubaccountId: Subaccount ID of this order document.
9553	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9554
9555	// Title: Title of this order document.
9556	Title string `json:"title,omitempty"`
9557
9558	// Type: Type of this order document
9559	//
9560	// Possible values:
9561	//   "PLANNING_ORDER_TYPE_CHANGE_ORDER"
9562	//   "PLANNING_ORDER_TYPE_INSERTION_ORDER"
9563	Type string `json:"type,omitempty"`
9564
9565	// ServerResponse contains the HTTP response code and headers from the
9566	// server.
9567	googleapi.ServerResponse `json:"-"`
9568
9569	// ForceSendFields is a list of field names (e.g. "AccountId") to
9570	// unconditionally include in API requests. By default, fields with
9571	// empty values are omitted from API requests. However, any non-pointer,
9572	// non-interface field appearing in ForceSendFields will be sent to the
9573	// server regardless of whether the field is empty or not. This may be
9574	// used to include empty fields in Patch requests.
9575	ForceSendFields []string `json:"-"`
9576
9577	// NullFields is a list of field names (e.g. "AccountId") to include in
9578	// API requests with the JSON null value. By default, fields with empty
9579	// values are omitted from API requests. However, any field with an
9580	// empty value appearing in NullFields will be sent to the server as
9581	// null. It is an error if a field in this list has a non-empty value.
9582	// This may be used to include null fields in Patch requests.
9583	NullFields []string `json:"-"`
9584}
9585
9586func (s *OrderDocument) MarshalJSON() ([]byte, error) {
9587	type NoMethod OrderDocument
9588	raw := NoMethod(*s)
9589	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9590}
9591
9592// OrderDocumentsListResponse: Order document List Response
9593type OrderDocumentsListResponse struct {
9594	// Kind: Identifies what kind of resource this is. Value: the fixed
9595	// string "dfareporting#orderDocumentsListResponse".
9596	Kind string `json:"kind,omitempty"`
9597
9598	// NextPageToken: Pagination token to be used for the next list
9599	// operation.
9600	NextPageToken string `json:"nextPageToken,omitempty"`
9601
9602	// OrderDocuments: Order document collection
9603	OrderDocuments []*OrderDocument `json:"orderDocuments,omitempty"`
9604
9605	// ServerResponse contains the HTTP response code and headers from the
9606	// server.
9607	googleapi.ServerResponse `json:"-"`
9608
9609	// ForceSendFields is a list of field names (e.g. "Kind") to
9610	// unconditionally include in API requests. By default, fields with
9611	// empty values are omitted from API requests. However, any non-pointer,
9612	// non-interface field appearing in ForceSendFields will be sent to the
9613	// server regardless of whether the field is empty or not. This may be
9614	// used to include empty fields in Patch requests.
9615	ForceSendFields []string `json:"-"`
9616
9617	// NullFields is a list of field names (e.g. "Kind") to include in API
9618	// requests with the JSON null value. By default, fields with empty
9619	// values are omitted from API requests. However, any field with an
9620	// empty value appearing in NullFields will be sent to the server as
9621	// null. It is an error if a field in this list has a non-empty value.
9622	// This may be used to include null fields in Patch requests.
9623	NullFields []string `json:"-"`
9624}
9625
9626func (s *OrderDocumentsListResponse) MarshalJSON() ([]byte, error) {
9627	type NoMethod OrderDocumentsListResponse
9628	raw := NoMethod(*s)
9629	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9630}
9631
9632// OrdersListResponse: Order List Response
9633type OrdersListResponse struct {
9634	// Kind: Identifies what kind of resource this is. Value: the fixed
9635	// string "dfareporting#ordersListResponse".
9636	Kind string `json:"kind,omitempty"`
9637
9638	// NextPageToken: Pagination token to be used for the next list
9639	// operation.
9640	NextPageToken string `json:"nextPageToken,omitempty"`
9641
9642	// Orders: Order collection.
9643	Orders []*Order `json:"orders,omitempty"`
9644
9645	// ServerResponse contains the HTTP response code and headers from the
9646	// server.
9647	googleapi.ServerResponse `json:"-"`
9648
9649	// ForceSendFields is a list of field names (e.g. "Kind") to
9650	// unconditionally include in API requests. By default, fields with
9651	// empty values are omitted from API requests. However, any non-pointer,
9652	// non-interface field appearing in ForceSendFields will be sent to the
9653	// server regardless of whether the field is empty or not. This may be
9654	// used to include empty fields in Patch requests.
9655	ForceSendFields []string `json:"-"`
9656
9657	// NullFields is a list of field names (e.g. "Kind") to include in API
9658	// requests with the JSON null value. By default, fields with empty
9659	// values are omitted from API requests. However, any field with an
9660	// empty value appearing in NullFields will be sent to the server as
9661	// null. It is an error if a field in this list has a non-empty value.
9662	// This may be used to include null fields in Patch requests.
9663	NullFields []string `json:"-"`
9664}
9665
9666func (s *OrdersListResponse) MarshalJSON() ([]byte, error) {
9667	type NoMethod OrdersListResponse
9668	raw := NoMethod(*s)
9669	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9670}
9671
9672// PathToConversionReportCompatibleFields: Represents fields that are
9673// compatible to be selected for a report of type "PATH_TO_CONVERSION".
9674type PathToConversionReportCompatibleFields struct {
9675	// ConversionDimensions: Conversion dimensions which are compatible to
9676	// be selected in the "conversionDimensions" section of the report.
9677	ConversionDimensions []*Dimension `json:"conversionDimensions,omitempty"`
9678
9679	// CustomFloodlightVariables: Custom floodlight variables which are
9680	// compatible to be selected in the "customFloodlightVariables" section
9681	// of the report.
9682	CustomFloodlightVariables []*Dimension `json:"customFloodlightVariables,omitempty"`
9683
9684	// Kind: The kind of resource this is, in this case
9685	// dfareporting#pathToConversionReportCompatibleFields.
9686	Kind string `json:"kind,omitempty"`
9687
9688	// Metrics: Metrics which are compatible to be selected in the
9689	// "metricNames" section of the report.
9690	Metrics []*Metric `json:"metrics,omitempty"`
9691
9692	// PerInteractionDimensions: Per-interaction dimensions which are
9693	// compatible to be selected in the "perInteractionDimensions" section
9694	// of the report.
9695	PerInteractionDimensions []*Dimension `json:"perInteractionDimensions,omitempty"`
9696
9697	// ForceSendFields is a list of field names (e.g.
9698	// "ConversionDimensions") to unconditionally include in API requests.
9699	// By default, fields with empty values are omitted from API requests.
9700	// However, any non-pointer, non-interface field appearing in
9701	// ForceSendFields will be sent to the server regardless of whether the
9702	// field is empty or not. This may be used to include empty fields in
9703	// Patch requests.
9704	ForceSendFields []string `json:"-"`
9705
9706	// NullFields is a list of field names (e.g. "ConversionDimensions") to
9707	// include in API requests with the JSON null value. By default, fields
9708	// with empty values are omitted from API requests. However, any field
9709	// with an empty value appearing in NullFields will be sent to the
9710	// server as null. It is an error if a field in this list has a
9711	// non-empty value. This may be used to include null fields in Patch
9712	// requests.
9713	NullFields []string `json:"-"`
9714}
9715
9716func (s *PathToConversionReportCompatibleFields) MarshalJSON() ([]byte, error) {
9717	type NoMethod PathToConversionReportCompatibleFields
9718	raw := NoMethod(*s)
9719	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9720}
9721
9722// Placement: Contains properties of a placement.
9723type Placement struct {
9724	// AccountId: Account ID of this placement. This field can be left
9725	// blank.
9726	AccountId int64 `json:"accountId,omitempty,string"`
9727
9728	// AdBlockingOptOut: Whether this placement opts out of ad blocking.
9729	// When true, ad blocking is disabled for this placement. When false,
9730	// the campaign and site settings take effect.
9731	AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
9732
9733	// AdditionalSizes: Additional sizes associated with this placement.
9734	// When inserting or updating a placement, only the size ID field is
9735	// used.
9736	AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
9737
9738	// AdvertiserId: Advertiser ID of this placement. This field can be left
9739	// blank.
9740	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9741
9742	// AdvertiserIdDimensionValue: Dimension value for the ID of the
9743	// advertiser. This is a read-only, auto-generated field.
9744	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
9745
9746	// Archived: Whether this placement is archived.
9747	Archived bool `json:"archived,omitempty"`
9748
9749	// CampaignId: Campaign ID of this placement. This field is a required
9750	// field on insertion.
9751	CampaignId int64 `json:"campaignId,omitempty,string"`
9752
9753	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
9754	// This is a read-only, auto-generated field.
9755	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
9756
9757	// Comment: Comments for this placement.
9758	Comment string `json:"comment,omitempty"`
9759
9760	// Compatibility: Placement compatibility. DISPLAY and
9761	// DISPLAY_INTERSTITIAL refer to rendering on desktop, on mobile devices
9762	// or in mobile apps for regular or interstitial ads respectively. APP
9763	// and APP_INTERSTITIAL are no longer allowed for new placement
9764	// insertions. Instead, use DISPLAY or DISPLAY_INTERSTITIAL.
9765	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
9766	// with the VAST standard. This field is required on insertion.
9767	//
9768	// Possible values:
9769	//   "APP"
9770	//   "APP_INTERSTITIAL"
9771	//   "DISPLAY"
9772	//   "DISPLAY_INTERSTITIAL"
9773	//   "IN_STREAM_AUDIO"
9774	//   "IN_STREAM_VIDEO"
9775	Compatibility string `json:"compatibility,omitempty"`
9776
9777	// ContentCategoryId: ID of the content category assigned to this
9778	// placement.
9779	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
9780
9781	// CreateInfo: Information about the creation of this placement. This is
9782	// a read-only field.
9783	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
9784
9785	// DirectorySiteId: Directory site ID of this placement. On insert, you
9786	// must set either this field or the siteId field to specify the site
9787	// associated with this placement. This is a required field that is
9788	// read-only after insertion.
9789	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
9790
9791	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
9792	// directory site. This is a read-only, auto-generated field.
9793	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
9794
9795	// ExternalId: External ID for this placement.
9796	ExternalId string `json:"externalId,omitempty"`
9797
9798	// Id: ID of this placement. This is a read-only, auto-generated field.
9799	Id int64 `json:"id,omitempty,string"`
9800
9801	// IdDimensionValue: Dimension value for the ID of this placement. This
9802	// is a read-only, auto-generated field.
9803	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
9804
9805	// KeyName: Key name of this placement. This is a read-only,
9806	// auto-generated field.
9807	KeyName string `json:"keyName,omitempty"`
9808
9809	// Kind: Identifies what kind of resource this is. Value: the fixed
9810	// string "dfareporting#placement".
9811	Kind string `json:"kind,omitempty"`
9812
9813	// LastModifiedInfo: Information about the most recent modification of
9814	// this placement. This is a read-only field.
9815	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9816
9817	// LookbackConfiguration: Lookback window settings for this placement.
9818	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
9819
9820	// Name: Name of this placement.This is a required field and must be
9821	// less than 256 characters long.
9822	Name string `json:"name,omitempty"`
9823
9824	// PaymentApproved: Whether payment was approved for this placement.
9825	// This is a read-only field relevant only to publisher-paid placements.
9826	PaymentApproved bool `json:"paymentApproved,omitempty"`
9827
9828	// PaymentSource: Payment source for this placement. This is a required
9829	// field that is read-only after insertion.
9830	//
9831	// Possible values:
9832	//   "PLACEMENT_AGENCY_PAID"
9833	//   "PLACEMENT_PUBLISHER_PAID"
9834	PaymentSource string `json:"paymentSource,omitempty"`
9835
9836	// PlacementGroupId: ID of this placement's group, if applicable.
9837	PlacementGroupId int64 `json:"placementGroupId,omitempty,string"`
9838
9839	// PlacementGroupIdDimensionValue: Dimension value for the ID of the
9840	// placement group. This is a read-only, auto-generated field.
9841	PlacementGroupIdDimensionValue *DimensionValue `json:"placementGroupIdDimensionValue,omitempty"`
9842
9843	// PlacementStrategyId: ID of the placement strategy assigned to this
9844	// placement.
9845	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
9846
9847	// PricingSchedule: Pricing schedule of this placement. This field is
9848	// required on insertion, specifically subfields startDate, endDate and
9849	// pricingType.
9850	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
9851
9852	// Primary: Whether this placement is the primary placement of a
9853	// roadblock (placement group). You cannot change this field from true
9854	// to false. Setting this field to true will automatically set the
9855	// primary field on the original primary placement of the roadblock to
9856	// false, and it will automatically set the roadblock's
9857	// primaryPlacementId field to the ID of this placement.
9858	Primary bool `json:"primary,omitempty"`
9859
9860	// PublisherUpdateInfo: Information about the last publisher update.
9861	// This is a read-only field.
9862	PublisherUpdateInfo *LastModifiedInfo `json:"publisherUpdateInfo,omitempty"`
9863
9864	// SiteId: Site ID associated with this placement. On insert, you must
9865	// set either this field or the directorySiteId field to specify the
9866	// site associated with this placement. This is a required field that is
9867	// read-only after insertion.
9868	SiteId int64 `json:"siteId,omitempty,string"`
9869
9870	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
9871	// a read-only, auto-generated field.
9872	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
9873
9874	// Size: Size associated with this placement. When inserting or updating
9875	// a placement, only the size ID field is used. This field is required
9876	// on insertion.
9877	Size *Size `json:"size,omitempty"`
9878
9879	// SslRequired: Whether creatives assigned to this placement must be
9880	// SSL-compliant.
9881	SslRequired bool `json:"sslRequired,omitempty"`
9882
9883	// Status: Third-party placement status.
9884	//
9885	// Possible values:
9886	//   "ACKNOWLEDGE_ACCEPTANCE"
9887	//   "ACKNOWLEDGE_REJECTION"
9888	//   "DRAFT"
9889	//   "PAYMENT_ACCEPTED"
9890	//   "PAYMENT_REJECTED"
9891	//   "PENDING_REVIEW"
9892	Status string `json:"status,omitempty"`
9893
9894	// SubaccountId: Subaccount ID of this placement. This field can be left
9895	// blank.
9896	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9897
9898	// TagFormats: Tag formats to generate for this placement. This field is
9899	// required on insertion.
9900	// Acceptable values are:
9901	// - "PLACEMENT_TAG_STANDARD"
9902	// - "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
9903	// - "PLACEMENT_TAG_IFRAME_ILAYER"
9904	// - "PLACEMENT_TAG_INTERNAL_REDIRECT"
9905	// - "PLACEMENT_TAG_JAVASCRIPT"
9906	// - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
9907	// - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
9908	// - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
9909	// - "PLACEMENT_TAG_CLICK_COMMANDS"
9910	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
9911	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
9912	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
9913	// - "PLACEMENT_TAG_TRACKING"
9914	// - "PLACEMENT_TAG_TRACKING_IFRAME"
9915	// - "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
9916	//
9917	// Possible values:
9918	//   "PLACEMENT_TAG_CLICK_COMMANDS"
9919	//   "PLACEMENT_TAG_IFRAME_ILAYER"
9920	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
9921	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
9922	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
9923	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
9924	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
9925	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
9926	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
9927	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
9928	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
9929	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
9930	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
9931	//   "PLACEMENT_TAG_JAVASCRIPT"
9932	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
9933	//   "PLACEMENT_TAG_STANDARD"
9934	//   "PLACEMENT_TAG_TRACKING"
9935	//   "PLACEMENT_TAG_TRACKING_IFRAME"
9936	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
9937	TagFormats []string `json:"tagFormats,omitempty"`
9938
9939	// TagSetting: Tag settings for this placement.
9940	TagSetting *TagSetting `json:"tagSetting,omitempty"`
9941
9942	// VideoActiveViewOptOut: Whether Verification and ActiveView are
9943	// disabled for in-stream video creatives for this placement. The same
9944	// setting videoActiveViewOptOut exists on the site level -- the opt out
9945	// occurs if either of these settings are true. These settings are
9946	// distinct from DirectorySites.settings.activeViewOptOut or
9947	// Sites.siteSettings.activeViewOptOut which only apply to display ads.
9948	// However, Accounts.activeViewOptOut opts out both video traffic, as
9949	// well as display ads, from Verification and ActiveView.
9950	VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"`
9951
9952	// VideoSettings: A collection of settings which affect video creatives
9953	// served through this placement. Applicable to placements with
9954	// IN_STREAM_VIDEO compatibility.
9955	VideoSettings *VideoSettings `json:"videoSettings,omitempty"`
9956
9957	// VpaidAdapterChoice: VPAID adapter setting for this placement.
9958	// Controls which VPAID format the measurement adapter will use for
9959	// in-stream video creatives assigned to this placement.
9960	//
9961	// Note: Flash is no longer supported. This field now defaults to HTML5
9962	// when the following values are provided: FLASH, BOTH.
9963	//
9964	// Possible values:
9965	//   "BOTH"
9966	//   "DEFAULT"
9967	//   "FLASH"
9968	//   "HTML5"
9969	VpaidAdapterChoice string `json:"vpaidAdapterChoice,omitempty"`
9970
9971	// ServerResponse contains the HTTP response code and headers from the
9972	// server.
9973	googleapi.ServerResponse `json:"-"`
9974
9975	// ForceSendFields is a list of field names (e.g. "AccountId") to
9976	// unconditionally include in API requests. By default, fields with
9977	// empty values are omitted from API requests. However, any non-pointer,
9978	// non-interface field appearing in ForceSendFields will be sent to the
9979	// server regardless of whether the field is empty or not. This may be
9980	// used to include empty fields in Patch requests.
9981	ForceSendFields []string `json:"-"`
9982
9983	// NullFields is a list of field names (e.g. "AccountId") to include in
9984	// API requests with the JSON null value. By default, fields with empty
9985	// values are omitted from API requests. However, any field with an
9986	// empty value appearing in NullFields will be sent to the server as
9987	// null. It is an error if a field in this list has a non-empty value.
9988	// This may be used to include null fields in Patch requests.
9989	NullFields []string `json:"-"`
9990}
9991
9992func (s *Placement) MarshalJSON() ([]byte, error) {
9993	type NoMethod Placement
9994	raw := NoMethod(*s)
9995	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9996}
9997
9998// PlacementAssignment: Placement Assignment.
9999type PlacementAssignment struct {
10000	// Active: Whether this placement assignment is active. When true, the
10001	// placement will be included in the ad's rotation.
10002	Active bool `json:"active,omitempty"`
10003
10004	// PlacementId: ID of the placement to be assigned. This is a required
10005	// field.
10006	PlacementId int64 `json:"placementId,omitempty,string"`
10007
10008	// PlacementIdDimensionValue: Dimension value for the ID of the
10009	// placement. This is a read-only, auto-generated field.
10010	PlacementIdDimensionValue *DimensionValue `json:"placementIdDimensionValue,omitempty"`
10011
10012	// SslRequired: Whether the placement to be assigned requires SSL. This
10013	// is a read-only field that is auto-generated when the ad is inserted
10014	// or updated.
10015	SslRequired bool `json:"sslRequired,omitempty"`
10016
10017	// ForceSendFields is a list of field names (e.g. "Active") to
10018	// unconditionally include in API requests. By default, fields with
10019	// empty values are omitted from API requests. However, any non-pointer,
10020	// non-interface field appearing in ForceSendFields will be sent to the
10021	// server regardless of whether the field is empty or not. This may be
10022	// used to include empty fields in Patch requests.
10023	ForceSendFields []string `json:"-"`
10024
10025	// NullFields is a list of field names (e.g. "Active") to include in API
10026	// requests with the JSON null value. By default, fields with empty
10027	// values are omitted from API requests. However, any field with an
10028	// empty value appearing in NullFields will be sent to the server as
10029	// null. It is an error if a field in this list has a non-empty value.
10030	// This may be used to include null fields in Patch requests.
10031	NullFields []string `json:"-"`
10032}
10033
10034func (s *PlacementAssignment) MarshalJSON() ([]byte, error) {
10035	type NoMethod PlacementAssignment
10036	raw := NoMethod(*s)
10037	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10038}
10039
10040// PlacementGroup: Contains properties of a package or roadblock.
10041type PlacementGroup struct {
10042	// AccountId: Account ID of this placement group. This is a read-only
10043	// field that can be left blank.
10044	AccountId int64 `json:"accountId,omitempty,string"`
10045
10046	// AdvertiserId: Advertiser ID of this placement group. This is a
10047	// required field on insertion.
10048	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10049
10050	// AdvertiserIdDimensionValue: Dimension value for the ID of the
10051	// advertiser. This is a read-only, auto-generated field.
10052	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
10053
10054	// Archived: Whether this placement group is archived.
10055	Archived bool `json:"archived,omitempty"`
10056
10057	// CampaignId: Campaign ID of this placement group. This field is
10058	// required on insertion.
10059	CampaignId int64 `json:"campaignId,omitempty,string"`
10060
10061	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
10062	// This is a read-only, auto-generated field.
10063	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
10064
10065	// ChildPlacementIds: IDs of placements which are assigned to this
10066	// placement group. This is a read-only, auto-generated field.
10067	ChildPlacementIds googleapi.Int64s `json:"childPlacementIds,omitempty"`
10068
10069	// Comment: Comments for this placement group.
10070	Comment string `json:"comment,omitempty"`
10071
10072	// ContentCategoryId: ID of the content category assigned to this
10073	// placement group.
10074	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
10075
10076	// CreateInfo: Information about the creation of this placement group.
10077	// This is a read-only field.
10078	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
10079
10080	// DirectorySiteId: Directory site ID associated with this placement
10081	// group. On insert, you must set either this field or the site_id field
10082	// to specify the site associated with this placement group. This is a
10083	// required field that is read-only after insertion.
10084	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
10085
10086	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
10087	// directory site. This is a read-only, auto-generated field.
10088	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
10089
10090	// ExternalId: External ID for this placement.
10091	ExternalId string `json:"externalId,omitempty"`
10092
10093	// Id: ID of this placement group. This is a read-only, auto-generated
10094	// field.
10095	Id int64 `json:"id,omitempty,string"`
10096
10097	// IdDimensionValue: Dimension value for the ID of this placement group.
10098	// This is a read-only, auto-generated field.
10099	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
10100
10101	// Kind: Identifies what kind of resource this is. Value: the fixed
10102	// string "dfareporting#placementGroup".
10103	Kind string `json:"kind,omitempty"`
10104
10105	// LastModifiedInfo: Information about the most recent modification of
10106	// this placement group. This is a read-only field.
10107	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10108
10109	// Name: Name of this placement group. This is a required field and must
10110	// be less than 256 characters long.
10111	Name string `json:"name,omitempty"`
10112
10113	// PlacementGroupType: Type of this placement group. A package is a
10114	// simple group of placements that acts as a single pricing point for a
10115	// group of tags. A roadblock is a group of placements that not only
10116	// acts as a single pricing point, but also assumes that all the tags in
10117	// it will be served at the same time. A roadblock requires one of its
10118	// assigned placements to be marked as primary for reporting. This field
10119	// is required on insertion.
10120	//
10121	// Possible values:
10122	//   "PLACEMENT_PACKAGE"
10123	//   "PLACEMENT_ROADBLOCK"
10124	PlacementGroupType string `json:"placementGroupType,omitempty"`
10125
10126	// PlacementStrategyId: ID of the placement strategy assigned to this
10127	// placement group.
10128	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
10129
10130	// PricingSchedule: Pricing schedule of this placement group. This field
10131	// is required on insertion.
10132	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
10133
10134	// PrimaryPlacementId: ID of the primary placement, used to calculate
10135	// the media cost of a roadblock (placement group). Modifying this field
10136	// will automatically modify the primary field on all affected roadblock
10137	// child placements.
10138	PrimaryPlacementId int64 `json:"primaryPlacementId,omitempty,string"`
10139
10140	// PrimaryPlacementIdDimensionValue: Dimension value for the ID of the
10141	// primary placement. This is a read-only, auto-generated field.
10142	PrimaryPlacementIdDimensionValue *DimensionValue `json:"primaryPlacementIdDimensionValue,omitempty"`
10143
10144	// SiteId: Site ID associated with this placement group. On insert, you
10145	// must set either this field or the directorySiteId field to specify
10146	// the site associated with this placement group. This is a required
10147	// field that is read-only after insertion.
10148	SiteId int64 `json:"siteId,omitempty,string"`
10149
10150	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
10151	// a read-only, auto-generated field.
10152	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
10153
10154	// SubaccountId: Subaccount ID of this placement group. This is a
10155	// read-only field that can be left blank.
10156	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10157
10158	// ServerResponse contains the HTTP response code and headers from the
10159	// server.
10160	googleapi.ServerResponse `json:"-"`
10161
10162	// ForceSendFields is a list of field names (e.g. "AccountId") to
10163	// unconditionally include in API requests. By default, fields with
10164	// empty values are omitted from API requests. However, any non-pointer,
10165	// non-interface field appearing in ForceSendFields will be sent to the
10166	// server regardless of whether the field is empty or not. This may be
10167	// used to include empty fields in Patch requests.
10168	ForceSendFields []string `json:"-"`
10169
10170	// NullFields is a list of field names (e.g. "AccountId") to include in
10171	// API requests with the JSON null value. By default, fields with empty
10172	// values are omitted from API requests. However, any field with an
10173	// empty value appearing in NullFields will be sent to the server as
10174	// null. It is an error if a field in this list has a non-empty value.
10175	// This may be used to include null fields in Patch requests.
10176	NullFields []string `json:"-"`
10177}
10178
10179func (s *PlacementGroup) MarshalJSON() ([]byte, error) {
10180	type NoMethod PlacementGroup
10181	raw := NoMethod(*s)
10182	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10183}
10184
10185// PlacementGroupsListResponse: Placement Group List Response
10186type PlacementGroupsListResponse struct {
10187	// Kind: Identifies what kind of resource this is. Value: the fixed
10188	// string "dfareporting#placementGroupsListResponse".
10189	Kind string `json:"kind,omitempty"`
10190
10191	// NextPageToken: Pagination token to be used for the next list
10192	// operation.
10193	NextPageToken string `json:"nextPageToken,omitempty"`
10194
10195	// PlacementGroups: Placement group collection.
10196	PlacementGroups []*PlacementGroup `json:"placementGroups,omitempty"`
10197
10198	// ServerResponse contains the HTTP response code and headers from the
10199	// server.
10200	googleapi.ServerResponse `json:"-"`
10201
10202	// ForceSendFields is a list of field names (e.g. "Kind") to
10203	// unconditionally include in API requests. By default, fields with
10204	// empty values are omitted from API requests. However, any non-pointer,
10205	// non-interface field appearing in ForceSendFields will be sent to the
10206	// server regardless of whether the field is empty or not. This may be
10207	// used to include empty fields in Patch requests.
10208	ForceSendFields []string `json:"-"`
10209
10210	// NullFields is a list of field names (e.g. "Kind") to include in API
10211	// requests with the JSON null value. By default, fields with empty
10212	// values are omitted from API requests. However, any field with an
10213	// empty value appearing in NullFields will be sent to the server as
10214	// null. It is an error if a field in this list has a non-empty value.
10215	// This may be used to include null fields in Patch requests.
10216	NullFields []string `json:"-"`
10217}
10218
10219func (s *PlacementGroupsListResponse) MarshalJSON() ([]byte, error) {
10220	type NoMethod PlacementGroupsListResponse
10221	raw := NoMethod(*s)
10222	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10223}
10224
10225// PlacementStrategiesListResponse: Placement Strategy List Response
10226type PlacementStrategiesListResponse struct {
10227	// Kind: Identifies what kind of resource this is. Value: the fixed
10228	// string "dfareporting#placementStrategiesListResponse".
10229	Kind string `json:"kind,omitempty"`
10230
10231	// NextPageToken: Pagination token to be used for the next list
10232	// operation.
10233	NextPageToken string `json:"nextPageToken,omitempty"`
10234
10235	// PlacementStrategies: Placement strategy collection.
10236	PlacementStrategies []*PlacementStrategy `json:"placementStrategies,omitempty"`
10237
10238	// ServerResponse contains the HTTP response code and headers from the
10239	// server.
10240	googleapi.ServerResponse `json:"-"`
10241
10242	// ForceSendFields is a list of field names (e.g. "Kind") to
10243	// unconditionally include in API requests. By default, fields with
10244	// empty values are omitted from API requests. However, any non-pointer,
10245	// non-interface field appearing in ForceSendFields will be sent to the
10246	// server regardless of whether the field is empty or not. This may be
10247	// used to include empty fields in Patch requests.
10248	ForceSendFields []string `json:"-"`
10249
10250	// NullFields is a list of field names (e.g. "Kind") to include in API
10251	// requests with the JSON null value. By default, fields with empty
10252	// values are omitted from API requests. However, any field with an
10253	// empty value appearing in NullFields will be sent to the server as
10254	// null. It is an error if a field in this list has a non-empty value.
10255	// This may be used to include null fields in Patch requests.
10256	NullFields []string `json:"-"`
10257}
10258
10259func (s *PlacementStrategiesListResponse) MarshalJSON() ([]byte, error) {
10260	type NoMethod PlacementStrategiesListResponse
10261	raw := NoMethod(*s)
10262	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10263}
10264
10265// PlacementStrategy: Contains properties of a placement strategy.
10266type PlacementStrategy struct {
10267	// AccountId: Account ID of this placement strategy.This is a read-only
10268	// field that can be left blank.
10269	AccountId int64 `json:"accountId,omitempty,string"`
10270
10271	// Id: ID of this placement strategy. This is a read-only,
10272	// auto-generated field.
10273	Id int64 `json:"id,omitempty,string"`
10274
10275	// Kind: Identifies what kind of resource this is. Value: the fixed
10276	// string "dfareporting#placementStrategy".
10277	Kind string `json:"kind,omitempty"`
10278
10279	// Name: Name of this placement strategy. This is a required field. It
10280	// must be less than 256 characters long and unique among placement
10281	// strategies of the same account.
10282	Name string `json:"name,omitempty"`
10283
10284	// ServerResponse contains the HTTP response code and headers from the
10285	// server.
10286	googleapi.ServerResponse `json:"-"`
10287
10288	// ForceSendFields is a list of field names (e.g. "AccountId") to
10289	// unconditionally include in API requests. By default, fields with
10290	// empty values are omitted from API requests. However, any non-pointer,
10291	// non-interface field appearing in ForceSendFields will be sent to the
10292	// server regardless of whether the field is empty or not. This may be
10293	// used to include empty fields in Patch requests.
10294	ForceSendFields []string `json:"-"`
10295
10296	// NullFields is a list of field names (e.g. "AccountId") to include in
10297	// API requests with the JSON null value. By default, fields with empty
10298	// values are omitted from API requests. However, any field with an
10299	// empty value appearing in NullFields will be sent to the server as
10300	// null. It is an error if a field in this list has a non-empty value.
10301	// This may be used to include null fields in Patch requests.
10302	NullFields []string `json:"-"`
10303}
10304
10305func (s *PlacementStrategy) MarshalJSON() ([]byte, error) {
10306	type NoMethod PlacementStrategy
10307	raw := NoMethod(*s)
10308	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10309}
10310
10311// PlacementTag: Placement Tag
10312type PlacementTag struct {
10313	// PlacementId: Placement ID
10314	PlacementId int64 `json:"placementId,omitempty,string"`
10315
10316	// TagDatas: Tags generated for this placement.
10317	TagDatas []*TagData `json:"tagDatas,omitempty"`
10318
10319	// ForceSendFields is a list of field names (e.g. "PlacementId") to
10320	// unconditionally include in API requests. By default, fields with
10321	// empty values are omitted from API requests. However, any non-pointer,
10322	// non-interface field appearing in ForceSendFields will be sent to the
10323	// server regardless of whether the field is empty or not. This may be
10324	// used to include empty fields in Patch requests.
10325	ForceSendFields []string `json:"-"`
10326
10327	// NullFields is a list of field names (e.g. "PlacementId") to include
10328	// in API requests with the JSON null value. By default, fields with
10329	// empty values are omitted from API requests. However, any field with
10330	// an empty value appearing in NullFields will be sent to the server as
10331	// null. It is an error if a field in this list has a non-empty value.
10332	// This may be used to include null fields in Patch requests.
10333	NullFields []string `json:"-"`
10334}
10335
10336func (s *PlacementTag) MarshalJSON() ([]byte, error) {
10337	type NoMethod PlacementTag
10338	raw := NoMethod(*s)
10339	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10340}
10341
10342// PlacementsGenerateTagsResponse: Placement GenerateTags Response
10343type PlacementsGenerateTagsResponse struct {
10344	// Kind: Identifies what kind of resource this is. Value: the fixed
10345	// string "dfareporting#placementsGenerateTagsResponse".
10346	Kind string `json:"kind,omitempty"`
10347
10348	// PlacementTags: Set of generated tags for the specified placements.
10349	PlacementTags []*PlacementTag `json:"placementTags,omitempty"`
10350
10351	// ServerResponse contains the HTTP response code and headers from the
10352	// server.
10353	googleapi.ServerResponse `json:"-"`
10354
10355	// ForceSendFields is a list of field names (e.g. "Kind") to
10356	// unconditionally include in API requests. By default, fields with
10357	// empty values are omitted from API requests. However, any non-pointer,
10358	// non-interface field appearing in ForceSendFields will be sent to the
10359	// server regardless of whether the field is empty or not. This may be
10360	// used to include empty fields in Patch requests.
10361	ForceSendFields []string `json:"-"`
10362
10363	// NullFields is a list of field names (e.g. "Kind") to include in API
10364	// requests with the JSON null value. By default, fields with empty
10365	// values are omitted from API requests. However, any field with an
10366	// empty value appearing in NullFields will be sent to the server as
10367	// null. It is an error if a field in this list has a non-empty value.
10368	// This may be used to include null fields in Patch requests.
10369	NullFields []string `json:"-"`
10370}
10371
10372func (s *PlacementsGenerateTagsResponse) MarshalJSON() ([]byte, error) {
10373	type NoMethod PlacementsGenerateTagsResponse
10374	raw := NoMethod(*s)
10375	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10376}
10377
10378// PlacementsListResponse: Placement List Response
10379type PlacementsListResponse struct {
10380	// Kind: Identifies what kind of resource this is. Value: the fixed
10381	// string "dfareporting#placementsListResponse".
10382	Kind string `json:"kind,omitempty"`
10383
10384	// NextPageToken: Pagination token to be used for the next list
10385	// operation.
10386	NextPageToken string `json:"nextPageToken,omitempty"`
10387
10388	// Placements: Placement collection.
10389	Placements []*Placement `json:"placements,omitempty"`
10390
10391	// ServerResponse contains the HTTP response code and headers from the
10392	// server.
10393	googleapi.ServerResponse `json:"-"`
10394
10395	// ForceSendFields is a list of field names (e.g. "Kind") to
10396	// unconditionally include in API requests. By default, fields with
10397	// empty values are omitted from API requests. However, any non-pointer,
10398	// non-interface field appearing in ForceSendFields will be sent to the
10399	// server regardless of whether the field is empty or not. This may be
10400	// used to include empty fields in Patch requests.
10401	ForceSendFields []string `json:"-"`
10402
10403	// NullFields is a list of field names (e.g. "Kind") to include in API
10404	// requests with the JSON null value. By default, fields with empty
10405	// values are omitted from API requests. However, any field with an
10406	// empty value appearing in NullFields will be sent to the server as
10407	// null. It is an error if a field in this list has a non-empty value.
10408	// This may be used to include null fields in Patch requests.
10409	NullFields []string `json:"-"`
10410}
10411
10412func (s *PlacementsListResponse) MarshalJSON() ([]byte, error) {
10413	type NoMethod PlacementsListResponse
10414	raw := NoMethod(*s)
10415	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10416}
10417
10418// PlatformType: Contains information about a platform type that can be
10419// targeted by ads.
10420type PlatformType struct {
10421	// Id: ID of this platform type.
10422	Id int64 `json:"id,omitempty,string"`
10423
10424	// Kind: Identifies what kind of resource this is. Value: the fixed
10425	// string "dfareporting#platformType".
10426	Kind string `json:"kind,omitempty"`
10427
10428	// Name: Name of this platform type.
10429	Name string `json:"name,omitempty"`
10430
10431	// ServerResponse contains the HTTP response code and headers from the
10432	// server.
10433	googleapi.ServerResponse `json:"-"`
10434
10435	// ForceSendFields is a list of field names (e.g. "Id") to
10436	// unconditionally include in API requests. By default, fields with
10437	// empty values are omitted from API requests. However, any non-pointer,
10438	// non-interface field appearing in ForceSendFields will be sent to the
10439	// server regardless of whether the field is empty or not. This may be
10440	// used to include empty fields in Patch requests.
10441	ForceSendFields []string `json:"-"`
10442
10443	// NullFields is a list of field names (e.g. "Id") to include in API
10444	// requests with the JSON null value. By default, fields with empty
10445	// values are omitted from API requests. However, any field with an
10446	// empty value appearing in NullFields will be sent to the server as
10447	// null. It is an error if a field in this list has a non-empty value.
10448	// This may be used to include null fields in Patch requests.
10449	NullFields []string `json:"-"`
10450}
10451
10452func (s *PlatformType) MarshalJSON() ([]byte, error) {
10453	type NoMethod PlatformType
10454	raw := NoMethod(*s)
10455	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10456}
10457
10458// PlatformTypesListResponse: Platform Type List Response
10459type PlatformTypesListResponse struct {
10460	// Kind: Identifies what kind of resource this is. Value: the fixed
10461	// string "dfareporting#platformTypesListResponse".
10462	Kind string `json:"kind,omitempty"`
10463
10464	// PlatformTypes: Platform type collection.
10465	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
10466
10467	// ServerResponse contains the HTTP response code and headers from the
10468	// server.
10469	googleapi.ServerResponse `json:"-"`
10470
10471	// ForceSendFields is a list of field names (e.g. "Kind") to
10472	// unconditionally include in API requests. By default, fields with
10473	// empty values are omitted from API requests. However, any non-pointer,
10474	// non-interface field appearing in ForceSendFields will be sent to the
10475	// server regardless of whether the field is empty or not. This may be
10476	// used to include empty fields in Patch requests.
10477	ForceSendFields []string `json:"-"`
10478
10479	// NullFields is a list of field names (e.g. "Kind") to include in API
10480	// requests with the JSON null value. By default, fields with empty
10481	// values are omitted from API requests. However, any field with an
10482	// empty value appearing in NullFields will be sent to the server as
10483	// null. It is an error if a field in this list has a non-empty value.
10484	// This may be used to include null fields in Patch requests.
10485	NullFields []string `json:"-"`
10486}
10487
10488func (s *PlatformTypesListResponse) MarshalJSON() ([]byte, error) {
10489	type NoMethod PlatformTypesListResponse
10490	raw := NoMethod(*s)
10491	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10492}
10493
10494// PopupWindowProperties: Popup Window Properties.
10495type PopupWindowProperties struct {
10496	// Dimension: Popup dimension for a creative. This is a read-only field.
10497	// Applicable to the following creative types: all RICH_MEDIA and all
10498	// VPAID
10499	Dimension *Size `json:"dimension,omitempty"`
10500
10501	// Offset: Upper-left corner coordinates of the popup window. Applicable
10502	// if positionType is COORDINATES.
10503	Offset *OffsetPosition `json:"offset,omitempty"`
10504
10505	// PositionType: Popup window position either centered or at specific
10506	// coordinate.
10507	//
10508	// Possible values:
10509	//   "CENTER"
10510	//   "COORDINATES"
10511	PositionType string `json:"positionType,omitempty"`
10512
10513	// ShowAddressBar: Whether to display the browser address bar.
10514	ShowAddressBar bool `json:"showAddressBar,omitempty"`
10515
10516	// ShowMenuBar: Whether to display the browser menu bar.
10517	ShowMenuBar bool `json:"showMenuBar,omitempty"`
10518
10519	// ShowScrollBar: Whether to display the browser scroll bar.
10520	ShowScrollBar bool `json:"showScrollBar,omitempty"`
10521
10522	// ShowStatusBar: Whether to display the browser status bar.
10523	ShowStatusBar bool `json:"showStatusBar,omitempty"`
10524
10525	// ShowToolBar: Whether to display the browser tool bar.
10526	ShowToolBar bool `json:"showToolBar,omitempty"`
10527
10528	// Title: Title of popup window.
10529	Title string `json:"title,omitempty"`
10530
10531	// ForceSendFields is a list of field names (e.g. "Dimension") to
10532	// unconditionally include in API requests. By default, fields with
10533	// empty values are omitted from API requests. However, any non-pointer,
10534	// non-interface field appearing in ForceSendFields will be sent to the
10535	// server regardless of whether the field is empty or not. This may be
10536	// used to include empty fields in Patch requests.
10537	ForceSendFields []string `json:"-"`
10538
10539	// NullFields is a list of field names (e.g. "Dimension") to include in
10540	// API requests with the JSON null value. By default, fields with empty
10541	// values are omitted from API requests. However, any field with an
10542	// empty value appearing in NullFields will be sent to the server as
10543	// null. It is an error if a field in this list has a non-empty value.
10544	// This may be used to include null fields in Patch requests.
10545	NullFields []string `json:"-"`
10546}
10547
10548func (s *PopupWindowProperties) MarshalJSON() ([]byte, error) {
10549	type NoMethod PopupWindowProperties
10550	raw := NoMethod(*s)
10551	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10552}
10553
10554// PostalCode: Contains information about a postal code that can be
10555// targeted by ads.
10556type PostalCode struct {
10557	// Code: Postal code. This is equivalent to the id field.
10558	Code string `json:"code,omitempty"`
10559
10560	// CountryCode: Country code of the country to which this postal code
10561	// belongs.
10562	CountryCode string `json:"countryCode,omitempty"`
10563
10564	// CountryDartId: DART ID of the country to which this postal code
10565	// belongs.
10566	CountryDartId int64 `json:"countryDartId,omitempty,string"`
10567
10568	// Id: ID of this postal code.
10569	Id string `json:"id,omitempty"`
10570
10571	// Kind: Identifies what kind of resource this is. Value: the fixed
10572	// string "dfareporting#postalCode".
10573	Kind string `json:"kind,omitempty"`
10574
10575	// ServerResponse contains the HTTP response code and headers from the
10576	// server.
10577	googleapi.ServerResponse `json:"-"`
10578
10579	// ForceSendFields is a list of field names (e.g. "Code") to
10580	// unconditionally include in API requests. By default, fields with
10581	// empty values are omitted from API requests. However, any non-pointer,
10582	// non-interface field appearing in ForceSendFields will be sent to the
10583	// server regardless of whether the field is empty or not. This may be
10584	// used to include empty fields in Patch requests.
10585	ForceSendFields []string `json:"-"`
10586
10587	// NullFields is a list of field names (e.g. "Code") to include in API
10588	// requests with the JSON null value. By default, fields with empty
10589	// values are omitted from API requests. However, any field with an
10590	// empty value appearing in NullFields will be sent to the server as
10591	// null. It is an error if a field in this list has a non-empty value.
10592	// This may be used to include null fields in Patch requests.
10593	NullFields []string `json:"-"`
10594}
10595
10596func (s *PostalCode) MarshalJSON() ([]byte, error) {
10597	type NoMethod PostalCode
10598	raw := NoMethod(*s)
10599	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10600}
10601
10602// PostalCodesListResponse: Postal Code List Response
10603type PostalCodesListResponse struct {
10604	// Kind: Identifies what kind of resource this is. Value: the fixed
10605	// string "dfareporting#postalCodesListResponse".
10606	Kind string `json:"kind,omitempty"`
10607
10608	// PostalCodes: Postal code collection.
10609	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
10610
10611	// ServerResponse contains the HTTP response code and headers from the
10612	// server.
10613	googleapi.ServerResponse `json:"-"`
10614
10615	// ForceSendFields is a list of field names (e.g. "Kind") to
10616	// unconditionally include in API requests. By default, fields with
10617	// empty values are omitted from API requests. However, any non-pointer,
10618	// non-interface field appearing in ForceSendFields will be sent to the
10619	// server regardless of whether the field is empty or not. This may be
10620	// used to include empty fields in Patch requests.
10621	ForceSendFields []string `json:"-"`
10622
10623	// NullFields is a list of field names (e.g. "Kind") to include in API
10624	// requests with the JSON null value. By default, fields with empty
10625	// values are omitted from API requests. However, any field with an
10626	// empty value appearing in NullFields will be sent to the server as
10627	// null. It is an error if a field in this list has a non-empty value.
10628	// This may be used to include null fields in Patch requests.
10629	NullFields []string `json:"-"`
10630}
10631
10632func (s *PostalCodesListResponse) MarshalJSON() ([]byte, error) {
10633	type NoMethod PostalCodesListResponse
10634	raw := NoMethod(*s)
10635	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10636}
10637
10638// Pricing: Pricing Information
10639type Pricing struct {
10640	// CapCostType: Cap cost type of this inventory item.
10641	//
10642	// Possible values:
10643	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_CUMULATIVE"
10644	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_MONTHLY"
10645	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_NONE"
10646	CapCostType string `json:"capCostType,omitempty"`
10647
10648	// EndDate: End date of this inventory item.
10649	EndDate string `json:"endDate,omitempty"`
10650
10651	// Flights: Flights of this inventory item. A flight (a.k.a. pricing
10652	// period) represents the inventory item pricing information for a
10653	// specific period of time.
10654	Flights []*Flight `json:"flights,omitempty"`
10655
10656	// GroupType: Group type of this inventory item if it represents a
10657	// placement group. Is null otherwise. There are two type of placement
10658	// groups: PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE is a simple group of
10659	// inventory items that acts as a single pricing point for a group of
10660	// tags. PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK is a group of inventory
10661	// items that not only acts as a single pricing point, but also assumes
10662	// that all the tags in it will be served at the same time. A roadblock
10663	// requires one of its assigned inventory items to be marked as primary.
10664	//
10665	// Possible values:
10666	//   "PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE"
10667	//   "PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK"
10668	GroupType string `json:"groupType,omitempty"`
10669
10670	// PricingType: Pricing type of this inventory item.
10671	//
10672	// Possible values:
10673	//   "PLANNING_PLACEMENT_PRICING_TYPE_CLICKS"
10674	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPA"
10675	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPC"
10676	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM"
10677	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM_ACTIVEVIEW"
10678	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_CLICKS"
10679	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
10680	//   "PLANNING_PLACEMENT_PRICING_TYPE_IMPRESSIONS"
10681	PricingType string `json:"pricingType,omitempty"`
10682
10683	// StartDate: Start date of this inventory item.
10684	StartDate string `json:"startDate,omitempty"`
10685
10686	// ForceSendFields is a list of field names (e.g. "CapCostType") to
10687	// unconditionally include in API requests. By default, fields with
10688	// empty values are omitted from API requests. However, any non-pointer,
10689	// non-interface field appearing in ForceSendFields will be sent to the
10690	// server regardless of whether the field is empty or not. This may be
10691	// used to include empty fields in Patch requests.
10692	ForceSendFields []string `json:"-"`
10693
10694	// NullFields is a list of field names (e.g. "CapCostType") to include
10695	// in API requests with the JSON null value. By default, fields with
10696	// empty values are omitted from API requests. However, any field with
10697	// an empty value appearing in NullFields will be sent to the server as
10698	// null. It is an error if a field in this list has a non-empty value.
10699	// This may be used to include null fields in Patch requests.
10700	NullFields []string `json:"-"`
10701}
10702
10703func (s *Pricing) MarshalJSON() ([]byte, error) {
10704	type NoMethod Pricing
10705	raw := NoMethod(*s)
10706	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10707}
10708
10709// PricingSchedule: Pricing Schedule
10710type PricingSchedule struct {
10711	// CapCostOption: Placement cap cost option.
10712	//
10713	// Possible values:
10714	//   "CAP_COST_CUMULATIVE"
10715	//   "CAP_COST_MONTHLY"
10716	//   "CAP_COST_NONE"
10717	CapCostOption string `json:"capCostOption,omitempty"`
10718
10719	// DisregardOverdelivery: Whether cap costs are ignored by ad serving.
10720	DisregardOverdelivery bool `json:"disregardOverdelivery,omitempty"`
10721
10722	// EndDate: Placement end date. This date must be later than, or the
10723	// same day as, the placement start date, but not later than the
10724	// campaign end date. If, for example, you set 6/25/2015 as both the
10725	// start and end dates, the effective placement date is just that day
10726	// only, 6/25/2015. The hours, minutes, and seconds of the end date
10727	// should not be set, as doing so will result in an error. This field is
10728	// required on insertion.
10729	EndDate string `json:"endDate,omitempty"`
10730
10731	// Flighted: Whether this placement is flighted. If true, pricing
10732	// periods will be computed automatically.
10733	Flighted bool `json:"flighted,omitempty"`
10734
10735	// FloodlightActivityId: Floodlight activity ID associated with this
10736	// placement. This field should be set when placement pricing type is
10737	// set to PRICING_TYPE_CPA.
10738	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
10739
10740	// PricingPeriods: Pricing periods for this placement.
10741	PricingPeriods []*PricingSchedulePricingPeriod `json:"pricingPeriods,omitempty"`
10742
10743	// PricingType: Placement pricing type. This field is required on
10744	// insertion.
10745	//
10746	// Possible values:
10747	//   "PRICING_TYPE_CPA"
10748	//   "PRICING_TYPE_CPC"
10749	//   "PRICING_TYPE_CPM"
10750	//   "PRICING_TYPE_CPM_ACTIVEVIEW"
10751	//   "PRICING_TYPE_FLAT_RATE_CLICKS"
10752	//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
10753	PricingType string `json:"pricingType,omitempty"`
10754
10755	// StartDate: Placement start date. This date must be later than, or the
10756	// same day as, the campaign start date. The hours, minutes, and seconds
10757	// of the start date should not be set, as doing so will result in an
10758	// error. This field is required on insertion.
10759	StartDate string `json:"startDate,omitempty"`
10760
10761	// TestingStartDate: Testing start date of this placement. The hours,
10762	// minutes, and seconds of the start date should not be set, as doing so
10763	// will result in an error.
10764	TestingStartDate string `json:"testingStartDate,omitempty"`
10765
10766	// ForceSendFields is a list of field names (e.g. "CapCostOption") to
10767	// unconditionally include in API requests. By default, fields with
10768	// empty values are omitted from API requests. However, any non-pointer,
10769	// non-interface field appearing in ForceSendFields will be sent to the
10770	// server regardless of whether the field is empty or not. This may be
10771	// used to include empty fields in Patch requests.
10772	ForceSendFields []string `json:"-"`
10773
10774	// NullFields is a list of field names (e.g. "CapCostOption") to include
10775	// in API requests with the JSON null value. By default, fields with
10776	// empty values are omitted from API requests. However, any field with
10777	// an empty value appearing in NullFields will be sent to the server as
10778	// null. It is an error if a field in this list has a non-empty value.
10779	// This may be used to include null fields in Patch requests.
10780	NullFields []string `json:"-"`
10781}
10782
10783func (s *PricingSchedule) MarshalJSON() ([]byte, error) {
10784	type NoMethod PricingSchedule
10785	raw := NoMethod(*s)
10786	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10787}
10788
10789// PricingSchedulePricingPeriod: Pricing Period
10790type PricingSchedulePricingPeriod struct {
10791	// EndDate: Pricing period end date. This date must be later than, or
10792	// the same day as, the pricing period start date, but not later than
10793	// the placement end date. The period end date can be the same date as
10794	// the period start date. If, for example, you set 6/25/2015 as both the
10795	// start and end dates, the effective pricing period date is just that
10796	// day only, 6/25/2015. The hours, minutes, and seconds of the end date
10797	// should not be set, as doing so will result in an error.
10798	EndDate string `json:"endDate,omitempty"`
10799
10800	// PricingComment: Comments for this pricing period.
10801	PricingComment string `json:"pricingComment,omitempty"`
10802
10803	// RateOrCostNanos: Rate or cost of this pricing period in nanos (i.e.,
10804	// multipled by 1000000000). Acceptable values are 0 to
10805	// 1000000000000000000, inclusive.
10806	RateOrCostNanos int64 `json:"rateOrCostNanos,omitempty,string"`
10807
10808	// StartDate: Pricing period start date. This date must be later than,
10809	// or the same day as, the placement start date. The hours, minutes, and
10810	// seconds of the start date should not be set, as doing so will result
10811	// in an error.
10812	StartDate string `json:"startDate,omitempty"`
10813
10814	// Units: Units of this pricing period. Acceptable values are 0 to
10815	// 10000000000, inclusive.
10816	Units int64 `json:"units,omitempty,string"`
10817
10818	// ForceSendFields is a list of field names (e.g. "EndDate") to
10819	// unconditionally include in API requests. By default, fields with
10820	// empty values are omitted from API requests. However, any non-pointer,
10821	// non-interface field appearing in ForceSendFields will be sent to the
10822	// server regardless of whether the field is empty or not. This may be
10823	// used to include empty fields in Patch requests.
10824	ForceSendFields []string `json:"-"`
10825
10826	// NullFields is a list of field names (e.g. "EndDate") to include in
10827	// API requests with the JSON null value. By default, fields with empty
10828	// values are omitted from API requests. However, any field with an
10829	// empty value appearing in NullFields will be sent to the server as
10830	// null. It is an error if a field in this list has a non-empty value.
10831	// This may be used to include null fields in Patch requests.
10832	NullFields []string `json:"-"`
10833}
10834
10835func (s *PricingSchedulePricingPeriod) MarshalJSON() ([]byte, error) {
10836	type NoMethod PricingSchedulePricingPeriod
10837	raw := NoMethod(*s)
10838	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10839}
10840
10841// Project: Contains properties of a Planning project.
10842type Project struct {
10843	// AccountId: Account ID of this project.
10844	AccountId int64 `json:"accountId,omitempty,string"`
10845
10846	// AdvertiserId: Advertiser ID of this project.
10847	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10848
10849	// AudienceAgeGroup: Audience age group of this project.
10850	//
10851	// Possible values:
10852	//   "PLANNING_AUDIENCE_AGE_18_24"
10853	//   "PLANNING_AUDIENCE_AGE_25_34"
10854	//   "PLANNING_AUDIENCE_AGE_35_44"
10855	//   "PLANNING_AUDIENCE_AGE_45_54"
10856	//   "PLANNING_AUDIENCE_AGE_55_64"
10857	//   "PLANNING_AUDIENCE_AGE_65_OR_MORE"
10858	//   "PLANNING_AUDIENCE_AGE_UNKNOWN"
10859	AudienceAgeGroup string `json:"audienceAgeGroup,omitempty"`
10860
10861	// AudienceGender: Audience gender of this project.
10862	//
10863	// Possible values:
10864	//   "PLANNING_AUDIENCE_GENDER_FEMALE"
10865	//   "PLANNING_AUDIENCE_GENDER_MALE"
10866	AudienceGender string `json:"audienceGender,omitempty"`
10867
10868	// Budget: Budget of this project in the currency specified by the
10869	// current account. The value stored in this field represents only the
10870	// non-fractional amount. For example, for USD, the smallest value that
10871	// can be represented by this field is 1 US dollar.
10872	Budget int64 `json:"budget,omitempty,string"`
10873
10874	// ClientBillingCode: Client billing code of this project.
10875	ClientBillingCode string `json:"clientBillingCode,omitempty"`
10876
10877	// ClientName: Name of the project client.
10878	ClientName string `json:"clientName,omitempty"`
10879
10880	// EndDate: End date of the project.
10881	EndDate string `json:"endDate,omitempty"`
10882
10883	// Id: ID of this project. This is a read-only, auto-generated field.
10884	Id int64 `json:"id,omitempty,string"`
10885
10886	// Kind: Identifies what kind of resource this is. Value: the fixed
10887	// string "dfareporting#project".
10888	Kind string `json:"kind,omitempty"`
10889
10890	// LastModifiedInfo: Information about the most recent modification of
10891	// this project.
10892	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10893
10894	// Name: Name of this project.
10895	Name string `json:"name,omitempty"`
10896
10897	// Overview: Overview of this project.
10898	Overview string `json:"overview,omitempty"`
10899
10900	// StartDate: Start date of the project.
10901	StartDate string `json:"startDate,omitempty"`
10902
10903	// SubaccountId: Subaccount ID of this project.
10904	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10905
10906	// TargetClicks: Number of clicks that the advertiser is targeting.
10907	TargetClicks int64 `json:"targetClicks,omitempty,string"`
10908
10909	// TargetConversions: Number of conversions that the advertiser is
10910	// targeting.
10911	TargetConversions int64 `json:"targetConversions,omitempty,string"`
10912
10913	// TargetCpaNanos: CPA that the advertiser is targeting.
10914	TargetCpaNanos int64 `json:"targetCpaNanos,omitempty,string"`
10915
10916	// TargetCpcNanos: CPC that the advertiser is targeting.
10917	TargetCpcNanos int64 `json:"targetCpcNanos,omitempty,string"`
10918
10919	// TargetCpmActiveViewNanos: vCPM from Active View that the advertiser
10920	// is targeting.
10921	TargetCpmActiveViewNanos int64 `json:"targetCpmActiveViewNanos,omitempty,string"`
10922
10923	// TargetCpmNanos: CPM that the advertiser is targeting.
10924	TargetCpmNanos int64 `json:"targetCpmNanos,omitempty,string"`
10925
10926	// TargetImpressions: Number of impressions that the advertiser is
10927	// targeting.
10928	TargetImpressions int64 `json:"targetImpressions,omitempty,string"`
10929
10930	// ServerResponse contains the HTTP response code and headers from the
10931	// server.
10932	googleapi.ServerResponse `json:"-"`
10933
10934	// ForceSendFields is a list of field names (e.g. "AccountId") to
10935	// unconditionally include in API requests. By default, fields with
10936	// empty values are omitted from API requests. However, any non-pointer,
10937	// non-interface field appearing in ForceSendFields will be sent to the
10938	// server regardless of whether the field is empty or not. This may be
10939	// used to include empty fields in Patch requests.
10940	ForceSendFields []string `json:"-"`
10941
10942	// NullFields is a list of field names (e.g. "AccountId") to include in
10943	// API requests with the JSON null value. By default, fields with empty
10944	// values are omitted from API requests. However, any field with an
10945	// empty value appearing in NullFields will be sent to the server as
10946	// null. It is an error if a field in this list has a non-empty value.
10947	// This may be used to include null fields in Patch requests.
10948	NullFields []string `json:"-"`
10949}
10950
10951func (s *Project) MarshalJSON() ([]byte, error) {
10952	type NoMethod Project
10953	raw := NoMethod(*s)
10954	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10955}
10956
10957// ProjectsListResponse: Project List Response
10958type ProjectsListResponse struct {
10959	// Kind: Identifies what kind of resource this is. Value: the fixed
10960	// string "dfareporting#projectsListResponse".
10961	Kind string `json:"kind,omitempty"`
10962
10963	// NextPageToken: Pagination token to be used for the next list
10964	// operation.
10965	NextPageToken string `json:"nextPageToken,omitempty"`
10966
10967	// Projects: Project collection.
10968	Projects []*Project `json:"projects,omitempty"`
10969
10970	// ServerResponse contains the HTTP response code and headers from the
10971	// server.
10972	googleapi.ServerResponse `json:"-"`
10973
10974	// ForceSendFields is a list of field names (e.g. "Kind") to
10975	// unconditionally include in API requests. By default, fields with
10976	// empty values are omitted from API requests. However, any non-pointer,
10977	// non-interface field appearing in ForceSendFields will be sent to the
10978	// server regardless of whether the field is empty or not. This may be
10979	// used to include empty fields in Patch requests.
10980	ForceSendFields []string `json:"-"`
10981
10982	// NullFields is a list of field names (e.g. "Kind") to include in API
10983	// requests with the JSON null value. By default, fields with empty
10984	// values are omitted from API requests. However, any field with an
10985	// empty value appearing in NullFields will be sent to the server as
10986	// null. It is an error if a field in this list has a non-empty value.
10987	// This may be used to include null fields in Patch requests.
10988	NullFields []string `json:"-"`
10989}
10990
10991func (s *ProjectsListResponse) MarshalJSON() ([]byte, error) {
10992	type NoMethod ProjectsListResponse
10993	raw := NoMethod(*s)
10994	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10995}
10996
10997// ReachReportCompatibleFields: Represents fields that are compatible to
10998// be selected for a report of type "REACH".
10999type ReachReportCompatibleFields struct {
11000	// DimensionFilters: Dimensions which are compatible to be selected in
11001	// the "dimensionFilters" section of the report.
11002	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
11003
11004	// Dimensions: Dimensions which are compatible to be selected in the
11005	// "dimensions" section of the report.
11006	Dimensions []*Dimension `json:"dimensions,omitempty"`
11007
11008	// Kind: The kind of resource this is, in this case
11009	// dfareporting#reachReportCompatibleFields.
11010	Kind string `json:"kind,omitempty"`
11011
11012	// Metrics: Metrics which are compatible to be selected in the
11013	// "metricNames" section of the report.
11014	Metrics []*Metric `json:"metrics,omitempty"`
11015
11016	// PivotedActivityMetrics: Metrics which are compatible to be selected
11017	// as activity metrics to pivot on in the "activities" section of the
11018	// report.
11019	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
11020
11021	// ReachByFrequencyMetrics: Metrics which are compatible to be selected
11022	// in the "reachByFrequencyMetricNames" section of the report.
11023	ReachByFrequencyMetrics []*Metric `json:"reachByFrequencyMetrics,omitempty"`
11024
11025	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
11026	// unconditionally include in API requests. By default, fields with
11027	// empty values are omitted from API requests. However, any non-pointer,
11028	// non-interface field appearing in ForceSendFields will be sent to the
11029	// server regardless of whether the field is empty or not. This may be
11030	// used to include empty fields in Patch requests.
11031	ForceSendFields []string `json:"-"`
11032
11033	// NullFields is a list of field names (e.g. "DimensionFilters") to
11034	// include in API requests with the JSON null value. By default, fields
11035	// with empty values are omitted from API requests. However, any field
11036	// with an empty value appearing in NullFields will be sent to the
11037	// server as null. It is an error if a field in this list has a
11038	// non-empty value. This may be used to include null fields in Patch
11039	// requests.
11040	NullFields []string `json:"-"`
11041}
11042
11043func (s *ReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
11044	type NoMethod ReachReportCompatibleFields
11045	raw := NoMethod(*s)
11046	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11047}
11048
11049// Recipient: Represents a recipient.
11050type Recipient struct {
11051	// DeliveryType: The delivery type for the recipient.
11052	//
11053	// Possible values:
11054	//   "ATTACHMENT"
11055	//   "LINK"
11056	DeliveryType string `json:"deliveryType,omitempty"`
11057
11058	// Email: The email address of the recipient.
11059	Email string `json:"email,omitempty"`
11060
11061	// Kind: The kind of resource this is, in this case
11062	// dfareporting#recipient.
11063	Kind string `json:"kind,omitempty"`
11064
11065	// ForceSendFields is a list of field names (e.g. "DeliveryType") to
11066	// unconditionally include in API requests. By default, fields with
11067	// empty values are omitted from API requests. However, any non-pointer,
11068	// non-interface field appearing in ForceSendFields will be sent to the
11069	// server regardless of whether the field is empty or not. This may be
11070	// used to include empty fields in Patch requests.
11071	ForceSendFields []string `json:"-"`
11072
11073	// NullFields is a list of field names (e.g. "DeliveryType") to include
11074	// in API requests with the JSON null value. By default, fields with
11075	// empty values are omitted from API requests. However, any field with
11076	// an empty value appearing in NullFields will be sent to the server as
11077	// null. It is an error if a field in this list has a non-empty value.
11078	// This may be used to include null fields in Patch requests.
11079	NullFields []string `json:"-"`
11080}
11081
11082func (s *Recipient) MarshalJSON() ([]byte, error) {
11083	type NoMethod Recipient
11084	raw := NoMethod(*s)
11085	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11086}
11087
11088// Region: Contains information about a region that can be targeted by
11089// ads.
11090type Region struct {
11091	// CountryCode: Country code of the country to which this region
11092	// belongs.
11093	CountryCode string `json:"countryCode,omitempty"`
11094
11095	// CountryDartId: DART ID of the country to which this region belongs.
11096	CountryDartId int64 `json:"countryDartId,omitempty,string"`
11097
11098	// DartId: DART ID of this region.
11099	DartId int64 `json:"dartId,omitempty,string"`
11100
11101	// Kind: Identifies what kind of resource this is. Value: the fixed
11102	// string "dfareporting#region".
11103	Kind string `json:"kind,omitempty"`
11104
11105	// Name: Name of this region.
11106	Name string `json:"name,omitempty"`
11107
11108	// RegionCode: Region code.
11109	RegionCode string `json:"regionCode,omitempty"`
11110
11111	// ForceSendFields is a list of field names (e.g. "CountryCode") 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. "CountryCode") to include
11120	// in API requests with the JSON null value. By default, fields with
11121	// empty values are omitted from API requests. However, any field with
11122	// an 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 *Region) MarshalJSON() ([]byte, error) {
11129	type NoMethod Region
11130	raw := NoMethod(*s)
11131	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11132}
11133
11134// RegionsListResponse: Region List Response
11135type RegionsListResponse struct {
11136	// Kind: Identifies what kind of resource this is. Value: the fixed
11137	// string "dfareporting#regionsListResponse".
11138	Kind string `json:"kind,omitempty"`
11139
11140	// Regions: Region collection.
11141	Regions []*Region `json:"regions,omitempty"`
11142
11143	// ServerResponse contains the HTTP response code and headers from the
11144	// server.
11145	googleapi.ServerResponse `json:"-"`
11146
11147	// ForceSendFields is a list of field names (e.g. "Kind") to
11148	// unconditionally include in API requests. By default, fields with
11149	// empty values are omitted from API requests. However, any non-pointer,
11150	// non-interface field appearing in ForceSendFields will be sent to the
11151	// server regardless of whether the field is empty or not. This may be
11152	// used to include empty fields in Patch requests.
11153	ForceSendFields []string `json:"-"`
11154
11155	// NullFields is a list of field names (e.g. "Kind") to include in API
11156	// requests with the JSON null value. By default, fields with empty
11157	// values are omitted from API requests. However, any field with an
11158	// empty value appearing in NullFields will be sent to the server as
11159	// null. It is an error if a field in this list has a non-empty value.
11160	// This may be used to include null fields in Patch requests.
11161	NullFields []string `json:"-"`
11162}
11163
11164func (s *RegionsListResponse) MarshalJSON() ([]byte, error) {
11165	type NoMethod RegionsListResponse
11166	raw := NoMethod(*s)
11167	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11168}
11169
11170// RemarketingList: Contains properties of a remarketing list.
11171// Remarketing enables you to create lists of users who have performed
11172// specific actions on a site, then target ads to members of those
11173// lists. This resource can be used to manage remarketing lists that are
11174// owned by your advertisers. To see all remarketing lists that are
11175// visible to your advertisers, including those that are shared to your
11176// advertiser or account, use the TargetableRemarketingLists resource.
11177type RemarketingList struct {
11178	// AccountId: Account ID of this remarketing list. This is a read-only,
11179	// auto-generated field that is only returned in GET requests.
11180	AccountId int64 `json:"accountId,omitempty,string"`
11181
11182	// Active: Whether this remarketing list is active.
11183	Active bool `json:"active,omitempty"`
11184
11185	// AdvertiserId: Dimension value for the advertiser ID that owns this
11186	// remarketing list. This is a required field.
11187	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11188
11189	// AdvertiserIdDimensionValue: Dimension value for the ID of the
11190	// advertiser. This is a read-only, auto-generated field.
11191	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
11192
11193	// Description: Remarketing list description.
11194	Description string `json:"description,omitempty"`
11195
11196	// Id: Remarketing list ID. This is a read-only, auto-generated field.
11197	Id int64 `json:"id,omitempty,string"`
11198
11199	// Kind: Identifies what kind of resource this is. Value: the fixed
11200	// string "dfareporting#remarketingList".
11201	Kind string `json:"kind,omitempty"`
11202
11203	// LifeSpan: Number of days that a user should remain in the remarketing
11204	// list without an impression. Acceptable values are 1 to 540,
11205	// inclusive.
11206	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
11207
11208	// ListPopulationRule: Rule used to populate the remarketing list with
11209	// users.
11210	ListPopulationRule *ListPopulationRule `json:"listPopulationRule,omitempty"`
11211
11212	// ListSize: Number of users currently in the list. This is a read-only
11213	// field.
11214	ListSize int64 `json:"listSize,omitempty,string"`
11215
11216	// ListSource: Product from which this remarketing list was originated.
11217	//
11218	// Possible values:
11219	//   "REMARKETING_LIST_SOURCE_ADX"
11220	//   "REMARKETING_LIST_SOURCE_DBM"
11221	//   "REMARKETING_LIST_SOURCE_DFA"
11222	//   "REMARKETING_LIST_SOURCE_DFP"
11223	//   "REMARKETING_LIST_SOURCE_DMP"
11224	//   "REMARKETING_LIST_SOURCE_GA"
11225	//   "REMARKETING_LIST_SOURCE_GPLUS"
11226	//   "REMARKETING_LIST_SOURCE_OTHER"
11227	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
11228	//   "REMARKETING_LIST_SOURCE_XFP"
11229	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
11230	ListSource string `json:"listSource,omitempty"`
11231
11232	// Name: Name of the remarketing list. This is a required field. Must be
11233	// no greater than 128 characters long.
11234	Name string `json:"name,omitempty"`
11235
11236	// SubaccountId: Subaccount ID of this remarketing list. This is a
11237	// read-only, auto-generated field that is only returned in GET
11238	// requests.
11239	SubaccountId int64 `json:"subaccountId,omitempty,string"`
11240
11241	// ServerResponse contains the HTTP response code and headers from the
11242	// server.
11243	googleapi.ServerResponse `json:"-"`
11244
11245	// ForceSendFields is a list of field names (e.g. "AccountId") to
11246	// unconditionally include in API requests. By default, fields with
11247	// empty values are omitted from API requests. However, any non-pointer,
11248	// non-interface field appearing in ForceSendFields will be sent to the
11249	// server regardless of whether the field is empty or not. This may be
11250	// used to include empty fields in Patch requests.
11251	ForceSendFields []string `json:"-"`
11252
11253	// NullFields is a list of field names (e.g. "AccountId") to include in
11254	// API requests with the JSON null value. By default, fields with empty
11255	// values are omitted from API requests. However, any field with an
11256	// empty value appearing in NullFields will be sent to the server as
11257	// null. It is an error if a field in this list has a non-empty value.
11258	// This may be used to include null fields in Patch requests.
11259	NullFields []string `json:"-"`
11260}
11261
11262func (s *RemarketingList) MarshalJSON() ([]byte, error) {
11263	type NoMethod RemarketingList
11264	raw := NoMethod(*s)
11265	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11266}
11267
11268// RemarketingListShare: Contains properties of a remarketing list's
11269// sharing information. Sharing allows other accounts or advertisers to
11270// target to your remarketing lists. This resource can be used to manage
11271// remarketing list sharing to other accounts and advertisers.
11272type RemarketingListShare struct {
11273	// Kind: Identifies what kind of resource this is. Value: the fixed
11274	// string "dfareporting#remarketingListShare".
11275	Kind string `json:"kind,omitempty"`
11276
11277	// RemarketingListId: Remarketing list ID. This is a read-only,
11278	// auto-generated field.
11279	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
11280
11281	// SharedAccountIds: Accounts that the remarketing list is shared with.
11282	SharedAccountIds googleapi.Int64s `json:"sharedAccountIds,omitempty"`
11283
11284	// SharedAdvertiserIds: Advertisers that the remarketing list is shared
11285	// with.
11286	SharedAdvertiserIds googleapi.Int64s `json:"sharedAdvertiserIds,omitempty"`
11287
11288	// ServerResponse contains the HTTP response code and headers from the
11289	// server.
11290	googleapi.ServerResponse `json:"-"`
11291
11292	// ForceSendFields is a list of field names (e.g. "Kind") to
11293	// unconditionally include in API requests. By default, fields with
11294	// empty values are omitted from API requests. However, any non-pointer,
11295	// non-interface field appearing in ForceSendFields will be sent to the
11296	// server regardless of whether the field is empty or not. This may be
11297	// used to include empty fields in Patch requests.
11298	ForceSendFields []string `json:"-"`
11299
11300	// NullFields is a list of field names (e.g. "Kind") to include in API
11301	// requests with the JSON null value. By default, fields with empty
11302	// values are omitted from API requests. However, any field with an
11303	// empty value appearing in NullFields will be sent to the server as
11304	// null. It is an error if a field in this list has a non-empty value.
11305	// This may be used to include null fields in Patch requests.
11306	NullFields []string `json:"-"`
11307}
11308
11309func (s *RemarketingListShare) MarshalJSON() ([]byte, error) {
11310	type NoMethod RemarketingListShare
11311	raw := NoMethod(*s)
11312	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11313}
11314
11315// RemarketingListsListResponse: Remarketing list response
11316type RemarketingListsListResponse struct {
11317	// Kind: Identifies what kind of resource this is. Value: the fixed
11318	// string "dfareporting#remarketingListsListResponse".
11319	Kind string `json:"kind,omitempty"`
11320
11321	// NextPageToken: Pagination token to be used for the next list
11322	// operation.
11323	NextPageToken string `json:"nextPageToken,omitempty"`
11324
11325	// RemarketingLists: Remarketing list collection.
11326	RemarketingLists []*RemarketingList `json:"remarketingLists,omitempty"`
11327
11328	// ServerResponse contains the HTTP response code and headers from the
11329	// server.
11330	googleapi.ServerResponse `json:"-"`
11331
11332	// ForceSendFields is a list of field names (e.g. "Kind") to
11333	// unconditionally include in API requests. By default, fields with
11334	// empty values are omitted from API requests. However, any non-pointer,
11335	// non-interface field appearing in ForceSendFields will be sent to the
11336	// server regardless of whether the field is empty or not. This may be
11337	// used to include empty fields in Patch requests.
11338	ForceSendFields []string `json:"-"`
11339
11340	// NullFields is a list of field names (e.g. "Kind") to include in API
11341	// requests with the JSON null value. By default, fields with empty
11342	// values are omitted from API requests. However, any field with an
11343	// empty value appearing in NullFields will be sent to the server as
11344	// null. It is an error if a field in this list has a non-empty value.
11345	// This may be used to include null fields in Patch requests.
11346	NullFields []string `json:"-"`
11347}
11348
11349func (s *RemarketingListsListResponse) MarshalJSON() ([]byte, error) {
11350	type NoMethod RemarketingListsListResponse
11351	raw := NoMethod(*s)
11352	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11353}
11354
11355// Report: Represents a Report resource.
11356type Report struct {
11357	// AccountId: The account ID to which this report belongs.
11358	AccountId int64 `json:"accountId,omitempty,string"`
11359
11360	// Criteria: The report criteria for a report of type "STANDARD".
11361	Criteria *ReportCriteria `json:"criteria,omitempty"`
11362
11363	// CrossDimensionReachCriteria: The report criteria for a report of type
11364	// "CROSS_DIMENSION_REACH".
11365	CrossDimensionReachCriteria *ReportCrossDimensionReachCriteria `json:"crossDimensionReachCriteria,omitempty"`
11366
11367	// Delivery: The report's email delivery settings.
11368	Delivery *ReportDelivery `json:"delivery,omitempty"`
11369
11370	// Etag: The eTag of this response for caching purposes.
11371	Etag string `json:"etag,omitempty"`
11372
11373	// FileName: The filename used when generating report files for this
11374	// report.
11375	FileName string `json:"fileName,omitempty"`
11376
11377	// FloodlightCriteria: The report criteria for a report of type
11378	// "FLOODLIGHT".
11379	FloodlightCriteria *ReportFloodlightCriteria `json:"floodlightCriteria,omitempty"`
11380
11381	// Format: The output format of the report. If not specified, default
11382	// format is "CSV". Note that the actual format in the completed report
11383	// file might differ if for instance the report's size exceeds the
11384	// format's capabilities. "CSV" will then be the fallback format.
11385	//
11386	// Possible values:
11387	//   "CSV"
11388	//   "EXCEL"
11389	Format string `json:"format,omitempty"`
11390
11391	// Id: The unique ID identifying this report resource.
11392	Id int64 `json:"id,omitempty,string"`
11393
11394	// Kind: The kind of resource this is, in this case dfareporting#report.
11395	Kind string `json:"kind,omitempty"`
11396
11397	// LastModifiedTime: The timestamp (in milliseconds since epoch) of when
11398	// this report was last modified.
11399	LastModifiedTime uint64 `json:"lastModifiedTime,omitempty,string"`
11400
11401	// Name: The name of the report.
11402	Name string `json:"name,omitempty"`
11403
11404	// OwnerProfileId: The user profile id of the owner of this report.
11405	OwnerProfileId int64 `json:"ownerProfileId,omitempty,string"`
11406
11407	// PathToConversionCriteria: The report criteria for a report of type
11408	// "PATH_TO_CONVERSION".
11409	PathToConversionCriteria *ReportPathToConversionCriteria `json:"pathToConversionCriteria,omitempty"`
11410
11411	// ReachCriteria: The report criteria for a report of type "REACH".
11412	ReachCriteria *ReportReachCriteria `json:"reachCriteria,omitempty"`
11413
11414	// Schedule: The report's schedule. Can only be set if the report's
11415	// 'dateRange' is a relative date range and the relative date range is
11416	// not "TODAY".
11417	Schedule *ReportSchedule `json:"schedule,omitempty"`
11418
11419	// SubAccountId: The subaccount ID to which this report belongs if
11420	// applicable.
11421	SubAccountId int64 `json:"subAccountId,omitempty,string"`
11422
11423	// Type: The type of the report.
11424	//
11425	// Possible values:
11426	//   "CROSS_DIMENSION_REACH"
11427	//   "FLOODLIGHT"
11428	//   "PATH_TO_CONVERSION"
11429	//   "REACH"
11430	//   "STANDARD"
11431	Type string `json:"type,omitempty"`
11432
11433	// ServerResponse contains the HTTP response code and headers from the
11434	// server.
11435	googleapi.ServerResponse `json:"-"`
11436
11437	// ForceSendFields is a list of field names (e.g. "AccountId") to
11438	// unconditionally include in API requests. By default, fields with
11439	// empty values are omitted from API requests. However, any non-pointer,
11440	// non-interface field appearing in ForceSendFields will be sent to the
11441	// server regardless of whether the field is empty or not. This may be
11442	// used to include empty fields in Patch requests.
11443	ForceSendFields []string `json:"-"`
11444
11445	// NullFields is a list of field names (e.g. "AccountId") to include in
11446	// API requests with the JSON null value. By default, fields with empty
11447	// values are omitted from API requests. However, any field with an
11448	// empty value appearing in NullFields will be sent to the server as
11449	// null. It is an error if a field in this list has a non-empty value.
11450	// This may be used to include null fields in Patch requests.
11451	NullFields []string `json:"-"`
11452}
11453
11454func (s *Report) MarshalJSON() ([]byte, error) {
11455	type NoMethod Report
11456	raw := NoMethod(*s)
11457	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11458}
11459
11460// ReportCriteria: The report criteria for a report of type "STANDARD".
11461type ReportCriteria struct {
11462	// Activities: Activity group.
11463	Activities *Activities `json:"activities,omitempty"`
11464
11465	// CustomRichMediaEvents: Custom Rich Media Events group.
11466	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11467
11468	// DateRange: The date range for which this report should be run.
11469	DateRange *DateRange `json:"dateRange,omitempty"`
11470
11471	// DimensionFilters: The list of filters on which dimensions are
11472	// filtered.
11473	// Filters for different dimensions are ANDed, filters for the same
11474	// dimension are grouped together and ORed.
11475	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11476
11477	// Dimensions: The list of standard dimensions the report should
11478	// include.
11479	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11480
11481	// MetricNames: The list of names of metrics the report should include.
11482	MetricNames []string `json:"metricNames,omitempty"`
11483
11484	// ForceSendFields is a list of field names (e.g. "Activities") to
11485	// unconditionally include in API requests. By default, fields with
11486	// empty values are omitted from API requests. However, any non-pointer,
11487	// non-interface field appearing in ForceSendFields will be sent to the
11488	// server regardless of whether the field is empty or not. This may be
11489	// used to include empty fields in Patch requests.
11490	ForceSendFields []string `json:"-"`
11491
11492	// NullFields is a list of field names (e.g. "Activities") to include in
11493	// API requests with the JSON null value. By default, fields with empty
11494	// values are omitted from API requests. However, any field with an
11495	// empty value appearing in NullFields will be sent to the server as
11496	// null. It is an error if a field in this list has a non-empty value.
11497	// This may be used to include null fields in Patch requests.
11498	NullFields []string `json:"-"`
11499}
11500
11501func (s *ReportCriteria) MarshalJSON() ([]byte, error) {
11502	type NoMethod ReportCriteria
11503	raw := NoMethod(*s)
11504	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11505}
11506
11507// ReportCrossDimensionReachCriteria: The report criteria for a report
11508// of type "CROSS_DIMENSION_REACH".
11509type ReportCrossDimensionReachCriteria struct {
11510	// Breakdown: The list of dimensions the report should include.
11511	Breakdown []*SortedDimension `json:"breakdown,omitempty"`
11512
11513	// DateRange: The date range this report should be run for.
11514	DateRange *DateRange `json:"dateRange,omitempty"`
11515
11516	// Dimension: The dimension option.
11517	//
11518	// Possible values:
11519	//   "ADVERTISER"
11520	//   "CAMPAIGN"
11521	//   "SITE_BY_ADVERTISER"
11522	//   "SITE_BY_CAMPAIGN"
11523	Dimension string `json:"dimension,omitempty"`
11524
11525	// DimensionFilters: The list of filters on which dimensions are
11526	// filtered.
11527	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11528
11529	// MetricNames: The list of names of metrics the report should include.
11530	MetricNames []string `json:"metricNames,omitempty"`
11531
11532	// OverlapMetricNames: The list of names of overlap metrics the report
11533	// should include.
11534	OverlapMetricNames []string `json:"overlapMetricNames,omitempty"`
11535
11536	// Pivoted: Whether the report is pivoted or not. Defaults to true.
11537	Pivoted bool `json:"pivoted,omitempty"`
11538
11539	// ForceSendFields is a list of field names (e.g. "Breakdown") to
11540	// unconditionally include in API requests. By default, fields with
11541	// empty values are omitted from API requests. However, any non-pointer,
11542	// non-interface field appearing in ForceSendFields will be sent to the
11543	// server regardless of whether the field is empty or not. This may be
11544	// used to include empty fields in Patch requests.
11545	ForceSendFields []string `json:"-"`
11546
11547	// NullFields is a list of field names (e.g. "Breakdown") to include in
11548	// API requests with the JSON null value. By default, fields with empty
11549	// values are omitted from API requests. However, any field with an
11550	// empty value appearing in NullFields will be sent to the server as
11551	// null. It is an error if a field in this list has a non-empty value.
11552	// This may be used to include null fields in Patch requests.
11553	NullFields []string `json:"-"`
11554}
11555
11556func (s *ReportCrossDimensionReachCriteria) MarshalJSON() ([]byte, error) {
11557	type NoMethod ReportCrossDimensionReachCriteria
11558	raw := NoMethod(*s)
11559	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11560}
11561
11562// ReportDelivery: The report's email delivery settings.
11563type ReportDelivery struct {
11564	// EmailOwner: Whether the report should be emailed to the report owner.
11565	EmailOwner bool `json:"emailOwner,omitempty"`
11566
11567	// EmailOwnerDeliveryType: The type of delivery for the owner to
11568	// receive, if enabled.
11569	//
11570	// Possible values:
11571	//   "ATTACHMENT"
11572	//   "LINK"
11573	EmailOwnerDeliveryType string `json:"emailOwnerDeliveryType,omitempty"`
11574
11575	// Message: The message to be sent with each email.
11576	Message string `json:"message,omitempty"`
11577
11578	// Recipients: The list of recipients to which to email the report.
11579	Recipients []*Recipient `json:"recipients,omitempty"`
11580
11581	// ForceSendFields is a list of field names (e.g. "EmailOwner") to
11582	// unconditionally include in API requests. By default, fields with
11583	// empty values are omitted from API requests. However, any non-pointer,
11584	// non-interface field appearing in ForceSendFields will be sent to the
11585	// server regardless of whether the field is empty or not. This may be
11586	// used to include empty fields in Patch requests.
11587	ForceSendFields []string `json:"-"`
11588
11589	// NullFields is a list of field names (e.g. "EmailOwner") to include in
11590	// API requests with the JSON null value. By default, fields with empty
11591	// values are omitted from API requests. However, any field with an
11592	// empty value appearing in NullFields will be sent to the server as
11593	// null. It is an error if a field in this list has a non-empty value.
11594	// This may be used to include null fields in Patch requests.
11595	NullFields []string `json:"-"`
11596}
11597
11598func (s *ReportDelivery) MarshalJSON() ([]byte, error) {
11599	type NoMethod ReportDelivery
11600	raw := NoMethod(*s)
11601	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11602}
11603
11604// ReportFloodlightCriteria: The report criteria for a report of type
11605// "FLOODLIGHT".
11606type ReportFloodlightCriteria struct {
11607	// CustomRichMediaEvents: The list of custom rich media events to
11608	// include.
11609	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11610
11611	// DateRange: The date range this report should be run for.
11612	DateRange *DateRange `json:"dateRange,omitempty"`
11613
11614	// DimensionFilters: The list of filters on which dimensions are
11615	// filtered.
11616	// Filters for different dimensions are ANDed, filters for the same
11617	// dimension are grouped together and ORed.
11618	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11619
11620	// Dimensions: The list of dimensions the report should include.
11621	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11622
11623	// FloodlightConfigId: The floodlight ID for which to show data in this
11624	// report. All advertisers associated with that ID will automatically be
11625	// added. The dimension of the value needs to be
11626	// 'dfa:floodlightConfigId'.
11627	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11628
11629	// MetricNames: The list of names of metrics the report should include.
11630	MetricNames []string `json:"metricNames,omitempty"`
11631
11632	// ReportProperties: The properties of the report.
11633	ReportProperties *ReportFloodlightCriteriaReportProperties `json:"reportProperties,omitempty"`
11634
11635	// ForceSendFields is a list of field names (e.g.
11636	// "CustomRichMediaEvents") to unconditionally include in API requests.
11637	// By default, fields with empty values are omitted from API requests.
11638	// However, any non-pointer, non-interface field appearing in
11639	// ForceSendFields will be sent to the server regardless of whether the
11640	// field is empty or not. This may be used to include empty fields in
11641	// Patch requests.
11642	ForceSendFields []string `json:"-"`
11643
11644	// NullFields is a list of field names (e.g. "CustomRichMediaEvents") to
11645	// include in API requests with the JSON null value. By default, fields
11646	// with empty values are omitted from API requests. However, any field
11647	// with an empty value appearing in NullFields will be sent to the
11648	// server as null. It is an error if a field in this list has a
11649	// non-empty value. This may be used to include null fields in Patch
11650	// requests.
11651	NullFields []string `json:"-"`
11652}
11653
11654func (s *ReportFloodlightCriteria) MarshalJSON() ([]byte, error) {
11655	type NoMethod ReportFloodlightCriteria
11656	raw := NoMethod(*s)
11657	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11658}
11659
11660// ReportFloodlightCriteriaReportProperties: The properties of the
11661// report.
11662type ReportFloodlightCriteriaReportProperties struct {
11663	// IncludeAttributedIPConversions: Include conversions that have no
11664	// cookie, but do have an exposure path.
11665	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11666
11667	// IncludeUnattributedCookieConversions: Include conversions of users
11668	// with a DoubleClick cookie but without an exposure. That means the
11669	// user did not click or see an ad from the advertiser within the
11670	// Floodlight group, or that the interaction happened outside the
11671	// lookback window.
11672	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11673
11674	// IncludeUnattributedIPConversions: Include conversions that have no
11675	// associated cookies and no exposures. It’s therefore impossible to
11676	// know how the user was exposed to your ads during the lookback window
11677	// prior to a conversion.
11678	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11679
11680	// ForceSendFields is a list of field names (e.g.
11681	// "IncludeAttributedIPConversions") to unconditionally include in API
11682	// requests. By default, fields with empty values are omitted from API
11683	// requests. However, any non-pointer, non-interface field appearing in
11684	// ForceSendFields will be sent to the server regardless of whether the
11685	// field is empty or not. This may be used to include empty fields in
11686	// Patch requests.
11687	ForceSendFields []string `json:"-"`
11688
11689	// NullFields is a list of field names (e.g.
11690	// "IncludeAttributedIPConversions") to include in API requests with the
11691	// JSON null value. By default, fields with empty values are omitted
11692	// from API requests. However, any field with an empty value appearing
11693	// in NullFields will be sent to the server as null. It is an error if a
11694	// field in this list has a non-empty value. This may be used to include
11695	// null fields in Patch requests.
11696	NullFields []string `json:"-"`
11697}
11698
11699func (s *ReportFloodlightCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11700	type NoMethod ReportFloodlightCriteriaReportProperties
11701	raw := NoMethod(*s)
11702	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11703}
11704
11705// ReportPathToConversionCriteria: The report criteria for a report of
11706// type "PATH_TO_CONVERSION".
11707type ReportPathToConversionCriteria struct {
11708	// ActivityFilters: The list of 'dfa:activity' values to filter on.
11709	ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
11710
11711	// ConversionDimensions: The list of conversion dimensions the report
11712	// should include.
11713	ConversionDimensions []*SortedDimension `json:"conversionDimensions,omitempty"`
11714
11715	// CustomFloodlightVariables: The list of custom floodlight variables
11716	// the report should include.
11717	CustomFloodlightVariables []*SortedDimension `json:"customFloodlightVariables,omitempty"`
11718
11719	// CustomRichMediaEvents: The list of custom rich media events to
11720	// include.
11721	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11722
11723	// DateRange: The date range this report should be run for.
11724	DateRange *DateRange `json:"dateRange,omitempty"`
11725
11726	// FloodlightConfigId: The floodlight ID for which to show data in this
11727	// report. All advertisers associated with that ID will automatically be
11728	// added. The dimension of the value needs to be
11729	// 'dfa:floodlightConfigId'.
11730	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11731
11732	// MetricNames: The list of names of metrics the report should include.
11733	MetricNames []string `json:"metricNames,omitempty"`
11734
11735	// PerInteractionDimensions: The list of per interaction dimensions the
11736	// report should include.
11737	PerInteractionDimensions []*SortedDimension `json:"perInteractionDimensions,omitempty"`
11738
11739	// ReportProperties: The properties of the report.
11740	ReportProperties *ReportPathToConversionCriteriaReportProperties `json:"reportProperties,omitempty"`
11741
11742	// ForceSendFields is a list of field names (e.g. "ActivityFilters") to
11743	// unconditionally include in API requests. By default, fields with
11744	// empty values are omitted from API requests. However, any non-pointer,
11745	// non-interface field appearing in ForceSendFields will be sent to the
11746	// server regardless of whether the field is empty or not. This may be
11747	// used to include empty fields in Patch requests.
11748	ForceSendFields []string `json:"-"`
11749
11750	// NullFields is a list of field names (e.g. "ActivityFilters") to
11751	// include in API requests with the JSON null value. By default, fields
11752	// with empty values are omitted from API requests. However, any field
11753	// with an empty value appearing in NullFields will be sent to the
11754	// server as null. It is an error if a field in this list has a
11755	// non-empty value. This may be used to include null fields in Patch
11756	// requests.
11757	NullFields []string `json:"-"`
11758}
11759
11760func (s *ReportPathToConversionCriteria) MarshalJSON() ([]byte, error) {
11761	type NoMethod ReportPathToConversionCriteria
11762	raw := NoMethod(*s)
11763	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11764}
11765
11766// ReportPathToConversionCriteriaReportProperties: The properties of the
11767// report.
11768type ReportPathToConversionCriteriaReportProperties struct {
11769	// ClicksLookbackWindow: DFA checks to see if a click interaction
11770	// occurred within the specified period of time before a conversion. By
11771	// default the value is pulled from Floodlight or you can manually enter
11772	// a custom value. Valid values: 1-90.
11773	ClicksLookbackWindow int64 `json:"clicksLookbackWindow,omitempty"`
11774
11775	// ImpressionsLookbackWindow: DFA checks to see if an impression
11776	// interaction occurred within the specified period of time before a
11777	// conversion. By default the value is pulled from Floodlight or you can
11778	// manually enter a custom value. Valid values: 1-90.
11779	ImpressionsLookbackWindow int64 `json:"impressionsLookbackWindow,omitempty"`
11780
11781	// IncludeAttributedIPConversions: Deprecated: has no effect.
11782	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11783
11784	// IncludeUnattributedCookieConversions: Include conversions of users
11785	// with a DoubleClick cookie but without an exposure. That means the
11786	// user did not click or see an ad from the advertiser within the
11787	// Floodlight group, or that the interaction happened outside the
11788	// lookback window.
11789	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11790
11791	// IncludeUnattributedIPConversions: Include conversions that have no
11792	// associated cookies and no exposures. It’s therefore impossible to
11793	// know how the user was exposed to your ads during the lookback window
11794	// prior to a conversion.
11795	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11796
11797	// MaximumClickInteractions: The maximum number of click interactions to
11798	// include in the report. Advertisers currently paying for E2C reports
11799	// get up to 200 (100 clicks, 100 impressions). If another advertiser in
11800	// your network is paying for E2C, you can have up to 5 total exposures
11801	// per report.
11802	MaximumClickInteractions int64 `json:"maximumClickInteractions,omitempty"`
11803
11804	// MaximumImpressionInteractions: The maximum number of click
11805	// interactions to include in the report. Advertisers currently paying
11806	// for E2C reports get up to 200 (100 clicks, 100 impressions). If
11807	// another advertiser in your network is paying for E2C, you can have up
11808	// to 5 total exposures per report.
11809	MaximumImpressionInteractions int64 `json:"maximumImpressionInteractions,omitempty"`
11810
11811	// MaximumInteractionGap: The maximum amount of time that can take place
11812	// between interactions (clicks or impressions) by the same user. Valid
11813	// values: 1-90.
11814	MaximumInteractionGap int64 `json:"maximumInteractionGap,omitempty"`
11815
11816	// PivotOnInteractionPath: Enable pivoting on interaction path.
11817	PivotOnInteractionPath bool `json:"pivotOnInteractionPath,omitempty"`
11818
11819	// ForceSendFields is a list of field names (e.g.
11820	// "ClicksLookbackWindow") to unconditionally include in API requests.
11821	// By default, fields with empty values are omitted from API requests.
11822	// However, any non-pointer, non-interface field appearing in
11823	// ForceSendFields will be sent to the server regardless of whether the
11824	// field is empty or not. This may be used to include empty fields in
11825	// Patch requests.
11826	ForceSendFields []string `json:"-"`
11827
11828	// NullFields is a list of field names (e.g. "ClicksLookbackWindow") to
11829	// include in API requests with the JSON null value. By default, fields
11830	// with empty values are omitted from API requests. However, any field
11831	// with an empty value appearing in NullFields will be sent to the
11832	// server as null. It is an error if a field in this list has a
11833	// non-empty value. This may be used to include null fields in Patch
11834	// requests.
11835	NullFields []string `json:"-"`
11836}
11837
11838func (s *ReportPathToConversionCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11839	type NoMethod ReportPathToConversionCriteriaReportProperties
11840	raw := NoMethod(*s)
11841	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11842}
11843
11844// ReportReachCriteria: The report criteria for a report of type
11845// "REACH".
11846type ReportReachCriteria struct {
11847	// Activities: Activity group.
11848	Activities *Activities `json:"activities,omitempty"`
11849
11850	// CustomRichMediaEvents: Custom Rich Media Events group.
11851	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11852
11853	// DateRange: The date range this report should be run for.
11854	DateRange *DateRange `json:"dateRange,omitempty"`
11855
11856	// DimensionFilters: The list of filters on which dimensions are
11857	// filtered.
11858	// Filters for different dimensions are ANDed, filters for the same
11859	// dimension are grouped together and ORed.
11860	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11861
11862	// Dimensions: The list of dimensions the report should include.
11863	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11864
11865	// EnableAllDimensionCombinations: Whether to enable all reach dimension
11866	// combinations in the report. Defaults to false. If enabled, the date
11867	// range of the report should be within the last 42 days.
11868	EnableAllDimensionCombinations bool `json:"enableAllDimensionCombinations,omitempty"`
11869
11870	// MetricNames: The list of names of metrics the report should include.
11871	MetricNames []string `json:"metricNames,omitempty"`
11872
11873	// ReachByFrequencyMetricNames: The list of names of  Reach By Frequency
11874	// metrics the report should include.
11875	ReachByFrequencyMetricNames []string `json:"reachByFrequencyMetricNames,omitempty"`
11876
11877	// ForceSendFields is a list of field names (e.g. "Activities") to
11878	// unconditionally include in API requests. By default, fields with
11879	// empty values are omitted from API requests. However, any non-pointer,
11880	// non-interface field appearing in ForceSendFields will be sent to the
11881	// server regardless of whether the field is empty or not. This may be
11882	// used to include empty fields in Patch requests.
11883	ForceSendFields []string `json:"-"`
11884
11885	// NullFields is a list of field names (e.g. "Activities") to include in
11886	// API requests with the JSON null value. By default, fields with empty
11887	// values are omitted from API requests. However, any field with an
11888	// empty value appearing in NullFields will be sent to the server as
11889	// null. It is an error if a field in this list has a non-empty value.
11890	// This may be used to include null fields in Patch requests.
11891	NullFields []string `json:"-"`
11892}
11893
11894func (s *ReportReachCriteria) MarshalJSON() ([]byte, error) {
11895	type NoMethod ReportReachCriteria
11896	raw := NoMethod(*s)
11897	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11898}
11899
11900// ReportSchedule: The report's schedule. Can only be set if the
11901// report's 'dateRange' is a relative date range and the relative date
11902// range is not "TODAY".
11903type ReportSchedule struct {
11904	// Active: Whether the schedule is active or not. Must be set to either
11905	// true or false.
11906	Active bool `json:"active,omitempty"`
11907
11908	// Every: Defines every how many days, weeks or months the report should
11909	// be run. Needs to be set when "repeats" is either "DAILY", "WEEKLY" or
11910	// "MONTHLY".
11911	Every int64 `json:"every,omitempty"`
11912
11913	// ExpirationDate: The expiration date when the scheduled report stops
11914	// running.
11915	ExpirationDate string `json:"expirationDate,omitempty"`
11916
11917	// Repeats: The interval for which the report is repeated. Note:
11918	// - "DAILY" also requires field "every" to be set.
11919	// - "WEEKLY" also requires fields "every" and "repeatsOnWeekDays" to be
11920	// set.
11921	// - "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be
11922	// set.
11923	Repeats string `json:"repeats,omitempty"`
11924
11925	// RepeatsOnWeekDays: List of week days "WEEKLY" on which scheduled
11926	// reports should run.
11927	//
11928	// Possible values:
11929	//   "FRIDAY"
11930	//   "MONDAY"
11931	//   "SATURDAY"
11932	//   "SUNDAY"
11933	//   "THURSDAY"
11934	//   "TUESDAY"
11935	//   "WEDNESDAY"
11936	RepeatsOnWeekDays []string `json:"repeatsOnWeekDays,omitempty"`
11937
11938	// RunsOnDayOfMonth: Enum to define for "MONTHLY" scheduled reports
11939	// whether reports should be repeated on the same day of the month as
11940	// "startDate" or the same day of the week of the month.
11941	// Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02),
11942	// "DAY_OF_MONTH" would run subsequent reports on the 2nd of every
11943	// Month, and "WEEK_OF_MONTH" would run subsequent reports on the first
11944	// Monday of the month.
11945	//
11946	// Possible values:
11947	//   "DAY_OF_MONTH"
11948	//   "WEEK_OF_MONTH"
11949	RunsOnDayOfMonth string `json:"runsOnDayOfMonth,omitempty"`
11950
11951	// StartDate: Start date of date range for which scheduled reports
11952	// should be run.
11953	StartDate string `json:"startDate,omitempty"`
11954
11955	// ForceSendFields is a list of field names (e.g. "Active") to
11956	// unconditionally include in API requests. By default, fields with
11957	// empty values are omitted from API requests. However, any non-pointer,
11958	// non-interface field appearing in ForceSendFields will be sent to the
11959	// server regardless of whether the field is empty or not. This may be
11960	// used to include empty fields in Patch requests.
11961	ForceSendFields []string `json:"-"`
11962
11963	// NullFields is a list of field names (e.g. "Active") to include in API
11964	// requests with the JSON null value. By default, fields with empty
11965	// values are omitted from API requests. However, any field with an
11966	// empty value appearing in NullFields will be sent to the server as
11967	// null. It is an error if a field in this list has a non-empty value.
11968	// This may be used to include null fields in Patch requests.
11969	NullFields []string `json:"-"`
11970}
11971
11972func (s *ReportSchedule) MarshalJSON() ([]byte, error) {
11973	type NoMethod ReportSchedule
11974	raw := NoMethod(*s)
11975	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11976}
11977
11978// ReportCompatibleFields: Represents fields that are compatible to be
11979// selected for a report of type "STANDARD".
11980type ReportCompatibleFields struct {
11981	// DimensionFilters: Dimensions which are compatible to be selected in
11982	// the "dimensionFilters" section of the report.
11983	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
11984
11985	// Dimensions: Dimensions which are compatible to be selected in the
11986	// "dimensions" section of the report.
11987	Dimensions []*Dimension `json:"dimensions,omitempty"`
11988
11989	// Kind: The kind of resource this is, in this case
11990	// dfareporting#reportCompatibleFields.
11991	Kind string `json:"kind,omitempty"`
11992
11993	// Metrics: Metrics which are compatible to be selected in the
11994	// "metricNames" section of the report.
11995	Metrics []*Metric `json:"metrics,omitempty"`
11996
11997	// PivotedActivityMetrics: Metrics which are compatible to be selected
11998	// as activity metrics to pivot on in the "activities" section of the
11999	// report.
12000	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
12001
12002	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
12003	// unconditionally include in API requests. By default, fields with
12004	// empty values are omitted from API requests. However, any non-pointer,
12005	// non-interface field appearing in ForceSendFields will be sent to the
12006	// server regardless of whether the field is empty or not. This may be
12007	// used to include empty fields in Patch requests.
12008	ForceSendFields []string `json:"-"`
12009
12010	// NullFields is a list of field names (e.g. "DimensionFilters") to
12011	// include in API requests with the JSON null value. By default, fields
12012	// with empty values are omitted from API requests. However, any field
12013	// with an empty value appearing in NullFields will be sent to the
12014	// server as null. It is an error if a field in this list has a
12015	// non-empty value. This may be used to include null fields in Patch
12016	// requests.
12017	NullFields []string `json:"-"`
12018}
12019
12020func (s *ReportCompatibleFields) MarshalJSON() ([]byte, error) {
12021	type NoMethod ReportCompatibleFields
12022	raw := NoMethod(*s)
12023	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12024}
12025
12026// ReportList: Represents the list of reports.
12027type ReportList struct {
12028	// Etag: The eTag of this response for caching purposes.
12029	Etag string `json:"etag,omitempty"`
12030
12031	// Items: The reports returned in this response.
12032	Items []*Report `json:"items,omitempty"`
12033
12034	// Kind: The kind of list this is, in this case dfareporting#reportList.
12035	Kind string `json:"kind,omitempty"`
12036
12037	// NextPageToken: Continuation token used to page through reports. To
12038	// retrieve the next page of results, set the next request's "pageToken"
12039	// to the value of this field. The page token is only valid for a
12040	// limited amount of time and should not be persisted.
12041	NextPageToken string `json:"nextPageToken,omitempty"`
12042
12043	// ServerResponse contains the HTTP response code and headers from the
12044	// server.
12045	googleapi.ServerResponse `json:"-"`
12046
12047	// ForceSendFields is a list of field names (e.g. "Etag") to
12048	// unconditionally include in API requests. By default, fields with
12049	// empty values are omitted from API requests. However, any non-pointer,
12050	// non-interface field appearing in ForceSendFields will be sent to the
12051	// server regardless of whether the field is empty or not. This may be
12052	// used to include empty fields in Patch requests.
12053	ForceSendFields []string `json:"-"`
12054
12055	// NullFields is a list of field names (e.g. "Etag") to include in API
12056	// requests with the JSON null value. By default, fields with empty
12057	// values are omitted from API requests. However, any field with an
12058	// empty value appearing in NullFields will be sent to the server as
12059	// null. It is an error if a field in this list has a non-empty value.
12060	// This may be used to include null fields in Patch requests.
12061	NullFields []string `json:"-"`
12062}
12063
12064func (s *ReportList) MarshalJSON() ([]byte, error) {
12065	type NoMethod ReportList
12066	raw := NoMethod(*s)
12067	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12068}
12069
12070// ReportsConfiguration: Reporting Configuration
12071type ReportsConfiguration struct {
12072	// ExposureToConversionEnabled: Whether the exposure to conversion
12073	// report is enabled. This report shows detailed pathway information on
12074	// up to 10 of the most recent ad exposures seen by a user before
12075	// converting.
12076	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
12077
12078	// LookbackConfiguration: Default lookback windows for new advertisers
12079	// in this account.
12080	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
12081
12082	// ReportGenerationTimeZoneId: Report generation time zone ID of this
12083	// account. This is a required field that can only be changed by a
12084	// superuser.
12085	// Acceptable values are:
12086	//
12087	// - "1" for "America/New_York"
12088	// - "2" for "Europe/London"
12089	// - "3" for "Europe/Paris"
12090	// - "4" for "Africa/Johannesburg"
12091	// - "5" for "Asia/Jerusalem"
12092	// - "6" for "Asia/Shanghai"
12093	// - "7" for "Asia/Hong_Kong"
12094	// - "8" for "Asia/Tokyo"
12095	// - "9" for "Australia/Sydney"
12096	// - "10" for "Asia/Dubai"
12097	// - "11" for "America/Los_Angeles"
12098	// - "12" for "Pacific/Auckland"
12099	// - "13" for "America/Sao_Paulo"
12100	// - "16" for "America/Asuncion"
12101	// - "17" for "America/Chicago"
12102	// - "18" for "America/Denver"
12103	// - "19" for "America/St_Johns"
12104	// - "20" for "Asia/Dhaka"
12105	// - "21" for "Asia/Jakarta"
12106	// - "22" for "Asia/Kabul"
12107	// - "23" for "Asia/Karachi"
12108	// - "24" for "Asia/Calcutta"
12109	// - "25" for "Asia/Pyongyang"
12110	// - "26" for "Asia/Rangoon"
12111	// - "27" for "Atlantic/Cape_Verde"
12112	// - "28" for "Atlantic/South_Georgia"
12113	// - "29" for "Australia/Adelaide"
12114	// - "30" for "Australia/Lord_Howe"
12115	// - "31" for "Europe/Moscow"
12116	// - "32" for "Pacific/Kiritimati"
12117	// - "35" for "Pacific/Norfolk"
12118	// - "36" for "Pacific/Tongatapu"
12119	ReportGenerationTimeZoneId int64 `json:"reportGenerationTimeZoneId,omitempty,string"`
12120
12121	// ForceSendFields is a list of field names (e.g.
12122	// "ExposureToConversionEnabled") to unconditionally include in API
12123	// requests. By default, fields with empty values are omitted from API
12124	// requests. However, any non-pointer, non-interface field appearing in
12125	// ForceSendFields will be sent to the server regardless of whether the
12126	// field is empty or not. This may be used to include empty fields in
12127	// Patch requests.
12128	ForceSendFields []string `json:"-"`
12129
12130	// NullFields is a list of field names (e.g.
12131	// "ExposureToConversionEnabled") to include in API requests with the
12132	// JSON null value. By default, fields with empty values are omitted
12133	// from API requests. However, any field with an empty value appearing
12134	// in NullFields will be sent to the server as null. It is an error if a
12135	// field in this list has a non-empty value. This may be used to include
12136	// null fields in Patch requests.
12137	NullFields []string `json:"-"`
12138}
12139
12140func (s *ReportsConfiguration) MarshalJSON() ([]byte, error) {
12141	type NoMethod ReportsConfiguration
12142	raw := NoMethod(*s)
12143	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12144}
12145
12146// RichMediaExitOverride: Rich Media Exit Override.
12147type RichMediaExitOverride struct {
12148	// ClickThroughUrl: Click-through URL of this rich media exit override.
12149	// Applicable if the enabled field is set to true.
12150	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
12151
12152	// Enabled: Whether to use the clickThroughUrl. If false, the
12153	// creative-level exit will be used.
12154	Enabled bool `json:"enabled,omitempty"`
12155
12156	// ExitId: ID for the override to refer to a specific exit in the
12157	// creative.
12158	ExitId int64 `json:"exitId,omitempty,string"`
12159
12160	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
12161	// unconditionally include in API requests. By default, fields with
12162	// empty values are omitted from API requests. However, any non-pointer,
12163	// non-interface field appearing in ForceSendFields will be sent to the
12164	// server regardless of whether the field is empty or not. This may be
12165	// used to include empty fields in Patch requests.
12166	ForceSendFields []string `json:"-"`
12167
12168	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
12169	// include in API requests with the JSON null value. By default, fields
12170	// with empty values are omitted from API requests. However, any field
12171	// with an empty value appearing in NullFields will be sent to the
12172	// server as null. It is an error if a field in this list has a
12173	// non-empty value. This may be used to include null fields in Patch
12174	// requests.
12175	NullFields []string `json:"-"`
12176}
12177
12178func (s *RichMediaExitOverride) MarshalJSON() ([]byte, error) {
12179	type NoMethod RichMediaExitOverride
12180	raw := NoMethod(*s)
12181	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12182}
12183
12184// Rule: A rule associates an asset with a targeting template for
12185// asset-level targeting. Applicable to INSTREAM_VIDEO creatives.
12186type Rule struct {
12187	// AssetId: A creativeAssets[].id. This should refer to one of the
12188	// parent assets in this creative. This is a required field.
12189	AssetId int64 `json:"assetId,omitempty,string"`
12190
12191	// Name: A user-friendly name for this rule. This is a required field.
12192	Name string `json:"name,omitempty"`
12193
12194	// TargetingTemplateId: A targeting template ID. The targeting from the
12195	// targeting template will be used to determine whether this asset
12196	// should be served. This is a required field.
12197	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
12198
12199	// ForceSendFields is a list of field names (e.g. "AssetId") to
12200	// unconditionally include in API requests. By default, fields with
12201	// empty values are omitted from API requests. However, any non-pointer,
12202	// non-interface field appearing in ForceSendFields will be sent to the
12203	// server regardless of whether the field is empty or not. This may be
12204	// used to include empty fields in Patch requests.
12205	ForceSendFields []string `json:"-"`
12206
12207	// NullFields is a list of field names (e.g. "AssetId") to include in
12208	// API requests with the JSON null value. By default, fields with empty
12209	// values are omitted from API requests. However, any field with an
12210	// empty value appearing in NullFields will be sent to the server as
12211	// null. It is an error if a field in this list has a non-empty value.
12212	// This may be used to include null fields in Patch requests.
12213	NullFields []string `json:"-"`
12214}
12215
12216func (s *Rule) MarshalJSON() ([]byte, error) {
12217	type NoMethod Rule
12218	raw := NoMethod(*s)
12219	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12220}
12221
12222// Site: Contains properties of a site.
12223type Site struct {
12224	// AccountId: Account ID of this site. This is a read-only field that
12225	// can be left blank.
12226	AccountId int64 `json:"accountId,omitempty,string"`
12227
12228	// Approved: Whether this site is approved.
12229	Approved bool `json:"approved,omitempty"`
12230
12231	// DirectorySiteId: Directory site associated with this site. This is a
12232	// required field that is read-only after insertion.
12233	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
12234
12235	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
12236	// directory site. This is a read-only, auto-generated field.
12237	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
12238
12239	// Id: ID of this site. This is a read-only, auto-generated field.
12240	Id int64 `json:"id,omitempty,string"`
12241
12242	// IdDimensionValue: Dimension value for the ID of this site. This is a
12243	// read-only, auto-generated field.
12244	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
12245
12246	// KeyName: Key name of this site. This is a read-only, auto-generated
12247	// field.
12248	KeyName string `json:"keyName,omitempty"`
12249
12250	// Kind: Identifies what kind of resource this is. Value: the fixed
12251	// string "dfareporting#site".
12252	Kind string `json:"kind,omitempty"`
12253
12254	// Name: Name of this site.This is a required field. Must be less than
12255	// 128 characters long. If this site is under a subaccount, the name
12256	// must be unique among sites of the same subaccount. Otherwise, this
12257	// site is a top-level site, and the name must be unique among top-level
12258	// sites of the same account.
12259	Name string `json:"name,omitempty"`
12260
12261	// SiteContacts: Site contacts.
12262	SiteContacts []*SiteContact `json:"siteContacts,omitempty"`
12263
12264	// SiteSettings: Site-wide settings.
12265	SiteSettings *SiteSettings `json:"siteSettings,omitempty"`
12266
12267	// SubaccountId: Subaccount ID of this site. This is a read-only field
12268	// that can be left blank.
12269	SubaccountId int64 `json:"subaccountId,omitempty,string"`
12270
12271	// VideoSettings: Default video settings for new placements created
12272	// under this site. This value will be used to populate the
12273	// placements.videoSettings field, when no value is specified for the
12274	// new placement.
12275	VideoSettings *SiteVideoSettings `json:"videoSettings,omitempty"`
12276
12277	// ServerResponse contains the HTTP response code and headers from the
12278	// server.
12279	googleapi.ServerResponse `json:"-"`
12280
12281	// ForceSendFields is a list of field names (e.g. "AccountId") to
12282	// unconditionally include in API requests. By default, fields with
12283	// empty values are omitted from API requests. However, any non-pointer,
12284	// non-interface field appearing in ForceSendFields will be sent to the
12285	// server regardless of whether the field is empty or not. This may be
12286	// used to include empty fields in Patch requests.
12287	ForceSendFields []string `json:"-"`
12288
12289	// NullFields is a list of field names (e.g. "AccountId") to include in
12290	// API requests with the JSON null value. By default, fields with empty
12291	// values are omitted from API requests. However, any field with an
12292	// empty value appearing in NullFields will be sent to the server as
12293	// null. It is an error if a field in this list has a non-empty value.
12294	// This may be used to include null fields in Patch requests.
12295	NullFields []string `json:"-"`
12296}
12297
12298func (s *Site) MarshalJSON() ([]byte, error) {
12299	type NoMethod Site
12300	raw := NoMethod(*s)
12301	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12302}
12303
12304// SiteCompanionSetting: Companion Settings
12305type SiteCompanionSetting struct {
12306	// CompanionsDisabled: Whether companions are disabled for this site
12307	// template.
12308	CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
12309
12310	// EnabledSizes: Whitelist of companion sizes to be served via this site
12311	// template. Set this list to null or empty to serve all companion
12312	// sizes.
12313	EnabledSizes []*Size `json:"enabledSizes,omitempty"`
12314
12315	// ImageOnly: Whether to serve only static images as companions.
12316	ImageOnly bool `json:"imageOnly,omitempty"`
12317
12318	// Kind: Identifies what kind of resource this is. Value: the fixed
12319	// string "dfareporting#siteCompanionSetting".
12320	Kind string `json:"kind,omitempty"`
12321
12322	// ForceSendFields is a list of field names (e.g. "CompanionsDisabled")
12323	// to unconditionally include in API requests. By default, fields with
12324	// empty values are omitted from API requests. However, any non-pointer,
12325	// non-interface field appearing in ForceSendFields will be sent to the
12326	// server regardless of whether the field is empty or not. This may be
12327	// used to include empty fields in Patch requests.
12328	ForceSendFields []string `json:"-"`
12329
12330	// NullFields is a list of field names (e.g. "CompanionsDisabled") to
12331	// include in API requests with the JSON null value. By default, fields
12332	// with empty values are omitted from API requests. However, any field
12333	// with an empty value appearing in NullFields will be sent to the
12334	// server as null. It is an error if a field in this list has a
12335	// non-empty value. This may be used to include null fields in Patch
12336	// requests.
12337	NullFields []string `json:"-"`
12338}
12339
12340func (s *SiteCompanionSetting) MarshalJSON() ([]byte, error) {
12341	type NoMethod SiteCompanionSetting
12342	raw := NoMethod(*s)
12343	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12344}
12345
12346// SiteContact: Site Contact
12347type SiteContact struct {
12348	// Address: Address of this site contact.
12349	Address string `json:"address,omitempty"`
12350
12351	// ContactType: Site contact type.
12352	//
12353	// Possible values:
12354	//   "SALES_PERSON"
12355	//   "TRAFFICKER"
12356	ContactType string `json:"contactType,omitempty"`
12357
12358	// Email: Email address of this site contact. This is a required field.
12359	Email string `json:"email,omitempty"`
12360
12361	// FirstName: First name of this site contact.
12362	FirstName string `json:"firstName,omitempty"`
12363
12364	// Id: ID of this site contact. This is a read-only, auto-generated
12365	// field.
12366	Id int64 `json:"id,omitempty,string"`
12367
12368	// LastName: Last name of this site contact.
12369	LastName string `json:"lastName,omitempty"`
12370
12371	// Phone: Primary phone number of this site contact.
12372	Phone string `json:"phone,omitempty"`
12373
12374	// Title: Title or designation of this site contact.
12375	Title string `json:"title,omitempty"`
12376
12377	// ForceSendFields is a list of field names (e.g. "Address") to
12378	// unconditionally include in API requests. By default, fields with
12379	// empty values are omitted from API requests. However, any non-pointer,
12380	// non-interface field appearing in ForceSendFields will be sent to the
12381	// server regardless of whether the field is empty or not. This may be
12382	// used to include empty fields in Patch requests.
12383	ForceSendFields []string `json:"-"`
12384
12385	// NullFields is a list of field names (e.g. "Address") to include in
12386	// API requests with the JSON null value. By default, fields with empty
12387	// values are omitted from API requests. However, any field with an
12388	// empty value appearing in NullFields will be sent to the server as
12389	// null. It is an error if a field in this list has a non-empty value.
12390	// This may be used to include null fields in Patch requests.
12391	NullFields []string `json:"-"`
12392}
12393
12394func (s *SiteContact) MarshalJSON() ([]byte, error) {
12395	type NoMethod SiteContact
12396	raw := NoMethod(*s)
12397	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12398}
12399
12400// SiteSettings: Site Settings
12401type SiteSettings struct {
12402	// ActiveViewOptOut: Whether active view creatives are disabled for this
12403	// site.
12404	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
12405
12406	// AdBlockingOptOut: Whether this site opts out of ad blocking. When
12407	// true, ad blocking is disabled for all placements under the site,
12408	// regardless of the individual placement settings. When false, the
12409	// campaign and placement settings take effect.
12410	AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
12411
12412	// DisableNewCookie: Whether new cookies are disabled for this site.
12413	DisableNewCookie bool `json:"disableNewCookie,omitempty"`
12414
12415	// TagSetting: Configuration settings for dynamic and image floodlight
12416	// tags.
12417	TagSetting *TagSetting `json:"tagSetting,omitempty"`
12418
12419	// VideoActiveViewOptOutTemplate: Whether Verification and ActiveView
12420	// for in-stream video creatives are disabled by default for new
12421	// placements created under this site. This value will be used to
12422	// populate the placement.videoActiveViewOptOut field, when no value is
12423	// specified for the new placement.
12424	VideoActiveViewOptOutTemplate bool `json:"videoActiveViewOptOutTemplate,omitempty"`
12425
12426	// VpaidAdapterChoiceTemplate: Default VPAID adapter setting for new
12427	// placements created under this site. This value will be used to
12428	// populate the placements.vpaidAdapterChoice field, when no value is
12429	// specified for the new placement. Controls which VPAID format the
12430	// measurement adapter will use for in-stream video creatives assigned
12431	// to the placement. The publisher's specifications will typically
12432	// determine this setting. For VPAID creatives, the adapter format will
12433	// match the VPAID format (HTML5 VPAID creatives use the HTML5
12434	// adapter).
12435	//
12436	// Note: Flash is no longer supported. This field now defaults to HTML5
12437	// when the following values are provided: FLASH, BOTH.
12438	//
12439	// Possible values:
12440	//   "BOTH"
12441	//   "DEFAULT"
12442	//   "FLASH"
12443	//   "HTML5"
12444	VpaidAdapterChoiceTemplate string `json:"vpaidAdapterChoiceTemplate,omitempty"`
12445
12446	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
12447	// unconditionally include in API requests. By default, fields with
12448	// empty values are omitted from API requests. However, any non-pointer,
12449	// non-interface field appearing in ForceSendFields will be sent to the
12450	// server regardless of whether the field is empty or not. This may be
12451	// used to include empty fields in Patch requests.
12452	ForceSendFields []string `json:"-"`
12453
12454	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
12455	// include in API requests with the JSON null value. By default, fields
12456	// with empty values are omitted from API requests. However, any field
12457	// with an empty value appearing in NullFields will be sent to the
12458	// server as null. It is an error if a field in this list has a
12459	// non-empty value. This may be used to include null fields in Patch
12460	// requests.
12461	NullFields []string `json:"-"`
12462}
12463
12464func (s *SiteSettings) MarshalJSON() ([]byte, error) {
12465	type NoMethod SiteSettings
12466	raw := NoMethod(*s)
12467	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12468}
12469
12470// SiteSkippableSetting: Skippable Settings
12471type SiteSkippableSetting struct {
12472	// Kind: Identifies what kind of resource this is. Value: the fixed
12473	// string "dfareporting#siteSkippableSetting".
12474	Kind string `json:"kind,omitempty"`
12475
12476	// ProgressOffset: Amount of time to play videos served to this site
12477	// template before counting a view. Applicable when skippable is true.
12478	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
12479
12480	// SkipOffset: Amount of time to play videos served to this site before
12481	// the skip button should appear. Applicable when skippable is true.
12482	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
12483
12484	// Skippable: Whether the user can skip creatives served to this site.
12485	// This will act as default for new placements created under this site.
12486	Skippable bool `json:"skippable,omitempty"`
12487
12488	// ForceSendFields is a list of field names (e.g. "Kind") to
12489	// unconditionally include in API requests. By default, fields with
12490	// empty values are omitted from API requests. However, any non-pointer,
12491	// non-interface field appearing in ForceSendFields will be sent to the
12492	// server regardless of whether the field is empty or not. This may be
12493	// used to include empty fields in Patch requests.
12494	ForceSendFields []string `json:"-"`
12495
12496	// NullFields is a list of field names (e.g. "Kind") to include in API
12497	// requests with the JSON null value. By default, fields with empty
12498	// values are omitted from API requests. However, any field with an
12499	// empty value appearing in NullFields will be sent to the server as
12500	// null. It is an error if a field in this list has a non-empty value.
12501	// This may be used to include null fields in Patch requests.
12502	NullFields []string `json:"-"`
12503}
12504
12505func (s *SiteSkippableSetting) MarshalJSON() ([]byte, error) {
12506	type NoMethod SiteSkippableSetting
12507	raw := NoMethod(*s)
12508	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12509}
12510
12511// SiteTranscodeSetting: Transcode Settings
12512type SiteTranscodeSetting struct {
12513	// EnabledVideoFormats: Whitelist of video formats to be served to this
12514	// site template. Set this list to null or empty to serve all video
12515	// formats.
12516	EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
12517
12518	// Kind: Identifies what kind of resource this is. Value: the fixed
12519	// string "dfareporting#siteTranscodeSetting".
12520	Kind string `json:"kind,omitempty"`
12521
12522	// ForceSendFields is a list of field names (e.g. "EnabledVideoFormats")
12523	// to unconditionally include in API requests. By default, fields with
12524	// empty values are omitted from API requests. However, any non-pointer,
12525	// non-interface field appearing in ForceSendFields will be sent to the
12526	// server regardless of whether the field is empty or not. This may be
12527	// used to include empty fields in Patch requests.
12528	ForceSendFields []string `json:"-"`
12529
12530	// NullFields is a list of field names (e.g. "EnabledVideoFormats") to
12531	// include in API requests with the JSON null value. By default, fields
12532	// with empty values are omitted from API requests. However, any field
12533	// with an empty value appearing in NullFields will be sent to the
12534	// server as null. It is an error if a field in this list has a
12535	// non-empty value. This may be used to include null fields in Patch
12536	// requests.
12537	NullFields []string `json:"-"`
12538}
12539
12540func (s *SiteTranscodeSetting) MarshalJSON() ([]byte, error) {
12541	type NoMethod SiteTranscodeSetting
12542	raw := NoMethod(*s)
12543	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12544}
12545
12546// SiteVideoSettings: Video Settings
12547type SiteVideoSettings struct {
12548	// CompanionSettings: Settings for the companion creatives of video
12549	// creatives served to this site.
12550	CompanionSettings *SiteCompanionSetting `json:"companionSettings,omitempty"`
12551
12552	// Kind: Identifies what kind of resource this is. Value: the fixed
12553	// string "dfareporting#siteVideoSettings".
12554	Kind string `json:"kind,omitempty"`
12555
12556	// Orientation: Orientation of a site template used for video. This will
12557	// act as default for new placements created under this site.
12558	//
12559	// Possible values:
12560	//   "ANY"
12561	//   "LANDSCAPE"
12562	//   "PORTRAIT"
12563	Orientation string `json:"orientation,omitempty"`
12564
12565	// SkippableSettings: Settings for the skippability of video creatives
12566	// served to this site. This will act as default for new placements
12567	// created under this site.
12568	SkippableSettings *SiteSkippableSetting `json:"skippableSettings,omitempty"`
12569
12570	// TranscodeSettings: Settings for the transcodes of video creatives
12571	// served to this site. This will act as default for new placements
12572	// created under this site.
12573	TranscodeSettings *SiteTranscodeSetting `json:"transcodeSettings,omitempty"`
12574
12575	// ForceSendFields is a list of field names (e.g. "CompanionSettings")
12576	// to unconditionally include in API requests. By default, fields with
12577	// empty values are omitted from API requests. However, any non-pointer,
12578	// non-interface field appearing in ForceSendFields will be sent to the
12579	// server regardless of whether the field is empty or not. This may be
12580	// used to include empty fields in Patch requests.
12581	ForceSendFields []string `json:"-"`
12582
12583	// NullFields is a list of field names (e.g. "CompanionSettings") to
12584	// include in API requests with the JSON null value. By default, fields
12585	// with empty values are omitted from API requests. However, any field
12586	// with an empty value appearing in NullFields will be sent to the
12587	// server as null. It is an error if a field in this list has a
12588	// non-empty value. This may be used to include null fields in Patch
12589	// requests.
12590	NullFields []string `json:"-"`
12591}
12592
12593func (s *SiteVideoSettings) MarshalJSON() ([]byte, error) {
12594	type NoMethod SiteVideoSettings
12595	raw := NoMethod(*s)
12596	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12597}
12598
12599// SitesListResponse: Site List Response
12600type SitesListResponse struct {
12601	// Kind: Identifies what kind of resource this is. Value: the fixed
12602	// string "dfareporting#sitesListResponse".
12603	Kind string `json:"kind,omitempty"`
12604
12605	// NextPageToken: Pagination token to be used for the next list
12606	// operation.
12607	NextPageToken string `json:"nextPageToken,omitempty"`
12608
12609	// Sites: Site collection.
12610	Sites []*Site `json:"sites,omitempty"`
12611
12612	// ServerResponse contains the HTTP response code and headers from the
12613	// server.
12614	googleapi.ServerResponse `json:"-"`
12615
12616	// ForceSendFields is a list of field names (e.g. "Kind") to
12617	// unconditionally include in API requests. By default, fields with
12618	// empty values are omitted from API requests. However, any non-pointer,
12619	// non-interface field appearing in ForceSendFields will be sent to the
12620	// server regardless of whether the field is empty or not. This may be
12621	// used to include empty fields in Patch requests.
12622	ForceSendFields []string `json:"-"`
12623
12624	// NullFields is a list of field names (e.g. "Kind") to include in API
12625	// requests with the JSON null value. By default, fields with empty
12626	// values are omitted from API requests. However, any field with an
12627	// empty value appearing in NullFields will be sent to the server as
12628	// null. It is an error if a field in this list has a non-empty value.
12629	// This may be used to include null fields in Patch requests.
12630	NullFields []string `json:"-"`
12631}
12632
12633func (s *SitesListResponse) MarshalJSON() ([]byte, error) {
12634	type NoMethod SitesListResponse
12635	raw := NoMethod(*s)
12636	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12637}
12638
12639// Size: Represents the dimensions of ads, placements, creatives, or
12640// creative assets.
12641type Size struct {
12642	// Height: Height of this size. Acceptable values are 0 to 32767,
12643	// inclusive.
12644	Height int64 `json:"height,omitempty"`
12645
12646	// Iab: IAB standard size. This is a read-only, auto-generated field.
12647	Iab bool `json:"iab,omitempty"`
12648
12649	// Id: ID of this size. This is a read-only, auto-generated field.
12650	Id int64 `json:"id,omitempty,string"`
12651
12652	// Kind: Identifies what kind of resource this is. Value: the fixed
12653	// string "dfareporting#size".
12654	Kind string `json:"kind,omitempty"`
12655
12656	// Width: Width of this size. Acceptable values are 0 to 32767,
12657	// inclusive.
12658	Width int64 `json:"width,omitempty"`
12659
12660	// ServerResponse contains the HTTP response code and headers from the
12661	// server.
12662	googleapi.ServerResponse `json:"-"`
12663
12664	// ForceSendFields is a list of field names (e.g. "Height") to
12665	// unconditionally include in API requests. By default, fields with
12666	// empty values are omitted from API requests. However, any non-pointer,
12667	// non-interface field appearing in ForceSendFields will be sent to the
12668	// server regardless of whether the field is empty or not. This may be
12669	// used to include empty fields in Patch requests.
12670	ForceSendFields []string `json:"-"`
12671
12672	// NullFields is a list of field names (e.g. "Height") to include in API
12673	// requests with the JSON null value. By default, fields with empty
12674	// values are omitted from API requests. However, any field with an
12675	// empty value appearing in NullFields will be sent to the server as
12676	// null. It is an error if a field in this list has a non-empty value.
12677	// This may be used to include null fields in Patch requests.
12678	NullFields []string `json:"-"`
12679}
12680
12681func (s *Size) MarshalJSON() ([]byte, error) {
12682	type NoMethod Size
12683	raw := NoMethod(*s)
12684	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12685}
12686
12687// SizesListResponse: Size List Response
12688type SizesListResponse struct {
12689	// Kind: Identifies what kind of resource this is. Value: the fixed
12690	// string "dfareporting#sizesListResponse".
12691	Kind string `json:"kind,omitempty"`
12692
12693	// Sizes: Size collection.
12694	Sizes []*Size `json:"sizes,omitempty"`
12695
12696	// ServerResponse contains the HTTP response code and headers from the
12697	// server.
12698	googleapi.ServerResponse `json:"-"`
12699
12700	// ForceSendFields is a list of field names (e.g. "Kind") to
12701	// unconditionally include in API requests. By default, fields with
12702	// empty values are omitted from API requests. However, any non-pointer,
12703	// non-interface field appearing in ForceSendFields will be sent to the
12704	// server regardless of whether the field is empty or not. This may be
12705	// used to include empty fields in Patch requests.
12706	ForceSendFields []string `json:"-"`
12707
12708	// NullFields is a list of field names (e.g. "Kind") to include in API
12709	// requests with the JSON null value. By default, fields with empty
12710	// values are omitted from API requests. However, any field with an
12711	// empty value appearing in NullFields will be sent to the server as
12712	// null. It is an error if a field in this list has a non-empty value.
12713	// This may be used to include null fields in Patch requests.
12714	NullFields []string `json:"-"`
12715}
12716
12717func (s *SizesListResponse) MarshalJSON() ([]byte, error) {
12718	type NoMethod SizesListResponse
12719	raw := NoMethod(*s)
12720	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12721}
12722
12723// SkippableSetting: Skippable Settings
12724type SkippableSetting struct {
12725	// Kind: Identifies what kind of resource this is. Value: the fixed
12726	// string "dfareporting#skippableSetting".
12727	Kind string `json:"kind,omitempty"`
12728
12729	// ProgressOffset: Amount of time to play videos served to this
12730	// placement before counting a view. Applicable when skippable is true.
12731	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
12732
12733	// SkipOffset: Amount of time to play videos served to this placement
12734	// before the skip button should appear. Applicable when skippable is
12735	// true.
12736	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
12737
12738	// Skippable: Whether the user can skip creatives served to this
12739	// placement.
12740	Skippable bool `json:"skippable,omitempty"`
12741
12742	// ForceSendFields is a list of field names (e.g. "Kind") to
12743	// unconditionally include in API requests. By default, fields with
12744	// empty values are omitted from API requests. However, any non-pointer,
12745	// non-interface field appearing in ForceSendFields will be sent to the
12746	// server regardless of whether the field is empty or not. This may be
12747	// used to include empty fields in Patch requests.
12748	ForceSendFields []string `json:"-"`
12749
12750	// NullFields is a list of field names (e.g. "Kind") to include in API
12751	// requests with the JSON null value. By default, fields with empty
12752	// values are omitted from API requests. However, any field with an
12753	// empty value appearing in NullFields will be sent to the server as
12754	// null. It is an error if a field in this list has a non-empty value.
12755	// This may be used to include null fields in Patch requests.
12756	NullFields []string `json:"-"`
12757}
12758
12759func (s *SkippableSetting) MarshalJSON() ([]byte, error) {
12760	type NoMethod SkippableSetting
12761	raw := NoMethod(*s)
12762	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12763}
12764
12765// SortedDimension: Represents a sorted dimension.
12766type SortedDimension struct {
12767	// Kind: The kind of resource this is, in this case
12768	// dfareporting#sortedDimension.
12769	Kind string `json:"kind,omitempty"`
12770
12771	// Name: The name of the dimension.
12772	Name string `json:"name,omitempty"`
12773
12774	// SortOrder: An optional sort order for the dimension column.
12775	//
12776	// Possible values:
12777	//   "ASCENDING"
12778	//   "DESCENDING"
12779	SortOrder string `json:"sortOrder,omitempty"`
12780
12781	// ForceSendFields is a list of field names (e.g. "Kind") to
12782	// unconditionally include in API requests. By default, fields with
12783	// empty values are omitted from API requests. However, any non-pointer,
12784	// non-interface field appearing in ForceSendFields will be sent to the
12785	// server regardless of whether the field is empty or not. This may be
12786	// used to include empty fields in Patch requests.
12787	ForceSendFields []string `json:"-"`
12788
12789	// NullFields is a list of field names (e.g. "Kind") to include in API
12790	// requests with the JSON null value. By default, fields with empty
12791	// values are omitted from API requests. However, any field with an
12792	// empty value appearing in NullFields will be sent to the server as
12793	// null. It is an error if a field in this list has a non-empty value.
12794	// This may be used to include null fields in Patch requests.
12795	NullFields []string `json:"-"`
12796}
12797
12798func (s *SortedDimension) MarshalJSON() ([]byte, error) {
12799	type NoMethod SortedDimension
12800	raw := NoMethod(*s)
12801	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12802}
12803
12804// Subaccount: Contains properties of a Campaign Manager subaccount.
12805type Subaccount struct {
12806	// AccountId: ID of the account that contains this subaccount. This is a
12807	// read-only field that can be left blank.
12808	AccountId int64 `json:"accountId,omitempty,string"`
12809
12810	// AvailablePermissionIds: IDs of the available user role permissions
12811	// for this subaccount.
12812	AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
12813
12814	// Id: ID of this subaccount. This is a read-only, auto-generated field.
12815	Id int64 `json:"id,omitempty,string"`
12816
12817	// Kind: Identifies what kind of resource this is. Value: the fixed
12818	// string "dfareporting#subaccount".
12819	Kind string `json:"kind,omitempty"`
12820
12821	// Name: Name of this subaccount. This is a required field. Must be less
12822	// than 128 characters long and be unique among subaccounts of the same
12823	// account.
12824	Name string `json:"name,omitempty"`
12825
12826	// ServerResponse contains the HTTP response code and headers from the
12827	// server.
12828	googleapi.ServerResponse `json:"-"`
12829
12830	// ForceSendFields is a list of field names (e.g. "AccountId") to
12831	// unconditionally include in API requests. By default, fields with
12832	// empty values are omitted from API requests. However, any non-pointer,
12833	// non-interface field appearing in ForceSendFields will be sent to the
12834	// server regardless of whether the field is empty or not. This may be
12835	// used to include empty fields in Patch requests.
12836	ForceSendFields []string `json:"-"`
12837
12838	// NullFields is a list of field names (e.g. "AccountId") to include in
12839	// API requests with the JSON null value. By default, fields with empty
12840	// values are omitted from API requests. However, any field with an
12841	// empty value appearing in NullFields will be sent to the server as
12842	// null. It is an error if a field in this list has a non-empty value.
12843	// This may be used to include null fields in Patch requests.
12844	NullFields []string `json:"-"`
12845}
12846
12847func (s *Subaccount) MarshalJSON() ([]byte, error) {
12848	type NoMethod Subaccount
12849	raw := NoMethod(*s)
12850	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12851}
12852
12853// SubaccountsListResponse: Subaccount List Response
12854type SubaccountsListResponse struct {
12855	// Kind: Identifies what kind of resource this is. Value: the fixed
12856	// string "dfareporting#subaccountsListResponse".
12857	Kind string `json:"kind,omitempty"`
12858
12859	// NextPageToken: Pagination token to be used for the next list
12860	// operation.
12861	NextPageToken string `json:"nextPageToken,omitempty"`
12862
12863	// Subaccounts: Subaccount collection.
12864	Subaccounts []*Subaccount `json:"subaccounts,omitempty"`
12865
12866	// ServerResponse contains the HTTP response code and headers from the
12867	// server.
12868	googleapi.ServerResponse `json:"-"`
12869
12870	// ForceSendFields is a list of field names (e.g. "Kind") to
12871	// unconditionally include in API requests. By default, fields with
12872	// empty values are omitted from API requests. However, any non-pointer,
12873	// non-interface field appearing in ForceSendFields will be sent to the
12874	// server regardless of whether the field is empty or not. This may be
12875	// used to include empty fields in Patch requests.
12876	ForceSendFields []string `json:"-"`
12877
12878	// NullFields is a list of field names (e.g. "Kind") to include in API
12879	// requests with the JSON null value. By default, fields with empty
12880	// values are omitted from API requests. However, any field with an
12881	// empty value appearing in NullFields will be sent to the server as
12882	// null. It is an error if a field in this list has a non-empty value.
12883	// This may be used to include null fields in Patch requests.
12884	NullFields []string `json:"-"`
12885}
12886
12887func (s *SubaccountsListResponse) MarshalJSON() ([]byte, error) {
12888	type NoMethod SubaccountsListResponse
12889	raw := NoMethod(*s)
12890	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12891}
12892
12893// TagData: Placement Tag Data
12894type TagData struct {
12895	// AdId: Ad associated with this placement tag. Applicable only when
12896	// format is PLACEMENT_TAG_TRACKING.
12897	AdId int64 `json:"adId,omitempty,string"`
12898
12899	// ClickTag: Tag string to record a click.
12900	ClickTag string `json:"clickTag,omitempty"`
12901
12902	// CreativeId: Creative associated with this placement tag. Applicable
12903	// only when format is PLACEMENT_TAG_TRACKING.
12904	CreativeId int64 `json:"creativeId,omitempty,string"`
12905
12906	// Format: TagData tag format of this tag.
12907	//
12908	// Possible values:
12909	//   "PLACEMENT_TAG_CLICK_COMMANDS"
12910	//   "PLACEMENT_TAG_IFRAME_ILAYER"
12911	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
12912	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
12913	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
12914	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
12915	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
12916	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
12917	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
12918	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
12919	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
12920	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
12921	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
12922	//   "PLACEMENT_TAG_JAVASCRIPT"
12923	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
12924	//   "PLACEMENT_TAG_STANDARD"
12925	//   "PLACEMENT_TAG_TRACKING"
12926	//   "PLACEMENT_TAG_TRACKING_IFRAME"
12927	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
12928	Format string `json:"format,omitempty"`
12929
12930	// ImpressionTag: Tag string for serving an ad.
12931	ImpressionTag string `json:"impressionTag,omitempty"`
12932
12933	// ForceSendFields is a list of field names (e.g. "AdId") to
12934	// unconditionally include in API requests. By default, fields with
12935	// empty values are omitted from API requests. However, any non-pointer,
12936	// non-interface field appearing in ForceSendFields will be sent to the
12937	// server regardless of whether the field is empty or not. This may be
12938	// used to include empty fields in Patch requests.
12939	ForceSendFields []string `json:"-"`
12940
12941	// NullFields is a list of field names (e.g. "AdId") to include in API
12942	// requests with the JSON null value. By default, fields with empty
12943	// values are omitted from API requests. However, any field with an
12944	// empty value appearing in NullFields will be sent to the server as
12945	// null. It is an error if a field in this list has a non-empty value.
12946	// This may be used to include null fields in Patch requests.
12947	NullFields []string `json:"-"`
12948}
12949
12950func (s *TagData) MarshalJSON() ([]byte, error) {
12951	type NoMethod TagData
12952	raw := NoMethod(*s)
12953	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12954}
12955
12956// TagSetting: Tag Settings
12957type TagSetting struct {
12958	// AdditionalKeyValues: Additional key-values to be included in tags.
12959	// Each key-value pair must be of the form key=value, and pairs must be
12960	// separated by a semicolon (;). Keys and values must not contain
12961	// commas. For example, id=2;color=red is a valid value for this field.
12962	AdditionalKeyValues string `json:"additionalKeyValues,omitempty"`
12963
12964	// IncludeClickThroughUrls: Whether static landing page URLs should be
12965	// included in the tags. This setting applies only to placements.
12966	IncludeClickThroughUrls bool `json:"includeClickThroughUrls,omitempty"`
12967
12968	// IncludeClickTracking: Whether click-tracking string should be
12969	// included in the tags.
12970	IncludeClickTracking bool `json:"includeClickTracking,omitempty"`
12971
12972	// KeywordOption: Option specifying how keywords are embedded in ad
12973	// tags. This setting can be used to specify whether keyword
12974	// placeholders are inserted in placement tags for this site. Publishers
12975	// can then add keywords to those placeholders.
12976	//
12977	// Possible values:
12978	//   "GENERATE_SEPARATE_TAG_FOR_EACH_KEYWORD"
12979	//   "IGNORE"
12980	//   "PLACEHOLDER_WITH_LIST_OF_KEYWORDS"
12981	KeywordOption string `json:"keywordOption,omitempty"`
12982
12983	// ForceSendFields is a list of field names (e.g. "AdditionalKeyValues")
12984	// to unconditionally include in API requests. By default, fields with
12985	// empty values are omitted from API requests. However, any non-pointer,
12986	// non-interface field appearing in ForceSendFields will be sent to the
12987	// server regardless of whether the field is empty or not. This may be
12988	// used to include empty fields in Patch requests.
12989	ForceSendFields []string `json:"-"`
12990
12991	// NullFields is a list of field names (e.g. "AdditionalKeyValues") to
12992	// include in API requests with the JSON null value. By default, fields
12993	// with empty values are omitted from API requests. However, any field
12994	// with an empty value appearing in NullFields will be sent to the
12995	// server as null. It is an error if a field in this list has a
12996	// non-empty value. This may be used to include null fields in Patch
12997	// requests.
12998	NullFields []string `json:"-"`
12999}
13000
13001func (s *TagSetting) MarshalJSON() ([]byte, error) {
13002	type NoMethod TagSetting
13003	raw := NoMethod(*s)
13004	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13005}
13006
13007// TagSettings: Dynamic and Image Tag Settings.
13008type TagSettings struct {
13009	// DynamicTagEnabled: Whether dynamic floodlight tags are enabled.
13010	DynamicTagEnabled bool `json:"dynamicTagEnabled,omitempty"`
13011
13012	// ImageTagEnabled: Whether image tags are enabled.
13013	ImageTagEnabled bool `json:"imageTagEnabled,omitempty"`
13014
13015	// ForceSendFields is a list of field names (e.g. "DynamicTagEnabled")
13016	// to unconditionally include in API requests. By default, fields with
13017	// empty values are omitted from API requests. However, any non-pointer,
13018	// non-interface field appearing in ForceSendFields will be sent to the
13019	// server regardless of whether the field is empty or not. This may be
13020	// used to include empty fields in Patch requests.
13021	ForceSendFields []string `json:"-"`
13022
13023	// NullFields is a list of field names (e.g. "DynamicTagEnabled") to
13024	// include in API requests with the JSON null value. By default, fields
13025	// with empty values are omitted from API requests. However, any field
13026	// with an empty value appearing in NullFields will be sent to the
13027	// server as null. It is an error if a field in this list has a
13028	// non-empty value. This may be used to include null fields in Patch
13029	// requests.
13030	NullFields []string `json:"-"`
13031}
13032
13033func (s *TagSettings) MarshalJSON() ([]byte, error) {
13034	type NoMethod TagSettings
13035	raw := NoMethod(*s)
13036	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13037}
13038
13039// TargetWindow: Target Window.
13040type TargetWindow struct {
13041	// CustomHtml: User-entered value.
13042	CustomHtml string `json:"customHtml,omitempty"`
13043
13044	// TargetWindowOption: Type of browser window for which the backup image
13045	// of the flash creative can be displayed.
13046	//
13047	// Possible values:
13048	//   "CURRENT_WINDOW"
13049	//   "CUSTOM"
13050	//   "NEW_WINDOW"
13051	TargetWindowOption string `json:"targetWindowOption,omitempty"`
13052
13053	// ForceSendFields is a list of field names (e.g. "CustomHtml") to
13054	// unconditionally include in API requests. By default, fields with
13055	// empty values are omitted from API requests. However, any non-pointer,
13056	// non-interface field appearing in ForceSendFields will be sent to the
13057	// server regardless of whether the field is empty or not. This may be
13058	// used to include empty fields in Patch requests.
13059	ForceSendFields []string `json:"-"`
13060
13061	// NullFields is a list of field names (e.g. "CustomHtml") to include in
13062	// API requests with the JSON null value. By default, fields with empty
13063	// values are omitted from API requests. However, any field with an
13064	// empty value appearing in NullFields will be sent to the server as
13065	// null. It is an error if a field in this list has a non-empty value.
13066	// This may be used to include null fields in Patch requests.
13067	NullFields []string `json:"-"`
13068}
13069
13070func (s *TargetWindow) MarshalJSON() ([]byte, error) {
13071	type NoMethod TargetWindow
13072	raw := NoMethod(*s)
13073	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13074}
13075
13076// TargetableRemarketingList: Contains properties of a targetable
13077// remarketing list. Remarketing enables you to create lists of users
13078// who have performed specific actions on a site, then target ads to
13079// members of those lists. This resource is a read-only view of a
13080// remarketing list to be used to faciliate targeting ads to specific
13081// lists. Remarketing lists that are owned by your advertisers and those
13082// that are shared to your advertisers or account are accessible via
13083// this resource. To manage remarketing lists that are owned by your
13084// advertisers, use the RemarketingLists resource.
13085type TargetableRemarketingList struct {
13086	// AccountId: Account ID of this remarketing list. This is a read-only,
13087	// auto-generated field that is only returned in GET requests.
13088	AccountId int64 `json:"accountId,omitempty,string"`
13089
13090	// Active: Whether this targetable remarketing list is active.
13091	Active bool `json:"active,omitempty"`
13092
13093	// AdvertiserId: Dimension value for the advertiser ID that owns this
13094	// targetable remarketing list.
13095	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13096
13097	// AdvertiserIdDimensionValue: Dimension value for the ID of the
13098	// advertiser.
13099	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
13100
13101	// Description: Targetable remarketing list description.
13102	Description string `json:"description,omitempty"`
13103
13104	// Id: Targetable remarketing list ID.
13105	Id int64 `json:"id,omitempty,string"`
13106
13107	// Kind: Identifies what kind of resource this is. Value: the fixed
13108	// string "dfareporting#targetableRemarketingList".
13109	Kind string `json:"kind,omitempty"`
13110
13111	// LifeSpan: Number of days that a user should remain in the targetable
13112	// remarketing list without an impression.
13113	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
13114
13115	// ListSize: Number of users currently in the list. This is a read-only
13116	// field.
13117	ListSize int64 `json:"listSize,omitempty,string"`
13118
13119	// ListSource: Product from which this targetable remarketing list was
13120	// originated.
13121	//
13122	// Possible values:
13123	//   "REMARKETING_LIST_SOURCE_ADX"
13124	//   "REMARKETING_LIST_SOURCE_DBM"
13125	//   "REMARKETING_LIST_SOURCE_DFA"
13126	//   "REMARKETING_LIST_SOURCE_DFP"
13127	//   "REMARKETING_LIST_SOURCE_DMP"
13128	//   "REMARKETING_LIST_SOURCE_GA"
13129	//   "REMARKETING_LIST_SOURCE_GPLUS"
13130	//   "REMARKETING_LIST_SOURCE_OTHER"
13131	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
13132	//   "REMARKETING_LIST_SOURCE_XFP"
13133	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
13134	ListSource string `json:"listSource,omitempty"`
13135
13136	// Name: Name of the targetable remarketing list. Is no greater than 128
13137	// characters long.
13138	Name string `json:"name,omitempty"`
13139
13140	// SubaccountId: Subaccount ID of this remarketing list. This is a
13141	// read-only, auto-generated field that is only returned in GET
13142	// requests.
13143	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13144
13145	// ServerResponse contains the HTTP response code and headers from the
13146	// server.
13147	googleapi.ServerResponse `json:"-"`
13148
13149	// ForceSendFields is a list of field names (e.g. "AccountId") to
13150	// unconditionally include in API requests. By default, fields with
13151	// empty values are omitted from API requests. However, any non-pointer,
13152	// non-interface field appearing in ForceSendFields will be sent to the
13153	// server regardless of whether the field is empty or not. This may be
13154	// used to include empty fields in Patch requests.
13155	ForceSendFields []string `json:"-"`
13156
13157	// NullFields is a list of field names (e.g. "AccountId") to include in
13158	// API requests with the JSON null value. By default, fields with empty
13159	// values are omitted from API requests. However, any field with an
13160	// empty value appearing in NullFields will be sent to the server as
13161	// null. It is an error if a field in this list has a non-empty value.
13162	// This may be used to include null fields in Patch requests.
13163	NullFields []string `json:"-"`
13164}
13165
13166func (s *TargetableRemarketingList) MarshalJSON() ([]byte, error) {
13167	type NoMethod TargetableRemarketingList
13168	raw := NoMethod(*s)
13169	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13170}
13171
13172// TargetableRemarketingListsListResponse: Targetable remarketing list
13173// response
13174type TargetableRemarketingListsListResponse struct {
13175	// Kind: Identifies what kind of resource this is. Value: the fixed
13176	// string "dfareporting#targetableRemarketingListsListResponse".
13177	Kind string `json:"kind,omitempty"`
13178
13179	// NextPageToken: Pagination token to be used for the next list
13180	// operation.
13181	NextPageToken string `json:"nextPageToken,omitempty"`
13182
13183	// TargetableRemarketingLists: Targetable remarketing list collection.
13184	TargetableRemarketingLists []*TargetableRemarketingList `json:"targetableRemarketingLists,omitempty"`
13185
13186	// ServerResponse contains the HTTP response code and headers from the
13187	// server.
13188	googleapi.ServerResponse `json:"-"`
13189
13190	// ForceSendFields is a list of field names (e.g. "Kind") to
13191	// unconditionally include in API requests. By default, fields with
13192	// empty values are omitted from API requests. However, any non-pointer,
13193	// non-interface field appearing in ForceSendFields will be sent to the
13194	// server regardless of whether the field is empty or not. This may be
13195	// used to include empty fields in Patch requests.
13196	ForceSendFields []string `json:"-"`
13197
13198	// NullFields is a list of field names (e.g. "Kind") to include in API
13199	// requests with the JSON null value. By default, fields with empty
13200	// values are omitted from API requests. However, any field with an
13201	// empty value appearing in NullFields will be sent to the server as
13202	// null. It is an error if a field in this list has a non-empty value.
13203	// This may be used to include null fields in Patch requests.
13204	NullFields []string `json:"-"`
13205}
13206
13207func (s *TargetableRemarketingListsListResponse) MarshalJSON() ([]byte, error) {
13208	type NoMethod TargetableRemarketingListsListResponse
13209	raw := NoMethod(*s)
13210	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13211}
13212
13213// TargetingTemplate: Contains properties of a targeting template. A
13214// targeting template encapsulates targeting information which can be
13215// reused across multiple ads.
13216type TargetingTemplate struct {
13217	// AccountId: Account ID of this targeting template. This field, if left
13218	// unset, will be auto-generated on insert and is read-only after
13219	// insert.
13220	AccountId int64 `json:"accountId,omitempty,string"`
13221
13222	// AdvertiserId: Advertiser ID of this targeting template. This is a
13223	// required field on insert and is read-only after insert.
13224	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13225
13226	// AdvertiserIdDimensionValue: Dimension value for the ID of the
13227	// advertiser. This is a read-only, auto-generated field.
13228	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
13229
13230	// DayPartTargeting: Time and day targeting criteria.
13231	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
13232
13233	// GeoTargeting: Geographical targeting criteria.
13234	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
13235
13236	// Id: ID of this targeting template. This is a read-only,
13237	// auto-generated field.
13238	Id int64 `json:"id,omitempty,string"`
13239
13240	// KeyValueTargetingExpression: Key-value targeting criteria.
13241	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
13242
13243	// Kind: Identifies what kind of resource this is. Value: the fixed
13244	// string "dfareporting#targetingTemplate".
13245	Kind string `json:"kind,omitempty"`
13246
13247	// LanguageTargeting: Language targeting criteria.
13248	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
13249
13250	// ListTargetingExpression: Remarketing list targeting criteria.
13251	ListTargetingExpression *ListTargetingExpression `json:"listTargetingExpression,omitempty"`
13252
13253	// Name: Name of this targeting template. This field is required. It
13254	// must be less than 256 characters long and unique within an
13255	// advertiser.
13256	Name string `json:"name,omitempty"`
13257
13258	// SubaccountId: Subaccount ID of this targeting template. This field,
13259	// if left unset, will be auto-generated on insert and is read-only
13260	// after insert.
13261	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13262
13263	// TechnologyTargeting: Technology platform targeting criteria.
13264	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
13265
13266	// ServerResponse contains the HTTP response code and headers from the
13267	// server.
13268	googleapi.ServerResponse `json:"-"`
13269
13270	// ForceSendFields is a list of field names (e.g. "AccountId") to
13271	// unconditionally include in API requests. By default, fields with
13272	// empty values are omitted from API requests. However, any non-pointer,
13273	// non-interface field appearing in ForceSendFields will be sent to the
13274	// server regardless of whether the field is empty or not. This may be
13275	// used to include empty fields in Patch requests.
13276	ForceSendFields []string `json:"-"`
13277
13278	// NullFields is a list of field names (e.g. "AccountId") to include in
13279	// API requests with the JSON null value. By default, fields with empty
13280	// values are omitted from API requests. However, any field with an
13281	// empty value appearing in NullFields will be sent to the server as
13282	// null. It is an error if a field in this list has a non-empty value.
13283	// This may be used to include null fields in Patch requests.
13284	NullFields []string `json:"-"`
13285}
13286
13287func (s *TargetingTemplate) MarshalJSON() ([]byte, error) {
13288	type NoMethod TargetingTemplate
13289	raw := NoMethod(*s)
13290	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13291}
13292
13293// TargetingTemplatesListResponse: Targeting Template List Response
13294type TargetingTemplatesListResponse struct {
13295	// Kind: Identifies what kind of resource this is. Value: the fixed
13296	// string "dfareporting#targetingTemplatesListResponse".
13297	Kind string `json:"kind,omitempty"`
13298
13299	// NextPageToken: Pagination token to be used for the next list
13300	// operation.
13301	NextPageToken string `json:"nextPageToken,omitempty"`
13302
13303	// TargetingTemplates: Targeting template collection.
13304	TargetingTemplates []*TargetingTemplate `json:"targetingTemplates,omitempty"`
13305
13306	// ServerResponse contains the HTTP response code and headers from the
13307	// server.
13308	googleapi.ServerResponse `json:"-"`
13309
13310	// ForceSendFields is a list of field names (e.g. "Kind") to
13311	// unconditionally include in API requests. By default, fields with
13312	// empty values are omitted from API requests. However, any non-pointer,
13313	// non-interface field appearing in ForceSendFields will be sent to the
13314	// server regardless of whether the field is empty or not. This may be
13315	// used to include empty fields in Patch requests.
13316	ForceSendFields []string `json:"-"`
13317
13318	// NullFields is a list of field names (e.g. "Kind") to include in API
13319	// requests with the JSON null value. By default, fields with empty
13320	// values are omitted from API requests. However, any field with an
13321	// empty value appearing in NullFields will be sent to the server as
13322	// null. It is an error if a field in this list has a non-empty value.
13323	// This may be used to include null fields in Patch requests.
13324	NullFields []string `json:"-"`
13325}
13326
13327func (s *TargetingTemplatesListResponse) MarshalJSON() ([]byte, error) {
13328	type NoMethod TargetingTemplatesListResponse
13329	raw := NoMethod(*s)
13330	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13331}
13332
13333// TechnologyTargeting: Technology Targeting.
13334type TechnologyTargeting struct {
13335	// Browsers: Browsers that this ad targets. For each browser either set
13336	// browserVersionId or dartId along with the version numbers. If both
13337	// are specified, only browserVersionId will be used. The other fields
13338	// are populated automatically when the ad is inserted or updated.
13339	Browsers []*Browser `json:"browsers,omitempty"`
13340
13341	// ConnectionTypes: Connection types that this ad targets. For each
13342	// connection type only id is required. The other fields are populated
13343	// automatically when the ad is inserted or updated.
13344	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
13345
13346	// MobileCarriers: Mobile carriers that this ad targets. For each mobile
13347	// carrier only id is required, and the other fields are populated
13348	// automatically when the ad is inserted or updated. If targeting a
13349	// mobile carrier, do not set targeting for any zip codes.
13350	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
13351
13352	// OperatingSystemVersions: Operating system versions that this ad
13353	// targets. To target all versions, use operatingSystems. For each
13354	// operating system version, only id is required. The other fields are
13355	// populated automatically when the ad is inserted or updated. If
13356	// targeting an operating system version, do not set targeting for the
13357	// corresponding operating system in operatingSystems.
13358	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
13359
13360	// OperatingSystems: Operating systems that this ad targets. To target
13361	// specific versions, use operatingSystemVersions. For each operating
13362	// system only dartId is required. The other fields are populated
13363	// automatically when the ad is inserted or updated. If targeting an
13364	// operating system, do not set targeting for operating system versions
13365	// for the same operating system.
13366	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
13367
13368	// PlatformTypes: Platform types that this ad targets. For example,
13369	// desktop, mobile, or tablet. For each platform type, only id is
13370	// required, and the other fields are populated automatically when the
13371	// ad is inserted or updated.
13372	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
13373
13374	// ForceSendFields is a list of field names (e.g. "Browsers") to
13375	// unconditionally include in API requests. By default, fields with
13376	// empty values are omitted from API requests. However, any non-pointer,
13377	// non-interface field appearing in ForceSendFields will be sent to the
13378	// server regardless of whether the field is empty or not. This may be
13379	// used to include empty fields in Patch requests.
13380	ForceSendFields []string `json:"-"`
13381
13382	// NullFields is a list of field names (e.g. "Browsers") to include in
13383	// API requests with the JSON null value. By default, fields with empty
13384	// values are omitted from API requests. However, any field with an
13385	// empty value appearing in NullFields will be sent to the server as
13386	// null. It is an error if a field in this list has a non-empty value.
13387	// This may be used to include null fields in Patch requests.
13388	NullFields []string `json:"-"`
13389}
13390
13391func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) {
13392	type NoMethod TechnologyTargeting
13393	raw := NoMethod(*s)
13394	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13395}
13396
13397// ThirdPartyAuthenticationToken: Third Party Authentication Token
13398type ThirdPartyAuthenticationToken struct {
13399	// Name: Name of the third-party authentication token.
13400	Name string `json:"name,omitempty"`
13401
13402	// Value: Value of the third-party authentication token. This is a
13403	// read-only, auto-generated field.
13404	Value string `json:"value,omitempty"`
13405
13406	// ForceSendFields is a list of field names (e.g. "Name") to
13407	// unconditionally include in API requests. By default, fields with
13408	// empty values are omitted from API requests. However, any non-pointer,
13409	// non-interface field appearing in ForceSendFields will be sent to the
13410	// server regardless of whether the field is empty or not. This may be
13411	// used to include empty fields in Patch requests.
13412	ForceSendFields []string `json:"-"`
13413
13414	// NullFields is a list of field names (e.g. "Name") to include in API
13415	// requests with the JSON null value. By default, fields with empty
13416	// values are omitted from API requests. However, any field with an
13417	// empty value appearing in NullFields will be sent to the server as
13418	// null. It is an error if a field in this list has a non-empty value.
13419	// This may be used to include null fields in Patch requests.
13420	NullFields []string `json:"-"`
13421}
13422
13423func (s *ThirdPartyAuthenticationToken) MarshalJSON() ([]byte, error) {
13424	type NoMethod ThirdPartyAuthenticationToken
13425	raw := NoMethod(*s)
13426	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13427}
13428
13429// ThirdPartyTrackingUrl: Third-party Tracking URL.
13430type ThirdPartyTrackingUrl struct {
13431	// ThirdPartyUrlType: Third-party URL type for in-stream video and
13432	// in-stream audio creatives.
13433	//
13434	// Possible values:
13435	//   "CLICK_TRACKING"
13436	//   "IMPRESSION"
13437	//   "RICH_MEDIA_BACKUP_IMPRESSION"
13438	//   "RICH_MEDIA_IMPRESSION"
13439	//   "RICH_MEDIA_RM_IMPRESSION"
13440	//   "SURVEY"
13441	//   "VIDEO_COMPLETE"
13442	//   "VIDEO_CUSTOM"
13443	//   "VIDEO_FIRST_QUARTILE"
13444	//   "VIDEO_FULLSCREEN"
13445	//   "VIDEO_MIDPOINT"
13446	//   "VIDEO_MUTE"
13447	//   "VIDEO_PAUSE"
13448	//   "VIDEO_PROGRESS"
13449	//   "VIDEO_REWIND"
13450	//   "VIDEO_SKIP"
13451	//   "VIDEO_START"
13452	//   "VIDEO_STOP"
13453	//   "VIDEO_THIRD_QUARTILE"
13454	ThirdPartyUrlType string `json:"thirdPartyUrlType,omitempty"`
13455
13456	// Url: URL for the specified third-party URL type.
13457	Url string `json:"url,omitempty"`
13458
13459	// ForceSendFields is a list of field names (e.g. "ThirdPartyUrlType")
13460	// to unconditionally include in API requests. By default, fields with
13461	// empty values are omitted from API requests. However, any non-pointer,
13462	// non-interface field appearing in ForceSendFields will be sent to the
13463	// server regardless of whether the field is empty or not. This may be
13464	// used to include empty fields in Patch requests.
13465	ForceSendFields []string `json:"-"`
13466
13467	// NullFields is a list of field names (e.g. "ThirdPartyUrlType") to
13468	// include in API requests with the JSON null value. By default, fields
13469	// with empty values are omitted from API requests. However, any field
13470	// with an empty value appearing in NullFields will be sent to the
13471	// server as null. It is an error if a field in this list has a
13472	// non-empty value. This may be used to include null fields in Patch
13473	// requests.
13474	NullFields []string `json:"-"`
13475}
13476
13477func (s *ThirdPartyTrackingUrl) MarshalJSON() ([]byte, error) {
13478	type NoMethod ThirdPartyTrackingUrl
13479	raw := NoMethod(*s)
13480	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13481}
13482
13483// TranscodeSetting: Transcode Settings
13484type TranscodeSetting struct {
13485	// EnabledVideoFormats: Whitelist of video formats to be served to this
13486	// placement. Set this list to null or empty to serve all video formats.
13487	EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
13488
13489	// Kind: Identifies what kind of resource this is. Value: the fixed
13490	// string "dfareporting#transcodeSetting".
13491	Kind string `json:"kind,omitempty"`
13492
13493	// ForceSendFields is a list of field names (e.g. "EnabledVideoFormats")
13494	// to unconditionally include in API requests. By default, fields with
13495	// empty values are omitted from API requests. However, any non-pointer,
13496	// non-interface field appearing in ForceSendFields will be sent to the
13497	// server regardless of whether the field is empty or not. This may be
13498	// used to include empty fields in Patch requests.
13499	ForceSendFields []string `json:"-"`
13500
13501	// NullFields is a list of field names (e.g. "EnabledVideoFormats") to
13502	// include in API requests with the JSON null value. By default, fields
13503	// with empty values are omitted from API requests. However, any field
13504	// with an empty value appearing in NullFields will be sent to the
13505	// server as null. It is an error if a field in this list has a
13506	// non-empty value. This may be used to include null fields in Patch
13507	// requests.
13508	NullFields []string `json:"-"`
13509}
13510
13511func (s *TranscodeSetting) MarshalJSON() ([]byte, error) {
13512	type NoMethod TranscodeSetting
13513	raw := NoMethod(*s)
13514	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13515}
13516
13517// UniversalAdId: A Universal Ad ID as per the VAST 4.0 spec. Applicable
13518// to the following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and
13519// VPAID.
13520type UniversalAdId struct {
13521	// Registry: Registry used for the Ad ID value.
13522	//
13523	// Possible values:
13524	//   "AD_ID.ORG"
13525	//   "CLEARCAST"
13526	//   "DCM"
13527	//   "OTHER"
13528	Registry string `json:"registry,omitempty"`
13529
13530	// Value: ID value for this creative. Only alphanumeric characters and
13531	// the following symbols are valid: "_/\-". Maximum length is 64
13532	// characters. Read only when registry is DCM.
13533	Value string `json:"value,omitempty"`
13534
13535	// ForceSendFields is a list of field names (e.g. "Registry") to
13536	// unconditionally include in API requests. By default, fields with
13537	// empty values are omitted from API requests. However, any non-pointer,
13538	// non-interface field appearing in ForceSendFields will be sent to the
13539	// server regardless of whether the field is empty or not. This may be
13540	// used to include empty fields in Patch requests.
13541	ForceSendFields []string `json:"-"`
13542
13543	// NullFields is a list of field names (e.g. "Registry") to include in
13544	// API requests with the JSON null value. By default, fields with empty
13545	// values are omitted from API requests. However, any field with an
13546	// empty value appearing in NullFields will be sent to the server as
13547	// null. It is an error if a field in this list has a non-empty value.
13548	// This may be used to include null fields in Patch requests.
13549	NullFields []string `json:"-"`
13550}
13551
13552func (s *UniversalAdId) MarshalJSON() ([]byte, error) {
13553	type NoMethod UniversalAdId
13554	raw := NoMethod(*s)
13555	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13556}
13557
13558// UserDefinedVariableConfiguration: User Defined Variable
13559// configuration.
13560type UserDefinedVariableConfiguration struct {
13561	// DataType: Data type for the variable. This is a required field.
13562	//
13563	// Possible values:
13564	//   "NUMBER"
13565	//   "STRING"
13566	DataType string `json:"dataType,omitempty"`
13567
13568	// ReportName: User-friendly name for the variable which will appear in
13569	// reports. This is a required field, must be less than 64 characters
13570	// long, and cannot contain the following characters: ""<>".
13571	ReportName string `json:"reportName,omitempty"`
13572
13573	// VariableType: Variable name in the tag. This is a required field.
13574	//
13575	// Possible values:
13576	//   "U1"
13577	//   "U10"
13578	//   "U100"
13579	//   "U11"
13580	//   "U12"
13581	//   "U13"
13582	//   "U14"
13583	//   "U15"
13584	//   "U16"
13585	//   "U17"
13586	//   "U18"
13587	//   "U19"
13588	//   "U2"
13589	//   "U20"
13590	//   "U21"
13591	//   "U22"
13592	//   "U23"
13593	//   "U24"
13594	//   "U25"
13595	//   "U26"
13596	//   "U27"
13597	//   "U28"
13598	//   "U29"
13599	//   "U3"
13600	//   "U30"
13601	//   "U31"
13602	//   "U32"
13603	//   "U33"
13604	//   "U34"
13605	//   "U35"
13606	//   "U36"
13607	//   "U37"
13608	//   "U38"
13609	//   "U39"
13610	//   "U4"
13611	//   "U40"
13612	//   "U41"
13613	//   "U42"
13614	//   "U43"
13615	//   "U44"
13616	//   "U45"
13617	//   "U46"
13618	//   "U47"
13619	//   "U48"
13620	//   "U49"
13621	//   "U5"
13622	//   "U50"
13623	//   "U51"
13624	//   "U52"
13625	//   "U53"
13626	//   "U54"
13627	//   "U55"
13628	//   "U56"
13629	//   "U57"
13630	//   "U58"
13631	//   "U59"
13632	//   "U6"
13633	//   "U60"
13634	//   "U61"
13635	//   "U62"
13636	//   "U63"
13637	//   "U64"
13638	//   "U65"
13639	//   "U66"
13640	//   "U67"
13641	//   "U68"
13642	//   "U69"
13643	//   "U7"
13644	//   "U70"
13645	//   "U71"
13646	//   "U72"
13647	//   "U73"
13648	//   "U74"
13649	//   "U75"
13650	//   "U76"
13651	//   "U77"
13652	//   "U78"
13653	//   "U79"
13654	//   "U8"
13655	//   "U80"
13656	//   "U81"
13657	//   "U82"
13658	//   "U83"
13659	//   "U84"
13660	//   "U85"
13661	//   "U86"
13662	//   "U87"
13663	//   "U88"
13664	//   "U89"
13665	//   "U9"
13666	//   "U90"
13667	//   "U91"
13668	//   "U92"
13669	//   "U93"
13670	//   "U94"
13671	//   "U95"
13672	//   "U96"
13673	//   "U97"
13674	//   "U98"
13675	//   "U99"
13676	VariableType string `json:"variableType,omitempty"`
13677
13678	// ForceSendFields is a list of field names (e.g. "DataType") to
13679	// unconditionally include in API requests. By default, fields with
13680	// empty values are omitted from API requests. However, any non-pointer,
13681	// non-interface field appearing in ForceSendFields will be sent to the
13682	// server regardless of whether the field is empty or not. This may be
13683	// used to include empty fields in Patch requests.
13684	ForceSendFields []string `json:"-"`
13685
13686	// NullFields is a list of field names (e.g. "DataType") to include in
13687	// API requests with the JSON null value. By default, fields with empty
13688	// values are omitted from API requests. However, any field with an
13689	// empty value appearing in NullFields will be sent to the server as
13690	// null. It is an error if a field in this list has a non-empty value.
13691	// This may be used to include null fields in Patch requests.
13692	NullFields []string `json:"-"`
13693}
13694
13695func (s *UserDefinedVariableConfiguration) MarshalJSON() ([]byte, error) {
13696	type NoMethod UserDefinedVariableConfiguration
13697	raw := NoMethod(*s)
13698	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13699}
13700
13701// UserProfile: Represents a UserProfile resource.
13702type UserProfile struct {
13703	// AccountId: The account ID to which this profile belongs.
13704	AccountId int64 `json:"accountId,omitempty,string"`
13705
13706	// AccountName: The account name this profile belongs to.
13707	AccountName string `json:"accountName,omitempty"`
13708
13709	// Etag: The eTag of this response for caching purposes.
13710	Etag string `json:"etag,omitempty"`
13711
13712	// Kind: The kind of resource this is, in this case
13713	// dfareporting#userProfile.
13714	Kind string `json:"kind,omitempty"`
13715
13716	// ProfileId: The unique ID of the user profile.
13717	ProfileId int64 `json:"profileId,omitempty,string"`
13718
13719	// SubAccountId: The sub account ID this profile belongs to if
13720	// applicable.
13721	SubAccountId int64 `json:"subAccountId,omitempty,string"`
13722
13723	// SubAccountName: The sub account name this profile belongs to if
13724	// applicable.
13725	SubAccountName string `json:"subAccountName,omitempty"`
13726
13727	// UserName: The user name.
13728	UserName string `json:"userName,omitempty"`
13729
13730	// ServerResponse contains the HTTP response code and headers from the
13731	// server.
13732	googleapi.ServerResponse `json:"-"`
13733
13734	// ForceSendFields is a list of field names (e.g. "AccountId") to
13735	// unconditionally include in API requests. By default, fields with
13736	// empty values are omitted from API requests. However, any non-pointer,
13737	// non-interface field appearing in ForceSendFields will be sent to the
13738	// server regardless of whether the field is empty or not. This may be
13739	// used to include empty fields in Patch requests.
13740	ForceSendFields []string `json:"-"`
13741
13742	// NullFields is a list of field names (e.g. "AccountId") to include in
13743	// API requests with the JSON null value. By default, fields with empty
13744	// values are omitted from API requests. However, any field with an
13745	// empty value appearing in NullFields will be sent to the server as
13746	// null. It is an error if a field in this list has a non-empty value.
13747	// This may be used to include null fields in Patch requests.
13748	NullFields []string `json:"-"`
13749}
13750
13751func (s *UserProfile) MarshalJSON() ([]byte, error) {
13752	type NoMethod UserProfile
13753	raw := NoMethod(*s)
13754	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13755}
13756
13757// UserProfileList: Represents the list of user profiles.
13758type UserProfileList struct {
13759	// Etag: The eTag of this response for caching purposes.
13760	Etag string `json:"etag,omitempty"`
13761
13762	// Items: The user profiles returned in this response.
13763	Items []*UserProfile `json:"items,omitempty"`
13764
13765	// Kind: The kind of list this is, in this case
13766	// dfareporting#userProfileList.
13767	Kind string `json:"kind,omitempty"`
13768
13769	// ServerResponse contains the HTTP response code and headers from the
13770	// server.
13771	googleapi.ServerResponse `json:"-"`
13772
13773	// ForceSendFields is a list of field names (e.g. "Etag") to
13774	// unconditionally include in API requests. By default, fields with
13775	// empty values are omitted from API requests. However, any non-pointer,
13776	// non-interface field appearing in ForceSendFields will be sent to the
13777	// server regardless of whether the field is empty or not. This may be
13778	// used to include empty fields in Patch requests.
13779	ForceSendFields []string `json:"-"`
13780
13781	// NullFields is a list of field names (e.g. "Etag") to include in API
13782	// requests with the JSON null value. By default, fields with empty
13783	// values are omitted from API requests. However, any field with an
13784	// empty value appearing in NullFields will be sent to the server as
13785	// null. It is an error if a field in this list has a non-empty value.
13786	// This may be used to include null fields in Patch requests.
13787	NullFields []string `json:"-"`
13788}
13789
13790func (s *UserProfileList) MarshalJSON() ([]byte, error) {
13791	type NoMethod UserProfileList
13792	raw := NoMethod(*s)
13793	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13794}
13795
13796// UserRole: Contains properties of auser role, which is used to manage
13797// user access.
13798type UserRole struct {
13799	// AccountId: Account ID of this user role. This is a read-only field
13800	// that can be left blank.
13801	AccountId int64 `json:"accountId,omitempty,string"`
13802
13803	// DefaultUserRole: Whether this is a default user role. Default user
13804	// roles are created by the system for the account/subaccount and cannot
13805	// be modified or deleted. Each default user role comes with a basic set
13806	// of preassigned permissions.
13807	DefaultUserRole bool `json:"defaultUserRole,omitempty"`
13808
13809	// Id: ID of this user role. This is a read-only, auto-generated field.
13810	Id int64 `json:"id,omitempty,string"`
13811
13812	// Kind: Identifies what kind of resource this is. Value: the fixed
13813	// string "dfareporting#userRole".
13814	Kind string `json:"kind,omitempty"`
13815
13816	// Name: Name of this user role. This is a required field. Must be less
13817	// than 256 characters long. If this user role is under a subaccount,
13818	// the name must be unique among sites of the same subaccount.
13819	// Otherwise, this user role is a top-level user role, and the name must
13820	// be unique among top-level user roles of the same account.
13821	Name string `json:"name,omitempty"`
13822
13823	// ParentUserRoleId: ID of the user role that this user role is based on
13824	// or copied from. This is a required field.
13825	ParentUserRoleId int64 `json:"parentUserRoleId,omitempty,string"`
13826
13827	// Permissions: List of permissions associated with this user role.
13828	Permissions []*UserRolePermission `json:"permissions,omitempty"`
13829
13830	// SubaccountId: Subaccount ID of this user role. This is a read-only
13831	// field that can be left blank.
13832	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13833
13834	// ServerResponse contains the HTTP response code and headers from the
13835	// server.
13836	googleapi.ServerResponse `json:"-"`
13837
13838	// ForceSendFields is a list of field names (e.g. "AccountId") to
13839	// unconditionally include in API requests. By default, fields with
13840	// empty values are omitted from API requests. However, any non-pointer,
13841	// non-interface field appearing in ForceSendFields will be sent to the
13842	// server regardless of whether the field is empty or not. This may be
13843	// used to include empty fields in Patch requests.
13844	ForceSendFields []string `json:"-"`
13845
13846	// NullFields is a list of field names (e.g. "AccountId") to include in
13847	// API requests with the JSON null value. By default, fields with empty
13848	// values are omitted from API requests. However, any field with an
13849	// empty value appearing in NullFields will be sent to the server as
13850	// null. It is an error if a field in this list has a non-empty value.
13851	// This may be used to include null fields in Patch requests.
13852	NullFields []string `json:"-"`
13853}
13854
13855func (s *UserRole) MarshalJSON() ([]byte, error) {
13856	type NoMethod UserRole
13857	raw := NoMethod(*s)
13858	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13859}
13860
13861// UserRolePermission: Contains properties of a user role permission.
13862type UserRolePermission struct {
13863	// Availability: Levels of availability for a user role permission.
13864	//
13865	// Possible values:
13866	//   "ACCOUNT_ALWAYS"
13867	//   "ACCOUNT_BY_DEFAULT"
13868	//   "NOT_AVAILABLE_BY_DEFAULT"
13869	//   "SUBACCOUNT_AND_ACCOUNT_ALWAYS"
13870	//   "SUBACCOUNT_AND_ACCOUNT_BY_DEFAULT"
13871	Availability string `json:"availability,omitempty"`
13872
13873	// Id: ID of this user role permission.
13874	Id int64 `json:"id,omitempty,string"`
13875
13876	// Kind: Identifies what kind of resource this is. Value: the fixed
13877	// string "dfareporting#userRolePermission".
13878	Kind string `json:"kind,omitempty"`
13879
13880	// Name: Name of this user role permission.
13881	Name string `json:"name,omitempty"`
13882
13883	// PermissionGroupId: ID of the permission group that this user role
13884	// permission belongs to.
13885	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
13886
13887	// ServerResponse contains the HTTP response code and headers from the
13888	// server.
13889	googleapi.ServerResponse `json:"-"`
13890
13891	// ForceSendFields is a list of field names (e.g. "Availability") to
13892	// unconditionally include in API requests. By default, fields with
13893	// empty values are omitted from API requests. However, any non-pointer,
13894	// non-interface field appearing in ForceSendFields will be sent to the
13895	// server regardless of whether the field is empty or not. This may be
13896	// used to include empty fields in Patch requests.
13897	ForceSendFields []string `json:"-"`
13898
13899	// NullFields is a list of field names (e.g. "Availability") to include
13900	// in API requests with the JSON null value. By default, fields with
13901	// empty values are omitted from API requests. However, any field with
13902	// an empty value appearing in NullFields will be sent to the server as
13903	// null. It is an error if a field in this list has a non-empty value.
13904	// This may be used to include null fields in Patch requests.
13905	NullFields []string `json:"-"`
13906}
13907
13908func (s *UserRolePermission) MarshalJSON() ([]byte, error) {
13909	type NoMethod UserRolePermission
13910	raw := NoMethod(*s)
13911	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13912}
13913
13914// UserRolePermissionGroup: Represents a grouping of related user role
13915// permissions.
13916type UserRolePermissionGroup struct {
13917	// Id: ID of this user role permission.
13918	Id int64 `json:"id,omitempty,string"`
13919
13920	// Kind: Identifies what kind of resource this is. Value: the fixed
13921	// string "dfareporting#userRolePermissionGroup".
13922	Kind string `json:"kind,omitempty"`
13923
13924	// Name: Name of this user role permission group.
13925	Name string `json:"name,omitempty"`
13926
13927	// ServerResponse contains the HTTP response code and headers from the
13928	// server.
13929	googleapi.ServerResponse `json:"-"`
13930
13931	// ForceSendFields is a list of field names (e.g. "Id") to
13932	// unconditionally include in API requests. By default, fields with
13933	// empty values are omitted from API requests. However, any non-pointer,
13934	// non-interface field appearing in ForceSendFields will be sent to the
13935	// server regardless of whether the field is empty or not. This may be
13936	// used to include empty fields in Patch requests.
13937	ForceSendFields []string `json:"-"`
13938
13939	// NullFields is a list of field names (e.g. "Id") to include in API
13940	// requests with the JSON null value. By default, fields with empty
13941	// values are omitted from API requests. However, any field with an
13942	// empty value appearing in NullFields will be sent to the server as
13943	// null. It is an error if a field in this list has a non-empty value.
13944	// This may be used to include null fields in Patch requests.
13945	NullFields []string `json:"-"`
13946}
13947
13948func (s *UserRolePermissionGroup) MarshalJSON() ([]byte, error) {
13949	type NoMethod UserRolePermissionGroup
13950	raw := NoMethod(*s)
13951	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13952}
13953
13954// UserRolePermissionGroupsListResponse: User Role Permission Group List
13955// Response
13956type UserRolePermissionGroupsListResponse struct {
13957	// Kind: Identifies what kind of resource this is. Value: the fixed
13958	// string "dfareporting#userRolePermissionGroupsListResponse".
13959	Kind string `json:"kind,omitempty"`
13960
13961	// UserRolePermissionGroups: User role permission group collection.
13962	UserRolePermissionGroups []*UserRolePermissionGroup `json:"userRolePermissionGroups,omitempty"`
13963
13964	// ServerResponse contains the HTTP response code and headers from the
13965	// server.
13966	googleapi.ServerResponse `json:"-"`
13967
13968	// ForceSendFields is a list of field names (e.g. "Kind") to
13969	// unconditionally include in API requests. By default, fields with
13970	// empty values are omitted from API requests. However, any non-pointer,
13971	// non-interface field appearing in ForceSendFields will be sent to the
13972	// server regardless of whether the field is empty or not. This may be
13973	// used to include empty fields in Patch requests.
13974	ForceSendFields []string `json:"-"`
13975
13976	// NullFields is a list of field names (e.g. "Kind") to include in API
13977	// requests with the JSON null value. By default, fields with empty
13978	// values are omitted from API requests. However, any field with an
13979	// empty value appearing in NullFields will be sent to the server as
13980	// null. It is an error if a field in this list has a non-empty value.
13981	// This may be used to include null fields in Patch requests.
13982	NullFields []string `json:"-"`
13983}
13984
13985func (s *UserRolePermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
13986	type NoMethod UserRolePermissionGroupsListResponse
13987	raw := NoMethod(*s)
13988	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13989}
13990
13991// UserRolePermissionsListResponse: User Role Permission List Response
13992type UserRolePermissionsListResponse struct {
13993	// Kind: Identifies what kind of resource this is. Value: the fixed
13994	// string "dfareporting#userRolePermissionsListResponse".
13995	Kind string `json:"kind,omitempty"`
13996
13997	// UserRolePermissions: User role permission collection.
13998	UserRolePermissions []*UserRolePermission `json:"userRolePermissions,omitempty"`
13999
14000	// ServerResponse contains the HTTP response code and headers from the
14001	// server.
14002	googleapi.ServerResponse `json:"-"`
14003
14004	// ForceSendFields is a list of field names (e.g. "Kind") to
14005	// unconditionally include in API requests. By default, fields with
14006	// empty values are omitted from API requests. However, any non-pointer,
14007	// non-interface field appearing in ForceSendFields will be sent to the
14008	// server regardless of whether the field is empty or not. This may be
14009	// used to include empty fields in Patch requests.
14010	ForceSendFields []string `json:"-"`
14011
14012	// NullFields is a list of field names (e.g. "Kind") to include in API
14013	// requests with the JSON null value. By default, fields with empty
14014	// values are omitted from API requests. However, any field with an
14015	// empty value appearing in NullFields will be sent to the server as
14016	// null. It is an error if a field in this list has a non-empty value.
14017	// This may be used to include null fields in Patch requests.
14018	NullFields []string `json:"-"`
14019}
14020
14021func (s *UserRolePermissionsListResponse) MarshalJSON() ([]byte, error) {
14022	type NoMethod UserRolePermissionsListResponse
14023	raw := NoMethod(*s)
14024	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14025}
14026
14027// UserRolesListResponse: User Role List Response
14028type UserRolesListResponse struct {
14029	// Kind: Identifies what kind of resource this is. Value: the fixed
14030	// string "dfareporting#userRolesListResponse".
14031	Kind string `json:"kind,omitempty"`
14032
14033	// NextPageToken: Pagination token to be used for the next list
14034	// operation.
14035	NextPageToken string `json:"nextPageToken,omitempty"`
14036
14037	// UserRoles: User role collection.
14038	UserRoles []*UserRole `json:"userRoles,omitempty"`
14039
14040	// ServerResponse contains the HTTP response code and headers from the
14041	// server.
14042	googleapi.ServerResponse `json:"-"`
14043
14044	// ForceSendFields is a list of field names (e.g. "Kind") to
14045	// unconditionally include in API requests. By default, fields with
14046	// empty values are omitted from API requests. However, any non-pointer,
14047	// non-interface field appearing in ForceSendFields will be sent to the
14048	// server regardless of whether the field is empty or not. This may be
14049	// used to include empty fields in Patch requests.
14050	ForceSendFields []string `json:"-"`
14051
14052	// NullFields is a list of field names (e.g. "Kind") to include in API
14053	// requests with the JSON null value. By default, fields with empty
14054	// values are omitted from API requests. However, any field with an
14055	// empty value appearing in NullFields will be sent to the server as
14056	// null. It is an error if a field in this list has a non-empty value.
14057	// This may be used to include null fields in Patch requests.
14058	NullFields []string `json:"-"`
14059}
14060
14061func (s *UserRolesListResponse) MarshalJSON() ([]byte, error) {
14062	type NoMethod UserRolesListResponse
14063	raw := NoMethod(*s)
14064	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14065}
14066
14067// VideoFormat: Contains information about supported video formats.
14068type VideoFormat struct {
14069	// FileType: File type of the video format.
14070	//
14071	// Possible values:
14072	//   "FLV"
14073	//   "M3U8"
14074	//   "MP4"
14075	//   "THREEGPP"
14076	//   "WEBM"
14077	FileType string `json:"fileType,omitempty"`
14078
14079	// Id: ID of the video format.
14080	Id int64 `json:"id,omitempty"`
14081
14082	// Kind: Identifies what kind of resource this is. Value: the fixed
14083	// string "dfareporting#videoFormat".
14084	Kind string `json:"kind,omitempty"`
14085
14086	// Resolution: The resolution of this video format.
14087	Resolution *Size `json:"resolution,omitempty"`
14088
14089	// TargetBitRate: The target bit rate of this video format.
14090	TargetBitRate int64 `json:"targetBitRate,omitempty"`
14091
14092	// ServerResponse contains the HTTP response code and headers from the
14093	// server.
14094	googleapi.ServerResponse `json:"-"`
14095
14096	// ForceSendFields is a list of field names (e.g. "FileType") to
14097	// unconditionally include in API requests. By default, fields with
14098	// empty values are omitted from API requests. However, any non-pointer,
14099	// non-interface field appearing in ForceSendFields will be sent to the
14100	// server regardless of whether the field is empty or not. This may be
14101	// used to include empty fields in Patch requests.
14102	ForceSendFields []string `json:"-"`
14103
14104	// NullFields is a list of field names (e.g. "FileType") to include in
14105	// API requests with the JSON null value. By default, fields with empty
14106	// values are omitted from API requests. However, any field with an
14107	// empty value appearing in NullFields will be sent to the server as
14108	// null. It is an error if a field in this list has a non-empty value.
14109	// This may be used to include null fields in Patch requests.
14110	NullFields []string `json:"-"`
14111}
14112
14113func (s *VideoFormat) MarshalJSON() ([]byte, error) {
14114	type NoMethod VideoFormat
14115	raw := NoMethod(*s)
14116	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14117}
14118
14119// VideoFormatsListResponse: Video Format List Response
14120type VideoFormatsListResponse struct {
14121	// Kind: Identifies what kind of resource this is. Value: the fixed
14122	// string "dfareporting#videoFormatsListResponse".
14123	Kind string `json:"kind,omitempty"`
14124
14125	// VideoFormats: Video format collection.
14126	VideoFormats []*VideoFormat `json:"videoFormats,omitempty"`
14127
14128	// ServerResponse contains the HTTP response code and headers from the
14129	// server.
14130	googleapi.ServerResponse `json:"-"`
14131
14132	// ForceSendFields is a list of field names (e.g. "Kind") to
14133	// unconditionally include in API requests. By default, fields with
14134	// empty values are omitted from API requests. However, any non-pointer,
14135	// non-interface field appearing in ForceSendFields will be sent to the
14136	// server regardless of whether the field is empty or not. This may be
14137	// used to include empty fields in Patch requests.
14138	ForceSendFields []string `json:"-"`
14139
14140	// NullFields is a list of field names (e.g. "Kind") to include in API
14141	// requests with the JSON null value. By default, fields with empty
14142	// values are omitted from API requests. However, any field with an
14143	// empty value appearing in NullFields will be sent to the server as
14144	// null. It is an error if a field in this list has a non-empty value.
14145	// This may be used to include null fields in Patch requests.
14146	NullFields []string `json:"-"`
14147}
14148
14149func (s *VideoFormatsListResponse) MarshalJSON() ([]byte, error) {
14150	type NoMethod VideoFormatsListResponse
14151	raw := NoMethod(*s)
14152	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14153}
14154
14155// VideoOffset: Video Offset
14156type VideoOffset struct {
14157	// OffsetPercentage: Duration, as a percentage of video duration. Do not
14158	// set when offsetSeconds is set. Acceptable values are 0 to 100,
14159	// inclusive.
14160	OffsetPercentage int64 `json:"offsetPercentage,omitempty"`
14161
14162	// OffsetSeconds: Duration, in seconds. Do not set when offsetPercentage
14163	// is set. Acceptable values are 0 to 86399, inclusive.
14164	OffsetSeconds int64 `json:"offsetSeconds,omitempty"`
14165
14166	// ForceSendFields is a list of field names (e.g. "OffsetPercentage") to
14167	// unconditionally include in API requests. By default, fields with
14168	// empty values are omitted from API requests. However, any non-pointer,
14169	// non-interface field appearing in ForceSendFields will be sent to the
14170	// server regardless of whether the field is empty or not. This may be
14171	// used to include empty fields in Patch requests.
14172	ForceSendFields []string `json:"-"`
14173
14174	// NullFields is a list of field names (e.g. "OffsetPercentage") to
14175	// include in API requests with the JSON null value. By default, fields
14176	// with empty values are omitted from API requests. However, any field
14177	// with an empty value appearing in NullFields will be sent to the
14178	// server as null. It is an error if a field in this list has a
14179	// non-empty value. This may be used to include null fields in Patch
14180	// requests.
14181	NullFields []string `json:"-"`
14182}
14183
14184func (s *VideoOffset) MarshalJSON() ([]byte, error) {
14185	type NoMethod VideoOffset
14186	raw := NoMethod(*s)
14187	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14188}
14189
14190// VideoSettings: Video Settings
14191type VideoSettings struct {
14192	// CompanionSettings: Settings for the companion creatives of video
14193	// creatives served to this placement.
14194	CompanionSettings *CompanionSetting `json:"companionSettings,omitempty"`
14195
14196	// Kind: Identifies what kind of resource this is. Value: the fixed
14197	// string "dfareporting#videoSettings".
14198	Kind string `json:"kind,omitempty"`
14199
14200	// Orientation: Orientation of a video placement. If this value is set,
14201	// placement will return assets matching the specified orientation.
14202	//
14203	// Possible values:
14204	//   "ANY"
14205	//   "LANDSCAPE"
14206	//   "PORTRAIT"
14207	Orientation string `json:"orientation,omitempty"`
14208
14209	// SkippableSettings: Settings for the skippability of video creatives
14210	// served to this placement. If this object is provided, the
14211	// creative-level skippable settings will be overridden.
14212	SkippableSettings *SkippableSetting `json:"skippableSettings,omitempty"`
14213
14214	// TranscodeSettings: Settings for the transcodes of video creatives
14215	// served to this placement. If this object is provided, the
14216	// creative-level transcode settings will be overridden.
14217	TranscodeSettings *TranscodeSetting `json:"transcodeSettings,omitempty"`
14218
14219	// ForceSendFields is a list of field names (e.g. "CompanionSettings")
14220	// to unconditionally include in API requests. By default, fields with
14221	// empty values are omitted from API requests. However, any non-pointer,
14222	// non-interface field appearing in ForceSendFields will be sent to the
14223	// server regardless of whether the field is empty or not. This may be
14224	// used to include empty fields in Patch requests.
14225	ForceSendFields []string `json:"-"`
14226
14227	// NullFields is a list of field names (e.g. "CompanionSettings") to
14228	// include in API requests with the JSON null value. By default, fields
14229	// with empty values are omitted from API requests. However, any field
14230	// with an empty value appearing in NullFields will be sent to the
14231	// server as null. It is an error if a field in this list has a
14232	// non-empty value. This may be used to include null fields in Patch
14233	// requests.
14234	NullFields []string `json:"-"`
14235}
14236
14237func (s *VideoSettings) MarshalJSON() ([]byte, error) {
14238	type NoMethod VideoSettings
14239	raw := NoMethod(*s)
14240	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14241}
14242
14243// method id "dfareporting.accountActiveAdSummaries.get":
14244
14245type AccountActiveAdSummariesGetCall struct {
14246	s                *Service
14247	profileId        int64
14248	summaryAccountId int64
14249	urlParams_       gensupport.URLParams
14250	ifNoneMatch_     string
14251	ctx_             context.Context
14252	header_          http.Header
14253}
14254
14255// Get: Gets the account's active ad summary by account ID.
14256func (r *AccountActiveAdSummariesService) Get(profileId int64, summaryAccountId int64) *AccountActiveAdSummariesGetCall {
14257	c := &AccountActiveAdSummariesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14258	c.profileId = profileId
14259	c.summaryAccountId = summaryAccountId
14260	return c
14261}
14262
14263// Fields allows partial responses to be retrieved. See
14264// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14265// for more information.
14266func (c *AccountActiveAdSummariesGetCall) Fields(s ...googleapi.Field) *AccountActiveAdSummariesGetCall {
14267	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14268	return c
14269}
14270
14271// IfNoneMatch sets the optional parameter which makes the operation
14272// fail if the object's ETag matches the given value. This is useful for
14273// getting updates only after the object has changed since the last
14274// request. Use googleapi.IsNotModified to check whether the response
14275// error from Do is the result of In-None-Match.
14276func (c *AccountActiveAdSummariesGetCall) IfNoneMatch(entityTag string) *AccountActiveAdSummariesGetCall {
14277	c.ifNoneMatch_ = entityTag
14278	return c
14279}
14280
14281// Context sets the context to be used in this call's Do method. Any
14282// pending HTTP request will be aborted if the provided context is
14283// canceled.
14284func (c *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall {
14285	c.ctx_ = ctx
14286	return c
14287}
14288
14289// Header returns an http.Header that can be modified by the caller to
14290// add HTTP headers to the request.
14291func (c *AccountActiveAdSummariesGetCall) Header() http.Header {
14292	if c.header_ == nil {
14293		c.header_ = make(http.Header)
14294	}
14295	return c.header_
14296}
14297
14298func (c *AccountActiveAdSummariesGetCall) doRequest(alt string) (*http.Response, error) {
14299	reqHeaders := make(http.Header)
14300	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
14301	for k, v := range c.header_ {
14302		reqHeaders[k] = v
14303	}
14304	reqHeaders.Set("User-Agent", c.s.userAgent())
14305	if c.ifNoneMatch_ != "" {
14306		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14307	}
14308	var body io.Reader = nil
14309	c.urlParams_.Set("alt", alt)
14310	c.urlParams_.Set("prettyPrint", "false")
14311	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}")
14312	urls += "?" + c.urlParams_.Encode()
14313	req, err := http.NewRequest("GET", urls, body)
14314	if err != nil {
14315		return nil, err
14316	}
14317	req.Header = reqHeaders
14318	googleapi.Expand(req.URL, map[string]string{
14319		"profileId":        strconv.FormatInt(c.profileId, 10),
14320		"summaryAccountId": strconv.FormatInt(c.summaryAccountId, 10),
14321	})
14322	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14323}
14324
14325// Do executes the "dfareporting.accountActiveAdSummaries.get" call.
14326// Exactly one of *AccountActiveAdSummary or error will be non-nil. Any
14327// non-2xx status code is an error. Response headers are in either
14328// *AccountActiveAdSummary.ServerResponse.Header or (if a response was
14329// returned at all) in error.(*googleapi.Error).Header. Use
14330// googleapi.IsNotModified to check whether the returned error was
14331// because http.StatusNotModified was returned.
14332func (c *AccountActiveAdSummariesGetCall) Do(opts ...googleapi.CallOption) (*AccountActiveAdSummary, error) {
14333	gensupport.SetOptions(c.urlParams_, opts...)
14334	res, err := c.doRequest("json")
14335	if res != nil && res.StatusCode == http.StatusNotModified {
14336		if res.Body != nil {
14337			res.Body.Close()
14338		}
14339		return nil, &googleapi.Error{
14340			Code:   res.StatusCode,
14341			Header: res.Header,
14342		}
14343	}
14344	if err != nil {
14345		return nil, err
14346	}
14347	defer googleapi.CloseBody(res)
14348	if err := googleapi.CheckResponse(res); err != nil {
14349		return nil, err
14350	}
14351	ret := &AccountActiveAdSummary{
14352		ServerResponse: googleapi.ServerResponse{
14353			Header:         res.Header,
14354			HTTPStatusCode: res.StatusCode,
14355		},
14356	}
14357	target := &ret
14358	if err := gensupport.DecodeResponse(target, res); err != nil {
14359		return nil, err
14360	}
14361	return ret, nil
14362	// {
14363	//   "description": "Gets the account's active ad summary by account ID.",
14364	//   "httpMethod": "GET",
14365	//   "id": "dfareporting.accountActiveAdSummaries.get",
14366	//   "parameterOrder": [
14367	//     "profileId",
14368	//     "summaryAccountId"
14369	//   ],
14370	//   "parameters": {
14371	//     "profileId": {
14372	//       "description": "User profile ID associated with this request.",
14373	//       "format": "int64",
14374	//       "location": "path",
14375	//       "required": true,
14376	//       "type": "string"
14377	//     },
14378	//     "summaryAccountId": {
14379	//       "description": "Account ID.",
14380	//       "format": "int64",
14381	//       "location": "path",
14382	//       "required": true,
14383	//       "type": "string"
14384	//     }
14385	//   },
14386	//   "path": "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}",
14387	//   "response": {
14388	//     "$ref": "AccountActiveAdSummary"
14389	//   },
14390	//   "scopes": [
14391	//     "https://www.googleapis.com/auth/dfatrafficking"
14392	//   ]
14393	// }
14394
14395}
14396
14397// method id "dfareporting.accountPermissionGroups.get":
14398
14399type AccountPermissionGroupsGetCall struct {
14400	s            *Service
14401	profileId    int64
14402	id           int64
14403	urlParams_   gensupport.URLParams
14404	ifNoneMatch_ string
14405	ctx_         context.Context
14406	header_      http.Header
14407}
14408
14409// Get: Gets one account permission group by ID.
14410func (r *AccountPermissionGroupsService) Get(profileId int64, id int64) *AccountPermissionGroupsGetCall {
14411	c := &AccountPermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14412	c.profileId = profileId
14413	c.id = id
14414	return c
14415}
14416
14417// Fields allows partial responses to be retrieved. See
14418// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14419// for more information.
14420func (c *AccountPermissionGroupsGetCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsGetCall {
14421	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14422	return c
14423}
14424
14425// IfNoneMatch sets the optional parameter which makes the operation
14426// fail if the object's ETag matches the given value. This is useful for
14427// getting updates only after the object has changed since the last
14428// request. Use googleapi.IsNotModified to check whether the response
14429// error from Do is the result of In-None-Match.
14430func (c *AccountPermissionGroupsGetCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsGetCall {
14431	c.ifNoneMatch_ = entityTag
14432	return c
14433}
14434
14435// Context sets the context to be used in this call's Do method. Any
14436// pending HTTP request will be aborted if the provided context is
14437// canceled.
14438func (c *AccountPermissionGroupsGetCall) Context(ctx context.Context) *AccountPermissionGroupsGetCall {
14439	c.ctx_ = ctx
14440	return c
14441}
14442
14443// Header returns an http.Header that can be modified by the caller to
14444// add HTTP headers to the request.
14445func (c *AccountPermissionGroupsGetCall) Header() http.Header {
14446	if c.header_ == nil {
14447		c.header_ = make(http.Header)
14448	}
14449	return c.header_
14450}
14451
14452func (c *AccountPermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
14453	reqHeaders := make(http.Header)
14454	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
14455	for k, v := range c.header_ {
14456		reqHeaders[k] = v
14457	}
14458	reqHeaders.Set("User-Agent", c.s.userAgent())
14459	if c.ifNoneMatch_ != "" {
14460		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14461	}
14462	var body io.Reader = nil
14463	c.urlParams_.Set("alt", alt)
14464	c.urlParams_.Set("prettyPrint", "false")
14465	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups/{id}")
14466	urls += "?" + c.urlParams_.Encode()
14467	req, err := http.NewRequest("GET", urls, body)
14468	if err != nil {
14469		return nil, err
14470	}
14471	req.Header = reqHeaders
14472	googleapi.Expand(req.URL, map[string]string{
14473		"profileId": strconv.FormatInt(c.profileId, 10),
14474		"id":        strconv.FormatInt(c.id, 10),
14475	})
14476	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14477}
14478
14479// Do executes the "dfareporting.accountPermissionGroups.get" call.
14480// Exactly one of *AccountPermissionGroup or error will be non-nil. Any
14481// non-2xx status code is an error. Response headers are in either
14482// *AccountPermissionGroup.ServerResponse.Header or (if a response was
14483// returned at all) in error.(*googleapi.Error).Header. Use
14484// googleapi.IsNotModified to check whether the returned error was
14485// because http.StatusNotModified was returned.
14486func (c *AccountPermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroup, error) {
14487	gensupport.SetOptions(c.urlParams_, opts...)
14488	res, err := c.doRequest("json")
14489	if res != nil && res.StatusCode == http.StatusNotModified {
14490		if res.Body != nil {
14491			res.Body.Close()
14492		}
14493		return nil, &googleapi.Error{
14494			Code:   res.StatusCode,
14495			Header: res.Header,
14496		}
14497	}
14498	if err != nil {
14499		return nil, err
14500	}
14501	defer googleapi.CloseBody(res)
14502	if err := googleapi.CheckResponse(res); err != nil {
14503		return nil, err
14504	}
14505	ret := &AccountPermissionGroup{
14506		ServerResponse: googleapi.ServerResponse{
14507			Header:         res.Header,
14508			HTTPStatusCode: res.StatusCode,
14509		},
14510	}
14511	target := &ret
14512	if err := gensupport.DecodeResponse(target, res); err != nil {
14513		return nil, err
14514	}
14515	return ret, nil
14516	// {
14517	//   "description": "Gets one account permission group by ID.",
14518	//   "httpMethod": "GET",
14519	//   "id": "dfareporting.accountPermissionGroups.get",
14520	//   "parameterOrder": [
14521	//     "profileId",
14522	//     "id"
14523	//   ],
14524	//   "parameters": {
14525	//     "id": {
14526	//       "description": "Account permission group ID.",
14527	//       "format": "int64",
14528	//       "location": "path",
14529	//       "required": true,
14530	//       "type": "string"
14531	//     },
14532	//     "profileId": {
14533	//       "description": "User profile ID associated with this request.",
14534	//       "format": "int64",
14535	//       "location": "path",
14536	//       "required": true,
14537	//       "type": "string"
14538	//     }
14539	//   },
14540	//   "path": "userprofiles/{profileId}/accountPermissionGroups/{id}",
14541	//   "response": {
14542	//     "$ref": "AccountPermissionGroup"
14543	//   },
14544	//   "scopes": [
14545	//     "https://www.googleapis.com/auth/dfatrafficking"
14546	//   ]
14547	// }
14548
14549}
14550
14551// method id "dfareporting.accountPermissionGroups.list":
14552
14553type AccountPermissionGroupsListCall struct {
14554	s            *Service
14555	profileId    int64
14556	urlParams_   gensupport.URLParams
14557	ifNoneMatch_ string
14558	ctx_         context.Context
14559	header_      http.Header
14560}
14561
14562// List: Retrieves the list of account permission groups.
14563func (r *AccountPermissionGroupsService) List(profileId int64) *AccountPermissionGroupsListCall {
14564	c := &AccountPermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14565	c.profileId = profileId
14566	return c
14567}
14568
14569// Fields allows partial responses to be retrieved. See
14570// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14571// for more information.
14572func (c *AccountPermissionGroupsListCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsListCall {
14573	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14574	return c
14575}
14576
14577// IfNoneMatch sets the optional parameter which makes the operation
14578// fail if the object's ETag matches the given value. This is useful for
14579// getting updates only after the object has changed since the last
14580// request. Use googleapi.IsNotModified to check whether the response
14581// error from Do is the result of In-None-Match.
14582func (c *AccountPermissionGroupsListCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsListCall {
14583	c.ifNoneMatch_ = entityTag
14584	return c
14585}
14586
14587// Context sets the context to be used in this call's Do method. Any
14588// pending HTTP request will be aborted if the provided context is
14589// canceled.
14590func (c *AccountPermissionGroupsListCall) Context(ctx context.Context) *AccountPermissionGroupsListCall {
14591	c.ctx_ = ctx
14592	return c
14593}
14594
14595// Header returns an http.Header that can be modified by the caller to
14596// add HTTP headers to the request.
14597func (c *AccountPermissionGroupsListCall) Header() http.Header {
14598	if c.header_ == nil {
14599		c.header_ = make(http.Header)
14600	}
14601	return c.header_
14602}
14603
14604func (c *AccountPermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
14605	reqHeaders := make(http.Header)
14606	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
14607	for k, v := range c.header_ {
14608		reqHeaders[k] = v
14609	}
14610	reqHeaders.Set("User-Agent", c.s.userAgent())
14611	if c.ifNoneMatch_ != "" {
14612		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14613	}
14614	var body io.Reader = nil
14615	c.urlParams_.Set("alt", alt)
14616	c.urlParams_.Set("prettyPrint", "false")
14617	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups")
14618	urls += "?" + c.urlParams_.Encode()
14619	req, err := http.NewRequest("GET", urls, body)
14620	if err != nil {
14621		return nil, err
14622	}
14623	req.Header = reqHeaders
14624	googleapi.Expand(req.URL, map[string]string{
14625		"profileId": strconv.FormatInt(c.profileId, 10),
14626	})
14627	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14628}
14629
14630// Do executes the "dfareporting.accountPermissionGroups.list" call.
14631// Exactly one of *AccountPermissionGroupsListResponse or error will be
14632// non-nil. Any non-2xx status code is an error. Response headers are in
14633// either *AccountPermissionGroupsListResponse.ServerResponse.Header or
14634// (if a response was returned at all) in
14635// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14636// whether the returned error was because http.StatusNotModified was
14637// returned.
14638func (c *AccountPermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroupsListResponse, error) {
14639	gensupport.SetOptions(c.urlParams_, opts...)
14640	res, err := c.doRequest("json")
14641	if res != nil && res.StatusCode == http.StatusNotModified {
14642		if res.Body != nil {
14643			res.Body.Close()
14644		}
14645		return nil, &googleapi.Error{
14646			Code:   res.StatusCode,
14647			Header: res.Header,
14648		}
14649	}
14650	if err != nil {
14651		return nil, err
14652	}
14653	defer googleapi.CloseBody(res)
14654	if err := googleapi.CheckResponse(res); err != nil {
14655		return nil, err
14656	}
14657	ret := &AccountPermissionGroupsListResponse{
14658		ServerResponse: googleapi.ServerResponse{
14659			Header:         res.Header,
14660			HTTPStatusCode: res.StatusCode,
14661		},
14662	}
14663	target := &ret
14664	if err := gensupport.DecodeResponse(target, res); err != nil {
14665		return nil, err
14666	}
14667	return ret, nil
14668	// {
14669	//   "description": "Retrieves the list of account permission groups.",
14670	//   "httpMethod": "GET",
14671	//   "id": "dfareporting.accountPermissionGroups.list",
14672	//   "parameterOrder": [
14673	//     "profileId"
14674	//   ],
14675	//   "parameters": {
14676	//     "profileId": {
14677	//       "description": "User profile ID associated with this request.",
14678	//       "format": "int64",
14679	//       "location": "path",
14680	//       "required": true,
14681	//       "type": "string"
14682	//     }
14683	//   },
14684	//   "path": "userprofiles/{profileId}/accountPermissionGroups",
14685	//   "response": {
14686	//     "$ref": "AccountPermissionGroupsListResponse"
14687	//   },
14688	//   "scopes": [
14689	//     "https://www.googleapis.com/auth/dfatrafficking"
14690	//   ]
14691	// }
14692
14693}
14694
14695// method id "dfareporting.accountPermissions.get":
14696
14697type AccountPermissionsGetCall struct {
14698	s            *Service
14699	profileId    int64
14700	id           int64
14701	urlParams_   gensupport.URLParams
14702	ifNoneMatch_ string
14703	ctx_         context.Context
14704	header_      http.Header
14705}
14706
14707// Get: Gets one account permission by ID.
14708func (r *AccountPermissionsService) Get(profileId int64, id int64) *AccountPermissionsGetCall {
14709	c := &AccountPermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14710	c.profileId = profileId
14711	c.id = id
14712	return c
14713}
14714
14715// Fields allows partial responses to be retrieved. See
14716// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14717// for more information.
14718func (c *AccountPermissionsGetCall) Fields(s ...googleapi.Field) *AccountPermissionsGetCall {
14719	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14720	return c
14721}
14722
14723// IfNoneMatch sets the optional parameter which makes the operation
14724// fail if the object's ETag matches the given value. This is useful for
14725// getting updates only after the object has changed since the last
14726// request. Use googleapi.IsNotModified to check whether the response
14727// error from Do is the result of In-None-Match.
14728func (c *AccountPermissionsGetCall) IfNoneMatch(entityTag string) *AccountPermissionsGetCall {
14729	c.ifNoneMatch_ = entityTag
14730	return c
14731}
14732
14733// Context sets the context to be used in this call's Do method. Any
14734// pending HTTP request will be aborted if the provided context is
14735// canceled.
14736func (c *AccountPermissionsGetCall) Context(ctx context.Context) *AccountPermissionsGetCall {
14737	c.ctx_ = ctx
14738	return c
14739}
14740
14741// Header returns an http.Header that can be modified by the caller to
14742// add HTTP headers to the request.
14743func (c *AccountPermissionsGetCall) Header() http.Header {
14744	if c.header_ == nil {
14745		c.header_ = make(http.Header)
14746	}
14747	return c.header_
14748}
14749
14750func (c *AccountPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
14751	reqHeaders := make(http.Header)
14752	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
14753	for k, v := range c.header_ {
14754		reqHeaders[k] = v
14755	}
14756	reqHeaders.Set("User-Agent", c.s.userAgent())
14757	if c.ifNoneMatch_ != "" {
14758		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14759	}
14760	var body io.Reader = nil
14761	c.urlParams_.Set("alt", alt)
14762	c.urlParams_.Set("prettyPrint", "false")
14763	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions/{id}")
14764	urls += "?" + c.urlParams_.Encode()
14765	req, err := http.NewRequest("GET", urls, body)
14766	if err != nil {
14767		return nil, err
14768	}
14769	req.Header = reqHeaders
14770	googleapi.Expand(req.URL, map[string]string{
14771		"profileId": strconv.FormatInt(c.profileId, 10),
14772		"id":        strconv.FormatInt(c.id, 10),
14773	})
14774	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14775}
14776
14777// Do executes the "dfareporting.accountPermissions.get" call.
14778// Exactly one of *AccountPermission or error will be non-nil. Any
14779// non-2xx status code is an error. Response headers are in either
14780// *AccountPermission.ServerResponse.Header or (if a response was
14781// returned at all) in error.(*googleapi.Error).Header. Use
14782// googleapi.IsNotModified to check whether the returned error was
14783// because http.StatusNotModified was returned.
14784func (c *AccountPermissionsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermission, error) {
14785	gensupport.SetOptions(c.urlParams_, opts...)
14786	res, err := c.doRequest("json")
14787	if res != nil && res.StatusCode == http.StatusNotModified {
14788		if res.Body != nil {
14789			res.Body.Close()
14790		}
14791		return nil, &googleapi.Error{
14792			Code:   res.StatusCode,
14793			Header: res.Header,
14794		}
14795	}
14796	if err != nil {
14797		return nil, err
14798	}
14799	defer googleapi.CloseBody(res)
14800	if err := googleapi.CheckResponse(res); err != nil {
14801		return nil, err
14802	}
14803	ret := &AccountPermission{
14804		ServerResponse: googleapi.ServerResponse{
14805			Header:         res.Header,
14806			HTTPStatusCode: res.StatusCode,
14807		},
14808	}
14809	target := &ret
14810	if err := gensupport.DecodeResponse(target, res); err != nil {
14811		return nil, err
14812	}
14813	return ret, nil
14814	// {
14815	//   "description": "Gets one account permission by ID.",
14816	//   "httpMethod": "GET",
14817	//   "id": "dfareporting.accountPermissions.get",
14818	//   "parameterOrder": [
14819	//     "profileId",
14820	//     "id"
14821	//   ],
14822	//   "parameters": {
14823	//     "id": {
14824	//       "description": "Account permission ID.",
14825	//       "format": "int64",
14826	//       "location": "path",
14827	//       "required": true,
14828	//       "type": "string"
14829	//     },
14830	//     "profileId": {
14831	//       "description": "User profile ID associated with this request.",
14832	//       "format": "int64",
14833	//       "location": "path",
14834	//       "required": true,
14835	//       "type": "string"
14836	//     }
14837	//   },
14838	//   "path": "userprofiles/{profileId}/accountPermissions/{id}",
14839	//   "response": {
14840	//     "$ref": "AccountPermission"
14841	//   },
14842	//   "scopes": [
14843	//     "https://www.googleapis.com/auth/dfatrafficking"
14844	//   ]
14845	// }
14846
14847}
14848
14849// method id "dfareporting.accountPermissions.list":
14850
14851type AccountPermissionsListCall struct {
14852	s            *Service
14853	profileId    int64
14854	urlParams_   gensupport.URLParams
14855	ifNoneMatch_ string
14856	ctx_         context.Context
14857	header_      http.Header
14858}
14859
14860// List: Retrieves the list of account permissions.
14861func (r *AccountPermissionsService) List(profileId int64) *AccountPermissionsListCall {
14862	c := &AccountPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14863	c.profileId = profileId
14864	return c
14865}
14866
14867// Fields allows partial responses to be retrieved. See
14868// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14869// for more information.
14870func (c *AccountPermissionsListCall) Fields(s ...googleapi.Field) *AccountPermissionsListCall {
14871	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14872	return c
14873}
14874
14875// IfNoneMatch sets the optional parameter which makes the operation
14876// fail if the object's ETag matches the given value. This is useful for
14877// getting updates only after the object has changed since the last
14878// request. Use googleapi.IsNotModified to check whether the response
14879// error from Do is the result of In-None-Match.
14880func (c *AccountPermissionsListCall) IfNoneMatch(entityTag string) *AccountPermissionsListCall {
14881	c.ifNoneMatch_ = entityTag
14882	return c
14883}
14884
14885// Context sets the context to be used in this call's Do method. Any
14886// pending HTTP request will be aborted if the provided context is
14887// canceled.
14888func (c *AccountPermissionsListCall) Context(ctx context.Context) *AccountPermissionsListCall {
14889	c.ctx_ = ctx
14890	return c
14891}
14892
14893// Header returns an http.Header that can be modified by the caller to
14894// add HTTP headers to the request.
14895func (c *AccountPermissionsListCall) Header() http.Header {
14896	if c.header_ == nil {
14897		c.header_ = make(http.Header)
14898	}
14899	return c.header_
14900}
14901
14902func (c *AccountPermissionsListCall) doRequest(alt string) (*http.Response, error) {
14903	reqHeaders := make(http.Header)
14904	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
14905	for k, v := range c.header_ {
14906		reqHeaders[k] = v
14907	}
14908	reqHeaders.Set("User-Agent", c.s.userAgent())
14909	if c.ifNoneMatch_ != "" {
14910		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14911	}
14912	var body io.Reader = nil
14913	c.urlParams_.Set("alt", alt)
14914	c.urlParams_.Set("prettyPrint", "false")
14915	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions")
14916	urls += "?" + c.urlParams_.Encode()
14917	req, err := http.NewRequest("GET", urls, body)
14918	if err != nil {
14919		return nil, err
14920	}
14921	req.Header = reqHeaders
14922	googleapi.Expand(req.URL, map[string]string{
14923		"profileId": strconv.FormatInt(c.profileId, 10),
14924	})
14925	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14926}
14927
14928// Do executes the "dfareporting.accountPermissions.list" call.
14929// Exactly one of *AccountPermissionsListResponse or error will be
14930// non-nil. Any non-2xx status code is an error. Response headers are in
14931// either *AccountPermissionsListResponse.ServerResponse.Header or (if a
14932// response was returned at all) in error.(*googleapi.Error).Header. Use
14933// googleapi.IsNotModified to check whether the returned error was
14934// because http.StatusNotModified was returned.
14935func (c *AccountPermissionsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionsListResponse, error) {
14936	gensupport.SetOptions(c.urlParams_, opts...)
14937	res, err := c.doRequest("json")
14938	if res != nil && res.StatusCode == http.StatusNotModified {
14939		if res.Body != nil {
14940			res.Body.Close()
14941		}
14942		return nil, &googleapi.Error{
14943			Code:   res.StatusCode,
14944			Header: res.Header,
14945		}
14946	}
14947	if err != nil {
14948		return nil, err
14949	}
14950	defer googleapi.CloseBody(res)
14951	if err := googleapi.CheckResponse(res); err != nil {
14952		return nil, err
14953	}
14954	ret := &AccountPermissionsListResponse{
14955		ServerResponse: googleapi.ServerResponse{
14956			Header:         res.Header,
14957			HTTPStatusCode: res.StatusCode,
14958		},
14959	}
14960	target := &ret
14961	if err := gensupport.DecodeResponse(target, res); err != nil {
14962		return nil, err
14963	}
14964	return ret, nil
14965	// {
14966	//   "description": "Retrieves the list of account permissions.",
14967	//   "httpMethod": "GET",
14968	//   "id": "dfareporting.accountPermissions.list",
14969	//   "parameterOrder": [
14970	//     "profileId"
14971	//   ],
14972	//   "parameters": {
14973	//     "profileId": {
14974	//       "description": "User profile ID associated with this request.",
14975	//       "format": "int64",
14976	//       "location": "path",
14977	//       "required": true,
14978	//       "type": "string"
14979	//     }
14980	//   },
14981	//   "path": "userprofiles/{profileId}/accountPermissions",
14982	//   "response": {
14983	//     "$ref": "AccountPermissionsListResponse"
14984	//   },
14985	//   "scopes": [
14986	//     "https://www.googleapis.com/auth/dfatrafficking"
14987	//   ]
14988	// }
14989
14990}
14991
14992// method id "dfareporting.accountUserProfiles.get":
14993
14994type AccountUserProfilesGetCall struct {
14995	s            *Service
14996	profileId    int64
14997	id           int64
14998	urlParams_   gensupport.URLParams
14999	ifNoneMatch_ string
15000	ctx_         context.Context
15001	header_      http.Header
15002}
15003
15004// Get: Gets one account user profile by ID.
15005func (r *AccountUserProfilesService) Get(profileId int64, id int64) *AccountUserProfilesGetCall {
15006	c := &AccountUserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15007	c.profileId = profileId
15008	c.id = id
15009	return c
15010}
15011
15012// Fields allows partial responses to be retrieved. See
15013// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15014// for more information.
15015func (c *AccountUserProfilesGetCall) Fields(s ...googleapi.Field) *AccountUserProfilesGetCall {
15016	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15017	return c
15018}
15019
15020// IfNoneMatch sets the optional parameter which makes the operation
15021// fail if the object's ETag matches the given value. This is useful for
15022// getting updates only after the object has changed since the last
15023// request. Use googleapi.IsNotModified to check whether the response
15024// error from Do is the result of In-None-Match.
15025func (c *AccountUserProfilesGetCall) IfNoneMatch(entityTag string) *AccountUserProfilesGetCall {
15026	c.ifNoneMatch_ = entityTag
15027	return c
15028}
15029
15030// Context sets the context to be used in this call's Do method. Any
15031// pending HTTP request will be aborted if the provided context is
15032// canceled.
15033func (c *AccountUserProfilesGetCall) Context(ctx context.Context) *AccountUserProfilesGetCall {
15034	c.ctx_ = ctx
15035	return c
15036}
15037
15038// Header returns an http.Header that can be modified by the caller to
15039// add HTTP headers to the request.
15040func (c *AccountUserProfilesGetCall) Header() http.Header {
15041	if c.header_ == nil {
15042		c.header_ = make(http.Header)
15043	}
15044	return c.header_
15045}
15046
15047func (c *AccountUserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
15048	reqHeaders := make(http.Header)
15049	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
15050	for k, v := range c.header_ {
15051		reqHeaders[k] = v
15052	}
15053	reqHeaders.Set("User-Agent", c.s.userAgent())
15054	if c.ifNoneMatch_ != "" {
15055		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15056	}
15057	var body io.Reader = nil
15058	c.urlParams_.Set("alt", alt)
15059	c.urlParams_.Set("prettyPrint", "false")
15060	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles/{id}")
15061	urls += "?" + c.urlParams_.Encode()
15062	req, err := http.NewRequest("GET", urls, body)
15063	if err != nil {
15064		return nil, err
15065	}
15066	req.Header = reqHeaders
15067	googleapi.Expand(req.URL, map[string]string{
15068		"profileId": strconv.FormatInt(c.profileId, 10),
15069		"id":        strconv.FormatInt(c.id, 10),
15070	})
15071	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15072}
15073
15074// Do executes the "dfareporting.accountUserProfiles.get" call.
15075// Exactly one of *AccountUserProfile or error will be non-nil. Any
15076// non-2xx status code is an error. Response headers are in either
15077// *AccountUserProfile.ServerResponse.Header or (if a response was
15078// returned at all) in error.(*googleapi.Error).Header. Use
15079// googleapi.IsNotModified to check whether the returned error was
15080// because http.StatusNotModified was returned.
15081func (c *AccountUserProfilesGetCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15082	gensupport.SetOptions(c.urlParams_, opts...)
15083	res, err := c.doRequest("json")
15084	if res != nil && res.StatusCode == http.StatusNotModified {
15085		if res.Body != nil {
15086			res.Body.Close()
15087		}
15088		return nil, &googleapi.Error{
15089			Code:   res.StatusCode,
15090			Header: res.Header,
15091		}
15092	}
15093	if err != nil {
15094		return nil, err
15095	}
15096	defer googleapi.CloseBody(res)
15097	if err := googleapi.CheckResponse(res); err != nil {
15098		return nil, err
15099	}
15100	ret := &AccountUserProfile{
15101		ServerResponse: googleapi.ServerResponse{
15102			Header:         res.Header,
15103			HTTPStatusCode: res.StatusCode,
15104		},
15105	}
15106	target := &ret
15107	if err := gensupport.DecodeResponse(target, res); err != nil {
15108		return nil, err
15109	}
15110	return ret, nil
15111	// {
15112	//   "description": "Gets one account user profile by ID.",
15113	//   "httpMethod": "GET",
15114	//   "id": "dfareporting.accountUserProfiles.get",
15115	//   "parameterOrder": [
15116	//     "profileId",
15117	//     "id"
15118	//   ],
15119	//   "parameters": {
15120	//     "id": {
15121	//       "description": "User profile ID.",
15122	//       "format": "int64",
15123	//       "location": "path",
15124	//       "required": true,
15125	//       "type": "string"
15126	//     },
15127	//     "profileId": {
15128	//       "description": "User profile ID associated with this request.",
15129	//       "format": "int64",
15130	//       "location": "path",
15131	//       "required": true,
15132	//       "type": "string"
15133	//     }
15134	//   },
15135	//   "path": "userprofiles/{profileId}/accountUserProfiles/{id}",
15136	//   "response": {
15137	//     "$ref": "AccountUserProfile"
15138	//   },
15139	//   "scopes": [
15140	//     "https://www.googleapis.com/auth/dfatrafficking"
15141	//   ]
15142	// }
15143
15144}
15145
15146// method id "dfareporting.accountUserProfiles.insert":
15147
15148type AccountUserProfilesInsertCall struct {
15149	s                  *Service
15150	profileId          int64
15151	accountuserprofile *AccountUserProfile
15152	urlParams_         gensupport.URLParams
15153	ctx_               context.Context
15154	header_            http.Header
15155}
15156
15157// Insert: Inserts a new account user profile.
15158func (r *AccountUserProfilesService) Insert(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesInsertCall {
15159	c := &AccountUserProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15160	c.profileId = profileId
15161	c.accountuserprofile = accountuserprofile
15162	return c
15163}
15164
15165// Fields allows partial responses to be retrieved. See
15166// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15167// for more information.
15168func (c *AccountUserProfilesInsertCall) Fields(s ...googleapi.Field) *AccountUserProfilesInsertCall {
15169	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15170	return c
15171}
15172
15173// Context sets the context to be used in this call's Do method. Any
15174// pending HTTP request will be aborted if the provided context is
15175// canceled.
15176func (c *AccountUserProfilesInsertCall) Context(ctx context.Context) *AccountUserProfilesInsertCall {
15177	c.ctx_ = ctx
15178	return c
15179}
15180
15181// Header returns an http.Header that can be modified by the caller to
15182// add HTTP headers to the request.
15183func (c *AccountUserProfilesInsertCall) Header() http.Header {
15184	if c.header_ == nil {
15185		c.header_ = make(http.Header)
15186	}
15187	return c.header_
15188}
15189
15190func (c *AccountUserProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
15191	reqHeaders := make(http.Header)
15192	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
15193	for k, v := range c.header_ {
15194		reqHeaders[k] = v
15195	}
15196	reqHeaders.Set("User-Agent", c.s.userAgent())
15197	var body io.Reader = nil
15198	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15199	if err != nil {
15200		return nil, err
15201	}
15202	reqHeaders.Set("Content-Type", "application/json")
15203	c.urlParams_.Set("alt", alt)
15204	c.urlParams_.Set("prettyPrint", "false")
15205	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15206	urls += "?" + c.urlParams_.Encode()
15207	req, err := http.NewRequest("POST", urls, body)
15208	if err != nil {
15209		return nil, err
15210	}
15211	req.Header = reqHeaders
15212	googleapi.Expand(req.URL, map[string]string{
15213		"profileId": strconv.FormatInt(c.profileId, 10),
15214	})
15215	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15216}
15217
15218// Do executes the "dfareporting.accountUserProfiles.insert" call.
15219// Exactly one of *AccountUserProfile or error will be non-nil. Any
15220// non-2xx status code is an error. Response headers are in either
15221// *AccountUserProfile.ServerResponse.Header or (if a response was
15222// returned at all) in error.(*googleapi.Error).Header. Use
15223// googleapi.IsNotModified to check whether the returned error was
15224// because http.StatusNotModified was returned.
15225func (c *AccountUserProfilesInsertCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15226	gensupport.SetOptions(c.urlParams_, opts...)
15227	res, err := c.doRequest("json")
15228	if res != nil && res.StatusCode == http.StatusNotModified {
15229		if res.Body != nil {
15230			res.Body.Close()
15231		}
15232		return nil, &googleapi.Error{
15233			Code:   res.StatusCode,
15234			Header: res.Header,
15235		}
15236	}
15237	if err != nil {
15238		return nil, err
15239	}
15240	defer googleapi.CloseBody(res)
15241	if err := googleapi.CheckResponse(res); err != nil {
15242		return nil, err
15243	}
15244	ret := &AccountUserProfile{
15245		ServerResponse: googleapi.ServerResponse{
15246			Header:         res.Header,
15247			HTTPStatusCode: res.StatusCode,
15248		},
15249	}
15250	target := &ret
15251	if err := gensupport.DecodeResponse(target, res); err != nil {
15252		return nil, err
15253	}
15254	return ret, nil
15255	// {
15256	//   "description": "Inserts a new account user profile.",
15257	//   "httpMethod": "POST",
15258	//   "id": "dfareporting.accountUserProfiles.insert",
15259	//   "parameterOrder": [
15260	//     "profileId"
15261	//   ],
15262	//   "parameters": {
15263	//     "profileId": {
15264	//       "description": "User profile ID associated with this request.",
15265	//       "format": "int64",
15266	//       "location": "path",
15267	//       "required": true,
15268	//       "type": "string"
15269	//     }
15270	//   },
15271	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15272	//   "request": {
15273	//     "$ref": "AccountUserProfile"
15274	//   },
15275	//   "response": {
15276	//     "$ref": "AccountUserProfile"
15277	//   },
15278	//   "scopes": [
15279	//     "https://www.googleapis.com/auth/dfatrafficking"
15280	//   ]
15281	// }
15282
15283}
15284
15285// method id "dfareporting.accountUserProfiles.list":
15286
15287type AccountUserProfilesListCall struct {
15288	s            *Service
15289	profileId    int64
15290	urlParams_   gensupport.URLParams
15291	ifNoneMatch_ string
15292	ctx_         context.Context
15293	header_      http.Header
15294}
15295
15296// List: Retrieves a list of account user profiles, possibly filtered.
15297// This method supports paging.
15298func (r *AccountUserProfilesService) List(profileId int64) *AccountUserProfilesListCall {
15299	c := &AccountUserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15300	c.profileId = profileId
15301	return c
15302}
15303
15304// Active sets the optional parameter "active": Select only active user
15305// profiles.
15306func (c *AccountUserProfilesListCall) Active(active bool) *AccountUserProfilesListCall {
15307	c.urlParams_.Set("active", fmt.Sprint(active))
15308	return c
15309}
15310
15311// Ids sets the optional parameter "ids": Select only user profiles with
15312// these IDs.
15313func (c *AccountUserProfilesListCall) Ids(ids ...int64) *AccountUserProfilesListCall {
15314	var ids_ []string
15315	for _, v := range ids {
15316		ids_ = append(ids_, fmt.Sprint(v))
15317	}
15318	c.urlParams_.SetMulti("ids", ids_)
15319	return c
15320}
15321
15322// MaxResults sets the optional parameter "maxResults": Maximum number
15323// of results to return.
15324func (c *AccountUserProfilesListCall) MaxResults(maxResults int64) *AccountUserProfilesListCall {
15325	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15326	return c
15327}
15328
15329// PageToken sets the optional parameter "pageToken": Value of the
15330// nextPageToken from the previous result page.
15331func (c *AccountUserProfilesListCall) PageToken(pageToken string) *AccountUserProfilesListCall {
15332	c.urlParams_.Set("pageToken", pageToken)
15333	return c
15334}
15335
15336// SearchString sets the optional parameter "searchString": Allows
15337// searching for objects by name, ID or email. Wildcards (*) are
15338// allowed. For example, "user profile*2015" will return objects with
15339// names like "user profile June 2015", "user profile April 2015", or
15340// simply "user profile 2015". Most of the searches also add wildcards
15341// implicitly at the start and the end of the search string. For
15342// example, a search string of "user profile" will match objects with
15343// name "my user profile", "user profile 2015", or simply "user
15344// profile".
15345func (c *AccountUserProfilesListCall) SearchString(searchString string) *AccountUserProfilesListCall {
15346	c.urlParams_.Set("searchString", searchString)
15347	return c
15348}
15349
15350// SortField sets the optional parameter "sortField": Field by which to
15351// sort the list.
15352//
15353// Possible values:
15354//   "ID" (default)
15355//   "NAME"
15356func (c *AccountUserProfilesListCall) SortField(sortField string) *AccountUserProfilesListCall {
15357	c.urlParams_.Set("sortField", sortField)
15358	return c
15359}
15360
15361// SortOrder sets the optional parameter "sortOrder": Order of sorted
15362// results.
15363//
15364// Possible values:
15365//   "ASCENDING" (default)
15366//   "DESCENDING"
15367func (c *AccountUserProfilesListCall) SortOrder(sortOrder string) *AccountUserProfilesListCall {
15368	c.urlParams_.Set("sortOrder", sortOrder)
15369	return c
15370}
15371
15372// SubaccountId sets the optional parameter "subaccountId": Select only
15373// user profiles with the specified subaccount ID.
15374func (c *AccountUserProfilesListCall) SubaccountId(subaccountId int64) *AccountUserProfilesListCall {
15375	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
15376	return c
15377}
15378
15379// UserRoleId sets the optional parameter "userRoleId": Select only user
15380// profiles with the specified user role ID.
15381func (c *AccountUserProfilesListCall) UserRoleId(userRoleId int64) *AccountUserProfilesListCall {
15382	c.urlParams_.Set("userRoleId", fmt.Sprint(userRoleId))
15383	return c
15384}
15385
15386// Fields allows partial responses to be retrieved. See
15387// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15388// for more information.
15389func (c *AccountUserProfilesListCall) Fields(s ...googleapi.Field) *AccountUserProfilesListCall {
15390	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15391	return c
15392}
15393
15394// IfNoneMatch sets the optional parameter which makes the operation
15395// fail if the object's ETag matches the given value. This is useful for
15396// getting updates only after the object has changed since the last
15397// request. Use googleapi.IsNotModified to check whether the response
15398// error from Do is the result of In-None-Match.
15399func (c *AccountUserProfilesListCall) IfNoneMatch(entityTag string) *AccountUserProfilesListCall {
15400	c.ifNoneMatch_ = entityTag
15401	return c
15402}
15403
15404// Context sets the context to be used in this call's Do method. Any
15405// pending HTTP request will be aborted if the provided context is
15406// canceled.
15407func (c *AccountUserProfilesListCall) Context(ctx context.Context) *AccountUserProfilesListCall {
15408	c.ctx_ = ctx
15409	return c
15410}
15411
15412// Header returns an http.Header that can be modified by the caller to
15413// add HTTP headers to the request.
15414func (c *AccountUserProfilesListCall) Header() http.Header {
15415	if c.header_ == nil {
15416		c.header_ = make(http.Header)
15417	}
15418	return c.header_
15419}
15420
15421func (c *AccountUserProfilesListCall) doRequest(alt string) (*http.Response, error) {
15422	reqHeaders := make(http.Header)
15423	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
15424	for k, v := range c.header_ {
15425		reqHeaders[k] = v
15426	}
15427	reqHeaders.Set("User-Agent", c.s.userAgent())
15428	if c.ifNoneMatch_ != "" {
15429		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15430	}
15431	var body io.Reader = nil
15432	c.urlParams_.Set("alt", alt)
15433	c.urlParams_.Set("prettyPrint", "false")
15434	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15435	urls += "?" + c.urlParams_.Encode()
15436	req, err := http.NewRequest("GET", urls, body)
15437	if err != nil {
15438		return nil, err
15439	}
15440	req.Header = reqHeaders
15441	googleapi.Expand(req.URL, map[string]string{
15442		"profileId": strconv.FormatInt(c.profileId, 10),
15443	})
15444	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15445}
15446
15447// Do executes the "dfareporting.accountUserProfiles.list" call.
15448// Exactly one of *AccountUserProfilesListResponse or error will be
15449// non-nil. Any non-2xx status code is an error. Response headers are in
15450// either *AccountUserProfilesListResponse.ServerResponse.Header or (if
15451// a response was returned at all) in error.(*googleapi.Error).Header.
15452// Use googleapi.IsNotModified to check whether the returned error was
15453// because http.StatusNotModified was returned.
15454func (c *AccountUserProfilesListCall) Do(opts ...googleapi.CallOption) (*AccountUserProfilesListResponse, error) {
15455	gensupport.SetOptions(c.urlParams_, opts...)
15456	res, err := c.doRequest("json")
15457	if res != nil && res.StatusCode == http.StatusNotModified {
15458		if res.Body != nil {
15459			res.Body.Close()
15460		}
15461		return nil, &googleapi.Error{
15462			Code:   res.StatusCode,
15463			Header: res.Header,
15464		}
15465	}
15466	if err != nil {
15467		return nil, err
15468	}
15469	defer googleapi.CloseBody(res)
15470	if err := googleapi.CheckResponse(res); err != nil {
15471		return nil, err
15472	}
15473	ret := &AccountUserProfilesListResponse{
15474		ServerResponse: googleapi.ServerResponse{
15475			Header:         res.Header,
15476			HTTPStatusCode: res.StatusCode,
15477		},
15478	}
15479	target := &ret
15480	if err := gensupport.DecodeResponse(target, res); err != nil {
15481		return nil, err
15482	}
15483	return ret, nil
15484	// {
15485	//   "description": "Retrieves a list of account user profiles, possibly filtered. This method supports paging.",
15486	//   "httpMethod": "GET",
15487	//   "id": "dfareporting.accountUserProfiles.list",
15488	//   "parameterOrder": [
15489	//     "profileId"
15490	//   ],
15491	//   "parameters": {
15492	//     "active": {
15493	//       "description": "Select only active user profiles.",
15494	//       "location": "query",
15495	//       "type": "boolean"
15496	//     },
15497	//     "ids": {
15498	//       "description": "Select only user profiles with these IDs.",
15499	//       "format": "int64",
15500	//       "location": "query",
15501	//       "repeated": true,
15502	//       "type": "string"
15503	//     },
15504	//     "maxResults": {
15505	//       "default": "1000",
15506	//       "description": "Maximum number of results to return.",
15507	//       "format": "int32",
15508	//       "location": "query",
15509	//       "maximum": "1000",
15510	//       "minimum": "0",
15511	//       "type": "integer"
15512	//     },
15513	//     "pageToken": {
15514	//       "description": "Value of the nextPageToken from the previous result page.",
15515	//       "location": "query",
15516	//       "type": "string"
15517	//     },
15518	//     "profileId": {
15519	//       "description": "User profile ID associated with this request.",
15520	//       "format": "int64",
15521	//       "location": "path",
15522	//       "required": true,
15523	//       "type": "string"
15524	//     },
15525	//     "searchString": {
15526	//       "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\".",
15527	//       "location": "query",
15528	//       "type": "string"
15529	//     },
15530	//     "sortField": {
15531	//       "default": "ID",
15532	//       "description": "Field by which to sort the list.",
15533	//       "enum": [
15534	//         "ID",
15535	//         "NAME"
15536	//       ],
15537	//       "enumDescriptions": [
15538	//         "",
15539	//         ""
15540	//       ],
15541	//       "location": "query",
15542	//       "type": "string"
15543	//     },
15544	//     "sortOrder": {
15545	//       "default": "ASCENDING",
15546	//       "description": "Order of sorted results.",
15547	//       "enum": [
15548	//         "ASCENDING",
15549	//         "DESCENDING"
15550	//       ],
15551	//       "enumDescriptions": [
15552	//         "",
15553	//         ""
15554	//       ],
15555	//       "location": "query",
15556	//       "type": "string"
15557	//     },
15558	//     "subaccountId": {
15559	//       "description": "Select only user profiles with the specified subaccount ID.",
15560	//       "format": "int64",
15561	//       "location": "query",
15562	//       "type": "string"
15563	//     },
15564	//     "userRoleId": {
15565	//       "description": "Select only user profiles with the specified user role ID.",
15566	//       "format": "int64",
15567	//       "location": "query",
15568	//       "type": "string"
15569	//     }
15570	//   },
15571	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15572	//   "response": {
15573	//     "$ref": "AccountUserProfilesListResponse"
15574	//   },
15575	//   "scopes": [
15576	//     "https://www.googleapis.com/auth/dfatrafficking"
15577	//   ]
15578	// }
15579
15580}
15581
15582// Pages invokes f for each page of results.
15583// A non-nil error returned from f will halt the iteration.
15584// The provided context supersedes any context provided to the Context method.
15585func (c *AccountUserProfilesListCall) Pages(ctx context.Context, f func(*AccountUserProfilesListResponse) error) error {
15586	c.ctx_ = ctx
15587	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15588	for {
15589		x, err := c.Do()
15590		if err != nil {
15591			return err
15592		}
15593		if err := f(x); err != nil {
15594			return err
15595		}
15596		if x.NextPageToken == "" {
15597			return nil
15598		}
15599		c.PageToken(x.NextPageToken)
15600	}
15601}
15602
15603// method id "dfareporting.accountUserProfiles.patch":
15604
15605type AccountUserProfilesPatchCall struct {
15606	s                  *Service
15607	profileId          int64
15608	accountuserprofile *AccountUserProfile
15609	urlParams_         gensupport.URLParams
15610	ctx_               context.Context
15611	header_            http.Header
15612}
15613
15614// Patch: Updates an existing account user profile. This method supports
15615// patch semantics.
15616func (r *AccountUserProfilesService) Patch(profileId int64, id int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesPatchCall {
15617	c := &AccountUserProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15618	c.profileId = profileId
15619	c.urlParams_.Set("id", fmt.Sprint(id))
15620	c.accountuserprofile = accountuserprofile
15621	return c
15622}
15623
15624// Fields allows partial responses to be retrieved. See
15625// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15626// for more information.
15627func (c *AccountUserProfilesPatchCall) Fields(s ...googleapi.Field) *AccountUserProfilesPatchCall {
15628	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15629	return c
15630}
15631
15632// Context sets the context to be used in this call's Do method. Any
15633// pending HTTP request will be aborted if the provided context is
15634// canceled.
15635func (c *AccountUserProfilesPatchCall) Context(ctx context.Context) *AccountUserProfilesPatchCall {
15636	c.ctx_ = ctx
15637	return c
15638}
15639
15640// Header returns an http.Header that can be modified by the caller to
15641// add HTTP headers to the request.
15642func (c *AccountUserProfilesPatchCall) Header() http.Header {
15643	if c.header_ == nil {
15644		c.header_ = make(http.Header)
15645	}
15646	return c.header_
15647}
15648
15649func (c *AccountUserProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
15650	reqHeaders := make(http.Header)
15651	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
15652	for k, v := range c.header_ {
15653		reqHeaders[k] = v
15654	}
15655	reqHeaders.Set("User-Agent", c.s.userAgent())
15656	var body io.Reader = nil
15657	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15658	if err != nil {
15659		return nil, err
15660	}
15661	reqHeaders.Set("Content-Type", "application/json")
15662	c.urlParams_.Set("alt", alt)
15663	c.urlParams_.Set("prettyPrint", "false")
15664	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15665	urls += "?" + c.urlParams_.Encode()
15666	req, err := http.NewRequest("PATCH", urls, body)
15667	if err != nil {
15668		return nil, err
15669	}
15670	req.Header = reqHeaders
15671	googleapi.Expand(req.URL, map[string]string{
15672		"profileId": strconv.FormatInt(c.profileId, 10),
15673	})
15674	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15675}
15676
15677// Do executes the "dfareporting.accountUserProfiles.patch" call.
15678// Exactly one of *AccountUserProfile or error will be non-nil. Any
15679// non-2xx status code is an error. Response headers are in either
15680// *AccountUserProfile.ServerResponse.Header or (if a response was
15681// returned at all) in error.(*googleapi.Error).Header. Use
15682// googleapi.IsNotModified to check whether the returned error was
15683// because http.StatusNotModified was returned.
15684func (c *AccountUserProfilesPatchCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15685	gensupport.SetOptions(c.urlParams_, opts...)
15686	res, err := c.doRequest("json")
15687	if res != nil && res.StatusCode == http.StatusNotModified {
15688		if res.Body != nil {
15689			res.Body.Close()
15690		}
15691		return nil, &googleapi.Error{
15692			Code:   res.StatusCode,
15693			Header: res.Header,
15694		}
15695	}
15696	if err != nil {
15697		return nil, err
15698	}
15699	defer googleapi.CloseBody(res)
15700	if err := googleapi.CheckResponse(res); err != nil {
15701		return nil, err
15702	}
15703	ret := &AccountUserProfile{
15704		ServerResponse: googleapi.ServerResponse{
15705			Header:         res.Header,
15706			HTTPStatusCode: res.StatusCode,
15707		},
15708	}
15709	target := &ret
15710	if err := gensupport.DecodeResponse(target, res); err != nil {
15711		return nil, err
15712	}
15713	return ret, nil
15714	// {
15715	//   "description": "Updates an existing account user profile. This method supports patch semantics.",
15716	//   "httpMethod": "PATCH",
15717	//   "id": "dfareporting.accountUserProfiles.patch",
15718	//   "parameterOrder": [
15719	//     "profileId",
15720	//     "id"
15721	//   ],
15722	//   "parameters": {
15723	//     "id": {
15724	//       "description": "User profile ID.",
15725	//       "format": "int64",
15726	//       "location": "query",
15727	//       "required": true,
15728	//       "type": "string"
15729	//     },
15730	//     "profileId": {
15731	//       "description": "User profile ID associated with this request.",
15732	//       "format": "int64",
15733	//       "location": "path",
15734	//       "required": true,
15735	//       "type": "string"
15736	//     }
15737	//   },
15738	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15739	//   "request": {
15740	//     "$ref": "AccountUserProfile"
15741	//   },
15742	//   "response": {
15743	//     "$ref": "AccountUserProfile"
15744	//   },
15745	//   "scopes": [
15746	//     "https://www.googleapis.com/auth/dfatrafficking"
15747	//   ]
15748	// }
15749
15750}
15751
15752// method id "dfareporting.accountUserProfiles.update":
15753
15754type AccountUserProfilesUpdateCall struct {
15755	s                  *Service
15756	profileId          int64
15757	accountuserprofile *AccountUserProfile
15758	urlParams_         gensupport.URLParams
15759	ctx_               context.Context
15760	header_            http.Header
15761}
15762
15763// Update: Updates an existing account user profile.
15764func (r *AccountUserProfilesService) Update(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesUpdateCall {
15765	c := &AccountUserProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15766	c.profileId = profileId
15767	c.accountuserprofile = accountuserprofile
15768	return c
15769}
15770
15771// Fields allows partial responses to be retrieved. See
15772// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15773// for more information.
15774func (c *AccountUserProfilesUpdateCall) Fields(s ...googleapi.Field) *AccountUserProfilesUpdateCall {
15775	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15776	return c
15777}
15778
15779// Context sets the context to be used in this call's Do method. Any
15780// pending HTTP request will be aborted if the provided context is
15781// canceled.
15782func (c *AccountUserProfilesUpdateCall) Context(ctx context.Context) *AccountUserProfilesUpdateCall {
15783	c.ctx_ = ctx
15784	return c
15785}
15786
15787// Header returns an http.Header that can be modified by the caller to
15788// add HTTP headers to the request.
15789func (c *AccountUserProfilesUpdateCall) Header() http.Header {
15790	if c.header_ == nil {
15791		c.header_ = make(http.Header)
15792	}
15793	return c.header_
15794}
15795
15796func (c *AccountUserProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
15797	reqHeaders := make(http.Header)
15798	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
15799	for k, v := range c.header_ {
15800		reqHeaders[k] = v
15801	}
15802	reqHeaders.Set("User-Agent", c.s.userAgent())
15803	var body io.Reader = nil
15804	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15805	if err != nil {
15806		return nil, err
15807	}
15808	reqHeaders.Set("Content-Type", "application/json")
15809	c.urlParams_.Set("alt", alt)
15810	c.urlParams_.Set("prettyPrint", "false")
15811	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15812	urls += "?" + c.urlParams_.Encode()
15813	req, err := http.NewRequest("PUT", urls, body)
15814	if err != nil {
15815		return nil, err
15816	}
15817	req.Header = reqHeaders
15818	googleapi.Expand(req.URL, map[string]string{
15819		"profileId": strconv.FormatInt(c.profileId, 10),
15820	})
15821	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15822}
15823
15824// Do executes the "dfareporting.accountUserProfiles.update" call.
15825// Exactly one of *AccountUserProfile or error will be non-nil. Any
15826// non-2xx status code is an error. Response headers are in either
15827// *AccountUserProfile.ServerResponse.Header or (if a response was
15828// returned at all) in error.(*googleapi.Error).Header. Use
15829// googleapi.IsNotModified to check whether the returned error was
15830// because http.StatusNotModified was returned.
15831func (c *AccountUserProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15832	gensupport.SetOptions(c.urlParams_, opts...)
15833	res, err := c.doRequest("json")
15834	if res != nil && res.StatusCode == http.StatusNotModified {
15835		if res.Body != nil {
15836			res.Body.Close()
15837		}
15838		return nil, &googleapi.Error{
15839			Code:   res.StatusCode,
15840			Header: res.Header,
15841		}
15842	}
15843	if err != nil {
15844		return nil, err
15845	}
15846	defer googleapi.CloseBody(res)
15847	if err := googleapi.CheckResponse(res); err != nil {
15848		return nil, err
15849	}
15850	ret := &AccountUserProfile{
15851		ServerResponse: googleapi.ServerResponse{
15852			Header:         res.Header,
15853			HTTPStatusCode: res.StatusCode,
15854		},
15855	}
15856	target := &ret
15857	if err := gensupport.DecodeResponse(target, res); err != nil {
15858		return nil, err
15859	}
15860	return ret, nil
15861	// {
15862	//   "description": "Updates an existing account user profile.",
15863	//   "httpMethod": "PUT",
15864	//   "id": "dfareporting.accountUserProfiles.update",
15865	//   "parameterOrder": [
15866	//     "profileId"
15867	//   ],
15868	//   "parameters": {
15869	//     "profileId": {
15870	//       "description": "User profile ID associated with this request.",
15871	//       "format": "int64",
15872	//       "location": "path",
15873	//       "required": true,
15874	//       "type": "string"
15875	//     }
15876	//   },
15877	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15878	//   "request": {
15879	//     "$ref": "AccountUserProfile"
15880	//   },
15881	//   "response": {
15882	//     "$ref": "AccountUserProfile"
15883	//   },
15884	//   "scopes": [
15885	//     "https://www.googleapis.com/auth/dfatrafficking"
15886	//   ]
15887	// }
15888
15889}
15890
15891// method id "dfareporting.accounts.get":
15892
15893type AccountsGetCall struct {
15894	s            *Service
15895	profileId    int64
15896	id           int64
15897	urlParams_   gensupport.URLParams
15898	ifNoneMatch_ string
15899	ctx_         context.Context
15900	header_      http.Header
15901}
15902
15903// Get: Gets one account by ID.
15904func (r *AccountsService) Get(profileId int64, id int64) *AccountsGetCall {
15905	c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15906	c.profileId = profileId
15907	c.id = id
15908	return c
15909}
15910
15911// Fields allows partial responses to be retrieved. See
15912// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15913// for more information.
15914func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
15915	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15916	return c
15917}
15918
15919// IfNoneMatch sets the optional parameter which makes the operation
15920// fail if the object's ETag matches the given value. This is useful for
15921// getting updates only after the object has changed since the last
15922// request. Use googleapi.IsNotModified to check whether the response
15923// error from Do is the result of In-None-Match.
15924func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
15925	c.ifNoneMatch_ = entityTag
15926	return c
15927}
15928
15929// Context sets the context to be used in this call's Do method. Any
15930// pending HTTP request will be aborted if the provided context is
15931// canceled.
15932func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
15933	c.ctx_ = ctx
15934	return c
15935}
15936
15937// Header returns an http.Header that can be modified by the caller to
15938// add HTTP headers to the request.
15939func (c *AccountsGetCall) Header() http.Header {
15940	if c.header_ == nil {
15941		c.header_ = make(http.Header)
15942	}
15943	return c.header_
15944}
15945
15946func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
15947	reqHeaders := make(http.Header)
15948	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
15949	for k, v := range c.header_ {
15950		reqHeaders[k] = v
15951	}
15952	reqHeaders.Set("User-Agent", c.s.userAgent())
15953	if c.ifNoneMatch_ != "" {
15954		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15955	}
15956	var body io.Reader = nil
15957	c.urlParams_.Set("alt", alt)
15958	c.urlParams_.Set("prettyPrint", "false")
15959	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts/{id}")
15960	urls += "?" + c.urlParams_.Encode()
15961	req, err := http.NewRequest("GET", urls, body)
15962	if err != nil {
15963		return nil, err
15964	}
15965	req.Header = reqHeaders
15966	googleapi.Expand(req.URL, map[string]string{
15967		"profileId": strconv.FormatInt(c.profileId, 10),
15968		"id":        strconv.FormatInt(c.id, 10),
15969	})
15970	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15971}
15972
15973// Do executes the "dfareporting.accounts.get" call.
15974// Exactly one of *Account or error will be non-nil. Any non-2xx status
15975// code is an error. Response headers are in either
15976// *Account.ServerResponse.Header or (if a response was returned at all)
15977// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15978// check whether the returned error was because http.StatusNotModified
15979// was returned.
15980func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
15981	gensupport.SetOptions(c.urlParams_, opts...)
15982	res, err := c.doRequest("json")
15983	if res != nil && res.StatusCode == http.StatusNotModified {
15984		if res.Body != nil {
15985			res.Body.Close()
15986		}
15987		return nil, &googleapi.Error{
15988			Code:   res.StatusCode,
15989			Header: res.Header,
15990		}
15991	}
15992	if err != nil {
15993		return nil, err
15994	}
15995	defer googleapi.CloseBody(res)
15996	if err := googleapi.CheckResponse(res); err != nil {
15997		return nil, err
15998	}
15999	ret := &Account{
16000		ServerResponse: googleapi.ServerResponse{
16001			Header:         res.Header,
16002			HTTPStatusCode: res.StatusCode,
16003		},
16004	}
16005	target := &ret
16006	if err := gensupport.DecodeResponse(target, res); err != nil {
16007		return nil, err
16008	}
16009	return ret, nil
16010	// {
16011	//   "description": "Gets one account by ID.",
16012	//   "httpMethod": "GET",
16013	//   "id": "dfareporting.accounts.get",
16014	//   "parameterOrder": [
16015	//     "profileId",
16016	//     "id"
16017	//   ],
16018	//   "parameters": {
16019	//     "id": {
16020	//       "description": "Account ID.",
16021	//       "format": "int64",
16022	//       "location": "path",
16023	//       "required": true,
16024	//       "type": "string"
16025	//     },
16026	//     "profileId": {
16027	//       "description": "User profile ID associated with this request.",
16028	//       "format": "int64",
16029	//       "location": "path",
16030	//       "required": true,
16031	//       "type": "string"
16032	//     }
16033	//   },
16034	//   "path": "userprofiles/{profileId}/accounts/{id}",
16035	//   "response": {
16036	//     "$ref": "Account"
16037	//   },
16038	//   "scopes": [
16039	//     "https://www.googleapis.com/auth/dfatrafficking"
16040	//   ]
16041	// }
16042
16043}
16044
16045// method id "dfareporting.accounts.list":
16046
16047type AccountsListCall struct {
16048	s            *Service
16049	profileId    int64
16050	urlParams_   gensupport.URLParams
16051	ifNoneMatch_ string
16052	ctx_         context.Context
16053	header_      http.Header
16054}
16055
16056// List: Retrieves the list of accounts, possibly filtered. This method
16057// supports paging.
16058func (r *AccountsService) List(profileId int64) *AccountsListCall {
16059	c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16060	c.profileId = profileId
16061	return c
16062}
16063
16064// Active sets the optional parameter "active": Select only active
16065// accounts. Don't set this field to select both active and non-active
16066// accounts.
16067func (c *AccountsListCall) Active(active bool) *AccountsListCall {
16068	c.urlParams_.Set("active", fmt.Sprint(active))
16069	return c
16070}
16071
16072// Ids sets the optional parameter "ids": Select only accounts with
16073// these IDs.
16074func (c *AccountsListCall) Ids(ids ...int64) *AccountsListCall {
16075	var ids_ []string
16076	for _, v := range ids {
16077		ids_ = append(ids_, fmt.Sprint(v))
16078	}
16079	c.urlParams_.SetMulti("ids", ids_)
16080	return c
16081}
16082
16083// MaxResults sets the optional parameter "maxResults": Maximum number
16084// of results to return.
16085func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
16086	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16087	return c
16088}
16089
16090// PageToken sets the optional parameter "pageToken": Value of the
16091// nextPageToken from the previous result page.
16092func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
16093	c.urlParams_.Set("pageToken", pageToken)
16094	return c
16095}
16096
16097// SearchString sets the optional parameter "searchString": Allows
16098// searching for objects by name or ID. Wildcards (*) are allowed. For
16099// example, "account*2015" will return objects with names like "account
16100// June 2015", "account April 2015", or simply "account 2015". Most of
16101// the searches also add wildcards implicitly at the start and the end
16102// of the search string. For example, a search string of "account" will
16103// match objects with name "my account", "account 2015", or simply
16104// "account".
16105func (c *AccountsListCall) SearchString(searchString string) *AccountsListCall {
16106	c.urlParams_.Set("searchString", searchString)
16107	return c
16108}
16109
16110// SortField sets the optional parameter "sortField": Field by which to
16111// sort the list.
16112//
16113// Possible values:
16114//   "ID" (default)
16115//   "NAME"
16116func (c *AccountsListCall) SortField(sortField string) *AccountsListCall {
16117	c.urlParams_.Set("sortField", sortField)
16118	return c
16119}
16120
16121// SortOrder sets the optional parameter "sortOrder": Order of sorted
16122// results.
16123//
16124// Possible values:
16125//   "ASCENDING" (default)
16126//   "DESCENDING"
16127func (c *AccountsListCall) SortOrder(sortOrder string) *AccountsListCall {
16128	c.urlParams_.Set("sortOrder", sortOrder)
16129	return c
16130}
16131
16132// Fields allows partial responses to be retrieved. See
16133// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16134// for more information.
16135func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
16136	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16137	return c
16138}
16139
16140// IfNoneMatch sets the optional parameter which makes the operation
16141// fail if the object's ETag matches the given value. This is useful for
16142// getting updates only after the object has changed since the last
16143// request. Use googleapi.IsNotModified to check whether the response
16144// error from Do is the result of In-None-Match.
16145func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
16146	c.ifNoneMatch_ = entityTag
16147	return c
16148}
16149
16150// Context sets the context to be used in this call's Do method. Any
16151// pending HTTP request will be aborted if the provided context is
16152// canceled.
16153func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
16154	c.ctx_ = ctx
16155	return c
16156}
16157
16158// Header returns an http.Header that can be modified by the caller to
16159// add HTTP headers to the request.
16160func (c *AccountsListCall) Header() http.Header {
16161	if c.header_ == nil {
16162		c.header_ = make(http.Header)
16163	}
16164	return c.header_
16165}
16166
16167func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
16168	reqHeaders := make(http.Header)
16169	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
16170	for k, v := range c.header_ {
16171		reqHeaders[k] = v
16172	}
16173	reqHeaders.Set("User-Agent", c.s.userAgent())
16174	if c.ifNoneMatch_ != "" {
16175		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16176	}
16177	var body io.Reader = nil
16178	c.urlParams_.Set("alt", alt)
16179	c.urlParams_.Set("prettyPrint", "false")
16180	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16181	urls += "?" + c.urlParams_.Encode()
16182	req, err := http.NewRequest("GET", urls, body)
16183	if err != nil {
16184		return nil, err
16185	}
16186	req.Header = reqHeaders
16187	googleapi.Expand(req.URL, map[string]string{
16188		"profileId": strconv.FormatInt(c.profileId, 10),
16189	})
16190	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16191}
16192
16193// Do executes the "dfareporting.accounts.list" call.
16194// Exactly one of *AccountsListResponse or error will be non-nil. Any
16195// non-2xx status code is an error. Response headers are in either
16196// *AccountsListResponse.ServerResponse.Header or (if a response was
16197// returned at all) in error.(*googleapi.Error).Header. Use
16198// googleapi.IsNotModified to check whether the returned error was
16199// because http.StatusNotModified was returned.
16200func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) {
16201	gensupport.SetOptions(c.urlParams_, opts...)
16202	res, err := c.doRequest("json")
16203	if res != nil && res.StatusCode == http.StatusNotModified {
16204		if res.Body != nil {
16205			res.Body.Close()
16206		}
16207		return nil, &googleapi.Error{
16208			Code:   res.StatusCode,
16209			Header: res.Header,
16210		}
16211	}
16212	if err != nil {
16213		return nil, err
16214	}
16215	defer googleapi.CloseBody(res)
16216	if err := googleapi.CheckResponse(res); err != nil {
16217		return nil, err
16218	}
16219	ret := &AccountsListResponse{
16220		ServerResponse: googleapi.ServerResponse{
16221			Header:         res.Header,
16222			HTTPStatusCode: res.StatusCode,
16223		},
16224	}
16225	target := &ret
16226	if err := gensupport.DecodeResponse(target, res); err != nil {
16227		return nil, err
16228	}
16229	return ret, nil
16230	// {
16231	//   "description": "Retrieves the list of accounts, possibly filtered. This method supports paging.",
16232	//   "httpMethod": "GET",
16233	//   "id": "dfareporting.accounts.list",
16234	//   "parameterOrder": [
16235	//     "profileId"
16236	//   ],
16237	//   "parameters": {
16238	//     "active": {
16239	//       "description": "Select only active accounts. Don't set this field to select both active and non-active accounts.",
16240	//       "location": "query",
16241	//       "type": "boolean"
16242	//     },
16243	//     "ids": {
16244	//       "description": "Select only accounts with these IDs.",
16245	//       "format": "int64",
16246	//       "location": "query",
16247	//       "repeated": true,
16248	//       "type": "string"
16249	//     },
16250	//     "maxResults": {
16251	//       "default": "1000",
16252	//       "description": "Maximum number of results to return.",
16253	//       "format": "int32",
16254	//       "location": "query",
16255	//       "maximum": "1000",
16256	//       "minimum": "0",
16257	//       "type": "integer"
16258	//     },
16259	//     "pageToken": {
16260	//       "description": "Value of the nextPageToken from the previous result page.",
16261	//       "location": "query",
16262	//       "type": "string"
16263	//     },
16264	//     "profileId": {
16265	//       "description": "User profile ID associated with this request.",
16266	//       "format": "int64",
16267	//       "location": "path",
16268	//       "required": true,
16269	//       "type": "string"
16270	//     },
16271	//     "searchString": {
16272	//       "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\".",
16273	//       "location": "query",
16274	//       "type": "string"
16275	//     },
16276	//     "sortField": {
16277	//       "default": "ID",
16278	//       "description": "Field by which to sort the list.",
16279	//       "enum": [
16280	//         "ID",
16281	//         "NAME"
16282	//       ],
16283	//       "enumDescriptions": [
16284	//         "",
16285	//         ""
16286	//       ],
16287	//       "location": "query",
16288	//       "type": "string"
16289	//     },
16290	//     "sortOrder": {
16291	//       "default": "ASCENDING",
16292	//       "description": "Order of sorted results.",
16293	//       "enum": [
16294	//         "ASCENDING",
16295	//         "DESCENDING"
16296	//       ],
16297	//       "enumDescriptions": [
16298	//         "",
16299	//         ""
16300	//       ],
16301	//       "location": "query",
16302	//       "type": "string"
16303	//     }
16304	//   },
16305	//   "path": "userprofiles/{profileId}/accounts",
16306	//   "response": {
16307	//     "$ref": "AccountsListResponse"
16308	//   },
16309	//   "scopes": [
16310	//     "https://www.googleapis.com/auth/dfatrafficking"
16311	//   ]
16312	// }
16313
16314}
16315
16316// Pages invokes f for each page of results.
16317// A non-nil error returned from f will halt the iteration.
16318// The provided context supersedes any context provided to the Context method.
16319func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error {
16320	c.ctx_ = ctx
16321	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16322	for {
16323		x, err := c.Do()
16324		if err != nil {
16325			return err
16326		}
16327		if err := f(x); err != nil {
16328			return err
16329		}
16330		if x.NextPageToken == "" {
16331			return nil
16332		}
16333		c.PageToken(x.NextPageToken)
16334	}
16335}
16336
16337// method id "dfareporting.accounts.patch":
16338
16339type AccountsPatchCall struct {
16340	s          *Service
16341	profileId  int64
16342	account    *Account
16343	urlParams_ gensupport.URLParams
16344	ctx_       context.Context
16345	header_    http.Header
16346}
16347
16348// Patch: Updates an existing account. This method supports patch
16349// semantics.
16350func (r *AccountsService) Patch(profileId int64, id int64, account *Account) *AccountsPatchCall {
16351	c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16352	c.profileId = profileId
16353	c.urlParams_.Set("id", fmt.Sprint(id))
16354	c.account = account
16355	return c
16356}
16357
16358// Fields allows partial responses to be retrieved. See
16359// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16360// for more information.
16361func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
16362	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16363	return c
16364}
16365
16366// Context sets the context to be used in this call's Do method. Any
16367// pending HTTP request will be aborted if the provided context is
16368// canceled.
16369func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
16370	c.ctx_ = ctx
16371	return c
16372}
16373
16374// Header returns an http.Header that can be modified by the caller to
16375// add HTTP headers to the request.
16376func (c *AccountsPatchCall) Header() http.Header {
16377	if c.header_ == nil {
16378		c.header_ = make(http.Header)
16379	}
16380	return c.header_
16381}
16382
16383func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
16384	reqHeaders := make(http.Header)
16385	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
16386	for k, v := range c.header_ {
16387		reqHeaders[k] = v
16388	}
16389	reqHeaders.Set("User-Agent", c.s.userAgent())
16390	var body io.Reader = nil
16391	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16392	if err != nil {
16393		return nil, err
16394	}
16395	reqHeaders.Set("Content-Type", "application/json")
16396	c.urlParams_.Set("alt", alt)
16397	c.urlParams_.Set("prettyPrint", "false")
16398	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16399	urls += "?" + c.urlParams_.Encode()
16400	req, err := http.NewRequest("PATCH", urls, body)
16401	if err != nil {
16402		return nil, err
16403	}
16404	req.Header = reqHeaders
16405	googleapi.Expand(req.URL, map[string]string{
16406		"profileId": strconv.FormatInt(c.profileId, 10),
16407	})
16408	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16409}
16410
16411// Do executes the "dfareporting.accounts.patch" call.
16412// Exactly one of *Account or error will be non-nil. Any non-2xx status
16413// code is an error. Response headers are in either
16414// *Account.ServerResponse.Header or (if a response was returned at all)
16415// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16416// check whether the returned error was because http.StatusNotModified
16417// was returned.
16418func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16419	gensupport.SetOptions(c.urlParams_, opts...)
16420	res, err := c.doRequest("json")
16421	if res != nil && res.StatusCode == http.StatusNotModified {
16422		if res.Body != nil {
16423			res.Body.Close()
16424		}
16425		return nil, &googleapi.Error{
16426			Code:   res.StatusCode,
16427			Header: res.Header,
16428		}
16429	}
16430	if err != nil {
16431		return nil, err
16432	}
16433	defer googleapi.CloseBody(res)
16434	if err := googleapi.CheckResponse(res); err != nil {
16435		return nil, err
16436	}
16437	ret := &Account{
16438		ServerResponse: googleapi.ServerResponse{
16439			Header:         res.Header,
16440			HTTPStatusCode: res.StatusCode,
16441		},
16442	}
16443	target := &ret
16444	if err := gensupport.DecodeResponse(target, res); err != nil {
16445		return nil, err
16446	}
16447	return ret, nil
16448	// {
16449	//   "description": "Updates an existing account. This method supports patch semantics.",
16450	//   "httpMethod": "PATCH",
16451	//   "id": "dfareporting.accounts.patch",
16452	//   "parameterOrder": [
16453	//     "profileId",
16454	//     "id"
16455	//   ],
16456	//   "parameters": {
16457	//     "id": {
16458	//       "description": "Account ID.",
16459	//       "format": "int64",
16460	//       "location": "query",
16461	//       "required": true,
16462	//       "type": "string"
16463	//     },
16464	//     "profileId": {
16465	//       "description": "User profile ID associated with this request.",
16466	//       "format": "int64",
16467	//       "location": "path",
16468	//       "required": true,
16469	//       "type": "string"
16470	//     }
16471	//   },
16472	//   "path": "userprofiles/{profileId}/accounts",
16473	//   "request": {
16474	//     "$ref": "Account"
16475	//   },
16476	//   "response": {
16477	//     "$ref": "Account"
16478	//   },
16479	//   "scopes": [
16480	//     "https://www.googleapis.com/auth/dfatrafficking"
16481	//   ]
16482	// }
16483
16484}
16485
16486// method id "dfareporting.accounts.update":
16487
16488type AccountsUpdateCall struct {
16489	s          *Service
16490	profileId  int64
16491	account    *Account
16492	urlParams_ gensupport.URLParams
16493	ctx_       context.Context
16494	header_    http.Header
16495}
16496
16497// Update: Updates an existing account.
16498func (r *AccountsService) Update(profileId int64, account *Account) *AccountsUpdateCall {
16499	c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16500	c.profileId = profileId
16501	c.account = account
16502	return c
16503}
16504
16505// Fields allows partial responses to be retrieved. See
16506// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16507// for more information.
16508func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
16509	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16510	return c
16511}
16512
16513// Context sets the context to be used in this call's Do method. Any
16514// pending HTTP request will be aborted if the provided context is
16515// canceled.
16516func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
16517	c.ctx_ = ctx
16518	return c
16519}
16520
16521// Header returns an http.Header that can be modified by the caller to
16522// add HTTP headers to the request.
16523func (c *AccountsUpdateCall) Header() http.Header {
16524	if c.header_ == nil {
16525		c.header_ = make(http.Header)
16526	}
16527	return c.header_
16528}
16529
16530func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
16531	reqHeaders := make(http.Header)
16532	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
16533	for k, v := range c.header_ {
16534		reqHeaders[k] = v
16535	}
16536	reqHeaders.Set("User-Agent", c.s.userAgent())
16537	var body io.Reader = nil
16538	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16539	if err != nil {
16540		return nil, err
16541	}
16542	reqHeaders.Set("Content-Type", "application/json")
16543	c.urlParams_.Set("alt", alt)
16544	c.urlParams_.Set("prettyPrint", "false")
16545	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16546	urls += "?" + c.urlParams_.Encode()
16547	req, err := http.NewRequest("PUT", urls, body)
16548	if err != nil {
16549		return nil, err
16550	}
16551	req.Header = reqHeaders
16552	googleapi.Expand(req.URL, map[string]string{
16553		"profileId": strconv.FormatInt(c.profileId, 10),
16554	})
16555	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16556}
16557
16558// Do executes the "dfareporting.accounts.update" call.
16559// Exactly one of *Account or error will be non-nil. Any non-2xx status
16560// code is an error. Response headers are in either
16561// *Account.ServerResponse.Header or (if a response was returned at all)
16562// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16563// check whether the returned error was because http.StatusNotModified
16564// was returned.
16565func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16566	gensupport.SetOptions(c.urlParams_, opts...)
16567	res, err := c.doRequest("json")
16568	if res != nil && res.StatusCode == http.StatusNotModified {
16569		if res.Body != nil {
16570			res.Body.Close()
16571		}
16572		return nil, &googleapi.Error{
16573			Code:   res.StatusCode,
16574			Header: res.Header,
16575		}
16576	}
16577	if err != nil {
16578		return nil, err
16579	}
16580	defer googleapi.CloseBody(res)
16581	if err := googleapi.CheckResponse(res); err != nil {
16582		return nil, err
16583	}
16584	ret := &Account{
16585		ServerResponse: googleapi.ServerResponse{
16586			Header:         res.Header,
16587			HTTPStatusCode: res.StatusCode,
16588		},
16589	}
16590	target := &ret
16591	if err := gensupport.DecodeResponse(target, res); err != nil {
16592		return nil, err
16593	}
16594	return ret, nil
16595	// {
16596	//   "description": "Updates an existing account.",
16597	//   "httpMethod": "PUT",
16598	//   "id": "dfareporting.accounts.update",
16599	//   "parameterOrder": [
16600	//     "profileId"
16601	//   ],
16602	//   "parameters": {
16603	//     "profileId": {
16604	//       "description": "User profile ID associated with this request.",
16605	//       "format": "int64",
16606	//       "location": "path",
16607	//       "required": true,
16608	//       "type": "string"
16609	//     }
16610	//   },
16611	//   "path": "userprofiles/{profileId}/accounts",
16612	//   "request": {
16613	//     "$ref": "Account"
16614	//   },
16615	//   "response": {
16616	//     "$ref": "Account"
16617	//   },
16618	//   "scopes": [
16619	//     "https://www.googleapis.com/auth/dfatrafficking"
16620	//   ]
16621	// }
16622
16623}
16624
16625// method id "dfareporting.ads.get":
16626
16627type AdsGetCall struct {
16628	s            *Service
16629	profileId    int64
16630	id           int64
16631	urlParams_   gensupport.URLParams
16632	ifNoneMatch_ string
16633	ctx_         context.Context
16634	header_      http.Header
16635}
16636
16637// Get: Gets one ad by ID.
16638func (r *AdsService) Get(profileId int64, id int64) *AdsGetCall {
16639	c := &AdsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16640	c.profileId = profileId
16641	c.id = id
16642	return c
16643}
16644
16645// Fields allows partial responses to be retrieved. See
16646// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16647// for more information.
16648func (c *AdsGetCall) Fields(s ...googleapi.Field) *AdsGetCall {
16649	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16650	return c
16651}
16652
16653// IfNoneMatch sets the optional parameter which makes the operation
16654// fail if the object's ETag matches the given value. This is useful for
16655// getting updates only after the object has changed since the last
16656// request. Use googleapi.IsNotModified to check whether the response
16657// error from Do is the result of In-None-Match.
16658func (c *AdsGetCall) IfNoneMatch(entityTag string) *AdsGetCall {
16659	c.ifNoneMatch_ = entityTag
16660	return c
16661}
16662
16663// Context sets the context to be used in this call's Do method. Any
16664// pending HTTP request will be aborted if the provided context is
16665// canceled.
16666func (c *AdsGetCall) Context(ctx context.Context) *AdsGetCall {
16667	c.ctx_ = ctx
16668	return c
16669}
16670
16671// Header returns an http.Header that can be modified by the caller to
16672// add HTTP headers to the request.
16673func (c *AdsGetCall) Header() http.Header {
16674	if c.header_ == nil {
16675		c.header_ = make(http.Header)
16676	}
16677	return c.header_
16678}
16679
16680func (c *AdsGetCall) doRequest(alt string) (*http.Response, error) {
16681	reqHeaders := make(http.Header)
16682	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
16683	for k, v := range c.header_ {
16684		reqHeaders[k] = v
16685	}
16686	reqHeaders.Set("User-Agent", c.s.userAgent())
16687	if c.ifNoneMatch_ != "" {
16688		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16689	}
16690	var body io.Reader = nil
16691	c.urlParams_.Set("alt", alt)
16692	c.urlParams_.Set("prettyPrint", "false")
16693	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads/{id}")
16694	urls += "?" + c.urlParams_.Encode()
16695	req, err := http.NewRequest("GET", urls, body)
16696	if err != nil {
16697		return nil, err
16698	}
16699	req.Header = reqHeaders
16700	googleapi.Expand(req.URL, map[string]string{
16701		"profileId": strconv.FormatInt(c.profileId, 10),
16702		"id":        strconv.FormatInt(c.id, 10),
16703	})
16704	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16705}
16706
16707// Do executes the "dfareporting.ads.get" call.
16708// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
16709// is an error. Response headers are in either *Ad.ServerResponse.Header
16710// or (if a response was returned at all) in
16711// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16712// whether the returned error was because http.StatusNotModified was
16713// returned.
16714func (c *AdsGetCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16715	gensupport.SetOptions(c.urlParams_, opts...)
16716	res, err := c.doRequest("json")
16717	if res != nil && res.StatusCode == http.StatusNotModified {
16718		if res.Body != nil {
16719			res.Body.Close()
16720		}
16721		return nil, &googleapi.Error{
16722			Code:   res.StatusCode,
16723			Header: res.Header,
16724		}
16725	}
16726	if err != nil {
16727		return nil, err
16728	}
16729	defer googleapi.CloseBody(res)
16730	if err := googleapi.CheckResponse(res); err != nil {
16731		return nil, err
16732	}
16733	ret := &Ad{
16734		ServerResponse: googleapi.ServerResponse{
16735			Header:         res.Header,
16736			HTTPStatusCode: res.StatusCode,
16737		},
16738	}
16739	target := &ret
16740	if err := gensupport.DecodeResponse(target, res); err != nil {
16741		return nil, err
16742	}
16743	return ret, nil
16744	// {
16745	//   "description": "Gets one ad by ID.",
16746	//   "httpMethod": "GET",
16747	//   "id": "dfareporting.ads.get",
16748	//   "parameterOrder": [
16749	//     "profileId",
16750	//     "id"
16751	//   ],
16752	//   "parameters": {
16753	//     "id": {
16754	//       "description": "Ad ID.",
16755	//       "format": "int64",
16756	//       "location": "path",
16757	//       "required": true,
16758	//       "type": "string"
16759	//     },
16760	//     "profileId": {
16761	//       "description": "User profile ID associated with this request.",
16762	//       "format": "int64",
16763	//       "location": "path",
16764	//       "required": true,
16765	//       "type": "string"
16766	//     }
16767	//   },
16768	//   "path": "userprofiles/{profileId}/ads/{id}",
16769	//   "response": {
16770	//     "$ref": "Ad"
16771	//   },
16772	//   "scopes": [
16773	//     "https://www.googleapis.com/auth/dfatrafficking"
16774	//   ]
16775	// }
16776
16777}
16778
16779// method id "dfareporting.ads.insert":
16780
16781type AdsInsertCall struct {
16782	s          *Service
16783	profileId  int64
16784	ad         *Ad
16785	urlParams_ gensupport.URLParams
16786	ctx_       context.Context
16787	header_    http.Header
16788}
16789
16790// Insert: Inserts a new ad.
16791func (r *AdsService) Insert(profileId int64, ad *Ad) *AdsInsertCall {
16792	c := &AdsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16793	c.profileId = profileId
16794	c.ad = ad
16795	return c
16796}
16797
16798// Fields allows partial responses to be retrieved. See
16799// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16800// for more information.
16801func (c *AdsInsertCall) Fields(s ...googleapi.Field) *AdsInsertCall {
16802	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16803	return c
16804}
16805
16806// Context sets the context to be used in this call's Do method. Any
16807// pending HTTP request will be aborted if the provided context is
16808// canceled.
16809func (c *AdsInsertCall) Context(ctx context.Context) *AdsInsertCall {
16810	c.ctx_ = ctx
16811	return c
16812}
16813
16814// Header returns an http.Header that can be modified by the caller to
16815// add HTTP headers to the request.
16816func (c *AdsInsertCall) Header() http.Header {
16817	if c.header_ == nil {
16818		c.header_ = make(http.Header)
16819	}
16820	return c.header_
16821}
16822
16823func (c *AdsInsertCall) doRequest(alt string) (*http.Response, error) {
16824	reqHeaders := make(http.Header)
16825	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
16826	for k, v := range c.header_ {
16827		reqHeaders[k] = v
16828	}
16829	reqHeaders.Set("User-Agent", c.s.userAgent())
16830	var body io.Reader = nil
16831	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
16832	if err != nil {
16833		return nil, err
16834	}
16835	reqHeaders.Set("Content-Type", "application/json")
16836	c.urlParams_.Set("alt", alt)
16837	c.urlParams_.Set("prettyPrint", "false")
16838	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
16839	urls += "?" + c.urlParams_.Encode()
16840	req, err := http.NewRequest("POST", urls, body)
16841	if err != nil {
16842		return nil, err
16843	}
16844	req.Header = reqHeaders
16845	googleapi.Expand(req.URL, map[string]string{
16846		"profileId": strconv.FormatInt(c.profileId, 10),
16847	})
16848	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16849}
16850
16851// Do executes the "dfareporting.ads.insert" call.
16852// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
16853// is an error. Response headers are in either *Ad.ServerResponse.Header
16854// or (if a response was returned at all) in
16855// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16856// whether the returned error was because http.StatusNotModified was
16857// returned.
16858func (c *AdsInsertCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16859	gensupport.SetOptions(c.urlParams_, opts...)
16860	res, err := c.doRequest("json")
16861	if res != nil && res.StatusCode == http.StatusNotModified {
16862		if res.Body != nil {
16863			res.Body.Close()
16864		}
16865		return nil, &googleapi.Error{
16866			Code:   res.StatusCode,
16867			Header: res.Header,
16868		}
16869	}
16870	if err != nil {
16871		return nil, err
16872	}
16873	defer googleapi.CloseBody(res)
16874	if err := googleapi.CheckResponse(res); err != nil {
16875		return nil, err
16876	}
16877	ret := &Ad{
16878		ServerResponse: googleapi.ServerResponse{
16879			Header:         res.Header,
16880			HTTPStatusCode: res.StatusCode,
16881		},
16882	}
16883	target := &ret
16884	if err := gensupport.DecodeResponse(target, res); err != nil {
16885		return nil, err
16886	}
16887	return ret, nil
16888	// {
16889	//   "description": "Inserts a new ad.",
16890	//   "httpMethod": "POST",
16891	//   "id": "dfareporting.ads.insert",
16892	//   "parameterOrder": [
16893	//     "profileId"
16894	//   ],
16895	//   "parameters": {
16896	//     "profileId": {
16897	//       "description": "User profile ID associated with this request.",
16898	//       "format": "int64",
16899	//       "location": "path",
16900	//       "required": true,
16901	//       "type": "string"
16902	//     }
16903	//   },
16904	//   "path": "userprofiles/{profileId}/ads",
16905	//   "request": {
16906	//     "$ref": "Ad"
16907	//   },
16908	//   "response": {
16909	//     "$ref": "Ad"
16910	//   },
16911	//   "scopes": [
16912	//     "https://www.googleapis.com/auth/dfatrafficking"
16913	//   ]
16914	// }
16915
16916}
16917
16918// method id "dfareporting.ads.list":
16919
16920type AdsListCall struct {
16921	s            *Service
16922	profileId    int64
16923	urlParams_   gensupport.URLParams
16924	ifNoneMatch_ string
16925	ctx_         context.Context
16926	header_      http.Header
16927}
16928
16929// List: Retrieves a list of ads, possibly filtered. This method
16930// supports paging.
16931func (r *AdsService) List(profileId int64) *AdsListCall {
16932	c := &AdsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16933	c.profileId = profileId
16934	return c
16935}
16936
16937// Active sets the optional parameter "active": Select only active ads.
16938func (c *AdsListCall) Active(active bool) *AdsListCall {
16939	c.urlParams_.Set("active", fmt.Sprint(active))
16940	return c
16941}
16942
16943// AdvertiserId sets the optional parameter "advertiserId": Select only
16944// ads with this advertiser ID.
16945func (c *AdsListCall) AdvertiserId(advertiserId int64) *AdsListCall {
16946	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
16947	return c
16948}
16949
16950// Archived sets the optional parameter "archived": Select only archived
16951// ads.
16952func (c *AdsListCall) Archived(archived bool) *AdsListCall {
16953	c.urlParams_.Set("archived", fmt.Sprint(archived))
16954	return c
16955}
16956
16957// AudienceSegmentIds sets the optional parameter "audienceSegmentIds":
16958// Select only ads with these audience segment IDs.
16959func (c *AdsListCall) AudienceSegmentIds(audienceSegmentIds ...int64) *AdsListCall {
16960	var audienceSegmentIds_ []string
16961	for _, v := range audienceSegmentIds {
16962		audienceSegmentIds_ = append(audienceSegmentIds_, fmt.Sprint(v))
16963	}
16964	c.urlParams_.SetMulti("audienceSegmentIds", audienceSegmentIds_)
16965	return c
16966}
16967
16968// CampaignIds sets the optional parameter "campaignIds": Select only
16969// ads with these campaign IDs.
16970func (c *AdsListCall) CampaignIds(campaignIds ...int64) *AdsListCall {
16971	var campaignIds_ []string
16972	for _, v := range campaignIds {
16973		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
16974	}
16975	c.urlParams_.SetMulti("campaignIds", campaignIds_)
16976	return c
16977}
16978
16979// Compatibility sets the optional parameter "compatibility": Select
16980// default ads with the specified compatibility. Applicable when type is
16981// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
16982// rendering either on desktop or on mobile devices for regular or
16983// interstitial ads, respectively. APP and APP_INTERSTITIAL are for
16984// rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an
16985// in-stream video ads developed with the VAST standard.
16986//
16987// Possible values:
16988//   "APP"
16989//   "APP_INTERSTITIAL"
16990//   "DISPLAY"
16991//   "DISPLAY_INTERSTITIAL"
16992//   "IN_STREAM_AUDIO"
16993//   "IN_STREAM_VIDEO"
16994func (c *AdsListCall) Compatibility(compatibility string) *AdsListCall {
16995	c.urlParams_.Set("compatibility", compatibility)
16996	return c
16997}
16998
16999// CreativeIds sets the optional parameter "creativeIds": Select only
17000// ads with these creative IDs assigned.
17001func (c *AdsListCall) CreativeIds(creativeIds ...int64) *AdsListCall {
17002	var creativeIds_ []string
17003	for _, v := range creativeIds {
17004		creativeIds_ = append(creativeIds_, fmt.Sprint(v))
17005	}
17006	c.urlParams_.SetMulti("creativeIds", creativeIds_)
17007	return c
17008}
17009
17010// CreativeOptimizationConfigurationIds sets the optional parameter
17011// "creativeOptimizationConfigurationIds": Select only ads with these
17012// creative optimization configuration IDs.
17013func (c *AdsListCall) CreativeOptimizationConfigurationIds(creativeOptimizationConfigurationIds ...int64) *AdsListCall {
17014	var creativeOptimizationConfigurationIds_ []string
17015	for _, v := range creativeOptimizationConfigurationIds {
17016		creativeOptimizationConfigurationIds_ = append(creativeOptimizationConfigurationIds_, fmt.Sprint(v))
17017	}
17018	c.urlParams_.SetMulti("creativeOptimizationConfigurationIds", creativeOptimizationConfigurationIds_)
17019	return c
17020}
17021
17022// DynamicClickTracker sets the optional parameter
17023// "dynamicClickTracker": Select only dynamic click trackers. Applicable
17024// when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click
17025// trackers. If false, select static click trackers. Leave unset to
17026// select both.
17027func (c *AdsListCall) DynamicClickTracker(dynamicClickTracker bool) *AdsListCall {
17028	c.urlParams_.Set("dynamicClickTracker", fmt.Sprint(dynamicClickTracker))
17029	return c
17030}
17031
17032// Ids sets the optional parameter "ids": Select only ads with these
17033// IDs.
17034func (c *AdsListCall) Ids(ids ...int64) *AdsListCall {
17035	var ids_ []string
17036	for _, v := range ids {
17037		ids_ = append(ids_, fmt.Sprint(v))
17038	}
17039	c.urlParams_.SetMulti("ids", ids_)
17040	return c
17041}
17042
17043// LandingPageIds sets the optional parameter "landingPageIds": Select
17044// only ads with these landing page IDs.
17045func (c *AdsListCall) LandingPageIds(landingPageIds ...int64) *AdsListCall {
17046	var landingPageIds_ []string
17047	for _, v := range landingPageIds {
17048		landingPageIds_ = append(landingPageIds_, fmt.Sprint(v))
17049	}
17050	c.urlParams_.SetMulti("landingPageIds", landingPageIds_)
17051	return c
17052}
17053
17054// MaxResults sets the optional parameter "maxResults": Maximum number
17055// of results to return.
17056func (c *AdsListCall) MaxResults(maxResults int64) *AdsListCall {
17057	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17058	return c
17059}
17060
17061// OverriddenEventTagId sets the optional parameter
17062// "overriddenEventTagId": Select only ads with this event tag override
17063// ID.
17064func (c *AdsListCall) OverriddenEventTagId(overriddenEventTagId int64) *AdsListCall {
17065	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
17066	return c
17067}
17068
17069// PageToken sets the optional parameter "pageToken": Value of the
17070// nextPageToken from the previous result page.
17071func (c *AdsListCall) PageToken(pageToken string) *AdsListCall {
17072	c.urlParams_.Set("pageToken", pageToken)
17073	return c
17074}
17075
17076// PlacementIds sets the optional parameter "placementIds": Select only
17077// ads with these placement IDs assigned.
17078func (c *AdsListCall) PlacementIds(placementIds ...int64) *AdsListCall {
17079	var placementIds_ []string
17080	for _, v := range placementIds {
17081		placementIds_ = append(placementIds_, fmt.Sprint(v))
17082	}
17083	c.urlParams_.SetMulti("placementIds", placementIds_)
17084	return c
17085}
17086
17087// RemarketingListIds sets the optional parameter "remarketingListIds":
17088// Select only ads whose list targeting expression use these remarketing
17089// list IDs.
17090func (c *AdsListCall) RemarketingListIds(remarketingListIds ...int64) *AdsListCall {
17091	var remarketingListIds_ []string
17092	for _, v := range remarketingListIds {
17093		remarketingListIds_ = append(remarketingListIds_, fmt.Sprint(v))
17094	}
17095	c.urlParams_.SetMulti("remarketingListIds", remarketingListIds_)
17096	return c
17097}
17098
17099// SearchString sets the optional parameter "searchString": Allows
17100// searching for objects by name or ID. Wildcards (*) are allowed. For
17101// example, "ad*2015" will return objects with names like "ad June
17102// 2015", "ad April 2015", or simply "ad 2015". Most of the searches
17103// also add wildcards implicitly at the start and the end of the search
17104// string. For example, a search string of "ad" will match objects with
17105// name "my ad", "ad 2015", or simply "ad".
17106func (c *AdsListCall) SearchString(searchString string) *AdsListCall {
17107	c.urlParams_.Set("searchString", searchString)
17108	return c
17109}
17110
17111// SizeIds sets the optional parameter "sizeIds": Select only ads with
17112// these size IDs.
17113func (c *AdsListCall) SizeIds(sizeIds ...int64) *AdsListCall {
17114	var sizeIds_ []string
17115	for _, v := range sizeIds {
17116		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
17117	}
17118	c.urlParams_.SetMulti("sizeIds", sizeIds_)
17119	return c
17120}
17121
17122// SortField sets the optional parameter "sortField": Field by which to
17123// sort the list.
17124//
17125// Possible values:
17126//   "ID" (default)
17127//   "NAME"
17128func (c *AdsListCall) SortField(sortField string) *AdsListCall {
17129	c.urlParams_.Set("sortField", sortField)
17130	return c
17131}
17132
17133// SortOrder sets the optional parameter "sortOrder": Order of sorted
17134// results.
17135//
17136// Possible values:
17137//   "ASCENDING" (default)
17138//   "DESCENDING"
17139func (c *AdsListCall) SortOrder(sortOrder string) *AdsListCall {
17140	c.urlParams_.Set("sortOrder", sortOrder)
17141	return c
17142}
17143
17144// SslCompliant sets the optional parameter "sslCompliant": Select only
17145// ads that are SSL-compliant.
17146func (c *AdsListCall) SslCompliant(sslCompliant bool) *AdsListCall {
17147	c.urlParams_.Set("sslCompliant", fmt.Sprint(sslCompliant))
17148	return c
17149}
17150
17151// SslRequired sets the optional parameter "sslRequired": Select only
17152// ads that require SSL.
17153func (c *AdsListCall) SslRequired(sslRequired bool) *AdsListCall {
17154	c.urlParams_.Set("sslRequired", fmt.Sprint(sslRequired))
17155	return c
17156}
17157
17158// Type sets the optional parameter "type": Select only ads with these
17159// types.
17160//
17161// Possible values:
17162//   "AD_SERVING_CLICK_TRACKER"
17163//   "AD_SERVING_DEFAULT_AD"
17164//   "AD_SERVING_STANDARD_AD"
17165//   "AD_SERVING_TRACKING"
17166func (c *AdsListCall) Type(type_ ...string) *AdsListCall {
17167	c.urlParams_.SetMulti("type", append([]string{}, type_...))
17168	return c
17169}
17170
17171// Fields allows partial responses to be retrieved. See
17172// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17173// for more information.
17174func (c *AdsListCall) Fields(s ...googleapi.Field) *AdsListCall {
17175	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17176	return c
17177}
17178
17179// IfNoneMatch sets the optional parameter which makes the operation
17180// fail if the object's ETag matches the given value. This is useful for
17181// getting updates only after the object has changed since the last
17182// request. Use googleapi.IsNotModified to check whether the response
17183// error from Do is the result of In-None-Match.
17184func (c *AdsListCall) IfNoneMatch(entityTag string) *AdsListCall {
17185	c.ifNoneMatch_ = entityTag
17186	return c
17187}
17188
17189// Context sets the context to be used in this call's Do method. Any
17190// pending HTTP request will be aborted if the provided context is
17191// canceled.
17192func (c *AdsListCall) Context(ctx context.Context) *AdsListCall {
17193	c.ctx_ = ctx
17194	return c
17195}
17196
17197// Header returns an http.Header that can be modified by the caller to
17198// add HTTP headers to the request.
17199func (c *AdsListCall) Header() http.Header {
17200	if c.header_ == nil {
17201		c.header_ = make(http.Header)
17202	}
17203	return c.header_
17204}
17205
17206func (c *AdsListCall) doRequest(alt string) (*http.Response, error) {
17207	reqHeaders := make(http.Header)
17208	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
17209	for k, v := range c.header_ {
17210		reqHeaders[k] = v
17211	}
17212	reqHeaders.Set("User-Agent", c.s.userAgent())
17213	if c.ifNoneMatch_ != "" {
17214		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17215	}
17216	var body io.Reader = nil
17217	c.urlParams_.Set("alt", alt)
17218	c.urlParams_.Set("prettyPrint", "false")
17219	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17220	urls += "?" + c.urlParams_.Encode()
17221	req, err := http.NewRequest("GET", urls, body)
17222	if err != nil {
17223		return nil, err
17224	}
17225	req.Header = reqHeaders
17226	googleapi.Expand(req.URL, map[string]string{
17227		"profileId": strconv.FormatInt(c.profileId, 10),
17228	})
17229	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17230}
17231
17232// Do executes the "dfareporting.ads.list" call.
17233// Exactly one of *AdsListResponse or error will be non-nil. Any non-2xx
17234// status code is an error. Response headers are in either
17235// *AdsListResponse.ServerResponse.Header or (if a response was returned
17236// at all) in error.(*googleapi.Error).Header. Use
17237// googleapi.IsNotModified to check whether the returned error was
17238// because http.StatusNotModified was returned.
17239func (c *AdsListCall) Do(opts ...googleapi.CallOption) (*AdsListResponse, error) {
17240	gensupport.SetOptions(c.urlParams_, opts...)
17241	res, err := c.doRequest("json")
17242	if res != nil && res.StatusCode == http.StatusNotModified {
17243		if res.Body != nil {
17244			res.Body.Close()
17245		}
17246		return nil, &googleapi.Error{
17247			Code:   res.StatusCode,
17248			Header: res.Header,
17249		}
17250	}
17251	if err != nil {
17252		return nil, err
17253	}
17254	defer googleapi.CloseBody(res)
17255	if err := googleapi.CheckResponse(res); err != nil {
17256		return nil, err
17257	}
17258	ret := &AdsListResponse{
17259		ServerResponse: googleapi.ServerResponse{
17260			Header:         res.Header,
17261			HTTPStatusCode: res.StatusCode,
17262		},
17263	}
17264	target := &ret
17265	if err := gensupport.DecodeResponse(target, res); err != nil {
17266		return nil, err
17267	}
17268	return ret, nil
17269	// {
17270	//   "description": "Retrieves a list of ads, possibly filtered. This method supports paging.",
17271	//   "httpMethod": "GET",
17272	//   "id": "dfareporting.ads.list",
17273	//   "parameterOrder": [
17274	//     "profileId"
17275	//   ],
17276	//   "parameters": {
17277	//     "active": {
17278	//       "description": "Select only active ads.",
17279	//       "location": "query",
17280	//       "type": "boolean"
17281	//     },
17282	//     "advertiserId": {
17283	//       "description": "Select only ads with this advertiser ID.",
17284	//       "format": "int64",
17285	//       "location": "query",
17286	//       "type": "string"
17287	//     },
17288	//     "archived": {
17289	//       "description": "Select only archived ads.",
17290	//       "location": "query",
17291	//       "type": "boolean"
17292	//     },
17293	//     "audienceSegmentIds": {
17294	//       "description": "Select only ads with these audience segment IDs.",
17295	//       "format": "int64",
17296	//       "location": "query",
17297	//       "repeated": true,
17298	//       "type": "string"
17299	//     },
17300	//     "campaignIds": {
17301	//       "description": "Select only ads with these campaign IDs.",
17302	//       "format": "int64",
17303	//       "location": "query",
17304	//       "repeated": true,
17305	//       "type": "string"
17306	//     },
17307	//     "compatibility": {
17308	//       "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.",
17309	//       "enum": [
17310	//         "APP",
17311	//         "APP_INTERSTITIAL",
17312	//         "DISPLAY",
17313	//         "DISPLAY_INTERSTITIAL",
17314	//         "IN_STREAM_AUDIO",
17315	//         "IN_STREAM_VIDEO"
17316	//       ],
17317	//       "enumDescriptions": [
17318	//         "",
17319	//         "",
17320	//         "",
17321	//         "",
17322	//         "",
17323	//         ""
17324	//       ],
17325	//       "location": "query",
17326	//       "type": "string"
17327	//     },
17328	//     "creativeIds": {
17329	//       "description": "Select only ads with these creative IDs assigned.",
17330	//       "format": "int64",
17331	//       "location": "query",
17332	//       "repeated": true,
17333	//       "type": "string"
17334	//     },
17335	//     "creativeOptimizationConfigurationIds": {
17336	//       "description": "Select only ads with these creative optimization configuration IDs.",
17337	//       "format": "int64",
17338	//       "location": "query",
17339	//       "repeated": true,
17340	//       "type": "string"
17341	//     },
17342	//     "dynamicClickTracker": {
17343	//       "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.",
17344	//       "location": "query",
17345	//       "type": "boolean"
17346	//     },
17347	//     "ids": {
17348	//       "description": "Select only ads with these IDs.",
17349	//       "format": "int64",
17350	//       "location": "query",
17351	//       "repeated": true,
17352	//       "type": "string"
17353	//     },
17354	//     "landingPageIds": {
17355	//       "description": "Select only ads with these landing page IDs.",
17356	//       "format": "int64",
17357	//       "location": "query",
17358	//       "repeated": true,
17359	//       "type": "string"
17360	//     },
17361	//     "maxResults": {
17362	//       "default": "1000",
17363	//       "description": "Maximum number of results to return.",
17364	//       "format": "int32",
17365	//       "location": "query",
17366	//       "maximum": "1000",
17367	//       "minimum": "0",
17368	//       "type": "integer"
17369	//     },
17370	//     "overriddenEventTagId": {
17371	//       "description": "Select only ads with this event tag override ID.",
17372	//       "format": "int64",
17373	//       "location": "query",
17374	//       "type": "string"
17375	//     },
17376	//     "pageToken": {
17377	//       "description": "Value of the nextPageToken from the previous result page.",
17378	//       "location": "query",
17379	//       "type": "string"
17380	//     },
17381	//     "placementIds": {
17382	//       "description": "Select only ads with these placement IDs assigned.",
17383	//       "format": "int64",
17384	//       "location": "query",
17385	//       "repeated": true,
17386	//       "type": "string"
17387	//     },
17388	//     "profileId": {
17389	//       "description": "User profile ID associated with this request.",
17390	//       "format": "int64",
17391	//       "location": "path",
17392	//       "required": true,
17393	//       "type": "string"
17394	//     },
17395	//     "remarketingListIds": {
17396	//       "description": "Select only ads whose list targeting expression use these remarketing list IDs.",
17397	//       "format": "int64",
17398	//       "location": "query",
17399	//       "repeated": true,
17400	//       "type": "string"
17401	//     },
17402	//     "searchString": {
17403	//       "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\".",
17404	//       "location": "query",
17405	//       "type": "string"
17406	//     },
17407	//     "sizeIds": {
17408	//       "description": "Select only ads with these size IDs.",
17409	//       "format": "int64",
17410	//       "location": "query",
17411	//       "repeated": true,
17412	//       "type": "string"
17413	//     },
17414	//     "sortField": {
17415	//       "default": "ID",
17416	//       "description": "Field by which to sort the list.",
17417	//       "enum": [
17418	//         "ID",
17419	//         "NAME"
17420	//       ],
17421	//       "enumDescriptions": [
17422	//         "",
17423	//         ""
17424	//       ],
17425	//       "location": "query",
17426	//       "type": "string"
17427	//     },
17428	//     "sortOrder": {
17429	//       "default": "ASCENDING",
17430	//       "description": "Order of sorted results.",
17431	//       "enum": [
17432	//         "ASCENDING",
17433	//         "DESCENDING"
17434	//       ],
17435	//       "enumDescriptions": [
17436	//         "",
17437	//         ""
17438	//       ],
17439	//       "location": "query",
17440	//       "type": "string"
17441	//     },
17442	//     "sslCompliant": {
17443	//       "description": "Select only ads that are SSL-compliant.",
17444	//       "location": "query",
17445	//       "type": "boolean"
17446	//     },
17447	//     "sslRequired": {
17448	//       "description": "Select only ads that require SSL.",
17449	//       "location": "query",
17450	//       "type": "boolean"
17451	//     },
17452	//     "type": {
17453	//       "description": "Select only ads with these types.",
17454	//       "enum": [
17455	//         "AD_SERVING_CLICK_TRACKER",
17456	//         "AD_SERVING_DEFAULT_AD",
17457	//         "AD_SERVING_STANDARD_AD",
17458	//         "AD_SERVING_TRACKING"
17459	//       ],
17460	//       "enumDescriptions": [
17461	//         "",
17462	//         "",
17463	//         "",
17464	//         ""
17465	//       ],
17466	//       "location": "query",
17467	//       "repeated": true,
17468	//       "type": "string"
17469	//     }
17470	//   },
17471	//   "path": "userprofiles/{profileId}/ads",
17472	//   "response": {
17473	//     "$ref": "AdsListResponse"
17474	//   },
17475	//   "scopes": [
17476	//     "https://www.googleapis.com/auth/dfatrafficking"
17477	//   ]
17478	// }
17479
17480}
17481
17482// Pages invokes f for each page of results.
17483// A non-nil error returned from f will halt the iteration.
17484// The provided context supersedes any context provided to the Context method.
17485func (c *AdsListCall) Pages(ctx context.Context, f func(*AdsListResponse) error) error {
17486	c.ctx_ = ctx
17487	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17488	for {
17489		x, err := c.Do()
17490		if err != nil {
17491			return err
17492		}
17493		if err := f(x); err != nil {
17494			return err
17495		}
17496		if x.NextPageToken == "" {
17497			return nil
17498		}
17499		c.PageToken(x.NextPageToken)
17500	}
17501}
17502
17503// method id "dfareporting.ads.patch":
17504
17505type AdsPatchCall struct {
17506	s          *Service
17507	profileId  int64
17508	ad         *Ad
17509	urlParams_ gensupport.URLParams
17510	ctx_       context.Context
17511	header_    http.Header
17512}
17513
17514// Patch: Updates an existing ad. This method supports patch semantics.
17515func (r *AdsService) Patch(profileId int64, id int64, ad *Ad) *AdsPatchCall {
17516	c := &AdsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17517	c.profileId = profileId
17518	c.urlParams_.Set("id", fmt.Sprint(id))
17519	c.ad = ad
17520	return c
17521}
17522
17523// Fields allows partial responses to be retrieved. See
17524// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17525// for more information.
17526func (c *AdsPatchCall) Fields(s ...googleapi.Field) *AdsPatchCall {
17527	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17528	return c
17529}
17530
17531// Context sets the context to be used in this call's Do method. Any
17532// pending HTTP request will be aborted if the provided context is
17533// canceled.
17534func (c *AdsPatchCall) Context(ctx context.Context) *AdsPatchCall {
17535	c.ctx_ = ctx
17536	return c
17537}
17538
17539// Header returns an http.Header that can be modified by the caller to
17540// add HTTP headers to the request.
17541func (c *AdsPatchCall) Header() http.Header {
17542	if c.header_ == nil {
17543		c.header_ = make(http.Header)
17544	}
17545	return c.header_
17546}
17547
17548func (c *AdsPatchCall) doRequest(alt string) (*http.Response, error) {
17549	reqHeaders := make(http.Header)
17550	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
17551	for k, v := range c.header_ {
17552		reqHeaders[k] = v
17553	}
17554	reqHeaders.Set("User-Agent", c.s.userAgent())
17555	var body io.Reader = nil
17556	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17557	if err != nil {
17558		return nil, err
17559	}
17560	reqHeaders.Set("Content-Type", "application/json")
17561	c.urlParams_.Set("alt", alt)
17562	c.urlParams_.Set("prettyPrint", "false")
17563	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17564	urls += "?" + c.urlParams_.Encode()
17565	req, err := http.NewRequest("PATCH", urls, body)
17566	if err != nil {
17567		return nil, err
17568	}
17569	req.Header = reqHeaders
17570	googleapi.Expand(req.URL, map[string]string{
17571		"profileId": strconv.FormatInt(c.profileId, 10),
17572	})
17573	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17574}
17575
17576// Do executes the "dfareporting.ads.patch" call.
17577// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17578// is an error. Response headers are in either *Ad.ServerResponse.Header
17579// or (if a response was returned at all) in
17580// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17581// whether the returned error was because http.StatusNotModified was
17582// returned.
17583func (c *AdsPatchCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17584	gensupport.SetOptions(c.urlParams_, opts...)
17585	res, err := c.doRequest("json")
17586	if res != nil && res.StatusCode == http.StatusNotModified {
17587		if res.Body != nil {
17588			res.Body.Close()
17589		}
17590		return nil, &googleapi.Error{
17591			Code:   res.StatusCode,
17592			Header: res.Header,
17593		}
17594	}
17595	if err != nil {
17596		return nil, err
17597	}
17598	defer googleapi.CloseBody(res)
17599	if err := googleapi.CheckResponse(res); err != nil {
17600		return nil, err
17601	}
17602	ret := &Ad{
17603		ServerResponse: googleapi.ServerResponse{
17604			Header:         res.Header,
17605			HTTPStatusCode: res.StatusCode,
17606		},
17607	}
17608	target := &ret
17609	if err := gensupport.DecodeResponse(target, res); err != nil {
17610		return nil, err
17611	}
17612	return ret, nil
17613	// {
17614	//   "description": "Updates an existing ad. This method supports patch semantics.",
17615	//   "httpMethod": "PATCH",
17616	//   "id": "dfareporting.ads.patch",
17617	//   "parameterOrder": [
17618	//     "profileId",
17619	//     "id"
17620	//   ],
17621	//   "parameters": {
17622	//     "id": {
17623	//       "description": "Ad ID.",
17624	//       "format": "int64",
17625	//       "location": "query",
17626	//       "required": true,
17627	//       "type": "string"
17628	//     },
17629	//     "profileId": {
17630	//       "description": "User profile ID associated with this request.",
17631	//       "format": "int64",
17632	//       "location": "path",
17633	//       "required": true,
17634	//       "type": "string"
17635	//     }
17636	//   },
17637	//   "path": "userprofiles/{profileId}/ads",
17638	//   "request": {
17639	//     "$ref": "Ad"
17640	//   },
17641	//   "response": {
17642	//     "$ref": "Ad"
17643	//   },
17644	//   "scopes": [
17645	//     "https://www.googleapis.com/auth/dfatrafficking"
17646	//   ]
17647	// }
17648
17649}
17650
17651// method id "dfareporting.ads.update":
17652
17653type AdsUpdateCall struct {
17654	s          *Service
17655	profileId  int64
17656	ad         *Ad
17657	urlParams_ gensupport.URLParams
17658	ctx_       context.Context
17659	header_    http.Header
17660}
17661
17662// Update: Updates an existing ad.
17663func (r *AdsService) Update(profileId int64, ad *Ad) *AdsUpdateCall {
17664	c := &AdsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17665	c.profileId = profileId
17666	c.ad = ad
17667	return c
17668}
17669
17670// Fields allows partial responses to be retrieved. See
17671// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17672// for more information.
17673func (c *AdsUpdateCall) Fields(s ...googleapi.Field) *AdsUpdateCall {
17674	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17675	return c
17676}
17677
17678// Context sets the context to be used in this call's Do method. Any
17679// pending HTTP request will be aborted if the provided context is
17680// canceled.
17681func (c *AdsUpdateCall) Context(ctx context.Context) *AdsUpdateCall {
17682	c.ctx_ = ctx
17683	return c
17684}
17685
17686// Header returns an http.Header that can be modified by the caller to
17687// add HTTP headers to the request.
17688func (c *AdsUpdateCall) Header() http.Header {
17689	if c.header_ == nil {
17690		c.header_ = make(http.Header)
17691	}
17692	return c.header_
17693}
17694
17695func (c *AdsUpdateCall) doRequest(alt string) (*http.Response, error) {
17696	reqHeaders := make(http.Header)
17697	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
17698	for k, v := range c.header_ {
17699		reqHeaders[k] = v
17700	}
17701	reqHeaders.Set("User-Agent", c.s.userAgent())
17702	var body io.Reader = nil
17703	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17704	if err != nil {
17705		return nil, err
17706	}
17707	reqHeaders.Set("Content-Type", "application/json")
17708	c.urlParams_.Set("alt", alt)
17709	c.urlParams_.Set("prettyPrint", "false")
17710	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17711	urls += "?" + c.urlParams_.Encode()
17712	req, err := http.NewRequest("PUT", urls, body)
17713	if err != nil {
17714		return nil, err
17715	}
17716	req.Header = reqHeaders
17717	googleapi.Expand(req.URL, map[string]string{
17718		"profileId": strconv.FormatInt(c.profileId, 10),
17719	})
17720	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17721}
17722
17723// Do executes the "dfareporting.ads.update" call.
17724// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17725// is an error. Response headers are in either *Ad.ServerResponse.Header
17726// or (if a response was returned at all) in
17727// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17728// whether the returned error was because http.StatusNotModified was
17729// returned.
17730func (c *AdsUpdateCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17731	gensupport.SetOptions(c.urlParams_, opts...)
17732	res, err := c.doRequest("json")
17733	if res != nil && res.StatusCode == http.StatusNotModified {
17734		if res.Body != nil {
17735			res.Body.Close()
17736		}
17737		return nil, &googleapi.Error{
17738			Code:   res.StatusCode,
17739			Header: res.Header,
17740		}
17741	}
17742	if err != nil {
17743		return nil, err
17744	}
17745	defer googleapi.CloseBody(res)
17746	if err := googleapi.CheckResponse(res); err != nil {
17747		return nil, err
17748	}
17749	ret := &Ad{
17750		ServerResponse: googleapi.ServerResponse{
17751			Header:         res.Header,
17752			HTTPStatusCode: res.StatusCode,
17753		},
17754	}
17755	target := &ret
17756	if err := gensupport.DecodeResponse(target, res); err != nil {
17757		return nil, err
17758	}
17759	return ret, nil
17760	// {
17761	//   "description": "Updates an existing ad.",
17762	//   "httpMethod": "PUT",
17763	//   "id": "dfareporting.ads.update",
17764	//   "parameterOrder": [
17765	//     "profileId"
17766	//   ],
17767	//   "parameters": {
17768	//     "profileId": {
17769	//       "description": "User profile ID associated with this request.",
17770	//       "format": "int64",
17771	//       "location": "path",
17772	//       "required": true,
17773	//       "type": "string"
17774	//     }
17775	//   },
17776	//   "path": "userprofiles/{profileId}/ads",
17777	//   "request": {
17778	//     "$ref": "Ad"
17779	//   },
17780	//   "response": {
17781	//     "$ref": "Ad"
17782	//   },
17783	//   "scopes": [
17784	//     "https://www.googleapis.com/auth/dfatrafficking"
17785	//   ]
17786	// }
17787
17788}
17789
17790// method id "dfareporting.advertiserGroups.delete":
17791
17792type AdvertiserGroupsDeleteCall struct {
17793	s          *Service
17794	profileId  int64
17795	id         int64
17796	urlParams_ gensupport.URLParams
17797	ctx_       context.Context
17798	header_    http.Header
17799}
17800
17801// Delete: Deletes an existing advertiser group.
17802func (r *AdvertiserGroupsService) Delete(profileId int64, id int64) *AdvertiserGroupsDeleteCall {
17803	c := &AdvertiserGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17804	c.profileId = profileId
17805	c.id = id
17806	return c
17807}
17808
17809// Fields allows partial responses to be retrieved. See
17810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17811// for more information.
17812func (c *AdvertiserGroupsDeleteCall) Fields(s ...googleapi.Field) *AdvertiserGroupsDeleteCall {
17813	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17814	return c
17815}
17816
17817// Context sets the context to be used in this call's Do method. Any
17818// pending HTTP request will be aborted if the provided context is
17819// canceled.
17820func (c *AdvertiserGroupsDeleteCall) Context(ctx context.Context) *AdvertiserGroupsDeleteCall {
17821	c.ctx_ = ctx
17822	return c
17823}
17824
17825// Header returns an http.Header that can be modified by the caller to
17826// add HTTP headers to the request.
17827func (c *AdvertiserGroupsDeleteCall) Header() http.Header {
17828	if c.header_ == nil {
17829		c.header_ = make(http.Header)
17830	}
17831	return c.header_
17832}
17833
17834func (c *AdvertiserGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
17835	reqHeaders := make(http.Header)
17836	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
17837	for k, v := range c.header_ {
17838		reqHeaders[k] = v
17839	}
17840	reqHeaders.Set("User-Agent", c.s.userAgent())
17841	var body io.Reader = nil
17842	c.urlParams_.Set("alt", alt)
17843	c.urlParams_.Set("prettyPrint", "false")
17844	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17845	urls += "?" + c.urlParams_.Encode()
17846	req, err := http.NewRequest("DELETE", urls, body)
17847	if err != nil {
17848		return nil, err
17849	}
17850	req.Header = reqHeaders
17851	googleapi.Expand(req.URL, map[string]string{
17852		"profileId": strconv.FormatInt(c.profileId, 10),
17853		"id":        strconv.FormatInt(c.id, 10),
17854	})
17855	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17856}
17857
17858// Do executes the "dfareporting.advertiserGroups.delete" call.
17859func (c *AdvertiserGroupsDeleteCall) Do(opts ...googleapi.CallOption) error {
17860	gensupport.SetOptions(c.urlParams_, opts...)
17861	res, err := c.doRequest("json")
17862	if err != nil {
17863		return err
17864	}
17865	defer googleapi.CloseBody(res)
17866	if err := googleapi.CheckResponse(res); err != nil {
17867		return err
17868	}
17869	return nil
17870	// {
17871	//   "description": "Deletes an existing advertiser group.",
17872	//   "httpMethod": "DELETE",
17873	//   "id": "dfareporting.advertiserGroups.delete",
17874	//   "parameterOrder": [
17875	//     "profileId",
17876	//     "id"
17877	//   ],
17878	//   "parameters": {
17879	//     "id": {
17880	//       "description": "Advertiser group ID.",
17881	//       "format": "int64",
17882	//       "location": "path",
17883	//       "required": true,
17884	//       "type": "string"
17885	//     },
17886	//     "profileId": {
17887	//       "description": "User profile ID associated with this request.",
17888	//       "format": "int64",
17889	//       "location": "path",
17890	//       "required": true,
17891	//       "type": "string"
17892	//     }
17893	//   },
17894	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
17895	//   "scopes": [
17896	//     "https://www.googleapis.com/auth/dfatrafficking"
17897	//   ]
17898	// }
17899
17900}
17901
17902// method id "dfareporting.advertiserGroups.get":
17903
17904type AdvertiserGroupsGetCall struct {
17905	s            *Service
17906	profileId    int64
17907	id           int64
17908	urlParams_   gensupport.URLParams
17909	ifNoneMatch_ string
17910	ctx_         context.Context
17911	header_      http.Header
17912}
17913
17914// Get: Gets one advertiser group by ID.
17915func (r *AdvertiserGroupsService) Get(profileId int64, id int64) *AdvertiserGroupsGetCall {
17916	c := &AdvertiserGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17917	c.profileId = profileId
17918	c.id = id
17919	return c
17920}
17921
17922// Fields allows partial responses to be retrieved. See
17923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17924// for more information.
17925func (c *AdvertiserGroupsGetCall) Fields(s ...googleapi.Field) *AdvertiserGroupsGetCall {
17926	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17927	return c
17928}
17929
17930// IfNoneMatch sets the optional parameter which makes the operation
17931// fail if the object's ETag matches the given value. This is useful for
17932// getting updates only after the object has changed since the last
17933// request. Use googleapi.IsNotModified to check whether the response
17934// error from Do is the result of In-None-Match.
17935func (c *AdvertiserGroupsGetCall) IfNoneMatch(entityTag string) *AdvertiserGroupsGetCall {
17936	c.ifNoneMatch_ = entityTag
17937	return c
17938}
17939
17940// Context sets the context to be used in this call's Do method. Any
17941// pending HTTP request will be aborted if the provided context is
17942// canceled.
17943func (c *AdvertiserGroupsGetCall) Context(ctx context.Context) *AdvertiserGroupsGetCall {
17944	c.ctx_ = ctx
17945	return c
17946}
17947
17948// Header returns an http.Header that can be modified by the caller to
17949// add HTTP headers to the request.
17950func (c *AdvertiserGroupsGetCall) Header() http.Header {
17951	if c.header_ == nil {
17952		c.header_ = make(http.Header)
17953	}
17954	return c.header_
17955}
17956
17957func (c *AdvertiserGroupsGetCall) doRequest(alt string) (*http.Response, error) {
17958	reqHeaders := make(http.Header)
17959	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
17960	for k, v := range c.header_ {
17961		reqHeaders[k] = v
17962	}
17963	reqHeaders.Set("User-Agent", c.s.userAgent())
17964	if c.ifNoneMatch_ != "" {
17965		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17966	}
17967	var body io.Reader = nil
17968	c.urlParams_.Set("alt", alt)
17969	c.urlParams_.Set("prettyPrint", "false")
17970	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17971	urls += "?" + c.urlParams_.Encode()
17972	req, err := http.NewRequest("GET", urls, body)
17973	if err != nil {
17974		return nil, err
17975	}
17976	req.Header = reqHeaders
17977	googleapi.Expand(req.URL, map[string]string{
17978		"profileId": strconv.FormatInt(c.profileId, 10),
17979		"id":        strconv.FormatInt(c.id, 10),
17980	})
17981	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17982}
17983
17984// Do executes the "dfareporting.advertiserGroups.get" call.
17985// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
17986// status code is an error. Response headers are in either
17987// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
17988// at all) in error.(*googleapi.Error).Header. Use
17989// googleapi.IsNotModified to check whether the returned error was
17990// because http.StatusNotModified was returned.
17991func (c *AdvertiserGroupsGetCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
17992	gensupport.SetOptions(c.urlParams_, opts...)
17993	res, err := c.doRequest("json")
17994	if res != nil && res.StatusCode == http.StatusNotModified {
17995		if res.Body != nil {
17996			res.Body.Close()
17997		}
17998		return nil, &googleapi.Error{
17999			Code:   res.StatusCode,
18000			Header: res.Header,
18001		}
18002	}
18003	if err != nil {
18004		return nil, err
18005	}
18006	defer googleapi.CloseBody(res)
18007	if err := googleapi.CheckResponse(res); err != nil {
18008		return nil, err
18009	}
18010	ret := &AdvertiserGroup{
18011		ServerResponse: googleapi.ServerResponse{
18012			Header:         res.Header,
18013			HTTPStatusCode: res.StatusCode,
18014		},
18015	}
18016	target := &ret
18017	if err := gensupport.DecodeResponse(target, res); err != nil {
18018		return nil, err
18019	}
18020	return ret, nil
18021	// {
18022	//   "description": "Gets one advertiser group by ID.",
18023	//   "httpMethod": "GET",
18024	//   "id": "dfareporting.advertiserGroups.get",
18025	//   "parameterOrder": [
18026	//     "profileId",
18027	//     "id"
18028	//   ],
18029	//   "parameters": {
18030	//     "id": {
18031	//       "description": "Advertiser group ID.",
18032	//       "format": "int64",
18033	//       "location": "path",
18034	//       "required": true,
18035	//       "type": "string"
18036	//     },
18037	//     "profileId": {
18038	//       "description": "User profile ID associated with this request.",
18039	//       "format": "int64",
18040	//       "location": "path",
18041	//       "required": true,
18042	//       "type": "string"
18043	//     }
18044	//   },
18045	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
18046	//   "response": {
18047	//     "$ref": "AdvertiserGroup"
18048	//   },
18049	//   "scopes": [
18050	//     "https://www.googleapis.com/auth/dfatrafficking"
18051	//   ]
18052	// }
18053
18054}
18055
18056// method id "dfareporting.advertiserGroups.insert":
18057
18058type AdvertiserGroupsInsertCall struct {
18059	s               *Service
18060	profileId       int64
18061	advertisergroup *AdvertiserGroup
18062	urlParams_      gensupport.URLParams
18063	ctx_            context.Context
18064	header_         http.Header
18065}
18066
18067// Insert: Inserts a new advertiser group.
18068func (r *AdvertiserGroupsService) Insert(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsInsertCall {
18069	c := &AdvertiserGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18070	c.profileId = profileId
18071	c.advertisergroup = advertisergroup
18072	return c
18073}
18074
18075// Fields allows partial responses to be retrieved. See
18076// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18077// for more information.
18078func (c *AdvertiserGroupsInsertCall) Fields(s ...googleapi.Field) *AdvertiserGroupsInsertCall {
18079	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18080	return c
18081}
18082
18083// Context sets the context to be used in this call's Do method. Any
18084// pending HTTP request will be aborted if the provided context is
18085// canceled.
18086func (c *AdvertiserGroupsInsertCall) Context(ctx context.Context) *AdvertiserGroupsInsertCall {
18087	c.ctx_ = ctx
18088	return c
18089}
18090
18091// Header returns an http.Header that can be modified by the caller to
18092// add HTTP headers to the request.
18093func (c *AdvertiserGroupsInsertCall) Header() http.Header {
18094	if c.header_ == nil {
18095		c.header_ = make(http.Header)
18096	}
18097	return c.header_
18098}
18099
18100func (c *AdvertiserGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
18101	reqHeaders := make(http.Header)
18102	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
18103	for k, v := range c.header_ {
18104		reqHeaders[k] = v
18105	}
18106	reqHeaders.Set("User-Agent", c.s.userAgent())
18107	var body io.Reader = nil
18108	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18109	if err != nil {
18110		return nil, err
18111	}
18112	reqHeaders.Set("Content-Type", "application/json")
18113	c.urlParams_.Set("alt", alt)
18114	c.urlParams_.Set("prettyPrint", "false")
18115	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18116	urls += "?" + c.urlParams_.Encode()
18117	req, err := http.NewRequest("POST", urls, body)
18118	if err != nil {
18119		return nil, err
18120	}
18121	req.Header = reqHeaders
18122	googleapi.Expand(req.URL, map[string]string{
18123		"profileId": strconv.FormatInt(c.profileId, 10),
18124	})
18125	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18126}
18127
18128// Do executes the "dfareporting.advertiserGroups.insert" call.
18129// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18130// status code is an error. Response headers are in either
18131// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18132// at all) in error.(*googleapi.Error).Header. Use
18133// googleapi.IsNotModified to check whether the returned error was
18134// because http.StatusNotModified was returned.
18135func (c *AdvertiserGroupsInsertCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18136	gensupport.SetOptions(c.urlParams_, opts...)
18137	res, err := c.doRequest("json")
18138	if res != nil && res.StatusCode == http.StatusNotModified {
18139		if res.Body != nil {
18140			res.Body.Close()
18141		}
18142		return nil, &googleapi.Error{
18143			Code:   res.StatusCode,
18144			Header: res.Header,
18145		}
18146	}
18147	if err != nil {
18148		return nil, err
18149	}
18150	defer googleapi.CloseBody(res)
18151	if err := googleapi.CheckResponse(res); err != nil {
18152		return nil, err
18153	}
18154	ret := &AdvertiserGroup{
18155		ServerResponse: googleapi.ServerResponse{
18156			Header:         res.Header,
18157			HTTPStatusCode: res.StatusCode,
18158		},
18159	}
18160	target := &ret
18161	if err := gensupport.DecodeResponse(target, res); err != nil {
18162		return nil, err
18163	}
18164	return ret, nil
18165	// {
18166	//   "description": "Inserts a new advertiser group.",
18167	//   "httpMethod": "POST",
18168	//   "id": "dfareporting.advertiserGroups.insert",
18169	//   "parameterOrder": [
18170	//     "profileId"
18171	//   ],
18172	//   "parameters": {
18173	//     "profileId": {
18174	//       "description": "User profile ID associated with this request.",
18175	//       "format": "int64",
18176	//       "location": "path",
18177	//       "required": true,
18178	//       "type": "string"
18179	//     }
18180	//   },
18181	//   "path": "userprofiles/{profileId}/advertiserGroups",
18182	//   "request": {
18183	//     "$ref": "AdvertiserGroup"
18184	//   },
18185	//   "response": {
18186	//     "$ref": "AdvertiserGroup"
18187	//   },
18188	//   "scopes": [
18189	//     "https://www.googleapis.com/auth/dfatrafficking"
18190	//   ]
18191	// }
18192
18193}
18194
18195// method id "dfareporting.advertiserGroups.list":
18196
18197type AdvertiserGroupsListCall struct {
18198	s            *Service
18199	profileId    int64
18200	urlParams_   gensupport.URLParams
18201	ifNoneMatch_ string
18202	ctx_         context.Context
18203	header_      http.Header
18204}
18205
18206// List: Retrieves a list of advertiser groups, possibly filtered. This
18207// method supports paging.
18208func (r *AdvertiserGroupsService) List(profileId int64) *AdvertiserGroupsListCall {
18209	c := &AdvertiserGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18210	c.profileId = profileId
18211	return c
18212}
18213
18214// Ids sets the optional parameter "ids": Select only advertiser groups
18215// with these IDs.
18216func (c *AdvertiserGroupsListCall) Ids(ids ...int64) *AdvertiserGroupsListCall {
18217	var ids_ []string
18218	for _, v := range ids {
18219		ids_ = append(ids_, fmt.Sprint(v))
18220	}
18221	c.urlParams_.SetMulti("ids", ids_)
18222	return c
18223}
18224
18225// MaxResults sets the optional parameter "maxResults": Maximum number
18226// of results to return.
18227func (c *AdvertiserGroupsListCall) MaxResults(maxResults int64) *AdvertiserGroupsListCall {
18228	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18229	return c
18230}
18231
18232// PageToken sets the optional parameter "pageToken": Value of the
18233// nextPageToken from the previous result page.
18234func (c *AdvertiserGroupsListCall) PageToken(pageToken string) *AdvertiserGroupsListCall {
18235	c.urlParams_.Set("pageToken", pageToken)
18236	return c
18237}
18238
18239// SearchString sets the optional parameter "searchString": Allows
18240// searching for objects by name or ID. Wildcards (*) are allowed. For
18241// example, "advertiser*2015" will return objects with names like
18242// "advertiser group June 2015", "advertiser group April 2015", or
18243// simply "advertiser group 2015". Most of the searches also add
18244// wildcards implicitly at the start and the end of the search string.
18245// For example, a search string of "advertisergroup" will match objects
18246// with name "my advertisergroup", "advertisergroup 2015", or simply
18247// "advertisergroup".
18248func (c *AdvertiserGroupsListCall) SearchString(searchString string) *AdvertiserGroupsListCall {
18249	c.urlParams_.Set("searchString", searchString)
18250	return c
18251}
18252
18253// SortField sets the optional parameter "sortField": Field by which to
18254// sort the list.
18255//
18256// Possible values:
18257//   "ID" (default)
18258//   "NAME"
18259func (c *AdvertiserGroupsListCall) SortField(sortField string) *AdvertiserGroupsListCall {
18260	c.urlParams_.Set("sortField", sortField)
18261	return c
18262}
18263
18264// SortOrder sets the optional parameter "sortOrder": Order of sorted
18265// results.
18266//
18267// Possible values:
18268//   "ASCENDING" (default)
18269//   "DESCENDING"
18270func (c *AdvertiserGroupsListCall) SortOrder(sortOrder string) *AdvertiserGroupsListCall {
18271	c.urlParams_.Set("sortOrder", sortOrder)
18272	return c
18273}
18274
18275// Fields allows partial responses to be retrieved. See
18276// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18277// for more information.
18278func (c *AdvertiserGroupsListCall) Fields(s ...googleapi.Field) *AdvertiserGroupsListCall {
18279	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18280	return c
18281}
18282
18283// IfNoneMatch sets the optional parameter which makes the operation
18284// fail if the object's ETag matches the given value. This is useful for
18285// getting updates only after the object has changed since the last
18286// request. Use googleapi.IsNotModified to check whether the response
18287// error from Do is the result of In-None-Match.
18288func (c *AdvertiserGroupsListCall) IfNoneMatch(entityTag string) *AdvertiserGroupsListCall {
18289	c.ifNoneMatch_ = entityTag
18290	return c
18291}
18292
18293// Context sets the context to be used in this call's Do method. Any
18294// pending HTTP request will be aborted if the provided context is
18295// canceled.
18296func (c *AdvertiserGroupsListCall) Context(ctx context.Context) *AdvertiserGroupsListCall {
18297	c.ctx_ = ctx
18298	return c
18299}
18300
18301// Header returns an http.Header that can be modified by the caller to
18302// add HTTP headers to the request.
18303func (c *AdvertiserGroupsListCall) Header() http.Header {
18304	if c.header_ == nil {
18305		c.header_ = make(http.Header)
18306	}
18307	return c.header_
18308}
18309
18310func (c *AdvertiserGroupsListCall) doRequest(alt string) (*http.Response, error) {
18311	reqHeaders := make(http.Header)
18312	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
18313	for k, v := range c.header_ {
18314		reqHeaders[k] = v
18315	}
18316	reqHeaders.Set("User-Agent", c.s.userAgent())
18317	if c.ifNoneMatch_ != "" {
18318		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18319	}
18320	var body io.Reader = nil
18321	c.urlParams_.Set("alt", alt)
18322	c.urlParams_.Set("prettyPrint", "false")
18323	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18324	urls += "?" + c.urlParams_.Encode()
18325	req, err := http.NewRequest("GET", urls, body)
18326	if err != nil {
18327		return nil, err
18328	}
18329	req.Header = reqHeaders
18330	googleapi.Expand(req.URL, map[string]string{
18331		"profileId": strconv.FormatInt(c.profileId, 10),
18332	})
18333	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18334}
18335
18336// Do executes the "dfareporting.advertiserGroups.list" call.
18337// Exactly one of *AdvertiserGroupsListResponse or error will be
18338// non-nil. Any non-2xx status code is an error. Response headers are in
18339// either *AdvertiserGroupsListResponse.ServerResponse.Header or (if a
18340// response was returned at all) in error.(*googleapi.Error).Header. Use
18341// googleapi.IsNotModified to check whether the returned error was
18342// because http.StatusNotModified was returned.
18343func (c *AdvertiserGroupsListCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroupsListResponse, error) {
18344	gensupport.SetOptions(c.urlParams_, opts...)
18345	res, err := c.doRequest("json")
18346	if res != nil && res.StatusCode == http.StatusNotModified {
18347		if res.Body != nil {
18348			res.Body.Close()
18349		}
18350		return nil, &googleapi.Error{
18351			Code:   res.StatusCode,
18352			Header: res.Header,
18353		}
18354	}
18355	if err != nil {
18356		return nil, err
18357	}
18358	defer googleapi.CloseBody(res)
18359	if err := googleapi.CheckResponse(res); err != nil {
18360		return nil, err
18361	}
18362	ret := &AdvertiserGroupsListResponse{
18363		ServerResponse: googleapi.ServerResponse{
18364			Header:         res.Header,
18365			HTTPStatusCode: res.StatusCode,
18366		},
18367	}
18368	target := &ret
18369	if err := gensupport.DecodeResponse(target, res); err != nil {
18370		return nil, err
18371	}
18372	return ret, nil
18373	// {
18374	//   "description": "Retrieves a list of advertiser groups, possibly filtered. This method supports paging.",
18375	//   "httpMethod": "GET",
18376	//   "id": "dfareporting.advertiserGroups.list",
18377	//   "parameterOrder": [
18378	//     "profileId"
18379	//   ],
18380	//   "parameters": {
18381	//     "ids": {
18382	//       "description": "Select only advertiser groups with these IDs.",
18383	//       "format": "int64",
18384	//       "location": "query",
18385	//       "repeated": true,
18386	//       "type": "string"
18387	//     },
18388	//     "maxResults": {
18389	//       "default": "1000",
18390	//       "description": "Maximum number of results to return.",
18391	//       "format": "int32",
18392	//       "location": "query",
18393	//       "maximum": "1000",
18394	//       "minimum": "0",
18395	//       "type": "integer"
18396	//     },
18397	//     "pageToken": {
18398	//       "description": "Value of the nextPageToken from the previous result page.",
18399	//       "location": "query",
18400	//       "type": "string"
18401	//     },
18402	//     "profileId": {
18403	//       "description": "User profile ID associated with this request.",
18404	//       "format": "int64",
18405	//       "location": "path",
18406	//       "required": true,
18407	//       "type": "string"
18408	//     },
18409	//     "searchString": {
18410	//       "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\".",
18411	//       "location": "query",
18412	//       "type": "string"
18413	//     },
18414	//     "sortField": {
18415	//       "default": "ID",
18416	//       "description": "Field by which to sort the list.",
18417	//       "enum": [
18418	//         "ID",
18419	//         "NAME"
18420	//       ],
18421	//       "enumDescriptions": [
18422	//         "",
18423	//         ""
18424	//       ],
18425	//       "location": "query",
18426	//       "type": "string"
18427	//     },
18428	//     "sortOrder": {
18429	//       "default": "ASCENDING",
18430	//       "description": "Order of sorted results.",
18431	//       "enum": [
18432	//         "ASCENDING",
18433	//         "DESCENDING"
18434	//       ],
18435	//       "enumDescriptions": [
18436	//         "",
18437	//         ""
18438	//       ],
18439	//       "location": "query",
18440	//       "type": "string"
18441	//     }
18442	//   },
18443	//   "path": "userprofiles/{profileId}/advertiserGroups",
18444	//   "response": {
18445	//     "$ref": "AdvertiserGroupsListResponse"
18446	//   },
18447	//   "scopes": [
18448	//     "https://www.googleapis.com/auth/dfatrafficking"
18449	//   ]
18450	// }
18451
18452}
18453
18454// Pages invokes f for each page of results.
18455// A non-nil error returned from f will halt the iteration.
18456// The provided context supersedes any context provided to the Context method.
18457func (c *AdvertiserGroupsListCall) Pages(ctx context.Context, f func(*AdvertiserGroupsListResponse) error) error {
18458	c.ctx_ = ctx
18459	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18460	for {
18461		x, err := c.Do()
18462		if err != nil {
18463			return err
18464		}
18465		if err := f(x); err != nil {
18466			return err
18467		}
18468		if x.NextPageToken == "" {
18469			return nil
18470		}
18471		c.PageToken(x.NextPageToken)
18472	}
18473}
18474
18475// method id "dfareporting.advertiserGroups.patch":
18476
18477type AdvertiserGroupsPatchCall struct {
18478	s               *Service
18479	profileId       int64
18480	advertisergroup *AdvertiserGroup
18481	urlParams_      gensupport.URLParams
18482	ctx_            context.Context
18483	header_         http.Header
18484}
18485
18486// Patch: Updates an existing advertiser group. This method supports
18487// patch semantics.
18488func (r *AdvertiserGroupsService) Patch(profileId int64, id int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsPatchCall {
18489	c := &AdvertiserGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18490	c.profileId = profileId
18491	c.urlParams_.Set("id", fmt.Sprint(id))
18492	c.advertisergroup = advertisergroup
18493	return c
18494}
18495
18496// Fields allows partial responses to be retrieved. See
18497// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18498// for more information.
18499func (c *AdvertiserGroupsPatchCall) Fields(s ...googleapi.Field) *AdvertiserGroupsPatchCall {
18500	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18501	return c
18502}
18503
18504// Context sets the context to be used in this call's Do method. Any
18505// pending HTTP request will be aborted if the provided context is
18506// canceled.
18507func (c *AdvertiserGroupsPatchCall) Context(ctx context.Context) *AdvertiserGroupsPatchCall {
18508	c.ctx_ = ctx
18509	return c
18510}
18511
18512// Header returns an http.Header that can be modified by the caller to
18513// add HTTP headers to the request.
18514func (c *AdvertiserGroupsPatchCall) Header() http.Header {
18515	if c.header_ == nil {
18516		c.header_ = make(http.Header)
18517	}
18518	return c.header_
18519}
18520
18521func (c *AdvertiserGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
18522	reqHeaders := make(http.Header)
18523	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
18524	for k, v := range c.header_ {
18525		reqHeaders[k] = v
18526	}
18527	reqHeaders.Set("User-Agent", c.s.userAgent())
18528	var body io.Reader = nil
18529	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18530	if err != nil {
18531		return nil, err
18532	}
18533	reqHeaders.Set("Content-Type", "application/json")
18534	c.urlParams_.Set("alt", alt)
18535	c.urlParams_.Set("prettyPrint", "false")
18536	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18537	urls += "?" + c.urlParams_.Encode()
18538	req, err := http.NewRequest("PATCH", urls, body)
18539	if err != nil {
18540		return nil, err
18541	}
18542	req.Header = reqHeaders
18543	googleapi.Expand(req.URL, map[string]string{
18544		"profileId": strconv.FormatInt(c.profileId, 10),
18545	})
18546	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18547}
18548
18549// Do executes the "dfareporting.advertiserGroups.patch" call.
18550// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18551// status code is an error. Response headers are in either
18552// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18553// at all) in error.(*googleapi.Error).Header. Use
18554// googleapi.IsNotModified to check whether the returned error was
18555// because http.StatusNotModified was returned.
18556func (c *AdvertiserGroupsPatchCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18557	gensupport.SetOptions(c.urlParams_, opts...)
18558	res, err := c.doRequest("json")
18559	if res != nil && res.StatusCode == http.StatusNotModified {
18560		if res.Body != nil {
18561			res.Body.Close()
18562		}
18563		return nil, &googleapi.Error{
18564			Code:   res.StatusCode,
18565			Header: res.Header,
18566		}
18567	}
18568	if err != nil {
18569		return nil, err
18570	}
18571	defer googleapi.CloseBody(res)
18572	if err := googleapi.CheckResponse(res); err != nil {
18573		return nil, err
18574	}
18575	ret := &AdvertiserGroup{
18576		ServerResponse: googleapi.ServerResponse{
18577			Header:         res.Header,
18578			HTTPStatusCode: res.StatusCode,
18579		},
18580	}
18581	target := &ret
18582	if err := gensupport.DecodeResponse(target, res); err != nil {
18583		return nil, err
18584	}
18585	return ret, nil
18586	// {
18587	//   "description": "Updates an existing advertiser group. This method supports patch semantics.",
18588	//   "httpMethod": "PATCH",
18589	//   "id": "dfareporting.advertiserGroups.patch",
18590	//   "parameterOrder": [
18591	//     "profileId",
18592	//     "id"
18593	//   ],
18594	//   "parameters": {
18595	//     "id": {
18596	//       "description": "Advertiser group ID.",
18597	//       "format": "int64",
18598	//       "location": "query",
18599	//       "required": true,
18600	//       "type": "string"
18601	//     },
18602	//     "profileId": {
18603	//       "description": "User profile ID associated with this request.",
18604	//       "format": "int64",
18605	//       "location": "path",
18606	//       "required": true,
18607	//       "type": "string"
18608	//     }
18609	//   },
18610	//   "path": "userprofiles/{profileId}/advertiserGroups",
18611	//   "request": {
18612	//     "$ref": "AdvertiserGroup"
18613	//   },
18614	//   "response": {
18615	//     "$ref": "AdvertiserGroup"
18616	//   },
18617	//   "scopes": [
18618	//     "https://www.googleapis.com/auth/dfatrafficking"
18619	//   ]
18620	// }
18621
18622}
18623
18624// method id "dfareporting.advertiserGroups.update":
18625
18626type AdvertiserGroupsUpdateCall struct {
18627	s               *Service
18628	profileId       int64
18629	advertisergroup *AdvertiserGroup
18630	urlParams_      gensupport.URLParams
18631	ctx_            context.Context
18632	header_         http.Header
18633}
18634
18635// Update: Updates an existing advertiser group.
18636func (r *AdvertiserGroupsService) Update(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsUpdateCall {
18637	c := &AdvertiserGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18638	c.profileId = profileId
18639	c.advertisergroup = advertisergroup
18640	return c
18641}
18642
18643// Fields allows partial responses to be retrieved. See
18644// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18645// for more information.
18646func (c *AdvertiserGroupsUpdateCall) Fields(s ...googleapi.Field) *AdvertiserGroupsUpdateCall {
18647	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18648	return c
18649}
18650
18651// Context sets the context to be used in this call's Do method. Any
18652// pending HTTP request will be aborted if the provided context is
18653// canceled.
18654func (c *AdvertiserGroupsUpdateCall) Context(ctx context.Context) *AdvertiserGroupsUpdateCall {
18655	c.ctx_ = ctx
18656	return c
18657}
18658
18659// Header returns an http.Header that can be modified by the caller to
18660// add HTTP headers to the request.
18661func (c *AdvertiserGroupsUpdateCall) Header() http.Header {
18662	if c.header_ == nil {
18663		c.header_ = make(http.Header)
18664	}
18665	return c.header_
18666}
18667
18668func (c *AdvertiserGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
18669	reqHeaders := make(http.Header)
18670	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
18671	for k, v := range c.header_ {
18672		reqHeaders[k] = v
18673	}
18674	reqHeaders.Set("User-Agent", c.s.userAgent())
18675	var body io.Reader = nil
18676	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18677	if err != nil {
18678		return nil, err
18679	}
18680	reqHeaders.Set("Content-Type", "application/json")
18681	c.urlParams_.Set("alt", alt)
18682	c.urlParams_.Set("prettyPrint", "false")
18683	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18684	urls += "?" + c.urlParams_.Encode()
18685	req, err := http.NewRequest("PUT", urls, body)
18686	if err != nil {
18687		return nil, err
18688	}
18689	req.Header = reqHeaders
18690	googleapi.Expand(req.URL, map[string]string{
18691		"profileId": strconv.FormatInt(c.profileId, 10),
18692	})
18693	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18694}
18695
18696// Do executes the "dfareporting.advertiserGroups.update" call.
18697// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18698// status code is an error. Response headers are in either
18699// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18700// at all) in error.(*googleapi.Error).Header. Use
18701// googleapi.IsNotModified to check whether the returned error was
18702// because http.StatusNotModified was returned.
18703func (c *AdvertiserGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18704	gensupport.SetOptions(c.urlParams_, opts...)
18705	res, err := c.doRequest("json")
18706	if res != nil && res.StatusCode == http.StatusNotModified {
18707		if res.Body != nil {
18708			res.Body.Close()
18709		}
18710		return nil, &googleapi.Error{
18711			Code:   res.StatusCode,
18712			Header: res.Header,
18713		}
18714	}
18715	if err != nil {
18716		return nil, err
18717	}
18718	defer googleapi.CloseBody(res)
18719	if err := googleapi.CheckResponse(res); err != nil {
18720		return nil, err
18721	}
18722	ret := &AdvertiserGroup{
18723		ServerResponse: googleapi.ServerResponse{
18724			Header:         res.Header,
18725			HTTPStatusCode: res.StatusCode,
18726		},
18727	}
18728	target := &ret
18729	if err := gensupport.DecodeResponse(target, res); err != nil {
18730		return nil, err
18731	}
18732	return ret, nil
18733	// {
18734	//   "description": "Updates an existing advertiser group.",
18735	//   "httpMethod": "PUT",
18736	//   "id": "dfareporting.advertiserGroups.update",
18737	//   "parameterOrder": [
18738	//     "profileId"
18739	//   ],
18740	//   "parameters": {
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",
18750	//   "request": {
18751	//     "$ref": "AdvertiserGroup"
18752	//   },
18753	//   "response": {
18754	//     "$ref": "AdvertiserGroup"
18755	//   },
18756	//   "scopes": [
18757	//     "https://www.googleapis.com/auth/dfatrafficking"
18758	//   ]
18759	// }
18760
18761}
18762
18763// method id "dfareporting.advertiserLandingPages.get":
18764
18765type AdvertiserLandingPagesGetCall struct {
18766	s            *Service
18767	profileId    int64
18768	id           int64
18769	urlParams_   gensupport.URLParams
18770	ifNoneMatch_ string
18771	ctx_         context.Context
18772	header_      http.Header
18773}
18774
18775// Get: Gets one landing page by ID.
18776func (r *AdvertiserLandingPagesService) Get(profileId int64, id int64) *AdvertiserLandingPagesGetCall {
18777	c := &AdvertiserLandingPagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18778	c.profileId = profileId
18779	c.id = id
18780	return c
18781}
18782
18783// Fields allows partial responses to be retrieved. See
18784// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18785// for more information.
18786func (c *AdvertiserLandingPagesGetCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesGetCall {
18787	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18788	return c
18789}
18790
18791// IfNoneMatch sets the optional parameter which makes the operation
18792// fail if the object's ETag matches the given value. This is useful for
18793// getting updates only after the object has changed since the last
18794// request. Use googleapi.IsNotModified to check whether the response
18795// error from Do is the result of In-None-Match.
18796func (c *AdvertiserLandingPagesGetCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesGetCall {
18797	c.ifNoneMatch_ = entityTag
18798	return c
18799}
18800
18801// Context sets the context to be used in this call's Do method. Any
18802// pending HTTP request will be aborted if the provided context is
18803// canceled.
18804func (c *AdvertiserLandingPagesGetCall) Context(ctx context.Context) *AdvertiserLandingPagesGetCall {
18805	c.ctx_ = ctx
18806	return c
18807}
18808
18809// Header returns an http.Header that can be modified by the caller to
18810// add HTTP headers to the request.
18811func (c *AdvertiserLandingPagesGetCall) Header() http.Header {
18812	if c.header_ == nil {
18813		c.header_ = make(http.Header)
18814	}
18815	return c.header_
18816}
18817
18818func (c *AdvertiserLandingPagesGetCall) doRequest(alt string) (*http.Response, error) {
18819	reqHeaders := make(http.Header)
18820	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
18821	for k, v := range c.header_ {
18822		reqHeaders[k] = v
18823	}
18824	reqHeaders.Set("User-Agent", c.s.userAgent())
18825	if c.ifNoneMatch_ != "" {
18826		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18827	}
18828	var body io.Reader = nil
18829	c.urlParams_.Set("alt", alt)
18830	c.urlParams_.Set("prettyPrint", "false")
18831	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages/{id}")
18832	urls += "?" + c.urlParams_.Encode()
18833	req, err := http.NewRequest("GET", urls, body)
18834	if err != nil {
18835		return nil, err
18836	}
18837	req.Header = reqHeaders
18838	googleapi.Expand(req.URL, map[string]string{
18839		"profileId": strconv.FormatInt(c.profileId, 10),
18840		"id":        strconv.FormatInt(c.id, 10),
18841	})
18842	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18843}
18844
18845// Do executes the "dfareporting.advertiserLandingPages.get" call.
18846// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
18847// status code is an error. Response headers are in either
18848// *LandingPage.ServerResponse.Header or (if a response was returned at
18849// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18850// to check whether the returned error was because
18851// http.StatusNotModified was returned.
18852func (c *AdvertiserLandingPagesGetCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
18853	gensupport.SetOptions(c.urlParams_, opts...)
18854	res, err := c.doRequest("json")
18855	if res != nil && res.StatusCode == http.StatusNotModified {
18856		if res.Body != nil {
18857			res.Body.Close()
18858		}
18859		return nil, &googleapi.Error{
18860			Code:   res.StatusCode,
18861			Header: res.Header,
18862		}
18863	}
18864	if err != nil {
18865		return nil, err
18866	}
18867	defer googleapi.CloseBody(res)
18868	if err := googleapi.CheckResponse(res); err != nil {
18869		return nil, err
18870	}
18871	ret := &LandingPage{
18872		ServerResponse: googleapi.ServerResponse{
18873			Header:         res.Header,
18874			HTTPStatusCode: res.StatusCode,
18875		},
18876	}
18877	target := &ret
18878	if err := gensupport.DecodeResponse(target, res); err != nil {
18879		return nil, err
18880	}
18881	return ret, nil
18882	// {
18883	//   "description": "Gets one landing page by ID.",
18884	//   "httpMethod": "GET",
18885	//   "id": "dfareporting.advertiserLandingPages.get",
18886	//   "parameterOrder": [
18887	//     "profileId",
18888	//     "id"
18889	//   ],
18890	//   "parameters": {
18891	//     "id": {
18892	//       "description": "Landing page ID.",
18893	//       "format": "int64",
18894	//       "location": "path",
18895	//       "required": true,
18896	//       "type": "string"
18897	//     },
18898	//     "profileId": {
18899	//       "description": "User profile ID associated with this request.",
18900	//       "format": "int64",
18901	//       "location": "path",
18902	//       "required": true,
18903	//       "type": "string"
18904	//     }
18905	//   },
18906	//   "path": "userprofiles/{profileId}/advertiserLandingPages/{id}",
18907	//   "response": {
18908	//     "$ref": "LandingPage"
18909	//   },
18910	//   "scopes": [
18911	//     "https://www.googleapis.com/auth/dfatrafficking"
18912	//   ]
18913	// }
18914
18915}
18916
18917// method id "dfareporting.advertiserLandingPages.insert":
18918
18919type AdvertiserLandingPagesInsertCall struct {
18920	s           *Service
18921	profileId   int64
18922	landingpage *LandingPage
18923	urlParams_  gensupport.URLParams
18924	ctx_        context.Context
18925	header_     http.Header
18926}
18927
18928// Insert: Inserts a new landing page.
18929func (r *AdvertiserLandingPagesService) Insert(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesInsertCall {
18930	c := &AdvertiserLandingPagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18931	c.profileId = profileId
18932	c.landingpage = landingpage
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 *AdvertiserLandingPagesInsertCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesInsertCall {
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 *AdvertiserLandingPagesInsertCall) Context(ctx context.Context) *AdvertiserLandingPagesInsertCall {
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 *AdvertiserLandingPagesInsertCall) Header() http.Header {
18955	if c.header_ == nil {
18956		c.header_ = make(http.Header)
18957	}
18958	return c.header_
18959}
18960
18961func (c *AdvertiserLandingPagesInsertCall) doRequest(alt string) (*http.Response, error) {
18962	reqHeaders := make(http.Header)
18963	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
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.landingpage)
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}/advertiserLandingPages")
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.advertiserLandingPages.insert" call.
18990// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
18991// status code is an error. Response headers are in either
18992// *LandingPage.ServerResponse.Header or (if a response was returned at
18993// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18994// to check whether the returned error was because
18995// http.StatusNotModified was returned.
18996func (c *AdvertiserLandingPagesInsertCall) Do(opts ...googleapi.CallOption) (*LandingPage, 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 := &LandingPage{
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 landing page.",
19028	//   "httpMethod": "POST",
19029	//   "id": "dfareporting.advertiserLandingPages.insert",
19030	//   "parameterOrder": [
19031	//     "profileId"
19032	//   ],
19033	//   "parameters": {
19034	//     "profileId": {
19035	//       "description": "User profile ID associated with this request.",
19036	//       "format": "int64",
19037	//       "location": "path",
19038	//       "required": true,
19039	//       "type": "string"
19040	//     }
19041	//   },
19042	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19043	//   "request": {
19044	//     "$ref": "LandingPage"
19045	//   },
19046	//   "response": {
19047	//     "$ref": "LandingPage"
19048	//   },
19049	//   "scopes": [
19050	//     "https://www.googleapis.com/auth/dfatrafficking"
19051	//   ]
19052	// }
19053
19054}
19055
19056// method id "dfareporting.advertiserLandingPages.list":
19057
19058type AdvertiserLandingPagesListCall struct {
19059	s            *Service
19060	profileId    int64
19061	urlParams_   gensupport.URLParams
19062	ifNoneMatch_ string
19063	ctx_         context.Context
19064	header_      http.Header
19065}
19066
19067// List: Retrieves a list of landing pages.
19068func (r *AdvertiserLandingPagesService) List(profileId int64) *AdvertiserLandingPagesListCall {
19069	c := &AdvertiserLandingPagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19070	c.profileId = profileId
19071	return c
19072}
19073
19074// AdvertiserIds sets the optional parameter "advertiserIds": Select
19075// only landing pages that belong to these advertisers.
19076func (c *AdvertiserLandingPagesListCall) AdvertiserIds(advertiserIds ...int64) *AdvertiserLandingPagesListCall {
19077	var advertiserIds_ []string
19078	for _, v := range advertiserIds {
19079		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
19080	}
19081	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
19082	return c
19083}
19084
19085// Archived sets the optional parameter "archived": Select only archived
19086// landing pages. Don't set this field to select both archived and
19087// non-archived landing pages.
19088func (c *AdvertiserLandingPagesListCall) Archived(archived bool) *AdvertiserLandingPagesListCall {
19089	c.urlParams_.Set("archived", fmt.Sprint(archived))
19090	return c
19091}
19092
19093// CampaignIds sets the optional parameter "campaignIds": Select only
19094// landing pages that are associated with these campaigns.
19095func (c *AdvertiserLandingPagesListCall) CampaignIds(campaignIds ...int64) *AdvertiserLandingPagesListCall {
19096	var campaignIds_ []string
19097	for _, v := range campaignIds {
19098		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
19099	}
19100	c.urlParams_.SetMulti("campaignIds", campaignIds_)
19101	return c
19102}
19103
19104// Ids sets the optional parameter "ids": Select only landing pages with
19105// these IDs.
19106func (c *AdvertiserLandingPagesListCall) Ids(ids ...int64) *AdvertiserLandingPagesListCall {
19107	var ids_ []string
19108	for _, v := range ids {
19109		ids_ = append(ids_, fmt.Sprint(v))
19110	}
19111	c.urlParams_.SetMulti("ids", ids_)
19112	return c
19113}
19114
19115// MaxResults sets the optional parameter "maxResults": Maximum number
19116// of results to return.
19117func (c *AdvertiserLandingPagesListCall) MaxResults(maxResults int64) *AdvertiserLandingPagesListCall {
19118	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19119	return c
19120}
19121
19122// PageToken sets the optional parameter "pageToken": Value of the
19123// nextPageToken from the previous result page.
19124func (c *AdvertiserLandingPagesListCall) PageToken(pageToken string) *AdvertiserLandingPagesListCall {
19125	c.urlParams_.Set("pageToken", pageToken)
19126	return c
19127}
19128
19129// SearchString sets the optional parameter "searchString": Allows
19130// searching for landing pages by name or ID. Wildcards (*) are allowed.
19131// For example, "landingpage*2017" will return landing pages with names
19132// like "landingpage July 2017", "landingpage March 2017", or simply
19133// "landingpage 2017". Most of the searches also add wildcards
19134// implicitly at the start and the end of the search string. For
19135// example, a search string of "landingpage" will match campaigns with
19136// name "my landingpage", "landingpage 2015", or simply "landingpage".
19137func (c *AdvertiserLandingPagesListCall) SearchString(searchString string) *AdvertiserLandingPagesListCall {
19138	c.urlParams_.Set("searchString", searchString)
19139	return c
19140}
19141
19142// SortField sets the optional parameter "sortField": Field by which to
19143// sort the list.
19144//
19145// Possible values:
19146//   "ID" (default)
19147//   "NAME"
19148func (c *AdvertiserLandingPagesListCall) SortField(sortField string) *AdvertiserLandingPagesListCall {
19149	c.urlParams_.Set("sortField", sortField)
19150	return c
19151}
19152
19153// SortOrder sets the optional parameter "sortOrder": Order of sorted
19154// results.
19155//
19156// Possible values:
19157//   "ASCENDING" (default)
19158//   "DESCENDING"
19159func (c *AdvertiserLandingPagesListCall) SortOrder(sortOrder string) *AdvertiserLandingPagesListCall {
19160	c.urlParams_.Set("sortOrder", sortOrder)
19161	return c
19162}
19163
19164// SubaccountId sets the optional parameter "subaccountId": Select only
19165// landing pages that belong to this subaccount.
19166func (c *AdvertiserLandingPagesListCall) SubaccountId(subaccountId int64) *AdvertiserLandingPagesListCall {
19167	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
19168	return c
19169}
19170
19171// Fields allows partial responses to be retrieved. See
19172// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19173// for more information.
19174func (c *AdvertiserLandingPagesListCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesListCall {
19175	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19176	return c
19177}
19178
19179// IfNoneMatch sets the optional parameter which makes the operation
19180// fail if the object's ETag matches the given value. This is useful for
19181// getting updates only after the object has changed since the last
19182// request. Use googleapi.IsNotModified to check whether the response
19183// error from Do is the result of In-None-Match.
19184func (c *AdvertiserLandingPagesListCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesListCall {
19185	c.ifNoneMatch_ = entityTag
19186	return c
19187}
19188
19189// Context sets the context to be used in this call's Do method. Any
19190// pending HTTP request will be aborted if the provided context is
19191// canceled.
19192func (c *AdvertiserLandingPagesListCall) Context(ctx context.Context) *AdvertiserLandingPagesListCall {
19193	c.ctx_ = ctx
19194	return c
19195}
19196
19197// Header returns an http.Header that can be modified by the caller to
19198// add HTTP headers to the request.
19199func (c *AdvertiserLandingPagesListCall) Header() http.Header {
19200	if c.header_ == nil {
19201		c.header_ = make(http.Header)
19202	}
19203	return c.header_
19204}
19205
19206func (c *AdvertiserLandingPagesListCall) doRequest(alt string) (*http.Response, error) {
19207	reqHeaders := make(http.Header)
19208	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
19209	for k, v := range c.header_ {
19210		reqHeaders[k] = v
19211	}
19212	reqHeaders.Set("User-Agent", c.s.userAgent())
19213	if c.ifNoneMatch_ != "" {
19214		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19215	}
19216	var body io.Reader = nil
19217	c.urlParams_.Set("alt", alt)
19218	c.urlParams_.Set("prettyPrint", "false")
19219	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19220	urls += "?" + c.urlParams_.Encode()
19221	req, err := http.NewRequest("GET", urls, body)
19222	if err != nil {
19223		return nil, err
19224	}
19225	req.Header = reqHeaders
19226	googleapi.Expand(req.URL, map[string]string{
19227		"profileId": strconv.FormatInt(c.profileId, 10),
19228	})
19229	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19230}
19231
19232// Do executes the "dfareporting.advertiserLandingPages.list" call.
19233// Exactly one of *AdvertiserLandingPagesListResponse or error will be
19234// non-nil. Any non-2xx status code is an error. Response headers are in
19235// either *AdvertiserLandingPagesListResponse.ServerResponse.Header or
19236// (if a response was returned at all) in
19237// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19238// whether the returned error was because http.StatusNotModified was
19239// returned.
19240func (c *AdvertiserLandingPagesListCall) Do(opts ...googleapi.CallOption) (*AdvertiserLandingPagesListResponse, error) {
19241	gensupport.SetOptions(c.urlParams_, opts...)
19242	res, err := c.doRequest("json")
19243	if res != nil && res.StatusCode == http.StatusNotModified {
19244		if res.Body != nil {
19245			res.Body.Close()
19246		}
19247		return nil, &googleapi.Error{
19248			Code:   res.StatusCode,
19249			Header: res.Header,
19250		}
19251	}
19252	if err != nil {
19253		return nil, err
19254	}
19255	defer googleapi.CloseBody(res)
19256	if err := googleapi.CheckResponse(res); err != nil {
19257		return nil, err
19258	}
19259	ret := &AdvertiserLandingPagesListResponse{
19260		ServerResponse: googleapi.ServerResponse{
19261			Header:         res.Header,
19262			HTTPStatusCode: res.StatusCode,
19263		},
19264	}
19265	target := &ret
19266	if err := gensupport.DecodeResponse(target, res); err != nil {
19267		return nil, err
19268	}
19269	return ret, nil
19270	// {
19271	//   "description": "Retrieves a list of landing pages.",
19272	//   "httpMethod": "GET",
19273	//   "id": "dfareporting.advertiserLandingPages.list",
19274	//   "parameterOrder": [
19275	//     "profileId"
19276	//   ],
19277	//   "parameters": {
19278	//     "advertiserIds": {
19279	//       "description": "Select only landing pages that belong to these advertisers.",
19280	//       "format": "int64",
19281	//       "location": "query",
19282	//       "repeated": true,
19283	//       "type": "string"
19284	//     },
19285	//     "archived": {
19286	//       "description": "Select only archived landing pages. Don't set this field to select both archived and non-archived landing pages.",
19287	//       "location": "query",
19288	//       "type": "boolean"
19289	//     },
19290	//     "campaignIds": {
19291	//       "description": "Select only landing pages that are associated with these campaigns.",
19292	//       "format": "int64",
19293	//       "location": "query",
19294	//       "repeated": true,
19295	//       "type": "string"
19296	//     },
19297	//     "ids": {
19298	//       "description": "Select only landing pages with these IDs.",
19299	//       "format": "int64",
19300	//       "location": "query",
19301	//       "repeated": true,
19302	//       "type": "string"
19303	//     },
19304	//     "maxResults": {
19305	//       "default": "1000",
19306	//       "description": "Maximum number of results to return.",
19307	//       "format": "int32",
19308	//       "location": "query",
19309	//       "maximum": "1000",
19310	//       "minimum": "0",
19311	//       "type": "integer"
19312	//     },
19313	//     "pageToken": {
19314	//       "description": "Value of the nextPageToken from the previous result page.",
19315	//       "location": "query",
19316	//       "type": "string"
19317	//     },
19318	//     "profileId": {
19319	//       "description": "User profile ID associated with this request.",
19320	//       "format": "int64",
19321	//       "location": "path",
19322	//       "required": true,
19323	//       "type": "string"
19324	//     },
19325	//     "searchString": {
19326	//       "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\".",
19327	//       "location": "query",
19328	//       "type": "string"
19329	//     },
19330	//     "sortField": {
19331	//       "default": "ID",
19332	//       "description": "Field by which to sort the list.",
19333	//       "enum": [
19334	//         "ID",
19335	//         "NAME"
19336	//       ],
19337	//       "enumDescriptions": [
19338	//         "",
19339	//         ""
19340	//       ],
19341	//       "location": "query",
19342	//       "type": "string"
19343	//     },
19344	//     "sortOrder": {
19345	//       "default": "ASCENDING",
19346	//       "description": "Order of sorted results.",
19347	//       "enum": [
19348	//         "ASCENDING",
19349	//         "DESCENDING"
19350	//       ],
19351	//       "enumDescriptions": [
19352	//         "",
19353	//         ""
19354	//       ],
19355	//       "location": "query",
19356	//       "type": "string"
19357	//     },
19358	//     "subaccountId": {
19359	//       "description": "Select only landing pages that belong to this subaccount.",
19360	//       "format": "int64",
19361	//       "location": "query",
19362	//       "type": "string"
19363	//     }
19364	//   },
19365	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19366	//   "response": {
19367	//     "$ref": "AdvertiserLandingPagesListResponse"
19368	//   },
19369	//   "scopes": [
19370	//     "https://www.googleapis.com/auth/dfatrafficking"
19371	//   ]
19372	// }
19373
19374}
19375
19376// Pages invokes f for each page of results.
19377// A non-nil error returned from f will halt the iteration.
19378// The provided context supersedes any context provided to the Context method.
19379func (c *AdvertiserLandingPagesListCall) Pages(ctx context.Context, f func(*AdvertiserLandingPagesListResponse) error) error {
19380	c.ctx_ = ctx
19381	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19382	for {
19383		x, err := c.Do()
19384		if err != nil {
19385			return err
19386		}
19387		if err := f(x); err != nil {
19388			return err
19389		}
19390		if x.NextPageToken == "" {
19391			return nil
19392		}
19393		c.PageToken(x.NextPageToken)
19394	}
19395}
19396
19397// method id "dfareporting.advertiserLandingPages.patch":
19398
19399type AdvertiserLandingPagesPatchCall struct {
19400	s           *Service
19401	profileId   int64
19402	landingpage *LandingPage
19403	urlParams_  gensupport.URLParams
19404	ctx_        context.Context
19405	header_     http.Header
19406}
19407
19408// Patch: Updates an existing landing page. This method supports patch
19409// semantics.
19410func (r *AdvertiserLandingPagesService) Patch(profileId int64, id int64, landingpage *LandingPage) *AdvertiserLandingPagesPatchCall {
19411	c := &AdvertiserLandingPagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19412	c.profileId = profileId
19413	c.urlParams_.Set("id", fmt.Sprint(id))
19414	c.landingpage = landingpage
19415	return c
19416}
19417
19418// Fields allows partial responses to be retrieved. See
19419// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19420// for more information.
19421func (c *AdvertiserLandingPagesPatchCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesPatchCall {
19422	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19423	return c
19424}
19425
19426// Context sets the context to be used in this call's Do method. Any
19427// pending HTTP request will be aborted if the provided context is
19428// canceled.
19429func (c *AdvertiserLandingPagesPatchCall) Context(ctx context.Context) *AdvertiserLandingPagesPatchCall {
19430	c.ctx_ = ctx
19431	return c
19432}
19433
19434// Header returns an http.Header that can be modified by the caller to
19435// add HTTP headers to the request.
19436func (c *AdvertiserLandingPagesPatchCall) Header() http.Header {
19437	if c.header_ == nil {
19438		c.header_ = make(http.Header)
19439	}
19440	return c.header_
19441}
19442
19443func (c *AdvertiserLandingPagesPatchCall) doRequest(alt string) (*http.Response, error) {
19444	reqHeaders := make(http.Header)
19445	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
19446	for k, v := range c.header_ {
19447		reqHeaders[k] = v
19448	}
19449	reqHeaders.Set("User-Agent", c.s.userAgent())
19450	var body io.Reader = nil
19451	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19452	if err != nil {
19453		return nil, err
19454	}
19455	reqHeaders.Set("Content-Type", "application/json")
19456	c.urlParams_.Set("alt", alt)
19457	c.urlParams_.Set("prettyPrint", "false")
19458	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19459	urls += "?" + c.urlParams_.Encode()
19460	req, err := http.NewRequest("PATCH", urls, body)
19461	if err != nil {
19462		return nil, err
19463	}
19464	req.Header = reqHeaders
19465	googleapi.Expand(req.URL, map[string]string{
19466		"profileId": strconv.FormatInt(c.profileId, 10),
19467	})
19468	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19469}
19470
19471// Do executes the "dfareporting.advertiserLandingPages.patch" call.
19472// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
19473// status code is an error. Response headers are in either
19474// *LandingPage.ServerResponse.Header or (if a response was returned at
19475// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19476// to check whether the returned error was because
19477// http.StatusNotModified was returned.
19478func (c *AdvertiserLandingPagesPatchCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19479	gensupport.SetOptions(c.urlParams_, opts...)
19480	res, err := c.doRequest("json")
19481	if res != nil && res.StatusCode == http.StatusNotModified {
19482		if res.Body != nil {
19483			res.Body.Close()
19484		}
19485		return nil, &googleapi.Error{
19486			Code:   res.StatusCode,
19487			Header: res.Header,
19488		}
19489	}
19490	if err != nil {
19491		return nil, err
19492	}
19493	defer googleapi.CloseBody(res)
19494	if err := googleapi.CheckResponse(res); err != nil {
19495		return nil, err
19496	}
19497	ret := &LandingPage{
19498		ServerResponse: googleapi.ServerResponse{
19499			Header:         res.Header,
19500			HTTPStatusCode: res.StatusCode,
19501		},
19502	}
19503	target := &ret
19504	if err := gensupport.DecodeResponse(target, res); err != nil {
19505		return nil, err
19506	}
19507	return ret, nil
19508	// {
19509	//   "description": "Updates an existing landing page. This method supports patch semantics.",
19510	//   "httpMethod": "PATCH",
19511	//   "id": "dfareporting.advertiserLandingPages.patch",
19512	//   "parameterOrder": [
19513	//     "profileId",
19514	//     "id"
19515	//   ],
19516	//   "parameters": {
19517	//     "id": {
19518	//       "description": "Landing page ID.",
19519	//       "format": "int64",
19520	//       "location": "query",
19521	//       "required": true,
19522	//       "type": "string"
19523	//     },
19524	//     "profileId": {
19525	//       "description": "User profile ID associated with this request.",
19526	//       "format": "int64",
19527	//       "location": "path",
19528	//       "required": true,
19529	//       "type": "string"
19530	//     }
19531	//   },
19532	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19533	//   "request": {
19534	//     "$ref": "LandingPage"
19535	//   },
19536	//   "response": {
19537	//     "$ref": "LandingPage"
19538	//   },
19539	//   "scopes": [
19540	//     "https://www.googleapis.com/auth/dfatrafficking"
19541	//   ]
19542	// }
19543
19544}
19545
19546// method id "dfareporting.advertiserLandingPages.update":
19547
19548type AdvertiserLandingPagesUpdateCall struct {
19549	s           *Service
19550	profileId   int64
19551	landingpage *LandingPage
19552	urlParams_  gensupport.URLParams
19553	ctx_        context.Context
19554	header_     http.Header
19555}
19556
19557// Update: Updates an existing landing page.
19558func (r *AdvertiserLandingPagesService) Update(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesUpdateCall {
19559	c := &AdvertiserLandingPagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19560	c.profileId = profileId
19561	c.landingpage = landingpage
19562	return c
19563}
19564
19565// Fields allows partial responses to be retrieved. See
19566// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19567// for more information.
19568func (c *AdvertiserLandingPagesUpdateCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesUpdateCall {
19569	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19570	return c
19571}
19572
19573// Context sets the context to be used in this call's Do method. Any
19574// pending HTTP request will be aborted if the provided context is
19575// canceled.
19576func (c *AdvertiserLandingPagesUpdateCall) Context(ctx context.Context) *AdvertiserLandingPagesUpdateCall {
19577	c.ctx_ = ctx
19578	return c
19579}
19580
19581// Header returns an http.Header that can be modified by the caller to
19582// add HTTP headers to the request.
19583func (c *AdvertiserLandingPagesUpdateCall) Header() http.Header {
19584	if c.header_ == nil {
19585		c.header_ = make(http.Header)
19586	}
19587	return c.header_
19588}
19589
19590func (c *AdvertiserLandingPagesUpdateCall) doRequest(alt string) (*http.Response, error) {
19591	reqHeaders := make(http.Header)
19592	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
19593	for k, v := range c.header_ {
19594		reqHeaders[k] = v
19595	}
19596	reqHeaders.Set("User-Agent", c.s.userAgent())
19597	var body io.Reader = nil
19598	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19599	if err != nil {
19600		return nil, err
19601	}
19602	reqHeaders.Set("Content-Type", "application/json")
19603	c.urlParams_.Set("alt", alt)
19604	c.urlParams_.Set("prettyPrint", "false")
19605	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19606	urls += "?" + c.urlParams_.Encode()
19607	req, err := http.NewRequest("PUT", urls, body)
19608	if err != nil {
19609		return nil, err
19610	}
19611	req.Header = reqHeaders
19612	googleapi.Expand(req.URL, map[string]string{
19613		"profileId": strconv.FormatInt(c.profileId, 10),
19614	})
19615	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19616}
19617
19618// Do executes the "dfareporting.advertiserLandingPages.update" call.
19619// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
19620// status code is an error. Response headers are in either
19621// *LandingPage.ServerResponse.Header or (if a response was returned at
19622// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19623// to check whether the returned error was because
19624// http.StatusNotModified was returned.
19625func (c *AdvertiserLandingPagesUpdateCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19626	gensupport.SetOptions(c.urlParams_, opts...)
19627	res, err := c.doRequest("json")
19628	if res != nil && res.StatusCode == http.StatusNotModified {
19629		if res.Body != nil {
19630			res.Body.Close()
19631		}
19632		return nil, &googleapi.Error{
19633			Code:   res.StatusCode,
19634			Header: res.Header,
19635		}
19636	}
19637	if err != nil {
19638		return nil, err
19639	}
19640	defer googleapi.CloseBody(res)
19641	if err := googleapi.CheckResponse(res); err != nil {
19642		return nil, err
19643	}
19644	ret := &LandingPage{
19645		ServerResponse: googleapi.ServerResponse{
19646			Header:         res.Header,
19647			HTTPStatusCode: res.StatusCode,
19648		},
19649	}
19650	target := &ret
19651	if err := gensupport.DecodeResponse(target, res); err != nil {
19652		return nil, err
19653	}
19654	return ret, nil
19655	// {
19656	//   "description": "Updates an existing landing page.",
19657	//   "httpMethod": "PUT",
19658	//   "id": "dfareporting.advertiserLandingPages.update",
19659	//   "parameterOrder": [
19660	//     "profileId"
19661	//   ],
19662	//   "parameters": {
19663	//     "profileId": {
19664	//       "description": "User profile ID associated with this request.",
19665	//       "format": "int64",
19666	//       "location": "path",
19667	//       "required": true,
19668	//       "type": "string"
19669	//     }
19670	//   },
19671	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19672	//   "request": {
19673	//     "$ref": "LandingPage"
19674	//   },
19675	//   "response": {
19676	//     "$ref": "LandingPage"
19677	//   },
19678	//   "scopes": [
19679	//     "https://www.googleapis.com/auth/dfatrafficking"
19680	//   ]
19681	// }
19682
19683}
19684
19685// method id "dfareporting.advertisers.get":
19686
19687type AdvertisersGetCall struct {
19688	s            *Service
19689	profileId    int64
19690	id           int64
19691	urlParams_   gensupport.URLParams
19692	ifNoneMatch_ string
19693	ctx_         context.Context
19694	header_      http.Header
19695}
19696
19697// Get: Gets one advertiser by ID.
19698func (r *AdvertisersService) Get(profileId int64, id int64) *AdvertisersGetCall {
19699	c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19700	c.profileId = profileId
19701	c.id = id
19702	return c
19703}
19704
19705// Fields allows partial responses to be retrieved. See
19706// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19707// for more information.
19708func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall {
19709	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19710	return c
19711}
19712
19713// IfNoneMatch sets the optional parameter which makes the operation
19714// fail if the object's ETag matches the given value. This is useful for
19715// getting updates only after the object has changed since the last
19716// request. Use googleapi.IsNotModified to check whether the response
19717// error from Do is the result of In-None-Match.
19718func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall {
19719	c.ifNoneMatch_ = entityTag
19720	return c
19721}
19722
19723// Context sets the context to be used in this call's Do method. Any
19724// pending HTTP request will be aborted if the provided context is
19725// canceled.
19726func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
19727	c.ctx_ = ctx
19728	return c
19729}
19730
19731// Header returns an http.Header that can be modified by the caller to
19732// add HTTP headers to the request.
19733func (c *AdvertisersGetCall) Header() http.Header {
19734	if c.header_ == nil {
19735		c.header_ = make(http.Header)
19736	}
19737	return c.header_
19738}
19739
19740func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
19741	reqHeaders := make(http.Header)
19742	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
19743	for k, v := range c.header_ {
19744		reqHeaders[k] = v
19745	}
19746	reqHeaders.Set("User-Agent", c.s.userAgent())
19747	if c.ifNoneMatch_ != "" {
19748		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19749	}
19750	var body io.Reader = nil
19751	c.urlParams_.Set("alt", alt)
19752	c.urlParams_.Set("prettyPrint", "false")
19753	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers/{id}")
19754	urls += "?" + c.urlParams_.Encode()
19755	req, err := http.NewRequest("GET", urls, body)
19756	if err != nil {
19757		return nil, err
19758	}
19759	req.Header = reqHeaders
19760	googleapi.Expand(req.URL, map[string]string{
19761		"profileId": strconv.FormatInt(c.profileId, 10),
19762		"id":        strconv.FormatInt(c.id, 10),
19763	})
19764	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19765}
19766
19767// Do executes the "dfareporting.advertisers.get" call.
19768// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
19769// status code is an error. Response headers are in either
19770// *Advertiser.ServerResponse.Header or (if a response was returned at
19771// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19772// to check whether the returned error was because
19773// http.StatusNotModified was returned.
19774func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19775	gensupport.SetOptions(c.urlParams_, opts...)
19776	res, err := c.doRequest("json")
19777	if res != nil && res.StatusCode == http.StatusNotModified {
19778		if res.Body != nil {
19779			res.Body.Close()
19780		}
19781		return nil, &googleapi.Error{
19782			Code:   res.StatusCode,
19783			Header: res.Header,
19784		}
19785	}
19786	if err != nil {
19787		return nil, err
19788	}
19789	defer googleapi.CloseBody(res)
19790	if err := googleapi.CheckResponse(res); err != nil {
19791		return nil, err
19792	}
19793	ret := &Advertiser{
19794		ServerResponse: googleapi.ServerResponse{
19795			Header:         res.Header,
19796			HTTPStatusCode: res.StatusCode,
19797		},
19798	}
19799	target := &ret
19800	if err := gensupport.DecodeResponse(target, res); err != nil {
19801		return nil, err
19802	}
19803	return ret, nil
19804	// {
19805	//   "description": "Gets one advertiser by ID.",
19806	//   "httpMethod": "GET",
19807	//   "id": "dfareporting.advertisers.get",
19808	//   "parameterOrder": [
19809	//     "profileId",
19810	//     "id"
19811	//   ],
19812	//   "parameters": {
19813	//     "id": {
19814	//       "description": "Advertiser ID.",
19815	//       "format": "int64",
19816	//       "location": "path",
19817	//       "required": true,
19818	//       "type": "string"
19819	//     },
19820	//     "profileId": {
19821	//       "description": "User profile ID associated with this request.",
19822	//       "format": "int64",
19823	//       "location": "path",
19824	//       "required": true,
19825	//       "type": "string"
19826	//     }
19827	//   },
19828	//   "path": "userprofiles/{profileId}/advertisers/{id}",
19829	//   "response": {
19830	//     "$ref": "Advertiser"
19831	//   },
19832	//   "scopes": [
19833	//     "https://www.googleapis.com/auth/dfatrafficking"
19834	//   ]
19835	// }
19836
19837}
19838
19839// method id "dfareporting.advertisers.insert":
19840
19841type AdvertisersInsertCall struct {
19842	s          *Service
19843	profileId  int64
19844	advertiser *Advertiser
19845	urlParams_ gensupport.URLParams
19846	ctx_       context.Context
19847	header_    http.Header
19848}
19849
19850// Insert: Inserts a new advertiser.
19851func (r *AdvertisersService) Insert(profileId int64, advertiser *Advertiser) *AdvertisersInsertCall {
19852	c := &AdvertisersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19853	c.profileId = profileId
19854	c.advertiser = advertiser
19855	return c
19856}
19857
19858// Fields allows partial responses to be retrieved. See
19859// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19860// for more information.
19861func (c *AdvertisersInsertCall) Fields(s ...googleapi.Field) *AdvertisersInsertCall {
19862	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19863	return c
19864}
19865
19866// Context sets the context to be used in this call's Do method. Any
19867// pending HTTP request will be aborted if the provided context is
19868// canceled.
19869func (c *AdvertisersInsertCall) Context(ctx context.Context) *AdvertisersInsertCall {
19870	c.ctx_ = ctx
19871	return c
19872}
19873
19874// Header returns an http.Header that can be modified by the caller to
19875// add HTTP headers to the request.
19876func (c *AdvertisersInsertCall) Header() http.Header {
19877	if c.header_ == nil {
19878		c.header_ = make(http.Header)
19879	}
19880	return c.header_
19881}
19882
19883func (c *AdvertisersInsertCall) doRequest(alt string) (*http.Response, error) {
19884	reqHeaders := make(http.Header)
19885	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
19886	for k, v := range c.header_ {
19887		reqHeaders[k] = v
19888	}
19889	reqHeaders.Set("User-Agent", c.s.userAgent())
19890	var body io.Reader = nil
19891	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
19892	if err != nil {
19893		return nil, err
19894	}
19895	reqHeaders.Set("Content-Type", "application/json")
19896	c.urlParams_.Set("alt", alt)
19897	c.urlParams_.Set("prettyPrint", "false")
19898	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
19899	urls += "?" + c.urlParams_.Encode()
19900	req, err := http.NewRequest("POST", urls, body)
19901	if err != nil {
19902		return nil, err
19903	}
19904	req.Header = reqHeaders
19905	googleapi.Expand(req.URL, map[string]string{
19906		"profileId": strconv.FormatInt(c.profileId, 10),
19907	})
19908	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19909}
19910
19911// Do executes the "dfareporting.advertisers.insert" call.
19912// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
19913// status code is an error. Response headers are in either
19914// *Advertiser.ServerResponse.Header or (if a response was returned at
19915// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19916// to check whether the returned error was because
19917// http.StatusNotModified was returned.
19918func (c *AdvertisersInsertCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19919	gensupport.SetOptions(c.urlParams_, opts...)
19920	res, err := c.doRequest("json")
19921	if res != nil && res.StatusCode == http.StatusNotModified {
19922		if res.Body != nil {
19923			res.Body.Close()
19924		}
19925		return nil, &googleapi.Error{
19926			Code:   res.StatusCode,
19927			Header: res.Header,
19928		}
19929	}
19930	if err != nil {
19931		return nil, err
19932	}
19933	defer googleapi.CloseBody(res)
19934	if err := googleapi.CheckResponse(res); err != nil {
19935		return nil, err
19936	}
19937	ret := &Advertiser{
19938		ServerResponse: googleapi.ServerResponse{
19939			Header:         res.Header,
19940			HTTPStatusCode: res.StatusCode,
19941		},
19942	}
19943	target := &ret
19944	if err := gensupport.DecodeResponse(target, res); err != nil {
19945		return nil, err
19946	}
19947	return ret, nil
19948	// {
19949	//   "description": "Inserts a new advertiser.",
19950	//   "httpMethod": "POST",
19951	//   "id": "dfareporting.advertisers.insert",
19952	//   "parameterOrder": [
19953	//     "profileId"
19954	//   ],
19955	//   "parameters": {
19956	//     "profileId": {
19957	//       "description": "User profile ID associated with this request.",
19958	//       "format": "int64",
19959	//       "location": "path",
19960	//       "required": true,
19961	//       "type": "string"
19962	//     }
19963	//   },
19964	//   "path": "userprofiles/{profileId}/advertisers",
19965	//   "request": {
19966	//     "$ref": "Advertiser"
19967	//   },
19968	//   "response": {
19969	//     "$ref": "Advertiser"
19970	//   },
19971	//   "scopes": [
19972	//     "https://www.googleapis.com/auth/dfatrafficking"
19973	//   ]
19974	// }
19975
19976}
19977
19978// method id "dfareporting.advertisers.list":
19979
19980type AdvertisersListCall struct {
19981	s            *Service
19982	profileId    int64
19983	urlParams_   gensupport.URLParams
19984	ifNoneMatch_ string
19985	ctx_         context.Context
19986	header_      http.Header
19987}
19988
19989// List: Retrieves a list of advertisers, possibly filtered. This method
19990// supports paging.
19991func (r *AdvertisersService) List(profileId int64) *AdvertisersListCall {
19992	c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19993	c.profileId = profileId
19994	return c
19995}
19996
19997// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
19998// Select only advertisers with these advertiser group IDs.
19999func (c *AdvertisersListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *AdvertisersListCall {
20000	var advertiserGroupIds_ []string
20001	for _, v := range advertiserGroupIds {
20002		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
20003	}
20004	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
20005	return c
20006}
20007
20008// FloodlightConfigurationIds sets the optional parameter
20009// "floodlightConfigurationIds": Select only advertisers with these
20010// floodlight configuration IDs.
20011func (c *AdvertisersListCall) FloodlightConfigurationIds(floodlightConfigurationIds ...int64) *AdvertisersListCall {
20012	var floodlightConfigurationIds_ []string
20013	for _, v := range floodlightConfigurationIds {
20014		floodlightConfigurationIds_ = append(floodlightConfigurationIds_, fmt.Sprint(v))
20015	}
20016	c.urlParams_.SetMulti("floodlightConfigurationIds", floodlightConfigurationIds_)
20017	return c
20018}
20019
20020// Ids sets the optional parameter "ids": Select only advertisers with
20021// these IDs.
20022func (c *AdvertisersListCall) Ids(ids ...int64) *AdvertisersListCall {
20023	var ids_ []string
20024	for _, v := range ids {
20025		ids_ = append(ids_, fmt.Sprint(v))
20026	}
20027	c.urlParams_.SetMulti("ids", ids_)
20028	return c
20029}
20030
20031// IncludeAdvertisersWithoutGroupsOnly sets the optional parameter
20032// "includeAdvertisersWithoutGroupsOnly": Select only advertisers which
20033// do not belong to any advertiser group.
20034func (c *AdvertisersListCall) IncludeAdvertisersWithoutGroupsOnly(includeAdvertisersWithoutGroupsOnly bool) *AdvertisersListCall {
20035	c.urlParams_.Set("includeAdvertisersWithoutGroupsOnly", fmt.Sprint(includeAdvertisersWithoutGroupsOnly))
20036	return c
20037}
20038
20039// MaxResults sets the optional parameter "maxResults": Maximum number
20040// of results to return.
20041func (c *AdvertisersListCall) MaxResults(maxResults int64) *AdvertisersListCall {
20042	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20043	return c
20044}
20045
20046// OnlyParent sets the optional parameter "onlyParent": Select only
20047// advertisers which use another advertiser's floodlight configuration.
20048func (c *AdvertisersListCall) OnlyParent(onlyParent bool) *AdvertisersListCall {
20049	c.urlParams_.Set("onlyParent", fmt.Sprint(onlyParent))
20050	return c
20051}
20052
20053// PageToken sets the optional parameter "pageToken": Value of the
20054// nextPageToken from the previous result page.
20055func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall {
20056	c.urlParams_.Set("pageToken", pageToken)
20057	return c
20058}
20059
20060// SearchString sets the optional parameter "searchString": Allows
20061// searching for objects by name or ID. Wildcards (*) are allowed. For
20062// example, "advertiser*2015" will return objects with names like
20063// "advertiser June 2015", "advertiser April 2015", or simply
20064// "advertiser 2015". Most of the searches also add wildcards implicitly
20065// at the start and the end of the search string. For example, a search
20066// string of "advertiser" will match objects with name "my advertiser",
20067// "advertiser 2015", or simply "advertiser".
20068func (c *AdvertisersListCall) SearchString(searchString string) *AdvertisersListCall {
20069	c.urlParams_.Set("searchString", searchString)
20070	return c
20071}
20072
20073// SortField sets the optional parameter "sortField": Field by which to
20074// sort the list.
20075//
20076// Possible values:
20077//   "ID" (default)
20078//   "NAME"
20079func (c *AdvertisersListCall) SortField(sortField string) *AdvertisersListCall {
20080	c.urlParams_.Set("sortField", sortField)
20081	return c
20082}
20083
20084// SortOrder sets the optional parameter "sortOrder": Order of sorted
20085// results.
20086//
20087// Possible values:
20088//   "ASCENDING" (default)
20089//   "DESCENDING"
20090func (c *AdvertisersListCall) SortOrder(sortOrder string) *AdvertisersListCall {
20091	c.urlParams_.Set("sortOrder", sortOrder)
20092	return c
20093}
20094
20095// Status sets the optional parameter "status": Select only advertisers
20096// with the specified status.
20097//
20098// Possible values:
20099//   "APPROVED"
20100//   "ON_HOLD"
20101func (c *AdvertisersListCall) Status(status string) *AdvertisersListCall {
20102	c.urlParams_.Set("status", status)
20103	return c
20104}
20105
20106// SubaccountId sets the optional parameter "subaccountId": Select only
20107// advertisers with these subaccount IDs.
20108func (c *AdvertisersListCall) SubaccountId(subaccountId int64) *AdvertisersListCall {
20109	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
20110	return c
20111}
20112
20113// Fields allows partial responses to be retrieved. See
20114// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20115// for more information.
20116func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall {
20117	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20118	return c
20119}
20120
20121// IfNoneMatch sets the optional parameter which makes the operation
20122// fail if the object's ETag matches the given value. This is useful for
20123// getting updates only after the object has changed since the last
20124// request. Use googleapi.IsNotModified to check whether the response
20125// error from Do is the result of In-None-Match.
20126func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall {
20127	c.ifNoneMatch_ = entityTag
20128	return c
20129}
20130
20131// Context sets the context to be used in this call's Do method. Any
20132// pending HTTP request will be aborted if the provided context is
20133// canceled.
20134func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
20135	c.ctx_ = ctx
20136	return c
20137}
20138
20139// Header returns an http.Header that can be modified by the caller to
20140// add HTTP headers to the request.
20141func (c *AdvertisersListCall) Header() http.Header {
20142	if c.header_ == nil {
20143		c.header_ = make(http.Header)
20144	}
20145	return c.header_
20146}
20147
20148func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
20149	reqHeaders := make(http.Header)
20150	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
20151	for k, v := range c.header_ {
20152		reqHeaders[k] = v
20153	}
20154	reqHeaders.Set("User-Agent", c.s.userAgent())
20155	if c.ifNoneMatch_ != "" {
20156		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20157	}
20158	var body io.Reader = nil
20159	c.urlParams_.Set("alt", alt)
20160	c.urlParams_.Set("prettyPrint", "false")
20161	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20162	urls += "?" + c.urlParams_.Encode()
20163	req, err := http.NewRequest("GET", urls, body)
20164	if err != nil {
20165		return nil, err
20166	}
20167	req.Header = reqHeaders
20168	googleapi.Expand(req.URL, map[string]string{
20169		"profileId": strconv.FormatInt(c.profileId, 10),
20170	})
20171	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20172}
20173
20174// Do executes the "dfareporting.advertisers.list" call.
20175// Exactly one of *AdvertisersListResponse or error will be non-nil. Any
20176// non-2xx status code is an error. Response headers are in either
20177// *AdvertisersListResponse.ServerResponse.Header or (if a response was
20178// returned at all) in error.(*googleapi.Error).Header. Use
20179// googleapi.IsNotModified to check whether the returned error was
20180// because http.StatusNotModified was returned.
20181func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*AdvertisersListResponse, error) {
20182	gensupport.SetOptions(c.urlParams_, opts...)
20183	res, err := c.doRequest("json")
20184	if res != nil && res.StatusCode == http.StatusNotModified {
20185		if res.Body != nil {
20186			res.Body.Close()
20187		}
20188		return nil, &googleapi.Error{
20189			Code:   res.StatusCode,
20190			Header: res.Header,
20191		}
20192	}
20193	if err != nil {
20194		return nil, err
20195	}
20196	defer googleapi.CloseBody(res)
20197	if err := googleapi.CheckResponse(res); err != nil {
20198		return nil, err
20199	}
20200	ret := &AdvertisersListResponse{
20201		ServerResponse: googleapi.ServerResponse{
20202			Header:         res.Header,
20203			HTTPStatusCode: res.StatusCode,
20204		},
20205	}
20206	target := &ret
20207	if err := gensupport.DecodeResponse(target, res); err != nil {
20208		return nil, err
20209	}
20210	return ret, nil
20211	// {
20212	//   "description": "Retrieves a list of advertisers, possibly filtered. This method supports paging.",
20213	//   "httpMethod": "GET",
20214	//   "id": "dfareporting.advertisers.list",
20215	//   "parameterOrder": [
20216	//     "profileId"
20217	//   ],
20218	//   "parameters": {
20219	//     "advertiserGroupIds": {
20220	//       "description": "Select only advertisers with these advertiser group IDs.",
20221	//       "format": "int64",
20222	//       "location": "query",
20223	//       "repeated": true,
20224	//       "type": "string"
20225	//     },
20226	//     "floodlightConfigurationIds": {
20227	//       "description": "Select only advertisers with these floodlight configuration IDs.",
20228	//       "format": "int64",
20229	//       "location": "query",
20230	//       "repeated": true,
20231	//       "type": "string"
20232	//     },
20233	//     "ids": {
20234	//       "description": "Select only advertisers with these IDs.",
20235	//       "format": "int64",
20236	//       "location": "query",
20237	//       "repeated": true,
20238	//       "type": "string"
20239	//     },
20240	//     "includeAdvertisersWithoutGroupsOnly": {
20241	//       "description": "Select only advertisers which do not belong to any advertiser group.",
20242	//       "location": "query",
20243	//       "type": "boolean"
20244	//     },
20245	//     "maxResults": {
20246	//       "default": "1000",
20247	//       "description": "Maximum number of results to return.",
20248	//       "format": "int32",
20249	//       "location": "query",
20250	//       "maximum": "1000",
20251	//       "minimum": "0",
20252	//       "type": "integer"
20253	//     },
20254	//     "onlyParent": {
20255	//       "description": "Select only advertisers which use another advertiser's floodlight configuration.",
20256	//       "location": "query",
20257	//       "type": "boolean"
20258	//     },
20259	//     "pageToken": {
20260	//       "description": "Value of the nextPageToken from the previous result page.",
20261	//       "location": "query",
20262	//       "type": "string"
20263	//     },
20264	//     "profileId": {
20265	//       "description": "User profile ID associated with this request.",
20266	//       "format": "int64",
20267	//       "location": "path",
20268	//       "required": true,
20269	//       "type": "string"
20270	//     },
20271	//     "searchString": {
20272	//       "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\".",
20273	//       "location": "query",
20274	//       "type": "string"
20275	//     },
20276	//     "sortField": {
20277	//       "default": "ID",
20278	//       "description": "Field by which to sort the list.",
20279	//       "enum": [
20280	//         "ID",
20281	//         "NAME"
20282	//       ],
20283	//       "enumDescriptions": [
20284	//         "",
20285	//         ""
20286	//       ],
20287	//       "location": "query",
20288	//       "type": "string"
20289	//     },
20290	//     "sortOrder": {
20291	//       "default": "ASCENDING",
20292	//       "description": "Order of sorted results.",
20293	//       "enum": [
20294	//         "ASCENDING",
20295	//         "DESCENDING"
20296	//       ],
20297	//       "enumDescriptions": [
20298	//         "",
20299	//         ""
20300	//       ],
20301	//       "location": "query",
20302	//       "type": "string"
20303	//     },
20304	//     "status": {
20305	//       "description": "Select only advertisers with the specified status.",
20306	//       "enum": [
20307	//         "APPROVED",
20308	//         "ON_HOLD"
20309	//       ],
20310	//       "enumDescriptions": [
20311	//         "",
20312	//         ""
20313	//       ],
20314	//       "location": "query",
20315	//       "type": "string"
20316	//     },
20317	//     "subaccountId": {
20318	//       "description": "Select only advertisers with these subaccount IDs.",
20319	//       "format": "int64",
20320	//       "location": "query",
20321	//       "type": "string"
20322	//     }
20323	//   },
20324	//   "path": "userprofiles/{profileId}/advertisers",
20325	//   "response": {
20326	//     "$ref": "AdvertisersListResponse"
20327	//   },
20328	//   "scopes": [
20329	//     "https://www.googleapis.com/auth/dfatrafficking"
20330	//   ]
20331	// }
20332
20333}
20334
20335// Pages invokes f for each page of results.
20336// A non-nil error returned from f will halt the iteration.
20337// The provided context supersedes any context provided to the Context method.
20338func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*AdvertisersListResponse) error) error {
20339	c.ctx_ = ctx
20340	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20341	for {
20342		x, err := c.Do()
20343		if err != nil {
20344			return err
20345		}
20346		if err := f(x); err != nil {
20347			return err
20348		}
20349		if x.NextPageToken == "" {
20350			return nil
20351		}
20352		c.PageToken(x.NextPageToken)
20353	}
20354}
20355
20356// method id "dfareporting.advertisers.patch":
20357
20358type AdvertisersPatchCall struct {
20359	s          *Service
20360	profileId  int64
20361	advertiser *Advertiser
20362	urlParams_ gensupport.URLParams
20363	ctx_       context.Context
20364	header_    http.Header
20365}
20366
20367// Patch: Updates an existing advertiser. This method supports patch
20368// semantics.
20369func (r *AdvertisersService) Patch(profileId int64, id int64, advertiser *Advertiser) *AdvertisersPatchCall {
20370	c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20371	c.profileId = profileId
20372	c.urlParams_.Set("id", fmt.Sprint(id))
20373	c.advertiser = advertiser
20374	return c
20375}
20376
20377// Fields allows partial responses to be retrieved. See
20378// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20379// for more information.
20380func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall {
20381	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20382	return c
20383}
20384
20385// Context sets the context to be used in this call's Do method. Any
20386// pending HTTP request will be aborted if the provided context is
20387// canceled.
20388func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
20389	c.ctx_ = ctx
20390	return c
20391}
20392
20393// Header returns an http.Header that can be modified by the caller to
20394// add HTTP headers to the request.
20395func (c *AdvertisersPatchCall) Header() http.Header {
20396	if c.header_ == nil {
20397		c.header_ = make(http.Header)
20398	}
20399	return c.header_
20400}
20401
20402func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
20403	reqHeaders := make(http.Header)
20404	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
20405	for k, v := range c.header_ {
20406		reqHeaders[k] = v
20407	}
20408	reqHeaders.Set("User-Agent", c.s.userAgent())
20409	var body io.Reader = nil
20410	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20411	if err != nil {
20412		return nil, err
20413	}
20414	reqHeaders.Set("Content-Type", "application/json")
20415	c.urlParams_.Set("alt", alt)
20416	c.urlParams_.Set("prettyPrint", "false")
20417	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20418	urls += "?" + c.urlParams_.Encode()
20419	req, err := http.NewRequest("PATCH", urls, body)
20420	if err != nil {
20421		return nil, err
20422	}
20423	req.Header = reqHeaders
20424	googleapi.Expand(req.URL, map[string]string{
20425		"profileId": strconv.FormatInt(c.profileId, 10),
20426	})
20427	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20428}
20429
20430// Do executes the "dfareporting.advertisers.patch" call.
20431// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
20432// status code is an error. Response headers are in either
20433// *Advertiser.ServerResponse.Header or (if a response was returned at
20434// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20435// to check whether the returned error was because
20436// http.StatusNotModified was returned.
20437func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20438	gensupport.SetOptions(c.urlParams_, opts...)
20439	res, err := c.doRequest("json")
20440	if res != nil && res.StatusCode == http.StatusNotModified {
20441		if res.Body != nil {
20442			res.Body.Close()
20443		}
20444		return nil, &googleapi.Error{
20445			Code:   res.StatusCode,
20446			Header: res.Header,
20447		}
20448	}
20449	if err != nil {
20450		return nil, err
20451	}
20452	defer googleapi.CloseBody(res)
20453	if err := googleapi.CheckResponse(res); err != nil {
20454		return nil, err
20455	}
20456	ret := &Advertiser{
20457		ServerResponse: googleapi.ServerResponse{
20458			Header:         res.Header,
20459			HTTPStatusCode: res.StatusCode,
20460		},
20461	}
20462	target := &ret
20463	if err := gensupport.DecodeResponse(target, res); err != nil {
20464		return nil, err
20465	}
20466	return ret, nil
20467	// {
20468	//   "description": "Updates an existing advertiser. This method supports patch semantics.",
20469	//   "httpMethod": "PATCH",
20470	//   "id": "dfareporting.advertisers.patch",
20471	//   "parameterOrder": [
20472	//     "profileId",
20473	//     "id"
20474	//   ],
20475	//   "parameters": {
20476	//     "id": {
20477	//       "description": "Advertiser ID.",
20478	//       "format": "int64",
20479	//       "location": "query",
20480	//       "required": true,
20481	//       "type": "string"
20482	//     },
20483	//     "profileId": {
20484	//       "description": "User profile ID associated with this request.",
20485	//       "format": "int64",
20486	//       "location": "path",
20487	//       "required": true,
20488	//       "type": "string"
20489	//     }
20490	//   },
20491	//   "path": "userprofiles/{profileId}/advertisers",
20492	//   "request": {
20493	//     "$ref": "Advertiser"
20494	//   },
20495	//   "response": {
20496	//     "$ref": "Advertiser"
20497	//   },
20498	//   "scopes": [
20499	//     "https://www.googleapis.com/auth/dfatrafficking"
20500	//   ]
20501	// }
20502
20503}
20504
20505// method id "dfareporting.advertisers.update":
20506
20507type AdvertisersUpdateCall struct {
20508	s          *Service
20509	profileId  int64
20510	advertiser *Advertiser
20511	urlParams_ gensupport.URLParams
20512	ctx_       context.Context
20513	header_    http.Header
20514}
20515
20516// Update: Updates an existing advertiser.
20517func (r *AdvertisersService) Update(profileId int64, advertiser *Advertiser) *AdvertisersUpdateCall {
20518	c := &AdvertisersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20519	c.profileId = profileId
20520	c.advertiser = advertiser
20521	return c
20522}
20523
20524// Fields allows partial responses to be retrieved. See
20525// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20526// for more information.
20527func (c *AdvertisersUpdateCall) Fields(s ...googleapi.Field) *AdvertisersUpdateCall {
20528	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20529	return c
20530}
20531
20532// Context sets the context to be used in this call's Do method. Any
20533// pending HTTP request will be aborted if the provided context is
20534// canceled.
20535func (c *AdvertisersUpdateCall) Context(ctx context.Context) *AdvertisersUpdateCall {
20536	c.ctx_ = ctx
20537	return c
20538}
20539
20540// Header returns an http.Header that can be modified by the caller to
20541// add HTTP headers to the request.
20542func (c *AdvertisersUpdateCall) Header() http.Header {
20543	if c.header_ == nil {
20544		c.header_ = make(http.Header)
20545	}
20546	return c.header_
20547}
20548
20549func (c *AdvertisersUpdateCall) doRequest(alt string) (*http.Response, error) {
20550	reqHeaders := make(http.Header)
20551	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
20552	for k, v := range c.header_ {
20553		reqHeaders[k] = v
20554	}
20555	reqHeaders.Set("User-Agent", c.s.userAgent())
20556	var body io.Reader = nil
20557	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20558	if err != nil {
20559		return nil, err
20560	}
20561	reqHeaders.Set("Content-Type", "application/json")
20562	c.urlParams_.Set("alt", alt)
20563	c.urlParams_.Set("prettyPrint", "false")
20564	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20565	urls += "?" + c.urlParams_.Encode()
20566	req, err := http.NewRequest("PUT", urls, body)
20567	if err != nil {
20568		return nil, err
20569	}
20570	req.Header = reqHeaders
20571	googleapi.Expand(req.URL, map[string]string{
20572		"profileId": strconv.FormatInt(c.profileId, 10),
20573	})
20574	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20575}
20576
20577// Do executes the "dfareporting.advertisers.update" call.
20578// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
20579// status code is an error. Response headers are in either
20580// *Advertiser.ServerResponse.Header or (if a response was returned at
20581// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20582// to check whether the returned error was because
20583// http.StatusNotModified was returned.
20584func (c *AdvertisersUpdateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20585	gensupport.SetOptions(c.urlParams_, opts...)
20586	res, err := c.doRequest("json")
20587	if res != nil && res.StatusCode == http.StatusNotModified {
20588		if res.Body != nil {
20589			res.Body.Close()
20590		}
20591		return nil, &googleapi.Error{
20592			Code:   res.StatusCode,
20593			Header: res.Header,
20594		}
20595	}
20596	if err != nil {
20597		return nil, err
20598	}
20599	defer googleapi.CloseBody(res)
20600	if err := googleapi.CheckResponse(res); err != nil {
20601		return nil, err
20602	}
20603	ret := &Advertiser{
20604		ServerResponse: googleapi.ServerResponse{
20605			Header:         res.Header,
20606			HTTPStatusCode: res.StatusCode,
20607		},
20608	}
20609	target := &ret
20610	if err := gensupport.DecodeResponse(target, res); err != nil {
20611		return nil, err
20612	}
20613	return ret, nil
20614	// {
20615	//   "description": "Updates an existing advertiser.",
20616	//   "httpMethod": "PUT",
20617	//   "id": "dfareporting.advertisers.update",
20618	//   "parameterOrder": [
20619	//     "profileId"
20620	//   ],
20621	//   "parameters": {
20622	//     "profileId": {
20623	//       "description": "User profile ID associated with this request.",
20624	//       "format": "int64",
20625	//       "location": "path",
20626	//       "required": true,
20627	//       "type": "string"
20628	//     }
20629	//   },
20630	//   "path": "userprofiles/{profileId}/advertisers",
20631	//   "request": {
20632	//     "$ref": "Advertiser"
20633	//   },
20634	//   "response": {
20635	//     "$ref": "Advertiser"
20636	//   },
20637	//   "scopes": [
20638	//     "https://www.googleapis.com/auth/dfatrafficking"
20639	//   ]
20640	// }
20641
20642}
20643
20644// method id "dfareporting.browsers.list":
20645
20646type BrowsersListCall struct {
20647	s            *Service
20648	profileId    int64
20649	urlParams_   gensupport.URLParams
20650	ifNoneMatch_ string
20651	ctx_         context.Context
20652	header_      http.Header
20653}
20654
20655// List: Retrieves a list of browsers.
20656func (r *BrowsersService) List(profileId int64) *BrowsersListCall {
20657	c := &BrowsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20658	c.profileId = profileId
20659	return c
20660}
20661
20662// Fields allows partial responses to be retrieved. See
20663// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20664// for more information.
20665func (c *BrowsersListCall) Fields(s ...googleapi.Field) *BrowsersListCall {
20666	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20667	return c
20668}
20669
20670// IfNoneMatch sets the optional parameter which makes the operation
20671// fail if the object's ETag matches the given value. This is useful for
20672// getting updates only after the object has changed since the last
20673// request. Use googleapi.IsNotModified to check whether the response
20674// error from Do is the result of In-None-Match.
20675func (c *BrowsersListCall) IfNoneMatch(entityTag string) *BrowsersListCall {
20676	c.ifNoneMatch_ = entityTag
20677	return c
20678}
20679
20680// Context sets the context to be used in this call's Do method. Any
20681// pending HTTP request will be aborted if the provided context is
20682// canceled.
20683func (c *BrowsersListCall) Context(ctx context.Context) *BrowsersListCall {
20684	c.ctx_ = ctx
20685	return c
20686}
20687
20688// Header returns an http.Header that can be modified by the caller to
20689// add HTTP headers to the request.
20690func (c *BrowsersListCall) Header() http.Header {
20691	if c.header_ == nil {
20692		c.header_ = make(http.Header)
20693	}
20694	return c.header_
20695}
20696
20697func (c *BrowsersListCall) doRequest(alt string) (*http.Response, error) {
20698	reqHeaders := make(http.Header)
20699	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
20700	for k, v := range c.header_ {
20701		reqHeaders[k] = v
20702	}
20703	reqHeaders.Set("User-Agent", c.s.userAgent())
20704	if c.ifNoneMatch_ != "" {
20705		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20706	}
20707	var body io.Reader = nil
20708	c.urlParams_.Set("alt", alt)
20709	c.urlParams_.Set("prettyPrint", "false")
20710	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/browsers")
20711	urls += "?" + c.urlParams_.Encode()
20712	req, err := http.NewRequest("GET", urls, body)
20713	if err != nil {
20714		return nil, err
20715	}
20716	req.Header = reqHeaders
20717	googleapi.Expand(req.URL, map[string]string{
20718		"profileId": strconv.FormatInt(c.profileId, 10),
20719	})
20720	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20721}
20722
20723// Do executes the "dfareporting.browsers.list" call.
20724// Exactly one of *BrowsersListResponse or error will be non-nil. Any
20725// non-2xx status code is an error. Response headers are in either
20726// *BrowsersListResponse.ServerResponse.Header or (if a response was
20727// returned at all) in error.(*googleapi.Error).Header. Use
20728// googleapi.IsNotModified to check whether the returned error was
20729// because http.StatusNotModified was returned.
20730func (c *BrowsersListCall) Do(opts ...googleapi.CallOption) (*BrowsersListResponse, error) {
20731	gensupport.SetOptions(c.urlParams_, opts...)
20732	res, err := c.doRequest("json")
20733	if res != nil && res.StatusCode == http.StatusNotModified {
20734		if res.Body != nil {
20735			res.Body.Close()
20736		}
20737		return nil, &googleapi.Error{
20738			Code:   res.StatusCode,
20739			Header: res.Header,
20740		}
20741	}
20742	if err != nil {
20743		return nil, err
20744	}
20745	defer googleapi.CloseBody(res)
20746	if err := googleapi.CheckResponse(res); err != nil {
20747		return nil, err
20748	}
20749	ret := &BrowsersListResponse{
20750		ServerResponse: googleapi.ServerResponse{
20751			Header:         res.Header,
20752			HTTPStatusCode: res.StatusCode,
20753		},
20754	}
20755	target := &ret
20756	if err := gensupport.DecodeResponse(target, res); err != nil {
20757		return nil, err
20758	}
20759	return ret, nil
20760	// {
20761	//   "description": "Retrieves a list of browsers.",
20762	//   "httpMethod": "GET",
20763	//   "id": "dfareporting.browsers.list",
20764	//   "parameterOrder": [
20765	//     "profileId"
20766	//   ],
20767	//   "parameters": {
20768	//     "profileId": {
20769	//       "description": "User profile ID associated with this request.",
20770	//       "format": "int64",
20771	//       "location": "path",
20772	//       "required": true,
20773	//       "type": "string"
20774	//     }
20775	//   },
20776	//   "path": "userprofiles/{profileId}/browsers",
20777	//   "response": {
20778	//     "$ref": "BrowsersListResponse"
20779	//   },
20780	//   "scopes": [
20781	//     "https://www.googleapis.com/auth/dfatrafficking"
20782	//   ]
20783	// }
20784
20785}
20786
20787// method id "dfareporting.campaignCreativeAssociations.insert":
20788
20789type CampaignCreativeAssociationsInsertCall struct {
20790	s                           *Service
20791	profileId                   int64
20792	campaignId                  int64
20793	campaigncreativeassociation *CampaignCreativeAssociation
20794	urlParams_                  gensupport.URLParams
20795	ctx_                        context.Context
20796	header_                     http.Header
20797}
20798
20799// Insert: Associates a creative with the specified campaign. This
20800// method creates a default ad with dimensions matching the creative in
20801// the campaign if such a default ad does not exist already.
20802func (r *CampaignCreativeAssociationsService) Insert(profileId int64, campaignId int64, campaigncreativeassociation *CampaignCreativeAssociation) *CampaignCreativeAssociationsInsertCall {
20803	c := &CampaignCreativeAssociationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20804	c.profileId = profileId
20805	c.campaignId = campaignId
20806	c.campaigncreativeassociation = campaigncreativeassociation
20807	return c
20808}
20809
20810// Fields allows partial responses to be retrieved. See
20811// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20812// for more information.
20813func (c *CampaignCreativeAssociationsInsertCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsInsertCall {
20814	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20815	return c
20816}
20817
20818// Context sets the context to be used in this call's Do method. Any
20819// pending HTTP request will be aborted if the provided context is
20820// canceled.
20821func (c *CampaignCreativeAssociationsInsertCall) Context(ctx context.Context) *CampaignCreativeAssociationsInsertCall {
20822	c.ctx_ = ctx
20823	return c
20824}
20825
20826// Header returns an http.Header that can be modified by the caller to
20827// add HTTP headers to the request.
20828func (c *CampaignCreativeAssociationsInsertCall) Header() http.Header {
20829	if c.header_ == nil {
20830		c.header_ = make(http.Header)
20831	}
20832	return c.header_
20833}
20834
20835func (c *CampaignCreativeAssociationsInsertCall) doRequest(alt string) (*http.Response, error) {
20836	reqHeaders := make(http.Header)
20837	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
20838	for k, v := range c.header_ {
20839		reqHeaders[k] = v
20840	}
20841	reqHeaders.Set("User-Agent", c.s.userAgent())
20842	var body io.Reader = nil
20843	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaigncreativeassociation)
20844	if err != nil {
20845		return nil, err
20846	}
20847	reqHeaders.Set("Content-Type", "application/json")
20848	c.urlParams_.Set("alt", alt)
20849	c.urlParams_.Set("prettyPrint", "false")
20850	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
20851	urls += "?" + c.urlParams_.Encode()
20852	req, err := http.NewRequest("POST", urls, body)
20853	if err != nil {
20854		return nil, err
20855	}
20856	req.Header = reqHeaders
20857	googleapi.Expand(req.URL, map[string]string{
20858		"profileId":  strconv.FormatInt(c.profileId, 10),
20859		"campaignId": strconv.FormatInt(c.campaignId, 10),
20860	})
20861	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20862}
20863
20864// Do executes the "dfareporting.campaignCreativeAssociations.insert" call.
20865// Exactly one of *CampaignCreativeAssociation or error will be non-nil.
20866// Any non-2xx status code is an error. Response headers are in either
20867// *CampaignCreativeAssociation.ServerResponse.Header or (if a response
20868// was returned at all) in error.(*googleapi.Error).Header. Use
20869// googleapi.IsNotModified to check whether the returned error was
20870// because http.StatusNotModified was returned.
20871func (c *CampaignCreativeAssociationsInsertCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociation, error) {
20872	gensupport.SetOptions(c.urlParams_, opts...)
20873	res, err := c.doRequest("json")
20874	if res != nil && res.StatusCode == http.StatusNotModified {
20875		if res.Body != nil {
20876			res.Body.Close()
20877		}
20878		return nil, &googleapi.Error{
20879			Code:   res.StatusCode,
20880			Header: res.Header,
20881		}
20882	}
20883	if err != nil {
20884		return nil, err
20885	}
20886	defer googleapi.CloseBody(res)
20887	if err := googleapi.CheckResponse(res); err != nil {
20888		return nil, err
20889	}
20890	ret := &CampaignCreativeAssociation{
20891		ServerResponse: googleapi.ServerResponse{
20892			Header:         res.Header,
20893			HTTPStatusCode: res.StatusCode,
20894		},
20895	}
20896	target := &ret
20897	if err := gensupport.DecodeResponse(target, res); err != nil {
20898		return nil, err
20899	}
20900	return ret, nil
20901	// {
20902	//   "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.",
20903	//   "httpMethod": "POST",
20904	//   "id": "dfareporting.campaignCreativeAssociations.insert",
20905	//   "parameterOrder": [
20906	//     "profileId",
20907	//     "campaignId"
20908	//   ],
20909	//   "parameters": {
20910	//     "campaignId": {
20911	//       "description": "Campaign ID in this association.",
20912	//       "format": "int64",
20913	//       "location": "path",
20914	//       "required": true,
20915	//       "type": "string"
20916	//     },
20917	//     "profileId": {
20918	//       "description": "User profile ID associated with this request.",
20919	//       "format": "int64",
20920	//       "location": "path",
20921	//       "required": true,
20922	//       "type": "string"
20923	//     }
20924	//   },
20925	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
20926	//   "request": {
20927	//     "$ref": "CampaignCreativeAssociation"
20928	//   },
20929	//   "response": {
20930	//     "$ref": "CampaignCreativeAssociation"
20931	//   },
20932	//   "scopes": [
20933	//     "https://www.googleapis.com/auth/dfatrafficking"
20934	//   ]
20935	// }
20936
20937}
20938
20939// method id "dfareporting.campaignCreativeAssociations.list":
20940
20941type CampaignCreativeAssociationsListCall struct {
20942	s            *Service
20943	profileId    int64
20944	campaignId   int64
20945	urlParams_   gensupport.URLParams
20946	ifNoneMatch_ string
20947	ctx_         context.Context
20948	header_      http.Header
20949}
20950
20951// List: Retrieves the list of creative IDs associated with the
20952// specified campaign. This method supports paging.
20953func (r *CampaignCreativeAssociationsService) List(profileId int64, campaignId int64) *CampaignCreativeAssociationsListCall {
20954	c := &CampaignCreativeAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20955	c.profileId = profileId
20956	c.campaignId = campaignId
20957	return c
20958}
20959
20960// MaxResults sets the optional parameter "maxResults": Maximum number
20961// of results to return.
20962func (c *CampaignCreativeAssociationsListCall) MaxResults(maxResults int64) *CampaignCreativeAssociationsListCall {
20963	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20964	return c
20965}
20966
20967// PageToken sets the optional parameter "pageToken": Value of the
20968// nextPageToken from the previous result page.
20969func (c *CampaignCreativeAssociationsListCall) PageToken(pageToken string) *CampaignCreativeAssociationsListCall {
20970	c.urlParams_.Set("pageToken", pageToken)
20971	return c
20972}
20973
20974// SortOrder sets the optional parameter "sortOrder": Order of sorted
20975// results.
20976//
20977// Possible values:
20978//   "ASCENDING" (default)
20979//   "DESCENDING"
20980func (c *CampaignCreativeAssociationsListCall) SortOrder(sortOrder string) *CampaignCreativeAssociationsListCall {
20981	c.urlParams_.Set("sortOrder", sortOrder)
20982	return c
20983}
20984
20985// Fields allows partial responses to be retrieved. See
20986// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20987// for more information.
20988func (c *CampaignCreativeAssociationsListCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsListCall {
20989	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20990	return c
20991}
20992
20993// IfNoneMatch sets the optional parameter which makes the operation
20994// fail if the object's ETag matches the given value. This is useful for
20995// getting updates only after the object has changed since the last
20996// request. Use googleapi.IsNotModified to check whether the response
20997// error from Do is the result of In-None-Match.
20998func (c *CampaignCreativeAssociationsListCall) IfNoneMatch(entityTag string) *CampaignCreativeAssociationsListCall {
20999	c.ifNoneMatch_ = entityTag
21000	return c
21001}
21002
21003// Context sets the context to be used in this call's Do method. Any
21004// pending HTTP request will be aborted if the provided context is
21005// canceled.
21006func (c *CampaignCreativeAssociationsListCall) Context(ctx context.Context) *CampaignCreativeAssociationsListCall {
21007	c.ctx_ = ctx
21008	return c
21009}
21010
21011// Header returns an http.Header that can be modified by the caller to
21012// add HTTP headers to the request.
21013func (c *CampaignCreativeAssociationsListCall) Header() http.Header {
21014	if c.header_ == nil {
21015		c.header_ = make(http.Header)
21016	}
21017	return c.header_
21018}
21019
21020func (c *CampaignCreativeAssociationsListCall) doRequest(alt string) (*http.Response, error) {
21021	reqHeaders := make(http.Header)
21022	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
21023	for k, v := range c.header_ {
21024		reqHeaders[k] = v
21025	}
21026	reqHeaders.Set("User-Agent", c.s.userAgent())
21027	if c.ifNoneMatch_ != "" {
21028		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21029	}
21030	var body io.Reader = nil
21031	c.urlParams_.Set("alt", alt)
21032	c.urlParams_.Set("prettyPrint", "false")
21033	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
21034	urls += "?" + c.urlParams_.Encode()
21035	req, err := http.NewRequest("GET", urls, body)
21036	if err != nil {
21037		return nil, err
21038	}
21039	req.Header = reqHeaders
21040	googleapi.Expand(req.URL, map[string]string{
21041		"profileId":  strconv.FormatInt(c.profileId, 10),
21042		"campaignId": strconv.FormatInt(c.campaignId, 10),
21043	})
21044	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21045}
21046
21047// Do executes the "dfareporting.campaignCreativeAssociations.list" call.
21048// Exactly one of *CampaignCreativeAssociationsListResponse or error
21049// will be non-nil. Any non-2xx status code is an error. Response
21050// headers are in either
21051// *CampaignCreativeAssociationsListResponse.ServerResponse.Header or
21052// (if a response was returned at all) in
21053// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21054// whether the returned error was because http.StatusNotModified was
21055// returned.
21056func (c *CampaignCreativeAssociationsListCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociationsListResponse, error) {
21057	gensupport.SetOptions(c.urlParams_, opts...)
21058	res, err := c.doRequest("json")
21059	if res != nil && res.StatusCode == http.StatusNotModified {
21060		if res.Body != nil {
21061			res.Body.Close()
21062		}
21063		return nil, &googleapi.Error{
21064			Code:   res.StatusCode,
21065			Header: res.Header,
21066		}
21067	}
21068	if err != nil {
21069		return nil, err
21070	}
21071	defer googleapi.CloseBody(res)
21072	if err := googleapi.CheckResponse(res); err != nil {
21073		return nil, err
21074	}
21075	ret := &CampaignCreativeAssociationsListResponse{
21076		ServerResponse: googleapi.ServerResponse{
21077			Header:         res.Header,
21078			HTTPStatusCode: res.StatusCode,
21079		},
21080	}
21081	target := &ret
21082	if err := gensupport.DecodeResponse(target, res); err != nil {
21083		return nil, err
21084	}
21085	return ret, nil
21086	// {
21087	//   "description": "Retrieves the list of creative IDs associated with the specified campaign. This method supports paging.",
21088	//   "httpMethod": "GET",
21089	//   "id": "dfareporting.campaignCreativeAssociations.list",
21090	//   "parameterOrder": [
21091	//     "profileId",
21092	//     "campaignId"
21093	//   ],
21094	//   "parameters": {
21095	//     "campaignId": {
21096	//       "description": "Campaign ID in this association.",
21097	//       "format": "int64",
21098	//       "location": "path",
21099	//       "required": true,
21100	//       "type": "string"
21101	//     },
21102	//     "maxResults": {
21103	//       "default": "1000",
21104	//       "description": "Maximum number of results to return.",
21105	//       "format": "int32",
21106	//       "location": "query",
21107	//       "maximum": "1000",
21108	//       "minimum": "0",
21109	//       "type": "integer"
21110	//     },
21111	//     "pageToken": {
21112	//       "description": "Value of the nextPageToken from the previous result page.",
21113	//       "location": "query",
21114	//       "type": "string"
21115	//     },
21116	//     "profileId": {
21117	//       "description": "User profile ID associated with this request.",
21118	//       "format": "int64",
21119	//       "location": "path",
21120	//       "required": true,
21121	//       "type": "string"
21122	//     },
21123	//     "sortOrder": {
21124	//       "default": "ASCENDING",
21125	//       "description": "Order of sorted results.",
21126	//       "enum": [
21127	//         "ASCENDING",
21128	//         "DESCENDING"
21129	//       ],
21130	//       "enumDescriptions": [
21131	//         "",
21132	//         ""
21133	//       ],
21134	//       "location": "query",
21135	//       "type": "string"
21136	//     }
21137	//   },
21138	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
21139	//   "response": {
21140	//     "$ref": "CampaignCreativeAssociationsListResponse"
21141	//   },
21142	//   "scopes": [
21143	//     "https://www.googleapis.com/auth/dfatrafficking"
21144	//   ]
21145	// }
21146
21147}
21148
21149// Pages invokes f for each page of results.
21150// A non-nil error returned from f will halt the iteration.
21151// The provided context supersedes any context provided to the Context method.
21152func (c *CampaignCreativeAssociationsListCall) Pages(ctx context.Context, f func(*CampaignCreativeAssociationsListResponse) error) error {
21153	c.ctx_ = ctx
21154	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21155	for {
21156		x, err := c.Do()
21157		if err != nil {
21158			return err
21159		}
21160		if err := f(x); err != nil {
21161			return err
21162		}
21163		if x.NextPageToken == "" {
21164			return nil
21165		}
21166		c.PageToken(x.NextPageToken)
21167	}
21168}
21169
21170// method id "dfareporting.campaigns.get":
21171
21172type CampaignsGetCall struct {
21173	s            *Service
21174	profileId    int64
21175	id           int64
21176	urlParams_   gensupport.URLParams
21177	ifNoneMatch_ string
21178	ctx_         context.Context
21179	header_      http.Header
21180}
21181
21182// Get: Gets one campaign by ID.
21183func (r *CampaignsService) Get(profileId int64, id int64) *CampaignsGetCall {
21184	c := &CampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21185	c.profileId = profileId
21186	c.id = id
21187	return c
21188}
21189
21190// Fields allows partial responses to be retrieved. See
21191// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21192// for more information.
21193func (c *CampaignsGetCall) Fields(s ...googleapi.Field) *CampaignsGetCall {
21194	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21195	return c
21196}
21197
21198// IfNoneMatch sets the optional parameter which makes the operation
21199// fail if the object's ETag matches the given value. This is useful for
21200// getting updates only after the object has changed since the last
21201// request. Use googleapi.IsNotModified to check whether the response
21202// error from Do is the result of In-None-Match.
21203func (c *CampaignsGetCall) IfNoneMatch(entityTag string) *CampaignsGetCall {
21204	c.ifNoneMatch_ = entityTag
21205	return c
21206}
21207
21208// Context sets the context to be used in this call's Do method. Any
21209// pending HTTP request will be aborted if the provided context is
21210// canceled.
21211func (c *CampaignsGetCall) Context(ctx context.Context) *CampaignsGetCall {
21212	c.ctx_ = ctx
21213	return c
21214}
21215
21216// Header returns an http.Header that can be modified by the caller to
21217// add HTTP headers to the request.
21218func (c *CampaignsGetCall) Header() http.Header {
21219	if c.header_ == nil {
21220		c.header_ = make(http.Header)
21221	}
21222	return c.header_
21223}
21224
21225func (c *CampaignsGetCall) doRequest(alt string) (*http.Response, error) {
21226	reqHeaders := make(http.Header)
21227	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
21228	for k, v := range c.header_ {
21229		reqHeaders[k] = v
21230	}
21231	reqHeaders.Set("User-Agent", c.s.userAgent())
21232	if c.ifNoneMatch_ != "" {
21233		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21234	}
21235	var body io.Reader = nil
21236	c.urlParams_.Set("alt", alt)
21237	c.urlParams_.Set("prettyPrint", "false")
21238	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{id}")
21239	urls += "?" + c.urlParams_.Encode()
21240	req, err := http.NewRequest("GET", urls, body)
21241	if err != nil {
21242		return nil, err
21243	}
21244	req.Header = reqHeaders
21245	googleapi.Expand(req.URL, map[string]string{
21246		"profileId": strconv.FormatInt(c.profileId, 10),
21247		"id":        strconv.FormatInt(c.id, 10),
21248	})
21249	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21250}
21251
21252// Do executes the "dfareporting.campaigns.get" call.
21253// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21254// code is an error. Response headers are in either
21255// *Campaign.ServerResponse.Header or (if a response was returned at
21256// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21257// to check whether the returned error was because
21258// http.StatusNotModified was returned.
21259func (c *CampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21260	gensupport.SetOptions(c.urlParams_, opts...)
21261	res, err := c.doRequest("json")
21262	if res != nil && res.StatusCode == http.StatusNotModified {
21263		if res.Body != nil {
21264			res.Body.Close()
21265		}
21266		return nil, &googleapi.Error{
21267			Code:   res.StatusCode,
21268			Header: res.Header,
21269		}
21270	}
21271	if err != nil {
21272		return nil, err
21273	}
21274	defer googleapi.CloseBody(res)
21275	if err := googleapi.CheckResponse(res); err != nil {
21276		return nil, err
21277	}
21278	ret := &Campaign{
21279		ServerResponse: googleapi.ServerResponse{
21280			Header:         res.Header,
21281			HTTPStatusCode: res.StatusCode,
21282		},
21283	}
21284	target := &ret
21285	if err := gensupport.DecodeResponse(target, res); err != nil {
21286		return nil, err
21287	}
21288	return ret, nil
21289	// {
21290	//   "description": "Gets one campaign by ID.",
21291	//   "httpMethod": "GET",
21292	//   "id": "dfareporting.campaigns.get",
21293	//   "parameterOrder": [
21294	//     "profileId",
21295	//     "id"
21296	//   ],
21297	//   "parameters": {
21298	//     "id": {
21299	//       "description": "Campaign ID.",
21300	//       "format": "int64",
21301	//       "location": "path",
21302	//       "required": true,
21303	//       "type": "string"
21304	//     },
21305	//     "profileId": {
21306	//       "description": "User profile ID associated with this request.",
21307	//       "format": "int64",
21308	//       "location": "path",
21309	//       "required": true,
21310	//       "type": "string"
21311	//     }
21312	//   },
21313	//   "path": "userprofiles/{profileId}/campaigns/{id}",
21314	//   "response": {
21315	//     "$ref": "Campaign"
21316	//   },
21317	//   "scopes": [
21318	//     "https://www.googleapis.com/auth/dfatrafficking"
21319	//   ]
21320	// }
21321
21322}
21323
21324// method id "dfareporting.campaigns.insert":
21325
21326type CampaignsInsertCall struct {
21327	s          *Service
21328	profileId  int64
21329	campaign   *Campaign
21330	urlParams_ gensupport.URLParams
21331	ctx_       context.Context
21332	header_    http.Header
21333}
21334
21335// Insert: Inserts a new campaign.
21336func (r *CampaignsService) Insert(profileId int64, campaign *Campaign) *CampaignsInsertCall {
21337	c := &CampaignsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21338	c.profileId = profileId
21339	c.campaign = campaign
21340	return c
21341}
21342
21343// Fields allows partial responses to be retrieved. See
21344// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21345// for more information.
21346func (c *CampaignsInsertCall) Fields(s ...googleapi.Field) *CampaignsInsertCall {
21347	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21348	return c
21349}
21350
21351// Context sets the context to be used in this call's Do method. Any
21352// pending HTTP request will be aborted if the provided context is
21353// canceled.
21354func (c *CampaignsInsertCall) Context(ctx context.Context) *CampaignsInsertCall {
21355	c.ctx_ = ctx
21356	return c
21357}
21358
21359// Header returns an http.Header that can be modified by the caller to
21360// add HTTP headers to the request.
21361func (c *CampaignsInsertCall) Header() http.Header {
21362	if c.header_ == nil {
21363		c.header_ = make(http.Header)
21364	}
21365	return c.header_
21366}
21367
21368func (c *CampaignsInsertCall) doRequest(alt string) (*http.Response, error) {
21369	reqHeaders := make(http.Header)
21370	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
21371	for k, v := range c.header_ {
21372		reqHeaders[k] = v
21373	}
21374	reqHeaders.Set("User-Agent", c.s.userAgent())
21375	var body io.Reader = nil
21376	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21377	if err != nil {
21378		return nil, err
21379	}
21380	reqHeaders.Set("Content-Type", "application/json")
21381	c.urlParams_.Set("alt", alt)
21382	c.urlParams_.Set("prettyPrint", "false")
21383	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21384	urls += "?" + c.urlParams_.Encode()
21385	req, err := http.NewRequest("POST", urls, body)
21386	if err != nil {
21387		return nil, err
21388	}
21389	req.Header = reqHeaders
21390	googleapi.Expand(req.URL, map[string]string{
21391		"profileId": strconv.FormatInt(c.profileId, 10),
21392	})
21393	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21394}
21395
21396// Do executes the "dfareporting.campaigns.insert" call.
21397// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21398// code is an error. Response headers are in either
21399// *Campaign.ServerResponse.Header or (if a response was returned at
21400// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21401// to check whether the returned error was because
21402// http.StatusNotModified was returned.
21403func (c *CampaignsInsertCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21404	gensupport.SetOptions(c.urlParams_, opts...)
21405	res, err := c.doRequest("json")
21406	if res != nil && res.StatusCode == http.StatusNotModified {
21407		if res.Body != nil {
21408			res.Body.Close()
21409		}
21410		return nil, &googleapi.Error{
21411			Code:   res.StatusCode,
21412			Header: res.Header,
21413		}
21414	}
21415	if err != nil {
21416		return nil, err
21417	}
21418	defer googleapi.CloseBody(res)
21419	if err := googleapi.CheckResponse(res); err != nil {
21420		return nil, err
21421	}
21422	ret := &Campaign{
21423		ServerResponse: googleapi.ServerResponse{
21424			Header:         res.Header,
21425			HTTPStatusCode: res.StatusCode,
21426		},
21427	}
21428	target := &ret
21429	if err := gensupport.DecodeResponse(target, res); err != nil {
21430		return nil, err
21431	}
21432	return ret, nil
21433	// {
21434	//   "description": "Inserts a new campaign.",
21435	//   "httpMethod": "POST",
21436	//   "id": "dfareporting.campaigns.insert",
21437	//   "parameterOrder": [
21438	//     "profileId"
21439	//   ],
21440	//   "parameters": {
21441	//     "profileId": {
21442	//       "description": "User profile ID associated with this request.",
21443	//       "format": "int64",
21444	//       "location": "path",
21445	//       "required": true,
21446	//       "type": "string"
21447	//     }
21448	//   },
21449	//   "path": "userprofiles/{profileId}/campaigns",
21450	//   "request": {
21451	//     "$ref": "Campaign"
21452	//   },
21453	//   "response": {
21454	//     "$ref": "Campaign"
21455	//   },
21456	//   "scopes": [
21457	//     "https://www.googleapis.com/auth/dfatrafficking"
21458	//   ]
21459	// }
21460
21461}
21462
21463// method id "dfareporting.campaigns.list":
21464
21465type CampaignsListCall struct {
21466	s            *Service
21467	profileId    int64
21468	urlParams_   gensupport.URLParams
21469	ifNoneMatch_ string
21470	ctx_         context.Context
21471	header_      http.Header
21472}
21473
21474// List: Retrieves a list of campaigns, possibly filtered. This method
21475// supports paging.
21476func (r *CampaignsService) List(profileId int64) *CampaignsListCall {
21477	c := &CampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21478	c.profileId = profileId
21479	return c
21480}
21481
21482// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
21483// Select only campaigns whose advertisers belong to these advertiser
21484// groups.
21485func (c *CampaignsListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *CampaignsListCall {
21486	var advertiserGroupIds_ []string
21487	for _, v := range advertiserGroupIds {
21488		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
21489	}
21490	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
21491	return c
21492}
21493
21494// AdvertiserIds sets the optional parameter "advertiserIds": Select
21495// only campaigns that belong to these advertisers.
21496func (c *CampaignsListCall) AdvertiserIds(advertiserIds ...int64) *CampaignsListCall {
21497	var advertiserIds_ []string
21498	for _, v := range advertiserIds {
21499		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
21500	}
21501	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
21502	return c
21503}
21504
21505// Archived sets the optional parameter "archived": Select only archived
21506// campaigns. Don't set this field to select both archived and
21507// non-archived campaigns.
21508func (c *CampaignsListCall) Archived(archived bool) *CampaignsListCall {
21509	c.urlParams_.Set("archived", fmt.Sprint(archived))
21510	return c
21511}
21512
21513// AtLeastOneOptimizationActivity sets the optional parameter
21514// "atLeastOneOptimizationActivity": Select only campaigns that have at
21515// least one optimization activity.
21516func (c *CampaignsListCall) AtLeastOneOptimizationActivity(atLeastOneOptimizationActivity bool) *CampaignsListCall {
21517	c.urlParams_.Set("atLeastOneOptimizationActivity", fmt.Sprint(atLeastOneOptimizationActivity))
21518	return c
21519}
21520
21521// ExcludedIds sets the optional parameter "excludedIds": Exclude
21522// campaigns with these IDs.
21523func (c *CampaignsListCall) ExcludedIds(excludedIds ...int64) *CampaignsListCall {
21524	var excludedIds_ []string
21525	for _, v := range excludedIds {
21526		excludedIds_ = append(excludedIds_, fmt.Sprint(v))
21527	}
21528	c.urlParams_.SetMulti("excludedIds", excludedIds_)
21529	return c
21530}
21531
21532// Ids sets the optional parameter "ids": Select only campaigns with
21533// these IDs.
21534func (c *CampaignsListCall) Ids(ids ...int64) *CampaignsListCall {
21535	var ids_ []string
21536	for _, v := range ids {
21537		ids_ = append(ids_, fmt.Sprint(v))
21538	}
21539	c.urlParams_.SetMulti("ids", ids_)
21540	return c
21541}
21542
21543// MaxResults sets the optional parameter "maxResults": Maximum number
21544// of results to return.
21545func (c *CampaignsListCall) MaxResults(maxResults int64) *CampaignsListCall {
21546	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21547	return c
21548}
21549
21550// OverriddenEventTagId sets the optional parameter
21551// "overriddenEventTagId": Select only campaigns that have overridden
21552// this event tag ID.
21553func (c *CampaignsListCall) OverriddenEventTagId(overriddenEventTagId int64) *CampaignsListCall {
21554	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
21555	return c
21556}
21557
21558// PageToken sets the optional parameter "pageToken": Value of the
21559// nextPageToken from the previous result page.
21560func (c *CampaignsListCall) PageToken(pageToken string) *CampaignsListCall {
21561	c.urlParams_.Set("pageToken", pageToken)
21562	return c
21563}
21564
21565// SearchString sets the optional parameter "searchString": Allows
21566// searching for campaigns by name or ID. Wildcards (*) are allowed. For
21567// example, "campaign*2015" will return campaigns with names like
21568// "campaign June 2015", "campaign April 2015", or simply "campaign
21569// 2015". Most of the searches also add wildcards implicitly at the
21570// start and the end of the search string. For example, a search string
21571// of "campaign" will match campaigns with name "my campaign", "campaign
21572// 2015", or simply "campaign".
21573func (c *CampaignsListCall) SearchString(searchString string) *CampaignsListCall {
21574	c.urlParams_.Set("searchString", searchString)
21575	return c
21576}
21577
21578// SortField sets the optional parameter "sortField": Field by which to
21579// sort the list.
21580//
21581// Possible values:
21582//   "ID" (default)
21583//   "NAME"
21584func (c *CampaignsListCall) SortField(sortField string) *CampaignsListCall {
21585	c.urlParams_.Set("sortField", sortField)
21586	return c
21587}
21588
21589// SortOrder sets the optional parameter "sortOrder": Order of sorted
21590// results.
21591//
21592// Possible values:
21593//   "ASCENDING" (default)
21594//   "DESCENDING"
21595func (c *CampaignsListCall) SortOrder(sortOrder string) *CampaignsListCall {
21596	c.urlParams_.Set("sortOrder", sortOrder)
21597	return c
21598}
21599
21600// SubaccountId sets the optional parameter "subaccountId": Select only
21601// campaigns that belong to this subaccount.
21602func (c *CampaignsListCall) SubaccountId(subaccountId int64) *CampaignsListCall {
21603	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
21604	return c
21605}
21606
21607// Fields allows partial responses to be retrieved. See
21608// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21609// for more information.
21610func (c *CampaignsListCall) Fields(s ...googleapi.Field) *CampaignsListCall {
21611	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21612	return c
21613}
21614
21615// IfNoneMatch sets the optional parameter which makes the operation
21616// fail if the object's ETag matches the given value. This is useful for
21617// getting updates only after the object has changed since the last
21618// request. Use googleapi.IsNotModified to check whether the response
21619// error from Do is the result of In-None-Match.
21620func (c *CampaignsListCall) IfNoneMatch(entityTag string) *CampaignsListCall {
21621	c.ifNoneMatch_ = entityTag
21622	return c
21623}
21624
21625// Context sets the context to be used in this call's Do method. Any
21626// pending HTTP request will be aborted if the provided context is
21627// canceled.
21628func (c *CampaignsListCall) Context(ctx context.Context) *CampaignsListCall {
21629	c.ctx_ = ctx
21630	return c
21631}
21632
21633// Header returns an http.Header that can be modified by the caller to
21634// add HTTP headers to the request.
21635func (c *CampaignsListCall) Header() http.Header {
21636	if c.header_ == nil {
21637		c.header_ = make(http.Header)
21638	}
21639	return c.header_
21640}
21641
21642func (c *CampaignsListCall) doRequest(alt string) (*http.Response, error) {
21643	reqHeaders := make(http.Header)
21644	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
21645	for k, v := range c.header_ {
21646		reqHeaders[k] = v
21647	}
21648	reqHeaders.Set("User-Agent", c.s.userAgent())
21649	if c.ifNoneMatch_ != "" {
21650		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21651	}
21652	var body io.Reader = nil
21653	c.urlParams_.Set("alt", alt)
21654	c.urlParams_.Set("prettyPrint", "false")
21655	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21656	urls += "?" + c.urlParams_.Encode()
21657	req, err := http.NewRequest("GET", urls, body)
21658	if err != nil {
21659		return nil, err
21660	}
21661	req.Header = reqHeaders
21662	googleapi.Expand(req.URL, map[string]string{
21663		"profileId": strconv.FormatInt(c.profileId, 10),
21664	})
21665	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21666}
21667
21668// Do executes the "dfareporting.campaigns.list" call.
21669// Exactly one of *CampaignsListResponse or error will be non-nil. Any
21670// non-2xx status code is an error. Response headers are in either
21671// *CampaignsListResponse.ServerResponse.Header or (if a response was
21672// returned at all) in error.(*googleapi.Error).Header. Use
21673// googleapi.IsNotModified to check whether the returned error was
21674// because http.StatusNotModified was returned.
21675func (c *CampaignsListCall) Do(opts ...googleapi.CallOption) (*CampaignsListResponse, error) {
21676	gensupport.SetOptions(c.urlParams_, opts...)
21677	res, err := c.doRequest("json")
21678	if res != nil && res.StatusCode == http.StatusNotModified {
21679		if res.Body != nil {
21680			res.Body.Close()
21681		}
21682		return nil, &googleapi.Error{
21683			Code:   res.StatusCode,
21684			Header: res.Header,
21685		}
21686	}
21687	if err != nil {
21688		return nil, err
21689	}
21690	defer googleapi.CloseBody(res)
21691	if err := googleapi.CheckResponse(res); err != nil {
21692		return nil, err
21693	}
21694	ret := &CampaignsListResponse{
21695		ServerResponse: googleapi.ServerResponse{
21696			Header:         res.Header,
21697			HTTPStatusCode: res.StatusCode,
21698		},
21699	}
21700	target := &ret
21701	if err := gensupport.DecodeResponse(target, res); err != nil {
21702		return nil, err
21703	}
21704	return ret, nil
21705	// {
21706	//   "description": "Retrieves a list of campaigns, possibly filtered. This method supports paging.",
21707	//   "httpMethod": "GET",
21708	//   "id": "dfareporting.campaigns.list",
21709	//   "parameterOrder": [
21710	//     "profileId"
21711	//   ],
21712	//   "parameters": {
21713	//     "advertiserGroupIds": {
21714	//       "description": "Select only campaigns whose advertisers belong to these advertiser groups.",
21715	//       "format": "int64",
21716	//       "location": "query",
21717	//       "repeated": true,
21718	//       "type": "string"
21719	//     },
21720	//     "advertiserIds": {
21721	//       "description": "Select only campaigns that belong to these advertisers.",
21722	//       "format": "int64",
21723	//       "location": "query",
21724	//       "repeated": true,
21725	//       "type": "string"
21726	//     },
21727	//     "archived": {
21728	//       "description": "Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns.",
21729	//       "location": "query",
21730	//       "type": "boolean"
21731	//     },
21732	//     "atLeastOneOptimizationActivity": {
21733	//       "description": "Select only campaigns that have at least one optimization activity.",
21734	//       "location": "query",
21735	//       "type": "boolean"
21736	//     },
21737	//     "excludedIds": {
21738	//       "description": "Exclude campaigns with these IDs.",
21739	//       "format": "int64",
21740	//       "location": "query",
21741	//       "repeated": true,
21742	//       "type": "string"
21743	//     },
21744	//     "ids": {
21745	//       "description": "Select only campaigns with these IDs.",
21746	//       "format": "int64",
21747	//       "location": "query",
21748	//       "repeated": true,
21749	//       "type": "string"
21750	//     },
21751	//     "maxResults": {
21752	//       "default": "1000",
21753	//       "description": "Maximum number of results to return.",
21754	//       "format": "int32",
21755	//       "location": "query",
21756	//       "maximum": "1000",
21757	//       "minimum": "0",
21758	//       "type": "integer"
21759	//     },
21760	//     "overriddenEventTagId": {
21761	//       "description": "Select only campaigns that have overridden this event tag ID.",
21762	//       "format": "int64",
21763	//       "location": "query",
21764	//       "type": "string"
21765	//     },
21766	//     "pageToken": {
21767	//       "description": "Value of the nextPageToken from the previous result page.",
21768	//       "location": "query",
21769	//       "type": "string"
21770	//     },
21771	//     "profileId": {
21772	//       "description": "User profile ID associated with this request.",
21773	//       "format": "int64",
21774	//       "location": "path",
21775	//       "required": true,
21776	//       "type": "string"
21777	//     },
21778	//     "searchString": {
21779	//       "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\".",
21780	//       "location": "query",
21781	//       "type": "string"
21782	//     },
21783	//     "sortField": {
21784	//       "default": "ID",
21785	//       "description": "Field by which to sort the list.",
21786	//       "enum": [
21787	//         "ID",
21788	//         "NAME"
21789	//       ],
21790	//       "enumDescriptions": [
21791	//         "",
21792	//         ""
21793	//       ],
21794	//       "location": "query",
21795	//       "type": "string"
21796	//     },
21797	//     "sortOrder": {
21798	//       "default": "ASCENDING",
21799	//       "description": "Order of sorted results.",
21800	//       "enum": [
21801	//         "ASCENDING",
21802	//         "DESCENDING"
21803	//       ],
21804	//       "enumDescriptions": [
21805	//         "",
21806	//         ""
21807	//       ],
21808	//       "location": "query",
21809	//       "type": "string"
21810	//     },
21811	//     "subaccountId": {
21812	//       "description": "Select only campaigns that belong to this subaccount.",
21813	//       "format": "int64",
21814	//       "location": "query",
21815	//       "type": "string"
21816	//     }
21817	//   },
21818	//   "path": "userprofiles/{profileId}/campaigns",
21819	//   "response": {
21820	//     "$ref": "CampaignsListResponse"
21821	//   },
21822	//   "scopes": [
21823	//     "https://www.googleapis.com/auth/dfatrafficking"
21824	//   ]
21825	// }
21826
21827}
21828
21829// Pages invokes f for each page of results.
21830// A non-nil error returned from f will halt the iteration.
21831// The provided context supersedes any context provided to the Context method.
21832func (c *CampaignsListCall) Pages(ctx context.Context, f func(*CampaignsListResponse) error) error {
21833	c.ctx_ = ctx
21834	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21835	for {
21836		x, err := c.Do()
21837		if err != nil {
21838			return err
21839		}
21840		if err := f(x); err != nil {
21841			return err
21842		}
21843		if x.NextPageToken == "" {
21844			return nil
21845		}
21846		c.PageToken(x.NextPageToken)
21847	}
21848}
21849
21850// method id "dfareporting.campaigns.patch":
21851
21852type CampaignsPatchCall struct {
21853	s          *Service
21854	profileId  int64
21855	campaign   *Campaign
21856	urlParams_ gensupport.URLParams
21857	ctx_       context.Context
21858	header_    http.Header
21859}
21860
21861// Patch: Updates an existing campaign. This method supports patch
21862// semantics.
21863func (r *CampaignsService) Patch(profileId int64, id int64, campaign *Campaign) *CampaignsPatchCall {
21864	c := &CampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21865	c.profileId = profileId
21866	c.urlParams_.Set("id", fmt.Sprint(id))
21867	c.campaign = campaign
21868	return c
21869}
21870
21871// Fields allows partial responses to be retrieved. See
21872// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21873// for more information.
21874func (c *CampaignsPatchCall) Fields(s ...googleapi.Field) *CampaignsPatchCall {
21875	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21876	return c
21877}
21878
21879// Context sets the context to be used in this call's Do method. Any
21880// pending HTTP request will be aborted if the provided context is
21881// canceled.
21882func (c *CampaignsPatchCall) Context(ctx context.Context) *CampaignsPatchCall {
21883	c.ctx_ = ctx
21884	return c
21885}
21886
21887// Header returns an http.Header that can be modified by the caller to
21888// add HTTP headers to the request.
21889func (c *CampaignsPatchCall) Header() http.Header {
21890	if c.header_ == nil {
21891		c.header_ = make(http.Header)
21892	}
21893	return c.header_
21894}
21895
21896func (c *CampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
21897	reqHeaders := make(http.Header)
21898	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
21899	for k, v := range c.header_ {
21900		reqHeaders[k] = v
21901	}
21902	reqHeaders.Set("User-Agent", c.s.userAgent())
21903	var body io.Reader = nil
21904	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21905	if err != nil {
21906		return nil, err
21907	}
21908	reqHeaders.Set("Content-Type", "application/json")
21909	c.urlParams_.Set("alt", alt)
21910	c.urlParams_.Set("prettyPrint", "false")
21911	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21912	urls += "?" + c.urlParams_.Encode()
21913	req, err := http.NewRequest("PATCH", urls, body)
21914	if err != nil {
21915		return nil, err
21916	}
21917	req.Header = reqHeaders
21918	googleapi.Expand(req.URL, map[string]string{
21919		"profileId": strconv.FormatInt(c.profileId, 10),
21920	})
21921	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21922}
21923
21924// Do executes the "dfareporting.campaigns.patch" call.
21925// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21926// code is an error. Response headers are in either
21927// *Campaign.ServerResponse.Header or (if a response was returned at
21928// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21929// to check whether the returned error was because
21930// http.StatusNotModified was returned.
21931func (c *CampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21932	gensupport.SetOptions(c.urlParams_, opts...)
21933	res, err := c.doRequest("json")
21934	if res != nil && res.StatusCode == http.StatusNotModified {
21935		if res.Body != nil {
21936			res.Body.Close()
21937		}
21938		return nil, &googleapi.Error{
21939			Code:   res.StatusCode,
21940			Header: res.Header,
21941		}
21942	}
21943	if err != nil {
21944		return nil, err
21945	}
21946	defer googleapi.CloseBody(res)
21947	if err := googleapi.CheckResponse(res); err != nil {
21948		return nil, err
21949	}
21950	ret := &Campaign{
21951		ServerResponse: googleapi.ServerResponse{
21952			Header:         res.Header,
21953			HTTPStatusCode: res.StatusCode,
21954		},
21955	}
21956	target := &ret
21957	if err := gensupport.DecodeResponse(target, res); err != nil {
21958		return nil, err
21959	}
21960	return ret, nil
21961	// {
21962	//   "description": "Updates an existing campaign. This method supports patch semantics.",
21963	//   "httpMethod": "PATCH",
21964	//   "id": "dfareporting.campaigns.patch",
21965	//   "parameterOrder": [
21966	//     "profileId",
21967	//     "id"
21968	//   ],
21969	//   "parameters": {
21970	//     "id": {
21971	//       "description": "Campaign ID.",
21972	//       "format": "int64",
21973	//       "location": "query",
21974	//       "required": true,
21975	//       "type": "string"
21976	//     },
21977	//     "profileId": {
21978	//       "description": "User profile ID associated with this request.",
21979	//       "format": "int64",
21980	//       "location": "path",
21981	//       "required": true,
21982	//       "type": "string"
21983	//     }
21984	//   },
21985	//   "path": "userprofiles/{profileId}/campaigns",
21986	//   "request": {
21987	//     "$ref": "Campaign"
21988	//   },
21989	//   "response": {
21990	//     "$ref": "Campaign"
21991	//   },
21992	//   "scopes": [
21993	//     "https://www.googleapis.com/auth/dfatrafficking"
21994	//   ]
21995	// }
21996
21997}
21998
21999// method id "dfareporting.campaigns.update":
22000
22001type CampaignsUpdateCall struct {
22002	s          *Service
22003	profileId  int64
22004	campaign   *Campaign
22005	urlParams_ gensupport.URLParams
22006	ctx_       context.Context
22007	header_    http.Header
22008}
22009
22010// Update: Updates an existing campaign.
22011func (r *CampaignsService) Update(profileId int64, campaign *Campaign) *CampaignsUpdateCall {
22012	c := &CampaignsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22013	c.profileId = profileId
22014	c.campaign = campaign
22015	return c
22016}
22017
22018// Fields allows partial responses to be retrieved. See
22019// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22020// for more information.
22021func (c *CampaignsUpdateCall) Fields(s ...googleapi.Field) *CampaignsUpdateCall {
22022	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22023	return c
22024}
22025
22026// Context sets the context to be used in this call's Do method. Any
22027// pending HTTP request will be aborted if the provided context is
22028// canceled.
22029func (c *CampaignsUpdateCall) Context(ctx context.Context) *CampaignsUpdateCall {
22030	c.ctx_ = ctx
22031	return c
22032}
22033
22034// Header returns an http.Header that can be modified by the caller to
22035// add HTTP headers to the request.
22036func (c *CampaignsUpdateCall) Header() http.Header {
22037	if c.header_ == nil {
22038		c.header_ = make(http.Header)
22039	}
22040	return c.header_
22041}
22042
22043func (c *CampaignsUpdateCall) doRequest(alt string) (*http.Response, error) {
22044	reqHeaders := make(http.Header)
22045	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
22046	for k, v := range c.header_ {
22047		reqHeaders[k] = v
22048	}
22049	reqHeaders.Set("User-Agent", c.s.userAgent())
22050	var body io.Reader = nil
22051	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
22052	if err != nil {
22053		return nil, err
22054	}
22055	reqHeaders.Set("Content-Type", "application/json")
22056	c.urlParams_.Set("alt", alt)
22057	c.urlParams_.Set("prettyPrint", "false")
22058	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
22059	urls += "?" + c.urlParams_.Encode()
22060	req, err := http.NewRequest("PUT", urls, body)
22061	if err != nil {
22062		return nil, err
22063	}
22064	req.Header = reqHeaders
22065	googleapi.Expand(req.URL, map[string]string{
22066		"profileId": strconv.FormatInt(c.profileId, 10),
22067	})
22068	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22069}
22070
22071// Do executes the "dfareporting.campaigns.update" call.
22072// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
22073// code is an error. Response headers are in either
22074// *Campaign.ServerResponse.Header or (if a response was returned at
22075// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22076// to check whether the returned error was because
22077// http.StatusNotModified was returned.
22078func (c *CampaignsUpdateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
22079	gensupport.SetOptions(c.urlParams_, opts...)
22080	res, err := c.doRequest("json")
22081	if res != nil && res.StatusCode == http.StatusNotModified {
22082		if res.Body != nil {
22083			res.Body.Close()
22084		}
22085		return nil, &googleapi.Error{
22086			Code:   res.StatusCode,
22087			Header: res.Header,
22088		}
22089	}
22090	if err != nil {
22091		return nil, err
22092	}
22093	defer googleapi.CloseBody(res)
22094	if err := googleapi.CheckResponse(res); err != nil {
22095		return nil, err
22096	}
22097	ret := &Campaign{
22098		ServerResponse: googleapi.ServerResponse{
22099			Header:         res.Header,
22100			HTTPStatusCode: res.StatusCode,
22101		},
22102	}
22103	target := &ret
22104	if err := gensupport.DecodeResponse(target, res); err != nil {
22105		return nil, err
22106	}
22107	return ret, nil
22108	// {
22109	//   "description": "Updates an existing campaign.",
22110	//   "httpMethod": "PUT",
22111	//   "id": "dfareporting.campaigns.update",
22112	//   "parameterOrder": [
22113	//     "profileId"
22114	//   ],
22115	//   "parameters": {
22116	//     "profileId": {
22117	//       "description": "User profile ID associated with this request.",
22118	//       "format": "int64",
22119	//       "location": "path",
22120	//       "required": true,
22121	//       "type": "string"
22122	//     }
22123	//   },
22124	//   "path": "userprofiles/{profileId}/campaigns",
22125	//   "request": {
22126	//     "$ref": "Campaign"
22127	//   },
22128	//   "response": {
22129	//     "$ref": "Campaign"
22130	//   },
22131	//   "scopes": [
22132	//     "https://www.googleapis.com/auth/dfatrafficking"
22133	//   ]
22134	// }
22135
22136}
22137
22138// method id "dfareporting.changeLogs.get":
22139
22140type ChangeLogsGetCall struct {
22141	s            *Service
22142	profileId    int64
22143	id           int64
22144	urlParams_   gensupport.URLParams
22145	ifNoneMatch_ string
22146	ctx_         context.Context
22147	header_      http.Header
22148}
22149
22150// Get: Gets one change log by ID.
22151func (r *ChangeLogsService) Get(profileId int64, id int64) *ChangeLogsGetCall {
22152	c := &ChangeLogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22153	c.profileId = profileId
22154	c.id = id
22155	return c
22156}
22157
22158// Fields allows partial responses to be retrieved. See
22159// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22160// for more information.
22161func (c *ChangeLogsGetCall) Fields(s ...googleapi.Field) *ChangeLogsGetCall {
22162	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22163	return c
22164}
22165
22166// IfNoneMatch sets the optional parameter which makes the operation
22167// fail if the object's ETag matches the given value. This is useful for
22168// getting updates only after the object has changed since the last
22169// request. Use googleapi.IsNotModified to check whether the response
22170// error from Do is the result of In-None-Match.
22171func (c *ChangeLogsGetCall) IfNoneMatch(entityTag string) *ChangeLogsGetCall {
22172	c.ifNoneMatch_ = entityTag
22173	return c
22174}
22175
22176// Context sets the context to be used in this call's Do method. Any
22177// pending HTTP request will be aborted if the provided context is
22178// canceled.
22179func (c *ChangeLogsGetCall) Context(ctx context.Context) *ChangeLogsGetCall {
22180	c.ctx_ = ctx
22181	return c
22182}
22183
22184// Header returns an http.Header that can be modified by the caller to
22185// add HTTP headers to the request.
22186func (c *ChangeLogsGetCall) Header() http.Header {
22187	if c.header_ == nil {
22188		c.header_ = make(http.Header)
22189	}
22190	return c.header_
22191}
22192
22193func (c *ChangeLogsGetCall) doRequest(alt string) (*http.Response, error) {
22194	reqHeaders := make(http.Header)
22195	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
22196	for k, v := range c.header_ {
22197		reqHeaders[k] = v
22198	}
22199	reqHeaders.Set("User-Agent", c.s.userAgent())
22200	if c.ifNoneMatch_ != "" {
22201		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22202	}
22203	var body io.Reader = nil
22204	c.urlParams_.Set("alt", alt)
22205	c.urlParams_.Set("prettyPrint", "false")
22206	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs/{id}")
22207	urls += "?" + c.urlParams_.Encode()
22208	req, err := http.NewRequest("GET", urls, body)
22209	if err != nil {
22210		return nil, err
22211	}
22212	req.Header = reqHeaders
22213	googleapi.Expand(req.URL, map[string]string{
22214		"profileId": strconv.FormatInt(c.profileId, 10),
22215		"id":        strconv.FormatInt(c.id, 10),
22216	})
22217	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22218}
22219
22220// Do executes the "dfareporting.changeLogs.get" call.
22221// Exactly one of *ChangeLog or error will be non-nil. Any non-2xx
22222// status code is an error. Response headers are in either
22223// *ChangeLog.ServerResponse.Header or (if a response was returned at
22224// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22225// to check whether the returned error was because
22226// http.StatusNotModified was returned.
22227func (c *ChangeLogsGetCall) Do(opts ...googleapi.CallOption) (*ChangeLog, error) {
22228	gensupport.SetOptions(c.urlParams_, opts...)
22229	res, err := c.doRequest("json")
22230	if res != nil && res.StatusCode == http.StatusNotModified {
22231		if res.Body != nil {
22232			res.Body.Close()
22233		}
22234		return nil, &googleapi.Error{
22235			Code:   res.StatusCode,
22236			Header: res.Header,
22237		}
22238	}
22239	if err != nil {
22240		return nil, err
22241	}
22242	defer googleapi.CloseBody(res)
22243	if err := googleapi.CheckResponse(res); err != nil {
22244		return nil, err
22245	}
22246	ret := &ChangeLog{
22247		ServerResponse: googleapi.ServerResponse{
22248			Header:         res.Header,
22249			HTTPStatusCode: res.StatusCode,
22250		},
22251	}
22252	target := &ret
22253	if err := gensupport.DecodeResponse(target, res); err != nil {
22254		return nil, err
22255	}
22256	return ret, nil
22257	// {
22258	//   "description": "Gets one change log by ID.",
22259	//   "httpMethod": "GET",
22260	//   "id": "dfareporting.changeLogs.get",
22261	//   "parameterOrder": [
22262	//     "profileId",
22263	//     "id"
22264	//   ],
22265	//   "parameters": {
22266	//     "id": {
22267	//       "description": "Change log ID.",
22268	//       "format": "int64",
22269	//       "location": "path",
22270	//       "required": true,
22271	//       "type": "string"
22272	//     },
22273	//     "profileId": {
22274	//       "description": "User profile ID associated with this request.",
22275	//       "format": "int64",
22276	//       "location": "path",
22277	//       "required": true,
22278	//       "type": "string"
22279	//     }
22280	//   },
22281	//   "path": "userprofiles/{profileId}/changeLogs/{id}",
22282	//   "response": {
22283	//     "$ref": "ChangeLog"
22284	//   },
22285	//   "scopes": [
22286	//     "https://www.googleapis.com/auth/dfatrafficking"
22287	//   ]
22288	// }
22289
22290}
22291
22292// method id "dfareporting.changeLogs.list":
22293
22294type ChangeLogsListCall struct {
22295	s            *Service
22296	profileId    int64
22297	urlParams_   gensupport.URLParams
22298	ifNoneMatch_ string
22299	ctx_         context.Context
22300	header_      http.Header
22301}
22302
22303// List: Retrieves a list of change logs. This method supports paging.
22304func (r *ChangeLogsService) List(profileId int64) *ChangeLogsListCall {
22305	c := &ChangeLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22306	c.profileId = profileId
22307	return c
22308}
22309
22310// Action sets the optional parameter "action": Select only change logs
22311// with the specified action.
22312//
22313// Possible values:
22314//   "ACTION_ADD"
22315//   "ACTION_ASSIGN"
22316//   "ACTION_ASSOCIATE"
22317//   "ACTION_CREATE"
22318//   "ACTION_DELETE"
22319//   "ACTION_DISABLE"
22320//   "ACTION_EMAIL_TAGS"
22321//   "ACTION_ENABLE"
22322//   "ACTION_LINK"
22323//   "ACTION_MARK_AS_DEFAULT"
22324//   "ACTION_PUSH"
22325//   "ACTION_REMOVE"
22326//   "ACTION_SEND"
22327//   "ACTION_SHARE"
22328//   "ACTION_UNASSIGN"
22329//   "ACTION_UNLINK"
22330//   "ACTION_UPDATE"
22331func (c *ChangeLogsListCall) Action(action string) *ChangeLogsListCall {
22332	c.urlParams_.Set("action", action)
22333	return c
22334}
22335
22336// Ids sets the optional parameter "ids": Select only change logs with
22337// these IDs.
22338func (c *ChangeLogsListCall) Ids(ids ...int64) *ChangeLogsListCall {
22339	var ids_ []string
22340	for _, v := range ids {
22341		ids_ = append(ids_, fmt.Sprint(v))
22342	}
22343	c.urlParams_.SetMulti("ids", ids_)
22344	return c
22345}
22346
22347// MaxChangeTime sets the optional parameter "maxChangeTime": Select
22348// only change logs whose change time is before the specified
22349// maxChangeTime.The time should be formatted as an RFC3339 date/time
22350// string. For example, for 10:54 PM on July 18th, 2015, in the
22351// America/New York time zone, the format is
22352// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
22353// the letter T, the hour (24-hour clock system), minute, second, and
22354// then the time zone offset.
22355func (c *ChangeLogsListCall) MaxChangeTime(maxChangeTime string) *ChangeLogsListCall {
22356	c.urlParams_.Set("maxChangeTime", maxChangeTime)
22357	return c
22358}
22359
22360// MaxResults sets the optional parameter "maxResults": Maximum number
22361// of results to return.
22362func (c *ChangeLogsListCall) MaxResults(maxResults int64) *ChangeLogsListCall {
22363	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22364	return c
22365}
22366
22367// MinChangeTime sets the optional parameter "minChangeTime": Select
22368// only change logs whose change time is after the specified
22369// minChangeTime.The time should be formatted as an RFC3339 date/time
22370// string. For example, for 10:54 PM on July 18th, 2015, in the
22371// America/New York time zone, the format is
22372// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
22373// the letter T, the hour (24-hour clock system), minute, second, and
22374// then the time zone offset.
22375func (c *ChangeLogsListCall) MinChangeTime(minChangeTime string) *ChangeLogsListCall {
22376	c.urlParams_.Set("minChangeTime", minChangeTime)
22377	return c
22378}
22379
22380// ObjectIds sets the optional parameter "objectIds": Select only change
22381// logs with these object IDs.
22382func (c *ChangeLogsListCall) ObjectIds(objectIds ...int64) *ChangeLogsListCall {
22383	var objectIds_ []string
22384	for _, v := range objectIds {
22385		objectIds_ = append(objectIds_, fmt.Sprint(v))
22386	}
22387	c.urlParams_.SetMulti("objectIds", objectIds_)
22388	return c
22389}
22390
22391// ObjectType sets the optional parameter "objectType": Select only
22392// change logs with the specified object type.
22393//
22394// Possible values:
22395//   "OBJECT_ACCOUNT"
22396//   "OBJECT_ACCOUNT_BILLING_FEATURE"
22397//   "OBJECT_AD"
22398//   "OBJECT_ADVERTISER"
22399//   "OBJECT_ADVERTISER_GROUP"
22400//   "OBJECT_BILLING_ACCOUNT_GROUP"
22401//   "OBJECT_BILLING_FEATURE"
22402//   "OBJECT_BILLING_MINIMUM_FEE"
22403//   "OBJECT_BILLING_PROFILE"
22404//   "OBJECT_CAMPAIGN"
22405//   "OBJECT_CONTENT_CATEGORY"
22406//   "OBJECT_CREATIVE"
22407//   "OBJECT_CREATIVE_ASSET"
22408//   "OBJECT_CREATIVE_BUNDLE"
22409//   "OBJECT_CREATIVE_FIELD"
22410//   "OBJECT_CREATIVE_GROUP"
22411//   "OBJECT_DFA_SITE"
22412//   "OBJECT_EVENT_TAG"
22413//   "OBJECT_FLOODLIGHT_ACTIVITY_GROUP"
22414//   "OBJECT_FLOODLIGHT_ACTVITY"
22415//   "OBJECT_FLOODLIGHT_CONFIGURATION"
22416//   "OBJECT_FLOODLIGHT_DV360_LINK"
22417//   "OBJECT_INSTREAM_CREATIVE"
22418//   "OBJECT_LANDING_PAGE"
22419//   "OBJECT_MEDIA_ORDER"
22420//   "OBJECT_PLACEMENT"
22421//   "OBJECT_PLACEMENT_STRATEGY"
22422//   "OBJECT_PLAYSTORE_LINK"
22423//   "OBJECT_PROVIDED_LIST_CLIENT"
22424//   "OBJECT_RATE_CARD"
22425//   "OBJECT_REMARKETING_LIST"
22426//   "OBJECT_RICHMEDIA_CREATIVE"
22427//   "OBJECT_SD_SITE"
22428//   "OBJECT_SEARCH_LIFT_STUDY"
22429//   "OBJECT_SIZE"
22430//   "OBJECT_SUBACCOUNT"
22431//   "OBJECT_TARGETING_TEMPLATE"
22432//   "OBJECT_USER_PROFILE"
22433//   "OBJECT_USER_PROFILE_FILTER"
22434//   "OBJECT_USER_ROLE"
22435func (c *ChangeLogsListCall) ObjectType(objectType string) *ChangeLogsListCall {
22436	c.urlParams_.Set("objectType", objectType)
22437	return c
22438}
22439
22440// PageToken sets the optional parameter "pageToken": Value of the
22441// nextPageToken from the previous result page.
22442func (c *ChangeLogsListCall) PageToken(pageToken string) *ChangeLogsListCall {
22443	c.urlParams_.Set("pageToken", pageToken)
22444	return c
22445}
22446
22447// SearchString sets the optional parameter "searchString": Select only
22448// change logs whose object ID, user name, old or new values match the
22449// search string.
22450func (c *ChangeLogsListCall) SearchString(searchString string) *ChangeLogsListCall {
22451	c.urlParams_.Set("searchString", searchString)
22452	return c
22453}
22454
22455// UserProfileIds sets the optional parameter "userProfileIds": Select
22456// only change logs with these user profile IDs.
22457func (c *ChangeLogsListCall) UserProfileIds(userProfileIds ...int64) *ChangeLogsListCall {
22458	var userProfileIds_ []string
22459	for _, v := range userProfileIds {
22460		userProfileIds_ = append(userProfileIds_, fmt.Sprint(v))
22461	}
22462	c.urlParams_.SetMulti("userProfileIds", userProfileIds_)
22463	return c
22464}
22465
22466// Fields allows partial responses to be retrieved. See
22467// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22468// for more information.
22469func (c *ChangeLogsListCall) Fields(s ...googleapi.Field) *ChangeLogsListCall {
22470	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22471	return c
22472}
22473
22474// IfNoneMatch sets the optional parameter which makes the operation
22475// fail if the object's ETag matches the given value. This is useful for
22476// getting updates only after the object has changed since the last
22477// request. Use googleapi.IsNotModified to check whether the response
22478// error from Do is the result of In-None-Match.
22479func (c *ChangeLogsListCall) IfNoneMatch(entityTag string) *ChangeLogsListCall {
22480	c.ifNoneMatch_ = entityTag
22481	return c
22482}
22483
22484// Context sets the context to be used in this call's Do method. Any
22485// pending HTTP request will be aborted if the provided context is
22486// canceled.
22487func (c *ChangeLogsListCall) Context(ctx context.Context) *ChangeLogsListCall {
22488	c.ctx_ = ctx
22489	return c
22490}
22491
22492// Header returns an http.Header that can be modified by the caller to
22493// add HTTP headers to the request.
22494func (c *ChangeLogsListCall) Header() http.Header {
22495	if c.header_ == nil {
22496		c.header_ = make(http.Header)
22497	}
22498	return c.header_
22499}
22500
22501func (c *ChangeLogsListCall) doRequest(alt string) (*http.Response, error) {
22502	reqHeaders := make(http.Header)
22503	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
22504	for k, v := range c.header_ {
22505		reqHeaders[k] = v
22506	}
22507	reqHeaders.Set("User-Agent", c.s.userAgent())
22508	if c.ifNoneMatch_ != "" {
22509		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22510	}
22511	var body io.Reader = nil
22512	c.urlParams_.Set("alt", alt)
22513	c.urlParams_.Set("prettyPrint", "false")
22514	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs")
22515	urls += "?" + c.urlParams_.Encode()
22516	req, err := http.NewRequest("GET", urls, body)
22517	if err != nil {
22518		return nil, err
22519	}
22520	req.Header = reqHeaders
22521	googleapi.Expand(req.URL, map[string]string{
22522		"profileId": strconv.FormatInt(c.profileId, 10),
22523	})
22524	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22525}
22526
22527// Do executes the "dfareporting.changeLogs.list" call.
22528// Exactly one of *ChangeLogsListResponse or error will be non-nil. Any
22529// non-2xx status code is an error. Response headers are in either
22530// *ChangeLogsListResponse.ServerResponse.Header or (if a response was
22531// returned at all) in error.(*googleapi.Error).Header. Use
22532// googleapi.IsNotModified to check whether the returned error was
22533// because http.StatusNotModified was returned.
22534func (c *ChangeLogsListCall) Do(opts ...googleapi.CallOption) (*ChangeLogsListResponse, error) {
22535	gensupport.SetOptions(c.urlParams_, opts...)
22536	res, err := c.doRequest("json")
22537	if res != nil && res.StatusCode == http.StatusNotModified {
22538		if res.Body != nil {
22539			res.Body.Close()
22540		}
22541		return nil, &googleapi.Error{
22542			Code:   res.StatusCode,
22543			Header: res.Header,
22544		}
22545	}
22546	if err != nil {
22547		return nil, err
22548	}
22549	defer googleapi.CloseBody(res)
22550	if err := googleapi.CheckResponse(res); err != nil {
22551		return nil, err
22552	}
22553	ret := &ChangeLogsListResponse{
22554		ServerResponse: googleapi.ServerResponse{
22555			Header:         res.Header,
22556			HTTPStatusCode: res.StatusCode,
22557		},
22558	}
22559	target := &ret
22560	if err := gensupport.DecodeResponse(target, res); err != nil {
22561		return nil, err
22562	}
22563	return ret, nil
22564	// {
22565	//   "description": "Retrieves a list of change logs. This method supports paging.",
22566	//   "httpMethod": "GET",
22567	//   "id": "dfareporting.changeLogs.list",
22568	//   "parameterOrder": [
22569	//     "profileId"
22570	//   ],
22571	//   "parameters": {
22572	//     "action": {
22573	//       "description": "Select only change logs with the specified action.",
22574	//       "enum": [
22575	//         "ACTION_ADD",
22576	//         "ACTION_ASSIGN",
22577	//         "ACTION_ASSOCIATE",
22578	//         "ACTION_CREATE",
22579	//         "ACTION_DELETE",
22580	//         "ACTION_DISABLE",
22581	//         "ACTION_EMAIL_TAGS",
22582	//         "ACTION_ENABLE",
22583	//         "ACTION_LINK",
22584	//         "ACTION_MARK_AS_DEFAULT",
22585	//         "ACTION_PUSH",
22586	//         "ACTION_REMOVE",
22587	//         "ACTION_SEND",
22588	//         "ACTION_SHARE",
22589	//         "ACTION_UNASSIGN",
22590	//         "ACTION_UNLINK",
22591	//         "ACTION_UPDATE"
22592	//       ],
22593	//       "enumDescriptions": [
22594	//         "",
22595	//         "",
22596	//         "",
22597	//         "",
22598	//         "",
22599	//         "",
22600	//         "",
22601	//         "",
22602	//         "",
22603	//         "",
22604	//         "",
22605	//         "",
22606	//         "",
22607	//         "",
22608	//         "",
22609	//         "",
22610	//         ""
22611	//       ],
22612	//       "location": "query",
22613	//       "type": "string"
22614	//     },
22615	//     "ids": {
22616	//       "description": "Select only change logs with these IDs.",
22617	//       "format": "int64",
22618	//       "location": "query",
22619	//       "repeated": true,
22620	//       "type": "string"
22621	//     },
22622	//     "maxChangeTime": {
22623	//       "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.",
22624	//       "location": "query",
22625	//       "type": "string"
22626	//     },
22627	//     "maxResults": {
22628	//       "default": "1000",
22629	//       "description": "Maximum number of results to return.",
22630	//       "format": "int32",
22631	//       "location": "query",
22632	//       "maximum": "1000",
22633	//       "minimum": "0",
22634	//       "type": "integer"
22635	//     },
22636	//     "minChangeTime": {
22637	//       "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.",
22638	//       "location": "query",
22639	//       "type": "string"
22640	//     },
22641	//     "objectIds": {
22642	//       "description": "Select only change logs with these object IDs.",
22643	//       "format": "int64",
22644	//       "location": "query",
22645	//       "repeated": true,
22646	//       "type": "string"
22647	//     },
22648	//     "objectType": {
22649	//       "description": "Select only change logs with the specified object type.",
22650	//       "enum": [
22651	//         "OBJECT_ACCOUNT",
22652	//         "OBJECT_ACCOUNT_BILLING_FEATURE",
22653	//         "OBJECT_AD",
22654	//         "OBJECT_ADVERTISER",
22655	//         "OBJECT_ADVERTISER_GROUP",
22656	//         "OBJECT_BILLING_ACCOUNT_GROUP",
22657	//         "OBJECT_BILLING_FEATURE",
22658	//         "OBJECT_BILLING_MINIMUM_FEE",
22659	//         "OBJECT_BILLING_PROFILE",
22660	//         "OBJECT_CAMPAIGN",
22661	//         "OBJECT_CONTENT_CATEGORY",
22662	//         "OBJECT_CREATIVE",
22663	//         "OBJECT_CREATIVE_ASSET",
22664	//         "OBJECT_CREATIVE_BUNDLE",
22665	//         "OBJECT_CREATIVE_FIELD",
22666	//         "OBJECT_CREATIVE_GROUP",
22667	//         "OBJECT_DFA_SITE",
22668	//         "OBJECT_EVENT_TAG",
22669	//         "OBJECT_FLOODLIGHT_ACTIVITY_GROUP",
22670	//         "OBJECT_FLOODLIGHT_ACTVITY",
22671	//         "OBJECT_FLOODLIGHT_CONFIGURATION",
22672	//         "OBJECT_FLOODLIGHT_DV360_LINK",
22673	//         "OBJECT_INSTREAM_CREATIVE",
22674	//         "OBJECT_LANDING_PAGE",
22675	//         "OBJECT_MEDIA_ORDER",
22676	//         "OBJECT_PLACEMENT",
22677	//         "OBJECT_PLACEMENT_STRATEGY",
22678	//         "OBJECT_PLAYSTORE_LINK",
22679	//         "OBJECT_PROVIDED_LIST_CLIENT",
22680	//         "OBJECT_RATE_CARD",
22681	//         "OBJECT_REMARKETING_LIST",
22682	//         "OBJECT_RICHMEDIA_CREATIVE",
22683	//         "OBJECT_SD_SITE",
22684	//         "OBJECT_SEARCH_LIFT_STUDY",
22685	//         "OBJECT_SIZE",
22686	//         "OBJECT_SUBACCOUNT",
22687	//         "OBJECT_TARGETING_TEMPLATE",
22688	//         "OBJECT_USER_PROFILE",
22689	//         "OBJECT_USER_PROFILE_FILTER",
22690	//         "OBJECT_USER_ROLE"
22691	//       ],
22692	//       "enumDescriptions": [
22693	//         "",
22694	//         "",
22695	//         "",
22696	//         "",
22697	//         "",
22698	//         "",
22699	//         "",
22700	//         "",
22701	//         "",
22702	//         "",
22703	//         "",
22704	//         "",
22705	//         "",
22706	//         "",
22707	//         "",
22708	//         "",
22709	//         "",
22710	//         "",
22711	//         "",
22712	//         "",
22713	//         "",
22714	//         "",
22715	//         "",
22716	//         "",
22717	//         "",
22718	//         "",
22719	//         "",
22720	//         "",
22721	//         "",
22722	//         "",
22723	//         "",
22724	//         "",
22725	//         "",
22726	//         "",
22727	//         "",
22728	//         "",
22729	//         "",
22730	//         "",
22731	//         "",
22732	//         ""
22733	//       ],
22734	//       "location": "query",
22735	//       "type": "string"
22736	//     },
22737	//     "pageToken": {
22738	//       "description": "Value of the nextPageToken from the previous result page.",
22739	//       "location": "query",
22740	//       "type": "string"
22741	//     },
22742	//     "profileId": {
22743	//       "description": "User profile ID associated with this request.",
22744	//       "format": "int64",
22745	//       "location": "path",
22746	//       "required": true,
22747	//       "type": "string"
22748	//     },
22749	//     "searchString": {
22750	//       "description": "Select only change logs whose object ID, user name, old or new values match the search string.",
22751	//       "location": "query",
22752	//       "type": "string"
22753	//     },
22754	//     "userProfileIds": {
22755	//       "description": "Select only change logs with these user profile IDs.",
22756	//       "format": "int64",
22757	//       "location": "query",
22758	//       "repeated": true,
22759	//       "type": "string"
22760	//     }
22761	//   },
22762	//   "path": "userprofiles/{profileId}/changeLogs",
22763	//   "response": {
22764	//     "$ref": "ChangeLogsListResponse"
22765	//   },
22766	//   "scopes": [
22767	//     "https://www.googleapis.com/auth/dfatrafficking"
22768	//   ]
22769	// }
22770
22771}
22772
22773// Pages invokes f for each page of results.
22774// A non-nil error returned from f will halt the iteration.
22775// The provided context supersedes any context provided to the Context method.
22776func (c *ChangeLogsListCall) Pages(ctx context.Context, f func(*ChangeLogsListResponse) error) error {
22777	c.ctx_ = ctx
22778	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22779	for {
22780		x, err := c.Do()
22781		if err != nil {
22782			return err
22783		}
22784		if err := f(x); err != nil {
22785			return err
22786		}
22787		if x.NextPageToken == "" {
22788			return nil
22789		}
22790		c.PageToken(x.NextPageToken)
22791	}
22792}
22793
22794// method id "dfareporting.cities.list":
22795
22796type CitiesListCall struct {
22797	s            *Service
22798	profileId    int64
22799	urlParams_   gensupport.URLParams
22800	ifNoneMatch_ string
22801	ctx_         context.Context
22802	header_      http.Header
22803}
22804
22805// List: Retrieves a list of cities, possibly filtered.
22806func (r *CitiesService) List(profileId int64) *CitiesListCall {
22807	c := &CitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22808	c.profileId = profileId
22809	return c
22810}
22811
22812// CountryDartIds sets the optional parameter "countryDartIds": Select
22813// only cities from these countries.
22814func (c *CitiesListCall) CountryDartIds(countryDartIds ...int64) *CitiesListCall {
22815	var countryDartIds_ []string
22816	for _, v := range countryDartIds {
22817		countryDartIds_ = append(countryDartIds_, fmt.Sprint(v))
22818	}
22819	c.urlParams_.SetMulti("countryDartIds", countryDartIds_)
22820	return c
22821}
22822
22823// DartIds sets the optional parameter "dartIds": Select only cities
22824// with these DART IDs.
22825func (c *CitiesListCall) DartIds(dartIds ...int64) *CitiesListCall {
22826	var dartIds_ []string
22827	for _, v := range dartIds {
22828		dartIds_ = append(dartIds_, fmt.Sprint(v))
22829	}
22830	c.urlParams_.SetMulti("dartIds", dartIds_)
22831	return c
22832}
22833
22834// NamePrefix sets the optional parameter "namePrefix": Select only
22835// cities with names starting with this prefix.
22836func (c *CitiesListCall) NamePrefix(namePrefix string) *CitiesListCall {
22837	c.urlParams_.Set("namePrefix", namePrefix)
22838	return c
22839}
22840
22841// RegionDartIds sets the optional parameter "regionDartIds": Select
22842// only cities from these regions.
22843func (c *CitiesListCall) RegionDartIds(regionDartIds ...int64) *CitiesListCall {
22844	var regionDartIds_ []string
22845	for _, v := range regionDartIds {
22846		regionDartIds_ = append(regionDartIds_, fmt.Sprint(v))
22847	}
22848	c.urlParams_.SetMulti("regionDartIds", regionDartIds_)
22849	return c
22850}
22851
22852// Fields allows partial responses to be retrieved. See
22853// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22854// for more information.
22855func (c *CitiesListCall) Fields(s ...googleapi.Field) *CitiesListCall {
22856	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22857	return c
22858}
22859
22860// IfNoneMatch sets the optional parameter which makes the operation
22861// fail if the object's ETag matches the given value. This is useful for
22862// getting updates only after the object has changed since the last
22863// request. Use googleapi.IsNotModified to check whether the response
22864// error from Do is the result of In-None-Match.
22865func (c *CitiesListCall) IfNoneMatch(entityTag string) *CitiesListCall {
22866	c.ifNoneMatch_ = entityTag
22867	return c
22868}
22869
22870// Context sets the context to be used in this call's Do method. Any
22871// pending HTTP request will be aborted if the provided context is
22872// canceled.
22873func (c *CitiesListCall) Context(ctx context.Context) *CitiesListCall {
22874	c.ctx_ = ctx
22875	return c
22876}
22877
22878// Header returns an http.Header that can be modified by the caller to
22879// add HTTP headers to the request.
22880func (c *CitiesListCall) Header() http.Header {
22881	if c.header_ == nil {
22882		c.header_ = make(http.Header)
22883	}
22884	return c.header_
22885}
22886
22887func (c *CitiesListCall) doRequest(alt string) (*http.Response, error) {
22888	reqHeaders := make(http.Header)
22889	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
22890	for k, v := range c.header_ {
22891		reqHeaders[k] = v
22892	}
22893	reqHeaders.Set("User-Agent", c.s.userAgent())
22894	if c.ifNoneMatch_ != "" {
22895		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22896	}
22897	var body io.Reader = nil
22898	c.urlParams_.Set("alt", alt)
22899	c.urlParams_.Set("prettyPrint", "false")
22900	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/cities")
22901	urls += "?" + c.urlParams_.Encode()
22902	req, err := http.NewRequest("GET", urls, body)
22903	if err != nil {
22904		return nil, err
22905	}
22906	req.Header = reqHeaders
22907	googleapi.Expand(req.URL, map[string]string{
22908		"profileId": strconv.FormatInt(c.profileId, 10),
22909	})
22910	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22911}
22912
22913// Do executes the "dfareporting.cities.list" call.
22914// Exactly one of *CitiesListResponse or error will be non-nil. Any
22915// non-2xx status code is an error. Response headers are in either
22916// *CitiesListResponse.ServerResponse.Header or (if a response was
22917// returned at all) in error.(*googleapi.Error).Header. Use
22918// googleapi.IsNotModified to check whether the returned error was
22919// because http.StatusNotModified was returned.
22920func (c *CitiesListCall) Do(opts ...googleapi.CallOption) (*CitiesListResponse, error) {
22921	gensupport.SetOptions(c.urlParams_, opts...)
22922	res, err := c.doRequest("json")
22923	if res != nil && res.StatusCode == http.StatusNotModified {
22924		if res.Body != nil {
22925			res.Body.Close()
22926		}
22927		return nil, &googleapi.Error{
22928			Code:   res.StatusCode,
22929			Header: res.Header,
22930		}
22931	}
22932	if err != nil {
22933		return nil, err
22934	}
22935	defer googleapi.CloseBody(res)
22936	if err := googleapi.CheckResponse(res); err != nil {
22937		return nil, err
22938	}
22939	ret := &CitiesListResponse{
22940		ServerResponse: googleapi.ServerResponse{
22941			Header:         res.Header,
22942			HTTPStatusCode: res.StatusCode,
22943		},
22944	}
22945	target := &ret
22946	if err := gensupport.DecodeResponse(target, res); err != nil {
22947		return nil, err
22948	}
22949	return ret, nil
22950	// {
22951	//   "description": "Retrieves a list of cities, possibly filtered.",
22952	//   "httpMethod": "GET",
22953	//   "id": "dfareporting.cities.list",
22954	//   "parameterOrder": [
22955	//     "profileId"
22956	//   ],
22957	//   "parameters": {
22958	//     "countryDartIds": {
22959	//       "description": "Select only cities from these countries.",
22960	//       "format": "int64",
22961	//       "location": "query",
22962	//       "repeated": true,
22963	//       "type": "string"
22964	//     },
22965	//     "dartIds": {
22966	//       "description": "Select only cities with these DART IDs.",
22967	//       "format": "int64",
22968	//       "location": "query",
22969	//       "repeated": true,
22970	//       "type": "string"
22971	//     },
22972	//     "namePrefix": {
22973	//       "description": "Select only cities with names starting with this prefix.",
22974	//       "location": "query",
22975	//       "type": "string"
22976	//     },
22977	//     "profileId": {
22978	//       "description": "User profile ID associated with this request.",
22979	//       "format": "int64",
22980	//       "location": "path",
22981	//       "required": true,
22982	//       "type": "string"
22983	//     },
22984	//     "regionDartIds": {
22985	//       "description": "Select only cities from these regions.",
22986	//       "format": "int64",
22987	//       "location": "query",
22988	//       "repeated": true,
22989	//       "type": "string"
22990	//     }
22991	//   },
22992	//   "path": "userprofiles/{profileId}/cities",
22993	//   "response": {
22994	//     "$ref": "CitiesListResponse"
22995	//   },
22996	//   "scopes": [
22997	//     "https://www.googleapis.com/auth/dfatrafficking"
22998	//   ]
22999	// }
23000
23001}
23002
23003// method id "dfareporting.connectionTypes.get":
23004
23005type ConnectionTypesGetCall struct {
23006	s            *Service
23007	profileId    int64
23008	id           int64
23009	urlParams_   gensupport.URLParams
23010	ifNoneMatch_ string
23011	ctx_         context.Context
23012	header_      http.Header
23013}
23014
23015// Get: Gets one connection type by ID.
23016func (r *ConnectionTypesService) Get(profileId int64, id int64) *ConnectionTypesGetCall {
23017	c := &ConnectionTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23018	c.profileId = profileId
23019	c.id = id
23020	return c
23021}
23022
23023// Fields allows partial responses to be retrieved. See
23024// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23025// for more information.
23026func (c *ConnectionTypesGetCall) Fields(s ...googleapi.Field) *ConnectionTypesGetCall {
23027	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23028	return c
23029}
23030
23031// IfNoneMatch sets the optional parameter which makes the operation
23032// fail if the object's ETag matches the given value. This is useful for
23033// getting updates only after the object has changed since the last
23034// request. Use googleapi.IsNotModified to check whether the response
23035// error from Do is the result of In-None-Match.
23036func (c *ConnectionTypesGetCall) IfNoneMatch(entityTag string) *ConnectionTypesGetCall {
23037	c.ifNoneMatch_ = entityTag
23038	return c
23039}
23040
23041// Context sets the context to be used in this call's Do method. Any
23042// pending HTTP request will be aborted if the provided context is
23043// canceled.
23044func (c *ConnectionTypesGetCall) Context(ctx context.Context) *ConnectionTypesGetCall {
23045	c.ctx_ = ctx
23046	return c
23047}
23048
23049// Header returns an http.Header that can be modified by the caller to
23050// add HTTP headers to the request.
23051func (c *ConnectionTypesGetCall) Header() http.Header {
23052	if c.header_ == nil {
23053		c.header_ = make(http.Header)
23054	}
23055	return c.header_
23056}
23057
23058func (c *ConnectionTypesGetCall) doRequest(alt string) (*http.Response, error) {
23059	reqHeaders := make(http.Header)
23060	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23061	for k, v := range c.header_ {
23062		reqHeaders[k] = v
23063	}
23064	reqHeaders.Set("User-Agent", c.s.userAgent())
23065	if c.ifNoneMatch_ != "" {
23066		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23067	}
23068	var body io.Reader = nil
23069	c.urlParams_.Set("alt", alt)
23070	c.urlParams_.Set("prettyPrint", "false")
23071	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes/{id}")
23072	urls += "?" + c.urlParams_.Encode()
23073	req, err := http.NewRequest("GET", urls, body)
23074	if err != nil {
23075		return nil, err
23076	}
23077	req.Header = reqHeaders
23078	googleapi.Expand(req.URL, map[string]string{
23079		"profileId": strconv.FormatInt(c.profileId, 10),
23080		"id":        strconv.FormatInt(c.id, 10),
23081	})
23082	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23083}
23084
23085// Do executes the "dfareporting.connectionTypes.get" call.
23086// Exactly one of *ConnectionType or error will be non-nil. Any non-2xx
23087// status code is an error. Response headers are in either
23088// *ConnectionType.ServerResponse.Header or (if a response was returned
23089// at all) in error.(*googleapi.Error).Header. Use
23090// googleapi.IsNotModified to check whether the returned error was
23091// because http.StatusNotModified was returned.
23092func (c *ConnectionTypesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionType, error) {
23093	gensupport.SetOptions(c.urlParams_, opts...)
23094	res, err := c.doRequest("json")
23095	if res != nil && res.StatusCode == http.StatusNotModified {
23096		if res.Body != nil {
23097			res.Body.Close()
23098		}
23099		return nil, &googleapi.Error{
23100			Code:   res.StatusCode,
23101			Header: res.Header,
23102		}
23103	}
23104	if err != nil {
23105		return nil, err
23106	}
23107	defer googleapi.CloseBody(res)
23108	if err := googleapi.CheckResponse(res); err != nil {
23109		return nil, err
23110	}
23111	ret := &ConnectionType{
23112		ServerResponse: googleapi.ServerResponse{
23113			Header:         res.Header,
23114			HTTPStatusCode: res.StatusCode,
23115		},
23116	}
23117	target := &ret
23118	if err := gensupport.DecodeResponse(target, res); err != nil {
23119		return nil, err
23120	}
23121	return ret, nil
23122	// {
23123	//   "description": "Gets one connection type by ID.",
23124	//   "httpMethod": "GET",
23125	//   "id": "dfareporting.connectionTypes.get",
23126	//   "parameterOrder": [
23127	//     "profileId",
23128	//     "id"
23129	//   ],
23130	//   "parameters": {
23131	//     "id": {
23132	//       "description": "Connection type ID.",
23133	//       "format": "int64",
23134	//       "location": "path",
23135	//       "required": true,
23136	//       "type": "string"
23137	//     },
23138	//     "profileId": {
23139	//       "description": "User profile ID associated with this request.",
23140	//       "format": "int64",
23141	//       "location": "path",
23142	//       "required": true,
23143	//       "type": "string"
23144	//     }
23145	//   },
23146	//   "path": "userprofiles/{profileId}/connectionTypes/{id}",
23147	//   "response": {
23148	//     "$ref": "ConnectionType"
23149	//   },
23150	//   "scopes": [
23151	//     "https://www.googleapis.com/auth/dfatrafficking"
23152	//   ]
23153	// }
23154
23155}
23156
23157// method id "dfareporting.connectionTypes.list":
23158
23159type ConnectionTypesListCall struct {
23160	s            *Service
23161	profileId    int64
23162	urlParams_   gensupport.URLParams
23163	ifNoneMatch_ string
23164	ctx_         context.Context
23165	header_      http.Header
23166}
23167
23168// List: Retrieves a list of connection types.
23169func (r *ConnectionTypesService) List(profileId int64) *ConnectionTypesListCall {
23170	c := &ConnectionTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23171	c.profileId = profileId
23172	return c
23173}
23174
23175// Fields allows partial responses to be retrieved. See
23176// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23177// for more information.
23178func (c *ConnectionTypesListCall) Fields(s ...googleapi.Field) *ConnectionTypesListCall {
23179	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23180	return c
23181}
23182
23183// IfNoneMatch sets the optional parameter which makes the operation
23184// fail if the object's ETag matches the given value. This is useful for
23185// getting updates only after the object has changed since the last
23186// request. Use googleapi.IsNotModified to check whether the response
23187// error from Do is the result of In-None-Match.
23188func (c *ConnectionTypesListCall) IfNoneMatch(entityTag string) *ConnectionTypesListCall {
23189	c.ifNoneMatch_ = entityTag
23190	return c
23191}
23192
23193// Context sets the context to be used in this call's Do method. Any
23194// pending HTTP request will be aborted if the provided context is
23195// canceled.
23196func (c *ConnectionTypesListCall) Context(ctx context.Context) *ConnectionTypesListCall {
23197	c.ctx_ = ctx
23198	return c
23199}
23200
23201// Header returns an http.Header that can be modified by the caller to
23202// add HTTP headers to the request.
23203func (c *ConnectionTypesListCall) Header() http.Header {
23204	if c.header_ == nil {
23205		c.header_ = make(http.Header)
23206	}
23207	return c.header_
23208}
23209
23210func (c *ConnectionTypesListCall) doRequest(alt string) (*http.Response, error) {
23211	reqHeaders := make(http.Header)
23212	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23213	for k, v := range c.header_ {
23214		reqHeaders[k] = v
23215	}
23216	reqHeaders.Set("User-Agent", c.s.userAgent())
23217	if c.ifNoneMatch_ != "" {
23218		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23219	}
23220	var body io.Reader = nil
23221	c.urlParams_.Set("alt", alt)
23222	c.urlParams_.Set("prettyPrint", "false")
23223	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes")
23224	urls += "?" + c.urlParams_.Encode()
23225	req, err := http.NewRequest("GET", urls, body)
23226	if err != nil {
23227		return nil, err
23228	}
23229	req.Header = reqHeaders
23230	googleapi.Expand(req.URL, map[string]string{
23231		"profileId": strconv.FormatInt(c.profileId, 10),
23232	})
23233	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23234}
23235
23236// Do executes the "dfareporting.connectionTypes.list" call.
23237// Exactly one of *ConnectionTypesListResponse or error will be non-nil.
23238// Any non-2xx status code is an error. Response headers are in either
23239// *ConnectionTypesListResponse.ServerResponse.Header or (if a response
23240// was returned at all) in error.(*googleapi.Error).Header. Use
23241// googleapi.IsNotModified to check whether the returned error was
23242// because http.StatusNotModified was returned.
23243func (c *ConnectionTypesListCall) Do(opts ...googleapi.CallOption) (*ConnectionTypesListResponse, error) {
23244	gensupport.SetOptions(c.urlParams_, opts...)
23245	res, err := c.doRequest("json")
23246	if res != nil && res.StatusCode == http.StatusNotModified {
23247		if res.Body != nil {
23248			res.Body.Close()
23249		}
23250		return nil, &googleapi.Error{
23251			Code:   res.StatusCode,
23252			Header: res.Header,
23253		}
23254	}
23255	if err != nil {
23256		return nil, err
23257	}
23258	defer googleapi.CloseBody(res)
23259	if err := googleapi.CheckResponse(res); err != nil {
23260		return nil, err
23261	}
23262	ret := &ConnectionTypesListResponse{
23263		ServerResponse: googleapi.ServerResponse{
23264			Header:         res.Header,
23265			HTTPStatusCode: res.StatusCode,
23266		},
23267	}
23268	target := &ret
23269	if err := gensupport.DecodeResponse(target, res); err != nil {
23270		return nil, err
23271	}
23272	return ret, nil
23273	// {
23274	//   "description": "Retrieves a list of connection types.",
23275	//   "httpMethod": "GET",
23276	//   "id": "dfareporting.connectionTypes.list",
23277	//   "parameterOrder": [
23278	//     "profileId"
23279	//   ],
23280	//   "parameters": {
23281	//     "profileId": {
23282	//       "description": "User profile ID associated with this request.",
23283	//       "format": "int64",
23284	//       "location": "path",
23285	//       "required": true,
23286	//       "type": "string"
23287	//     }
23288	//   },
23289	//   "path": "userprofiles/{profileId}/connectionTypes",
23290	//   "response": {
23291	//     "$ref": "ConnectionTypesListResponse"
23292	//   },
23293	//   "scopes": [
23294	//     "https://www.googleapis.com/auth/dfatrafficking"
23295	//   ]
23296	// }
23297
23298}
23299
23300// method id "dfareporting.contentCategories.delete":
23301
23302type ContentCategoriesDeleteCall struct {
23303	s          *Service
23304	profileId  int64
23305	id         int64
23306	urlParams_ gensupport.URLParams
23307	ctx_       context.Context
23308	header_    http.Header
23309}
23310
23311// Delete: Deletes an existing content category.
23312func (r *ContentCategoriesService) Delete(profileId int64, id int64) *ContentCategoriesDeleteCall {
23313	c := &ContentCategoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23314	c.profileId = profileId
23315	c.id = id
23316	return c
23317}
23318
23319// Fields allows partial responses to be retrieved. See
23320// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23321// for more information.
23322func (c *ContentCategoriesDeleteCall) Fields(s ...googleapi.Field) *ContentCategoriesDeleteCall {
23323	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23324	return c
23325}
23326
23327// Context sets the context to be used in this call's Do method. Any
23328// pending HTTP request will be aborted if the provided context is
23329// canceled.
23330func (c *ContentCategoriesDeleteCall) Context(ctx context.Context) *ContentCategoriesDeleteCall {
23331	c.ctx_ = ctx
23332	return c
23333}
23334
23335// Header returns an http.Header that can be modified by the caller to
23336// add HTTP headers to the request.
23337func (c *ContentCategoriesDeleteCall) Header() http.Header {
23338	if c.header_ == nil {
23339		c.header_ = make(http.Header)
23340	}
23341	return c.header_
23342}
23343
23344func (c *ContentCategoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
23345	reqHeaders := make(http.Header)
23346	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23347	for k, v := range c.header_ {
23348		reqHeaders[k] = v
23349	}
23350	reqHeaders.Set("User-Agent", c.s.userAgent())
23351	var body io.Reader = nil
23352	c.urlParams_.Set("alt", alt)
23353	c.urlParams_.Set("prettyPrint", "false")
23354	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
23355	urls += "?" + c.urlParams_.Encode()
23356	req, err := http.NewRequest("DELETE", urls, body)
23357	if err != nil {
23358		return nil, err
23359	}
23360	req.Header = reqHeaders
23361	googleapi.Expand(req.URL, map[string]string{
23362		"profileId": strconv.FormatInt(c.profileId, 10),
23363		"id":        strconv.FormatInt(c.id, 10),
23364	})
23365	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23366}
23367
23368// Do executes the "dfareporting.contentCategories.delete" call.
23369func (c *ContentCategoriesDeleteCall) Do(opts ...googleapi.CallOption) error {
23370	gensupport.SetOptions(c.urlParams_, opts...)
23371	res, err := c.doRequest("json")
23372	if err != nil {
23373		return err
23374	}
23375	defer googleapi.CloseBody(res)
23376	if err := googleapi.CheckResponse(res); err != nil {
23377		return err
23378	}
23379	return nil
23380	// {
23381	//   "description": "Deletes an existing content category.",
23382	//   "httpMethod": "DELETE",
23383	//   "id": "dfareporting.contentCategories.delete",
23384	//   "parameterOrder": [
23385	//     "profileId",
23386	//     "id"
23387	//   ],
23388	//   "parameters": {
23389	//     "id": {
23390	//       "description": "Content category ID.",
23391	//       "format": "int64",
23392	//       "location": "path",
23393	//       "required": true,
23394	//       "type": "string"
23395	//     },
23396	//     "profileId": {
23397	//       "description": "User profile ID associated with this request.",
23398	//       "format": "int64",
23399	//       "location": "path",
23400	//       "required": true,
23401	//       "type": "string"
23402	//     }
23403	//   },
23404	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
23405	//   "scopes": [
23406	//     "https://www.googleapis.com/auth/dfatrafficking"
23407	//   ]
23408	// }
23409
23410}
23411
23412// method id "dfareporting.contentCategories.get":
23413
23414type ContentCategoriesGetCall struct {
23415	s            *Service
23416	profileId    int64
23417	id           int64
23418	urlParams_   gensupport.URLParams
23419	ifNoneMatch_ string
23420	ctx_         context.Context
23421	header_      http.Header
23422}
23423
23424// Get: Gets one content category by ID.
23425func (r *ContentCategoriesService) Get(profileId int64, id int64) *ContentCategoriesGetCall {
23426	c := &ContentCategoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23427	c.profileId = profileId
23428	c.id = id
23429	return c
23430}
23431
23432// Fields allows partial responses to be retrieved. See
23433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23434// for more information.
23435func (c *ContentCategoriesGetCall) Fields(s ...googleapi.Field) *ContentCategoriesGetCall {
23436	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23437	return c
23438}
23439
23440// IfNoneMatch sets the optional parameter which makes the operation
23441// fail if the object's ETag matches the given value. This is useful for
23442// getting updates only after the object has changed since the last
23443// request. Use googleapi.IsNotModified to check whether the response
23444// error from Do is the result of In-None-Match.
23445func (c *ContentCategoriesGetCall) IfNoneMatch(entityTag string) *ContentCategoriesGetCall {
23446	c.ifNoneMatch_ = entityTag
23447	return c
23448}
23449
23450// Context sets the context to be used in this call's Do method. Any
23451// pending HTTP request will be aborted if the provided context is
23452// canceled.
23453func (c *ContentCategoriesGetCall) Context(ctx context.Context) *ContentCategoriesGetCall {
23454	c.ctx_ = ctx
23455	return c
23456}
23457
23458// Header returns an http.Header that can be modified by the caller to
23459// add HTTP headers to the request.
23460func (c *ContentCategoriesGetCall) Header() http.Header {
23461	if c.header_ == nil {
23462		c.header_ = make(http.Header)
23463	}
23464	return c.header_
23465}
23466
23467func (c *ContentCategoriesGetCall) doRequest(alt string) (*http.Response, error) {
23468	reqHeaders := make(http.Header)
23469	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23470	for k, v := range c.header_ {
23471		reqHeaders[k] = v
23472	}
23473	reqHeaders.Set("User-Agent", c.s.userAgent())
23474	if c.ifNoneMatch_ != "" {
23475		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23476	}
23477	var body io.Reader = nil
23478	c.urlParams_.Set("alt", alt)
23479	c.urlParams_.Set("prettyPrint", "false")
23480	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
23481	urls += "?" + c.urlParams_.Encode()
23482	req, err := http.NewRequest("GET", urls, body)
23483	if err != nil {
23484		return nil, err
23485	}
23486	req.Header = reqHeaders
23487	googleapi.Expand(req.URL, map[string]string{
23488		"profileId": strconv.FormatInt(c.profileId, 10),
23489		"id":        strconv.FormatInt(c.id, 10),
23490	})
23491	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23492}
23493
23494// Do executes the "dfareporting.contentCategories.get" call.
23495// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23496// status code is an error. Response headers are in either
23497// *ContentCategory.ServerResponse.Header or (if a response was returned
23498// at all) in error.(*googleapi.Error).Header. Use
23499// googleapi.IsNotModified to check whether the returned error was
23500// because http.StatusNotModified was returned.
23501func (c *ContentCategoriesGetCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23502	gensupport.SetOptions(c.urlParams_, opts...)
23503	res, err := c.doRequest("json")
23504	if res != nil && res.StatusCode == http.StatusNotModified {
23505		if res.Body != nil {
23506			res.Body.Close()
23507		}
23508		return nil, &googleapi.Error{
23509			Code:   res.StatusCode,
23510			Header: res.Header,
23511		}
23512	}
23513	if err != nil {
23514		return nil, err
23515	}
23516	defer googleapi.CloseBody(res)
23517	if err := googleapi.CheckResponse(res); err != nil {
23518		return nil, err
23519	}
23520	ret := &ContentCategory{
23521		ServerResponse: googleapi.ServerResponse{
23522			Header:         res.Header,
23523			HTTPStatusCode: res.StatusCode,
23524		},
23525	}
23526	target := &ret
23527	if err := gensupport.DecodeResponse(target, res); err != nil {
23528		return nil, err
23529	}
23530	return ret, nil
23531	// {
23532	//   "description": "Gets one content category by ID.",
23533	//   "httpMethod": "GET",
23534	//   "id": "dfareporting.contentCategories.get",
23535	//   "parameterOrder": [
23536	//     "profileId",
23537	//     "id"
23538	//   ],
23539	//   "parameters": {
23540	//     "id": {
23541	//       "description": "Content category ID.",
23542	//       "format": "int64",
23543	//       "location": "path",
23544	//       "required": true,
23545	//       "type": "string"
23546	//     },
23547	//     "profileId": {
23548	//       "description": "User profile ID associated with this request.",
23549	//       "format": "int64",
23550	//       "location": "path",
23551	//       "required": true,
23552	//       "type": "string"
23553	//     }
23554	//   },
23555	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
23556	//   "response": {
23557	//     "$ref": "ContentCategory"
23558	//   },
23559	//   "scopes": [
23560	//     "https://www.googleapis.com/auth/dfatrafficking"
23561	//   ]
23562	// }
23563
23564}
23565
23566// method id "dfareporting.contentCategories.insert":
23567
23568type ContentCategoriesInsertCall struct {
23569	s               *Service
23570	profileId       int64
23571	contentcategory *ContentCategory
23572	urlParams_      gensupport.URLParams
23573	ctx_            context.Context
23574	header_         http.Header
23575}
23576
23577// Insert: Inserts a new content category.
23578func (r *ContentCategoriesService) Insert(profileId int64, contentcategory *ContentCategory) *ContentCategoriesInsertCall {
23579	c := &ContentCategoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23580	c.profileId = profileId
23581	c.contentcategory = contentcategory
23582	return c
23583}
23584
23585// Fields allows partial responses to be retrieved. See
23586// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23587// for more information.
23588func (c *ContentCategoriesInsertCall) Fields(s ...googleapi.Field) *ContentCategoriesInsertCall {
23589	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23590	return c
23591}
23592
23593// Context sets the context to be used in this call's Do method. Any
23594// pending HTTP request will be aborted if the provided context is
23595// canceled.
23596func (c *ContentCategoriesInsertCall) Context(ctx context.Context) *ContentCategoriesInsertCall {
23597	c.ctx_ = ctx
23598	return c
23599}
23600
23601// Header returns an http.Header that can be modified by the caller to
23602// add HTTP headers to the request.
23603func (c *ContentCategoriesInsertCall) Header() http.Header {
23604	if c.header_ == nil {
23605		c.header_ = make(http.Header)
23606	}
23607	return c.header_
23608}
23609
23610func (c *ContentCategoriesInsertCall) doRequest(alt string) (*http.Response, error) {
23611	reqHeaders := make(http.Header)
23612	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23613	for k, v := range c.header_ {
23614		reqHeaders[k] = v
23615	}
23616	reqHeaders.Set("User-Agent", c.s.userAgent())
23617	var body io.Reader = nil
23618	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
23619	if err != nil {
23620		return nil, err
23621	}
23622	reqHeaders.Set("Content-Type", "application/json")
23623	c.urlParams_.Set("alt", alt)
23624	c.urlParams_.Set("prettyPrint", "false")
23625	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23626	urls += "?" + c.urlParams_.Encode()
23627	req, err := http.NewRequest("POST", urls, body)
23628	if err != nil {
23629		return nil, err
23630	}
23631	req.Header = reqHeaders
23632	googleapi.Expand(req.URL, map[string]string{
23633		"profileId": strconv.FormatInt(c.profileId, 10),
23634	})
23635	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23636}
23637
23638// Do executes the "dfareporting.contentCategories.insert" call.
23639// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23640// status code is an error. Response headers are in either
23641// *ContentCategory.ServerResponse.Header or (if a response was returned
23642// at all) in error.(*googleapi.Error).Header. Use
23643// googleapi.IsNotModified to check whether the returned error was
23644// because http.StatusNotModified was returned.
23645func (c *ContentCategoriesInsertCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23646	gensupport.SetOptions(c.urlParams_, opts...)
23647	res, err := c.doRequest("json")
23648	if res != nil && res.StatusCode == http.StatusNotModified {
23649		if res.Body != nil {
23650			res.Body.Close()
23651		}
23652		return nil, &googleapi.Error{
23653			Code:   res.StatusCode,
23654			Header: res.Header,
23655		}
23656	}
23657	if err != nil {
23658		return nil, err
23659	}
23660	defer googleapi.CloseBody(res)
23661	if err := googleapi.CheckResponse(res); err != nil {
23662		return nil, err
23663	}
23664	ret := &ContentCategory{
23665		ServerResponse: googleapi.ServerResponse{
23666			Header:         res.Header,
23667			HTTPStatusCode: res.StatusCode,
23668		},
23669	}
23670	target := &ret
23671	if err := gensupport.DecodeResponse(target, res); err != nil {
23672		return nil, err
23673	}
23674	return ret, nil
23675	// {
23676	//   "description": "Inserts a new content category.",
23677	//   "httpMethod": "POST",
23678	//   "id": "dfareporting.contentCategories.insert",
23679	//   "parameterOrder": [
23680	//     "profileId"
23681	//   ],
23682	//   "parameters": {
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	//   },
23691	//   "path": "userprofiles/{profileId}/contentCategories",
23692	//   "request": {
23693	//     "$ref": "ContentCategory"
23694	//   },
23695	//   "response": {
23696	//     "$ref": "ContentCategory"
23697	//   },
23698	//   "scopes": [
23699	//     "https://www.googleapis.com/auth/dfatrafficking"
23700	//   ]
23701	// }
23702
23703}
23704
23705// method id "dfareporting.contentCategories.list":
23706
23707type ContentCategoriesListCall struct {
23708	s            *Service
23709	profileId    int64
23710	urlParams_   gensupport.URLParams
23711	ifNoneMatch_ string
23712	ctx_         context.Context
23713	header_      http.Header
23714}
23715
23716// List: Retrieves a list of content categories, possibly filtered. This
23717// method supports paging.
23718func (r *ContentCategoriesService) List(profileId int64) *ContentCategoriesListCall {
23719	c := &ContentCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23720	c.profileId = profileId
23721	return c
23722}
23723
23724// Ids sets the optional parameter "ids": Select only content categories
23725// with these IDs.
23726func (c *ContentCategoriesListCall) Ids(ids ...int64) *ContentCategoriesListCall {
23727	var ids_ []string
23728	for _, v := range ids {
23729		ids_ = append(ids_, fmt.Sprint(v))
23730	}
23731	c.urlParams_.SetMulti("ids", ids_)
23732	return c
23733}
23734
23735// MaxResults sets the optional parameter "maxResults": Maximum number
23736// of results to return.
23737func (c *ContentCategoriesListCall) MaxResults(maxResults int64) *ContentCategoriesListCall {
23738	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23739	return c
23740}
23741
23742// PageToken sets the optional parameter "pageToken": Value of the
23743// nextPageToken from the previous result page.
23744func (c *ContentCategoriesListCall) PageToken(pageToken string) *ContentCategoriesListCall {
23745	c.urlParams_.Set("pageToken", pageToken)
23746	return c
23747}
23748
23749// SearchString sets the optional parameter "searchString": Allows
23750// searching for objects by name or ID. Wildcards (*) are allowed. For
23751// example, "contentcategory*2015" will return objects with names like
23752// "contentcategory June 2015", "contentcategory April 2015", or simply
23753// "contentcategory 2015". Most of the searches also add wildcards
23754// implicitly at the start and the end of the search string. For
23755// example, a search string of "contentcategory" will match objects with
23756// name "my contentcategory", "contentcategory 2015", or simply
23757// "contentcategory".
23758func (c *ContentCategoriesListCall) SearchString(searchString string) *ContentCategoriesListCall {
23759	c.urlParams_.Set("searchString", searchString)
23760	return c
23761}
23762
23763// SortField sets the optional parameter "sortField": Field by which to
23764// sort the list.
23765//
23766// Possible values:
23767//   "ID" (default)
23768//   "NAME"
23769func (c *ContentCategoriesListCall) SortField(sortField string) *ContentCategoriesListCall {
23770	c.urlParams_.Set("sortField", sortField)
23771	return c
23772}
23773
23774// SortOrder sets the optional parameter "sortOrder": Order of sorted
23775// results.
23776//
23777// Possible values:
23778//   "ASCENDING" (default)
23779//   "DESCENDING"
23780func (c *ContentCategoriesListCall) SortOrder(sortOrder string) *ContentCategoriesListCall {
23781	c.urlParams_.Set("sortOrder", sortOrder)
23782	return c
23783}
23784
23785// Fields allows partial responses to be retrieved. See
23786// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23787// for more information.
23788func (c *ContentCategoriesListCall) Fields(s ...googleapi.Field) *ContentCategoriesListCall {
23789	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23790	return c
23791}
23792
23793// IfNoneMatch sets the optional parameter which makes the operation
23794// fail if the object's ETag matches the given value. This is useful for
23795// getting updates only after the object has changed since the last
23796// request. Use googleapi.IsNotModified to check whether the response
23797// error from Do is the result of In-None-Match.
23798func (c *ContentCategoriesListCall) IfNoneMatch(entityTag string) *ContentCategoriesListCall {
23799	c.ifNoneMatch_ = entityTag
23800	return c
23801}
23802
23803// Context sets the context to be used in this call's Do method. Any
23804// pending HTTP request will be aborted if the provided context is
23805// canceled.
23806func (c *ContentCategoriesListCall) Context(ctx context.Context) *ContentCategoriesListCall {
23807	c.ctx_ = ctx
23808	return c
23809}
23810
23811// Header returns an http.Header that can be modified by the caller to
23812// add HTTP headers to the request.
23813func (c *ContentCategoriesListCall) Header() http.Header {
23814	if c.header_ == nil {
23815		c.header_ = make(http.Header)
23816	}
23817	return c.header_
23818}
23819
23820func (c *ContentCategoriesListCall) doRequest(alt string) (*http.Response, error) {
23821	reqHeaders := make(http.Header)
23822	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23823	for k, v := range c.header_ {
23824		reqHeaders[k] = v
23825	}
23826	reqHeaders.Set("User-Agent", c.s.userAgent())
23827	if c.ifNoneMatch_ != "" {
23828		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23829	}
23830	var body io.Reader = nil
23831	c.urlParams_.Set("alt", alt)
23832	c.urlParams_.Set("prettyPrint", "false")
23833	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23834	urls += "?" + c.urlParams_.Encode()
23835	req, err := http.NewRequest("GET", urls, body)
23836	if err != nil {
23837		return nil, err
23838	}
23839	req.Header = reqHeaders
23840	googleapi.Expand(req.URL, map[string]string{
23841		"profileId": strconv.FormatInt(c.profileId, 10),
23842	})
23843	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23844}
23845
23846// Do executes the "dfareporting.contentCategories.list" call.
23847// Exactly one of *ContentCategoriesListResponse or error will be
23848// non-nil. Any non-2xx status code is an error. Response headers are in
23849// either *ContentCategoriesListResponse.ServerResponse.Header or (if a
23850// response was returned at all) in error.(*googleapi.Error).Header. Use
23851// googleapi.IsNotModified to check whether the returned error was
23852// because http.StatusNotModified was returned.
23853func (c *ContentCategoriesListCall) Do(opts ...googleapi.CallOption) (*ContentCategoriesListResponse, error) {
23854	gensupport.SetOptions(c.urlParams_, opts...)
23855	res, err := c.doRequest("json")
23856	if res != nil && res.StatusCode == http.StatusNotModified {
23857		if res.Body != nil {
23858			res.Body.Close()
23859		}
23860		return nil, &googleapi.Error{
23861			Code:   res.StatusCode,
23862			Header: res.Header,
23863		}
23864	}
23865	if err != nil {
23866		return nil, err
23867	}
23868	defer googleapi.CloseBody(res)
23869	if err := googleapi.CheckResponse(res); err != nil {
23870		return nil, err
23871	}
23872	ret := &ContentCategoriesListResponse{
23873		ServerResponse: googleapi.ServerResponse{
23874			Header:         res.Header,
23875			HTTPStatusCode: res.StatusCode,
23876		},
23877	}
23878	target := &ret
23879	if err := gensupport.DecodeResponse(target, res); err != nil {
23880		return nil, err
23881	}
23882	return ret, nil
23883	// {
23884	//   "description": "Retrieves a list of content categories, possibly filtered. This method supports paging.",
23885	//   "httpMethod": "GET",
23886	//   "id": "dfareporting.contentCategories.list",
23887	//   "parameterOrder": [
23888	//     "profileId"
23889	//   ],
23890	//   "parameters": {
23891	//     "ids": {
23892	//       "description": "Select only content categories with these IDs.",
23893	//       "format": "int64",
23894	//       "location": "query",
23895	//       "repeated": true,
23896	//       "type": "string"
23897	//     },
23898	//     "maxResults": {
23899	//       "default": "1000",
23900	//       "description": "Maximum number of results to return.",
23901	//       "format": "int32",
23902	//       "location": "query",
23903	//       "maximum": "1000",
23904	//       "minimum": "0",
23905	//       "type": "integer"
23906	//     },
23907	//     "pageToken": {
23908	//       "description": "Value of the nextPageToken from the previous result page.",
23909	//       "location": "query",
23910	//       "type": "string"
23911	//     },
23912	//     "profileId": {
23913	//       "description": "User profile ID associated with this request.",
23914	//       "format": "int64",
23915	//       "location": "path",
23916	//       "required": true,
23917	//       "type": "string"
23918	//     },
23919	//     "searchString": {
23920	//       "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\".",
23921	//       "location": "query",
23922	//       "type": "string"
23923	//     },
23924	//     "sortField": {
23925	//       "default": "ID",
23926	//       "description": "Field by which to sort the list.",
23927	//       "enum": [
23928	//         "ID",
23929	//         "NAME"
23930	//       ],
23931	//       "enumDescriptions": [
23932	//         "",
23933	//         ""
23934	//       ],
23935	//       "location": "query",
23936	//       "type": "string"
23937	//     },
23938	//     "sortOrder": {
23939	//       "default": "ASCENDING",
23940	//       "description": "Order of sorted results.",
23941	//       "enum": [
23942	//         "ASCENDING",
23943	//         "DESCENDING"
23944	//       ],
23945	//       "enumDescriptions": [
23946	//         "",
23947	//         ""
23948	//       ],
23949	//       "location": "query",
23950	//       "type": "string"
23951	//     }
23952	//   },
23953	//   "path": "userprofiles/{profileId}/contentCategories",
23954	//   "response": {
23955	//     "$ref": "ContentCategoriesListResponse"
23956	//   },
23957	//   "scopes": [
23958	//     "https://www.googleapis.com/auth/dfatrafficking"
23959	//   ]
23960	// }
23961
23962}
23963
23964// Pages invokes f for each page of results.
23965// A non-nil error returned from f will halt the iteration.
23966// The provided context supersedes any context provided to the Context method.
23967func (c *ContentCategoriesListCall) Pages(ctx context.Context, f func(*ContentCategoriesListResponse) error) error {
23968	c.ctx_ = ctx
23969	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23970	for {
23971		x, err := c.Do()
23972		if err != nil {
23973			return err
23974		}
23975		if err := f(x); err != nil {
23976			return err
23977		}
23978		if x.NextPageToken == "" {
23979			return nil
23980		}
23981		c.PageToken(x.NextPageToken)
23982	}
23983}
23984
23985// method id "dfareporting.contentCategories.patch":
23986
23987type ContentCategoriesPatchCall struct {
23988	s               *Service
23989	profileId       int64
23990	contentcategory *ContentCategory
23991	urlParams_      gensupport.URLParams
23992	ctx_            context.Context
23993	header_         http.Header
23994}
23995
23996// Patch: Updates an existing content category. This method supports
23997// patch semantics.
23998func (r *ContentCategoriesService) Patch(profileId int64, id int64, contentcategory *ContentCategory) *ContentCategoriesPatchCall {
23999	c := &ContentCategoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24000	c.profileId = profileId
24001	c.urlParams_.Set("id", fmt.Sprint(id))
24002	c.contentcategory = contentcategory
24003	return c
24004}
24005
24006// Fields allows partial responses to be retrieved. See
24007// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24008// for more information.
24009func (c *ContentCategoriesPatchCall) Fields(s ...googleapi.Field) *ContentCategoriesPatchCall {
24010	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24011	return c
24012}
24013
24014// Context sets the context to be used in this call's Do method. Any
24015// pending HTTP request will be aborted if the provided context is
24016// canceled.
24017func (c *ContentCategoriesPatchCall) Context(ctx context.Context) *ContentCategoriesPatchCall {
24018	c.ctx_ = ctx
24019	return c
24020}
24021
24022// Header returns an http.Header that can be modified by the caller to
24023// add HTTP headers to the request.
24024func (c *ContentCategoriesPatchCall) Header() http.Header {
24025	if c.header_ == nil {
24026		c.header_ = make(http.Header)
24027	}
24028	return c.header_
24029}
24030
24031func (c *ContentCategoriesPatchCall) doRequest(alt string) (*http.Response, error) {
24032	reqHeaders := make(http.Header)
24033	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24034	for k, v := range c.header_ {
24035		reqHeaders[k] = v
24036	}
24037	reqHeaders.Set("User-Agent", c.s.userAgent())
24038	var body io.Reader = nil
24039	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
24040	if err != nil {
24041		return nil, err
24042	}
24043	reqHeaders.Set("Content-Type", "application/json")
24044	c.urlParams_.Set("alt", alt)
24045	c.urlParams_.Set("prettyPrint", "false")
24046	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
24047	urls += "?" + c.urlParams_.Encode()
24048	req, err := http.NewRequest("PATCH", urls, body)
24049	if err != nil {
24050		return nil, err
24051	}
24052	req.Header = reqHeaders
24053	googleapi.Expand(req.URL, map[string]string{
24054		"profileId": strconv.FormatInt(c.profileId, 10),
24055	})
24056	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24057}
24058
24059// Do executes the "dfareporting.contentCategories.patch" call.
24060// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
24061// status code is an error. Response headers are in either
24062// *ContentCategory.ServerResponse.Header or (if a response was returned
24063// at all) in error.(*googleapi.Error).Header. Use
24064// googleapi.IsNotModified to check whether the returned error was
24065// because http.StatusNotModified was returned.
24066func (c *ContentCategoriesPatchCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
24067	gensupport.SetOptions(c.urlParams_, opts...)
24068	res, err := c.doRequest("json")
24069	if res != nil && res.StatusCode == http.StatusNotModified {
24070		if res.Body != nil {
24071			res.Body.Close()
24072		}
24073		return nil, &googleapi.Error{
24074			Code:   res.StatusCode,
24075			Header: res.Header,
24076		}
24077	}
24078	if err != nil {
24079		return nil, err
24080	}
24081	defer googleapi.CloseBody(res)
24082	if err := googleapi.CheckResponse(res); err != nil {
24083		return nil, err
24084	}
24085	ret := &ContentCategory{
24086		ServerResponse: googleapi.ServerResponse{
24087			Header:         res.Header,
24088			HTTPStatusCode: res.StatusCode,
24089		},
24090	}
24091	target := &ret
24092	if err := gensupport.DecodeResponse(target, res); err != nil {
24093		return nil, err
24094	}
24095	return ret, nil
24096	// {
24097	//   "description": "Updates an existing content category. This method supports patch semantics.",
24098	//   "httpMethod": "PATCH",
24099	//   "id": "dfareporting.contentCategories.patch",
24100	//   "parameterOrder": [
24101	//     "profileId",
24102	//     "id"
24103	//   ],
24104	//   "parameters": {
24105	//     "id": {
24106	//       "description": "Content category ID.",
24107	//       "format": "int64",
24108	//       "location": "query",
24109	//       "required": true,
24110	//       "type": "string"
24111	//     },
24112	//     "profileId": {
24113	//       "description": "User profile ID associated with this request.",
24114	//       "format": "int64",
24115	//       "location": "path",
24116	//       "required": true,
24117	//       "type": "string"
24118	//     }
24119	//   },
24120	//   "path": "userprofiles/{profileId}/contentCategories",
24121	//   "request": {
24122	//     "$ref": "ContentCategory"
24123	//   },
24124	//   "response": {
24125	//     "$ref": "ContentCategory"
24126	//   },
24127	//   "scopes": [
24128	//     "https://www.googleapis.com/auth/dfatrafficking"
24129	//   ]
24130	// }
24131
24132}
24133
24134// method id "dfareporting.contentCategories.update":
24135
24136type ContentCategoriesUpdateCall struct {
24137	s               *Service
24138	profileId       int64
24139	contentcategory *ContentCategory
24140	urlParams_      gensupport.URLParams
24141	ctx_            context.Context
24142	header_         http.Header
24143}
24144
24145// Update: Updates an existing content category.
24146func (r *ContentCategoriesService) Update(profileId int64, contentcategory *ContentCategory) *ContentCategoriesUpdateCall {
24147	c := &ContentCategoriesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24148	c.profileId = profileId
24149	c.contentcategory = contentcategory
24150	return c
24151}
24152
24153// Fields allows partial responses to be retrieved. See
24154// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24155// for more information.
24156func (c *ContentCategoriesUpdateCall) Fields(s ...googleapi.Field) *ContentCategoriesUpdateCall {
24157	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24158	return c
24159}
24160
24161// Context sets the context to be used in this call's Do method. Any
24162// pending HTTP request will be aborted if the provided context is
24163// canceled.
24164func (c *ContentCategoriesUpdateCall) Context(ctx context.Context) *ContentCategoriesUpdateCall {
24165	c.ctx_ = ctx
24166	return c
24167}
24168
24169// Header returns an http.Header that can be modified by the caller to
24170// add HTTP headers to the request.
24171func (c *ContentCategoriesUpdateCall) Header() http.Header {
24172	if c.header_ == nil {
24173		c.header_ = make(http.Header)
24174	}
24175	return c.header_
24176}
24177
24178func (c *ContentCategoriesUpdateCall) doRequest(alt string) (*http.Response, error) {
24179	reqHeaders := make(http.Header)
24180	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24181	for k, v := range c.header_ {
24182		reqHeaders[k] = v
24183	}
24184	reqHeaders.Set("User-Agent", c.s.userAgent())
24185	var body io.Reader = nil
24186	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
24187	if err != nil {
24188		return nil, err
24189	}
24190	reqHeaders.Set("Content-Type", "application/json")
24191	c.urlParams_.Set("alt", alt)
24192	c.urlParams_.Set("prettyPrint", "false")
24193	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
24194	urls += "?" + c.urlParams_.Encode()
24195	req, err := http.NewRequest("PUT", urls, body)
24196	if err != nil {
24197		return nil, err
24198	}
24199	req.Header = reqHeaders
24200	googleapi.Expand(req.URL, map[string]string{
24201		"profileId": strconv.FormatInt(c.profileId, 10),
24202	})
24203	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24204}
24205
24206// Do executes the "dfareporting.contentCategories.update" call.
24207// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
24208// status code is an error. Response headers are in either
24209// *ContentCategory.ServerResponse.Header or (if a response was returned
24210// at all) in error.(*googleapi.Error).Header. Use
24211// googleapi.IsNotModified to check whether the returned error was
24212// because http.StatusNotModified was returned.
24213func (c *ContentCategoriesUpdateCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
24214	gensupport.SetOptions(c.urlParams_, opts...)
24215	res, err := c.doRequest("json")
24216	if res != nil && res.StatusCode == http.StatusNotModified {
24217		if res.Body != nil {
24218			res.Body.Close()
24219		}
24220		return nil, &googleapi.Error{
24221			Code:   res.StatusCode,
24222			Header: res.Header,
24223		}
24224	}
24225	if err != nil {
24226		return nil, err
24227	}
24228	defer googleapi.CloseBody(res)
24229	if err := googleapi.CheckResponse(res); err != nil {
24230		return nil, err
24231	}
24232	ret := &ContentCategory{
24233		ServerResponse: googleapi.ServerResponse{
24234			Header:         res.Header,
24235			HTTPStatusCode: res.StatusCode,
24236		},
24237	}
24238	target := &ret
24239	if err := gensupport.DecodeResponse(target, res); err != nil {
24240		return nil, err
24241	}
24242	return ret, nil
24243	// {
24244	//   "description": "Updates an existing content category.",
24245	//   "httpMethod": "PUT",
24246	//   "id": "dfareporting.contentCategories.update",
24247	//   "parameterOrder": [
24248	//     "profileId"
24249	//   ],
24250	//   "parameters": {
24251	//     "profileId": {
24252	//       "description": "User profile ID associated with this request.",
24253	//       "format": "int64",
24254	//       "location": "path",
24255	//       "required": true,
24256	//       "type": "string"
24257	//     }
24258	//   },
24259	//   "path": "userprofiles/{profileId}/contentCategories",
24260	//   "request": {
24261	//     "$ref": "ContentCategory"
24262	//   },
24263	//   "response": {
24264	//     "$ref": "ContentCategory"
24265	//   },
24266	//   "scopes": [
24267	//     "https://www.googleapis.com/auth/dfatrafficking"
24268	//   ]
24269	// }
24270
24271}
24272
24273// method id "dfareporting.conversions.batchinsert":
24274
24275type ConversionsBatchinsertCall struct {
24276	s                             *Service
24277	profileId                     int64
24278	conversionsbatchinsertrequest *ConversionsBatchInsertRequest
24279	urlParams_                    gensupport.URLParams
24280	ctx_                          context.Context
24281	header_                       http.Header
24282}
24283
24284// Batchinsert: Inserts conversions.
24285func (r *ConversionsService) Batchinsert(profileId int64, conversionsbatchinsertrequest *ConversionsBatchInsertRequest) *ConversionsBatchinsertCall {
24286	c := &ConversionsBatchinsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24287	c.profileId = profileId
24288	c.conversionsbatchinsertrequest = conversionsbatchinsertrequest
24289	return c
24290}
24291
24292// Fields allows partial responses to be retrieved. See
24293// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24294// for more information.
24295func (c *ConversionsBatchinsertCall) Fields(s ...googleapi.Field) *ConversionsBatchinsertCall {
24296	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24297	return c
24298}
24299
24300// Context sets the context to be used in this call's Do method. Any
24301// pending HTTP request will be aborted if the provided context is
24302// canceled.
24303func (c *ConversionsBatchinsertCall) Context(ctx context.Context) *ConversionsBatchinsertCall {
24304	c.ctx_ = ctx
24305	return c
24306}
24307
24308// Header returns an http.Header that can be modified by the caller to
24309// add HTTP headers to the request.
24310func (c *ConversionsBatchinsertCall) Header() http.Header {
24311	if c.header_ == nil {
24312		c.header_ = make(http.Header)
24313	}
24314	return c.header_
24315}
24316
24317func (c *ConversionsBatchinsertCall) doRequest(alt string) (*http.Response, error) {
24318	reqHeaders := make(http.Header)
24319	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24320	for k, v := range c.header_ {
24321		reqHeaders[k] = v
24322	}
24323	reqHeaders.Set("User-Agent", c.s.userAgent())
24324	var body io.Reader = nil
24325	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchinsertrequest)
24326	if err != nil {
24327		return nil, err
24328	}
24329	reqHeaders.Set("Content-Type", "application/json")
24330	c.urlParams_.Set("alt", alt)
24331	c.urlParams_.Set("prettyPrint", "false")
24332	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchinsert")
24333	urls += "?" + c.urlParams_.Encode()
24334	req, err := http.NewRequest("POST", urls, body)
24335	if err != nil {
24336		return nil, err
24337	}
24338	req.Header = reqHeaders
24339	googleapi.Expand(req.URL, map[string]string{
24340		"profileId": strconv.FormatInt(c.profileId, 10),
24341	})
24342	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24343}
24344
24345// Do executes the "dfareporting.conversions.batchinsert" call.
24346// Exactly one of *ConversionsBatchInsertResponse or error will be
24347// non-nil. Any non-2xx status code is an error. Response headers are in
24348// either *ConversionsBatchInsertResponse.ServerResponse.Header or (if a
24349// response was returned at all) in error.(*googleapi.Error).Header. Use
24350// googleapi.IsNotModified to check whether the returned error was
24351// because http.StatusNotModified was returned.
24352func (c *ConversionsBatchinsertCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchInsertResponse, error) {
24353	gensupport.SetOptions(c.urlParams_, opts...)
24354	res, err := c.doRequest("json")
24355	if res != nil && res.StatusCode == http.StatusNotModified {
24356		if res.Body != nil {
24357			res.Body.Close()
24358		}
24359		return nil, &googleapi.Error{
24360			Code:   res.StatusCode,
24361			Header: res.Header,
24362		}
24363	}
24364	if err != nil {
24365		return nil, err
24366	}
24367	defer googleapi.CloseBody(res)
24368	if err := googleapi.CheckResponse(res); err != nil {
24369		return nil, err
24370	}
24371	ret := &ConversionsBatchInsertResponse{
24372		ServerResponse: googleapi.ServerResponse{
24373			Header:         res.Header,
24374			HTTPStatusCode: res.StatusCode,
24375		},
24376	}
24377	target := &ret
24378	if err := gensupport.DecodeResponse(target, res); err != nil {
24379		return nil, err
24380	}
24381	return ret, nil
24382	// {
24383	//   "description": "Inserts conversions.",
24384	//   "httpMethod": "POST",
24385	//   "id": "dfareporting.conversions.batchinsert",
24386	//   "parameterOrder": [
24387	//     "profileId"
24388	//   ],
24389	//   "parameters": {
24390	//     "profileId": {
24391	//       "description": "User profile ID associated with this request.",
24392	//       "format": "int64",
24393	//       "location": "path",
24394	//       "required": true,
24395	//       "type": "string"
24396	//     }
24397	//   },
24398	//   "path": "userprofiles/{profileId}/conversions/batchinsert",
24399	//   "request": {
24400	//     "$ref": "ConversionsBatchInsertRequest"
24401	//   },
24402	//   "response": {
24403	//     "$ref": "ConversionsBatchInsertResponse"
24404	//   },
24405	//   "scopes": [
24406	//     "https://www.googleapis.com/auth/ddmconversions"
24407	//   ]
24408	// }
24409
24410}
24411
24412// method id "dfareporting.conversions.batchupdate":
24413
24414type ConversionsBatchupdateCall struct {
24415	s                             *Service
24416	profileId                     int64
24417	conversionsbatchupdaterequest *ConversionsBatchUpdateRequest
24418	urlParams_                    gensupport.URLParams
24419	ctx_                          context.Context
24420	header_                       http.Header
24421}
24422
24423// Batchupdate: Updates existing conversions.
24424func (r *ConversionsService) Batchupdate(profileId int64, conversionsbatchupdaterequest *ConversionsBatchUpdateRequest) *ConversionsBatchupdateCall {
24425	c := &ConversionsBatchupdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24426	c.profileId = profileId
24427	c.conversionsbatchupdaterequest = conversionsbatchupdaterequest
24428	return c
24429}
24430
24431// Fields allows partial responses to be retrieved. See
24432// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24433// for more information.
24434func (c *ConversionsBatchupdateCall) Fields(s ...googleapi.Field) *ConversionsBatchupdateCall {
24435	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24436	return c
24437}
24438
24439// Context sets the context to be used in this call's Do method. Any
24440// pending HTTP request will be aborted if the provided context is
24441// canceled.
24442func (c *ConversionsBatchupdateCall) Context(ctx context.Context) *ConversionsBatchupdateCall {
24443	c.ctx_ = ctx
24444	return c
24445}
24446
24447// Header returns an http.Header that can be modified by the caller to
24448// add HTTP headers to the request.
24449func (c *ConversionsBatchupdateCall) Header() http.Header {
24450	if c.header_ == nil {
24451		c.header_ = make(http.Header)
24452	}
24453	return c.header_
24454}
24455
24456func (c *ConversionsBatchupdateCall) doRequest(alt string) (*http.Response, error) {
24457	reqHeaders := make(http.Header)
24458	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24459	for k, v := range c.header_ {
24460		reqHeaders[k] = v
24461	}
24462	reqHeaders.Set("User-Agent", c.s.userAgent())
24463	var body io.Reader = nil
24464	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchupdaterequest)
24465	if err != nil {
24466		return nil, err
24467	}
24468	reqHeaders.Set("Content-Type", "application/json")
24469	c.urlParams_.Set("alt", alt)
24470	c.urlParams_.Set("prettyPrint", "false")
24471	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchupdate")
24472	urls += "?" + c.urlParams_.Encode()
24473	req, err := http.NewRequest("POST", urls, body)
24474	if err != nil {
24475		return nil, err
24476	}
24477	req.Header = reqHeaders
24478	googleapi.Expand(req.URL, map[string]string{
24479		"profileId": strconv.FormatInt(c.profileId, 10),
24480	})
24481	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24482}
24483
24484// Do executes the "dfareporting.conversions.batchupdate" call.
24485// Exactly one of *ConversionsBatchUpdateResponse or error will be
24486// non-nil. Any non-2xx status code is an error. Response headers are in
24487// either *ConversionsBatchUpdateResponse.ServerResponse.Header or (if a
24488// response was returned at all) in error.(*googleapi.Error).Header. Use
24489// googleapi.IsNotModified to check whether the returned error was
24490// because http.StatusNotModified was returned.
24491func (c *ConversionsBatchupdateCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchUpdateResponse, error) {
24492	gensupport.SetOptions(c.urlParams_, opts...)
24493	res, err := c.doRequest("json")
24494	if res != nil && res.StatusCode == http.StatusNotModified {
24495		if res.Body != nil {
24496			res.Body.Close()
24497		}
24498		return nil, &googleapi.Error{
24499			Code:   res.StatusCode,
24500			Header: res.Header,
24501		}
24502	}
24503	if err != nil {
24504		return nil, err
24505	}
24506	defer googleapi.CloseBody(res)
24507	if err := googleapi.CheckResponse(res); err != nil {
24508		return nil, err
24509	}
24510	ret := &ConversionsBatchUpdateResponse{
24511		ServerResponse: googleapi.ServerResponse{
24512			Header:         res.Header,
24513			HTTPStatusCode: res.StatusCode,
24514		},
24515	}
24516	target := &ret
24517	if err := gensupport.DecodeResponse(target, res); err != nil {
24518		return nil, err
24519	}
24520	return ret, nil
24521	// {
24522	//   "description": "Updates existing conversions.",
24523	//   "httpMethod": "POST",
24524	//   "id": "dfareporting.conversions.batchupdate",
24525	//   "parameterOrder": [
24526	//     "profileId"
24527	//   ],
24528	//   "parameters": {
24529	//     "profileId": {
24530	//       "description": "User profile ID associated with this request.",
24531	//       "format": "int64",
24532	//       "location": "path",
24533	//       "required": true,
24534	//       "type": "string"
24535	//     }
24536	//   },
24537	//   "path": "userprofiles/{profileId}/conversions/batchupdate",
24538	//   "request": {
24539	//     "$ref": "ConversionsBatchUpdateRequest"
24540	//   },
24541	//   "response": {
24542	//     "$ref": "ConversionsBatchUpdateResponse"
24543	//   },
24544	//   "scopes": [
24545	//     "https://www.googleapis.com/auth/ddmconversions"
24546	//   ]
24547	// }
24548
24549}
24550
24551// method id "dfareporting.countries.get":
24552
24553type CountriesGetCall struct {
24554	s            *Service
24555	profileId    int64
24556	dartId       int64
24557	urlParams_   gensupport.URLParams
24558	ifNoneMatch_ string
24559	ctx_         context.Context
24560	header_      http.Header
24561}
24562
24563// Get: Gets one country by ID.
24564func (r *CountriesService) Get(profileId int64, dartId int64) *CountriesGetCall {
24565	c := &CountriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24566	c.profileId = profileId
24567	c.dartId = dartId
24568	return c
24569}
24570
24571// Fields allows partial responses to be retrieved. See
24572// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24573// for more information.
24574func (c *CountriesGetCall) Fields(s ...googleapi.Field) *CountriesGetCall {
24575	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24576	return c
24577}
24578
24579// IfNoneMatch sets the optional parameter which makes the operation
24580// fail if the object's ETag matches the given value. This is useful for
24581// getting updates only after the object has changed since the last
24582// request. Use googleapi.IsNotModified to check whether the response
24583// error from Do is the result of In-None-Match.
24584func (c *CountriesGetCall) IfNoneMatch(entityTag string) *CountriesGetCall {
24585	c.ifNoneMatch_ = entityTag
24586	return c
24587}
24588
24589// Context sets the context to be used in this call's Do method. Any
24590// pending HTTP request will be aborted if the provided context is
24591// canceled.
24592func (c *CountriesGetCall) Context(ctx context.Context) *CountriesGetCall {
24593	c.ctx_ = ctx
24594	return c
24595}
24596
24597// Header returns an http.Header that can be modified by the caller to
24598// add HTTP headers to the request.
24599func (c *CountriesGetCall) Header() http.Header {
24600	if c.header_ == nil {
24601		c.header_ = make(http.Header)
24602	}
24603	return c.header_
24604}
24605
24606func (c *CountriesGetCall) doRequest(alt string) (*http.Response, error) {
24607	reqHeaders := make(http.Header)
24608	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24609	for k, v := range c.header_ {
24610		reqHeaders[k] = v
24611	}
24612	reqHeaders.Set("User-Agent", c.s.userAgent())
24613	if c.ifNoneMatch_ != "" {
24614		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24615	}
24616	var body io.Reader = nil
24617	c.urlParams_.Set("alt", alt)
24618	c.urlParams_.Set("prettyPrint", "false")
24619	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries/{dartId}")
24620	urls += "?" + c.urlParams_.Encode()
24621	req, err := http.NewRequest("GET", urls, body)
24622	if err != nil {
24623		return nil, err
24624	}
24625	req.Header = reqHeaders
24626	googleapi.Expand(req.URL, map[string]string{
24627		"profileId": strconv.FormatInt(c.profileId, 10),
24628		"dartId":    strconv.FormatInt(c.dartId, 10),
24629	})
24630	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24631}
24632
24633// Do executes the "dfareporting.countries.get" call.
24634// Exactly one of *Country or error will be non-nil. Any non-2xx status
24635// code is an error. Response headers are in either
24636// *Country.ServerResponse.Header or (if a response was returned at all)
24637// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
24638// check whether the returned error was because http.StatusNotModified
24639// was returned.
24640func (c *CountriesGetCall) Do(opts ...googleapi.CallOption) (*Country, error) {
24641	gensupport.SetOptions(c.urlParams_, opts...)
24642	res, err := c.doRequest("json")
24643	if res != nil && res.StatusCode == http.StatusNotModified {
24644		if res.Body != nil {
24645			res.Body.Close()
24646		}
24647		return nil, &googleapi.Error{
24648			Code:   res.StatusCode,
24649			Header: res.Header,
24650		}
24651	}
24652	if err != nil {
24653		return nil, err
24654	}
24655	defer googleapi.CloseBody(res)
24656	if err := googleapi.CheckResponse(res); err != nil {
24657		return nil, err
24658	}
24659	ret := &Country{
24660		ServerResponse: googleapi.ServerResponse{
24661			Header:         res.Header,
24662			HTTPStatusCode: res.StatusCode,
24663		},
24664	}
24665	target := &ret
24666	if err := gensupport.DecodeResponse(target, res); err != nil {
24667		return nil, err
24668	}
24669	return ret, nil
24670	// {
24671	//   "description": "Gets one country by ID.",
24672	//   "httpMethod": "GET",
24673	//   "id": "dfareporting.countries.get",
24674	//   "parameterOrder": [
24675	//     "profileId",
24676	//     "dartId"
24677	//   ],
24678	//   "parameters": {
24679	//     "dartId": {
24680	//       "description": "Country DART ID.",
24681	//       "format": "int64",
24682	//       "location": "path",
24683	//       "required": true,
24684	//       "type": "string"
24685	//     },
24686	//     "profileId": {
24687	//       "description": "User profile ID associated with this request.",
24688	//       "format": "int64",
24689	//       "location": "path",
24690	//       "required": true,
24691	//       "type": "string"
24692	//     }
24693	//   },
24694	//   "path": "userprofiles/{profileId}/countries/{dartId}",
24695	//   "response": {
24696	//     "$ref": "Country"
24697	//   },
24698	//   "scopes": [
24699	//     "https://www.googleapis.com/auth/dfatrafficking"
24700	//   ]
24701	// }
24702
24703}
24704
24705// method id "dfareporting.countries.list":
24706
24707type CountriesListCall struct {
24708	s            *Service
24709	profileId    int64
24710	urlParams_   gensupport.URLParams
24711	ifNoneMatch_ string
24712	ctx_         context.Context
24713	header_      http.Header
24714}
24715
24716// List: Retrieves a list of countries.
24717func (r *CountriesService) List(profileId int64) *CountriesListCall {
24718	c := &CountriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24719	c.profileId = profileId
24720	return c
24721}
24722
24723// Fields allows partial responses to be retrieved. See
24724// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24725// for more information.
24726func (c *CountriesListCall) Fields(s ...googleapi.Field) *CountriesListCall {
24727	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24728	return c
24729}
24730
24731// IfNoneMatch sets the optional parameter which makes the operation
24732// fail if the object's ETag matches the given value. This is useful for
24733// getting updates only after the object has changed since the last
24734// request. Use googleapi.IsNotModified to check whether the response
24735// error from Do is the result of In-None-Match.
24736func (c *CountriesListCall) IfNoneMatch(entityTag string) *CountriesListCall {
24737	c.ifNoneMatch_ = entityTag
24738	return c
24739}
24740
24741// Context sets the context to be used in this call's Do method. Any
24742// pending HTTP request will be aborted if the provided context is
24743// canceled.
24744func (c *CountriesListCall) Context(ctx context.Context) *CountriesListCall {
24745	c.ctx_ = ctx
24746	return c
24747}
24748
24749// Header returns an http.Header that can be modified by the caller to
24750// add HTTP headers to the request.
24751func (c *CountriesListCall) Header() http.Header {
24752	if c.header_ == nil {
24753		c.header_ = make(http.Header)
24754	}
24755	return c.header_
24756}
24757
24758func (c *CountriesListCall) doRequest(alt string) (*http.Response, error) {
24759	reqHeaders := make(http.Header)
24760	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24761	for k, v := range c.header_ {
24762		reqHeaders[k] = v
24763	}
24764	reqHeaders.Set("User-Agent", c.s.userAgent())
24765	if c.ifNoneMatch_ != "" {
24766		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24767	}
24768	var body io.Reader = nil
24769	c.urlParams_.Set("alt", alt)
24770	c.urlParams_.Set("prettyPrint", "false")
24771	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries")
24772	urls += "?" + c.urlParams_.Encode()
24773	req, err := http.NewRequest("GET", urls, body)
24774	if err != nil {
24775		return nil, err
24776	}
24777	req.Header = reqHeaders
24778	googleapi.Expand(req.URL, map[string]string{
24779		"profileId": strconv.FormatInt(c.profileId, 10),
24780	})
24781	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24782}
24783
24784// Do executes the "dfareporting.countries.list" call.
24785// Exactly one of *CountriesListResponse or error will be non-nil. Any
24786// non-2xx status code is an error. Response headers are in either
24787// *CountriesListResponse.ServerResponse.Header or (if a response was
24788// returned at all) in error.(*googleapi.Error).Header. Use
24789// googleapi.IsNotModified to check whether the returned error was
24790// because http.StatusNotModified was returned.
24791func (c *CountriesListCall) Do(opts ...googleapi.CallOption) (*CountriesListResponse, error) {
24792	gensupport.SetOptions(c.urlParams_, opts...)
24793	res, err := c.doRequest("json")
24794	if res != nil && res.StatusCode == http.StatusNotModified {
24795		if res.Body != nil {
24796			res.Body.Close()
24797		}
24798		return nil, &googleapi.Error{
24799			Code:   res.StatusCode,
24800			Header: res.Header,
24801		}
24802	}
24803	if err != nil {
24804		return nil, err
24805	}
24806	defer googleapi.CloseBody(res)
24807	if err := googleapi.CheckResponse(res); err != nil {
24808		return nil, err
24809	}
24810	ret := &CountriesListResponse{
24811		ServerResponse: googleapi.ServerResponse{
24812			Header:         res.Header,
24813			HTTPStatusCode: res.StatusCode,
24814		},
24815	}
24816	target := &ret
24817	if err := gensupport.DecodeResponse(target, res); err != nil {
24818		return nil, err
24819	}
24820	return ret, nil
24821	// {
24822	//   "description": "Retrieves a list of countries.",
24823	//   "httpMethod": "GET",
24824	//   "id": "dfareporting.countries.list",
24825	//   "parameterOrder": [
24826	//     "profileId"
24827	//   ],
24828	//   "parameters": {
24829	//     "profileId": {
24830	//       "description": "User profile ID associated with this request.",
24831	//       "format": "int64",
24832	//       "location": "path",
24833	//       "required": true,
24834	//       "type": "string"
24835	//     }
24836	//   },
24837	//   "path": "userprofiles/{profileId}/countries",
24838	//   "response": {
24839	//     "$ref": "CountriesListResponse"
24840	//   },
24841	//   "scopes": [
24842	//     "https://www.googleapis.com/auth/dfatrafficking"
24843	//   ]
24844	// }
24845
24846}
24847
24848// method id "dfareporting.creativeAssets.insert":
24849
24850type CreativeAssetsInsertCall struct {
24851	s                     *Service
24852	profileId             int64
24853	advertiserId          int64
24854	creativeassetmetadata *CreativeAssetMetadata
24855	urlParams_            gensupport.URLParams
24856	mediaInfo_            *gensupport.MediaInfo
24857	ctx_                  context.Context
24858	header_               http.Header
24859}
24860
24861// Insert: Inserts a new creative asset.
24862func (r *CreativeAssetsService) Insert(profileId int64, advertiserId int64, creativeassetmetadata *CreativeAssetMetadata) *CreativeAssetsInsertCall {
24863	c := &CreativeAssetsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24864	c.profileId = profileId
24865	c.advertiserId = advertiserId
24866	c.creativeassetmetadata = creativeassetmetadata
24867	return c
24868}
24869
24870// Media specifies the media to upload in one or more chunks. The chunk
24871// size may be controlled by supplying a MediaOption generated by
24872// googleapi.ChunkSize. The chunk size defaults to
24873// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
24874// upload request will be determined by sniffing the contents of r,
24875// unless a MediaOption generated by googleapi.ContentType is
24876// supplied.
24877// At most one of Media and ResumableMedia may be set.
24878func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CreativeAssetsInsertCall {
24879	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
24880	return c
24881}
24882
24883// ResumableMedia specifies the media to upload in chunks and can be
24884// canceled with ctx.
24885//
24886// Deprecated: use Media instead.
24887//
24888// At most one of Media and ResumableMedia may be set. mediaType
24889// identifies the MIME media type of the upload, such as "image/png". If
24890// mediaType is "", it will be auto-detected. The provided ctx will
24891// supersede any context previously provided to the Context method.
24892func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall {
24893	c.ctx_ = ctx
24894	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
24895	return c
24896}
24897
24898// ProgressUpdater provides a callback function that will be called
24899// after every chunk. It should be a low-latency function in order to
24900// not slow down the upload operation. This should only be called when
24901// using ResumableMedia (as opposed to Media).
24902func (c *CreativeAssetsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CreativeAssetsInsertCall {
24903	c.mediaInfo_.SetProgressUpdater(pu)
24904	return c
24905}
24906
24907// Fields allows partial responses to be retrieved. See
24908// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24909// for more information.
24910func (c *CreativeAssetsInsertCall) Fields(s ...googleapi.Field) *CreativeAssetsInsertCall {
24911	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24912	return c
24913}
24914
24915// Context sets the context to be used in this call's Do method. Any
24916// pending HTTP request will be aborted if the provided context is
24917// canceled.
24918// This context will supersede any context previously provided to the
24919// ResumableMedia method.
24920func (c *CreativeAssetsInsertCall) Context(ctx context.Context) *CreativeAssetsInsertCall {
24921	c.ctx_ = ctx
24922	return c
24923}
24924
24925// Header returns an http.Header that can be modified by the caller to
24926// add HTTP headers to the request.
24927func (c *CreativeAssetsInsertCall) Header() http.Header {
24928	if c.header_ == nil {
24929		c.header_ = make(http.Header)
24930	}
24931	return c.header_
24932}
24933
24934func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) {
24935	reqHeaders := make(http.Header)
24936	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24937	for k, v := range c.header_ {
24938		reqHeaders[k] = v
24939	}
24940	reqHeaders.Set("User-Agent", c.s.userAgent())
24941	var body io.Reader = nil
24942	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativeassetmetadata)
24943	if err != nil {
24944		return nil, err
24945	}
24946	reqHeaders.Set("Content-Type", "application/json")
24947	c.urlParams_.Set("alt", alt)
24948	c.urlParams_.Set("prettyPrint", "false")
24949	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
24950	if c.mediaInfo_ != nil {
24951		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/dfareporting/v3.3/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
24952		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
24953	}
24954	if body == nil {
24955		body = new(bytes.Buffer)
24956		reqHeaders.Set("Content-Type", "application/json")
24957	}
24958	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
24959	defer cleanup()
24960	urls += "?" + c.urlParams_.Encode()
24961	req, err := http.NewRequest("POST", urls, body)
24962	if err != nil {
24963		return nil, err
24964	}
24965	req.Header = reqHeaders
24966	req.GetBody = getBody
24967	googleapi.Expand(req.URL, map[string]string{
24968		"profileId":    strconv.FormatInt(c.profileId, 10),
24969		"advertiserId": strconv.FormatInt(c.advertiserId, 10),
24970	})
24971	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24972}
24973
24974// Do executes the "dfareporting.creativeAssets.insert" call.
24975// Exactly one of *CreativeAssetMetadata or error will be non-nil. Any
24976// non-2xx status code is an error. Response headers are in either
24977// *CreativeAssetMetadata.ServerResponse.Header or (if a response was
24978// returned at all) in error.(*googleapi.Error).Header. Use
24979// googleapi.IsNotModified to check whether the returned error was
24980// because http.StatusNotModified was returned.
24981func (c *CreativeAssetsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeAssetMetadata, error) {
24982	gensupport.SetOptions(c.urlParams_, opts...)
24983	res, err := c.doRequest("json")
24984	if res != nil && res.StatusCode == http.StatusNotModified {
24985		if res.Body != nil {
24986			res.Body.Close()
24987		}
24988		return nil, &googleapi.Error{
24989			Code:   res.StatusCode,
24990			Header: res.Header,
24991		}
24992	}
24993	if err != nil {
24994		return nil, err
24995	}
24996	defer googleapi.CloseBody(res)
24997	if err := googleapi.CheckResponse(res); err != nil {
24998		return nil, err
24999	}
25000	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
25001	if rx != nil {
25002		rx.Client = c.s.client
25003		rx.UserAgent = c.s.userAgent()
25004		ctx := c.ctx_
25005		if ctx == nil {
25006			ctx = context.TODO()
25007		}
25008		res, err = rx.Upload(ctx)
25009		if err != nil {
25010			return nil, err
25011		}
25012		defer res.Body.Close()
25013		if err := googleapi.CheckResponse(res); err != nil {
25014			return nil, err
25015		}
25016	}
25017	ret := &CreativeAssetMetadata{
25018		ServerResponse: googleapi.ServerResponse{
25019			Header:         res.Header,
25020			HTTPStatusCode: res.StatusCode,
25021		},
25022	}
25023	target := &ret
25024	if err := gensupport.DecodeResponse(target, res); err != nil {
25025		return nil, err
25026	}
25027	return ret, nil
25028	// {
25029	//   "description": "Inserts a new creative asset.",
25030	//   "httpMethod": "POST",
25031	//   "id": "dfareporting.creativeAssets.insert",
25032	//   "mediaUpload": {
25033	//     "accept": [
25034	//       "*/*"
25035	//     ],
25036	//     "maxSize": "1024MB",
25037	//     "protocols": {
25038	//       "resumable": {
25039	//         "multipart": true,
25040	//         "path": "/resumable/upload/dfareporting/v3.3/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
25041	//       },
25042	//       "simple": {
25043	//         "multipart": true,
25044	//         "path": "/upload/dfareporting/v3.3/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
25045	//       }
25046	//     }
25047	//   },
25048	//   "parameterOrder": [
25049	//     "profileId",
25050	//     "advertiserId"
25051	//   ],
25052	//   "parameters": {
25053	//     "advertiserId": {
25054	//       "description": "Advertiser ID of this creative. This is a required field.",
25055	//       "format": "int64",
25056	//       "location": "path",
25057	//       "required": true,
25058	//       "type": "string"
25059	//     },
25060	//     "profileId": {
25061	//       "description": "User profile ID associated with this request.",
25062	//       "format": "int64",
25063	//       "location": "path",
25064	//       "required": true,
25065	//       "type": "string"
25066	//     }
25067	//   },
25068	//   "path": "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets",
25069	//   "request": {
25070	//     "$ref": "CreativeAssetMetadata"
25071	//   },
25072	//   "response": {
25073	//     "$ref": "CreativeAssetMetadata"
25074	//   },
25075	//   "scopes": [
25076	//     "https://www.googleapis.com/auth/dfatrafficking"
25077	//   ],
25078	//   "supportsMediaUpload": true
25079	// }
25080
25081}
25082
25083// method id "dfareporting.creativeFieldValues.delete":
25084
25085type CreativeFieldValuesDeleteCall struct {
25086	s               *Service
25087	profileId       int64
25088	creativeFieldId int64
25089	id              int64
25090	urlParams_      gensupport.URLParams
25091	ctx_            context.Context
25092	header_         http.Header
25093}
25094
25095// Delete: Deletes an existing creative field value.
25096func (r *CreativeFieldValuesService) Delete(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesDeleteCall {
25097	c := &CreativeFieldValuesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25098	c.profileId = profileId
25099	c.creativeFieldId = creativeFieldId
25100	c.id = id
25101	return c
25102}
25103
25104// Fields allows partial responses to be retrieved. See
25105// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25106// for more information.
25107func (c *CreativeFieldValuesDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldValuesDeleteCall {
25108	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25109	return c
25110}
25111
25112// Context sets the context to be used in this call's Do method. Any
25113// pending HTTP request will be aborted if the provided context is
25114// canceled.
25115func (c *CreativeFieldValuesDeleteCall) Context(ctx context.Context) *CreativeFieldValuesDeleteCall {
25116	c.ctx_ = ctx
25117	return c
25118}
25119
25120// Header returns an http.Header that can be modified by the caller to
25121// add HTTP headers to the request.
25122func (c *CreativeFieldValuesDeleteCall) Header() http.Header {
25123	if c.header_ == nil {
25124		c.header_ = make(http.Header)
25125	}
25126	return c.header_
25127}
25128
25129func (c *CreativeFieldValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
25130	reqHeaders := make(http.Header)
25131	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
25132	for k, v := range c.header_ {
25133		reqHeaders[k] = v
25134	}
25135	reqHeaders.Set("User-Agent", c.s.userAgent())
25136	var body io.Reader = nil
25137	c.urlParams_.Set("alt", alt)
25138	c.urlParams_.Set("prettyPrint", "false")
25139	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
25140	urls += "?" + c.urlParams_.Encode()
25141	req, err := http.NewRequest("DELETE", urls, body)
25142	if err != nil {
25143		return nil, err
25144	}
25145	req.Header = reqHeaders
25146	googleapi.Expand(req.URL, map[string]string{
25147		"profileId":       strconv.FormatInt(c.profileId, 10),
25148		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25149		"id":              strconv.FormatInt(c.id, 10),
25150	})
25151	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25152}
25153
25154// Do executes the "dfareporting.creativeFieldValues.delete" call.
25155func (c *CreativeFieldValuesDeleteCall) Do(opts ...googleapi.CallOption) error {
25156	gensupport.SetOptions(c.urlParams_, opts...)
25157	res, err := c.doRequest("json")
25158	if err != nil {
25159		return err
25160	}
25161	defer googleapi.CloseBody(res)
25162	if err := googleapi.CheckResponse(res); err != nil {
25163		return err
25164	}
25165	return nil
25166	// {
25167	//   "description": "Deletes an existing creative field value.",
25168	//   "httpMethod": "DELETE",
25169	//   "id": "dfareporting.creativeFieldValues.delete",
25170	//   "parameterOrder": [
25171	//     "profileId",
25172	//     "creativeFieldId",
25173	//     "id"
25174	//   ],
25175	//   "parameters": {
25176	//     "creativeFieldId": {
25177	//       "description": "Creative field ID for this creative field value.",
25178	//       "format": "int64",
25179	//       "location": "path",
25180	//       "required": true,
25181	//       "type": "string"
25182	//     },
25183	//     "id": {
25184	//       "description": "Creative Field Value ID",
25185	//       "format": "int64",
25186	//       "location": "path",
25187	//       "required": true,
25188	//       "type": "string"
25189	//     },
25190	//     "profileId": {
25191	//       "description": "User profile ID associated with this request.",
25192	//       "format": "int64",
25193	//       "location": "path",
25194	//       "required": true,
25195	//       "type": "string"
25196	//     }
25197	//   },
25198	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
25199	//   "scopes": [
25200	//     "https://www.googleapis.com/auth/dfatrafficking"
25201	//   ]
25202	// }
25203
25204}
25205
25206// method id "dfareporting.creativeFieldValues.get":
25207
25208type CreativeFieldValuesGetCall struct {
25209	s               *Service
25210	profileId       int64
25211	creativeFieldId int64
25212	id              int64
25213	urlParams_      gensupport.URLParams
25214	ifNoneMatch_    string
25215	ctx_            context.Context
25216	header_         http.Header
25217}
25218
25219// Get: Gets one creative field value by ID.
25220func (r *CreativeFieldValuesService) Get(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesGetCall {
25221	c := &CreativeFieldValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25222	c.profileId = profileId
25223	c.creativeFieldId = creativeFieldId
25224	c.id = id
25225	return c
25226}
25227
25228// Fields allows partial responses to be retrieved. See
25229// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25230// for more information.
25231func (c *CreativeFieldValuesGetCall) Fields(s ...googleapi.Field) *CreativeFieldValuesGetCall {
25232	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25233	return c
25234}
25235
25236// IfNoneMatch sets the optional parameter which makes the operation
25237// fail if the object's ETag matches the given value. This is useful for
25238// getting updates only after the object has changed since the last
25239// request. Use googleapi.IsNotModified to check whether the response
25240// error from Do is the result of In-None-Match.
25241func (c *CreativeFieldValuesGetCall) IfNoneMatch(entityTag string) *CreativeFieldValuesGetCall {
25242	c.ifNoneMatch_ = entityTag
25243	return c
25244}
25245
25246// Context sets the context to be used in this call's Do method. Any
25247// pending HTTP request will be aborted if the provided context is
25248// canceled.
25249func (c *CreativeFieldValuesGetCall) Context(ctx context.Context) *CreativeFieldValuesGetCall {
25250	c.ctx_ = ctx
25251	return c
25252}
25253
25254// Header returns an http.Header that can be modified by the caller to
25255// add HTTP headers to the request.
25256func (c *CreativeFieldValuesGetCall) Header() http.Header {
25257	if c.header_ == nil {
25258		c.header_ = make(http.Header)
25259	}
25260	return c.header_
25261}
25262
25263func (c *CreativeFieldValuesGetCall) doRequest(alt string) (*http.Response, error) {
25264	reqHeaders := make(http.Header)
25265	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
25266	for k, v := range c.header_ {
25267		reqHeaders[k] = v
25268	}
25269	reqHeaders.Set("User-Agent", c.s.userAgent())
25270	if c.ifNoneMatch_ != "" {
25271		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25272	}
25273	var body io.Reader = nil
25274	c.urlParams_.Set("alt", alt)
25275	c.urlParams_.Set("prettyPrint", "false")
25276	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
25277	urls += "?" + c.urlParams_.Encode()
25278	req, err := http.NewRequest("GET", urls, body)
25279	if err != nil {
25280		return nil, err
25281	}
25282	req.Header = reqHeaders
25283	googleapi.Expand(req.URL, map[string]string{
25284		"profileId":       strconv.FormatInt(c.profileId, 10),
25285		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25286		"id":              strconv.FormatInt(c.id, 10),
25287	})
25288	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25289}
25290
25291// Do executes the "dfareporting.creativeFieldValues.get" call.
25292// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25293// non-2xx status code is an error. Response headers are in either
25294// *CreativeFieldValue.ServerResponse.Header or (if a response was
25295// returned at all) in error.(*googleapi.Error).Header. Use
25296// googleapi.IsNotModified to check whether the returned error was
25297// because http.StatusNotModified was returned.
25298func (c *CreativeFieldValuesGetCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25299	gensupport.SetOptions(c.urlParams_, opts...)
25300	res, err := c.doRequest("json")
25301	if res != nil && res.StatusCode == http.StatusNotModified {
25302		if res.Body != nil {
25303			res.Body.Close()
25304		}
25305		return nil, &googleapi.Error{
25306			Code:   res.StatusCode,
25307			Header: res.Header,
25308		}
25309	}
25310	if err != nil {
25311		return nil, err
25312	}
25313	defer googleapi.CloseBody(res)
25314	if err := googleapi.CheckResponse(res); err != nil {
25315		return nil, err
25316	}
25317	ret := &CreativeFieldValue{
25318		ServerResponse: googleapi.ServerResponse{
25319			Header:         res.Header,
25320			HTTPStatusCode: res.StatusCode,
25321		},
25322	}
25323	target := &ret
25324	if err := gensupport.DecodeResponse(target, res); err != nil {
25325		return nil, err
25326	}
25327	return ret, nil
25328	// {
25329	//   "description": "Gets one creative field value by ID.",
25330	//   "httpMethod": "GET",
25331	//   "id": "dfareporting.creativeFieldValues.get",
25332	//   "parameterOrder": [
25333	//     "profileId",
25334	//     "creativeFieldId",
25335	//     "id"
25336	//   ],
25337	//   "parameters": {
25338	//     "creativeFieldId": {
25339	//       "description": "Creative field ID for this creative field value.",
25340	//       "format": "int64",
25341	//       "location": "path",
25342	//       "required": true,
25343	//       "type": "string"
25344	//     },
25345	//     "id": {
25346	//       "description": "Creative Field Value ID",
25347	//       "format": "int64",
25348	//       "location": "path",
25349	//       "required": true,
25350	//       "type": "string"
25351	//     },
25352	//     "profileId": {
25353	//       "description": "User profile ID associated with this request.",
25354	//       "format": "int64",
25355	//       "location": "path",
25356	//       "required": true,
25357	//       "type": "string"
25358	//     }
25359	//   },
25360	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
25361	//   "response": {
25362	//     "$ref": "CreativeFieldValue"
25363	//   },
25364	//   "scopes": [
25365	//     "https://www.googleapis.com/auth/dfatrafficking"
25366	//   ]
25367	// }
25368
25369}
25370
25371// method id "dfareporting.creativeFieldValues.insert":
25372
25373type CreativeFieldValuesInsertCall struct {
25374	s                  *Service
25375	profileId          int64
25376	creativeFieldId    int64
25377	creativefieldvalue *CreativeFieldValue
25378	urlParams_         gensupport.URLParams
25379	ctx_               context.Context
25380	header_            http.Header
25381}
25382
25383// Insert: Inserts a new creative field value.
25384func (r *CreativeFieldValuesService) Insert(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesInsertCall {
25385	c := &CreativeFieldValuesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25386	c.profileId = profileId
25387	c.creativeFieldId = creativeFieldId
25388	c.creativefieldvalue = creativefieldvalue
25389	return c
25390}
25391
25392// Fields allows partial responses to be retrieved. See
25393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25394// for more information.
25395func (c *CreativeFieldValuesInsertCall) Fields(s ...googleapi.Field) *CreativeFieldValuesInsertCall {
25396	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25397	return c
25398}
25399
25400// Context sets the context to be used in this call's Do method. Any
25401// pending HTTP request will be aborted if the provided context is
25402// canceled.
25403func (c *CreativeFieldValuesInsertCall) Context(ctx context.Context) *CreativeFieldValuesInsertCall {
25404	c.ctx_ = ctx
25405	return c
25406}
25407
25408// Header returns an http.Header that can be modified by the caller to
25409// add HTTP headers to the request.
25410func (c *CreativeFieldValuesInsertCall) Header() http.Header {
25411	if c.header_ == nil {
25412		c.header_ = make(http.Header)
25413	}
25414	return c.header_
25415}
25416
25417func (c *CreativeFieldValuesInsertCall) doRequest(alt string) (*http.Response, error) {
25418	reqHeaders := make(http.Header)
25419	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
25420	for k, v := range c.header_ {
25421		reqHeaders[k] = v
25422	}
25423	reqHeaders.Set("User-Agent", c.s.userAgent())
25424	var body io.Reader = nil
25425	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25426	if err != nil {
25427		return nil, err
25428	}
25429	reqHeaders.Set("Content-Type", "application/json")
25430	c.urlParams_.Set("alt", alt)
25431	c.urlParams_.Set("prettyPrint", "false")
25432	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25433	urls += "?" + c.urlParams_.Encode()
25434	req, err := http.NewRequest("POST", urls, body)
25435	if err != nil {
25436		return nil, err
25437	}
25438	req.Header = reqHeaders
25439	googleapi.Expand(req.URL, map[string]string{
25440		"profileId":       strconv.FormatInt(c.profileId, 10),
25441		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25442	})
25443	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25444}
25445
25446// Do executes the "dfareporting.creativeFieldValues.insert" call.
25447// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25448// non-2xx status code is an error. Response headers are in either
25449// *CreativeFieldValue.ServerResponse.Header or (if a response was
25450// returned at all) in error.(*googleapi.Error).Header. Use
25451// googleapi.IsNotModified to check whether the returned error was
25452// because http.StatusNotModified was returned.
25453func (c *CreativeFieldValuesInsertCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25454	gensupport.SetOptions(c.urlParams_, opts...)
25455	res, err := c.doRequest("json")
25456	if res != nil && res.StatusCode == http.StatusNotModified {
25457		if res.Body != nil {
25458			res.Body.Close()
25459		}
25460		return nil, &googleapi.Error{
25461			Code:   res.StatusCode,
25462			Header: res.Header,
25463		}
25464	}
25465	if err != nil {
25466		return nil, err
25467	}
25468	defer googleapi.CloseBody(res)
25469	if err := googleapi.CheckResponse(res); err != nil {
25470		return nil, err
25471	}
25472	ret := &CreativeFieldValue{
25473		ServerResponse: googleapi.ServerResponse{
25474			Header:         res.Header,
25475			HTTPStatusCode: res.StatusCode,
25476		},
25477	}
25478	target := &ret
25479	if err := gensupport.DecodeResponse(target, res); err != nil {
25480		return nil, err
25481	}
25482	return ret, nil
25483	// {
25484	//   "description": "Inserts a new creative field value.",
25485	//   "httpMethod": "POST",
25486	//   "id": "dfareporting.creativeFieldValues.insert",
25487	//   "parameterOrder": [
25488	//     "profileId",
25489	//     "creativeFieldId"
25490	//   ],
25491	//   "parameters": {
25492	//     "creativeFieldId": {
25493	//       "description": "Creative field ID for this creative field value.",
25494	//       "format": "int64",
25495	//       "location": "path",
25496	//       "required": true,
25497	//       "type": "string"
25498	//     },
25499	//     "profileId": {
25500	//       "description": "User profile ID associated with this request.",
25501	//       "format": "int64",
25502	//       "location": "path",
25503	//       "required": true,
25504	//       "type": "string"
25505	//     }
25506	//   },
25507	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25508	//   "request": {
25509	//     "$ref": "CreativeFieldValue"
25510	//   },
25511	//   "response": {
25512	//     "$ref": "CreativeFieldValue"
25513	//   },
25514	//   "scopes": [
25515	//     "https://www.googleapis.com/auth/dfatrafficking"
25516	//   ]
25517	// }
25518
25519}
25520
25521// method id "dfareporting.creativeFieldValues.list":
25522
25523type CreativeFieldValuesListCall struct {
25524	s               *Service
25525	profileId       int64
25526	creativeFieldId int64
25527	urlParams_      gensupport.URLParams
25528	ifNoneMatch_    string
25529	ctx_            context.Context
25530	header_         http.Header
25531}
25532
25533// List: Retrieves a list of creative field values, possibly filtered.
25534// This method supports paging.
25535func (r *CreativeFieldValuesService) List(profileId int64, creativeFieldId int64) *CreativeFieldValuesListCall {
25536	c := &CreativeFieldValuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25537	c.profileId = profileId
25538	c.creativeFieldId = creativeFieldId
25539	return c
25540}
25541
25542// Ids sets the optional parameter "ids": Select only creative field
25543// values with these IDs.
25544func (c *CreativeFieldValuesListCall) Ids(ids ...int64) *CreativeFieldValuesListCall {
25545	var ids_ []string
25546	for _, v := range ids {
25547		ids_ = append(ids_, fmt.Sprint(v))
25548	}
25549	c.urlParams_.SetMulti("ids", ids_)
25550	return c
25551}
25552
25553// MaxResults sets the optional parameter "maxResults": Maximum number
25554// of results to return.
25555func (c *CreativeFieldValuesListCall) MaxResults(maxResults int64) *CreativeFieldValuesListCall {
25556	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25557	return c
25558}
25559
25560// PageToken sets the optional parameter "pageToken": Value of the
25561// nextPageToken from the previous result page.
25562func (c *CreativeFieldValuesListCall) PageToken(pageToken string) *CreativeFieldValuesListCall {
25563	c.urlParams_.Set("pageToken", pageToken)
25564	return c
25565}
25566
25567// SearchString sets the optional parameter "searchString": Allows
25568// searching for creative field values by their values. Wildcards (e.g.
25569// *) are not allowed.
25570func (c *CreativeFieldValuesListCall) SearchString(searchString string) *CreativeFieldValuesListCall {
25571	c.urlParams_.Set("searchString", searchString)
25572	return c
25573}
25574
25575// SortField sets the optional parameter "sortField": Field by which to
25576// sort the list.
25577//
25578// Possible values:
25579//   "ID" (default)
25580//   "VALUE"
25581func (c *CreativeFieldValuesListCall) SortField(sortField string) *CreativeFieldValuesListCall {
25582	c.urlParams_.Set("sortField", sortField)
25583	return c
25584}
25585
25586// SortOrder sets the optional parameter "sortOrder": Order of sorted
25587// results.
25588//
25589// Possible values:
25590//   "ASCENDING" (default)
25591//   "DESCENDING"
25592func (c *CreativeFieldValuesListCall) SortOrder(sortOrder string) *CreativeFieldValuesListCall {
25593	c.urlParams_.Set("sortOrder", sortOrder)
25594	return c
25595}
25596
25597// Fields allows partial responses to be retrieved. See
25598// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25599// for more information.
25600func (c *CreativeFieldValuesListCall) Fields(s ...googleapi.Field) *CreativeFieldValuesListCall {
25601	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25602	return c
25603}
25604
25605// IfNoneMatch sets the optional parameter which makes the operation
25606// fail if the object's ETag matches the given value. This is useful for
25607// getting updates only after the object has changed since the last
25608// request. Use googleapi.IsNotModified to check whether the response
25609// error from Do is the result of In-None-Match.
25610func (c *CreativeFieldValuesListCall) IfNoneMatch(entityTag string) *CreativeFieldValuesListCall {
25611	c.ifNoneMatch_ = entityTag
25612	return c
25613}
25614
25615// Context sets the context to be used in this call's Do method. Any
25616// pending HTTP request will be aborted if the provided context is
25617// canceled.
25618func (c *CreativeFieldValuesListCall) Context(ctx context.Context) *CreativeFieldValuesListCall {
25619	c.ctx_ = ctx
25620	return c
25621}
25622
25623// Header returns an http.Header that can be modified by the caller to
25624// add HTTP headers to the request.
25625func (c *CreativeFieldValuesListCall) Header() http.Header {
25626	if c.header_ == nil {
25627		c.header_ = make(http.Header)
25628	}
25629	return c.header_
25630}
25631
25632func (c *CreativeFieldValuesListCall) doRequest(alt string) (*http.Response, error) {
25633	reqHeaders := make(http.Header)
25634	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
25635	for k, v := range c.header_ {
25636		reqHeaders[k] = v
25637	}
25638	reqHeaders.Set("User-Agent", c.s.userAgent())
25639	if c.ifNoneMatch_ != "" {
25640		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25641	}
25642	var body io.Reader = nil
25643	c.urlParams_.Set("alt", alt)
25644	c.urlParams_.Set("prettyPrint", "false")
25645	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25646	urls += "?" + c.urlParams_.Encode()
25647	req, err := http.NewRequest("GET", urls, body)
25648	if err != nil {
25649		return nil, err
25650	}
25651	req.Header = reqHeaders
25652	googleapi.Expand(req.URL, map[string]string{
25653		"profileId":       strconv.FormatInt(c.profileId, 10),
25654		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25655	})
25656	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25657}
25658
25659// Do executes the "dfareporting.creativeFieldValues.list" call.
25660// Exactly one of *CreativeFieldValuesListResponse or error will be
25661// non-nil. Any non-2xx status code is an error. Response headers are in
25662// either *CreativeFieldValuesListResponse.ServerResponse.Header or (if
25663// a response was returned at all) in error.(*googleapi.Error).Header.
25664// Use googleapi.IsNotModified to check whether the returned error was
25665// because http.StatusNotModified was returned.
25666func (c *CreativeFieldValuesListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValuesListResponse, error) {
25667	gensupport.SetOptions(c.urlParams_, opts...)
25668	res, err := c.doRequest("json")
25669	if res != nil && res.StatusCode == http.StatusNotModified {
25670		if res.Body != nil {
25671			res.Body.Close()
25672		}
25673		return nil, &googleapi.Error{
25674			Code:   res.StatusCode,
25675			Header: res.Header,
25676		}
25677	}
25678	if err != nil {
25679		return nil, err
25680	}
25681	defer googleapi.CloseBody(res)
25682	if err := googleapi.CheckResponse(res); err != nil {
25683		return nil, err
25684	}
25685	ret := &CreativeFieldValuesListResponse{
25686		ServerResponse: googleapi.ServerResponse{
25687			Header:         res.Header,
25688			HTTPStatusCode: res.StatusCode,
25689		},
25690	}
25691	target := &ret
25692	if err := gensupport.DecodeResponse(target, res); err != nil {
25693		return nil, err
25694	}
25695	return ret, nil
25696	// {
25697	//   "description": "Retrieves a list of creative field values, possibly filtered. This method supports paging.",
25698	//   "httpMethod": "GET",
25699	//   "id": "dfareporting.creativeFieldValues.list",
25700	//   "parameterOrder": [
25701	//     "profileId",
25702	//     "creativeFieldId"
25703	//   ],
25704	//   "parameters": {
25705	//     "creativeFieldId": {
25706	//       "description": "Creative field ID for this creative field value.",
25707	//       "format": "int64",
25708	//       "location": "path",
25709	//       "required": true,
25710	//       "type": "string"
25711	//     },
25712	//     "ids": {
25713	//       "description": "Select only creative field values with these IDs.",
25714	//       "format": "int64",
25715	//       "location": "query",
25716	//       "repeated": true,
25717	//       "type": "string"
25718	//     },
25719	//     "maxResults": {
25720	//       "default": "1000",
25721	//       "description": "Maximum number of results to return.",
25722	//       "format": "int32",
25723	//       "location": "query",
25724	//       "maximum": "1000",
25725	//       "minimum": "0",
25726	//       "type": "integer"
25727	//     },
25728	//     "pageToken": {
25729	//       "description": "Value of the nextPageToken from the previous result page.",
25730	//       "location": "query",
25731	//       "type": "string"
25732	//     },
25733	//     "profileId": {
25734	//       "description": "User profile ID associated with this request.",
25735	//       "format": "int64",
25736	//       "location": "path",
25737	//       "required": true,
25738	//       "type": "string"
25739	//     },
25740	//     "searchString": {
25741	//       "description": "Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed.",
25742	//       "location": "query",
25743	//       "type": "string"
25744	//     },
25745	//     "sortField": {
25746	//       "default": "ID",
25747	//       "description": "Field by which to sort the list.",
25748	//       "enum": [
25749	//         "ID",
25750	//         "VALUE"
25751	//       ],
25752	//       "enumDescriptions": [
25753	//         "",
25754	//         ""
25755	//       ],
25756	//       "location": "query",
25757	//       "type": "string"
25758	//     },
25759	//     "sortOrder": {
25760	//       "default": "ASCENDING",
25761	//       "description": "Order of sorted results.",
25762	//       "enum": [
25763	//         "ASCENDING",
25764	//         "DESCENDING"
25765	//       ],
25766	//       "enumDescriptions": [
25767	//         "",
25768	//         ""
25769	//       ],
25770	//       "location": "query",
25771	//       "type": "string"
25772	//     }
25773	//   },
25774	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25775	//   "response": {
25776	//     "$ref": "CreativeFieldValuesListResponse"
25777	//   },
25778	//   "scopes": [
25779	//     "https://www.googleapis.com/auth/dfatrafficking"
25780	//   ]
25781	// }
25782
25783}
25784
25785// Pages invokes f for each page of results.
25786// A non-nil error returned from f will halt the iteration.
25787// The provided context supersedes any context provided to the Context method.
25788func (c *CreativeFieldValuesListCall) Pages(ctx context.Context, f func(*CreativeFieldValuesListResponse) error) error {
25789	c.ctx_ = ctx
25790	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25791	for {
25792		x, err := c.Do()
25793		if err != nil {
25794			return err
25795		}
25796		if err := f(x); err != nil {
25797			return err
25798		}
25799		if x.NextPageToken == "" {
25800			return nil
25801		}
25802		c.PageToken(x.NextPageToken)
25803	}
25804}
25805
25806// method id "dfareporting.creativeFieldValues.patch":
25807
25808type CreativeFieldValuesPatchCall struct {
25809	s                  *Service
25810	profileId          int64
25811	creativeFieldId    int64
25812	creativefieldvalue *CreativeFieldValue
25813	urlParams_         gensupport.URLParams
25814	ctx_               context.Context
25815	header_            http.Header
25816}
25817
25818// Patch: Updates an existing creative field value. This method supports
25819// patch semantics.
25820func (r *CreativeFieldValuesService) Patch(profileId int64, creativeFieldId int64, id int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesPatchCall {
25821	c := &CreativeFieldValuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25822	c.profileId = profileId
25823	c.creativeFieldId = creativeFieldId
25824	c.urlParams_.Set("id", fmt.Sprint(id))
25825	c.creativefieldvalue = creativefieldvalue
25826	return c
25827}
25828
25829// Fields allows partial responses to be retrieved. See
25830// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25831// for more information.
25832func (c *CreativeFieldValuesPatchCall) Fields(s ...googleapi.Field) *CreativeFieldValuesPatchCall {
25833	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25834	return c
25835}
25836
25837// Context sets the context to be used in this call's Do method. Any
25838// pending HTTP request will be aborted if the provided context is
25839// canceled.
25840func (c *CreativeFieldValuesPatchCall) Context(ctx context.Context) *CreativeFieldValuesPatchCall {
25841	c.ctx_ = ctx
25842	return c
25843}
25844
25845// Header returns an http.Header that can be modified by the caller to
25846// add HTTP headers to the request.
25847func (c *CreativeFieldValuesPatchCall) Header() http.Header {
25848	if c.header_ == nil {
25849		c.header_ = make(http.Header)
25850	}
25851	return c.header_
25852}
25853
25854func (c *CreativeFieldValuesPatchCall) doRequest(alt string) (*http.Response, error) {
25855	reqHeaders := make(http.Header)
25856	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
25857	for k, v := range c.header_ {
25858		reqHeaders[k] = v
25859	}
25860	reqHeaders.Set("User-Agent", c.s.userAgent())
25861	var body io.Reader = nil
25862	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25863	if err != nil {
25864		return nil, err
25865	}
25866	reqHeaders.Set("Content-Type", "application/json")
25867	c.urlParams_.Set("alt", alt)
25868	c.urlParams_.Set("prettyPrint", "false")
25869	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25870	urls += "?" + c.urlParams_.Encode()
25871	req, err := http.NewRequest("PATCH", urls, body)
25872	if err != nil {
25873		return nil, err
25874	}
25875	req.Header = reqHeaders
25876	googleapi.Expand(req.URL, map[string]string{
25877		"profileId":       strconv.FormatInt(c.profileId, 10),
25878		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25879	})
25880	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25881}
25882
25883// Do executes the "dfareporting.creativeFieldValues.patch" call.
25884// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25885// non-2xx status code is an error. Response headers are in either
25886// *CreativeFieldValue.ServerResponse.Header or (if a response was
25887// returned at all) in error.(*googleapi.Error).Header. Use
25888// googleapi.IsNotModified to check whether the returned error was
25889// because http.StatusNotModified was returned.
25890func (c *CreativeFieldValuesPatchCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25891	gensupport.SetOptions(c.urlParams_, opts...)
25892	res, err := c.doRequest("json")
25893	if res != nil && res.StatusCode == http.StatusNotModified {
25894		if res.Body != nil {
25895			res.Body.Close()
25896		}
25897		return nil, &googleapi.Error{
25898			Code:   res.StatusCode,
25899			Header: res.Header,
25900		}
25901	}
25902	if err != nil {
25903		return nil, err
25904	}
25905	defer googleapi.CloseBody(res)
25906	if err := googleapi.CheckResponse(res); err != nil {
25907		return nil, err
25908	}
25909	ret := &CreativeFieldValue{
25910		ServerResponse: googleapi.ServerResponse{
25911			Header:         res.Header,
25912			HTTPStatusCode: res.StatusCode,
25913		},
25914	}
25915	target := &ret
25916	if err := gensupport.DecodeResponse(target, res); err != nil {
25917		return nil, err
25918	}
25919	return ret, nil
25920	// {
25921	//   "description": "Updates an existing creative field value. This method supports patch semantics.",
25922	//   "httpMethod": "PATCH",
25923	//   "id": "dfareporting.creativeFieldValues.patch",
25924	//   "parameterOrder": [
25925	//     "profileId",
25926	//     "creativeFieldId",
25927	//     "id"
25928	//   ],
25929	//   "parameters": {
25930	//     "creativeFieldId": {
25931	//       "description": "Creative field ID for this creative field value.",
25932	//       "format": "int64",
25933	//       "location": "path",
25934	//       "required": true,
25935	//       "type": "string"
25936	//     },
25937	//     "id": {
25938	//       "description": "Creative Field Value ID",
25939	//       "format": "int64",
25940	//       "location": "query",
25941	//       "required": true,
25942	//       "type": "string"
25943	//     },
25944	//     "profileId": {
25945	//       "description": "User profile ID associated with this request.",
25946	//       "format": "int64",
25947	//       "location": "path",
25948	//       "required": true,
25949	//       "type": "string"
25950	//     }
25951	//   },
25952	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25953	//   "request": {
25954	//     "$ref": "CreativeFieldValue"
25955	//   },
25956	//   "response": {
25957	//     "$ref": "CreativeFieldValue"
25958	//   },
25959	//   "scopes": [
25960	//     "https://www.googleapis.com/auth/dfatrafficking"
25961	//   ]
25962	// }
25963
25964}
25965
25966// method id "dfareporting.creativeFieldValues.update":
25967
25968type CreativeFieldValuesUpdateCall struct {
25969	s                  *Service
25970	profileId          int64
25971	creativeFieldId    int64
25972	creativefieldvalue *CreativeFieldValue
25973	urlParams_         gensupport.URLParams
25974	ctx_               context.Context
25975	header_            http.Header
25976}
25977
25978// Update: Updates an existing creative field value.
25979func (r *CreativeFieldValuesService) Update(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesUpdateCall {
25980	c := &CreativeFieldValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25981	c.profileId = profileId
25982	c.creativeFieldId = creativeFieldId
25983	c.creativefieldvalue = creativefieldvalue
25984	return c
25985}
25986
25987// Fields allows partial responses to be retrieved. See
25988// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25989// for more information.
25990func (c *CreativeFieldValuesUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldValuesUpdateCall {
25991	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25992	return c
25993}
25994
25995// Context sets the context to be used in this call's Do method. Any
25996// pending HTTP request will be aborted if the provided context is
25997// canceled.
25998func (c *CreativeFieldValuesUpdateCall) Context(ctx context.Context) *CreativeFieldValuesUpdateCall {
25999	c.ctx_ = ctx
26000	return c
26001}
26002
26003// Header returns an http.Header that can be modified by the caller to
26004// add HTTP headers to the request.
26005func (c *CreativeFieldValuesUpdateCall) Header() http.Header {
26006	if c.header_ == nil {
26007		c.header_ = make(http.Header)
26008	}
26009	return c.header_
26010}
26011
26012func (c *CreativeFieldValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
26013	reqHeaders := make(http.Header)
26014	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
26015	for k, v := range c.header_ {
26016		reqHeaders[k] = v
26017	}
26018	reqHeaders.Set("User-Agent", c.s.userAgent())
26019	var body io.Reader = nil
26020	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
26021	if err != nil {
26022		return nil, err
26023	}
26024	reqHeaders.Set("Content-Type", "application/json")
26025	c.urlParams_.Set("alt", alt)
26026	c.urlParams_.Set("prettyPrint", "false")
26027	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
26028	urls += "?" + c.urlParams_.Encode()
26029	req, err := http.NewRequest("PUT", urls, body)
26030	if err != nil {
26031		return nil, err
26032	}
26033	req.Header = reqHeaders
26034	googleapi.Expand(req.URL, map[string]string{
26035		"profileId":       strconv.FormatInt(c.profileId, 10),
26036		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
26037	})
26038	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26039}
26040
26041// Do executes the "dfareporting.creativeFieldValues.update" call.
26042// Exactly one of *CreativeFieldValue or error will be non-nil. Any
26043// non-2xx status code is an error. Response headers are in either
26044// *CreativeFieldValue.ServerResponse.Header or (if a response was
26045// returned at all) in error.(*googleapi.Error).Header. Use
26046// googleapi.IsNotModified to check whether the returned error was
26047// because http.StatusNotModified was returned.
26048func (c *CreativeFieldValuesUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
26049	gensupport.SetOptions(c.urlParams_, opts...)
26050	res, err := c.doRequest("json")
26051	if res != nil && res.StatusCode == http.StatusNotModified {
26052		if res.Body != nil {
26053			res.Body.Close()
26054		}
26055		return nil, &googleapi.Error{
26056			Code:   res.StatusCode,
26057			Header: res.Header,
26058		}
26059	}
26060	if err != nil {
26061		return nil, err
26062	}
26063	defer googleapi.CloseBody(res)
26064	if err := googleapi.CheckResponse(res); err != nil {
26065		return nil, err
26066	}
26067	ret := &CreativeFieldValue{
26068		ServerResponse: googleapi.ServerResponse{
26069			Header:         res.Header,
26070			HTTPStatusCode: res.StatusCode,
26071		},
26072	}
26073	target := &ret
26074	if err := gensupport.DecodeResponse(target, res); err != nil {
26075		return nil, err
26076	}
26077	return ret, nil
26078	// {
26079	//   "description": "Updates an existing creative field value.",
26080	//   "httpMethod": "PUT",
26081	//   "id": "dfareporting.creativeFieldValues.update",
26082	//   "parameterOrder": [
26083	//     "profileId",
26084	//     "creativeFieldId"
26085	//   ],
26086	//   "parameters": {
26087	//     "creativeFieldId": {
26088	//       "description": "Creative field ID for this creative field value.",
26089	//       "format": "int64",
26090	//       "location": "path",
26091	//       "required": true,
26092	//       "type": "string"
26093	//     },
26094	//     "profileId": {
26095	//       "description": "User profile ID associated with this request.",
26096	//       "format": "int64",
26097	//       "location": "path",
26098	//       "required": true,
26099	//       "type": "string"
26100	//     }
26101	//   },
26102	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
26103	//   "request": {
26104	//     "$ref": "CreativeFieldValue"
26105	//   },
26106	//   "response": {
26107	//     "$ref": "CreativeFieldValue"
26108	//   },
26109	//   "scopes": [
26110	//     "https://www.googleapis.com/auth/dfatrafficking"
26111	//   ]
26112	// }
26113
26114}
26115
26116// method id "dfareporting.creativeFields.delete":
26117
26118type CreativeFieldsDeleteCall struct {
26119	s          *Service
26120	profileId  int64
26121	id         int64
26122	urlParams_ gensupport.URLParams
26123	ctx_       context.Context
26124	header_    http.Header
26125}
26126
26127// Delete: Deletes an existing creative field.
26128func (r *CreativeFieldsService) Delete(profileId int64, id int64) *CreativeFieldsDeleteCall {
26129	c := &CreativeFieldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26130	c.profileId = profileId
26131	c.id = id
26132	return c
26133}
26134
26135// Fields allows partial responses to be retrieved. See
26136// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26137// for more information.
26138func (c *CreativeFieldsDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldsDeleteCall {
26139	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26140	return c
26141}
26142
26143// Context sets the context to be used in this call's Do method. Any
26144// pending HTTP request will be aborted if the provided context is
26145// canceled.
26146func (c *CreativeFieldsDeleteCall) Context(ctx context.Context) *CreativeFieldsDeleteCall {
26147	c.ctx_ = ctx
26148	return c
26149}
26150
26151// Header returns an http.Header that can be modified by the caller to
26152// add HTTP headers to the request.
26153func (c *CreativeFieldsDeleteCall) Header() http.Header {
26154	if c.header_ == nil {
26155		c.header_ = make(http.Header)
26156	}
26157	return c.header_
26158}
26159
26160func (c *CreativeFieldsDeleteCall) doRequest(alt string) (*http.Response, error) {
26161	reqHeaders := make(http.Header)
26162	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
26163	for k, v := range c.header_ {
26164		reqHeaders[k] = v
26165	}
26166	reqHeaders.Set("User-Agent", c.s.userAgent())
26167	var body io.Reader = nil
26168	c.urlParams_.Set("alt", alt)
26169	c.urlParams_.Set("prettyPrint", "false")
26170	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
26171	urls += "?" + c.urlParams_.Encode()
26172	req, err := http.NewRequest("DELETE", urls, body)
26173	if err != nil {
26174		return nil, err
26175	}
26176	req.Header = reqHeaders
26177	googleapi.Expand(req.URL, map[string]string{
26178		"profileId": strconv.FormatInt(c.profileId, 10),
26179		"id":        strconv.FormatInt(c.id, 10),
26180	})
26181	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26182}
26183
26184// Do executes the "dfareporting.creativeFields.delete" call.
26185func (c *CreativeFieldsDeleteCall) Do(opts ...googleapi.CallOption) error {
26186	gensupport.SetOptions(c.urlParams_, opts...)
26187	res, err := c.doRequest("json")
26188	if err != nil {
26189		return err
26190	}
26191	defer googleapi.CloseBody(res)
26192	if err := googleapi.CheckResponse(res); err != nil {
26193		return err
26194	}
26195	return nil
26196	// {
26197	//   "description": "Deletes an existing creative field.",
26198	//   "httpMethod": "DELETE",
26199	//   "id": "dfareporting.creativeFields.delete",
26200	//   "parameterOrder": [
26201	//     "profileId",
26202	//     "id"
26203	//   ],
26204	//   "parameters": {
26205	//     "id": {
26206	//       "description": "Creative Field ID",
26207	//       "format": "int64",
26208	//       "location": "path",
26209	//       "required": true,
26210	//       "type": "string"
26211	//     },
26212	//     "profileId": {
26213	//       "description": "User profile ID associated with this request.",
26214	//       "format": "int64",
26215	//       "location": "path",
26216	//       "required": true,
26217	//       "type": "string"
26218	//     }
26219	//   },
26220	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
26221	//   "scopes": [
26222	//     "https://www.googleapis.com/auth/dfatrafficking"
26223	//   ]
26224	// }
26225
26226}
26227
26228// method id "dfareporting.creativeFields.get":
26229
26230type CreativeFieldsGetCall struct {
26231	s            *Service
26232	profileId    int64
26233	id           int64
26234	urlParams_   gensupport.URLParams
26235	ifNoneMatch_ string
26236	ctx_         context.Context
26237	header_      http.Header
26238}
26239
26240// Get: Gets one creative field by ID.
26241func (r *CreativeFieldsService) Get(profileId int64, id int64) *CreativeFieldsGetCall {
26242	c := &CreativeFieldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26243	c.profileId = profileId
26244	c.id = id
26245	return c
26246}
26247
26248// Fields allows partial responses to be retrieved. See
26249// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26250// for more information.
26251func (c *CreativeFieldsGetCall) Fields(s ...googleapi.Field) *CreativeFieldsGetCall {
26252	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26253	return c
26254}
26255
26256// IfNoneMatch sets the optional parameter which makes the operation
26257// fail if the object's ETag matches the given value. This is useful for
26258// getting updates only after the object has changed since the last
26259// request. Use googleapi.IsNotModified to check whether the response
26260// error from Do is the result of In-None-Match.
26261func (c *CreativeFieldsGetCall) IfNoneMatch(entityTag string) *CreativeFieldsGetCall {
26262	c.ifNoneMatch_ = entityTag
26263	return c
26264}
26265
26266// Context sets the context to be used in this call's Do method. Any
26267// pending HTTP request will be aborted if the provided context is
26268// canceled.
26269func (c *CreativeFieldsGetCall) Context(ctx context.Context) *CreativeFieldsGetCall {
26270	c.ctx_ = ctx
26271	return c
26272}
26273
26274// Header returns an http.Header that can be modified by the caller to
26275// add HTTP headers to the request.
26276func (c *CreativeFieldsGetCall) Header() http.Header {
26277	if c.header_ == nil {
26278		c.header_ = make(http.Header)
26279	}
26280	return c.header_
26281}
26282
26283func (c *CreativeFieldsGetCall) doRequest(alt string) (*http.Response, error) {
26284	reqHeaders := make(http.Header)
26285	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
26286	for k, v := range c.header_ {
26287		reqHeaders[k] = v
26288	}
26289	reqHeaders.Set("User-Agent", c.s.userAgent())
26290	if c.ifNoneMatch_ != "" {
26291		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26292	}
26293	var body io.Reader = nil
26294	c.urlParams_.Set("alt", alt)
26295	c.urlParams_.Set("prettyPrint", "false")
26296	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
26297	urls += "?" + c.urlParams_.Encode()
26298	req, err := http.NewRequest("GET", urls, body)
26299	if err != nil {
26300		return nil, err
26301	}
26302	req.Header = reqHeaders
26303	googleapi.Expand(req.URL, map[string]string{
26304		"profileId": strconv.FormatInt(c.profileId, 10),
26305		"id":        strconv.FormatInt(c.id, 10),
26306	})
26307	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26308}
26309
26310// Do executes the "dfareporting.creativeFields.get" call.
26311// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26312// status code is an error. Response headers are in either
26313// *CreativeField.ServerResponse.Header or (if a response was returned
26314// at all) in error.(*googleapi.Error).Header. Use
26315// googleapi.IsNotModified to check whether the returned error was
26316// because http.StatusNotModified was returned.
26317func (c *CreativeFieldsGetCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26318	gensupport.SetOptions(c.urlParams_, opts...)
26319	res, err := c.doRequest("json")
26320	if res != nil && res.StatusCode == http.StatusNotModified {
26321		if res.Body != nil {
26322			res.Body.Close()
26323		}
26324		return nil, &googleapi.Error{
26325			Code:   res.StatusCode,
26326			Header: res.Header,
26327		}
26328	}
26329	if err != nil {
26330		return nil, err
26331	}
26332	defer googleapi.CloseBody(res)
26333	if err := googleapi.CheckResponse(res); err != nil {
26334		return nil, err
26335	}
26336	ret := &CreativeField{
26337		ServerResponse: googleapi.ServerResponse{
26338			Header:         res.Header,
26339			HTTPStatusCode: res.StatusCode,
26340		},
26341	}
26342	target := &ret
26343	if err := gensupport.DecodeResponse(target, res); err != nil {
26344		return nil, err
26345	}
26346	return ret, nil
26347	// {
26348	//   "description": "Gets one creative field by ID.",
26349	//   "httpMethod": "GET",
26350	//   "id": "dfareporting.creativeFields.get",
26351	//   "parameterOrder": [
26352	//     "profileId",
26353	//     "id"
26354	//   ],
26355	//   "parameters": {
26356	//     "id": {
26357	//       "description": "Creative Field ID",
26358	//       "format": "int64",
26359	//       "location": "path",
26360	//       "required": true,
26361	//       "type": "string"
26362	//     },
26363	//     "profileId": {
26364	//       "description": "User profile ID associated with this request.",
26365	//       "format": "int64",
26366	//       "location": "path",
26367	//       "required": true,
26368	//       "type": "string"
26369	//     }
26370	//   },
26371	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
26372	//   "response": {
26373	//     "$ref": "CreativeField"
26374	//   },
26375	//   "scopes": [
26376	//     "https://www.googleapis.com/auth/dfatrafficking"
26377	//   ]
26378	// }
26379
26380}
26381
26382// method id "dfareporting.creativeFields.insert":
26383
26384type CreativeFieldsInsertCall struct {
26385	s             *Service
26386	profileId     int64
26387	creativefield *CreativeField
26388	urlParams_    gensupport.URLParams
26389	ctx_          context.Context
26390	header_       http.Header
26391}
26392
26393// Insert: Inserts a new creative field.
26394func (r *CreativeFieldsService) Insert(profileId int64, creativefield *CreativeField) *CreativeFieldsInsertCall {
26395	c := &CreativeFieldsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26396	c.profileId = profileId
26397	c.creativefield = creativefield
26398	return c
26399}
26400
26401// Fields allows partial responses to be retrieved. See
26402// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26403// for more information.
26404func (c *CreativeFieldsInsertCall) Fields(s ...googleapi.Field) *CreativeFieldsInsertCall {
26405	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26406	return c
26407}
26408
26409// Context sets the context to be used in this call's Do method. Any
26410// pending HTTP request will be aborted if the provided context is
26411// canceled.
26412func (c *CreativeFieldsInsertCall) Context(ctx context.Context) *CreativeFieldsInsertCall {
26413	c.ctx_ = ctx
26414	return c
26415}
26416
26417// Header returns an http.Header that can be modified by the caller to
26418// add HTTP headers to the request.
26419func (c *CreativeFieldsInsertCall) Header() http.Header {
26420	if c.header_ == nil {
26421		c.header_ = make(http.Header)
26422	}
26423	return c.header_
26424}
26425
26426func (c *CreativeFieldsInsertCall) doRequest(alt string) (*http.Response, error) {
26427	reqHeaders := make(http.Header)
26428	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
26429	for k, v := range c.header_ {
26430		reqHeaders[k] = v
26431	}
26432	reqHeaders.Set("User-Agent", c.s.userAgent())
26433	var body io.Reader = nil
26434	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26435	if err != nil {
26436		return nil, err
26437	}
26438	reqHeaders.Set("Content-Type", "application/json")
26439	c.urlParams_.Set("alt", alt)
26440	c.urlParams_.Set("prettyPrint", "false")
26441	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26442	urls += "?" + c.urlParams_.Encode()
26443	req, err := http.NewRequest("POST", urls, body)
26444	if err != nil {
26445		return nil, err
26446	}
26447	req.Header = reqHeaders
26448	googleapi.Expand(req.URL, map[string]string{
26449		"profileId": strconv.FormatInt(c.profileId, 10),
26450	})
26451	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26452}
26453
26454// Do executes the "dfareporting.creativeFields.insert" call.
26455// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26456// status code is an error. Response headers are in either
26457// *CreativeField.ServerResponse.Header or (if a response was returned
26458// at all) in error.(*googleapi.Error).Header. Use
26459// googleapi.IsNotModified to check whether the returned error was
26460// because http.StatusNotModified was returned.
26461func (c *CreativeFieldsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26462	gensupport.SetOptions(c.urlParams_, opts...)
26463	res, err := c.doRequest("json")
26464	if res != nil && res.StatusCode == http.StatusNotModified {
26465		if res.Body != nil {
26466			res.Body.Close()
26467		}
26468		return nil, &googleapi.Error{
26469			Code:   res.StatusCode,
26470			Header: res.Header,
26471		}
26472	}
26473	if err != nil {
26474		return nil, err
26475	}
26476	defer googleapi.CloseBody(res)
26477	if err := googleapi.CheckResponse(res); err != nil {
26478		return nil, err
26479	}
26480	ret := &CreativeField{
26481		ServerResponse: googleapi.ServerResponse{
26482			Header:         res.Header,
26483			HTTPStatusCode: res.StatusCode,
26484		},
26485	}
26486	target := &ret
26487	if err := gensupport.DecodeResponse(target, res); err != nil {
26488		return nil, err
26489	}
26490	return ret, nil
26491	// {
26492	//   "description": "Inserts a new creative field.",
26493	//   "httpMethod": "POST",
26494	//   "id": "dfareporting.creativeFields.insert",
26495	//   "parameterOrder": [
26496	//     "profileId"
26497	//   ],
26498	//   "parameters": {
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",
26508	//   "request": {
26509	//     "$ref": "CreativeField"
26510	//   },
26511	//   "response": {
26512	//     "$ref": "CreativeField"
26513	//   },
26514	//   "scopes": [
26515	//     "https://www.googleapis.com/auth/dfatrafficking"
26516	//   ]
26517	// }
26518
26519}
26520
26521// method id "dfareporting.creativeFields.list":
26522
26523type CreativeFieldsListCall struct {
26524	s            *Service
26525	profileId    int64
26526	urlParams_   gensupport.URLParams
26527	ifNoneMatch_ string
26528	ctx_         context.Context
26529	header_      http.Header
26530}
26531
26532// List: Retrieves a list of creative fields, possibly filtered. This
26533// method supports paging.
26534func (r *CreativeFieldsService) List(profileId int64) *CreativeFieldsListCall {
26535	c := &CreativeFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26536	c.profileId = profileId
26537	return c
26538}
26539
26540// AdvertiserIds sets the optional parameter "advertiserIds": Select
26541// only creative fields that belong to these advertisers.
26542func (c *CreativeFieldsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeFieldsListCall {
26543	var advertiserIds_ []string
26544	for _, v := range advertiserIds {
26545		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
26546	}
26547	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
26548	return c
26549}
26550
26551// Ids sets the optional parameter "ids": Select only creative fields
26552// with these IDs.
26553func (c *CreativeFieldsListCall) Ids(ids ...int64) *CreativeFieldsListCall {
26554	var ids_ []string
26555	for _, v := range ids {
26556		ids_ = append(ids_, fmt.Sprint(v))
26557	}
26558	c.urlParams_.SetMulti("ids", ids_)
26559	return c
26560}
26561
26562// MaxResults sets the optional parameter "maxResults": Maximum number
26563// of results to return.
26564func (c *CreativeFieldsListCall) MaxResults(maxResults int64) *CreativeFieldsListCall {
26565	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
26566	return c
26567}
26568
26569// PageToken sets the optional parameter "pageToken": Value of the
26570// nextPageToken from the previous result page.
26571func (c *CreativeFieldsListCall) PageToken(pageToken string) *CreativeFieldsListCall {
26572	c.urlParams_.Set("pageToken", pageToken)
26573	return c
26574}
26575
26576// SearchString sets the optional parameter "searchString": Allows
26577// searching for creative fields by name or ID. Wildcards (*) are
26578// allowed. For example, "creativefield*2015" will return creative
26579// fields with names like "creativefield June 2015", "creativefield
26580// April 2015", or simply "creativefield 2015". Most of the searches
26581// also add wild-cards implicitly at the start and the end of the search
26582// string. For example, a search string of "creativefield" will match
26583// creative fields with the name "my creativefield", "creativefield
26584// 2015", or simply "creativefield".
26585func (c *CreativeFieldsListCall) SearchString(searchString string) *CreativeFieldsListCall {
26586	c.urlParams_.Set("searchString", searchString)
26587	return c
26588}
26589
26590// SortField sets the optional parameter "sortField": Field by which to
26591// sort the list.
26592//
26593// Possible values:
26594//   "ID" (default)
26595//   "NAME"
26596func (c *CreativeFieldsListCall) SortField(sortField string) *CreativeFieldsListCall {
26597	c.urlParams_.Set("sortField", sortField)
26598	return c
26599}
26600
26601// SortOrder sets the optional parameter "sortOrder": Order of sorted
26602// results.
26603//
26604// Possible values:
26605//   "ASCENDING" (default)
26606//   "DESCENDING"
26607func (c *CreativeFieldsListCall) SortOrder(sortOrder string) *CreativeFieldsListCall {
26608	c.urlParams_.Set("sortOrder", sortOrder)
26609	return c
26610}
26611
26612// Fields allows partial responses to be retrieved. See
26613// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26614// for more information.
26615func (c *CreativeFieldsListCall) Fields(s ...googleapi.Field) *CreativeFieldsListCall {
26616	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26617	return c
26618}
26619
26620// IfNoneMatch sets the optional parameter which makes the operation
26621// fail if the object's ETag matches the given value. This is useful for
26622// getting updates only after the object has changed since the last
26623// request. Use googleapi.IsNotModified to check whether the response
26624// error from Do is the result of In-None-Match.
26625func (c *CreativeFieldsListCall) IfNoneMatch(entityTag string) *CreativeFieldsListCall {
26626	c.ifNoneMatch_ = entityTag
26627	return c
26628}
26629
26630// Context sets the context to be used in this call's Do method. Any
26631// pending HTTP request will be aborted if the provided context is
26632// canceled.
26633func (c *CreativeFieldsListCall) Context(ctx context.Context) *CreativeFieldsListCall {
26634	c.ctx_ = ctx
26635	return c
26636}
26637
26638// Header returns an http.Header that can be modified by the caller to
26639// add HTTP headers to the request.
26640func (c *CreativeFieldsListCall) Header() http.Header {
26641	if c.header_ == nil {
26642		c.header_ = make(http.Header)
26643	}
26644	return c.header_
26645}
26646
26647func (c *CreativeFieldsListCall) doRequest(alt string) (*http.Response, error) {
26648	reqHeaders := make(http.Header)
26649	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
26650	for k, v := range c.header_ {
26651		reqHeaders[k] = v
26652	}
26653	reqHeaders.Set("User-Agent", c.s.userAgent())
26654	if c.ifNoneMatch_ != "" {
26655		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26656	}
26657	var body io.Reader = nil
26658	c.urlParams_.Set("alt", alt)
26659	c.urlParams_.Set("prettyPrint", "false")
26660	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26661	urls += "?" + c.urlParams_.Encode()
26662	req, err := http.NewRequest("GET", urls, body)
26663	if err != nil {
26664		return nil, err
26665	}
26666	req.Header = reqHeaders
26667	googleapi.Expand(req.URL, map[string]string{
26668		"profileId": strconv.FormatInt(c.profileId, 10),
26669	})
26670	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26671}
26672
26673// Do executes the "dfareporting.creativeFields.list" call.
26674// Exactly one of *CreativeFieldsListResponse or error will be non-nil.
26675// Any non-2xx status code is an error. Response headers are in either
26676// *CreativeFieldsListResponse.ServerResponse.Header or (if a response
26677// was returned at all) in error.(*googleapi.Error).Header. Use
26678// googleapi.IsNotModified to check whether the returned error was
26679// because http.StatusNotModified was returned.
26680func (c *CreativeFieldsListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldsListResponse, error) {
26681	gensupport.SetOptions(c.urlParams_, opts...)
26682	res, err := c.doRequest("json")
26683	if res != nil && res.StatusCode == http.StatusNotModified {
26684		if res.Body != nil {
26685			res.Body.Close()
26686		}
26687		return nil, &googleapi.Error{
26688			Code:   res.StatusCode,
26689			Header: res.Header,
26690		}
26691	}
26692	if err != nil {
26693		return nil, err
26694	}
26695	defer googleapi.CloseBody(res)
26696	if err := googleapi.CheckResponse(res); err != nil {
26697		return nil, err
26698	}
26699	ret := &CreativeFieldsListResponse{
26700		ServerResponse: googleapi.ServerResponse{
26701			Header:         res.Header,
26702			HTTPStatusCode: res.StatusCode,
26703		},
26704	}
26705	target := &ret
26706	if err := gensupport.DecodeResponse(target, res); err != nil {
26707		return nil, err
26708	}
26709	return ret, nil
26710	// {
26711	//   "description": "Retrieves a list of creative fields, possibly filtered. This method supports paging.",
26712	//   "httpMethod": "GET",
26713	//   "id": "dfareporting.creativeFields.list",
26714	//   "parameterOrder": [
26715	//     "profileId"
26716	//   ],
26717	//   "parameters": {
26718	//     "advertiserIds": {
26719	//       "description": "Select only creative fields that belong to these advertisers.",
26720	//       "format": "int64",
26721	//       "location": "query",
26722	//       "repeated": true,
26723	//       "type": "string"
26724	//     },
26725	//     "ids": {
26726	//       "description": "Select only creative fields with these IDs.",
26727	//       "format": "int64",
26728	//       "location": "query",
26729	//       "repeated": true,
26730	//       "type": "string"
26731	//     },
26732	//     "maxResults": {
26733	//       "default": "1000",
26734	//       "description": "Maximum number of results to return.",
26735	//       "format": "int32",
26736	//       "location": "query",
26737	//       "maximum": "1000",
26738	//       "minimum": "0",
26739	//       "type": "integer"
26740	//     },
26741	//     "pageToken": {
26742	//       "description": "Value of the nextPageToken from the previous result page.",
26743	//       "location": "query",
26744	//       "type": "string"
26745	//     },
26746	//     "profileId": {
26747	//       "description": "User profile ID associated with this request.",
26748	//       "format": "int64",
26749	//       "location": "path",
26750	//       "required": true,
26751	//       "type": "string"
26752	//     },
26753	//     "searchString": {
26754	//       "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\".",
26755	//       "location": "query",
26756	//       "type": "string"
26757	//     },
26758	//     "sortField": {
26759	//       "default": "ID",
26760	//       "description": "Field by which to sort the list.",
26761	//       "enum": [
26762	//         "ID",
26763	//         "NAME"
26764	//       ],
26765	//       "enumDescriptions": [
26766	//         "",
26767	//         ""
26768	//       ],
26769	//       "location": "query",
26770	//       "type": "string"
26771	//     },
26772	//     "sortOrder": {
26773	//       "default": "ASCENDING",
26774	//       "description": "Order of sorted results.",
26775	//       "enum": [
26776	//         "ASCENDING",
26777	//         "DESCENDING"
26778	//       ],
26779	//       "enumDescriptions": [
26780	//         "",
26781	//         ""
26782	//       ],
26783	//       "location": "query",
26784	//       "type": "string"
26785	//     }
26786	//   },
26787	//   "path": "userprofiles/{profileId}/creativeFields",
26788	//   "response": {
26789	//     "$ref": "CreativeFieldsListResponse"
26790	//   },
26791	//   "scopes": [
26792	//     "https://www.googleapis.com/auth/dfatrafficking"
26793	//   ]
26794	// }
26795
26796}
26797
26798// Pages invokes f for each page of results.
26799// A non-nil error returned from f will halt the iteration.
26800// The provided context supersedes any context provided to the Context method.
26801func (c *CreativeFieldsListCall) Pages(ctx context.Context, f func(*CreativeFieldsListResponse) error) error {
26802	c.ctx_ = ctx
26803	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26804	for {
26805		x, err := c.Do()
26806		if err != nil {
26807			return err
26808		}
26809		if err := f(x); err != nil {
26810			return err
26811		}
26812		if x.NextPageToken == "" {
26813			return nil
26814		}
26815		c.PageToken(x.NextPageToken)
26816	}
26817}
26818
26819// method id "dfareporting.creativeFields.patch":
26820
26821type CreativeFieldsPatchCall struct {
26822	s             *Service
26823	profileId     int64
26824	creativefield *CreativeField
26825	urlParams_    gensupport.URLParams
26826	ctx_          context.Context
26827	header_       http.Header
26828}
26829
26830// Patch: Updates an existing creative field. This method supports patch
26831// semantics.
26832func (r *CreativeFieldsService) Patch(profileId int64, id int64, creativefield *CreativeField) *CreativeFieldsPatchCall {
26833	c := &CreativeFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26834	c.profileId = profileId
26835	c.urlParams_.Set("id", fmt.Sprint(id))
26836	c.creativefield = creativefield
26837	return c
26838}
26839
26840// Fields allows partial responses to be retrieved. See
26841// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26842// for more information.
26843func (c *CreativeFieldsPatchCall) Fields(s ...googleapi.Field) *CreativeFieldsPatchCall {
26844	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26845	return c
26846}
26847
26848// Context sets the context to be used in this call's Do method. Any
26849// pending HTTP request will be aborted if the provided context is
26850// canceled.
26851func (c *CreativeFieldsPatchCall) Context(ctx context.Context) *CreativeFieldsPatchCall {
26852	c.ctx_ = ctx
26853	return c
26854}
26855
26856// Header returns an http.Header that can be modified by the caller to
26857// add HTTP headers to the request.
26858func (c *CreativeFieldsPatchCall) Header() http.Header {
26859	if c.header_ == nil {
26860		c.header_ = make(http.Header)
26861	}
26862	return c.header_
26863}
26864
26865func (c *CreativeFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
26866	reqHeaders := make(http.Header)
26867	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
26868	for k, v := range c.header_ {
26869		reqHeaders[k] = v
26870	}
26871	reqHeaders.Set("User-Agent", c.s.userAgent())
26872	var body io.Reader = nil
26873	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26874	if err != nil {
26875		return nil, err
26876	}
26877	reqHeaders.Set("Content-Type", "application/json")
26878	c.urlParams_.Set("alt", alt)
26879	c.urlParams_.Set("prettyPrint", "false")
26880	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26881	urls += "?" + c.urlParams_.Encode()
26882	req, err := http.NewRequest("PATCH", urls, body)
26883	if err != nil {
26884		return nil, err
26885	}
26886	req.Header = reqHeaders
26887	googleapi.Expand(req.URL, map[string]string{
26888		"profileId": strconv.FormatInt(c.profileId, 10),
26889	})
26890	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26891}
26892
26893// Do executes the "dfareporting.creativeFields.patch" call.
26894// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26895// status code is an error. Response headers are in either
26896// *CreativeField.ServerResponse.Header or (if a response was returned
26897// at all) in error.(*googleapi.Error).Header. Use
26898// googleapi.IsNotModified to check whether the returned error was
26899// because http.StatusNotModified was returned.
26900func (c *CreativeFieldsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26901	gensupport.SetOptions(c.urlParams_, opts...)
26902	res, err := c.doRequest("json")
26903	if res != nil && res.StatusCode == http.StatusNotModified {
26904		if res.Body != nil {
26905			res.Body.Close()
26906		}
26907		return nil, &googleapi.Error{
26908			Code:   res.StatusCode,
26909			Header: res.Header,
26910		}
26911	}
26912	if err != nil {
26913		return nil, err
26914	}
26915	defer googleapi.CloseBody(res)
26916	if err := googleapi.CheckResponse(res); err != nil {
26917		return nil, err
26918	}
26919	ret := &CreativeField{
26920		ServerResponse: googleapi.ServerResponse{
26921			Header:         res.Header,
26922			HTTPStatusCode: res.StatusCode,
26923		},
26924	}
26925	target := &ret
26926	if err := gensupport.DecodeResponse(target, res); err != nil {
26927		return nil, err
26928	}
26929	return ret, nil
26930	// {
26931	//   "description": "Updates an existing creative field. This method supports patch semantics.",
26932	//   "httpMethod": "PATCH",
26933	//   "id": "dfareporting.creativeFields.patch",
26934	//   "parameterOrder": [
26935	//     "profileId",
26936	//     "id"
26937	//   ],
26938	//   "parameters": {
26939	//     "id": {
26940	//       "description": "Creative Field ID",
26941	//       "format": "int64",
26942	//       "location": "query",
26943	//       "required": true,
26944	//       "type": "string"
26945	//     },
26946	//     "profileId": {
26947	//       "description": "User profile ID associated with this request.",
26948	//       "format": "int64",
26949	//       "location": "path",
26950	//       "required": true,
26951	//       "type": "string"
26952	//     }
26953	//   },
26954	//   "path": "userprofiles/{profileId}/creativeFields",
26955	//   "request": {
26956	//     "$ref": "CreativeField"
26957	//   },
26958	//   "response": {
26959	//     "$ref": "CreativeField"
26960	//   },
26961	//   "scopes": [
26962	//     "https://www.googleapis.com/auth/dfatrafficking"
26963	//   ]
26964	// }
26965
26966}
26967
26968// method id "dfareporting.creativeFields.update":
26969
26970type CreativeFieldsUpdateCall struct {
26971	s             *Service
26972	profileId     int64
26973	creativefield *CreativeField
26974	urlParams_    gensupport.URLParams
26975	ctx_          context.Context
26976	header_       http.Header
26977}
26978
26979// Update: Updates an existing creative field.
26980func (r *CreativeFieldsService) Update(profileId int64, creativefield *CreativeField) *CreativeFieldsUpdateCall {
26981	c := &CreativeFieldsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26982	c.profileId = profileId
26983	c.creativefield = creativefield
26984	return c
26985}
26986
26987// Fields allows partial responses to be retrieved. See
26988// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26989// for more information.
26990func (c *CreativeFieldsUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldsUpdateCall {
26991	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26992	return c
26993}
26994
26995// Context sets the context to be used in this call's Do method. Any
26996// pending HTTP request will be aborted if the provided context is
26997// canceled.
26998func (c *CreativeFieldsUpdateCall) Context(ctx context.Context) *CreativeFieldsUpdateCall {
26999	c.ctx_ = ctx
27000	return c
27001}
27002
27003// Header returns an http.Header that can be modified by the caller to
27004// add HTTP headers to the request.
27005func (c *CreativeFieldsUpdateCall) Header() http.Header {
27006	if c.header_ == nil {
27007		c.header_ = make(http.Header)
27008	}
27009	return c.header_
27010}
27011
27012func (c *CreativeFieldsUpdateCall) doRequest(alt string) (*http.Response, error) {
27013	reqHeaders := make(http.Header)
27014	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27015	for k, v := range c.header_ {
27016		reqHeaders[k] = v
27017	}
27018	reqHeaders.Set("User-Agent", c.s.userAgent())
27019	var body io.Reader = nil
27020	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
27021	if err != nil {
27022		return nil, err
27023	}
27024	reqHeaders.Set("Content-Type", "application/json")
27025	c.urlParams_.Set("alt", alt)
27026	c.urlParams_.Set("prettyPrint", "false")
27027	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
27028	urls += "?" + c.urlParams_.Encode()
27029	req, err := http.NewRequest("PUT", urls, body)
27030	if err != nil {
27031		return nil, err
27032	}
27033	req.Header = reqHeaders
27034	googleapi.Expand(req.URL, map[string]string{
27035		"profileId": strconv.FormatInt(c.profileId, 10),
27036	})
27037	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27038}
27039
27040// Do executes the "dfareporting.creativeFields.update" call.
27041// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
27042// status code is an error. Response headers are in either
27043// *CreativeField.ServerResponse.Header or (if a response was returned
27044// at all) in error.(*googleapi.Error).Header. Use
27045// googleapi.IsNotModified to check whether the returned error was
27046// because http.StatusNotModified was returned.
27047func (c *CreativeFieldsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
27048	gensupport.SetOptions(c.urlParams_, opts...)
27049	res, err := c.doRequest("json")
27050	if res != nil && res.StatusCode == http.StatusNotModified {
27051		if res.Body != nil {
27052			res.Body.Close()
27053		}
27054		return nil, &googleapi.Error{
27055			Code:   res.StatusCode,
27056			Header: res.Header,
27057		}
27058	}
27059	if err != nil {
27060		return nil, err
27061	}
27062	defer googleapi.CloseBody(res)
27063	if err := googleapi.CheckResponse(res); err != nil {
27064		return nil, err
27065	}
27066	ret := &CreativeField{
27067		ServerResponse: googleapi.ServerResponse{
27068			Header:         res.Header,
27069			HTTPStatusCode: res.StatusCode,
27070		},
27071	}
27072	target := &ret
27073	if err := gensupport.DecodeResponse(target, res); err != nil {
27074		return nil, err
27075	}
27076	return ret, nil
27077	// {
27078	//   "description": "Updates an existing creative field.",
27079	//   "httpMethod": "PUT",
27080	//   "id": "dfareporting.creativeFields.update",
27081	//   "parameterOrder": [
27082	//     "profileId"
27083	//   ],
27084	//   "parameters": {
27085	//     "profileId": {
27086	//       "description": "User profile ID associated with this request.",
27087	//       "format": "int64",
27088	//       "location": "path",
27089	//       "required": true,
27090	//       "type": "string"
27091	//     }
27092	//   },
27093	//   "path": "userprofiles/{profileId}/creativeFields",
27094	//   "request": {
27095	//     "$ref": "CreativeField"
27096	//   },
27097	//   "response": {
27098	//     "$ref": "CreativeField"
27099	//   },
27100	//   "scopes": [
27101	//     "https://www.googleapis.com/auth/dfatrafficking"
27102	//   ]
27103	// }
27104
27105}
27106
27107// method id "dfareporting.creativeGroups.get":
27108
27109type CreativeGroupsGetCall struct {
27110	s            *Service
27111	profileId    int64
27112	id           int64
27113	urlParams_   gensupport.URLParams
27114	ifNoneMatch_ string
27115	ctx_         context.Context
27116	header_      http.Header
27117}
27118
27119// Get: Gets one creative group by ID.
27120func (r *CreativeGroupsService) Get(profileId int64, id int64) *CreativeGroupsGetCall {
27121	c := &CreativeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27122	c.profileId = profileId
27123	c.id = id
27124	return c
27125}
27126
27127// Fields allows partial responses to be retrieved. See
27128// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27129// for more information.
27130func (c *CreativeGroupsGetCall) Fields(s ...googleapi.Field) *CreativeGroupsGetCall {
27131	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27132	return c
27133}
27134
27135// IfNoneMatch sets the optional parameter which makes the operation
27136// fail if the object's ETag matches the given value. This is useful for
27137// getting updates only after the object has changed since the last
27138// request. Use googleapi.IsNotModified to check whether the response
27139// error from Do is the result of In-None-Match.
27140func (c *CreativeGroupsGetCall) IfNoneMatch(entityTag string) *CreativeGroupsGetCall {
27141	c.ifNoneMatch_ = entityTag
27142	return c
27143}
27144
27145// Context sets the context to be used in this call's Do method. Any
27146// pending HTTP request will be aborted if the provided context is
27147// canceled.
27148func (c *CreativeGroupsGetCall) Context(ctx context.Context) *CreativeGroupsGetCall {
27149	c.ctx_ = ctx
27150	return c
27151}
27152
27153// Header returns an http.Header that can be modified by the caller to
27154// add HTTP headers to the request.
27155func (c *CreativeGroupsGetCall) Header() http.Header {
27156	if c.header_ == nil {
27157		c.header_ = make(http.Header)
27158	}
27159	return c.header_
27160}
27161
27162func (c *CreativeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
27163	reqHeaders := make(http.Header)
27164	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27165	for k, v := range c.header_ {
27166		reqHeaders[k] = v
27167	}
27168	reqHeaders.Set("User-Agent", c.s.userAgent())
27169	if c.ifNoneMatch_ != "" {
27170		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27171	}
27172	var body io.Reader = nil
27173	c.urlParams_.Set("alt", alt)
27174	c.urlParams_.Set("prettyPrint", "false")
27175	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups/{id}")
27176	urls += "?" + c.urlParams_.Encode()
27177	req, err := http.NewRequest("GET", urls, body)
27178	if err != nil {
27179		return nil, err
27180	}
27181	req.Header = reqHeaders
27182	googleapi.Expand(req.URL, map[string]string{
27183		"profileId": strconv.FormatInt(c.profileId, 10),
27184		"id":        strconv.FormatInt(c.id, 10),
27185	})
27186	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27187}
27188
27189// Do executes the "dfareporting.creativeGroups.get" call.
27190// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27191// status code is an error. Response headers are in either
27192// *CreativeGroup.ServerResponse.Header or (if a response was returned
27193// at all) in error.(*googleapi.Error).Header. Use
27194// googleapi.IsNotModified to check whether the returned error was
27195// because http.StatusNotModified was returned.
27196func (c *CreativeGroupsGetCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27197	gensupport.SetOptions(c.urlParams_, opts...)
27198	res, err := c.doRequest("json")
27199	if res != nil && res.StatusCode == http.StatusNotModified {
27200		if res.Body != nil {
27201			res.Body.Close()
27202		}
27203		return nil, &googleapi.Error{
27204			Code:   res.StatusCode,
27205			Header: res.Header,
27206		}
27207	}
27208	if err != nil {
27209		return nil, err
27210	}
27211	defer googleapi.CloseBody(res)
27212	if err := googleapi.CheckResponse(res); err != nil {
27213		return nil, err
27214	}
27215	ret := &CreativeGroup{
27216		ServerResponse: googleapi.ServerResponse{
27217			Header:         res.Header,
27218			HTTPStatusCode: res.StatusCode,
27219		},
27220	}
27221	target := &ret
27222	if err := gensupport.DecodeResponse(target, res); err != nil {
27223		return nil, err
27224	}
27225	return ret, nil
27226	// {
27227	//   "description": "Gets one creative group by ID.",
27228	//   "httpMethod": "GET",
27229	//   "id": "dfareporting.creativeGroups.get",
27230	//   "parameterOrder": [
27231	//     "profileId",
27232	//     "id"
27233	//   ],
27234	//   "parameters": {
27235	//     "id": {
27236	//       "description": "Creative group ID.",
27237	//       "format": "int64",
27238	//       "location": "path",
27239	//       "required": true,
27240	//       "type": "string"
27241	//     },
27242	//     "profileId": {
27243	//       "description": "User profile ID associated with this request.",
27244	//       "format": "int64",
27245	//       "location": "path",
27246	//       "required": true,
27247	//       "type": "string"
27248	//     }
27249	//   },
27250	//   "path": "userprofiles/{profileId}/creativeGroups/{id}",
27251	//   "response": {
27252	//     "$ref": "CreativeGroup"
27253	//   },
27254	//   "scopes": [
27255	//     "https://www.googleapis.com/auth/dfatrafficking"
27256	//   ]
27257	// }
27258
27259}
27260
27261// method id "dfareporting.creativeGroups.insert":
27262
27263type CreativeGroupsInsertCall struct {
27264	s             *Service
27265	profileId     int64
27266	creativegroup *CreativeGroup
27267	urlParams_    gensupport.URLParams
27268	ctx_          context.Context
27269	header_       http.Header
27270}
27271
27272// Insert: Inserts a new creative group.
27273func (r *CreativeGroupsService) Insert(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsInsertCall {
27274	c := &CreativeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27275	c.profileId = profileId
27276	c.creativegroup = creativegroup
27277	return c
27278}
27279
27280// Fields allows partial responses to be retrieved. See
27281// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27282// for more information.
27283func (c *CreativeGroupsInsertCall) Fields(s ...googleapi.Field) *CreativeGroupsInsertCall {
27284	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27285	return c
27286}
27287
27288// Context sets the context to be used in this call's Do method. Any
27289// pending HTTP request will be aborted if the provided context is
27290// canceled.
27291func (c *CreativeGroupsInsertCall) Context(ctx context.Context) *CreativeGroupsInsertCall {
27292	c.ctx_ = ctx
27293	return c
27294}
27295
27296// Header returns an http.Header that can be modified by the caller to
27297// add HTTP headers to the request.
27298func (c *CreativeGroupsInsertCall) Header() http.Header {
27299	if c.header_ == nil {
27300		c.header_ = make(http.Header)
27301	}
27302	return c.header_
27303}
27304
27305func (c *CreativeGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
27306	reqHeaders := make(http.Header)
27307	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27308	for k, v := range c.header_ {
27309		reqHeaders[k] = v
27310	}
27311	reqHeaders.Set("User-Agent", c.s.userAgent())
27312	var body io.Reader = nil
27313	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27314	if err != nil {
27315		return nil, err
27316	}
27317	reqHeaders.Set("Content-Type", "application/json")
27318	c.urlParams_.Set("alt", alt)
27319	c.urlParams_.Set("prettyPrint", "false")
27320	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27321	urls += "?" + c.urlParams_.Encode()
27322	req, err := http.NewRequest("POST", urls, body)
27323	if err != nil {
27324		return nil, err
27325	}
27326	req.Header = reqHeaders
27327	googleapi.Expand(req.URL, map[string]string{
27328		"profileId": strconv.FormatInt(c.profileId, 10),
27329	})
27330	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27331}
27332
27333// Do executes the "dfareporting.creativeGroups.insert" call.
27334// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27335// status code is an error. Response headers are in either
27336// *CreativeGroup.ServerResponse.Header or (if a response was returned
27337// at all) in error.(*googleapi.Error).Header. Use
27338// googleapi.IsNotModified to check whether the returned error was
27339// because http.StatusNotModified was returned.
27340func (c *CreativeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27341	gensupport.SetOptions(c.urlParams_, opts...)
27342	res, err := c.doRequest("json")
27343	if res != nil && res.StatusCode == http.StatusNotModified {
27344		if res.Body != nil {
27345			res.Body.Close()
27346		}
27347		return nil, &googleapi.Error{
27348			Code:   res.StatusCode,
27349			Header: res.Header,
27350		}
27351	}
27352	if err != nil {
27353		return nil, err
27354	}
27355	defer googleapi.CloseBody(res)
27356	if err := googleapi.CheckResponse(res); err != nil {
27357		return nil, err
27358	}
27359	ret := &CreativeGroup{
27360		ServerResponse: googleapi.ServerResponse{
27361			Header:         res.Header,
27362			HTTPStatusCode: res.StatusCode,
27363		},
27364	}
27365	target := &ret
27366	if err := gensupport.DecodeResponse(target, res); err != nil {
27367		return nil, err
27368	}
27369	return ret, nil
27370	// {
27371	//   "description": "Inserts a new creative group.",
27372	//   "httpMethod": "POST",
27373	//   "id": "dfareporting.creativeGroups.insert",
27374	//   "parameterOrder": [
27375	//     "profileId"
27376	//   ],
27377	//   "parameters": {
27378	//     "profileId": {
27379	//       "description": "User profile ID associated with this request.",
27380	//       "format": "int64",
27381	//       "location": "path",
27382	//       "required": true,
27383	//       "type": "string"
27384	//     }
27385	//   },
27386	//   "path": "userprofiles/{profileId}/creativeGroups",
27387	//   "request": {
27388	//     "$ref": "CreativeGroup"
27389	//   },
27390	//   "response": {
27391	//     "$ref": "CreativeGroup"
27392	//   },
27393	//   "scopes": [
27394	//     "https://www.googleapis.com/auth/dfatrafficking"
27395	//   ]
27396	// }
27397
27398}
27399
27400// method id "dfareporting.creativeGroups.list":
27401
27402type CreativeGroupsListCall struct {
27403	s            *Service
27404	profileId    int64
27405	urlParams_   gensupport.URLParams
27406	ifNoneMatch_ string
27407	ctx_         context.Context
27408	header_      http.Header
27409}
27410
27411// List: Retrieves a list of creative groups, possibly filtered. This
27412// method supports paging.
27413func (r *CreativeGroupsService) List(profileId int64) *CreativeGroupsListCall {
27414	c := &CreativeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27415	c.profileId = profileId
27416	return c
27417}
27418
27419// AdvertiserIds sets the optional parameter "advertiserIds": Select
27420// only creative groups that belong to these advertisers.
27421func (c *CreativeGroupsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeGroupsListCall {
27422	var advertiserIds_ []string
27423	for _, v := range advertiserIds {
27424		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
27425	}
27426	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
27427	return c
27428}
27429
27430// GroupNumber sets the optional parameter "groupNumber": Select only
27431// creative groups that belong to this subgroup.
27432func (c *CreativeGroupsListCall) GroupNumber(groupNumber int64) *CreativeGroupsListCall {
27433	c.urlParams_.Set("groupNumber", fmt.Sprint(groupNumber))
27434	return c
27435}
27436
27437// Ids sets the optional parameter "ids": Select only creative groups
27438// with these IDs.
27439func (c *CreativeGroupsListCall) Ids(ids ...int64) *CreativeGroupsListCall {
27440	var ids_ []string
27441	for _, v := range ids {
27442		ids_ = append(ids_, fmt.Sprint(v))
27443	}
27444	c.urlParams_.SetMulti("ids", ids_)
27445	return c
27446}
27447
27448// MaxResults sets the optional parameter "maxResults": Maximum number
27449// of results to return.
27450func (c *CreativeGroupsListCall) MaxResults(maxResults int64) *CreativeGroupsListCall {
27451	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27452	return c
27453}
27454
27455// PageToken sets the optional parameter "pageToken": Value of the
27456// nextPageToken from the previous result page.
27457func (c *CreativeGroupsListCall) PageToken(pageToken string) *CreativeGroupsListCall {
27458	c.urlParams_.Set("pageToken", pageToken)
27459	return c
27460}
27461
27462// SearchString sets the optional parameter "searchString": Allows
27463// searching for creative groups by name or ID. Wildcards (*) are
27464// allowed. For example, "creativegroup*2015" will return creative
27465// groups with names like "creativegroup June 2015", "creativegroup
27466// April 2015", or simply "creativegroup 2015". Most of the searches
27467// also add wild-cards implicitly at the start and the end of the search
27468// string. For example, a search string of "creativegroup" will match
27469// creative groups with the name "my creativegroup", "creativegroup
27470// 2015", or simply "creativegroup".
27471func (c *CreativeGroupsListCall) SearchString(searchString string) *CreativeGroupsListCall {
27472	c.urlParams_.Set("searchString", searchString)
27473	return c
27474}
27475
27476// SortField sets the optional parameter "sortField": Field by which to
27477// sort the list.
27478//
27479// Possible values:
27480//   "ID" (default)
27481//   "NAME"
27482func (c *CreativeGroupsListCall) SortField(sortField string) *CreativeGroupsListCall {
27483	c.urlParams_.Set("sortField", sortField)
27484	return c
27485}
27486
27487// SortOrder sets the optional parameter "sortOrder": Order of sorted
27488// results.
27489//
27490// Possible values:
27491//   "ASCENDING" (default)
27492//   "DESCENDING"
27493func (c *CreativeGroupsListCall) SortOrder(sortOrder string) *CreativeGroupsListCall {
27494	c.urlParams_.Set("sortOrder", sortOrder)
27495	return c
27496}
27497
27498// Fields allows partial responses to be retrieved. See
27499// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27500// for more information.
27501func (c *CreativeGroupsListCall) Fields(s ...googleapi.Field) *CreativeGroupsListCall {
27502	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27503	return c
27504}
27505
27506// IfNoneMatch sets the optional parameter which makes the operation
27507// fail if the object's ETag matches the given value. This is useful for
27508// getting updates only after the object has changed since the last
27509// request. Use googleapi.IsNotModified to check whether the response
27510// error from Do is the result of In-None-Match.
27511func (c *CreativeGroupsListCall) IfNoneMatch(entityTag string) *CreativeGroupsListCall {
27512	c.ifNoneMatch_ = entityTag
27513	return c
27514}
27515
27516// Context sets the context to be used in this call's Do method. Any
27517// pending HTTP request will be aborted if the provided context is
27518// canceled.
27519func (c *CreativeGroupsListCall) Context(ctx context.Context) *CreativeGroupsListCall {
27520	c.ctx_ = ctx
27521	return c
27522}
27523
27524// Header returns an http.Header that can be modified by the caller to
27525// add HTTP headers to the request.
27526func (c *CreativeGroupsListCall) Header() http.Header {
27527	if c.header_ == nil {
27528		c.header_ = make(http.Header)
27529	}
27530	return c.header_
27531}
27532
27533func (c *CreativeGroupsListCall) doRequest(alt string) (*http.Response, error) {
27534	reqHeaders := make(http.Header)
27535	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27536	for k, v := range c.header_ {
27537		reqHeaders[k] = v
27538	}
27539	reqHeaders.Set("User-Agent", c.s.userAgent())
27540	if c.ifNoneMatch_ != "" {
27541		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27542	}
27543	var body io.Reader = nil
27544	c.urlParams_.Set("alt", alt)
27545	c.urlParams_.Set("prettyPrint", "false")
27546	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27547	urls += "?" + c.urlParams_.Encode()
27548	req, err := http.NewRequest("GET", urls, body)
27549	if err != nil {
27550		return nil, err
27551	}
27552	req.Header = reqHeaders
27553	googleapi.Expand(req.URL, map[string]string{
27554		"profileId": strconv.FormatInt(c.profileId, 10),
27555	})
27556	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27557}
27558
27559// Do executes the "dfareporting.creativeGroups.list" call.
27560// Exactly one of *CreativeGroupsListResponse or error will be non-nil.
27561// Any non-2xx status code is an error. Response headers are in either
27562// *CreativeGroupsListResponse.ServerResponse.Header or (if a response
27563// was returned at all) in error.(*googleapi.Error).Header. Use
27564// googleapi.IsNotModified to check whether the returned error was
27565// because http.StatusNotModified was returned.
27566func (c *CreativeGroupsListCall) Do(opts ...googleapi.CallOption) (*CreativeGroupsListResponse, error) {
27567	gensupport.SetOptions(c.urlParams_, opts...)
27568	res, err := c.doRequest("json")
27569	if res != nil && res.StatusCode == http.StatusNotModified {
27570		if res.Body != nil {
27571			res.Body.Close()
27572		}
27573		return nil, &googleapi.Error{
27574			Code:   res.StatusCode,
27575			Header: res.Header,
27576		}
27577	}
27578	if err != nil {
27579		return nil, err
27580	}
27581	defer googleapi.CloseBody(res)
27582	if err := googleapi.CheckResponse(res); err != nil {
27583		return nil, err
27584	}
27585	ret := &CreativeGroupsListResponse{
27586		ServerResponse: googleapi.ServerResponse{
27587			Header:         res.Header,
27588			HTTPStatusCode: res.StatusCode,
27589		},
27590	}
27591	target := &ret
27592	if err := gensupport.DecodeResponse(target, res); err != nil {
27593		return nil, err
27594	}
27595	return ret, nil
27596	// {
27597	//   "description": "Retrieves a list of creative groups, possibly filtered. This method supports paging.",
27598	//   "httpMethod": "GET",
27599	//   "id": "dfareporting.creativeGroups.list",
27600	//   "parameterOrder": [
27601	//     "profileId"
27602	//   ],
27603	//   "parameters": {
27604	//     "advertiserIds": {
27605	//       "description": "Select only creative groups that belong to these advertisers.",
27606	//       "format": "int64",
27607	//       "location": "query",
27608	//       "repeated": true,
27609	//       "type": "string"
27610	//     },
27611	//     "groupNumber": {
27612	//       "description": "Select only creative groups that belong to this subgroup.",
27613	//       "format": "int32",
27614	//       "location": "query",
27615	//       "maximum": "2",
27616	//       "minimum": "1",
27617	//       "type": "integer"
27618	//     },
27619	//     "ids": {
27620	//       "description": "Select only creative groups with these IDs.",
27621	//       "format": "int64",
27622	//       "location": "query",
27623	//       "repeated": true,
27624	//       "type": "string"
27625	//     },
27626	//     "maxResults": {
27627	//       "default": "1000",
27628	//       "description": "Maximum number of results to return.",
27629	//       "format": "int32",
27630	//       "location": "query",
27631	//       "maximum": "1000",
27632	//       "minimum": "0",
27633	//       "type": "integer"
27634	//     },
27635	//     "pageToken": {
27636	//       "description": "Value of the nextPageToken from the previous result page.",
27637	//       "location": "query",
27638	//       "type": "string"
27639	//     },
27640	//     "profileId": {
27641	//       "description": "User profile ID associated with this request.",
27642	//       "format": "int64",
27643	//       "location": "path",
27644	//       "required": true,
27645	//       "type": "string"
27646	//     },
27647	//     "searchString": {
27648	//       "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\".",
27649	//       "location": "query",
27650	//       "type": "string"
27651	//     },
27652	//     "sortField": {
27653	//       "default": "ID",
27654	//       "description": "Field by which to sort the list.",
27655	//       "enum": [
27656	//         "ID",
27657	//         "NAME"
27658	//       ],
27659	//       "enumDescriptions": [
27660	//         "",
27661	//         ""
27662	//       ],
27663	//       "location": "query",
27664	//       "type": "string"
27665	//     },
27666	//     "sortOrder": {
27667	//       "default": "ASCENDING",
27668	//       "description": "Order of sorted results.",
27669	//       "enum": [
27670	//         "ASCENDING",
27671	//         "DESCENDING"
27672	//       ],
27673	//       "enumDescriptions": [
27674	//         "",
27675	//         ""
27676	//       ],
27677	//       "location": "query",
27678	//       "type": "string"
27679	//     }
27680	//   },
27681	//   "path": "userprofiles/{profileId}/creativeGroups",
27682	//   "response": {
27683	//     "$ref": "CreativeGroupsListResponse"
27684	//   },
27685	//   "scopes": [
27686	//     "https://www.googleapis.com/auth/dfatrafficking"
27687	//   ]
27688	// }
27689
27690}
27691
27692// Pages invokes f for each page of results.
27693// A non-nil error returned from f will halt the iteration.
27694// The provided context supersedes any context provided to the Context method.
27695func (c *CreativeGroupsListCall) Pages(ctx context.Context, f func(*CreativeGroupsListResponse) error) error {
27696	c.ctx_ = ctx
27697	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27698	for {
27699		x, err := c.Do()
27700		if err != nil {
27701			return err
27702		}
27703		if err := f(x); err != nil {
27704			return err
27705		}
27706		if x.NextPageToken == "" {
27707			return nil
27708		}
27709		c.PageToken(x.NextPageToken)
27710	}
27711}
27712
27713// method id "dfareporting.creativeGroups.patch":
27714
27715type CreativeGroupsPatchCall struct {
27716	s             *Service
27717	profileId     int64
27718	creativegroup *CreativeGroup
27719	urlParams_    gensupport.URLParams
27720	ctx_          context.Context
27721	header_       http.Header
27722}
27723
27724// Patch: Updates an existing creative group. This method supports patch
27725// semantics.
27726func (r *CreativeGroupsService) Patch(profileId int64, id int64, creativegroup *CreativeGroup) *CreativeGroupsPatchCall {
27727	c := &CreativeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27728	c.profileId = profileId
27729	c.urlParams_.Set("id", fmt.Sprint(id))
27730	c.creativegroup = creativegroup
27731	return c
27732}
27733
27734// Fields allows partial responses to be retrieved. See
27735// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27736// for more information.
27737func (c *CreativeGroupsPatchCall) Fields(s ...googleapi.Field) *CreativeGroupsPatchCall {
27738	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27739	return c
27740}
27741
27742// Context sets the context to be used in this call's Do method. Any
27743// pending HTTP request will be aborted if the provided context is
27744// canceled.
27745func (c *CreativeGroupsPatchCall) Context(ctx context.Context) *CreativeGroupsPatchCall {
27746	c.ctx_ = ctx
27747	return c
27748}
27749
27750// Header returns an http.Header that can be modified by the caller to
27751// add HTTP headers to the request.
27752func (c *CreativeGroupsPatchCall) Header() http.Header {
27753	if c.header_ == nil {
27754		c.header_ = make(http.Header)
27755	}
27756	return c.header_
27757}
27758
27759func (c *CreativeGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
27760	reqHeaders := make(http.Header)
27761	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27762	for k, v := range c.header_ {
27763		reqHeaders[k] = v
27764	}
27765	reqHeaders.Set("User-Agent", c.s.userAgent())
27766	var body io.Reader = nil
27767	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27768	if err != nil {
27769		return nil, err
27770	}
27771	reqHeaders.Set("Content-Type", "application/json")
27772	c.urlParams_.Set("alt", alt)
27773	c.urlParams_.Set("prettyPrint", "false")
27774	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27775	urls += "?" + c.urlParams_.Encode()
27776	req, err := http.NewRequest("PATCH", urls, body)
27777	if err != nil {
27778		return nil, err
27779	}
27780	req.Header = reqHeaders
27781	googleapi.Expand(req.URL, map[string]string{
27782		"profileId": strconv.FormatInt(c.profileId, 10),
27783	})
27784	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27785}
27786
27787// Do executes the "dfareporting.creativeGroups.patch" call.
27788// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27789// status code is an error. Response headers are in either
27790// *CreativeGroup.ServerResponse.Header or (if a response was returned
27791// at all) in error.(*googleapi.Error).Header. Use
27792// googleapi.IsNotModified to check whether the returned error was
27793// because http.StatusNotModified was returned.
27794func (c *CreativeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27795	gensupport.SetOptions(c.urlParams_, opts...)
27796	res, err := c.doRequest("json")
27797	if res != nil && res.StatusCode == http.StatusNotModified {
27798		if res.Body != nil {
27799			res.Body.Close()
27800		}
27801		return nil, &googleapi.Error{
27802			Code:   res.StatusCode,
27803			Header: res.Header,
27804		}
27805	}
27806	if err != nil {
27807		return nil, err
27808	}
27809	defer googleapi.CloseBody(res)
27810	if err := googleapi.CheckResponse(res); err != nil {
27811		return nil, err
27812	}
27813	ret := &CreativeGroup{
27814		ServerResponse: googleapi.ServerResponse{
27815			Header:         res.Header,
27816			HTTPStatusCode: res.StatusCode,
27817		},
27818	}
27819	target := &ret
27820	if err := gensupport.DecodeResponse(target, res); err != nil {
27821		return nil, err
27822	}
27823	return ret, nil
27824	// {
27825	//   "description": "Updates an existing creative group. This method supports patch semantics.",
27826	//   "httpMethod": "PATCH",
27827	//   "id": "dfareporting.creativeGroups.patch",
27828	//   "parameterOrder": [
27829	//     "profileId",
27830	//     "id"
27831	//   ],
27832	//   "parameters": {
27833	//     "id": {
27834	//       "description": "Creative group ID.",
27835	//       "format": "int64",
27836	//       "location": "query",
27837	//       "required": true,
27838	//       "type": "string"
27839	//     },
27840	//     "profileId": {
27841	//       "description": "User profile ID associated with this request.",
27842	//       "format": "int64",
27843	//       "location": "path",
27844	//       "required": true,
27845	//       "type": "string"
27846	//     }
27847	//   },
27848	//   "path": "userprofiles/{profileId}/creativeGroups",
27849	//   "request": {
27850	//     "$ref": "CreativeGroup"
27851	//   },
27852	//   "response": {
27853	//     "$ref": "CreativeGroup"
27854	//   },
27855	//   "scopes": [
27856	//     "https://www.googleapis.com/auth/dfatrafficking"
27857	//   ]
27858	// }
27859
27860}
27861
27862// method id "dfareporting.creativeGroups.update":
27863
27864type CreativeGroupsUpdateCall struct {
27865	s             *Service
27866	profileId     int64
27867	creativegroup *CreativeGroup
27868	urlParams_    gensupport.URLParams
27869	ctx_          context.Context
27870	header_       http.Header
27871}
27872
27873// Update: Updates an existing creative group.
27874func (r *CreativeGroupsService) Update(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsUpdateCall {
27875	c := &CreativeGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27876	c.profileId = profileId
27877	c.creativegroup = creativegroup
27878	return c
27879}
27880
27881// Fields allows partial responses to be retrieved. See
27882// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27883// for more information.
27884func (c *CreativeGroupsUpdateCall) Fields(s ...googleapi.Field) *CreativeGroupsUpdateCall {
27885	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27886	return c
27887}
27888
27889// Context sets the context to be used in this call's Do method. Any
27890// pending HTTP request will be aborted if the provided context is
27891// canceled.
27892func (c *CreativeGroupsUpdateCall) Context(ctx context.Context) *CreativeGroupsUpdateCall {
27893	c.ctx_ = ctx
27894	return c
27895}
27896
27897// Header returns an http.Header that can be modified by the caller to
27898// add HTTP headers to the request.
27899func (c *CreativeGroupsUpdateCall) Header() http.Header {
27900	if c.header_ == nil {
27901		c.header_ = make(http.Header)
27902	}
27903	return c.header_
27904}
27905
27906func (c *CreativeGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
27907	reqHeaders := make(http.Header)
27908	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27909	for k, v := range c.header_ {
27910		reqHeaders[k] = v
27911	}
27912	reqHeaders.Set("User-Agent", c.s.userAgent())
27913	var body io.Reader = nil
27914	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27915	if err != nil {
27916		return nil, err
27917	}
27918	reqHeaders.Set("Content-Type", "application/json")
27919	c.urlParams_.Set("alt", alt)
27920	c.urlParams_.Set("prettyPrint", "false")
27921	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27922	urls += "?" + c.urlParams_.Encode()
27923	req, err := http.NewRequest("PUT", urls, body)
27924	if err != nil {
27925		return nil, err
27926	}
27927	req.Header = reqHeaders
27928	googleapi.Expand(req.URL, map[string]string{
27929		"profileId": strconv.FormatInt(c.profileId, 10),
27930	})
27931	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27932}
27933
27934// Do executes the "dfareporting.creativeGroups.update" call.
27935// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27936// status code is an error. Response headers are in either
27937// *CreativeGroup.ServerResponse.Header or (if a response was returned
27938// at all) in error.(*googleapi.Error).Header. Use
27939// googleapi.IsNotModified to check whether the returned error was
27940// because http.StatusNotModified was returned.
27941func (c *CreativeGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27942	gensupport.SetOptions(c.urlParams_, opts...)
27943	res, err := c.doRequest("json")
27944	if res != nil && res.StatusCode == http.StatusNotModified {
27945		if res.Body != nil {
27946			res.Body.Close()
27947		}
27948		return nil, &googleapi.Error{
27949			Code:   res.StatusCode,
27950			Header: res.Header,
27951		}
27952	}
27953	if err != nil {
27954		return nil, err
27955	}
27956	defer googleapi.CloseBody(res)
27957	if err := googleapi.CheckResponse(res); err != nil {
27958		return nil, err
27959	}
27960	ret := &CreativeGroup{
27961		ServerResponse: googleapi.ServerResponse{
27962			Header:         res.Header,
27963			HTTPStatusCode: res.StatusCode,
27964		},
27965	}
27966	target := &ret
27967	if err := gensupport.DecodeResponse(target, res); err != nil {
27968		return nil, err
27969	}
27970	return ret, nil
27971	// {
27972	//   "description": "Updates an existing creative group.",
27973	//   "httpMethod": "PUT",
27974	//   "id": "dfareporting.creativeGroups.update",
27975	//   "parameterOrder": [
27976	//     "profileId"
27977	//   ],
27978	//   "parameters": {
27979	//     "profileId": {
27980	//       "description": "User profile ID associated with this request.",
27981	//       "format": "int64",
27982	//       "location": "path",
27983	//       "required": true,
27984	//       "type": "string"
27985	//     }
27986	//   },
27987	//   "path": "userprofiles/{profileId}/creativeGroups",
27988	//   "request": {
27989	//     "$ref": "CreativeGroup"
27990	//   },
27991	//   "response": {
27992	//     "$ref": "CreativeGroup"
27993	//   },
27994	//   "scopes": [
27995	//     "https://www.googleapis.com/auth/dfatrafficking"
27996	//   ]
27997	// }
27998
27999}
28000
28001// method id "dfareporting.creatives.get":
28002
28003type CreativesGetCall struct {
28004	s            *Service
28005	profileId    int64
28006	id           int64
28007	urlParams_   gensupport.URLParams
28008	ifNoneMatch_ string
28009	ctx_         context.Context
28010	header_      http.Header
28011}
28012
28013// Get: Gets one creative by ID.
28014func (r *CreativesService) Get(profileId int64, id int64) *CreativesGetCall {
28015	c := &CreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28016	c.profileId = profileId
28017	c.id = id
28018	return c
28019}
28020
28021// Fields allows partial responses to be retrieved. See
28022// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28023// for more information.
28024func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall {
28025	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28026	return c
28027}
28028
28029// IfNoneMatch sets the optional parameter which makes the operation
28030// fail if the object's ETag matches the given value. This is useful for
28031// getting updates only after the object has changed since the last
28032// request. Use googleapi.IsNotModified to check whether the response
28033// error from Do is the result of In-None-Match.
28034func (c *CreativesGetCall) IfNoneMatch(entityTag string) *CreativesGetCall {
28035	c.ifNoneMatch_ = entityTag
28036	return c
28037}
28038
28039// Context sets the context to be used in this call's Do method. Any
28040// pending HTTP request will be aborted if the provided context is
28041// canceled.
28042func (c *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
28043	c.ctx_ = ctx
28044	return c
28045}
28046
28047// Header returns an http.Header that can be modified by the caller to
28048// add HTTP headers to the request.
28049func (c *CreativesGetCall) Header() http.Header {
28050	if c.header_ == nil {
28051		c.header_ = make(http.Header)
28052	}
28053	return c.header_
28054}
28055
28056func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
28057	reqHeaders := make(http.Header)
28058	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
28059	for k, v := range c.header_ {
28060		reqHeaders[k] = v
28061	}
28062	reqHeaders.Set("User-Agent", c.s.userAgent())
28063	if c.ifNoneMatch_ != "" {
28064		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28065	}
28066	var body io.Reader = nil
28067	c.urlParams_.Set("alt", alt)
28068	c.urlParams_.Set("prettyPrint", "false")
28069	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives/{id}")
28070	urls += "?" + c.urlParams_.Encode()
28071	req, err := http.NewRequest("GET", urls, body)
28072	if err != nil {
28073		return nil, err
28074	}
28075	req.Header = reqHeaders
28076	googleapi.Expand(req.URL, map[string]string{
28077		"profileId": strconv.FormatInt(c.profileId, 10),
28078		"id":        strconv.FormatInt(c.id, 10),
28079	})
28080	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28081}
28082
28083// Do executes the "dfareporting.creatives.get" call.
28084// Exactly one of *Creative or error will be non-nil. Any non-2xx status
28085// code is an error. Response headers are in either
28086// *Creative.ServerResponse.Header or (if a response was returned at
28087// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28088// to check whether the returned error was because
28089// http.StatusNotModified was returned.
28090func (c *CreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28091	gensupport.SetOptions(c.urlParams_, opts...)
28092	res, err := c.doRequest("json")
28093	if res != nil && res.StatusCode == http.StatusNotModified {
28094		if res.Body != nil {
28095			res.Body.Close()
28096		}
28097		return nil, &googleapi.Error{
28098			Code:   res.StatusCode,
28099			Header: res.Header,
28100		}
28101	}
28102	if err != nil {
28103		return nil, err
28104	}
28105	defer googleapi.CloseBody(res)
28106	if err := googleapi.CheckResponse(res); err != nil {
28107		return nil, err
28108	}
28109	ret := &Creative{
28110		ServerResponse: googleapi.ServerResponse{
28111			Header:         res.Header,
28112			HTTPStatusCode: res.StatusCode,
28113		},
28114	}
28115	target := &ret
28116	if err := gensupport.DecodeResponse(target, res); err != nil {
28117		return nil, err
28118	}
28119	return ret, nil
28120	// {
28121	//   "description": "Gets one creative by ID.",
28122	//   "httpMethod": "GET",
28123	//   "id": "dfareporting.creatives.get",
28124	//   "parameterOrder": [
28125	//     "profileId",
28126	//     "id"
28127	//   ],
28128	//   "parameters": {
28129	//     "id": {
28130	//       "description": "Creative ID.",
28131	//       "format": "int64",
28132	//       "location": "path",
28133	//       "required": true,
28134	//       "type": "string"
28135	//     },
28136	//     "profileId": {
28137	//       "description": "User profile ID associated with this request.",
28138	//       "format": "int64",
28139	//       "location": "path",
28140	//       "required": true,
28141	//       "type": "string"
28142	//     }
28143	//   },
28144	//   "path": "userprofiles/{profileId}/creatives/{id}",
28145	//   "response": {
28146	//     "$ref": "Creative"
28147	//   },
28148	//   "scopes": [
28149	//     "https://www.googleapis.com/auth/dfatrafficking"
28150	//   ]
28151	// }
28152
28153}
28154
28155// method id "dfareporting.creatives.insert":
28156
28157type CreativesInsertCall struct {
28158	s          *Service
28159	profileId  int64
28160	creative   *Creative
28161	urlParams_ gensupport.URLParams
28162	ctx_       context.Context
28163	header_    http.Header
28164}
28165
28166// Insert: Inserts a new creative.
28167func (r *CreativesService) Insert(profileId int64, creative *Creative) *CreativesInsertCall {
28168	c := &CreativesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28169	c.profileId = profileId
28170	c.creative = creative
28171	return c
28172}
28173
28174// Fields allows partial responses to be retrieved. See
28175// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28176// for more information.
28177func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall {
28178	c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
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 *CreativesInsertCall) Header() http.Header {
28193	if c.header_ == nil {
28194		c.header_ = make(http.Header)
28195	}
28196	return c.header_
28197}
28198
28199func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
28200	reqHeaders := make(http.Header)
28201	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
28202	for k, v := range c.header_ {
28203		reqHeaders[k] = v
28204	}
28205	reqHeaders.Set("User-Agent", c.s.userAgent())
28206	var body io.Reader = nil
28207	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
28208	if err != nil {
28209		return nil, err
28210	}
28211	reqHeaders.Set("Content-Type", "application/json")
28212	c.urlParams_.Set("alt", alt)
28213	c.urlParams_.Set("prettyPrint", "false")
28214	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28215	urls += "?" + c.urlParams_.Encode()
28216	req, err := http.NewRequest("POST", urls, body)
28217	if err != nil {
28218		return nil, err
28219	}
28220	req.Header = reqHeaders
28221	googleapi.Expand(req.URL, map[string]string{
28222		"profileId": strconv.FormatInt(c.profileId, 10),
28223	})
28224	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28225}
28226
28227// Do executes the "dfareporting.creatives.insert" call.
28228// Exactly one of *Creative or error will be non-nil. Any non-2xx status
28229// code is an error. Response headers are in either
28230// *Creative.ServerResponse.Header or (if a response was returned at
28231// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28232// to check whether the returned error was because
28233// http.StatusNotModified was returned.
28234func (c *CreativesInsertCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28235	gensupport.SetOptions(c.urlParams_, opts...)
28236	res, err := c.doRequest("json")
28237	if res != nil && res.StatusCode == http.StatusNotModified {
28238		if res.Body != nil {
28239			res.Body.Close()
28240		}
28241		return nil, &googleapi.Error{
28242			Code:   res.StatusCode,
28243			Header: res.Header,
28244		}
28245	}
28246	if err != nil {
28247		return nil, err
28248	}
28249	defer googleapi.CloseBody(res)
28250	if err := googleapi.CheckResponse(res); err != nil {
28251		return nil, err
28252	}
28253	ret := &Creative{
28254		ServerResponse: googleapi.ServerResponse{
28255			Header:         res.Header,
28256			HTTPStatusCode: res.StatusCode,
28257		},
28258	}
28259	target := &ret
28260	if err := gensupport.DecodeResponse(target, res); err != nil {
28261		return nil, err
28262	}
28263	return ret, nil
28264	// {
28265	//   "description": "Inserts a new creative.",
28266	//   "httpMethod": "POST",
28267	//   "id": "dfareporting.creatives.insert",
28268	//   "parameterOrder": [
28269	//     "profileId"
28270	//   ],
28271	//   "parameters": {
28272	//     "profileId": {
28273	//       "description": "User profile ID associated with this request.",
28274	//       "format": "int64",
28275	//       "location": "path",
28276	//       "required": true,
28277	//       "type": "string"
28278	//     }
28279	//   },
28280	//   "path": "userprofiles/{profileId}/creatives",
28281	//   "request": {
28282	//     "$ref": "Creative"
28283	//   },
28284	//   "response": {
28285	//     "$ref": "Creative"
28286	//   },
28287	//   "scopes": [
28288	//     "https://www.googleapis.com/auth/dfatrafficking"
28289	//   ]
28290	// }
28291
28292}
28293
28294// method id "dfareporting.creatives.list":
28295
28296type CreativesListCall struct {
28297	s            *Service
28298	profileId    int64
28299	urlParams_   gensupport.URLParams
28300	ifNoneMatch_ string
28301	ctx_         context.Context
28302	header_      http.Header
28303}
28304
28305// List: Retrieves a list of creatives, possibly filtered. This method
28306// supports paging.
28307func (r *CreativesService) List(profileId int64) *CreativesListCall {
28308	c := &CreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28309	c.profileId = profileId
28310	return c
28311}
28312
28313// Active sets the optional parameter "active": Select only active
28314// creatives. Leave blank to select active and inactive creatives.
28315func (c *CreativesListCall) Active(active bool) *CreativesListCall {
28316	c.urlParams_.Set("active", fmt.Sprint(active))
28317	return c
28318}
28319
28320// AdvertiserId sets the optional parameter "advertiserId": Select only
28321// creatives with this advertiser ID.
28322func (c *CreativesListCall) AdvertiserId(advertiserId int64) *CreativesListCall {
28323	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28324	return c
28325}
28326
28327// Archived sets the optional parameter "archived": Select only archived
28328// creatives. Leave blank to select archived and unarchived creatives.
28329func (c *CreativesListCall) Archived(archived bool) *CreativesListCall {
28330	c.urlParams_.Set("archived", fmt.Sprint(archived))
28331	return c
28332}
28333
28334// CampaignId sets the optional parameter "campaignId": Select only
28335// creatives with this campaign ID.
28336func (c *CreativesListCall) CampaignId(campaignId int64) *CreativesListCall {
28337	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
28338	return c
28339}
28340
28341// CompanionCreativeIds sets the optional parameter
28342// "companionCreativeIds": Select only in-stream video creatives with
28343// these companion IDs.
28344func (c *CreativesListCall) CompanionCreativeIds(companionCreativeIds ...int64) *CreativesListCall {
28345	var companionCreativeIds_ []string
28346	for _, v := range companionCreativeIds {
28347		companionCreativeIds_ = append(companionCreativeIds_, fmt.Sprint(v))
28348	}
28349	c.urlParams_.SetMulti("companionCreativeIds", companionCreativeIds_)
28350	return c
28351}
28352
28353// CreativeFieldIds sets the optional parameter "creativeFieldIds":
28354// Select only creatives with these creative field IDs.
28355func (c *CreativesListCall) CreativeFieldIds(creativeFieldIds ...int64) *CreativesListCall {
28356	var creativeFieldIds_ []string
28357	for _, v := range creativeFieldIds {
28358		creativeFieldIds_ = append(creativeFieldIds_, fmt.Sprint(v))
28359	}
28360	c.urlParams_.SetMulti("creativeFieldIds", creativeFieldIds_)
28361	return c
28362}
28363
28364// Ids sets the optional parameter "ids": Select only creatives with
28365// these IDs.
28366func (c *CreativesListCall) Ids(ids ...int64) *CreativesListCall {
28367	var ids_ []string
28368	for _, v := range ids {
28369		ids_ = append(ids_, fmt.Sprint(v))
28370	}
28371	c.urlParams_.SetMulti("ids", ids_)
28372	return c
28373}
28374
28375// MaxResults sets the optional parameter "maxResults": Maximum number
28376// of results to return.
28377func (c *CreativesListCall) MaxResults(maxResults int64) *CreativesListCall {
28378	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28379	return c
28380}
28381
28382// PageToken sets the optional parameter "pageToken": Value of the
28383// nextPageToken from the previous result page.
28384func (c *CreativesListCall) PageToken(pageToken string) *CreativesListCall {
28385	c.urlParams_.Set("pageToken", pageToken)
28386	return c
28387}
28388
28389// RenderingIds sets the optional parameter "renderingIds": Select only
28390// creatives with these rendering IDs.
28391func (c *CreativesListCall) RenderingIds(renderingIds ...int64) *CreativesListCall {
28392	var renderingIds_ []string
28393	for _, v := range renderingIds {
28394		renderingIds_ = append(renderingIds_, fmt.Sprint(v))
28395	}
28396	c.urlParams_.SetMulti("renderingIds", renderingIds_)
28397	return c
28398}
28399
28400// SearchString sets the optional parameter "searchString": Allows
28401// searching for objects by name or ID. Wildcards (*) are allowed. For
28402// example, "creative*2015" will return objects with names like
28403// "creative June 2015", "creative April 2015", or simply "creative
28404// 2015". Most of the searches also add wildcards implicitly at the
28405// start and the end of the search string. For example, a search string
28406// of "creative" will match objects with name "my creative", "creative
28407// 2015", or simply "creative".
28408func (c *CreativesListCall) SearchString(searchString string) *CreativesListCall {
28409	c.urlParams_.Set("searchString", searchString)
28410	return c
28411}
28412
28413// SizeIds sets the optional parameter "sizeIds": Select only creatives
28414// with these size IDs.
28415func (c *CreativesListCall) SizeIds(sizeIds ...int64) *CreativesListCall {
28416	var sizeIds_ []string
28417	for _, v := range sizeIds {
28418		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
28419	}
28420	c.urlParams_.SetMulti("sizeIds", sizeIds_)
28421	return c
28422}
28423
28424// SortField sets the optional parameter "sortField": Field by which to
28425// sort the list.
28426//
28427// Possible values:
28428//   "ID" (default)
28429//   "NAME"
28430func (c *CreativesListCall) SortField(sortField string) *CreativesListCall {
28431	c.urlParams_.Set("sortField", sortField)
28432	return c
28433}
28434
28435// SortOrder sets the optional parameter "sortOrder": Order of sorted
28436// results.
28437//
28438// Possible values:
28439//   "ASCENDING" (default)
28440//   "DESCENDING"
28441func (c *CreativesListCall) SortOrder(sortOrder string) *CreativesListCall {
28442	c.urlParams_.Set("sortOrder", sortOrder)
28443	return c
28444}
28445
28446// StudioCreativeId sets the optional parameter "studioCreativeId":
28447// Select only creatives corresponding to this Studio creative ID.
28448func (c *CreativesListCall) StudioCreativeId(studioCreativeId int64) *CreativesListCall {
28449	c.urlParams_.Set("studioCreativeId", fmt.Sprint(studioCreativeId))
28450	return c
28451}
28452
28453// Types sets the optional parameter "types": Select only creatives with
28454// these creative types.
28455//
28456// Possible values:
28457//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
28458//   "CUSTOM_DISPLAY"
28459//   "CUSTOM_DISPLAY_INTERSTITIAL"
28460//   "DISPLAY"
28461//   "DISPLAY_IMAGE_GALLERY"
28462//   "DISPLAY_REDIRECT"
28463//   "FLASH_INPAGE"
28464//   "HTML5_BANNER"
28465//   "IMAGE"
28466//   "INSTREAM_AUDIO"
28467//   "INSTREAM_VIDEO"
28468//   "INSTREAM_VIDEO_REDIRECT"
28469//   "INTERNAL_REDIRECT"
28470//   "INTERSTITIAL_INTERNAL_REDIRECT"
28471//   "RICH_MEDIA_DISPLAY_BANNER"
28472//   "RICH_MEDIA_DISPLAY_EXPANDING"
28473//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
28474//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
28475//   "RICH_MEDIA_IM_EXPAND"
28476//   "RICH_MEDIA_INPAGE_FLOATING"
28477//   "RICH_MEDIA_MOBILE_IN_APP"
28478//   "RICH_MEDIA_PEEL_DOWN"
28479//   "TRACKING_TEXT"
28480//   "VPAID_LINEAR_VIDEO"
28481//   "VPAID_NON_LINEAR_VIDEO"
28482func (c *CreativesListCall) Types(types ...string) *CreativesListCall {
28483	c.urlParams_.SetMulti("types", append([]string{}, types...))
28484	return c
28485}
28486
28487// Fields allows partial responses to be retrieved. See
28488// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28489// for more information.
28490func (c *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall {
28491	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28492	return c
28493}
28494
28495// IfNoneMatch sets the optional parameter which makes the operation
28496// fail if the object's ETag matches the given value. This is useful for
28497// getting updates only after the object has changed since the last
28498// request. Use googleapi.IsNotModified to check whether the response
28499// error from Do is the result of In-None-Match.
28500func (c *CreativesListCall) IfNoneMatch(entityTag string) *CreativesListCall {
28501	c.ifNoneMatch_ = entityTag
28502	return c
28503}
28504
28505// Context sets the context to be used in this call's Do method. Any
28506// pending HTTP request will be aborted if the provided context is
28507// canceled.
28508func (c *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
28509	c.ctx_ = ctx
28510	return c
28511}
28512
28513// Header returns an http.Header that can be modified by the caller to
28514// add HTTP headers to the request.
28515func (c *CreativesListCall) Header() http.Header {
28516	if c.header_ == nil {
28517		c.header_ = make(http.Header)
28518	}
28519	return c.header_
28520}
28521
28522func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
28523	reqHeaders := make(http.Header)
28524	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
28525	for k, v := range c.header_ {
28526		reqHeaders[k] = v
28527	}
28528	reqHeaders.Set("User-Agent", c.s.userAgent())
28529	if c.ifNoneMatch_ != "" {
28530		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28531	}
28532	var body io.Reader = nil
28533	c.urlParams_.Set("alt", alt)
28534	c.urlParams_.Set("prettyPrint", "false")
28535	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28536	urls += "?" + c.urlParams_.Encode()
28537	req, err := http.NewRequest("GET", urls, body)
28538	if err != nil {
28539		return nil, err
28540	}
28541	req.Header = reqHeaders
28542	googleapi.Expand(req.URL, map[string]string{
28543		"profileId": strconv.FormatInt(c.profileId, 10),
28544	})
28545	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28546}
28547
28548// Do executes the "dfareporting.creatives.list" call.
28549// Exactly one of *CreativesListResponse or error will be non-nil. Any
28550// non-2xx status code is an error. Response headers are in either
28551// *CreativesListResponse.ServerResponse.Header or (if a response was
28552// returned at all) in error.(*googleapi.Error).Header. Use
28553// googleapi.IsNotModified to check whether the returned error was
28554// because http.StatusNotModified was returned.
28555func (c *CreativesListCall) Do(opts ...googleapi.CallOption) (*CreativesListResponse, error) {
28556	gensupport.SetOptions(c.urlParams_, opts...)
28557	res, err := c.doRequest("json")
28558	if res != nil && res.StatusCode == http.StatusNotModified {
28559		if res.Body != nil {
28560			res.Body.Close()
28561		}
28562		return nil, &googleapi.Error{
28563			Code:   res.StatusCode,
28564			Header: res.Header,
28565		}
28566	}
28567	if err != nil {
28568		return nil, err
28569	}
28570	defer googleapi.CloseBody(res)
28571	if err := googleapi.CheckResponse(res); err != nil {
28572		return nil, err
28573	}
28574	ret := &CreativesListResponse{
28575		ServerResponse: googleapi.ServerResponse{
28576			Header:         res.Header,
28577			HTTPStatusCode: res.StatusCode,
28578		},
28579	}
28580	target := &ret
28581	if err := gensupport.DecodeResponse(target, res); err != nil {
28582		return nil, err
28583	}
28584	return ret, nil
28585	// {
28586	//   "description": "Retrieves a list of creatives, possibly filtered. This method supports paging.",
28587	//   "httpMethod": "GET",
28588	//   "id": "dfareporting.creatives.list",
28589	//   "parameterOrder": [
28590	//     "profileId"
28591	//   ],
28592	//   "parameters": {
28593	//     "active": {
28594	//       "description": "Select only active creatives. Leave blank to select active and inactive creatives.",
28595	//       "location": "query",
28596	//       "type": "boolean"
28597	//     },
28598	//     "advertiserId": {
28599	//       "description": "Select only creatives with this advertiser ID.",
28600	//       "format": "int64",
28601	//       "location": "query",
28602	//       "type": "string"
28603	//     },
28604	//     "archived": {
28605	//       "description": "Select only archived creatives. Leave blank to select archived and unarchived creatives.",
28606	//       "location": "query",
28607	//       "type": "boolean"
28608	//     },
28609	//     "campaignId": {
28610	//       "description": "Select only creatives with this campaign ID.",
28611	//       "format": "int64",
28612	//       "location": "query",
28613	//       "type": "string"
28614	//     },
28615	//     "companionCreativeIds": {
28616	//       "description": "Select only in-stream video creatives with these companion IDs.",
28617	//       "format": "int64",
28618	//       "location": "query",
28619	//       "repeated": true,
28620	//       "type": "string"
28621	//     },
28622	//     "creativeFieldIds": {
28623	//       "description": "Select only creatives with these creative field IDs.",
28624	//       "format": "int64",
28625	//       "location": "query",
28626	//       "repeated": true,
28627	//       "type": "string"
28628	//     },
28629	//     "ids": {
28630	//       "description": "Select only creatives with these IDs.",
28631	//       "format": "int64",
28632	//       "location": "query",
28633	//       "repeated": true,
28634	//       "type": "string"
28635	//     },
28636	//     "maxResults": {
28637	//       "default": "1000",
28638	//       "description": "Maximum number of results to return.",
28639	//       "format": "int32",
28640	//       "location": "query",
28641	//       "maximum": "1000",
28642	//       "minimum": "0",
28643	//       "type": "integer"
28644	//     },
28645	//     "pageToken": {
28646	//       "description": "Value of the nextPageToken from the previous result page.",
28647	//       "location": "query",
28648	//       "type": "string"
28649	//     },
28650	//     "profileId": {
28651	//       "description": "User profile ID associated with this request.",
28652	//       "format": "int64",
28653	//       "location": "path",
28654	//       "required": true,
28655	//       "type": "string"
28656	//     },
28657	//     "renderingIds": {
28658	//       "description": "Select only creatives with these rendering IDs.",
28659	//       "format": "int64",
28660	//       "location": "query",
28661	//       "repeated": true,
28662	//       "type": "string"
28663	//     },
28664	//     "searchString": {
28665	//       "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\".",
28666	//       "location": "query",
28667	//       "type": "string"
28668	//     },
28669	//     "sizeIds": {
28670	//       "description": "Select only creatives with these size IDs.",
28671	//       "format": "int64",
28672	//       "location": "query",
28673	//       "repeated": true,
28674	//       "type": "string"
28675	//     },
28676	//     "sortField": {
28677	//       "default": "ID",
28678	//       "description": "Field by which to sort the list.",
28679	//       "enum": [
28680	//         "ID",
28681	//         "NAME"
28682	//       ],
28683	//       "enumDescriptions": [
28684	//         "",
28685	//         ""
28686	//       ],
28687	//       "location": "query",
28688	//       "type": "string"
28689	//     },
28690	//     "sortOrder": {
28691	//       "default": "ASCENDING",
28692	//       "description": "Order of sorted results.",
28693	//       "enum": [
28694	//         "ASCENDING",
28695	//         "DESCENDING"
28696	//       ],
28697	//       "enumDescriptions": [
28698	//         "",
28699	//         ""
28700	//       ],
28701	//       "location": "query",
28702	//       "type": "string"
28703	//     },
28704	//     "studioCreativeId": {
28705	//       "description": "Select only creatives corresponding to this Studio creative ID.",
28706	//       "format": "int64",
28707	//       "location": "query",
28708	//       "type": "string"
28709	//     },
28710	//     "types": {
28711	//       "description": "Select only creatives with these creative types.",
28712	//       "enum": [
28713	//         "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO",
28714	//         "CUSTOM_DISPLAY",
28715	//         "CUSTOM_DISPLAY_INTERSTITIAL",
28716	//         "DISPLAY",
28717	//         "DISPLAY_IMAGE_GALLERY",
28718	//         "DISPLAY_REDIRECT",
28719	//         "FLASH_INPAGE",
28720	//         "HTML5_BANNER",
28721	//         "IMAGE",
28722	//         "INSTREAM_AUDIO",
28723	//         "INSTREAM_VIDEO",
28724	//         "INSTREAM_VIDEO_REDIRECT",
28725	//         "INTERNAL_REDIRECT",
28726	//         "INTERSTITIAL_INTERNAL_REDIRECT",
28727	//         "RICH_MEDIA_DISPLAY_BANNER",
28728	//         "RICH_MEDIA_DISPLAY_EXPANDING",
28729	//         "RICH_MEDIA_DISPLAY_INTERSTITIAL",
28730	//         "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL",
28731	//         "RICH_MEDIA_IM_EXPAND",
28732	//         "RICH_MEDIA_INPAGE_FLOATING",
28733	//         "RICH_MEDIA_MOBILE_IN_APP",
28734	//         "RICH_MEDIA_PEEL_DOWN",
28735	//         "TRACKING_TEXT",
28736	//         "VPAID_LINEAR_VIDEO",
28737	//         "VPAID_NON_LINEAR_VIDEO"
28738	//       ],
28739	//       "enumDescriptions": [
28740	//         "",
28741	//         "",
28742	//         "",
28743	//         "",
28744	//         "",
28745	//         "",
28746	//         "",
28747	//         "",
28748	//         "",
28749	//         "",
28750	//         "",
28751	//         "",
28752	//         "",
28753	//         "",
28754	//         "",
28755	//         "",
28756	//         "",
28757	//         "",
28758	//         "",
28759	//         "",
28760	//         "",
28761	//         "",
28762	//         "",
28763	//         "",
28764	//         ""
28765	//       ],
28766	//       "location": "query",
28767	//       "repeated": true,
28768	//       "type": "string"
28769	//     }
28770	//   },
28771	//   "path": "userprofiles/{profileId}/creatives",
28772	//   "response": {
28773	//     "$ref": "CreativesListResponse"
28774	//   },
28775	//   "scopes": [
28776	//     "https://www.googleapis.com/auth/dfatrafficking"
28777	//   ]
28778	// }
28779
28780}
28781
28782// Pages invokes f for each page of results.
28783// A non-nil error returned from f will halt the iteration.
28784// The provided context supersedes any context provided to the Context method.
28785func (c *CreativesListCall) Pages(ctx context.Context, f func(*CreativesListResponse) error) error {
28786	c.ctx_ = ctx
28787	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28788	for {
28789		x, err := c.Do()
28790		if err != nil {
28791			return err
28792		}
28793		if err := f(x); err != nil {
28794			return err
28795		}
28796		if x.NextPageToken == "" {
28797			return nil
28798		}
28799		c.PageToken(x.NextPageToken)
28800	}
28801}
28802
28803// method id "dfareporting.creatives.patch":
28804
28805type CreativesPatchCall struct {
28806	s          *Service
28807	profileId  int64
28808	creative   *Creative
28809	urlParams_ gensupport.URLParams
28810	ctx_       context.Context
28811	header_    http.Header
28812}
28813
28814// Patch: Updates an existing creative. This method supports patch
28815// semantics.
28816func (r *CreativesService) Patch(profileId int64, id int64, creative *Creative) *CreativesPatchCall {
28817	c := &CreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28818	c.profileId = profileId
28819	c.urlParams_.Set("id", fmt.Sprint(id))
28820	c.creative = creative
28821	return c
28822}
28823
28824// Fields allows partial responses to be retrieved. See
28825// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28826// for more information.
28827func (c *CreativesPatchCall) Fields(s ...googleapi.Field) *CreativesPatchCall {
28828	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28829	return c
28830}
28831
28832// Context sets the context to be used in this call's Do method. Any
28833// pending HTTP request will be aborted if the provided context is
28834// canceled.
28835func (c *CreativesPatchCall) Context(ctx context.Context) *CreativesPatchCall {
28836	c.ctx_ = ctx
28837	return c
28838}
28839
28840// Header returns an http.Header that can be modified by the caller to
28841// add HTTP headers to the request.
28842func (c *CreativesPatchCall) Header() http.Header {
28843	if c.header_ == nil {
28844		c.header_ = make(http.Header)
28845	}
28846	return c.header_
28847}
28848
28849func (c *CreativesPatchCall) doRequest(alt string) (*http.Response, error) {
28850	reqHeaders := make(http.Header)
28851	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
28852	for k, v := range c.header_ {
28853		reqHeaders[k] = v
28854	}
28855	reqHeaders.Set("User-Agent", c.s.userAgent())
28856	var body io.Reader = nil
28857	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
28858	if err != nil {
28859		return nil, err
28860	}
28861	reqHeaders.Set("Content-Type", "application/json")
28862	c.urlParams_.Set("alt", alt)
28863	c.urlParams_.Set("prettyPrint", "false")
28864	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28865	urls += "?" + c.urlParams_.Encode()
28866	req, err := http.NewRequest("PATCH", urls, body)
28867	if err != nil {
28868		return nil, err
28869	}
28870	req.Header = reqHeaders
28871	googleapi.Expand(req.URL, map[string]string{
28872		"profileId": strconv.FormatInt(c.profileId, 10),
28873	})
28874	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28875}
28876
28877// Do executes the "dfareporting.creatives.patch" call.
28878// Exactly one of *Creative or error will be non-nil. Any non-2xx status
28879// code is an error. Response headers are in either
28880// *Creative.ServerResponse.Header or (if a response was returned at
28881// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28882// to check whether the returned error was because
28883// http.StatusNotModified was returned.
28884func (c *CreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28885	gensupport.SetOptions(c.urlParams_, opts...)
28886	res, err := c.doRequest("json")
28887	if res != nil && res.StatusCode == http.StatusNotModified {
28888		if res.Body != nil {
28889			res.Body.Close()
28890		}
28891		return nil, &googleapi.Error{
28892			Code:   res.StatusCode,
28893			Header: res.Header,
28894		}
28895	}
28896	if err != nil {
28897		return nil, err
28898	}
28899	defer googleapi.CloseBody(res)
28900	if err := googleapi.CheckResponse(res); err != nil {
28901		return nil, err
28902	}
28903	ret := &Creative{
28904		ServerResponse: googleapi.ServerResponse{
28905			Header:         res.Header,
28906			HTTPStatusCode: res.StatusCode,
28907		},
28908	}
28909	target := &ret
28910	if err := gensupport.DecodeResponse(target, res); err != nil {
28911		return nil, err
28912	}
28913	return ret, nil
28914	// {
28915	//   "description": "Updates an existing creative. This method supports patch semantics.",
28916	//   "httpMethod": "PATCH",
28917	//   "id": "dfareporting.creatives.patch",
28918	//   "parameterOrder": [
28919	//     "profileId",
28920	//     "id"
28921	//   ],
28922	//   "parameters": {
28923	//     "id": {
28924	//       "description": "Creative ID.",
28925	//       "format": "int64",
28926	//       "location": "query",
28927	//       "required": true,
28928	//       "type": "string"
28929	//     },
28930	//     "profileId": {
28931	//       "description": "User profile ID associated with this request.",
28932	//       "format": "int64",
28933	//       "location": "path",
28934	//       "required": true,
28935	//       "type": "string"
28936	//     }
28937	//   },
28938	//   "path": "userprofiles/{profileId}/creatives",
28939	//   "request": {
28940	//     "$ref": "Creative"
28941	//   },
28942	//   "response": {
28943	//     "$ref": "Creative"
28944	//   },
28945	//   "scopes": [
28946	//     "https://www.googleapis.com/auth/dfatrafficking"
28947	//   ]
28948	// }
28949
28950}
28951
28952// method id "dfareporting.creatives.update":
28953
28954type CreativesUpdateCall struct {
28955	s          *Service
28956	profileId  int64
28957	creative   *Creative
28958	urlParams_ gensupport.URLParams
28959	ctx_       context.Context
28960	header_    http.Header
28961}
28962
28963// Update: Updates an existing creative.
28964func (r *CreativesService) Update(profileId int64, creative *Creative) *CreativesUpdateCall {
28965	c := &CreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28966	c.profileId = profileId
28967	c.creative = creative
28968	return c
28969}
28970
28971// Fields allows partial responses to be retrieved. See
28972// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28973// for more information.
28974func (c *CreativesUpdateCall) Fields(s ...googleapi.Field) *CreativesUpdateCall {
28975	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28976	return c
28977}
28978
28979// Context sets the context to be used in this call's Do method. Any
28980// pending HTTP request will be aborted if the provided context is
28981// canceled.
28982func (c *CreativesUpdateCall) Context(ctx context.Context) *CreativesUpdateCall {
28983	c.ctx_ = ctx
28984	return c
28985}
28986
28987// Header returns an http.Header that can be modified by the caller to
28988// add HTTP headers to the request.
28989func (c *CreativesUpdateCall) Header() http.Header {
28990	if c.header_ == nil {
28991		c.header_ = make(http.Header)
28992	}
28993	return c.header_
28994}
28995
28996func (c *CreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
28997	reqHeaders := make(http.Header)
28998	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
28999	for k, v := range c.header_ {
29000		reqHeaders[k] = v
29001	}
29002	reqHeaders.Set("User-Agent", c.s.userAgent())
29003	var body io.Reader = nil
29004	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
29005	if err != nil {
29006		return nil, err
29007	}
29008	reqHeaders.Set("Content-Type", "application/json")
29009	c.urlParams_.Set("alt", alt)
29010	c.urlParams_.Set("prettyPrint", "false")
29011	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
29012	urls += "?" + c.urlParams_.Encode()
29013	req, err := http.NewRequest("PUT", urls, body)
29014	if err != nil {
29015		return nil, err
29016	}
29017	req.Header = reqHeaders
29018	googleapi.Expand(req.URL, map[string]string{
29019		"profileId": strconv.FormatInt(c.profileId, 10),
29020	})
29021	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29022}
29023
29024// Do executes the "dfareporting.creatives.update" call.
29025// Exactly one of *Creative or error will be non-nil. Any non-2xx status
29026// code is an error. Response headers are in either
29027// *Creative.ServerResponse.Header or (if a response was returned at
29028// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29029// to check whether the returned error was because
29030// http.StatusNotModified was returned.
29031func (c *CreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
29032	gensupport.SetOptions(c.urlParams_, opts...)
29033	res, err := c.doRequest("json")
29034	if res != nil && res.StatusCode == http.StatusNotModified {
29035		if res.Body != nil {
29036			res.Body.Close()
29037		}
29038		return nil, &googleapi.Error{
29039			Code:   res.StatusCode,
29040			Header: res.Header,
29041		}
29042	}
29043	if err != nil {
29044		return nil, err
29045	}
29046	defer googleapi.CloseBody(res)
29047	if err := googleapi.CheckResponse(res); err != nil {
29048		return nil, err
29049	}
29050	ret := &Creative{
29051		ServerResponse: googleapi.ServerResponse{
29052			Header:         res.Header,
29053			HTTPStatusCode: res.StatusCode,
29054		},
29055	}
29056	target := &ret
29057	if err := gensupport.DecodeResponse(target, res); err != nil {
29058		return nil, err
29059	}
29060	return ret, nil
29061	// {
29062	//   "description": "Updates an existing creative.",
29063	//   "httpMethod": "PUT",
29064	//   "id": "dfareporting.creatives.update",
29065	//   "parameterOrder": [
29066	//     "profileId"
29067	//   ],
29068	//   "parameters": {
29069	//     "profileId": {
29070	//       "description": "User profile ID associated with this request.",
29071	//       "format": "int64",
29072	//       "location": "path",
29073	//       "required": true,
29074	//       "type": "string"
29075	//     }
29076	//   },
29077	//   "path": "userprofiles/{profileId}/creatives",
29078	//   "request": {
29079	//     "$ref": "Creative"
29080	//   },
29081	//   "response": {
29082	//     "$ref": "Creative"
29083	//   },
29084	//   "scopes": [
29085	//     "https://www.googleapis.com/auth/dfatrafficking"
29086	//   ]
29087	// }
29088
29089}
29090
29091// method id "dfareporting.dimensionValues.query":
29092
29093type DimensionValuesQueryCall struct {
29094	s                     *Service
29095	profileId             int64
29096	dimensionvaluerequest *DimensionValueRequest
29097	urlParams_            gensupport.URLParams
29098	ctx_                  context.Context
29099	header_               http.Header
29100}
29101
29102// Query: Retrieves list of report dimension values for a list of
29103// filters.
29104func (r *DimensionValuesService) Query(profileId int64, dimensionvaluerequest *DimensionValueRequest) *DimensionValuesQueryCall {
29105	c := &DimensionValuesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29106	c.profileId = profileId
29107	c.dimensionvaluerequest = dimensionvaluerequest
29108	return c
29109}
29110
29111// MaxResults sets the optional parameter "maxResults": Maximum number
29112// of results to return.
29113func (c *DimensionValuesQueryCall) MaxResults(maxResults int64) *DimensionValuesQueryCall {
29114	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29115	return c
29116}
29117
29118// PageToken sets the optional parameter "pageToken": The value of the
29119// nextToken from the previous result page.
29120func (c *DimensionValuesQueryCall) PageToken(pageToken string) *DimensionValuesQueryCall {
29121	c.urlParams_.Set("pageToken", pageToken)
29122	return c
29123}
29124
29125// Fields allows partial responses to be retrieved. See
29126// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29127// for more information.
29128func (c *DimensionValuesQueryCall) Fields(s ...googleapi.Field) *DimensionValuesQueryCall {
29129	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29130	return c
29131}
29132
29133// Context sets the context to be used in this call's Do method. Any
29134// pending HTTP request will be aborted if the provided context is
29135// canceled.
29136func (c *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
29137	c.ctx_ = ctx
29138	return c
29139}
29140
29141// Header returns an http.Header that can be modified by the caller to
29142// add HTTP headers to the request.
29143func (c *DimensionValuesQueryCall) Header() http.Header {
29144	if c.header_ == nil {
29145		c.header_ = make(http.Header)
29146	}
29147	return c.header_
29148}
29149
29150func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
29151	reqHeaders := make(http.Header)
29152	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
29153	for k, v := range c.header_ {
29154		reqHeaders[k] = v
29155	}
29156	reqHeaders.Set("User-Agent", c.s.userAgent())
29157	var body io.Reader = nil
29158	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
29159	if err != nil {
29160		return nil, err
29161	}
29162	reqHeaders.Set("Content-Type", "application/json")
29163	c.urlParams_.Set("alt", alt)
29164	c.urlParams_.Set("prettyPrint", "false")
29165	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dimensionvalues/query")
29166	urls += "?" + c.urlParams_.Encode()
29167	req, err := http.NewRequest("POST", urls, body)
29168	if err != nil {
29169		return nil, err
29170	}
29171	req.Header = reqHeaders
29172	googleapi.Expand(req.URL, map[string]string{
29173		"profileId": strconv.FormatInt(c.profileId, 10),
29174	})
29175	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29176}
29177
29178// Do executes the "dfareporting.dimensionValues.query" call.
29179// Exactly one of *DimensionValueList or error will be non-nil. Any
29180// non-2xx status code is an error. Response headers are in either
29181// *DimensionValueList.ServerResponse.Header or (if a response was
29182// returned at all) in error.(*googleapi.Error).Header. Use
29183// googleapi.IsNotModified to check whether the returned error was
29184// because http.StatusNotModified was returned.
29185func (c *DimensionValuesQueryCall) Do(opts ...googleapi.CallOption) (*DimensionValueList, error) {
29186	gensupport.SetOptions(c.urlParams_, opts...)
29187	res, err := c.doRequest("json")
29188	if res != nil && res.StatusCode == http.StatusNotModified {
29189		if res.Body != nil {
29190			res.Body.Close()
29191		}
29192		return nil, &googleapi.Error{
29193			Code:   res.StatusCode,
29194			Header: res.Header,
29195		}
29196	}
29197	if err != nil {
29198		return nil, err
29199	}
29200	defer googleapi.CloseBody(res)
29201	if err := googleapi.CheckResponse(res); err != nil {
29202		return nil, err
29203	}
29204	ret := &DimensionValueList{
29205		ServerResponse: googleapi.ServerResponse{
29206			Header:         res.Header,
29207			HTTPStatusCode: res.StatusCode,
29208		},
29209	}
29210	target := &ret
29211	if err := gensupport.DecodeResponse(target, res); err != nil {
29212		return nil, err
29213	}
29214	return ret, nil
29215	// {
29216	//   "description": "Retrieves list of report dimension values for a list of filters.",
29217	//   "httpMethod": "POST",
29218	//   "id": "dfareporting.dimensionValues.query",
29219	//   "parameterOrder": [
29220	//     "profileId"
29221	//   ],
29222	//   "parameters": {
29223	//     "maxResults": {
29224	//       "default": "100",
29225	//       "description": "Maximum number of results to return.",
29226	//       "format": "int32",
29227	//       "location": "query",
29228	//       "maximum": "100",
29229	//       "minimum": "0",
29230	//       "type": "integer"
29231	//     },
29232	//     "pageToken": {
29233	//       "description": "The value of the nextToken from the previous result page.",
29234	//       "location": "query",
29235	//       "type": "string"
29236	//     },
29237	//     "profileId": {
29238	//       "description": "The DFA user profile ID.",
29239	//       "format": "int64",
29240	//       "location": "path",
29241	//       "required": true,
29242	//       "type": "string"
29243	//     }
29244	//   },
29245	//   "path": "userprofiles/{profileId}/dimensionvalues/query",
29246	//   "request": {
29247	//     "$ref": "DimensionValueRequest"
29248	//   },
29249	//   "response": {
29250	//     "$ref": "DimensionValueList"
29251	//   },
29252	//   "scopes": [
29253	//     "https://www.googleapis.com/auth/dfareporting"
29254	//   ]
29255	// }
29256
29257}
29258
29259// Pages invokes f for each page of results.
29260// A non-nil error returned from f will halt the iteration.
29261// The provided context supersedes any context provided to the Context method.
29262func (c *DimensionValuesQueryCall) Pages(ctx context.Context, f func(*DimensionValueList) error) error {
29263	c.ctx_ = ctx
29264	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29265	for {
29266		x, err := c.Do()
29267		if err != nil {
29268			return err
29269		}
29270		if err := f(x); err != nil {
29271			return err
29272		}
29273		if x.NextPageToken == "" {
29274			return nil
29275		}
29276		c.PageToken(x.NextPageToken)
29277	}
29278}
29279
29280// method id "dfareporting.directorySites.get":
29281
29282type DirectorySitesGetCall struct {
29283	s            *Service
29284	profileId    int64
29285	id           int64
29286	urlParams_   gensupport.URLParams
29287	ifNoneMatch_ string
29288	ctx_         context.Context
29289	header_      http.Header
29290}
29291
29292// Get: Gets one directory site by ID.
29293func (r *DirectorySitesService) Get(profileId int64, id int64) *DirectorySitesGetCall {
29294	c := &DirectorySitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29295	c.profileId = profileId
29296	c.id = id
29297	return c
29298}
29299
29300// Fields allows partial responses to be retrieved. See
29301// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29302// for more information.
29303func (c *DirectorySitesGetCall) Fields(s ...googleapi.Field) *DirectorySitesGetCall {
29304	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29305	return c
29306}
29307
29308// IfNoneMatch sets the optional parameter which makes the operation
29309// fail if the object's ETag matches the given value. This is useful for
29310// getting updates only after the object has changed since the last
29311// request. Use googleapi.IsNotModified to check whether the response
29312// error from Do is the result of In-None-Match.
29313func (c *DirectorySitesGetCall) IfNoneMatch(entityTag string) *DirectorySitesGetCall {
29314	c.ifNoneMatch_ = entityTag
29315	return c
29316}
29317
29318// Context sets the context to be used in this call's Do method. Any
29319// pending HTTP request will be aborted if the provided context is
29320// canceled.
29321func (c *DirectorySitesGetCall) Context(ctx context.Context) *DirectorySitesGetCall {
29322	c.ctx_ = ctx
29323	return c
29324}
29325
29326// Header returns an http.Header that can be modified by the caller to
29327// add HTTP headers to the request.
29328func (c *DirectorySitesGetCall) Header() http.Header {
29329	if c.header_ == nil {
29330		c.header_ = make(http.Header)
29331	}
29332	return c.header_
29333}
29334
29335func (c *DirectorySitesGetCall) doRequest(alt string) (*http.Response, error) {
29336	reqHeaders := make(http.Header)
29337	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
29338	for k, v := range c.header_ {
29339		reqHeaders[k] = v
29340	}
29341	reqHeaders.Set("User-Agent", c.s.userAgent())
29342	if c.ifNoneMatch_ != "" {
29343		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29344	}
29345	var body io.Reader = nil
29346	c.urlParams_.Set("alt", alt)
29347	c.urlParams_.Set("prettyPrint", "false")
29348	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites/{id}")
29349	urls += "?" + c.urlParams_.Encode()
29350	req, err := http.NewRequest("GET", urls, body)
29351	if err != nil {
29352		return nil, err
29353	}
29354	req.Header = reqHeaders
29355	googleapi.Expand(req.URL, map[string]string{
29356		"profileId": strconv.FormatInt(c.profileId, 10),
29357		"id":        strconv.FormatInt(c.id, 10),
29358	})
29359	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29360}
29361
29362// Do executes the "dfareporting.directorySites.get" call.
29363// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
29364// status code is an error. Response headers are in either
29365// *DirectorySite.ServerResponse.Header or (if a response was returned
29366// at all) in error.(*googleapi.Error).Header. Use
29367// googleapi.IsNotModified to check whether the returned error was
29368// because http.StatusNotModified was returned.
29369func (c *DirectorySitesGetCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
29370	gensupport.SetOptions(c.urlParams_, opts...)
29371	res, err := c.doRequest("json")
29372	if res != nil && res.StatusCode == http.StatusNotModified {
29373		if res.Body != nil {
29374			res.Body.Close()
29375		}
29376		return nil, &googleapi.Error{
29377			Code:   res.StatusCode,
29378			Header: res.Header,
29379		}
29380	}
29381	if err != nil {
29382		return nil, err
29383	}
29384	defer googleapi.CloseBody(res)
29385	if err := googleapi.CheckResponse(res); err != nil {
29386		return nil, err
29387	}
29388	ret := &DirectorySite{
29389		ServerResponse: googleapi.ServerResponse{
29390			Header:         res.Header,
29391			HTTPStatusCode: res.StatusCode,
29392		},
29393	}
29394	target := &ret
29395	if err := gensupport.DecodeResponse(target, res); err != nil {
29396		return nil, err
29397	}
29398	return ret, nil
29399	// {
29400	//   "description": "Gets one directory site by ID.",
29401	//   "httpMethod": "GET",
29402	//   "id": "dfareporting.directorySites.get",
29403	//   "parameterOrder": [
29404	//     "profileId",
29405	//     "id"
29406	//   ],
29407	//   "parameters": {
29408	//     "id": {
29409	//       "description": "Directory site ID.",
29410	//       "format": "int64",
29411	//       "location": "path",
29412	//       "required": true,
29413	//       "type": "string"
29414	//     },
29415	//     "profileId": {
29416	//       "description": "User profile ID associated with this request.",
29417	//       "format": "int64",
29418	//       "location": "path",
29419	//       "required": true,
29420	//       "type": "string"
29421	//     }
29422	//   },
29423	//   "path": "userprofiles/{profileId}/directorySites/{id}",
29424	//   "response": {
29425	//     "$ref": "DirectorySite"
29426	//   },
29427	//   "scopes": [
29428	//     "https://www.googleapis.com/auth/dfatrafficking"
29429	//   ]
29430	// }
29431
29432}
29433
29434// method id "dfareporting.directorySites.insert":
29435
29436type DirectorySitesInsertCall struct {
29437	s             *Service
29438	profileId     int64
29439	directorysite *DirectorySite
29440	urlParams_    gensupport.URLParams
29441	ctx_          context.Context
29442	header_       http.Header
29443}
29444
29445// Insert: Inserts a new directory site.
29446func (r *DirectorySitesService) Insert(profileId int64, directorysite *DirectorySite) *DirectorySitesInsertCall {
29447	c := &DirectorySitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29448	c.profileId = profileId
29449	c.directorysite = directorysite
29450	return c
29451}
29452
29453// Fields allows partial responses to be retrieved. See
29454// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29455// for more information.
29456func (c *DirectorySitesInsertCall) Fields(s ...googleapi.Field) *DirectorySitesInsertCall {
29457	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29458	return c
29459}
29460
29461// Context sets the context to be used in this call's Do method. Any
29462// pending HTTP request will be aborted if the provided context is
29463// canceled.
29464func (c *DirectorySitesInsertCall) Context(ctx context.Context) *DirectorySitesInsertCall {
29465	c.ctx_ = ctx
29466	return c
29467}
29468
29469// Header returns an http.Header that can be modified by the caller to
29470// add HTTP headers to the request.
29471func (c *DirectorySitesInsertCall) Header() http.Header {
29472	if c.header_ == nil {
29473		c.header_ = make(http.Header)
29474	}
29475	return c.header_
29476}
29477
29478func (c *DirectorySitesInsertCall) doRequest(alt string) (*http.Response, error) {
29479	reqHeaders := make(http.Header)
29480	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
29481	for k, v := range c.header_ {
29482		reqHeaders[k] = v
29483	}
29484	reqHeaders.Set("User-Agent", c.s.userAgent())
29485	var body io.Reader = nil
29486	body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorysite)
29487	if err != nil {
29488		return nil, err
29489	}
29490	reqHeaders.Set("Content-Type", "application/json")
29491	c.urlParams_.Set("alt", alt)
29492	c.urlParams_.Set("prettyPrint", "false")
29493	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
29494	urls += "?" + c.urlParams_.Encode()
29495	req, err := http.NewRequest("POST", urls, body)
29496	if err != nil {
29497		return nil, err
29498	}
29499	req.Header = reqHeaders
29500	googleapi.Expand(req.URL, map[string]string{
29501		"profileId": strconv.FormatInt(c.profileId, 10),
29502	})
29503	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29504}
29505
29506// Do executes the "dfareporting.directorySites.insert" call.
29507// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
29508// status code is an error. Response headers are in either
29509// *DirectorySite.ServerResponse.Header or (if a response was returned
29510// at all) in error.(*googleapi.Error).Header. Use
29511// googleapi.IsNotModified to check whether the returned error was
29512// because http.StatusNotModified was returned.
29513func (c *DirectorySitesInsertCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
29514	gensupport.SetOptions(c.urlParams_, opts...)
29515	res, err := c.doRequest("json")
29516	if res != nil && res.StatusCode == http.StatusNotModified {
29517		if res.Body != nil {
29518			res.Body.Close()
29519		}
29520		return nil, &googleapi.Error{
29521			Code:   res.StatusCode,
29522			Header: res.Header,
29523		}
29524	}
29525	if err != nil {
29526		return nil, err
29527	}
29528	defer googleapi.CloseBody(res)
29529	if err := googleapi.CheckResponse(res); err != nil {
29530		return nil, err
29531	}
29532	ret := &DirectorySite{
29533		ServerResponse: googleapi.ServerResponse{
29534			Header:         res.Header,
29535			HTTPStatusCode: res.StatusCode,
29536		},
29537	}
29538	target := &ret
29539	if err := gensupport.DecodeResponse(target, res); err != nil {
29540		return nil, err
29541	}
29542	return ret, nil
29543	// {
29544	//   "description": "Inserts a new directory site.",
29545	//   "httpMethod": "POST",
29546	//   "id": "dfareporting.directorySites.insert",
29547	//   "parameterOrder": [
29548	//     "profileId"
29549	//   ],
29550	//   "parameters": {
29551	//     "profileId": {
29552	//       "description": "User profile ID associated with this request.",
29553	//       "format": "int64",
29554	//       "location": "path",
29555	//       "required": true,
29556	//       "type": "string"
29557	//     }
29558	//   },
29559	//   "path": "userprofiles/{profileId}/directorySites",
29560	//   "request": {
29561	//     "$ref": "DirectorySite"
29562	//   },
29563	//   "response": {
29564	//     "$ref": "DirectorySite"
29565	//   },
29566	//   "scopes": [
29567	//     "https://www.googleapis.com/auth/dfatrafficking"
29568	//   ]
29569	// }
29570
29571}
29572
29573// method id "dfareporting.directorySites.list":
29574
29575type DirectorySitesListCall struct {
29576	s            *Service
29577	profileId    int64
29578	urlParams_   gensupport.URLParams
29579	ifNoneMatch_ string
29580	ctx_         context.Context
29581	header_      http.Header
29582}
29583
29584// List: Retrieves a list of directory sites, possibly filtered. This
29585// method supports paging.
29586func (r *DirectorySitesService) List(profileId int64) *DirectorySitesListCall {
29587	c := &DirectorySitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29588	c.profileId = profileId
29589	return c
29590}
29591
29592// AcceptsInStreamVideoPlacements sets the optional parameter
29593// "acceptsInStreamVideoPlacements": This search filter is no longer
29594// supported and will have no effect on the results returned.
29595func (c *DirectorySitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *DirectorySitesListCall {
29596	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
29597	return c
29598}
29599
29600// AcceptsInterstitialPlacements sets the optional parameter
29601// "acceptsInterstitialPlacements": This search filter is no longer
29602// supported and will have no effect on the results returned.
29603func (c *DirectorySitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *DirectorySitesListCall {
29604	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
29605	return c
29606}
29607
29608// AcceptsPublisherPaidPlacements sets the optional parameter
29609// "acceptsPublisherPaidPlacements": Select only directory sites that
29610// accept publisher paid placements. This field can be left blank.
29611func (c *DirectorySitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *DirectorySitesListCall {
29612	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
29613	return c
29614}
29615
29616// Active sets the optional parameter "active": Select only active
29617// directory sites. Leave blank to retrieve both active and inactive
29618// directory sites.
29619func (c *DirectorySitesListCall) Active(active bool) *DirectorySitesListCall {
29620	c.urlParams_.Set("active", fmt.Sprint(active))
29621	return c
29622}
29623
29624// DfpNetworkCode sets the optional parameter "dfpNetworkCode": Select
29625// only directory sites with this Ad Manager network code.
29626func (c *DirectorySitesListCall) DfpNetworkCode(dfpNetworkCode string) *DirectorySitesListCall {
29627	c.urlParams_.Set("dfpNetworkCode", dfpNetworkCode)
29628	return c
29629}
29630
29631// Ids sets the optional parameter "ids": Select only directory sites
29632// with these IDs.
29633func (c *DirectorySitesListCall) Ids(ids ...int64) *DirectorySitesListCall {
29634	var ids_ []string
29635	for _, v := range ids {
29636		ids_ = append(ids_, fmt.Sprint(v))
29637	}
29638	c.urlParams_.SetMulti("ids", ids_)
29639	return c
29640}
29641
29642// MaxResults sets the optional parameter "maxResults": Maximum number
29643// of results to return.
29644func (c *DirectorySitesListCall) MaxResults(maxResults int64) *DirectorySitesListCall {
29645	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29646	return c
29647}
29648
29649// PageToken sets the optional parameter "pageToken": Value of the
29650// nextPageToken from the previous result page.
29651func (c *DirectorySitesListCall) PageToken(pageToken string) *DirectorySitesListCall {
29652	c.urlParams_.Set("pageToken", pageToken)
29653	return c
29654}
29655
29656// SearchString sets the optional parameter "searchString": Allows
29657// searching for objects by name, ID or URL. Wildcards (*) are allowed.
29658// For example, "directory site*2015" will return objects with names
29659// like "directory site June 2015", "directory site April 2015", or
29660// simply "directory site 2015". Most of the searches also add wildcards
29661// implicitly at the start and the end of the search string. For
29662// example, a search string of "directory site" will match objects with
29663// name "my directory site", "directory site 2015" or simply, "directory
29664// site".
29665func (c *DirectorySitesListCall) SearchString(searchString string) *DirectorySitesListCall {
29666	c.urlParams_.Set("searchString", searchString)
29667	return c
29668}
29669
29670// SortField sets the optional parameter "sortField": Field by which to
29671// sort the list.
29672//
29673// Possible values:
29674//   "ID" (default)
29675//   "NAME"
29676func (c *DirectorySitesListCall) SortField(sortField string) *DirectorySitesListCall {
29677	c.urlParams_.Set("sortField", sortField)
29678	return c
29679}
29680
29681// SortOrder sets the optional parameter "sortOrder": Order of sorted
29682// results.
29683//
29684// Possible values:
29685//   "ASCENDING" (default)
29686//   "DESCENDING"
29687func (c *DirectorySitesListCall) SortOrder(sortOrder string) *DirectorySitesListCall {
29688	c.urlParams_.Set("sortOrder", sortOrder)
29689	return c
29690}
29691
29692// Fields allows partial responses to be retrieved. See
29693// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29694// for more information.
29695func (c *DirectorySitesListCall) Fields(s ...googleapi.Field) *DirectorySitesListCall {
29696	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29697	return c
29698}
29699
29700// IfNoneMatch sets the optional parameter which makes the operation
29701// fail if the object's ETag matches the given value. This is useful for
29702// getting updates only after the object has changed since the last
29703// request. Use googleapi.IsNotModified to check whether the response
29704// error from Do is the result of In-None-Match.
29705func (c *DirectorySitesListCall) IfNoneMatch(entityTag string) *DirectorySitesListCall {
29706	c.ifNoneMatch_ = entityTag
29707	return c
29708}
29709
29710// Context sets the context to be used in this call's Do method. Any
29711// pending HTTP request will be aborted if the provided context is
29712// canceled.
29713func (c *DirectorySitesListCall) Context(ctx context.Context) *DirectorySitesListCall {
29714	c.ctx_ = ctx
29715	return c
29716}
29717
29718// Header returns an http.Header that can be modified by the caller to
29719// add HTTP headers to the request.
29720func (c *DirectorySitesListCall) Header() http.Header {
29721	if c.header_ == nil {
29722		c.header_ = make(http.Header)
29723	}
29724	return c.header_
29725}
29726
29727func (c *DirectorySitesListCall) doRequest(alt string) (*http.Response, error) {
29728	reqHeaders := make(http.Header)
29729	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
29730	for k, v := range c.header_ {
29731		reqHeaders[k] = v
29732	}
29733	reqHeaders.Set("User-Agent", c.s.userAgent())
29734	if c.ifNoneMatch_ != "" {
29735		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29736	}
29737	var body io.Reader = nil
29738	c.urlParams_.Set("alt", alt)
29739	c.urlParams_.Set("prettyPrint", "false")
29740	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
29741	urls += "?" + c.urlParams_.Encode()
29742	req, err := http.NewRequest("GET", urls, body)
29743	if err != nil {
29744		return nil, err
29745	}
29746	req.Header = reqHeaders
29747	googleapi.Expand(req.URL, map[string]string{
29748		"profileId": strconv.FormatInt(c.profileId, 10),
29749	})
29750	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29751}
29752
29753// Do executes the "dfareporting.directorySites.list" call.
29754// Exactly one of *DirectorySitesListResponse or error will be non-nil.
29755// Any non-2xx status code is an error. Response headers are in either
29756// *DirectorySitesListResponse.ServerResponse.Header or (if a response
29757// was returned at all) in error.(*googleapi.Error).Header. Use
29758// googleapi.IsNotModified to check whether the returned error was
29759// because http.StatusNotModified was returned.
29760func (c *DirectorySitesListCall) Do(opts ...googleapi.CallOption) (*DirectorySitesListResponse, error) {
29761	gensupport.SetOptions(c.urlParams_, opts...)
29762	res, err := c.doRequest("json")
29763	if res != nil && res.StatusCode == http.StatusNotModified {
29764		if res.Body != nil {
29765			res.Body.Close()
29766		}
29767		return nil, &googleapi.Error{
29768			Code:   res.StatusCode,
29769			Header: res.Header,
29770		}
29771	}
29772	if err != nil {
29773		return nil, err
29774	}
29775	defer googleapi.CloseBody(res)
29776	if err := googleapi.CheckResponse(res); err != nil {
29777		return nil, err
29778	}
29779	ret := &DirectorySitesListResponse{
29780		ServerResponse: googleapi.ServerResponse{
29781			Header:         res.Header,
29782			HTTPStatusCode: res.StatusCode,
29783		},
29784	}
29785	target := &ret
29786	if err := gensupport.DecodeResponse(target, res); err != nil {
29787		return nil, err
29788	}
29789	return ret, nil
29790	// {
29791	//   "description": "Retrieves a list of directory sites, possibly filtered. This method supports paging.",
29792	//   "httpMethod": "GET",
29793	//   "id": "dfareporting.directorySites.list",
29794	//   "parameterOrder": [
29795	//     "profileId"
29796	//   ],
29797	//   "parameters": {
29798	//     "acceptsInStreamVideoPlacements": {
29799	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
29800	//       "location": "query",
29801	//       "type": "boolean"
29802	//     },
29803	//     "acceptsInterstitialPlacements": {
29804	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
29805	//       "location": "query",
29806	//       "type": "boolean"
29807	//     },
29808	//     "acceptsPublisherPaidPlacements": {
29809	//       "description": "Select only directory sites that accept publisher paid placements. This field can be left blank.",
29810	//       "location": "query",
29811	//       "type": "boolean"
29812	//     },
29813	//     "active": {
29814	//       "description": "Select only active directory sites. Leave blank to retrieve both active and inactive directory sites.",
29815	//       "location": "query",
29816	//       "type": "boolean"
29817	//     },
29818	//     "dfpNetworkCode": {
29819	//       "description": "Select only directory sites with this Ad Manager network code.",
29820	//       "location": "query",
29821	//       "type": "string"
29822	//     },
29823	//     "ids": {
29824	//       "description": "Select only directory sites with these IDs.",
29825	//       "format": "int64",
29826	//       "location": "query",
29827	//       "repeated": true,
29828	//       "type": "string"
29829	//     },
29830	//     "maxResults": {
29831	//       "default": "1000",
29832	//       "description": "Maximum number of results to return.",
29833	//       "format": "int32",
29834	//       "location": "query",
29835	//       "maximum": "1000",
29836	//       "minimum": "0",
29837	//       "type": "integer"
29838	//     },
29839	//     "pageToken": {
29840	//       "description": "Value of the nextPageToken from the previous result page.",
29841	//       "location": "query",
29842	//       "type": "string"
29843	//     },
29844	//     "profileId": {
29845	//       "description": "User profile ID associated with this request.",
29846	//       "format": "int64",
29847	//       "location": "path",
29848	//       "required": true,
29849	//       "type": "string"
29850	//     },
29851	//     "searchString": {
29852	//       "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\".",
29853	//       "location": "query",
29854	//       "type": "string"
29855	//     },
29856	//     "sortField": {
29857	//       "default": "ID",
29858	//       "description": "Field by which to sort the list.",
29859	//       "enum": [
29860	//         "ID",
29861	//         "NAME"
29862	//       ],
29863	//       "enumDescriptions": [
29864	//         "",
29865	//         ""
29866	//       ],
29867	//       "location": "query",
29868	//       "type": "string"
29869	//     },
29870	//     "sortOrder": {
29871	//       "default": "ASCENDING",
29872	//       "description": "Order of sorted results.",
29873	//       "enum": [
29874	//         "ASCENDING",
29875	//         "DESCENDING"
29876	//       ],
29877	//       "enumDescriptions": [
29878	//         "",
29879	//         ""
29880	//       ],
29881	//       "location": "query",
29882	//       "type": "string"
29883	//     }
29884	//   },
29885	//   "path": "userprofiles/{profileId}/directorySites",
29886	//   "response": {
29887	//     "$ref": "DirectorySitesListResponse"
29888	//   },
29889	//   "scopes": [
29890	//     "https://www.googleapis.com/auth/dfatrafficking"
29891	//   ]
29892	// }
29893
29894}
29895
29896// Pages invokes f for each page of results.
29897// A non-nil error returned from f will halt the iteration.
29898// The provided context supersedes any context provided to the Context method.
29899func (c *DirectorySitesListCall) Pages(ctx context.Context, f func(*DirectorySitesListResponse) error) error {
29900	c.ctx_ = ctx
29901	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29902	for {
29903		x, err := c.Do()
29904		if err != nil {
29905			return err
29906		}
29907		if err := f(x); err != nil {
29908			return err
29909		}
29910		if x.NextPageToken == "" {
29911			return nil
29912		}
29913		c.PageToken(x.NextPageToken)
29914	}
29915}
29916
29917// method id "dfareporting.dynamicTargetingKeys.delete":
29918
29919type DynamicTargetingKeysDeleteCall struct {
29920	s          *Service
29921	profileId  int64
29922	objectId   int64
29923	urlParams_ gensupport.URLParams
29924	ctx_       context.Context
29925	header_    http.Header
29926}
29927
29928// Delete: Deletes an existing dynamic targeting key.
29929func (r *DynamicTargetingKeysService) Delete(profileId int64, objectId int64, name string, objectType string) *DynamicTargetingKeysDeleteCall {
29930	c := &DynamicTargetingKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29931	c.profileId = profileId
29932	c.objectId = objectId
29933	c.urlParams_.Set("name", name)
29934	c.urlParams_.Set("objectType", objectType)
29935	return c
29936}
29937
29938// Fields allows partial responses to be retrieved. See
29939// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29940// for more information.
29941func (c *DynamicTargetingKeysDeleteCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysDeleteCall {
29942	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29943	return c
29944}
29945
29946// Context sets the context to be used in this call's Do method. Any
29947// pending HTTP request will be aborted if the provided context is
29948// canceled.
29949func (c *DynamicTargetingKeysDeleteCall) Context(ctx context.Context) *DynamicTargetingKeysDeleteCall {
29950	c.ctx_ = ctx
29951	return c
29952}
29953
29954// Header returns an http.Header that can be modified by the caller to
29955// add HTTP headers to the request.
29956func (c *DynamicTargetingKeysDeleteCall) Header() http.Header {
29957	if c.header_ == nil {
29958		c.header_ = make(http.Header)
29959	}
29960	return c.header_
29961}
29962
29963func (c *DynamicTargetingKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
29964	reqHeaders := make(http.Header)
29965	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
29966	for k, v := range c.header_ {
29967		reqHeaders[k] = v
29968	}
29969	reqHeaders.Set("User-Agent", c.s.userAgent())
29970	var body io.Reader = nil
29971	c.urlParams_.Set("alt", alt)
29972	c.urlParams_.Set("prettyPrint", "false")
29973	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}")
29974	urls += "?" + c.urlParams_.Encode()
29975	req, err := http.NewRequest("DELETE", urls, body)
29976	if err != nil {
29977		return nil, err
29978	}
29979	req.Header = reqHeaders
29980	googleapi.Expand(req.URL, map[string]string{
29981		"profileId": strconv.FormatInt(c.profileId, 10),
29982		"objectId":  strconv.FormatInt(c.objectId, 10),
29983	})
29984	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29985}
29986
29987// Do executes the "dfareporting.dynamicTargetingKeys.delete" call.
29988func (c *DynamicTargetingKeysDeleteCall) Do(opts ...googleapi.CallOption) error {
29989	gensupport.SetOptions(c.urlParams_, opts...)
29990	res, err := c.doRequest("json")
29991	if err != nil {
29992		return err
29993	}
29994	defer googleapi.CloseBody(res)
29995	if err := googleapi.CheckResponse(res); err != nil {
29996		return err
29997	}
29998	return nil
29999	// {
30000	//   "description": "Deletes an existing dynamic targeting key.",
30001	//   "httpMethod": "DELETE",
30002	//   "id": "dfareporting.dynamicTargetingKeys.delete",
30003	//   "parameterOrder": [
30004	//     "profileId",
30005	//     "objectId",
30006	//     "name",
30007	//     "objectType"
30008	//   ],
30009	//   "parameters": {
30010	//     "name": {
30011	//       "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.",
30012	//       "location": "query",
30013	//       "required": true,
30014	//       "type": "string"
30015	//     },
30016	//     "objectId": {
30017	//       "description": "ID of the object of this dynamic targeting key. This is a required field.",
30018	//       "format": "int64",
30019	//       "location": "path",
30020	//       "required": true,
30021	//       "type": "string"
30022	//     },
30023	//     "objectType": {
30024	//       "description": "Type of the object of this dynamic targeting key. This is a required field.",
30025	//       "enum": [
30026	//         "OBJECT_AD",
30027	//         "OBJECT_ADVERTISER",
30028	//         "OBJECT_CREATIVE",
30029	//         "OBJECT_PLACEMENT"
30030	//       ],
30031	//       "enumDescriptions": [
30032	//         "",
30033	//         "",
30034	//         "",
30035	//         ""
30036	//       ],
30037	//       "location": "query",
30038	//       "required": true,
30039	//       "type": "string"
30040	//     },
30041	//     "profileId": {
30042	//       "description": "User profile ID associated with this request.",
30043	//       "format": "int64",
30044	//       "location": "path",
30045	//       "required": true,
30046	//       "type": "string"
30047	//     }
30048	//   },
30049	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}",
30050	//   "scopes": [
30051	//     "https://www.googleapis.com/auth/dfatrafficking"
30052	//   ]
30053	// }
30054
30055}
30056
30057// method id "dfareporting.dynamicTargetingKeys.insert":
30058
30059type DynamicTargetingKeysInsertCall struct {
30060	s                   *Service
30061	profileId           int64
30062	dynamictargetingkey *DynamicTargetingKey
30063	urlParams_          gensupport.URLParams
30064	ctx_                context.Context
30065	header_             http.Header
30066}
30067
30068// Insert: Inserts a new dynamic targeting key. Keys must be created at
30069// the advertiser level before being assigned to the advertiser's ads,
30070// creatives, or placements. There is a maximum of 1000 keys per
30071// advertiser, out of which a maximum of 20 keys can be assigned per ad,
30072// creative, or placement.
30073func (r *DynamicTargetingKeysService) Insert(profileId int64, dynamictargetingkey *DynamicTargetingKey) *DynamicTargetingKeysInsertCall {
30074	c := &DynamicTargetingKeysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30075	c.profileId = profileId
30076	c.dynamictargetingkey = dynamictargetingkey
30077	return c
30078}
30079
30080// Fields allows partial responses to be retrieved. See
30081// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30082// for more information.
30083func (c *DynamicTargetingKeysInsertCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysInsertCall {
30084	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30085	return c
30086}
30087
30088// Context sets the context to be used in this call's Do method. Any
30089// pending HTTP request will be aborted if the provided context is
30090// canceled.
30091func (c *DynamicTargetingKeysInsertCall) Context(ctx context.Context) *DynamicTargetingKeysInsertCall {
30092	c.ctx_ = ctx
30093	return c
30094}
30095
30096// Header returns an http.Header that can be modified by the caller to
30097// add HTTP headers to the request.
30098func (c *DynamicTargetingKeysInsertCall) Header() http.Header {
30099	if c.header_ == nil {
30100		c.header_ = make(http.Header)
30101	}
30102	return c.header_
30103}
30104
30105func (c *DynamicTargetingKeysInsertCall) doRequest(alt string) (*http.Response, error) {
30106	reqHeaders := make(http.Header)
30107	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
30108	for k, v := range c.header_ {
30109		reqHeaders[k] = v
30110	}
30111	reqHeaders.Set("User-Agent", c.s.userAgent())
30112	var body io.Reader = nil
30113	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dynamictargetingkey)
30114	if err != nil {
30115		return nil, err
30116	}
30117	reqHeaders.Set("Content-Type", "application/json")
30118	c.urlParams_.Set("alt", alt)
30119	c.urlParams_.Set("prettyPrint", "false")
30120	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
30121	urls += "?" + c.urlParams_.Encode()
30122	req, err := http.NewRequest("POST", urls, body)
30123	if err != nil {
30124		return nil, err
30125	}
30126	req.Header = reqHeaders
30127	googleapi.Expand(req.URL, map[string]string{
30128		"profileId": strconv.FormatInt(c.profileId, 10),
30129	})
30130	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30131}
30132
30133// Do executes the "dfareporting.dynamicTargetingKeys.insert" call.
30134// Exactly one of *DynamicTargetingKey or error will be non-nil. Any
30135// non-2xx status code is an error. Response headers are in either
30136// *DynamicTargetingKey.ServerResponse.Header or (if a response was
30137// returned at all) in error.(*googleapi.Error).Header. Use
30138// googleapi.IsNotModified to check whether the returned error was
30139// because http.StatusNotModified was returned.
30140func (c *DynamicTargetingKeysInsertCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKey, error) {
30141	gensupport.SetOptions(c.urlParams_, opts...)
30142	res, err := c.doRequest("json")
30143	if res != nil && res.StatusCode == http.StatusNotModified {
30144		if res.Body != nil {
30145			res.Body.Close()
30146		}
30147		return nil, &googleapi.Error{
30148			Code:   res.StatusCode,
30149			Header: res.Header,
30150		}
30151	}
30152	if err != nil {
30153		return nil, err
30154	}
30155	defer googleapi.CloseBody(res)
30156	if err := googleapi.CheckResponse(res); err != nil {
30157		return nil, err
30158	}
30159	ret := &DynamicTargetingKey{
30160		ServerResponse: googleapi.ServerResponse{
30161			Header:         res.Header,
30162			HTTPStatusCode: res.StatusCode,
30163		},
30164	}
30165	target := &ret
30166	if err := gensupport.DecodeResponse(target, res); err != nil {
30167		return nil, err
30168	}
30169	return ret, nil
30170	// {
30171	//   "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.",
30172	//   "httpMethod": "POST",
30173	//   "id": "dfareporting.dynamicTargetingKeys.insert",
30174	//   "parameterOrder": [
30175	//     "profileId"
30176	//   ],
30177	//   "parameters": {
30178	//     "profileId": {
30179	//       "description": "User profile ID associated with this request.",
30180	//       "format": "int64",
30181	//       "location": "path",
30182	//       "required": true,
30183	//       "type": "string"
30184	//     }
30185	//   },
30186	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
30187	//   "request": {
30188	//     "$ref": "DynamicTargetingKey"
30189	//   },
30190	//   "response": {
30191	//     "$ref": "DynamicTargetingKey"
30192	//   },
30193	//   "scopes": [
30194	//     "https://www.googleapis.com/auth/dfatrafficking"
30195	//   ]
30196	// }
30197
30198}
30199
30200// method id "dfareporting.dynamicTargetingKeys.list":
30201
30202type DynamicTargetingKeysListCall struct {
30203	s            *Service
30204	profileId    int64
30205	urlParams_   gensupport.URLParams
30206	ifNoneMatch_ string
30207	ctx_         context.Context
30208	header_      http.Header
30209}
30210
30211// List: Retrieves a list of dynamic targeting keys.
30212func (r *DynamicTargetingKeysService) List(profileId int64) *DynamicTargetingKeysListCall {
30213	c := &DynamicTargetingKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30214	c.profileId = profileId
30215	return c
30216}
30217
30218// AdvertiserId sets the optional parameter "advertiserId": Select only
30219// dynamic targeting keys whose object has this advertiser ID.
30220func (c *DynamicTargetingKeysListCall) AdvertiserId(advertiserId int64) *DynamicTargetingKeysListCall {
30221	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30222	return c
30223}
30224
30225// Names sets the optional parameter "names": Select only dynamic
30226// targeting keys exactly matching these names.
30227func (c *DynamicTargetingKeysListCall) Names(names ...string) *DynamicTargetingKeysListCall {
30228	c.urlParams_.SetMulti("names", append([]string{}, names...))
30229	return c
30230}
30231
30232// ObjectId sets the optional parameter "objectId": Select only dynamic
30233// targeting keys with this object ID.
30234func (c *DynamicTargetingKeysListCall) ObjectId(objectId int64) *DynamicTargetingKeysListCall {
30235	c.urlParams_.Set("objectId", fmt.Sprint(objectId))
30236	return c
30237}
30238
30239// ObjectType sets the optional parameter "objectType": Select only
30240// dynamic targeting keys with this object type.
30241//
30242// Possible values:
30243//   "OBJECT_AD"
30244//   "OBJECT_ADVERTISER"
30245//   "OBJECT_CREATIVE"
30246//   "OBJECT_PLACEMENT"
30247func (c *DynamicTargetingKeysListCall) ObjectType(objectType string) *DynamicTargetingKeysListCall {
30248	c.urlParams_.Set("objectType", objectType)
30249	return c
30250}
30251
30252// Fields allows partial responses to be retrieved. See
30253// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30254// for more information.
30255func (c *DynamicTargetingKeysListCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysListCall {
30256	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30257	return c
30258}
30259
30260// IfNoneMatch sets the optional parameter which makes the operation
30261// fail if the object's ETag matches the given value. This is useful for
30262// getting updates only after the object has changed since the last
30263// request. Use googleapi.IsNotModified to check whether the response
30264// error from Do is the result of In-None-Match.
30265func (c *DynamicTargetingKeysListCall) IfNoneMatch(entityTag string) *DynamicTargetingKeysListCall {
30266	c.ifNoneMatch_ = entityTag
30267	return c
30268}
30269
30270// Context sets the context to be used in this call's Do method. Any
30271// pending HTTP request will be aborted if the provided context is
30272// canceled.
30273func (c *DynamicTargetingKeysListCall) Context(ctx context.Context) *DynamicTargetingKeysListCall {
30274	c.ctx_ = ctx
30275	return c
30276}
30277
30278// Header returns an http.Header that can be modified by the caller to
30279// add HTTP headers to the request.
30280func (c *DynamicTargetingKeysListCall) Header() http.Header {
30281	if c.header_ == nil {
30282		c.header_ = make(http.Header)
30283	}
30284	return c.header_
30285}
30286
30287func (c *DynamicTargetingKeysListCall) doRequest(alt string) (*http.Response, error) {
30288	reqHeaders := make(http.Header)
30289	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
30290	for k, v := range c.header_ {
30291		reqHeaders[k] = v
30292	}
30293	reqHeaders.Set("User-Agent", c.s.userAgent())
30294	if c.ifNoneMatch_ != "" {
30295		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30296	}
30297	var body io.Reader = nil
30298	c.urlParams_.Set("alt", alt)
30299	c.urlParams_.Set("prettyPrint", "false")
30300	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
30301	urls += "?" + c.urlParams_.Encode()
30302	req, err := http.NewRequest("GET", urls, body)
30303	if err != nil {
30304		return nil, err
30305	}
30306	req.Header = reqHeaders
30307	googleapi.Expand(req.URL, map[string]string{
30308		"profileId": strconv.FormatInt(c.profileId, 10),
30309	})
30310	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30311}
30312
30313// Do executes the "dfareporting.dynamicTargetingKeys.list" call.
30314// Exactly one of *DynamicTargetingKeysListResponse or error will be
30315// non-nil. Any non-2xx status code is an error. Response headers are in
30316// either *DynamicTargetingKeysListResponse.ServerResponse.Header or (if
30317// a response was returned at all) in error.(*googleapi.Error).Header.
30318// Use googleapi.IsNotModified to check whether the returned error was
30319// because http.StatusNotModified was returned.
30320func (c *DynamicTargetingKeysListCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKeysListResponse, error) {
30321	gensupport.SetOptions(c.urlParams_, opts...)
30322	res, err := c.doRequest("json")
30323	if res != nil && res.StatusCode == http.StatusNotModified {
30324		if res.Body != nil {
30325			res.Body.Close()
30326		}
30327		return nil, &googleapi.Error{
30328			Code:   res.StatusCode,
30329			Header: res.Header,
30330		}
30331	}
30332	if err != nil {
30333		return nil, err
30334	}
30335	defer googleapi.CloseBody(res)
30336	if err := googleapi.CheckResponse(res); err != nil {
30337		return nil, err
30338	}
30339	ret := &DynamicTargetingKeysListResponse{
30340		ServerResponse: googleapi.ServerResponse{
30341			Header:         res.Header,
30342			HTTPStatusCode: res.StatusCode,
30343		},
30344	}
30345	target := &ret
30346	if err := gensupport.DecodeResponse(target, res); err != nil {
30347		return nil, err
30348	}
30349	return ret, nil
30350	// {
30351	//   "description": "Retrieves a list of dynamic targeting keys.",
30352	//   "httpMethod": "GET",
30353	//   "id": "dfareporting.dynamicTargetingKeys.list",
30354	//   "parameterOrder": [
30355	//     "profileId"
30356	//   ],
30357	//   "parameters": {
30358	//     "advertiserId": {
30359	//       "description": "Select only dynamic targeting keys whose object has this advertiser ID.",
30360	//       "format": "int64",
30361	//       "location": "query",
30362	//       "type": "string"
30363	//     },
30364	//     "names": {
30365	//       "description": "Select only dynamic targeting keys exactly matching these names.",
30366	//       "location": "query",
30367	//       "repeated": true,
30368	//       "type": "string"
30369	//     },
30370	//     "objectId": {
30371	//       "description": "Select only dynamic targeting keys with this object ID.",
30372	//       "format": "int64",
30373	//       "location": "query",
30374	//       "type": "string"
30375	//     },
30376	//     "objectType": {
30377	//       "description": "Select only dynamic targeting keys with this object type.",
30378	//       "enum": [
30379	//         "OBJECT_AD",
30380	//         "OBJECT_ADVERTISER",
30381	//         "OBJECT_CREATIVE",
30382	//         "OBJECT_PLACEMENT"
30383	//       ],
30384	//       "enumDescriptions": [
30385	//         "",
30386	//         "",
30387	//         "",
30388	//         ""
30389	//       ],
30390	//       "location": "query",
30391	//       "type": "string"
30392	//     },
30393	//     "profileId": {
30394	//       "description": "User profile ID associated with this request.",
30395	//       "format": "int64",
30396	//       "location": "path",
30397	//       "required": true,
30398	//       "type": "string"
30399	//     }
30400	//   },
30401	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
30402	//   "response": {
30403	//     "$ref": "DynamicTargetingKeysListResponse"
30404	//   },
30405	//   "scopes": [
30406	//     "https://www.googleapis.com/auth/dfatrafficking"
30407	//   ]
30408	// }
30409
30410}
30411
30412// method id "dfareporting.eventTags.delete":
30413
30414type EventTagsDeleteCall struct {
30415	s          *Service
30416	profileId  int64
30417	id         int64
30418	urlParams_ gensupport.URLParams
30419	ctx_       context.Context
30420	header_    http.Header
30421}
30422
30423// Delete: Deletes an existing event tag.
30424func (r *EventTagsService) Delete(profileId int64, id int64) *EventTagsDeleteCall {
30425	c := &EventTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30426	c.profileId = profileId
30427	c.id = id
30428	return c
30429}
30430
30431// Fields allows partial responses to be retrieved. See
30432// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30433// for more information.
30434func (c *EventTagsDeleteCall) Fields(s ...googleapi.Field) *EventTagsDeleteCall {
30435	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30436	return c
30437}
30438
30439// Context sets the context to be used in this call's Do method. Any
30440// pending HTTP request will be aborted if the provided context is
30441// canceled.
30442func (c *EventTagsDeleteCall) Context(ctx context.Context) *EventTagsDeleteCall {
30443	c.ctx_ = ctx
30444	return c
30445}
30446
30447// Header returns an http.Header that can be modified by the caller to
30448// add HTTP headers to the request.
30449func (c *EventTagsDeleteCall) Header() http.Header {
30450	if c.header_ == nil {
30451		c.header_ = make(http.Header)
30452	}
30453	return c.header_
30454}
30455
30456func (c *EventTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
30457	reqHeaders := make(http.Header)
30458	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
30459	for k, v := range c.header_ {
30460		reqHeaders[k] = v
30461	}
30462	reqHeaders.Set("User-Agent", c.s.userAgent())
30463	var body io.Reader = nil
30464	c.urlParams_.Set("alt", alt)
30465	c.urlParams_.Set("prettyPrint", "false")
30466	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
30467	urls += "?" + c.urlParams_.Encode()
30468	req, err := http.NewRequest("DELETE", urls, body)
30469	if err != nil {
30470		return nil, err
30471	}
30472	req.Header = reqHeaders
30473	googleapi.Expand(req.URL, map[string]string{
30474		"profileId": strconv.FormatInt(c.profileId, 10),
30475		"id":        strconv.FormatInt(c.id, 10),
30476	})
30477	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30478}
30479
30480// Do executes the "dfareporting.eventTags.delete" call.
30481func (c *EventTagsDeleteCall) Do(opts ...googleapi.CallOption) error {
30482	gensupport.SetOptions(c.urlParams_, opts...)
30483	res, err := c.doRequest("json")
30484	if err != nil {
30485		return err
30486	}
30487	defer googleapi.CloseBody(res)
30488	if err := googleapi.CheckResponse(res); err != nil {
30489		return err
30490	}
30491	return nil
30492	// {
30493	//   "description": "Deletes an existing event tag.",
30494	//   "httpMethod": "DELETE",
30495	//   "id": "dfareporting.eventTags.delete",
30496	//   "parameterOrder": [
30497	//     "profileId",
30498	//     "id"
30499	//   ],
30500	//   "parameters": {
30501	//     "id": {
30502	//       "description": "Event tag ID.",
30503	//       "format": "int64",
30504	//       "location": "path",
30505	//       "required": true,
30506	//       "type": "string"
30507	//     },
30508	//     "profileId": {
30509	//       "description": "User profile ID associated with this request.",
30510	//       "format": "int64",
30511	//       "location": "path",
30512	//       "required": true,
30513	//       "type": "string"
30514	//     }
30515	//   },
30516	//   "path": "userprofiles/{profileId}/eventTags/{id}",
30517	//   "scopes": [
30518	//     "https://www.googleapis.com/auth/dfatrafficking"
30519	//   ]
30520	// }
30521
30522}
30523
30524// method id "dfareporting.eventTags.get":
30525
30526type EventTagsGetCall struct {
30527	s            *Service
30528	profileId    int64
30529	id           int64
30530	urlParams_   gensupport.URLParams
30531	ifNoneMatch_ string
30532	ctx_         context.Context
30533	header_      http.Header
30534}
30535
30536// Get: Gets one event tag by ID.
30537func (r *EventTagsService) Get(profileId int64, id int64) *EventTagsGetCall {
30538	c := &EventTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30539	c.profileId = profileId
30540	c.id = id
30541	return c
30542}
30543
30544// Fields allows partial responses to be retrieved. See
30545// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30546// for more information.
30547func (c *EventTagsGetCall) Fields(s ...googleapi.Field) *EventTagsGetCall {
30548	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30549	return c
30550}
30551
30552// IfNoneMatch sets the optional parameter which makes the operation
30553// fail if the object's ETag matches the given value. This is useful for
30554// getting updates only after the object has changed since the last
30555// request. Use googleapi.IsNotModified to check whether the response
30556// error from Do is the result of In-None-Match.
30557func (c *EventTagsGetCall) IfNoneMatch(entityTag string) *EventTagsGetCall {
30558	c.ifNoneMatch_ = entityTag
30559	return c
30560}
30561
30562// Context sets the context to be used in this call's Do method. Any
30563// pending HTTP request will be aborted if the provided context is
30564// canceled.
30565func (c *EventTagsGetCall) Context(ctx context.Context) *EventTagsGetCall {
30566	c.ctx_ = ctx
30567	return c
30568}
30569
30570// Header returns an http.Header that can be modified by the caller to
30571// add HTTP headers to the request.
30572func (c *EventTagsGetCall) Header() http.Header {
30573	if c.header_ == nil {
30574		c.header_ = make(http.Header)
30575	}
30576	return c.header_
30577}
30578
30579func (c *EventTagsGetCall) doRequest(alt string) (*http.Response, error) {
30580	reqHeaders := make(http.Header)
30581	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
30582	for k, v := range c.header_ {
30583		reqHeaders[k] = v
30584	}
30585	reqHeaders.Set("User-Agent", c.s.userAgent())
30586	if c.ifNoneMatch_ != "" {
30587		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30588	}
30589	var body io.Reader = nil
30590	c.urlParams_.Set("alt", alt)
30591	c.urlParams_.Set("prettyPrint", "false")
30592	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
30593	urls += "?" + c.urlParams_.Encode()
30594	req, err := http.NewRequest("GET", urls, body)
30595	if err != nil {
30596		return nil, err
30597	}
30598	req.Header = reqHeaders
30599	googleapi.Expand(req.URL, map[string]string{
30600		"profileId": strconv.FormatInt(c.profileId, 10),
30601		"id":        strconv.FormatInt(c.id, 10),
30602	})
30603	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30604}
30605
30606// Do executes the "dfareporting.eventTags.get" call.
30607// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
30608// code is an error. Response headers are in either
30609// *EventTag.ServerResponse.Header or (if a response was returned at
30610// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30611// to check whether the returned error was because
30612// http.StatusNotModified was returned.
30613func (c *EventTagsGetCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30614	gensupport.SetOptions(c.urlParams_, opts...)
30615	res, err := c.doRequest("json")
30616	if res != nil && res.StatusCode == http.StatusNotModified {
30617		if res.Body != nil {
30618			res.Body.Close()
30619		}
30620		return nil, &googleapi.Error{
30621			Code:   res.StatusCode,
30622			Header: res.Header,
30623		}
30624	}
30625	if err != nil {
30626		return nil, err
30627	}
30628	defer googleapi.CloseBody(res)
30629	if err := googleapi.CheckResponse(res); err != nil {
30630		return nil, err
30631	}
30632	ret := &EventTag{
30633		ServerResponse: googleapi.ServerResponse{
30634			Header:         res.Header,
30635			HTTPStatusCode: res.StatusCode,
30636		},
30637	}
30638	target := &ret
30639	if err := gensupport.DecodeResponse(target, res); err != nil {
30640		return nil, err
30641	}
30642	return ret, nil
30643	// {
30644	//   "description": "Gets one event tag by ID.",
30645	//   "httpMethod": "GET",
30646	//   "id": "dfareporting.eventTags.get",
30647	//   "parameterOrder": [
30648	//     "profileId",
30649	//     "id"
30650	//   ],
30651	//   "parameters": {
30652	//     "id": {
30653	//       "description": "Event tag ID.",
30654	//       "format": "int64",
30655	//       "location": "path",
30656	//       "required": true,
30657	//       "type": "string"
30658	//     },
30659	//     "profileId": {
30660	//       "description": "User profile ID associated with this request.",
30661	//       "format": "int64",
30662	//       "location": "path",
30663	//       "required": true,
30664	//       "type": "string"
30665	//     }
30666	//   },
30667	//   "path": "userprofiles/{profileId}/eventTags/{id}",
30668	//   "response": {
30669	//     "$ref": "EventTag"
30670	//   },
30671	//   "scopes": [
30672	//     "https://www.googleapis.com/auth/dfatrafficking"
30673	//   ]
30674	// }
30675
30676}
30677
30678// method id "dfareporting.eventTags.insert":
30679
30680type EventTagsInsertCall struct {
30681	s          *Service
30682	profileId  int64
30683	eventtag   *EventTag
30684	urlParams_ gensupport.URLParams
30685	ctx_       context.Context
30686	header_    http.Header
30687}
30688
30689// Insert: Inserts a new event tag.
30690func (r *EventTagsService) Insert(profileId int64, eventtag *EventTag) *EventTagsInsertCall {
30691	c := &EventTagsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30692	c.profileId = profileId
30693	c.eventtag = eventtag
30694	return c
30695}
30696
30697// Fields allows partial responses to be retrieved. See
30698// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30699// for more information.
30700func (c *EventTagsInsertCall) Fields(s ...googleapi.Field) *EventTagsInsertCall {
30701	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30702	return c
30703}
30704
30705// Context sets the context to be used in this call's Do method. Any
30706// pending HTTP request will be aborted if the provided context is
30707// canceled.
30708func (c *EventTagsInsertCall) Context(ctx context.Context) *EventTagsInsertCall {
30709	c.ctx_ = ctx
30710	return c
30711}
30712
30713// Header returns an http.Header that can be modified by the caller to
30714// add HTTP headers to the request.
30715func (c *EventTagsInsertCall) Header() http.Header {
30716	if c.header_ == nil {
30717		c.header_ = make(http.Header)
30718	}
30719	return c.header_
30720}
30721
30722func (c *EventTagsInsertCall) doRequest(alt string) (*http.Response, error) {
30723	reqHeaders := make(http.Header)
30724	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
30725	for k, v := range c.header_ {
30726		reqHeaders[k] = v
30727	}
30728	reqHeaders.Set("User-Agent", c.s.userAgent())
30729	var body io.Reader = nil
30730	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
30731	if err != nil {
30732		return nil, err
30733	}
30734	reqHeaders.Set("Content-Type", "application/json")
30735	c.urlParams_.Set("alt", alt)
30736	c.urlParams_.Set("prettyPrint", "false")
30737	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
30738	urls += "?" + c.urlParams_.Encode()
30739	req, err := http.NewRequest("POST", urls, body)
30740	if err != nil {
30741		return nil, err
30742	}
30743	req.Header = reqHeaders
30744	googleapi.Expand(req.URL, map[string]string{
30745		"profileId": strconv.FormatInt(c.profileId, 10),
30746	})
30747	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30748}
30749
30750// Do executes the "dfareporting.eventTags.insert" call.
30751// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
30752// code is an error. Response headers are in either
30753// *EventTag.ServerResponse.Header or (if a response was returned at
30754// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30755// to check whether the returned error was because
30756// http.StatusNotModified was returned.
30757func (c *EventTagsInsertCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30758	gensupport.SetOptions(c.urlParams_, opts...)
30759	res, err := c.doRequest("json")
30760	if res != nil && res.StatusCode == http.StatusNotModified {
30761		if res.Body != nil {
30762			res.Body.Close()
30763		}
30764		return nil, &googleapi.Error{
30765			Code:   res.StatusCode,
30766			Header: res.Header,
30767		}
30768	}
30769	if err != nil {
30770		return nil, err
30771	}
30772	defer googleapi.CloseBody(res)
30773	if err := googleapi.CheckResponse(res); err != nil {
30774		return nil, err
30775	}
30776	ret := &EventTag{
30777		ServerResponse: googleapi.ServerResponse{
30778			Header:         res.Header,
30779			HTTPStatusCode: res.StatusCode,
30780		},
30781	}
30782	target := &ret
30783	if err := gensupport.DecodeResponse(target, res); err != nil {
30784		return nil, err
30785	}
30786	return ret, nil
30787	// {
30788	//   "description": "Inserts a new event tag.",
30789	//   "httpMethod": "POST",
30790	//   "id": "dfareporting.eventTags.insert",
30791	//   "parameterOrder": [
30792	//     "profileId"
30793	//   ],
30794	//   "parameters": {
30795	//     "profileId": {
30796	//       "description": "User profile ID associated with this request.",
30797	//       "format": "int64",
30798	//       "location": "path",
30799	//       "required": true,
30800	//       "type": "string"
30801	//     }
30802	//   },
30803	//   "path": "userprofiles/{profileId}/eventTags",
30804	//   "request": {
30805	//     "$ref": "EventTag"
30806	//   },
30807	//   "response": {
30808	//     "$ref": "EventTag"
30809	//   },
30810	//   "scopes": [
30811	//     "https://www.googleapis.com/auth/dfatrafficking"
30812	//   ]
30813	// }
30814
30815}
30816
30817// method id "dfareporting.eventTags.list":
30818
30819type EventTagsListCall struct {
30820	s            *Service
30821	profileId    int64
30822	urlParams_   gensupport.URLParams
30823	ifNoneMatch_ string
30824	ctx_         context.Context
30825	header_      http.Header
30826}
30827
30828// List: Retrieves a list of event tags, possibly filtered.
30829func (r *EventTagsService) List(profileId int64) *EventTagsListCall {
30830	c := &EventTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30831	c.profileId = profileId
30832	return c
30833}
30834
30835// AdId sets the optional parameter "adId": Select only event tags that
30836// belong to this ad.
30837func (c *EventTagsListCall) AdId(adId int64) *EventTagsListCall {
30838	c.urlParams_.Set("adId", fmt.Sprint(adId))
30839	return c
30840}
30841
30842// AdvertiserId sets the optional parameter "advertiserId": Select only
30843// event tags that belong to this advertiser.
30844func (c *EventTagsListCall) AdvertiserId(advertiserId int64) *EventTagsListCall {
30845	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30846	return c
30847}
30848
30849// CampaignId sets the optional parameter "campaignId": Select only
30850// event tags that belong to this campaign.
30851func (c *EventTagsListCall) CampaignId(campaignId int64) *EventTagsListCall {
30852	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
30853	return c
30854}
30855
30856// DefinitionsOnly sets the optional parameter "definitionsOnly":
30857// Examine only the specified campaign or advertiser's event tags for
30858// matching selector criteria. When set to false, the parent advertiser
30859// and parent campaign of the specified ad or campaign is examined as
30860// well. In addition, when set to false, the status field is examined as
30861// well, along with the enabledByDefault field. This parameter can not
30862// be set to true when adId is specified as ads do not define their own
30863// even tags.
30864func (c *EventTagsListCall) DefinitionsOnly(definitionsOnly bool) *EventTagsListCall {
30865	c.urlParams_.Set("definitionsOnly", fmt.Sprint(definitionsOnly))
30866	return c
30867}
30868
30869// Enabled sets the optional parameter "enabled": Select only enabled
30870// event tags. What is considered enabled or disabled depends on the
30871// definitionsOnly parameter. When definitionsOnly is set to true, only
30872// the specified advertiser or campaign's event tags' enabledByDefault
30873// field is examined. When definitionsOnly is set to false, the
30874// specified ad or specified campaign's parent advertiser's or parent
30875// campaign's event tags' enabledByDefault and status fields are
30876// examined as well.
30877func (c *EventTagsListCall) Enabled(enabled bool) *EventTagsListCall {
30878	c.urlParams_.Set("enabled", fmt.Sprint(enabled))
30879	return c
30880}
30881
30882// EventTagTypes sets the optional parameter "eventTagTypes": Select
30883// only event tags with the specified event tag types. Event tag types
30884// can be used to specify whether to use a third-party pixel, a
30885// third-party JavaScript URL, or a third-party click-through URL for
30886// either impression or click tracking.
30887//
30888// Possible values:
30889//   "CLICK_THROUGH_EVENT_TAG"
30890//   "IMPRESSION_IMAGE_EVENT_TAG"
30891//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
30892func (c *EventTagsListCall) EventTagTypes(eventTagTypes ...string) *EventTagsListCall {
30893	c.urlParams_.SetMulti("eventTagTypes", append([]string{}, eventTagTypes...))
30894	return c
30895}
30896
30897// Ids sets the optional parameter "ids": Select only event tags with
30898// these IDs.
30899func (c *EventTagsListCall) Ids(ids ...int64) *EventTagsListCall {
30900	var ids_ []string
30901	for _, v := range ids {
30902		ids_ = append(ids_, fmt.Sprint(v))
30903	}
30904	c.urlParams_.SetMulti("ids", ids_)
30905	return c
30906}
30907
30908// SearchString sets the optional parameter "searchString": Allows
30909// searching for objects by name or ID. Wildcards (*) are allowed. For
30910// example, "eventtag*2015" will return objects with names like
30911// "eventtag June 2015", "eventtag April 2015", or simply "eventtag
30912// 2015". Most of the searches also add wildcards implicitly at the
30913// start and the end of the search string. For example, a search string
30914// of "eventtag" will match objects with name "my eventtag", "eventtag
30915// 2015", or simply "eventtag".
30916func (c *EventTagsListCall) SearchString(searchString string) *EventTagsListCall {
30917	c.urlParams_.Set("searchString", searchString)
30918	return c
30919}
30920
30921// SortField sets the optional parameter "sortField": Field by which to
30922// sort the list.
30923//
30924// Possible values:
30925//   "ID" (default)
30926//   "NAME"
30927func (c *EventTagsListCall) SortField(sortField string) *EventTagsListCall {
30928	c.urlParams_.Set("sortField", sortField)
30929	return c
30930}
30931
30932// SortOrder sets the optional parameter "sortOrder": Order of sorted
30933// results.
30934//
30935// Possible values:
30936//   "ASCENDING" (default)
30937//   "DESCENDING"
30938func (c *EventTagsListCall) SortOrder(sortOrder string) *EventTagsListCall {
30939	c.urlParams_.Set("sortOrder", sortOrder)
30940	return c
30941}
30942
30943// Fields allows partial responses to be retrieved. See
30944// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30945// for more information.
30946func (c *EventTagsListCall) Fields(s ...googleapi.Field) *EventTagsListCall {
30947	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30948	return c
30949}
30950
30951// IfNoneMatch sets the optional parameter which makes the operation
30952// fail if the object's ETag matches the given value. This is useful for
30953// getting updates only after the object has changed since the last
30954// request. Use googleapi.IsNotModified to check whether the response
30955// error from Do is the result of In-None-Match.
30956func (c *EventTagsListCall) IfNoneMatch(entityTag string) *EventTagsListCall {
30957	c.ifNoneMatch_ = entityTag
30958	return c
30959}
30960
30961// Context sets the context to be used in this call's Do method. Any
30962// pending HTTP request will be aborted if the provided context is
30963// canceled.
30964func (c *EventTagsListCall) Context(ctx context.Context) *EventTagsListCall {
30965	c.ctx_ = ctx
30966	return c
30967}
30968
30969// Header returns an http.Header that can be modified by the caller to
30970// add HTTP headers to the request.
30971func (c *EventTagsListCall) Header() http.Header {
30972	if c.header_ == nil {
30973		c.header_ = make(http.Header)
30974	}
30975	return c.header_
30976}
30977
30978func (c *EventTagsListCall) doRequest(alt string) (*http.Response, error) {
30979	reqHeaders := make(http.Header)
30980	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
30981	for k, v := range c.header_ {
30982		reqHeaders[k] = v
30983	}
30984	reqHeaders.Set("User-Agent", c.s.userAgent())
30985	if c.ifNoneMatch_ != "" {
30986		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30987	}
30988	var body io.Reader = nil
30989	c.urlParams_.Set("alt", alt)
30990	c.urlParams_.Set("prettyPrint", "false")
30991	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
30992	urls += "?" + c.urlParams_.Encode()
30993	req, err := http.NewRequest("GET", urls, body)
30994	if err != nil {
30995		return nil, err
30996	}
30997	req.Header = reqHeaders
30998	googleapi.Expand(req.URL, map[string]string{
30999		"profileId": strconv.FormatInt(c.profileId, 10),
31000	})
31001	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31002}
31003
31004// Do executes the "dfareporting.eventTags.list" call.
31005// Exactly one of *EventTagsListResponse or error will be non-nil. Any
31006// non-2xx status code is an error. Response headers are in either
31007// *EventTagsListResponse.ServerResponse.Header or (if a response was
31008// returned at all) in error.(*googleapi.Error).Header. Use
31009// googleapi.IsNotModified to check whether the returned error was
31010// because http.StatusNotModified was returned.
31011func (c *EventTagsListCall) Do(opts ...googleapi.CallOption) (*EventTagsListResponse, error) {
31012	gensupport.SetOptions(c.urlParams_, opts...)
31013	res, err := c.doRequest("json")
31014	if res != nil && res.StatusCode == http.StatusNotModified {
31015		if res.Body != nil {
31016			res.Body.Close()
31017		}
31018		return nil, &googleapi.Error{
31019			Code:   res.StatusCode,
31020			Header: res.Header,
31021		}
31022	}
31023	if err != nil {
31024		return nil, err
31025	}
31026	defer googleapi.CloseBody(res)
31027	if err := googleapi.CheckResponse(res); err != nil {
31028		return nil, err
31029	}
31030	ret := &EventTagsListResponse{
31031		ServerResponse: googleapi.ServerResponse{
31032			Header:         res.Header,
31033			HTTPStatusCode: res.StatusCode,
31034		},
31035	}
31036	target := &ret
31037	if err := gensupport.DecodeResponse(target, res); err != nil {
31038		return nil, err
31039	}
31040	return ret, nil
31041	// {
31042	//   "description": "Retrieves a list of event tags, possibly filtered.",
31043	//   "httpMethod": "GET",
31044	//   "id": "dfareporting.eventTags.list",
31045	//   "parameterOrder": [
31046	//     "profileId"
31047	//   ],
31048	//   "parameters": {
31049	//     "adId": {
31050	//       "description": "Select only event tags that belong to this ad.",
31051	//       "format": "int64",
31052	//       "location": "query",
31053	//       "type": "string"
31054	//     },
31055	//     "advertiserId": {
31056	//       "description": "Select only event tags that belong to this advertiser.",
31057	//       "format": "int64",
31058	//       "location": "query",
31059	//       "type": "string"
31060	//     },
31061	//     "campaignId": {
31062	//       "description": "Select only event tags that belong to this campaign.",
31063	//       "format": "int64",
31064	//       "location": "query",
31065	//       "type": "string"
31066	//     },
31067	//     "definitionsOnly": {
31068	//       "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.",
31069	//       "location": "query",
31070	//       "type": "boolean"
31071	//     },
31072	//     "enabled": {
31073	//       "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.",
31074	//       "location": "query",
31075	//       "type": "boolean"
31076	//     },
31077	//     "eventTagTypes": {
31078	//       "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.",
31079	//       "enum": [
31080	//         "CLICK_THROUGH_EVENT_TAG",
31081	//         "IMPRESSION_IMAGE_EVENT_TAG",
31082	//         "IMPRESSION_JAVASCRIPT_EVENT_TAG"
31083	//       ],
31084	//       "enumDescriptions": [
31085	//         "",
31086	//         "",
31087	//         ""
31088	//       ],
31089	//       "location": "query",
31090	//       "repeated": true,
31091	//       "type": "string"
31092	//     },
31093	//     "ids": {
31094	//       "description": "Select only event tags with these IDs.",
31095	//       "format": "int64",
31096	//       "location": "query",
31097	//       "repeated": true,
31098	//       "type": "string"
31099	//     },
31100	//     "profileId": {
31101	//       "description": "User profile ID associated with this request.",
31102	//       "format": "int64",
31103	//       "location": "path",
31104	//       "required": true,
31105	//       "type": "string"
31106	//     },
31107	//     "searchString": {
31108	//       "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\".",
31109	//       "location": "query",
31110	//       "type": "string"
31111	//     },
31112	//     "sortField": {
31113	//       "default": "ID",
31114	//       "description": "Field by which to sort the list.",
31115	//       "enum": [
31116	//         "ID",
31117	//         "NAME"
31118	//       ],
31119	//       "enumDescriptions": [
31120	//         "",
31121	//         ""
31122	//       ],
31123	//       "location": "query",
31124	//       "type": "string"
31125	//     },
31126	//     "sortOrder": {
31127	//       "default": "ASCENDING",
31128	//       "description": "Order of sorted results.",
31129	//       "enum": [
31130	//         "ASCENDING",
31131	//         "DESCENDING"
31132	//       ],
31133	//       "enumDescriptions": [
31134	//         "",
31135	//         ""
31136	//       ],
31137	//       "location": "query",
31138	//       "type": "string"
31139	//     }
31140	//   },
31141	//   "path": "userprofiles/{profileId}/eventTags",
31142	//   "response": {
31143	//     "$ref": "EventTagsListResponse"
31144	//   },
31145	//   "scopes": [
31146	//     "https://www.googleapis.com/auth/dfatrafficking"
31147	//   ]
31148	// }
31149
31150}
31151
31152// method id "dfareporting.eventTags.patch":
31153
31154type EventTagsPatchCall struct {
31155	s          *Service
31156	profileId  int64
31157	eventtag   *EventTag
31158	urlParams_ gensupport.URLParams
31159	ctx_       context.Context
31160	header_    http.Header
31161}
31162
31163// Patch: Updates an existing event tag. This method supports patch
31164// semantics.
31165func (r *EventTagsService) Patch(profileId int64, id int64, eventtag *EventTag) *EventTagsPatchCall {
31166	c := &EventTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31167	c.profileId = profileId
31168	c.urlParams_.Set("id", fmt.Sprint(id))
31169	c.eventtag = eventtag
31170	return c
31171}
31172
31173// Fields allows partial responses to be retrieved. See
31174// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31175// for more information.
31176func (c *EventTagsPatchCall) Fields(s ...googleapi.Field) *EventTagsPatchCall {
31177	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31178	return c
31179}
31180
31181// Context sets the context to be used in this call's Do method. Any
31182// pending HTTP request will be aborted if the provided context is
31183// canceled.
31184func (c *EventTagsPatchCall) Context(ctx context.Context) *EventTagsPatchCall {
31185	c.ctx_ = ctx
31186	return c
31187}
31188
31189// Header returns an http.Header that can be modified by the caller to
31190// add HTTP headers to the request.
31191func (c *EventTagsPatchCall) Header() http.Header {
31192	if c.header_ == nil {
31193		c.header_ = make(http.Header)
31194	}
31195	return c.header_
31196}
31197
31198func (c *EventTagsPatchCall) doRequest(alt string) (*http.Response, error) {
31199	reqHeaders := make(http.Header)
31200	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
31201	for k, v := range c.header_ {
31202		reqHeaders[k] = v
31203	}
31204	reqHeaders.Set("User-Agent", c.s.userAgent())
31205	var body io.Reader = nil
31206	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
31207	if err != nil {
31208		return nil, err
31209	}
31210	reqHeaders.Set("Content-Type", "application/json")
31211	c.urlParams_.Set("alt", alt)
31212	c.urlParams_.Set("prettyPrint", "false")
31213	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31214	urls += "?" + c.urlParams_.Encode()
31215	req, err := http.NewRequest("PATCH", urls, body)
31216	if err != nil {
31217		return nil, err
31218	}
31219	req.Header = reqHeaders
31220	googleapi.Expand(req.URL, map[string]string{
31221		"profileId": strconv.FormatInt(c.profileId, 10),
31222	})
31223	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31224}
31225
31226// Do executes the "dfareporting.eventTags.patch" call.
31227// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
31228// code is an error. Response headers are in either
31229// *EventTag.ServerResponse.Header or (if a response was returned at
31230// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31231// to check whether the returned error was because
31232// http.StatusNotModified was returned.
31233func (c *EventTagsPatchCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31234	gensupport.SetOptions(c.urlParams_, opts...)
31235	res, err := c.doRequest("json")
31236	if res != nil && res.StatusCode == http.StatusNotModified {
31237		if res.Body != nil {
31238			res.Body.Close()
31239		}
31240		return nil, &googleapi.Error{
31241			Code:   res.StatusCode,
31242			Header: res.Header,
31243		}
31244	}
31245	if err != nil {
31246		return nil, err
31247	}
31248	defer googleapi.CloseBody(res)
31249	if err := googleapi.CheckResponse(res); err != nil {
31250		return nil, err
31251	}
31252	ret := &EventTag{
31253		ServerResponse: googleapi.ServerResponse{
31254			Header:         res.Header,
31255			HTTPStatusCode: res.StatusCode,
31256		},
31257	}
31258	target := &ret
31259	if err := gensupport.DecodeResponse(target, res); err != nil {
31260		return nil, err
31261	}
31262	return ret, nil
31263	// {
31264	//   "description": "Updates an existing event tag. This method supports patch semantics.",
31265	//   "httpMethod": "PATCH",
31266	//   "id": "dfareporting.eventTags.patch",
31267	//   "parameterOrder": [
31268	//     "profileId",
31269	//     "id"
31270	//   ],
31271	//   "parameters": {
31272	//     "id": {
31273	//       "description": "Event tag ID.",
31274	//       "format": "int64",
31275	//       "location": "query",
31276	//       "required": true,
31277	//       "type": "string"
31278	//     },
31279	//     "profileId": {
31280	//       "description": "User profile ID associated with this request.",
31281	//       "format": "int64",
31282	//       "location": "path",
31283	//       "required": true,
31284	//       "type": "string"
31285	//     }
31286	//   },
31287	//   "path": "userprofiles/{profileId}/eventTags",
31288	//   "request": {
31289	//     "$ref": "EventTag"
31290	//   },
31291	//   "response": {
31292	//     "$ref": "EventTag"
31293	//   },
31294	//   "scopes": [
31295	//     "https://www.googleapis.com/auth/dfatrafficking"
31296	//   ]
31297	// }
31298
31299}
31300
31301// method id "dfareporting.eventTags.update":
31302
31303type EventTagsUpdateCall struct {
31304	s          *Service
31305	profileId  int64
31306	eventtag   *EventTag
31307	urlParams_ gensupport.URLParams
31308	ctx_       context.Context
31309	header_    http.Header
31310}
31311
31312// Update: Updates an existing event tag.
31313func (r *EventTagsService) Update(profileId int64, eventtag *EventTag) *EventTagsUpdateCall {
31314	c := &EventTagsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31315	c.profileId = profileId
31316	c.eventtag = eventtag
31317	return c
31318}
31319
31320// Fields allows partial responses to be retrieved. See
31321// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31322// for more information.
31323func (c *EventTagsUpdateCall) Fields(s ...googleapi.Field) *EventTagsUpdateCall {
31324	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31325	return c
31326}
31327
31328// Context sets the context to be used in this call's Do method. Any
31329// pending HTTP request will be aborted if the provided context is
31330// canceled.
31331func (c *EventTagsUpdateCall) Context(ctx context.Context) *EventTagsUpdateCall {
31332	c.ctx_ = ctx
31333	return c
31334}
31335
31336// Header returns an http.Header that can be modified by the caller to
31337// add HTTP headers to the request.
31338func (c *EventTagsUpdateCall) Header() http.Header {
31339	if c.header_ == nil {
31340		c.header_ = make(http.Header)
31341	}
31342	return c.header_
31343}
31344
31345func (c *EventTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
31346	reqHeaders := make(http.Header)
31347	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
31348	for k, v := range c.header_ {
31349		reqHeaders[k] = v
31350	}
31351	reqHeaders.Set("User-Agent", c.s.userAgent())
31352	var body io.Reader = nil
31353	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
31354	if err != nil {
31355		return nil, err
31356	}
31357	reqHeaders.Set("Content-Type", "application/json")
31358	c.urlParams_.Set("alt", alt)
31359	c.urlParams_.Set("prettyPrint", "false")
31360	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31361	urls += "?" + c.urlParams_.Encode()
31362	req, err := http.NewRequest("PUT", urls, body)
31363	if err != nil {
31364		return nil, err
31365	}
31366	req.Header = reqHeaders
31367	googleapi.Expand(req.URL, map[string]string{
31368		"profileId": strconv.FormatInt(c.profileId, 10),
31369	})
31370	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31371}
31372
31373// Do executes the "dfareporting.eventTags.update" call.
31374// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
31375// code is an error. Response headers are in either
31376// *EventTag.ServerResponse.Header or (if a response was returned at
31377// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31378// to check whether the returned error was because
31379// http.StatusNotModified was returned.
31380func (c *EventTagsUpdateCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31381	gensupport.SetOptions(c.urlParams_, opts...)
31382	res, err := c.doRequest("json")
31383	if res != nil && res.StatusCode == http.StatusNotModified {
31384		if res.Body != nil {
31385			res.Body.Close()
31386		}
31387		return nil, &googleapi.Error{
31388			Code:   res.StatusCode,
31389			Header: res.Header,
31390		}
31391	}
31392	if err != nil {
31393		return nil, err
31394	}
31395	defer googleapi.CloseBody(res)
31396	if err := googleapi.CheckResponse(res); err != nil {
31397		return nil, err
31398	}
31399	ret := &EventTag{
31400		ServerResponse: googleapi.ServerResponse{
31401			Header:         res.Header,
31402			HTTPStatusCode: res.StatusCode,
31403		},
31404	}
31405	target := &ret
31406	if err := gensupport.DecodeResponse(target, res); err != nil {
31407		return nil, err
31408	}
31409	return ret, nil
31410	// {
31411	//   "description": "Updates an existing event tag.",
31412	//   "httpMethod": "PUT",
31413	//   "id": "dfareporting.eventTags.update",
31414	//   "parameterOrder": [
31415	//     "profileId"
31416	//   ],
31417	//   "parameters": {
31418	//     "profileId": {
31419	//       "description": "User profile ID associated with this request.",
31420	//       "format": "int64",
31421	//       "location": "path",
31422	//       "required": true,
31423	//       "type": "string"
31424	//     }
31425	//   },
31426	//   "path": "userprofiles/{profileId}/eventTags",
31427	//   "request": {
31428	//     "$ref": "EventTag"
31429	//   },
31430	//   "response": {
31431	//     "$ref": "EventTag"
31432	//   },
31433	//   "scopes": [
31434	//     "https://www.googleapis.com/auth/dfatrafficking"
31435	//   ]
31436	// }
31437
31438}
31439
31440// method id "dfareporting.files.get":
31441
31442type FilesGetCall struct {
31443	s            *Service
31444	reportId     int64
31445	fileId       int64
31446	urlParams_   gensupport.URLParams
31447	ifNoneMatch_ string
31448	ctx_         context.Context
31449	header_      http.Header
31450}
31451
31452// Get: Retrieves a report file by its report ID and file ID. This
31453// method supports media download.
31454func (r *FilesService) Get(reportId int64, fileId int64) *FilesGetCall {
31455	c := &FilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31456	c.reportId = reportId
31457	c.fileId = fileId
31458	return c
31459}
31460
31461// Fields allows partial responses to be retrieved. See
31462// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31463// for more information.
31464func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall {
31465	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31466	return c
31467}
31468
31469// IfNoneMatch sets the optional parameter which makes the operation
31470// fail if the object's ETag matches the given value. This is useful for
31471// getting updates only after the object has changed since the last
31472// request. Use googleapi.IsNotModified to check whether the response
31473// error from Do is the result of In-None-Match.
31474func (c *FilesGetCall) IfNoneMatch(entityTag string) *FilesGetCall {
31475	c.ifNoneMatch_ = entityTag
31476	return c
31477}
31478
31479// Context sets the context to be used in this call's Do and Download
31480// methods. Any pending HTTP request will be aborted if the provided
31481// context is canceled.
31482func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
31483	c.ctx_ = ctx
31484	return c
31485}
31486
31487// Header returns an http.Header that can be modified by the caller to
31488// add HTTP headers to the request.
31489func (c *FilesGetCall) Header() http.Header {
31490	if c.header_ == nil {
31491		c.header_ = make(http.Header)
31492	}
31493	return c.header_
31494}
31495
31496func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
31497	reqHeaders := make(http.Header)
31498	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
31499	for k, v := range c.header_ {
31500		reqHeaders[k] = v
31501	}
31502	reqHeaders.Set("User-Agent", c.s.userAgent())
31503	if c.ifNoneMatch_ != "" {
31504		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31505	}
31506	var body io.Reader = nil
31507	c.urlParams_.Set("alt", alt)
31508	c.urlParams_.Set("prettyPrint", "false")
31509	urls := googleapi.ResolveRelative(c.s.BasePath, "reports/{reportId}/files/{fileId}")
31510	urls += "?" + c.urlParams_.Encode()
31511	req, err := http.NewRequest("GET", urls, body)
31512	if err != nil {
31513		return nil, err
31514	}
31515	req.Header = reqHeaders
31516	googleapi.Expand(req.URL, map[string]string{
31517		"reportId": strconv.FormatInt(c.reportId, 10),
31518		"fileId":   strconv.FormatInt(c.fileId, 10),
31519	})
31520	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31521}
31522
31523// Download fetches the API endpoint's "media" value, instead of the normal
31524// API response value. If the returned error is nil, the Response is guaranteed to
31525// have a 2xx status code. Callers must close the Response.Body as usual.
31526func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
31527	gensupport.SetOptions(c.urlParams_, opts...)
31528	res, err := c.doRequest("media")
31529	if err != nil {
31530		return nil, err
31531	}
31532	if err := googleapi.CheckMediaResponse(res); err != nil {
31533		res.Body.Close()
31534		return nil, err
31535	}
31536	return res, nil
31537}
31538
31539// Do executes the "dfareporting.files.get" call.
31540// Exactly one of *File or error will be non-nil. Any non-2xx status
31541// code is an error. Response headers are in either
31542// *File.ServerResponse.Header or (if a response was returned at all) in
31543// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
31544// whether the returned error was because http.StatusNotModified was
31545// returned.
31546func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
31547	gensupport.SetOptions(c.urlParams_, opts...)
31548	res, err := c.doRequest("json")
31549	if res != nil && res.StatusCode == http.StatusNotModified {
31550		if res.Body != nil {
31551			res.Body.Close()
31552		}
31553		return nil, &googleapi.Error{
31554			Code:   res.StatusCode,
31555			Header: res.Header,
31556		}
31557	}
31558	if err != nil {
31559		return nil, err
31560	}
31561	defer googleapi.CloseBody(res)
31562	if err := googleapi.CheckResponse(res); err != nil {
31563		return nil, err
31564	}
31565	ret := &File{
31566		ServerResponse: googleapi.ServerResponse{
31567			Header:         res.Header,
31568			HTTPStatusCode: res.StatusCode,
31569		},
31570	}
31571	target := &ret
31572	if err := gensupport.DecodeResponse(target, res); err != nil {
31573		return nil, err
31574	}
31575	return ret, nil
31576	// {
31577	//   "description": "Retrieves a report file by its report ID and file ID. This method supports media download.",
31578	//   "httpMethod": "GET",
31579	//   "id": "dfareporting.files.get",
31580	//   "parameterOrder": [
31581	//     "reportId",
31582	//     "fileId"
31583	//   ],
31584	//   "parameters": {
31585	//     "fileId": {
31586	//       "description": "The ID of the report file.",
31587	//       "format": "int64",
31588	//       "location": "path",
31589	//       "required": true,
31590	//       "type": "string"
31591	//     },
31592	//     "reportId": {
31593	//       "description": "The ID of the report.",
31594	//       "format": "int64",
31595	//       "location": "path",
31596	//       "required": true,
31597	//       "type": "string"
31598	//     }
31599	//   },
31600	//   "path": "reports/{reportId}/files/{fileId}",
31601	//   "response": {
31602	//     "$ref": "File"
31603	//   },
31604	//   "scopes": [
31605	//     "https://www.googleapis.com/auth/dfareporting"
31606	//   ],
31607	//   "supportsMediaDownload": true
31608	// }
31609
31610}
31611
31612// method id "dfareporting.files.list":
31613
31614type FilesListCall struct {
31615	s            *Service
31616	profileId    int64
31617	urlParams_   gensupport.URLParams
31618	ifNoneMatch_ string
31619	ctx_         context.Context
31620	header_      http.Header
31621}
31622
31623// List: Lists files for a user profile.
31624func (r *FilesService) List(profileId int64) *FilesListCall {
31625	c := &FilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31626	c.profileId = profileId
31627	return c
31628}
31629
31630// MaxResults sets the optional parameter "maxResults": Maximum number
31631// of results to return.
31632func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall {
31633	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31634	return c
31635}
31636
31637// PageToken sets the optional parameter "pageToken": The value of the
31638// nextToken from the previous result page.
31639func (c *FilesListCall) PageToken(pageToken string) *FilesListCall {
31640	c.urlParams_.Set("pageToken", pageToken)
31641	return c
31642}
31643
31644// Scope sets the optional parameter "scope": The scope that defines
31645// which results are returned.
31646//
31647// Possible values:
31648//   "ALL" - All files in account.
31649//   "MINE" (default) - My files.
31650//   "SHARED_WITH_ME" - Files shared with me.
31651func (c *FilesListCall) Scope(scope string) *FilesListCall {
31652	c.urlParams_.Set("scope", scope)
31653	return c
31654}
31655
31656// SortField sets the optional parameter "sortField": The field by which
31657// to sort the list.
31658//
31659// Possible values:
31660//   "ID" - Sort by file ID.
31661//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
31662func (c *FilesListCall) SortField(sortField string) *FilesListCall {
31663	c.urlParams_.Set("sortField", sortField)
31664	return c
31665}
31666
31667// SortOrder sets the optional parameter "sortOrder": Order of sorted
31668// results.
31669//
31670// Possible values:
31671//   "ASCENDING" - Ascending order.
31672//   "DESCENDING" (default) - Descending order.
31673func (c *FilesListCall) SortOrder(sortOrder string) *FilesListCall {
31674	c.urlParams_.Set("sortOrder", sortOrder)
31675	return c
31676}
31677
31678// Fields allows partial responses to be retrieved. See
31679// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31680// for more information.
31681func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall {
31682	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31683	return c
31684}
31685
31686// IfNoneMatch sets the optional parameter which makes the operation
31687// fail if the object's ETag matches the given value. This is useful for
31688// getting updates only after the object has changed since the last
31689// request. Use googleapi.IsNotModified to check whether the response
31690// error from Do is the result of In-None-Match.
31691func (c *FilesListCall) IfNoneMatch(entityTag string) *FilesListCall {
31692	c.ifNoneMatch_ = entityTag
31693	return c
31694}
31695
31696// Context sets the context to be used in this call's Do method. Any
31697// pending HTTP request will be aborted if the provided context is
31698// canceled.
31699func (c *FilesListCall) Context(ctx context.Context) *FilesListCall {
31700	c.ctx_ = ctx
31701	return c
31702}
31703
31704// Header returns an http.Header that can be modified by the caller to
31705// add HTTP headers to the request.
31706func (c *FilesListCall) Header() http.Header {
31707	if c.header_ == nil {
31708		c.header_ = make(http.Header)
31709	}
31710	return c.header_
31711}
31712
31713func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
31714	reqHeaders := make(http.Header)
31715	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
31716	for k, v := range c.header_ {
31717		reqHeaders[k] = v
31718	}
31719	reqHeaders.Set("User-Agent", c.s.userAgent())
31720	if c.ifNoneMatch_ != "" {
31721		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31722	}
31723	var body io.Reader = nil
31724	c.urlParams_.Set("alt", alt)
31725	c.urlParams_.Set("prettyPrint", "false")
31726	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/files")
31727	urls += "?" + c.urlParams_.Encode()
31728	req, err := http.NewRequest("GET", urls, body)
31729	if err != nil {
31730		return nil, err
31731	}
31732	req.Header = reqHeaders
31733	googleapi.Expand(req.URL, map[string]string{
31734		"profileId": strconv.FormatInt(c.profileId, 10),
31735	})
31736	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31737}
31738
31739// Do executes the "dfareporting.files.list" call.
31740// Exactly one of *FileList or error will be non-nil. Any non-2xx status
31741// code is an error. Response headers are in either
31742// *FileList.ServerResponse.Header or (if a response was returned at
31743// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31744// to check whether the returned error was because
31745// http.StatusNotModified was returned.
31746func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
31747	gensupport.SetOptions(c.urlParams_, opts...)
31748	res, err := c.doRequest("json")
31749	if res != nil && res.StatusCode == http.StatusNotModified {
31750		if res.Body != nil {
31751			res.Body.Close()
31752		}
31753		return nil, &googleapi.Error{
31754			Code:   res.StatusCode,
31755			Header: res.Header,
31756		}
31757	}
31758	if err != nil {
31759		return nil, err
31760	}
31761	defer googleapi.CloseBody(res)
31762	if err := googleapi.CheckResponse(res); err != nil {
31763		return nil, err
31764	}
31765	ret := &FileList{
31766		ServerResponse: googleapi.ServerResponse{
31767			Header:         res.Header,
31768			HTTPStatusCode: res.StatusCode,
31769		},
31770	}
31771	target := &ret
31772	if err := gensupport.DecodeResponse(target, res); err != nil {
31773		return nil, err
31774	}
31775	return ret, nil
31776	// {
31777	//   "description": "Lists files for a user profile.",
31778	//   "httpMethod": "GET",
31779	//   "id": "dfareporting.files.list",
31780	//   "parameterOrder": [
31781	//     "profileId"
31782	//   ],
31783	//   "parameters": {
31784	//     "maxResults": {
31785	//       "default": "10",
31786	//       "description": "Maximum number of results to return.",
31787	//       "format": "int32",
31788	//       "location": "query",
31789	//       "maximum": "10",
31790	//       "minimum": "0",
31791	//       "type": "integer"
31792	//     },
31793	//     "pageToken": {
31794	//       "description": "The value of the nextToken from the previous result page.",
31795	//       "location": "query",
31796	//       "type": "string"
31797	//     },
31798	//     "profileId": {
31799	//       "description": "The DFA profile ID.",
31800	//       "format": "int64",
31801	//       "location": "path",
31802	//       "required": true,
31803	//       "type": "string"
31804	//     },
31805	//     "scope": {
31806	//       "default": "MINE",
31807	//       "description": "The scope that defines which results are returned.",
31808	//       "enum": [
31809	//         "ALL",
31810	//         "MINE",
31811	//         "SHARED_WITH_ME"
31812	//       ],
31813	//       "enumDescriptions": [
31814	//         "All files in account.",
31815	//         "My files.",
31816	//         "Files shared with me."
31817	//       ],
31818	//       "location": "query",
31819	//       "type": "string"
31820	//     },
31821	//     "sortField": {
31822	//       "default": "LAST_MODIFIED_TIME",
31823	//       "description": "The field by which to sort the list.",
31824	//       "enum": [
31825	//         "ID",
31826	//         "LAST_MODIFIED_TIME"
31827	//       ],
31828	//       "enumDescriptions": [
31829	//         "Sort by file ID.",
31830	//         "Sort by 'lastmodifiedAt' field."
31831	//       ],
31832	//       "location": "query",
31833	//       "type": "string"
31834	//     },
31835	//     "sortOrder": {
31836	//       "default": "DESCENDING",
31837	//       "description": "Order of sorted results.",
31838	//       "enum": [
31839	//         "ASCENDING",
31840	//         "DESCENDING"
31841	//       ],
31842	//       "enumDescriptions": [
31843	//         "Ascending order.",
31844	//         "Descending order."
31845	//       ],
31846	//       "location": "query",
31847	//       "type": "string"
31848	//     }
31849	//   },
31850	//   "path": "userprofiles/{profileId}/files",
31851	//   "response": {
31852	//     "$ref": "FileList"
31853	//   },
31854	//   "scopes": [
31855	//     "https://www.googleapis.com/auth/dfareporting"
31856	//   ]
31857	// }
31858
31859}
31860
31861// Pages invokes f for each page of results.
31862// A non-nil error returned from f will halt the iteration.
31863// The provided context supersedes any context provided to the Context method.
31864func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
31865	c.ctx_ = ctx
31866	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
31867	for {
31868		x, err := c.Do()
31869		if err != nil {
31870			return err
31871		}
31872		if err := f(x); err != nil {
31873			return err
31874		}
31875		if x.NextPageToken == "" {
31876			return nil
31877		}
31878		c.PageToken(x.NextPageToken)
31879	}
31880}
31881
31882// method id "dfareporting.floodlightActivities.delete":
31883
31884type FloodlightActivitiesDeleteCall struct {
31885	s          *Service
31886	profileId  int64
31887	id         int64
31888	urlParams_ gensupport.URLParams
31889	ctx_       context.Context
31890	header_    http.Header
31891}
31892
31893// Delete: Deletes an existing floodlight activity.
31894func (r *FloodlightActivitiesService) Delete(profileId int64, id int64) *FloodlightActivitiesDeleteCall {
31895	c := &FloodlightActivitiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31896	c.profileId = profileId
31897	c.id = id
31898	return c
31899}
31900
31901// Fields allows partial responses to be retrieved. See
31902// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31903// for more information.
31904func (c *FloodlightActivitiesDeleteCall) Fields(s ...googleapi.Field) *FloodlightActivitiesDeleteCall {
31905	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31906	return c
31907}
31908
31909// Context sets the context to be used in this call's Do method. Any
31910// pending HTTP request will be aborted if the provided context is
31911// canceled.
31912func (c *FloodlightActivitiesDeleteCall) Context(ctx context.Context) *FloodlightActivitiesDeleteCall {
31913	c.ctx_ = ctx
31914	return c
31915}
31916
31917// Header returns an http.Header that can be modified by the caller to
31918// add HTTP headers to the request.
31919func (c *FloodlightActivitiesDeleteCall) Header() http.Header {
31920	if c.header_ == nil {
31921		c.header_ = make(http.Header)
31922	}
31923	return c.header_
31924}
31925
31926func (c *FloodlightActivitiesDeleteCall) doRequest(alt string) (*http.Response, error) {
31927	reqHeaders := make(http.Header)
31928	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
31929	for k, v := range c.header_ {
31930		reqHeaders[k] = v
31931	}
31932	reqHeaders.Set("User-Agent", c.s.userAgent())
31933	var body io.Reader = nil
31934	c.urlParams_.Set("alt", alt)
31935	c.urlParams_.Set("prettyPrint", "false")
31936	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
31937	urls += "?" + c.urlParams_.Encode()
31938	req, err := http.NewRequest("DELETE", urls, body)
31939	if err != nil {
31940		return nil, err
31941	}
31942	req.Header = reqHeaders
31943	googleapi.Expand(req.URL, map[string]string{
31944		"profileId": strconv.FormatInt(c.profileId, 10),
31945		"id":        strconv.FormatInt(c.id, 10),
31946	})
31947	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31948}
31949
31950// Do executes the "dfareporting.floodlightActivities.delete" call.
31951func (c *FloodlightActivitiesDeleteCall) Do(opts ...googleapi.CallOption) error {
31952	gensupport.SetOptions(c.urlParams_, opts...)
31953	res, err := c.doRequest("json")
31954	if err != nil {
31955		return err
31956	}
31957	defer googleapi.CloseBody(res)
31958	if err := googleapi.CheckResponse(res); err != nil {
31959		return err
31960	}
31961	return nil
31962	// {
31963	//   "description": "Deletes an existing floodlight activity.",
31964	//   "httpMethod": "DELETE",
31965	//   "id": "dfareporting.floodlightActivities.delete",
31966	//   "parameterOrder": [
31967	//     "profileId",
31968	//     "id"
31969	//   ],
31970	//   "parameters": {
31971	//     "id": {
31972	//       "description": "Floodlight activity ID.",
31973	//       "format": "int64",
31974	//       "location": "path",
31975	//       "required": true,
31976	//       "type": "string"
31977	//     },
31978	//     "profileId": {
31979	//       "description": "User profile ID associated with this request.",
31980	//       "format": "int64",
31981	//       "location": "path",
31982	//       "required": true,
31983	//       "type": "string"
31984	//     }
31985	//   },
31986	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
31987	//   "scopes": [
31988	//     "https://www.googleapis.com/auth/dfatrafficking"
31989	//   ]
31990	// }
31991
31992}
31993
31994// method id "dfareporting.floodlightActivities.generatetag":
31995
31996type FloodlightActivitiesGeneratetagCall struct {
31997	s          *Service
31998	profileId  int64
31999	urlParams_ gensupport.URLParams
32000	ctx_       context.Context
32001	header_    http.Header
32002}
32003
32004// Generatetag: Generates a tag for a floodlight activity.
32005func (r *FloodlightActivitiesService) Generatetag(profileId int64) *FloodlightActivitiesGeneratetagCall {
32006	c := &FloodlightActivitiesGeneratetagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32007	c.profileId = profileId
32008	return c
32009}
32010
32011// FloodlightActivityId sets the optional parameter
32012// "floodlightActivityId": Floodlight activity ID for which we want to
32013// generate a tag.
32014func (c *FloodlightActivitiesGeneratetagCall) FloodlightActivityId(floodlightActivityId int64) *FloodlightActivitiesGeneratetagCall {
32015	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
32016	return c
32017}
32018
32019// Fields allows partial responses to be retrieved. See
32020// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32021// for more information.
32022func (c *FloodlightActivitiesGeneratetagCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGeneratetagCall {
32023	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32024	return c
32025}
32026
32027// Context sets the context to be used in this call's Do method. Any
32028// pending HTTP request will be aborted if the provided context is
32029// canceled.
32030func (c *FloodlightActivitiesGeneratetagCall) Context(ctx context.Context) *FloodlightActivitiesGeneratetagCall {
32031	c.ctx_ = ctx
32032	return c
32033}
32034
32035// Header returns an http.Header that can be modified by the caller to
32036// add HTTP headers to the request.
32037func (c *FloodlightActivitiesGeneratetagCall) Header() http.Header {
32038	if c.header_ == nil {
32039		c.header_ = make(http.Header)
32040	}
32041	return c.header_
32042}
32043
32044func (c *FloodlightActivitiesGeneratetagCall) doRequest(alt string) (*http.Response, error) {
32045	reqHeaders := make(http.Header)
32046	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
32047	for k, v := range c.header_ {
32048		reqHeaders[k] = v
32049	}
32050	reqHeaders.Set("User-Agent", c.s.userAgent())
32051	var body io.Reader = nil
32052	c.urlParams_.Set("alt", alt)
32053	c.urlParams_.Set("prettyPrint", "false")
32054	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/generatetag")
32055	urls += "?" + c.urlParams_.Encode()
32056	req, err := http.NewRequest("POST", urls, body)
32057	if err != nil {
32058		return nil, err
32059	}
32060	req.Header = reqHeaders
32061	googleapi.Expand(req.URL, map[string]string{
32062		"profileId": strconv.FormatInt(c.profileId, 10),
32063	})
32064	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32065}
32066
32067// Do executes the "dfareporting.floodlightActivities.generatetag" call.
32068// Exactly one of *FloodlightActivitiesGenerateTagResponse or error will
32069// be non-nil. Any non-2xx status code is an error. Response headers are
32070// in either
32071// *FloodlightActivitiesGenerateTagResponse.ServerResponse.Header or (if
32072// a response was returned at all) in error.(*googleapi.Error).Header.
32073// Use googleapi.IsNotModified to check whether the returned error was
32074// because http.StatusNotModified was returned.
32075func (c *FloodlightActivitiesGeneratetagCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesGenerateTagResponse, error) {
32076	gensupport.SetOptions(c.urlParams_, opts...)
32077	res, err := c.doRequest("json")
32078	if res != nil && res.StatusCode == http.StatusNotModified {
32079		if res.Body != nil {
32080			res.Body.Close()
32081		}
32082		return nil, &googleapi.Error{
32083			Code:   res.StatusCode,
32084			Header: res.Header,
32085		}
32086	}
32087	if err != nil {
32088		return nil, err
32089	}
32090	defer googleapi.CloseBody(res)
32091	if err := googleapi.CheckResponse(res); err != nil {
32092		return nil, err
32093	}
32094	ret := &FloodlightActivitiesGenerateTagResponse{
32095		ServerResponse: googleapi.ServerResponse{
32096			Header:         res.Header,
32097			HTTPStatusCode: res.StatusCode,
32098		},
32099	}
32100	target := &ret
32101	if err := gensupport.DecodeResponse(target, res); err != nil {
32102		return nil, err
32103	}
32104	return ret, nil
32105	// {
32106	//   "description": "Generates a tag for a floodlight activity.",
32107	//   "httpMethod": "POST",
32108	//   "id": "dfareporting.floodlightActivities.generatetag",
32109	//   "parameterOrder": [
32110	//     "profileId"
32111	//   ],
32112	//   "parameters": {
32113	//     "floodlightActivityId": {
32114	//       "description": "Floodlight activity ID for which we want to generate a tag.",
32115	//       "format": "int64",
32116	//       "location": "query",
32117	//       "type": "string"
32118	//     },
32119	//     "profileId": {
32120	//       "description": "User profile ID associated with this request.",
32121	//       "format": "int64",
32122	//       "location": "path",
32123	//       "required": true,
32124	//       "type": "string"
32125	//     }
32126	//   },
32127	//   "path": "userprofiles/{profileId}/floodlightActivities/generatetag",
32128	//   "response": {
32129	//     "$ref": "FloodlightActivitiesGenerateTagResponse"
32130	//   },
32131	//   "scopes": [
32132	//     "https://www.googleapis.com/auth/dfatrafficking"
32133	//   ]
32134	// }
32135
32136}
32137
32138// method id "dfareporting.floodlightActivities.get":
32139
32140type FloodlightActivitiesGetCall struct {
32141	s            *Service
32142	profileId    int64
32143	id           int64
32144	urlParams_   gensupport.URLParams
32145	ifNoneMatch_ string
32146	ctx_         context.Context
32147	header_      http.Header
32148}
32149
32150// Get: Gets one floodlight activity by ID.
32151func (r *FloodlightActivitiesService) Get(profileId int64, id int64) *FloodlightActivitiesGetCall {
32152	c := &FloodlightActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32153	c.profileId = profileId
32154	c.id = id
32155	return c
32156}
32157
32158// Fields allows partial responses to be retrieved. See
32159// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32160// for more information.
32161func (c *FloodlightActivitiesGetCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGetCall {
32162	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32163	return c
32164}
32165
32166// IfNoneMatch sets the optional parameter which makes the operation
32167// fail if the object's ETag matches the given value. This is useful for
32168// getting updates only after the object has changed since the last
32169// request. Use googleapi.IsNotModified to check whether the response
32170// error from Do is the result of In-None-Match.
32171func (c *FloodlightActivitiesGetCall) IfNoneMatch(entityTag string) *FloodlightActivitiesGetCall {
32172	c.ifNoneMatch_ = entityTag
32173	return c
32174}
32175
32176// Context sets the context to be used in this call's Do method. Any
32177// pending HTTP request will be aborted if the provided context is
32178// canceled.
32179func (c *FloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightActivitiesGetCall {
32180	c.ctx_ = ctx
32181	return c
32182}
32183
32184// Header returns an http.Header that can be modified by the caller to
32185// add HTTP headers to the request.
32186func (c *FloodlightActivitiesGetCall) Header() http.Header {
32187	if c.header_ == nil {
32188		c.header_ = make(http.Header)
32189	}
32190	return c.header_
32191}
32192
32193func (c *FloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
32194	reqHeaders := make(http.Header)
32195	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
32196	for k, v := range c.header_ {
32197		reqHeaders[k] = v
32198	}
32199	reqHeaders.Set("User-Agent", c.s.userAgent())
32200	if c.ifNoneMatch_ != "" {
32201		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32202	}
32203	var body io.Reader = nil
32204	c.urlParams_.Set("alt", alt)
32205	c.urlParams_.Set("prettyPrint", "false")
32206	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
32207	urls += "?" + c.urlParams_.Encode()
32208	req, err := http.NewRequest("GET", urls, body)
32209	if err != nil {
32210		return nil, err
32211	}
32212	req.Header = reqHeaders
32213	googleapi.Expand(req.URL, map[string]string{
32214		"profileId": strconv.FormatInt(c.profileId, 10),
32215		"id":        strconv.FormatInt(c.id, 10),
32216	})
32217	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32218}
32219
32220// Do executes the "dfareporting.floodlightActivities.get" call.
32221// Exactly one of *FloodlightActivity or error will be non-nil. Any
32222// non-2xx status code is an error. Response headers are in either
32223// *FloodlightActivity.ServerResponse.Header or (if a response was
32224// returned at all) in error.(*googleapi.Error).Header. Use
32225// googleapi.IsNotModified to check whether the returned error was
32226// because http.StatusNotModified was returned.
32227func (c *FloodlightActivitiesGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32228	gensupport.SetOptions(c.urlParams_, opts...)
32229	res, err := c.doRequest("json")
32230	if res != nil && res.StatusCode == http.StatusNotModified {
32231		if res.Body != nil {
32232			res.Body.Close()
32233		}
32234		return nil, &googleapi.Error{
32235			Code:   res.StatusCode,
32236			Header: res.Header,
32237		}
32238	}
32239	if err != nil {
32240		return nil, err
32241	}
32242	defer googleapi.CloseBody(res)
32243	if err := googleapi.CheckResponse(res); err != nil {
32244		return nil, err
32245	}
32246	ret := &FloodlightActivity{
32247		ServerResponse: googleapi.ServerResponse{
32248			Header:         res.Header,
32249			HTTPStatusCode: res.StatusCode,
32250		},
32251	}
32252	target := &ret
32253	if err := gensupport.DecodeResponse(target, res); err != nil {
32254		return nil, err
32255	}
32256	return ret, nil
32257	// {
32258	//   "description": "Gets one floodlight activity by ID.",
32259	//   "httpMethod": "GET",
32260	//   "id": "dfareporting.floodlightActivities.get",
32261	//   "parameterOrder": [
32262	//     "profileId",
32263	//     "id"
32264	//   ],
32265	//   "parameters": {
32266	//     "id": {
32267	//       "description": "Floodlight activity ID.",
32268	//       "format": "int64",
32269	//       "location": "path",
32270	//       "required": true,
32271	//       "type": "string"
32272	//     },
32273	//     "profileId": {
32274	//       "description": "User profile ID associated with this request.",
32275	//       "format": "int64",
32276	//       "location": "path",
32277	//       "required": true,
32278	//       "type": "string"
32279	//     }
32280	//   },
32281	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
32282	//   "response": {
32283	//     "$ref": "FloodlightActivity"
32284	//   },
32285	//   "scopes": [
32286	//     "https://www.googleapis.com/auth/dfatrafficking"
32287	//   ]
32288	// }
32289
32290}
32291
32292// method id "dfareporting.floodlightActivities.insert":
32293
32294type FloodlightActivitiesInsertCall struct {
32295	s                  *Service
32296	profileId          int64
32297	floodlightactivity *FloodlightActivity
32298	urlParams_         gensupport.URLParams
32299	ctx_               context.Context
32300	header_            http.Header
32301}
32302
32303// Insert: Inserts a new floodlight activity.
32304func (r *FloodlightActivitiesService) Insert(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesInsertCall {
32305	c := &FloodlightActivitiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32306	c.profileId = profileId
32307	c.floodlightactivity = floodlightactivity
32308	return c
32309}
32310
32311// Fields allows partial responses to be retrieved. See
32312// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32313// for more information.
32314func (c *FloodlightActivitiesInsertCall) Fields(s ...googleapi.Field) *FloodlightActivitiesInsertCall {
32315	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32316	return c
32317}
32318
32319// Context sets the context to be used in this call's Do method. Any
32320// pending HTTP request will be aborted if the provided context is
32321// canceled.
32322func (c *FloodlightActivitiesInsertCall) Context(ctx context.Context) *FloodlightActivitiesInsertCall {
32323	c.ctx_ = ctx
32324	return c
32325}
32326
32327// Header returns an http.Header that can be modified by the caller to
32328// add HTTP headers to the request.
32329func (c *FloodlightActivitiesInsertCall) Header() http.Header {
32330	if c.header_ == nil {
32331		c.header_ = make(http.Header)
32332	}
32333	return c.header_
32334}
32335
32336func (c *FloodlightActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
32337	reqHeaders := make(http.Header)
32338	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
32339	for k, v := range c.header_ {
32340		reqHeaders[k] = v
32341	}
32342	reqHeaders.Set("User-Agent", c.s.userAgent())
32343	var body io.Reader = nil
32344	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
32345	if err != nil {
32346		return nil, err
32347	}
32348	reqHeaders.Set("Content-Type", "application/json")
32349	c.urlParams_.Set("alt", alt)
32350	c.urlParams_.Set("prettyPrint", "false")
32351	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32352	urls += "?" + c.urlParams_.Encode()
32353	req, err := http.NewRequest("POST", urls, body)
32354	if err != nil {
32355		return nil, err
32356	}
32357	req.Header = reqHeaders
32358	googleapi.Expand(req.URL, map[string]string{
32359		"profileId": strconv.FormatInt(c.profileId, 10),
32360	})
32361	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32362}
32363
32364// Do executes the "dfareporting.floodlightActivities.insert" call.
32365// Exactly one of *FloodlightActivity or error will be non-nil. Any
32366// non-2xx status code is an error. Response headers are in either
32367// *FloodlightActivity.ServerResponse.Header or (if a response was
32368// returned at all) in error.(*googleapi.Error).Header. Use
32369// googleapi.IsNotModified to check whether the returned error was
32370// because http.StatusNotModified was returned.
32371func (c *FloodlightActivitiesInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32372	gensupport.SetOptions(c.urlParams_, opts...)
32373	res, err := c.doRequest("json")
32374	if res != nil && res.StatusCode == http.StatusNotModified {
32375		if res.Body != nil {
32376			res.Body.Close()
32377		}
32378		return nil, &googleapi.Error{
32379			Code:   res.StatusCode,
32380			Header: res.Header,
32381		}
32382	}
32383	if err != nil {
32384		return nil, err
32385	}
32386	defer googleapi.CloseBody(res)
32387	if err := googleapi.CheckResponse(res); err != nil {
32388		return nil, err
32389	}
32390	ret := &FloodlightActivity{
32391		ServerResponse: googleapi.ServerResponse{
32392			Header:         res.Header,
32393			HTTPStatusCode: res.StatusCode,
32394		},
32395	}
32396	target := &ret
32397	if err := gensupport.DecodeResponse(target, res); err != nil {
32398		return nil, err
32399	}
32400	return ret, nil
32401	// {
32402	//   "description": "Inserts a new floodlight activity.",
32403	//   "httpMethod": "POST",
32404	//   "id": "dfareporting.floodlightActivities.insert",
32405	//   "parameterOrder": [
32406	//     "profileId"
32407	//   ],
32408	//   "parameters": {
32409	//     "profileId": {
32410	//       "description": "User profile ID associated with this request.",
32411	//       "format": "int64",
32412	//       "location": "path",
32413	//       "required": true,
32414	//       "type": "string"
32415	//     }
32416	//   },
32417	//   "path": "userprofiles/{profileId}/floodlightActivities",
32418	//   "request": {
32419	//     "$ref": "FloodlightActivity"
32420	//   },
32421	//   "response": {
32422	//     "$ref": "FloodlightActivity"
32423	//   },
32424	//   "scopes": [
32425	//     "https://www.googleapis.com/auth/dfatrafficking"
32426	//   ]
32427	// }
32428
32429}
32430
32431// method id "dfareporting.floodlightActivities.list":
32432
32433type FloodlightActivitiesListCall struct {
32434	s            *Service
32435	profileId    int64
32436	urlParams_   gensupport.URLParams
32437	ifNoneMatch_ string
32438	ctx_         context.Context
32439	header_      http.Header
32440}
32441
32442// List: Retrieves a list of floodlight activities, possibly filtered.
32443// This method supports paging.
32444func (r *FloodlightActivitiesService) List(profileId int64) *FloodlightActivitiesListCall {
32445	c := &FloodlightActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32446	c.profileId = profileId
32447	return c
32448}
32449
32450// AdvertiserId sets the optional parameter "advertiserId": Select only
32451// floodlight activities for the specified advertiser ID. Must specify
32452// either ids, advertiserId, or floodlightConfigurationId for a
32453// non-empty result.
32454func (c *FloodlightActivitiesListCall) AdvertiserId(advertiserId int64) *FloodlightActivitiesListCall {
32455	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32456	return c
32457}
32458
32459// FloodlightActivityGroupIds sets the optional parameter
32460// "floodlightActivityGroupIds": Select only floodlight activities with
32461// the specified floodlight activity group IDs.
32462func (c *FloodlightActivitiesListCall) FloodlightActivityGroupIds(floodlightActivityGroupIds ...int64) *FloodlightActivitiesListCall {
32463	var floodlightActivityGroupIds_ []string
32464	for _, v := range floodlightActivityGroupIds {
32465		floodlightActivityGroupIds_ = append(floodlightActivityGroupIds_, fmt.Sprint(v))
32466	}
32467	c.urlParams_.SetMulti("floodlightActivityGroupIds", floodlightActivityGroupIds_)
32468	return c
32469}
32470
32471// FloodlightActivityGroupName sets the optional parameter
32472// "floodlightActivityGroupName": Select only floodlight activities with
32473// the specified floodlight activity group name.
32474func (c *FloodlightActivitiesListCall) FloodlightActivityGroupName(floodlightActivityGroupName string) *FloodlightActivitiesListCall {
32475	c.urlParams_.Set("floodlightActivityGroupName", floodlightActivityGroupName)
32476	return c
32477}
32478
32479// FloodlightActivityGroupTagString sets the optional parameter
32480// "floodlightActivityGroupTagString": Select only floodlight activities
32481// with the specified floodlight activity group tag string.
32482func (c *FloodlightActivitiesListCall) FloodlightActivityGroupTagString(floodlightActivityGroupTagString string) *FloodlightActivitiesListCall {
32483	c.urlParams_.Set("floodlightActivityGroupTagString", floodlightActivityGroupTagString)
32484	return c
32485}
32486
32487// FloodlightActivityGroupType sets the optional parameter
32488// "floodlightActivityGroupType": Select only floodlight activities with
32489// the specified floodlight activity group type.
32490//
32491// Possible values:
32492//   "COUNTER"
32493//   "SALE"
32494func (c *FloodlightActivitiesListCall) FloodlightActivityGroupType(floodlightActivityGroupType string) *FloodlightActivitiesListCall {
32495	c.urlParams_.Set("floodlightActivityGroupType", floodlightActivityGroupType)
32496	return c
32497}
32498
32499// FloodlightConfigurationId sets the optional parameter
32500// "floodlightConfigurationId": Select only floodlight activities for
32501// the specified floodlight configuration ID. Must specify either ids,
32502// advertiserId, or floodlightConfigurationId for a non-empty result.
32503func (c *FloodlightActivitiesListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivitiesListCall {
32504	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
32505	return c
32506}
32507
32508// Ids sets the optional parameter "ids": Select only floodlight
32509// activities with the specified IDs. Must specify either ids,
32510// advertiserId, or floodlightConfigurationId for a non-empty result.
32511func (c *FloodlightActivitiesListCall) Ids(ids ...int64) *FloodlightActivitiesListCall {
32512	var ids_ []string
32513	for _, v := range ids {
32514		ids_ = append(ids_, fmt.Sprint(v))
32515	}
32516	c.urlParams_.SetMulti("ids", ids_)
32517	return c
32518}
32519
32520// MaxResults sets the optional parameter "maxResults": Maximum number
32521// of results to return.
32522func (c *FloodlightActivitiesListCall) MaxResults(maxResults int64) *FloodlightActivitiesListCall {
32523	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32524	return c
32525}
32526
32527// PageToken sets the optional parameter "pageToken": Value of the
32528// nextPageToken from the previous result page.
32529func (c *FloodlightActivitiesListCall) PageToken(pageToken string) *FloodlightActivitiesListCall {
32530	c.urlParams_.Set("pageToken", pageToken)
32531	return c
32532}
32533
32534// SearchString sets the optional parameter "searchString": Allows
32535// searching for objects by name or ID. Wildcards (*) are allowed. For
32536// example, "floodlightactivity*2015" will return objects with names
32537// like "floodlightactivity June 2015", "floodlightactivity April 2015",
32538// or simply "floodlightactivity 2015". Most of the searches also add
32539// wildcards implicitly at the start and the end of the search string.
32540// For example, a search string of "floodlightactivity" will match
32541// objects with name "my floodlightactivity activity",
32542// "floodlightactivity 2015", or simply "floodlightactivity".
32543func (c *FloodlightActivitiesListCall) SearchString(searchString string) *FloodlightActivitiesListCall {
32544	c.urlParams_.Set("searchString", searchString)
32545	return c
32546}
32547
32548// SortField sets the optional parameter "sortField": Field by which to
32549// sort the list.
32550//
32551// Possible values:
32552//   "ID" (default)
32553//   "NAME"
32554func (c *FloodlightActivitiesListCall) SortField(sortField string) *FloodlightActivitiesListCall {
32555	c.urlParams_.Set("sortField", sortField)
32556	return c
32557}
32558
32559// SortOrder sets the optional parameter "sortOrder": Order of sorted
32560// results.
32561//
32562// Possible values:
32563//   "ASCENDING" (default)
32564//   "DESCENDING"
32565func (c *FloodlightActivitiesListCall) SortOrder(sortOrder string) *FloodlightActivitiesListCall {
32566	c.urlParams_.Set("sortOrder", sortOrder)
32567	return c
32568}
32569
32570// TagString sets the optional parameter "tagString": Select only
32571// floodlight activities with the specified tag string.
32572func (c *FloodlightActivitiesListCall) TagString(tagString string) *FloodlightActivitiesListCall {
32573	c.urlParams_.Set("tagString", tagString)
32574	return c
32575}
32576
32577// Fields allows partial responses to be retrieved. See
32578// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32579// for more information.
32580func (c *FloodlightActivitiesListCall) Fields(s ...googleapi.Field) *FloodlightActivitiesListCall {
32581	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32582	return c
32583}
32584
32585// IfNoneMatch sets the optional parameter which makes the operation
32586// fail if the object's ETag matches the given value. This is useful for
32587// getting updates only after the object has changed since the last
32588// request. Use googleapi.IsNotModified to check whether the response
32589// error from Do is the result of In-None-Match.
32590func (c *FloodlightActivitiesListCall) IfNoneMatch(entityTag string) *FloodlightActivitiesListCall {
32591	c.ifNoneMatch_ = entityTag
32592	return c
32593}
32594
32595// Context sets the context to be used in this call's Do method. Any
32596// pending HTTP request will be aborted if the provided context is
32597// canceled.
32598func (c *FloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightActivitiesListCall {
32599	c.ctx_ = ctx
32600	return c
32601}
32602
32603// Header returns an http.Header that can be modified by the caller to
32604// add HTTP headers to the request.
32605func (c *FloodlightActivitiesListCall) Header() http.Header {
32606	if c.header_ == nil {
32607		c.header_ = make(http.Header)
32608	}
32609	return c.header_
32610}
32611
32612func (c *FloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
32613	reqHeaders := make(http.Header)
32614	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
32615	for k, v := range c.header_ {
32616		reqHeaders[k] = v
32617	}
32618	reqHeaders.Set("User-Agent", c.s.userAgent())
32619	if c.ifNoneMatch_ != "" {
32620		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32621	}
32622	var body io.Reader = nil
32623	c.urlParams_.Set("alt", alt)
32624	c.urlParams_.Set("prettyPrint", "false")
32625	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32626	urls += "?" + c.urlParams_.Encode()
32627	req, err := http.NewRequest("GET", urls, body)
32628	if err != nil {
32629		return nil, err
32630	}
32631	req.Header = reqHeaders
32632	googleapi.Expand(req.URL, map[string]string{
32633		"profileId": strconv.FormatInt(c.profileId, 10),
32634	})
32635	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32636}
32637
32638// Do executes the "dfareporting.floodlightActivities.list" call.
32639// Exactly one of *FloodlightActivitiesListResponse or error will be
32640// non-nil. Any non-2xx status code is an error. Response headers are in
32641// either *FloodlightActivitiesListResponse.ServerResponse.Header or (if
32642// a response was returned at all) in error.(*googleapi.Error).Header.
32643// Use googleapi.IsNotModified to check whether the returned error was
32644// because http.StatusNotModified was returned.
32645func (c *FloodlightActivitiesListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesListResponse, error) {
32646	gensupport.SetOptions(c.urlParams_, opts...)
32647	res, err := c.doRequest("json")
32648	if res != nil && res.StatusCode == http.StatusNotModified {
32649		if res.Body != nil {
32650			res.Body.Close()
32651		}
32652		return nil, &googleapi.Error{
32653			Code:   res.StatusCode,
32654			Header: res.Header,
32655		}
32656	}
32657	if err != nil {
32658		return nil, err
32659	}
32660	defer googleapi.CloseBody(res)
32661	if err := googleapi.CheckResponse(res); err != nil {
32662		return nil, err
32663	}
32664	ret := &FloodlightActivitiesListResponse{
32665		ServerResponse: googleapi.ServerResponse{
32666			Header:         res.Header,
32667			HTTPStatusCode: res.StatusCode,
32668		},
32669	}
32670	target := &ret
32671	if err := gensupport.DecodeResponse(target, res); err != nil {
32672		return nil, err
32673	}
32674	return ret, nil
32675	// {
32676	//   "description": "Retrieves a list of floodlight activities, possibly filtered. This method supports paging.",
32677	//   "httpMethod": "GET",
32678	//   "id": "dfareporting.floodlightActivities.list",
32679	//   "parameterOrder": [
32680	//     "profileId"
32681	//   ],
32682	//   "parameters": {
32683	//     "advertiserId": {
32684	//       "description": "Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32685	//       "format": "int64",
32686	//       "location": "query",
32687	//       "type": "string"
32688	//     },
32689	//     "floodlightActivityGroupIds": {
32690	//       "description": "Select only floodlight activities with the specified floodlight activity group IDs.",
32691	//       "format": "int64",
32692	//       "location": "query",
32693	//       "repeated": true,
32694	//       "type": "string"
32695	//     },
32696	//     "floodlightActivityGroupName": {
32697	//       "description": "Select only floodlight activities with the specified floodlight activity group name.",
32698	//       "location": "query",
32699	//       "type": "string"
32700	//     },
32701	//     "floodlightActivityGroupTagString": {
32702	//       "description": "Select only floodlight activities with the specified floodlight activity group tag string.",
32703	//       "location": "query",
32704	//       "type": "string"
32705	//     },
32706	//     "floodlightActivityGroupType": {
32707	//       "description": "Select only floodlight activities with the specified floodlight activity group type.",
32708	//       "enum": [
32709	//         "COUNTER",
32710	//         "SALE"
32711	//       ],
32712	//       "enumDescriptions": [
32713	//         "",
32714	//         ""
32715	//       ],
32716	//       "location": "query",
32717	//       "type": "string"
32718	//     },
32719	//     "floodlightConfigurationId": {
32720	//       "description": "Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32721	//       "format": "int64",
32722	//       "location": "query",
32723	//       "type": "string"
32724	//     },
32725	//     "ids": {
32726	//       "description": "Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32727	//       "format": "int64",
32728	//       "location": "query",
32729	//       "repeated": true,
32730	//       "type": "string"
32731	//     },
32732	//     "maxResults": {
32733	//       "default": "1000",
32734	//       "description": "Maximum number of results to return.",
32735	//       "format": "int32",
32736	//       "location": "query",
32737	//       "maximum": "1000",
32738	//       "minimum": "0",
32739	//       "type": "integer"
32740	//     },
32741	//     "pageToken": {
32742	//       "description": "Value of the nextPageToken from the previous result page.",
32743	//       "location": "query",
32744	//       "type": "string"
32745	//     },
32746	//     "profileId": {
32747	//       "description": "User profile ID associated with this request.",
32748	//       "format": "int64",
32749	//       "location": "path",
32750	//       "required": true,
32751	//       "type": "string"
32752	//     },
32753	//     "searchString": {
32754	//       "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\".",
32755	//       "location": "query",
32756	//       "type": "string"
32757	//     },
32758	//     "sortField": {
32759	//       "default": "ID",
32760	//       "description": "Field by which to sort the list.",
32761	//       "enum": [
32762	//         "ID",
32763	//         "NAME"
32764	//       ],
32765	//       "enumDescriptions": [
32766	//         "",
32767	//         ""
32768	//       ],
32769	//       "location": "query",
32770	//       "type": "string"
32771	//     },
32772	//     "sortOrder": {
32773	//       "default": "ASCENDING",
32774	//       "description": "Order of sorted results.",
32775	//       "enum": [
32776	//         "ASCENDING",
32777	//         "DESCENDING"
32778	//       ],
32779	//       "enumDescriptions": [
32780	//         "",
32781	//         ""
32782	//       ],
32783	//       "location": "query",
32784	//       "type": "string"
32785	//     },
32786	//     "tagString": {
32787	//       "description": "Select only floodlight activities with the specified tag string.",
32788	//       "location": "query",
32789	//       "type": "string"
32790	//     }
32791	//   },
32792	//   "path": "userprofiles/{profileId}/floodlightActivities",
32793	//   "response": {
32794	//     "$ref": "FloodlightActivitiesListResponse"
32795	//   },
32796	//   "scopes": [
32797	//     "https://www.googleapis.com/auth/dfatrafficking"
32798	//   ]
32799	// }
32800
32801}
32802
32803// Pages invokes f for each page of results.
32804// A non-nil error returned from f will halt the iteration.
32805// The provided context supersedes any context provided to the Context method.
32806func (c *FloodlightActivitiesListCall) Pages(ctx context.Context, f func(*FloodlightActivitiesListResponse) error) error {
32807	c.ctx_ = ctx
32808	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32809	for {
32810		x, err := c.Do()
32811		if err != nil {
32812			return err
32813		}
32814		if err := f(x); err != nil {
32815			return err
32816		}
32817		if x.NextPageToken == "" {
32818			return nil
32819		}
32820		c.PageToken(x.NextPageToken)
32821	}
32822}
32823
32824// method id "dfareporting.floodlightActivities.patch":
32825
32826type FloodlightActivitiesPatchCall struct {
32827	s                  *Service
32828	profileId          int64
32829	floodlightactivity *FloodlightActivity
32830	urlParams_         gensupport.URLParams
32831	ctx_               context.Context
32832	header_            http.Header
32833}
32834
32835// Patch: Updates an existing floodlight activity. This method supports
32836// patch semantics.
32837func (r *FloodlightActivitiesService) Patch(profileId int64, id int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesPatchCall {
32838	c := &FloodlightActivitiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32839	c.profileId = profileId
32840	c.urlParams_.Set("id", fmt.Sprint(id))
32841	c.floodlightactivity = floodlightactivity
32842	return c
32843}
32844
32845// Fields allows partial responses to be retrieved. See
32846// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32847// for more information.
32848func (c *FloodlightActivitiesPatchCall) Fields(s ...googleapi.Field) *FloodlightActivitiesPatchCall {
32849	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32850	return c
32851}
32852
32853// Context sets the context to be used in this call's Do method. Any
32854// pending HTTP request will be aborted if the provided context is
32855// canceled.
32856func (c *FloodlightActivitiesPatchCall) Context(ctx context.Context) *FloodlightActivitiesPatchCall {
32857	c.ctx_ = ctx
32858	return c
32859}
32860
32861// Header returns an http.Header that can be modified by the caller to
32862// add HTTP headers to the request.
32863func (c *FloodlightActivitiesPatchCall) Header() http.Header {
32864	if c.header_ == nil {
32865		c.header_ = make(http.Header)
32866	}
32867	return c.header_
32868}
32869
32870func (c *FloodlightActivitiesPatchCall) doRequest(alt string) (*http.Response, error) {
32871	reqHeaders := make(http.Header)
32872	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
32873	for k, v := range c.header_ {
32874		reqHeaders[k] = v
32875	}
32876	reqHeaders.Set("User-Agent", c.s.userAgent())
32877	var body io.Reader = nil
32878	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
32879	if err != nil {
32880		return nil, err
32881	}
32882	reqHeaders.Set("Content-Type", "application/json")
32883	c.urlParams_.Set("alt", alt)
32884	c.urlParams_.Set("prettyPrint", "false")
32885	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32886	urls += "?" + c.urlParams_.Encode()
32887	req, err := http.NewRequest("PATCH", urls, body)
32888	if err != nil {
32889		return nil, err
32890	}
32891	req.Header = reqHeaders
32892	googleapi.Expand(req.URL, map[string]string{
32893		"profileId": strconv.FormatInt(c.profileId, 10),
32894	})
32895	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32896}
32897
32898// Do executes the "dfareporting.floodlightActivities.patch" call.
32899// Exactly one of *FloodlightActivity or error will be non-nil. Any
32900// non-2xx status code is an error. Response headers are in either
32901// *FloodlightActivity.ServerResponse.Header or (if a response was
32902// returned at all) in error.(*googleapi.Error).Header. Use
32903// googleapi.IsNotModified to check whether the returned error was
32904// because http.StatusNotModified was returned.
32905func (c *FloodlightActivitiesPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32906	gensupport.SetOptions(c.urlParams_, opts...)
32907	res, err := c.doRequest("json")
32908	if res != nil && res.StatusCode == http.StatusNotModified {
32909		if res.Body != nil {
32910			res.Body.Close()
32911		}
32912		return nil, &googleapi.Error{
32913			Code:   res.StatusCode,
32914			Header: res.Header,
32915		}
32916	}
32917	if err != nil {
32918		return nil, err
32919	}
32920	defer googleapi.CloseBody(res)
32921	if err := googleapi.CheckResponse(res); err != nil {
32922		return nil, err
32923	}
32924	ret := &FloodlightActivity{
32925		ServerResponse: googleapi.ServerResponse{
32926			Header:         res.Header,
32927			HTTPStatusCode: res.StatusCode,
32928		},
32929	}
32930	target := &ret
32931	if err := gensupport.DecodeResponse(target, res); err != nil {
32932		return nil, err
32933	}
32934	return ret, nil
32935	// {
32936	//   "description": "Updates an existing floodlight activity. This method supports patch semantics.",
32937	//   "httpMethod": "PATCH",
32938	//   "id": "dfareporting.floodlightActivities.patch",
32939	//   "parameterOrder": [
32940	//     "profileId",
32941	//     "id"
32942	//   ],
32943	//   "parameters": {
32944	//     "id": {
32945	//       "description": "Floodlight activity ID.",
32946	//       "format": "int64",
32947	//       "location": "query",
32948	//       "required": true,
32949	//       "type": "string"
32950	//     },
32951	//     "profileId": {
32952	//       "description": "User profile ID associated with this request.",
32953	//       "format": "int64",
32954	//       "location": "path",
32955	//       "required": true,
32956	//       "type": "string"
32957	//     }
32958	//   },
32959	//   "path": "userprofiles/{profileId}/floodlightActivities",
32960	//   "request": {
32961	//     "$ref": "FloodlightActivity"
32962	//   },
32963	//   "response": {
32964	//     "$ref": "FloodlightActivity"
32965	//   },
32966	//   "scopes": [
32967	//     "https://www.googleapis.com/auth/dfatrafficking"
32968	//   ]
32969	// }
32970
32971}
32972
32973// method id "dfareporting.floodlightActivities.update":
32974
32975type FloodlightActivitiesUpdateCall struct {
32976	s                  *Service
32977	profileId          int64
32978	floodlightactivity *FloodlightActivity
32979	urlParams_         gensupport.URLParams
32980	ctx_               context.Context
32981	header_            http.Header
32982}
32983
32984// Update: Updates an existing floodlight activity.
32985func (r *FloodlightActivitiesService) Update(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesUpdateCall {
32986	c := &FloodlightActivitiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32987	c.profileId = profileId
32988	c.floodlightactivity = floodlightactivity
32989	return c
32990}
32991
32992// Fields allows partial responses to be retrieved. See
32993// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32994// for more information.
32995func (c *FloodlightActivitiesUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivitiesUpdateCall {
32996	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32997	return c
32998}
32999
33000// Context sets the context to be used in this call's Do method. Any
33001// pending HTTP request will be aborted if the provided context is
33002// canceled.
33003func (c *FloodlightActivitiesUpdateCall) Context(ctx context.Context) *FloodlightActivitiesUpdateCall {
33004	c.ctx_ = ctx
33005	return c
33006}
33007
33008// Header returns an http.Header that can be modified by the caller to
33009// add HTTP headers to the request.
33010func (c *FloodlightActivitiesUpdateCall) Header() http.Header {
33011	if c.header_ == nil {
33012		c.header_ = make(http.Header)
33013	}
33014	return c.header_
33015}
33016
33017func (c *FloodlightActivitiesUpdateCall) doRequest(alt string) (*http.Response, error) {
33018	reqHeaders := make(http.Header)
33019	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
33020	for k, v := range c.header_ {
33021		reqHeaders[k] = v
33022	}
33023	reqHeaders.Set("User-Agent", c.s.userAgent())
33024	var body io.Reader = nil
33025	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
33026	if err != nil {
33027		return nil, err
33028	}
33029	reqHeaders.Set("Content-Type", "application/json")
33030	c.urlParams_.Set("alt", alt)
33031	c.urlParams_.Set("prettyPrint", "false")
33032	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
33033	urls += "?" + c.urlParams_.Encode()
33034	req, err := http.NewRequest("PUT", urls, body)
33035	if err != nil {
33036		return nil, err
33037	}
33038	req.Header = reqHeaders
33039	googleapi.Expand(req.URL, map[string]string{
33040		"profileId": strconv.FormatInt(c.profileId, 10),
33041	})
33042	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33043}
33044
33045// Do executes the "dfareporting.floodlightActivities.update" call.
33046// Exactly one of *FloodlightActivity or error will be non-nil. Any
33047// non-2xx status code is an error. Response headers are in either
33048// *FloodlightActivity.ServerResponse.Header or (if a response was
33049// returned at all) in error.(*googleapi.Error).Header. Use
33050// googleapi.IsNotModified to check whether the returned error was
33051// because http.StatusNotModified was returned.
33052func (c *FloodlightActivitiesUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
33053	gensupport.SetOptions(c.urlParams_, opts...)
33054	res, err := c.doRequest("json")
33055	if res != nil && res.StatusCode == http.StatusNotModified {
33056		if res.Body != nil {
33057			res.Body.Close()
33058		}
33059		return nil, &googleapi.Error{
33060			Code:   res.StatusCode,
33061			Header: res.Header,
33062		}
33063	}
33064	if err != nil {
33065		return nil, err
33066	}
33067	defer googleapi.CloseBody(res)
33068	if err := googleapi.CheckResponse(res); err != nil {
33069		return nil, err
33070	}
33071	ret := &FloodlightActivity{
33072		ServerResponse: googleapi.ServerResponse{
33073			Header:         res.Header,
33074			HTTPStatusCode: res.StatusCode,
33075		},
33076	}
33077	target := &ret
33078	if err := gensupport.DecodeResponse(target, res); err != nil {
33079		return nil, err
33080	}
33081	return ret, nil
33082	// {
33083	//   "description": "Updates an existing floodlight activity.",
33084	//   "httpMethod": "PUT",
33085	//   "id": "dfareporting.floodlightActivities.update",
33086	//   "parameterOrder": [
33087	//     "profileId"
33088	//   ],
33089	//   "parameters": {
33090	//     "profileId": {
33091	//       "description": "User profile ID associated with this request.",
33092	//       "format": "int64",
33093	//       "location": "path",
33094	//       "required": true,
33095	//       "type": "string"
33096	//     }
33097	//   },
33098	//   "path": "userprofiles/{profileId}/floodlightActivities",
33099	//   "request": {
33100	//     "$ref": "FloodlightActivity"
33101	//   },
33102	//   "response": {
33103	//     "$ref": "FloodlightActivity"
33104	//   },
33105	//   "scopes": [
33106	//     "https://www.googleapis.com/auth/dfatrafficking"
33107	//   ]
33108	// }
33109
33110}
33111
33112// method id "dfareporting.floodlightActivityGroups.get":
33113
33114type FloodlightActivityGroupsGetCall struct {
33115	s            *Service
33116	profileId    int64
33117	id           int64
33118	urlParams_   gensupport.URLParams
33119	ifNoneMatch_ string
33120	ctx_         context.Context
33121	header_      http.Header
33122}
33123
33124// Get: Gets one floodlight activity group by ID.
33125func (r *FloodlightActivityGroupsService) Get(profileId int64, id int64) *FloodlightActivityGroupsGetCall {
33126	c := &FloodlightActivityGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33127	c.profileId = profileId
33128	c.id = id
33129	return c
33130}
33131
33132// Fields allows partial responses to be retrieved. See
33133// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33134// for more information.
33135func (c *FloodlightActivityGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsGetCall {
33136	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33137	return c
33138}
33139
33140// IfNoneMatch sets the optional parameter which makes the operation
33141// fail if the object's ETag matches the given value. This is useful for
33142// getting updates only after the object has changed since the last
33143// request. Use googleapi.IsNotModified to check whether the response
33144// error from Do is the result of In-None-Match.
33145func (c *FloodlightActivityGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsGetCall {
33146	c.ifNoneMatch_ = entityTag
33147	return c
33148}
33149
33150// Context sets the context to be used in this call's Do method. Any
33151// pending HTTP request will be aborted if the provided context is
33152// canceled.
33153func (c *FloodlightActivityGroupsGetCall) Context(ctx context.Context) *FloodlightActivityGroupsGetCall {
33154	c.ctx_ = ctx
33155	return c
33156}
33157
33158// Header returns an http.Header that can be modified by the caller to
33159// add HTTP headers to the request.
33160func (c *FloodlightActivityGroupsGetCall) Header() http.Header {
33161	if c.header_ == nil {
33162		c.header_ = make(http.Header)
33163	}
33164	return c.header_
33165}
33166
33167func (c *FloodlightActivityGroupsGetCall) doRequest(alt string) (*http.Response, error) {
33168	reqHeaders := make(http.Header)
33169	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
33170	for k, v := range c.header_ {
33171		reqHeaders[k] = v
33172	}
33173	reqHeaders.Set("User-Agent", c.s.userAgent())
33174	if c.ifNoneMatch_ != "" {
33175		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33176	}
33177	var body io.Reader = nil
33178	c.urlParams_.Set("alt", alt)
33179	c.urlParams_.Set("prettyPrint", "false")
33180	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups/{id}")
33181	urls += "?" + c.urlParams_.Encode()
33182	req, err := http.NewRequest("GET", urls, body)
33183	if err != nil {
33184		return nil, err
33185	}
33186	req.Header = reqHeaders
33187	googleapi.Expand(req.URL, map[string]string{
33188		"profileId": strconv.FormatInt(c.profileId, 10),
33189		"id":        strconv.FormatInt(c.id, 10),
33190	})
33191	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33192}
33193
33194// Do executes the "dfareporting.floodlightActivityGroups.get" call.
33195// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33196// non-2xx status code is an error. Response headers are in either
33197// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33198// returned at all) in error.(*googleapi.Error).Header. Use
33199// googleapi.IsNotModified to check whether the returned error was
33200// because http.StatusNotModified was returned.
33201func (c *FloodlightActivityGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33202	gensupport.SetOptions(c.urlParams_, opts...)
33203	res, err := c.doRequest("json")
33204	if res != nil && res.StatusCode == http.StatusNotModified {
33205		if res.Body != nil {
33206			res.Body.Close()
33207		}
33208		return nil, &googleapi.Error{
33209			Code:   res.StatusCode,
33210			Header: res.Header,
33211		}
33212	}
33213	if err != nil {
33214		return nil, err
33215	}
33216	defer googleapi.CloseBody(res)
33217	if err := googleapi.CheckResponse(res); err != nil {
33218		return nil, err
33219	}
33220	ret := &FloodlightActivityGroup{
33221		ServerResponse: googleapi.ServerResponse{
33222			Header:         res.Header,
33223			HTTPStatusCode: res.StatusCode,
33224		},
33225	}
33226	target := &ret
33227	if err := gensupport.DecodeResponse(target, res); err != nil {
33228		return nil, err
33229	}
33230	return ret, nil
33231	// {
33232	//   "description": "Gets one floodlight activity group by ID.",
33233	//   "httpMethod": "GET",
33234	//   "id": "dfareporting.floodlightActivityGroups.get",
33235	//   "parameterOrder": [
33236	//     "profileId",
33237	//     "id"
33238	//   ],
33239	//   "parameters": {
33240	//     "id": {
33241	//       "description": "Floodlight activity Group ID.",
33242	//       "format": "int64",
33243	//       "location": "path",
33244	//       "required": true,
33245	//       "type": "string"
33246	//     },
33247	//     "profileId": {
33248	//       "description": "User profile ID associated with this request.",
33249	//       "format": "int64",
33250	//       "location": "path",
33251	//       "required": true,
33252	//       "type": "string"
33253	//     }
33254	//   },
33255	//   "path": "userprofiles/{profileId}/floodlightActivityGroups/{id}",
33256	//   "response": {
33257	//     "$ref": "FloodlightActivityGroup"
33258	//   },
33259	//   "scopes": [
33260	//     "https://www.googleapis.com/auth/dfatrafficking"
33261	//   ]
33262	// }
33263
33264}
33265
33266// method id "dfareporting.floodlightActivityGroups.insert":
33267
33268type FloodlightActivityGroupsInsertCall struct {
33269	s                       *Service
33270	profileId               int64
33271	floodlightactivitygroup *FloodlightActivityGroup
33272	urlParams_              gensupport.URLParams
33273	ctx_                    context.Context
33274	header_                 http.Header
33275}
33276
33277// Insert: Inserts a new floodlight activity group.
33278func (r *FloodlightActivityGroupsService) Insert(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsInsertCall {
33279	c := &FloodlightActivityGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33280	c.profileId = profileId
33281	c.floodlightactivitygroup = floodlightactivitygroup
33282	return c
33283}
33284
33285// Fields allows partial responses to be retrieved. See
33286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33287// for more information.
33288func (c *FloodlightActivityGroupsInsertCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsInsertCall {
33289	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33290	return c
33291}
33292
33293// Context sets the context to be used in this call's Do method. Any
33294// pending HTTP request will be aborted if the provided context is
33295// canceled.
33296func (c *FloodlightActivityGroupsInsertCall) Context(ctx context.Context) *FloodlightActivityGroupsInsertCall {
33297	c.ctx_ = ctx
33298	return c
33299}
33300
33301// Header returns an http.Header that can be modified by the caller to
33302// add HTTP headers to the request.
33303func (c *FloodlightActivityGroupsInsertCall) Header() http.Header {
33304	if c.header_ == nil {
33305		c.header_ = make(http.Header)
33306	}
33307	return c.header_
33308}
33309
33310func (c *FloodlightActivityGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
33311	reqHeaders := make(http.Header)
33312	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
33313	for k, v := range c.header_ {
33314		reqHeaders[k] = v
33315	}
33316	reqHeaders.Set("User-Agent", c.s.userAgent())
33317	var body io.Reader = nil
33318	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33319	if err != nil {
33320		return nil, err
33321	}
33322	reqHeaders.Set("Content-Type", "application/json")
33323	c.urlParams_.Set("alt", alt)
33324	c.urlParams_.Set("prettyPrint", "false")
33325	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33326	urls += "?" + c.urlParams_.Encode()
33327	req, err := http.NewRequest("POST", urls, body)
33328	if err != nil {
33329		return nil, err
33330	}
33331	req.Header = reqHeaders
33332	googleapi.Expand(req.URL, map[string]string{
33333		"profileId": strconv.FormatInt(c.profileId, 10),
33334	})
33335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33336}
33337
33338// Do executes the "dfareporting.floodlightActivityGroups.insert" call.
33339// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33340// non-2xx status code is an error. Response headers are in either
33341// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33342// returned at all) in error.(*googleapi.Error).Header. Use
33343// googleapi.IsNotModified to check whether the returned error was
33344// because http.StatusNotModified was returned.
33345func (c *FloodlightActivityGroupsInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33346	gensupport.SetOptions(c.urlParams_, opts...)
33347	res, err := c.doRequest("json")
33348	if res != nil && res.StatusCode == http.StatusNotModified {
33349		if res.Body != nil {
33350			res.Body.Close()
33351		}
33352		return nil, &googleapi.Error{
33353			Code:   res.StatusCode,
33354			Header: res.Header,
33355		}
33356	}
33357	if err != nil {
33358		return nil, err
33359	}
33360	defer googleapi.CloseBody(res)
33361	if err := googleapi.CheckResponse(res); err != nil {
33362		return nil, err
33363	}
33364	ret := &FloodlightActivityGroup{
33365		ServerResponse: googleapi.ServerResponse{
33366			Header:         res.Header,
33367			HTTPStatusCode: res.StatusCode,
33368		},
33369	}
33370	target := &ret
33371	if err := gensupport.DecodeResponse(target, res); err != nil {
33372		return nil, err
33373	}
33374	return ret, nil
33375	// {
33376	//   "description": "Inserts a new floodlight activity group.",
33377	//   "httpMethod": "POST",
33378	//   "id": "dfareporting.floodlightActivityGroups.insert",
33379	//   "parameterOrder": [
33380	//     "profileId"
33381	//   ],
33382	//   "parameters": {
33383	//     "profileId": {
33384	//       "description": "User profile ID associated with this request.",
33385	//       "format": "int64",
33386	//       "location": "path",
33387	//       "required": true,
33388	//       "type": "string"
33389	//     }
33390	//   },
33391	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33392	//   "request": {
33393	//     "$ref": "FloodlightActivityGroup"
33394	//   },
33395	//   "response": {
33396	//     "$ref": "FloodlightActivityGroup"
33397	//   },
33398	//   "scopes": [
33399	//     "https://www.googleapis.com/auth/dfatrafficking"
33400	//   ]
33401	// }
33402
33403}
33404
33405// method id "dfareporting.floodlightActivityGroups.list":
33406
33407type FloodlightActivityGroupsListCall struct {
33408	s            *Service
33409	profileId    int64
33410	urlParams_   gensupport.URLParams
33411	ifNoneMatch_ string
33412	ctx_         context.Context
33413	header_      http.Header
33414}
33415
33416// List: Retrieves a list of floodlight activity groups, possibly
33417// filtered. This method supports paging.
33418func (r *FloodlightActivityGroupsService) List(profileId int64) *FloodlightActivityGroupsListCall {
33419	c := &FloodlightActivityGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33420	c.profileId = profileId
33421	return c
33422}
33423
33424// AdvertiserId sets the optional parameter "advertiserId": Select only
33425// floodlight activity groups with the specified advertiser ID. Must
33426// specify either advertiserId or floodlightConfigurationId for a
33427// non-empty result.
33428func (c *FloodlightActivityGroupsListCall) AdvertiserId(advertiserId int64) *FloodlightActivityGroupsListCall {
33429	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33430	return c
33431}
33432
33433// FloodlightConfigurationId sets the optional parameter
33434// "floodlightConfigurationId": Select only floodlight activity groups
33435// with the specified floodlight configuration ID. Must specify either
33436// advertiserId, or floodlightConfigurationId for a non-empty result.
33437func (c *FloodlightActivityGroupsListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivityGroupsListCall {
33438	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
33439	return c
33440}
33441
33442// Ids sets the optional parameter "ids": Select only floodlight
33443// activity groups with the specified IDs. Must specify either
33444// advertiserId or floodlightConfigurationId for a non-empty result.
33445func (c *FloodlightActivityGroupsListCall) Ids(ids ...int64) *FloodlightActivityGroupsListCall {
33446	var ids_ []string
33447	for _, v := range ids {
33448		ids_ = append(ids_, fmt.Sprint(v))
33449	}
33450	c.urlParams_.SetMulti("ids", ids_)
33451	return c
33452}
33453
33454// MaxResults sets the optional parameter "maxResults": Maximum number
33455// of results to return.
33456func (c *FloodlightActivityGroupsListCall) MaxResults(maxResults int64) *FloodlightActivityGroupsListCall {
33457	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33458	return c
33459}
33460
33461// PageToken sets the optional parameter "pageToken": Value of the
33462// nextPageToken from the previous result page.
33463func (c *FloodlightActivityGroupsListCall) PageToken(pageToken string) *FloodlightActivityGroupsListCall {
33464	c.urlParams_.Set("pageToken", pageToken)
33465	return c
33466}
33467
33468// SearchString sets the optional parameter "searchString": Allows
33469// searching for objects by name or ID. Wildcards (*) are allowed. For
33470// example, "floodlightactivitygroup*2015" will return objects with
33471// names like "floodlightactivitygroup June 2015",
33472// "floodlightactivitygroup April 2015", or simply
33473// "floodlightactivitygroup 2015". Most of the searches also add
33474// wildcards implicitly at the start and the end of the search string.
33475// For example, a search string of "floodlightactivitygroup" will match
33476// objects with name "my floodlightactivitygroup activity",
33477// "floodlightactivitygroup 2015", or simply "floodlightactivitygroup".
33478func (c *FloodlightActivityGroupsListCall) SearchString(searchString string) *FloodlightActivityGroupsListCall {
33479	c.urlParams_.Set("searchString", searchString)
33480	return c
33481}
33482
33483// SortField sets the optional parameter "sortField": Field by which to
33484// sort the list.
33485//
33486// Possible values:
33487//   "ID" (default)
33488//   "NAME"
33489func (c *FloodlightActivityGroupsListCall) SortField(sortField string) *FloodlightActivityGroupsListCall {
33490	c.urlParams_.Set("sortField", sortField)
33491	return c
33492}
33493
33494// SortOrder sets the optional parameter "sortOrder": Order of sorted
33495// results.
33496//
33497// Possible values:
33498//   "ASCENDING" (default)
33499//   "DESCENDING"
33500func (c *FloodlightActivityGroupsListCall) SortOrder(sortOrder string) *FloodlightActivityGroupsListCall {
33501	c.urlParams_.Set("sortOrder", sortOrder)
33502	return c
33503}
33504
33505// Type sets the optional parameter "type": Select only floodlight
33506// activity groups with the specified floodlight activity group type.
33507//
33508// Possible values:
33509//   "COUNTER"
33510//   "SALE"
33511func (c *FloodlightActivityGroupsListCall) Type(type_ string) *FloodlightActivityGroupsListCall {
33512	c.urlParams_.Set("type", type_)
33513	return c
33514}
33515
33516// Fields allows partial responses to be retrieved. See
33517// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33518// for more information.
33519func (c *FloodlightActivityGroupsListCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsListCall {
33520	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33521	return c
33522}
33523
33524// IfNoneMatch sets the optional parameter which makes the operation
33525// fail if the object's ETag matches the given value. This is useful for
33526// getting updates only after the object has changed since the last
33527// request. Use googleapi.IsNotModified to check whether the response
33528// error from Do is the result of In-None-Match.
33529func (c *FloodlightActivityGroupsListCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsListCall {
33530	c.ifNoneMatch_ = entityTag
33531	return c
33532}
33533
33534// Context sets the context to be used in this call's Do method. Any
33535// pending HTTP request will be aborted if the provided context is
33536// canceled.
33537func (c *FloodlightActivityGroupsListCall) Context(ctx context.Context) *FloodlightActivityGroupsListCall {
33538	c.ctx_ = ctx
33539	return c
33540}
33541
33542// Header returns an http.Header that can be modified by the caller to
33543// add HTTP headers to the request.
33544func (c *FloodlightActivityGroupsListCall) Header() http.Header {
33545	if c.header_ == nil {
33546		c.header_ = make(http.Header)
33547	}
33548	return c.header_
33549}
33550
33551func (c *FloodlightActivityGroupsListCall) doRequest(alt string) (*http.Response, error) {
33552	reqHeaders := make(http.Header)
33553	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
33554	for k, v := range c.header_ {
33555		reqHeaders[k] = v
33556	}
33557	reqHeaders.Set("User-Agent", c.s.userAgent())
33558	if c.ifNoneMatch_ != "" {
33559		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33560	}
33561	var body io.Reader = nil
33562	c.urlParams_.Set("alt", alt)
33563	c.urlParams_.Set("prettyPrint", "false")
33564	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33565	urls += "?" + c.urlParams_.Encode()
33566	req, err := http.NewRequest("GET", urls, body)
33567	if err != nil {
33568		return nil, err
33569	}
33570	req.Header = reqHeaders
33571	googleapi.Expand(req.URL, map[string]string{
33572		"profileId": strconv.FormatInt(c.profileId, 10),
33573	})
33574	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33575}
33576
33577// Do executes the "dfareporting.floodlightActivityGroups.list" call.
33578// Exactly one of *FloodlightActivityGroupsListResponse or error will be
33579// non-nil. Any non-2xx status code is an error. Response headers are in
33580// either *FloodlightActivityGroupsListResponse.ServerResponse.Header or
33581// (if a response was returned at all) in
33582// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
33583// whether the returned error was because http.StatusNotModified was
33584// returned.
33585func (c *FloodlightActivityGroupsListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroupsListResponse, error) {
33586	gensupport.SetOptions(c.urlParams_, opts...)
33587	res, err := c.doRequest("json")
33588	if res != nil && res.StatusCode == http.StatusNotModified {
33589		if res.Body != nil {
33590			res.Body.Close()
33591		}
33592		return nil, &googleapi.Error{
33593			Code:   res.StatusCode,
33594			Header: res.Header,
33595		}
33596	}
33597	if err != nil {
33598		return nil, err
33599	}
33600	defer googleapi.CloseBody(res)
33601	if err := googleapi.CheckResponse(res); err != nil {
33602		return nil, err
33603	}
33604	ret := &FloodlightActivityGroupsListResponse{
33605		ServerResponse: googleapi.ServerResponse{
33606			Header:         res.Header,
33607			HTTPStatusCode: res.StatusCode,
33608		},
33609	}
33610	target := &ret
33611	if err := gensupport.DecodeResponse(target, res); err != nil {
33612		return nil, err
33613	}
33614	return ret, nil
33615	// {
33616	//   "description": "Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging.",
33617	//   "httpMethod": "GET",
33618	//   "id": "dfareporting.floodlightActivityGroups.list",
33619	//   "parameterOrder": [
33620	//     "profileId"
33621	//   ],
33622	//   "parameters": {
33623	//     "advertiserId": {
33624	//       "description": "Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
33625	//       "format": "int64",
33626	//       "location": "query",
33627	//       "type": "string"
33628	//     },
33629	//     "floodlightConfigurationId": {
33630	//       "description": "Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId for a non-empty result.",
33631	//       "format": "int64",
33632	//       "location": "query",
33633	//       "type": "string"
33634	//     },
33635	//     "ids": {
33636	//       "description": "Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
33637	//       "format": "int64",
33638	//       "location": "query",
33639	//       "repeated": true,
33640	//       "type": "string"
33641	//     },
33642	//     "maxResults": {
33643	//       "default": "1000",
33644	//       "description": "Maximum number of results to return.",
33645	//       "format": "int32",
33646	//       "location": "query",
33647	//       "maximum": "1000",
33648	//       "minimum": "0",
33649	//       "type": "integer"
33650	//     },
33651	//     "pageToken": {
33652	//       "description": "Value of the nextPageToken from the previous result page.",
33653	//       "location": "query",
33654	//       "type": "string"
33655	//     },
33656	//     "profileId": {
33657	//       "description": "User profile ID associated with this request.",
33658	//       "format": "int64",
33659	//       "location": "path",
33660	//       "required": true,
33661	//       "type": "string"
33662	//     },
33663	//     "searchString": {
33664	//       "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\".",
33665	//       "location": "query",
33666	//       "type": "string"
33667	//     },
33668	//     "sortField": {
33669	//       "default": "ID",
33670	//       "description": "Field by which to sort the list.",
33671	//       "enum": [
33672	//         "ID",
33673	//         "NAME"
33674	//       ],
33675	//       "enumDescriptions": [
33676	//         "",
33677	//         ""
33678	//       ],
33679	//       "location": "query",
33680	//       "type": "string"
33681	//     },
33682	//     "sortOrder": {
33683	//       "default": "ASCENDING",
33684	//       "description": "Order of sorted results.",
33685	//       "enum": [
33686	//         "ASCENDING",
33687	//         "DESCENDING"
33688	//       ],
33689	//       "enumDescriptions": [
33690	//         "",
33691	//         ""
33692	//       ],
33693	//       "location": "query",
33694	//       "type": "string"
33695	//     },
33696	//     "type": {
33697	//       "description": "Select only floodlight activity groups with the specified floodlight activity group type.",
33698	//       "enum": [
33699	//         "COUNTER",
33700	//         "SALE"
33701	//       ],
33702	//       "enumDescriptions": [
33703	//         "",
33704	//         ""
33705	//       ],
33706	//       "location": "query",
33707	//       "type": "string"
33708	//     }
33709	//   },
33710	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33711	//   "response": {
33712	//     "$ref": "FloodlightActivityGroupsListResponse"
33713	//   },
33714	//   "scopes": [
33715	//     "https://www.googleapis.com/auth/dfatrafficking"
33716	//   ]
33717	// }
33718
33719}
33720
33721// Pages invokes f for each page of results.
33722// A non-nil error returned from f will halt the iteration.
33723// The provided context supersedes any context provided to the Context method.
33724func (c *FloodlightActivityGroupsListCall) Pages(ctx context.Context, f func(*FloodlightActivityGroupsListResponse) error) error {
33725	c.ctx_ = ctx
33726	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
33727	for {
33728		x, err := c.Do()
33729		if err != nil {
33730			return err
33731		}
33732		if err := f(x); err != nil {
33733			return err
33734		}
33735		if x.NextPageToken == "" {
33736			return nil
33737		}
33738		c.PageToken(x.NextPageToken)
33739	}
33740}
33741
33742// method id "dfareporting.floodlightActivityGroups.patch":
33743
33744type FloodlightActivityGroupsPatchCall struct {
33745	s                       *Service
33746	profileId               int64
33747	floodlightactivitygroup *FloodlightActivityGroup
33748	urlParams_              gensupport.URLParams
33749	ctx_                    context.Context
33750	header_                 http.Header
33751}
33752
33753// Patch: Updates an existing floodlight activity group. This method
33754// supports patch semantics.
33755func (r *FloodlightActivityGroupsService) Patch(profileId int64, id int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsPatchCall {
33756	c := &FloodlightActivityGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33757	c.profileId = profileId
33758	c.urlParams_.Set("id", fmt.Sprint(id))
33759	c.floodlightactivitygroup = floodlightactivitygroup
33760	return c
33761}
33762
33763// Fields allows partial responses to be retrieved. See
33764// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33765// for more information.
33766func (c *FloodlightActivityGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsPatchCall {
33767	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33768	return c
33769}
33770
33771// Context sets the context to be used in this call's Do method. Any
33772// pending HTTP request will be aborted if the provided context is
33773// canceled.
33774func (c *FloodlightActivityGroupsPatchCall) Context(ctx context.Context) *FloodlightActivityGroupsPatchCall {
33775	c.ctx_ = ctx
33776	return c
33777}
33778
33779// Header returns an http.Header that can be modified by the caller to
33780// add HTTP headers to the request.
33781func (c *FloodlightActivityGroupsPatchCall) Header() http.Header {
33782	if c.header_ == nil {
33783		c.header_ = make(http.Header)
33784	}
33785	return c.header_
33786}
33787
33788func (c *FloodlightActivityGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
33789	reqHeaders := make(http.Header)
33790	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
33791	for k, v := range c.header_ {
33792		reqHeaders[k] = v
33793	}
33794	reqHeaders.Set("User-Agent", c.s.userAgent())
33795	var body io.Reader = nil
33796	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33797	if err != nil {
33798		return nil, err
33799	}
33800	reqHeaders.Set("Content-Type", "application/json")
33801	c.urlParams_.Set("alt", alt)
33802	c.urlParams_.Set("prettyPrint", "false")
33803	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33804	urls += "?" + c.urlParams_.Encode()
33805	req, err := http.NewRequest("PATCH", urls, body)
33806	if err != nil {
33807		return nil, err
33808	}
33809	req.Header = reqHeaders
33810	googleapi.Expand(req.URL, map[string]string{
33811		"profileId": strconv.FormatInt(c.profileId, 10),
33812	})
33813	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33814}
33815
33816// Do executes the "dfareporting.floodlightActivityGroups.patch" call.
33817// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33818// non-2xx status code is an error. Response headers are in either
33819// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33820// returned at all) in error.(*googleapi.Error).Header. Use
33821// googleapi.IsNotModified to check whether the returned error was
33822// because http.StatusNotModified was returned.
33823func (c *FloodlightActivityGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33824	gensupport.SetOptions(c.urlParams_, opts...)
33825	res, err := c.doRequest("json")
33826	if res != nil && res.StatusCode == http.StatusNotModified {
33827		if res.Body != nil {
33828			res.Body.Close()
33829		}
33830		return nil, &googleapi.Error{
33831			Code:   res.StatusCode,
33832			Header: res.Header,
33833		}
33834	}
33835	if err != nil {
33836		return nil, err
33837	}
33838	defer googleapi.CloseBody(res)
33839	if err := googleapi.CheckResponse(res); err != nil {
33840		return nil, err
33841	}
33842	ret := &FloodlightActivityGroup{
33843		ServerResponse: googleapi.ServerResponse{
33844			Header:         res.Header,
33845			HTTPStatusCode: res.StatusCode,
33846		},
33847	}
33848	target := &ret
33849	if err := gensupport.DecodeResponse(target, res); err != nil {
33850		return nil, err
33851	}
33852	return ret, nil
33853	// {
33854	//   "description": "Updates an existing floodlight activity group. This method supports patch semantics.",
33855	//   "httpMethod": "PATCH",
33856	//   "id": "dfareporting.floodlightActivityGroups.patch",
33857	//   "parameterOrder": [
33858	//     "profileId",
33859	//     "id"
33860	//   ],
33861	//   "parameters": {
33862	//     "id": {
33863	//       "description": "Floodlight activity Group ID.",
33864	//       "format": "int64",
33865	//       "location": "query",
33866	//       "required": true,
33867	//       "type": "string"
33868	//     },
33869	//     "profileId": {
33870	//       "description": "User profile ID associated with this request.",
33871	//       "format": "int64",
33872	//       "location": "path",
33873	//       "required": true,
33874	//       "type": "string"
33875	//     }
33876	//   },
33877	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33878	//   "request": {
33879	//     "$ref": "FloodlightActivityGroup"
33880	//   },
33881	//   "response": {
33882	//     "$ref": "FloodlightActivityGroup"
33883	//   },
33884	//   "scopes": [
33885	//     "https://www.googleapis.com/auth/dfatrafficking"
33886	//   ]
33887	// }
33888
33889}
33890
33891// method id "dfareporting.floodlightActivityGroups.update":
33892
33893type FloodlightActivityGroupsUpdateCall struct {
33894	s                       *Service
33895	profileId               int64
33896	floodlightactivitygroup *FloodlightActivityGroup
33897	urlParams_              gensupport.URLParams
33898	ctx_                    context.Context
33899	header_                 http.Header
33900}
33901
33902// Update: Updates an existing floodlight activity group.
33903func (r *FloodlightActivityGroupsService) Update(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsUpdateCall {
33904	c := &FloodlightActivityGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33905	c.profileId = profileId
33906	c.floodlightactivitygroup = floodlightactivitygroup
33907	return c
33908}
33909
33910// Fields allows partial responses to be retrieved. See
33911// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33912// for more information.
33913func (c *FloodlightActivityGroupsUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsUpdateCall {
33914	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33915	return c
33916}
33917
33918// Context sets the context to be used in this call's Do method. Any
33919// pending HTTP request will be aborted if the provided context is
33920// canceled.
33921func (c *FloodlightActivityGroupsUpdateCall) Context(ctx context.Context) *FloodlightActivityGroupsUpdateCall {
33922	c.ctx_ = ctx
33923	return c
33924}
33925
33926// Header returns an http.Header that can be modified by the caller to
33927// add HTTP headers to the request.
33928func (c *FloodlightActivityGroupsUpdateCall) Header() http.Header {
33929	if c.header_ == nil {
33930		c.header_ = make(http.Header)
33931	}
33932	return c.header_
33933}
33934
33935func (c *FloodlightActivityGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
33936	reqHeaders := make(http.Header)
33937	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
33938	for k, v := range c.header_ {
33939		reqHeaders[k] = v
33940	}
33941	reqHeaders.Set("User-Agent", c.s.userAgent())
33942	var body io.Reader = nil
33943	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33944	if err != nil {
33945		return nil, err
33946	}
33947	reqHeaders.Set("Content-Type", "application/json")
33948	c.urlParams_.Set("alt", alt)
33949	c.urlParams_.Set("prettyPrint", "false")
33950	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33951	urls += "?" + c.urlParams_.Encode()
33952	req, err := http.NewRequest("PUT", urls, body)
33953	if err != nil {
33954		return nil, err
33955	}
33956	req.Header = reqHeaders
33957	googleapi.Expand(req.URL, map[string]string{
33958		"profileId": strconv.FormatInt(c.profileId, 10),
33959	})
33960	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33961}
33962
33963// Do executes the "dfareporting.floodlightActivityGroups.update" call.
33964// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33965// non-2xx status code is an error. Response headers are in either
33966// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33967// returned at all) in error.(*googleapi.Error).Header. Use
33968// googleapi.IsNotModified to check whether the returned error was
33969// because http.StatusNotModified was returned.
33970func (c *FloodlightActivityGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33971	gensupport.SetOptions(c.urlParams_, opts...)
33972	res, err := c.doRequest("json")
33973	if res != nil && res.StatusCode == http.StatusNotModified {
33974		if res.Body != nil {
33975			res.Body.Close()
33976		}
33977		return nil, &googleapi.Error{
33978			Code:   res.StatusCode,
33979			Header: res.Header,
33980		}
33981	}
33982	if err != nil {
33983		return nil, err
33984	}
33985	defer googleapi.CloseBody(res)
33986	if err := googleapi.CheckResponse(res); err != nil {
33987		return nil, err
33988	}
33989	ret := &FloodlightActivityGroup{
33990		ServerResponse: googleapi.ServerResponse{
33991			Header:         res.Header,
33992			HTTPStatusCode: res.StatusCode,
33993		},
33994	}
33995	target := &ret
33996	if err := gensupport.DecodeResponse(target, res); err != nil {
33997		return nil, err
33998	}
33999	return ret, nil
34000	// {
34001	//   "description": "Updates an existing floodlight activity group.",
34002	//   "httpMethod": "PUT",
34003	//   "id": "dfareporting.floodlightActivityGroups.update",
34004	//   "parameterOrder": [
34005	//     "profileId"
34006	//   ],
34007	//   "parameters": {
34008	//     "profileId": {
34009	//       "description": "User profile ID associated with this request.",
34010	//       "format": "int64",
34011	//       "location": "path",
34012	//       "required": true,
34013	//       "type": "string"
34014	//     }
34015	//   },
34016	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
34017	//   "request": {
34018	//     "$ref": "FloodlightActivityGroup"
34019	//   },
34020	//   "response": {
34021	//     "$ref": "FloodlightActivityGroup"
34022	//   },
34023	//   "scopes": [
34024	//     "https://www.googleapis.com/auth/dfatrafficking"
34025	//   ]
34026	// }
34027
34028}
34029
34030// method id "dfareporting.floodlightConfigurations.get":
34031
34032type FloodlightConfigurationsGetCall struct {
34033	s            *Service
34034	profileId    int64
34035	id           int64
34036	urlParams_   gensupport.URLParams
34037	ifNoneMatch_ string
34038	ctx_         context.Context
34039	header_      http.Header
34040}
34041
34042// Get: Gets one floodlight configuration by ID.
34043func (r *FloodlightConfigurationsService) Get(profileId int64, id int64) *FloodlightConfigurationsGetCall {
34044	c := &FloodlightConfigurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34045	c.profileId = profileId
34046	c.id = id
34047	return c
34048}
34049
34050// Fields allows partial responses to be retrieved. See
34051// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34052// for more information.
34053func (c *FloodlightConfigurationsGetCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsGetCall {
34054	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34055	return c
34056}
34057
34058// IfNoneMatch sets the optional parameter which makes the operation
34059// fail if the object's ETag matches the given value. This is useful for
34060// getting updates only after the object has changed since the last
34061// request. Use googleapi.IsNotModified to check whether the response
34062// error from Do is the result of In-None-Match.
34063func (c *FloodlightConfigurationsGetCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsGetCall {
34064	c.ifNoneMatch_ = entityTag
34065	return c
34066}
34067
34068// Context sets the context to be used in this call's Do method. Any
34069// pending HTTP request will be aborted if the provided context is
34070// canceled.
34071func (c *FloodlightConfigurationsGetCall) Context(ctx context.Context) *FloodlightConfigurationsGetCall {
34072	c.ctx_ = ctx
34073	return c
34074}
34075
34076// Header returns an http.Header that can be modified by the caller to
34077// add HTTP headers to the request.
34078func (c *FloodlightConfigurationsGetCall) Header() http.Header {
34079	if c.header_ == nil {
34080		c.header_ = make(http.Header)
34081	}
34082	return c.header_
34083}
34084
34085func (c *FloodlightConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
34086	reqHeaders := make(http.Header)
34087	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
34088	for k, v := range c.header_ {
34089		reqHeaders[k] = v
34090	}
34091	reqHeaders.Set("User-Agent", c.s.userAgent())
34092	if c.ifNoneMatch_ != "" {
34093		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34094	}
34095	var body io.Reader = nil
34096	c.urlParams_.Set("alt", alt)
34097	c.urlParams_.Set("prettyPrint", "false")
34098	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations/{id}")
34099	urls += "?" + c.urlParams_.Encode()
34100	req, err := http.NewRequest("GET", urls, body)
34101	if err != nil {
34102		return nil, err
34103	}
34104	req.Header = reqHeaders
34105	googleapi.Expand(req.URL, map[string]string{
34106		"profileId": strconv.FormatInt(c.profileId, 10),
34107		"id":        strconv.FormatInt(c.id, 10),
34108	})
34109	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34110}
34111
34112// Do executes the "dfareporting.floodlightConfigurations.get" call.
34113// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34114// non-2xx status code is an error. Response headers are in either
34115// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34116// returned at all) in error.(*googleapi.Error).Header. Use
34117// googleapi.IsNotModified to check whether the returned error was
34118// because http.StatusNotModified was returned.
34119func (c *FloodlightConfigurationsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34120	gensupport.SetOptions(c.urlParams_, opts...)
34121	res, err := c.doRequest("json")
34122	if res != nil && res.StatusCode == http.StatusNotModified {
34123		if res.Body != nil {
34124			res.Body.Close()
34125		}
34126		return nil, &googleapi.Error{
34127			Code:   res.StatusCode,
34128			Header: res.Header,
34129		}
34130	}
34131	if err != nil {
34132		return nil, err
34133	}
34134	defer googleapi.CloseBody(res)
34135	if err := googleapi.CheckResponse(res); err != nil {
34136		return nil, err
34137	}
34138	ret := &FloodlightConfiguration{
34139		ServerResponse: googleapi.ServerResponse{
34140			Header:         res.Header,
34141			HTTPStatusCode: res.StatusCode,
34142		},
34143	}
34144	target := &ret
34145	if err := gensupport.DecodeResponse(target, res); err != nil {
34146		return nil, err
34147	}
34148	return ret, nil
34149	// {
34150	//   "description": "Gets one floodlight configuration by ID.",
34151	//   "httpMethod": "GET",
34152	//   "id": "dfareporting.floodlightConfigurations.get",
34153	//   "parameterOrder": [
34154	//     "profileId",
34155	//     "id"
34156	//   ],
34157	//   "parameters": {
34158	//     "id": {
34159	//       "description": "Floodlight configuration ID.",
34160	//       "format": "int64",
34161	//       "location": "path",
34162	//       "required": true,
34163	//       "type": "string"
34164	//     },
34165	//     "profileId": {
34166	//       "description": "User profile ID associated with this request.",
34167	//       "format": "int64",
34168	//       "location": "path",
34169	//       "required": true,
34170	//       "type": "string"
34171	//     }
34172	//   },
34173	//   "path": "userprofiles/{profileId}/floodlightConfigurations/{id}",
34174	//   "response": {
34175	//     "$ref": "FloodlightConfiguration"
34176	//   },
34177	//   "scopes": [
34178	//     "https://www.googleapis.com/auth/dfatrafficking"
34179	//   ]
34180	// }
34181
34182}
34183
34184// method id "dfareporting.floodlightConfigurations.list":
34185
34186type FloodlightConfigurationsListCall struct {
34187	s            *Service
34188	profileId    int64
34189	urlParams_   gensupport.URLParams
34190	ifNoneMatch_ string
34191	ctx_         context.Context
34192	header_      http.Header
34193}
34194
34195// List: Retrieves a list of floodlight configurations, possibly
34196// filtered.
34197func (r *FloodlightConfigurationsService) List(profileId int64) *FloodlightConfigurationsListCall {
34198	c := &FloodlightConfigurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34199	c.profileId = profileId
34200	return c
34201}
34202
34203// Ids sets the optional parameter "ids": Set of IDs of floodlight
34204// configurations to retrieve. Required field; otherwise an empty list
34205// will be returned.
34206func (c *FloodlightConfigurationsListCall) Ids(ids ...int64) *FloodlightConfigurationsListCall {
34207	var ids_ []string
34208	for _, v := range ids {
34209		ids_ = append(ids_, fmt.Sprint(v))
34210	}
34211	c.urlParams_.SetMulti("ids", ids_)
34212	return c
34213}
34214
34215// Fields allows partial responses to be retrieved. See
34216// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34217// for more information.
34218func (c *FloodlightConfigurationsListCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsListCall {
34219	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34220	return c
34221}
34222
34223// IfNoneMatch sets the optional parameter which makes the operation
34224// fail if the object's ETag matches the given value. This is useful for
34225// getting updates only after the object has changed since the last
34226// request. Use googleapi.IsNotModified to check whether the response
34227// error from Do is the result of In-None-Match.
34228func (c *FloodlightConfigurationsListCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsListCall {
34229	c.ifNoneMatch_ = entityTag
34230	return c
34231}
34232
34233// Context sets the context to be used in this call's Do method. Any
34234// pending HTTP request will be aborted if the provided context is
34235// canceled.
34236func (c *FloodlightConfigurationsListCall) Context(ctx context.Context) *FloodlightConfigurationsListCall {
34237	c.ctx_ = ctx
34238	return c
34239}
34240
34241// Header returns an http.Header that can be modified by the caller to
34242// add HTTP headers to the request.
34243func (c *FloodlightConfigurationsListCall) Header() http.Header {
34244	if c.header_ == nil {
34245		c.header_ = make(http.Header)
34246	}
34247	return c.header_
34248}
34249
34250func (c *FloodlightConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
34251	reqHeaders := make(http.Header)
34252	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
34253	for k, v := range c.header_ {
34254		reqHeaders[k] = v
34255	}
34256	reqHeaders.Set("User-Agent", c.s.userAgent())
34257	if c.ifNoneMatch_ != "" {
34258		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34259	}
34260	var body io.Reader = nil
34261	c.urlParams_.Set("alt", alt)
34262	c.urlParams_.Set("prettyPrint", "false")
34263	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34264	urls += "?" + c.urlParams_.Encode()
34265	req, err := http.NewRequest("GET", urls, body)
34266	if err != nil {
34267		return nil, err
34268	}
34269	req.Header = reqHeaders
34270	googleapi.Expand(req.URL, map[string]string{
34271		"profileId": strconv.FormatInt(c.profileId, 10),
34272	})
34273	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34274}
34275
34276// Do executes the "dfareporting.floodlightConfigurations.list" call.
34277// Exactly one of *FloodlightConfigurationsListResponse or error will be
34278// non-nil. Any non-2xx status code is an error. Response headers are in
34279// either *FloodlightConfigurationsListResponse.ServerResponse.Header or
34280// (if a response was returned at all) in
34281// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
34282// whether the returned error was because http.StatusNotModified was
34283// returned.
34284func (c *FloodlightConfigurationsListCall) Do(opts ...googleapi.CallOption) (*FloodlightConfigurationsListResponse, error) {
34285	gensupport.SetOptions(c.urlParams_, opts...)
34286	res, err := c.doRequest("json")
34287	if res != nil && res.StatusCode == http.StatusNotModified {
34288		if res.Body != nil {
34289			res.Body.Close()
34290		}
34291		return nil, &googleapi.Error{
34292			Code:   res.StatusCode,
34293			Header: res.Header,
34294		}
34295	}
34296	if err != nil {
34297		return nil, err
34298	}
34299	defer googleapi.CloseBody(res)
34300	if err := googleapi.CheckResponse(res); err != nil {
34301		return nil, err
34302	}
34303	ret := &FloodlightConfigurationsListResponse{
34304		ServerResponse: googleapi.ServerResponse{
34305			Header:         res.Header,
34306			HTTPStatusCode: res.StatusCode,
34307		},
34308	}
34309	target := &ret
34310	if err := gensupport.DecodeResponse(target, res); err != nil {
34311		return nil, err
34312	}
34313	return ret, nil
34314	// {
34315	//   "description": "Retrieves a list of floodlight configurations, possibly filtered.",
34316	//   "httpMethod": "GET",
34317	//   "id": "dfareporting.floodlightConfigurations.list",
34318	//   "parameterOrder": [
34319	//     "profileId"
34320	//   ],
34321	//   "parameters": {
34322	//     "ids": {
34323	//       "description": "Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned.",
34324	//       "format": "int64",
34325	//       "location": "query",
34326	//       "repeated": true,
34327	//       "type": "string"
34328	//     },
34329	//     "profileId": {
34330	//       "description": "User profile ID associated with this request.",
34331	//       "format": "int64",
34332	//       "location": "path",
34333	//       "required": true,
34334	//       "type": "string"
34335	//     }
34336	//   },
34337	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34338	//   "response": {
34339	//     "$ref": "FloodlightConfigurationsListResponse"
34340	//   },
34341	//   "scopes": [
34342	//     "https://www.googleapis.com/auth/dfatrafficking"
34343	//   ]
34344	// }
34345
34346}
34347
34348// method id "dfareporting.floodlightConfigurations.patch":
34349
34350type FloodlightConfigurationsPatchCall struct {
34351	s                       *Service
34352	profileId               int64
34353	floodlightconfiguration *FloodlightConfiguration
34354	urlParams_              gensupport.URLParams
34355	ctx_                    context.Context
34356	header_                 http.Header
34357}
34358
34359// Patch: Updates an existing floodlight configuration. This method
34360// supports patch semantics.
34361func (r *FloodlightConfigurationsService) Patch(profileId int64, id int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsPatchCall {
34362	c := &FloodlightConfigurationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34363	c.profileId = profileId
34364	c.urlParams_.Set("id", fmt.Sprint(id))
34365	c.floodlightconfiguration = floodlightconfiguration
34366	return c
34367}
34368
34369// Fields allows partial responses to be retrieved. See
34370// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34371// for more information.
34372func (c *FloodlightConfigurationsPatchCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsPatchCall {
34373	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34374	return c
34375}
34376
34377// Context sets the context to be used in this call's Do method. Any
34378// pending HTTP request will be aborted if the provided context is
34379// canceled.
34380func (c *FloodlightConfigurationsPatchCall) Context(ctx context.Context) *FloodlightConfigurationsPatchCall {
34381	c.ctx_ = ctx
34382	return c
34383}
34384
34385// Header returns an http.Header that can be modified by the caller to
34386// add HTTP headers to the request.
34387func (c *FloodlightConfigurationsPatchCall) Header() http.Header {
34388	if c.header_ == nil {
34389		c.header_ = make(http.Header)
34390	}
34391	return c.header_
34392}
34393
34394func (c *FloodlightConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
34395	reqHeaders := make(http.Header)
34396	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
34397	for k, v := range c.header_ {
34398		reqHeaders[k] = v
34399	}
34400	reqHeaders.Set("User-Agent", c.s.userAgent())
34401	var body io.Reader = nil
34402	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
34403	if err != nil {
34404		return nil, err
34405	}
34406	reqHeaders.Set("Content-Type", "application/json")
34407	c.urlParams_.Set("alt", alt)
34408	c.urlParams_.Set("prettyPrint", "false")
34409	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34410	urls += "?" + c.urlParams_.Encode()
34411	req, err := http.NewRequest("PATCH", urls, body)
34412	if err != nil {
34413		return nil, err
34414	}
34415	req.Header = reqHeaders
34416	googleapi.Expand(req.URL, map[string]string{
34417		"profileId": strconv.FormatInt(c.profileId, 10),
34418	})
34419	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34420}
34421
34422// Do executes the "dfareporting.floodlightConfigurations.patch" call.
34423// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34424// non-2xx status code is an error. Response headers are in either
34425// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34426// returned at all) in error.(*googleapi.Error).Header. Use
34427// googleapi.IsNotModified to check whether the returned error was
34428// because http.StatusNotModified was returned.
34429func (c *FloodlightConfigurationsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34430	gensupport.SetOptions(c.urlParams_, opts...)
34431	res, err := c.doRequest("json")
34432	if res != nil && res.StatusCode == http.StatusNotModified {
34433		if res.Body != nil {
34434			res.Body.Close()
34435		}
34436		return nil, &googleapi.Error{
34437			Code:   res.StatusCode,
34438			Header: res.Header,
34439		}
34440	}
34441	if err != nil {
34442		return nil, err
34443	}
34444	defer googleapi.CloseBody(res)
34445	if err := googleapi.CheckResponse(res); err != nil {
34446		return nil, err
34447	}
34448	ret := &FloodlightConfiguration{
34449		ServerResponse: googleapi.ServerResponse{
34450			Header:         res.Header,
34451			HTTPStatusCode: res.StatusCode,
34452		},
34453	}
34454	target := &ret
34455	if err := gensupport.DecodeResponse(target, res); err != nil {
34456		return nil, err
34457	}
34458	return ret, nil
34459	// {
34460	//   "description": "Updates an existing floodlight configuration. This method supports patch semantics.",
34461	//   "httpMethod": "PATCH",
34462	//   "id": "dfareporting.floodlightConfigurations.patch",
34463	//   "parameterOrder": [
34464	//     "profileId",
34465	//     "id"
34466	//   ],
34467	//   "parameters": {
34468	//     "id": {
34469	//       "description": "Floodlight configuration ID.",
34470	//       "format": "int64",
34471	//       "location": "query",
34472	//       "required": true,
34473	//       "type": "string"
34474	//     },
34475	//     "profileId": {
34476	//       "description": "User profile ID associated with this request.",
34477	//       "format": "int64",
34478	//       "location": "path",
34479	//       "required": true,
34480	//       "type": "string"
34481	//     }
34482	//   },
34483	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34484	//   "request": {
34485	//     "$ref": "FloodlightConfiguration"
34486	//   },
34487	//   "response": {
34488	//     "$ref": "FloodlightConfiguration"
34489	//   },
34490	//   "scopes": [
34491	//     "https://www.googleapis.com/auth/dfatrafficking"
34492	//   ]
34493	// }
34494
34495}
34496
34497// method id "dfareporting.floodlightConfigurations.update":
34498
34499type FloodlightConfigurationsUpdateCall struct {
34500	s                       *Service
34501	profileId               int64
34502	floodlightconfiguration *FloodlightConfiguration
34503	urlParams_              gensupport.URLParams
34504	ctx_                    context.Context
34505	header_                 http.Header
34506}
34507
34508// Update: Updates an existing floodlight configuration.
34509func (r *FloodlightConfigurationsService) Update(profileId int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsUpdateCall {
34510	c := &FloodlightConfigurationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34511	c.profileId = profileId
34512	c.floodlightconfiguration = floodlightconfiguration
34513	return c
34514}
34515
34516// Fields allows partial responses to be retrieved. See
34517// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34518// for more information.
34519func (c *FloodlightConfigurationsUpdateCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsUpdateCall {
34520	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34521	return c
34522}
34523
34524// Context sets the context to be used in this call's Do method. Any
34525// pending HTTP request will be aborted if the provided context is
34526// canceled.
34527func (c *FloodlightConfigurationsUpdateCall) Context(ctx context.Context) *FloodlightConfigurationsUpdateCall {
34528	c.ctx_ = ctx
34529	return c
34530}
34531
34532// Header returns an http.Header that can be modified by the caller to
34533// add HTTP headers to the request.
34534func (c *FloodlightConfigurationsUpdateCall) Header() http.Header {
34535	if c.header_ == nil {
34536		c.header_ = make(http.Header)
34537	}
34538	return c.header_
34539}
34540
34541func (c *FloodlightConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
34542	reqHeaders := make(http.Header)
34543	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
34544	for k, v := range c.header_ {
34545		reqHeaders[k] = v
34546	}
34547	reqHeaders.Set("User-Agent", c.s.userAgent())
34548	var body io.Reader = nil
34549	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
34550	if err != nil {
34551		return nil, err
34552	}
34553	reqHeaders.Set("Content-Type", "application/json")
34554	c.urlParams_.Set("alt", alt)
34555	c.urlParams_.Set("prettyPrint", "false")
34556	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34557	urls += "?" + c.urlParams_.Encode()
34558	req, err := http.NewRequest("PUT", urls, body)
34559	if err != nil {
34560		return nil, err
34561	}
34562	req.Header = reqHeaders
34563	googleapi.Expand(req.URL, map[string]string{
34564		"profileId": strconv.FormatInt(c.profileId, 10),
34565	})
34566	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34567}
34568
34569// Do executes the "dfareporting.floodlightConfigurations.update" call.
34570// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34571// non-2xx status code is an error. Response headers are in either
34572// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34573// returned at all) in error.(*googleapi.Error).Header. Use
34574// googleapi.IsNotModified to check whether the returned error was
34575// because http.StatusNotModified was returned.
34576func (c *FloodlightConfigurationsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34577	gensupport.SetOptions(c.urlParams_, opts...)
34578	res, err := c.doRequest("json")
34579	if res != nil && res.StatusCode == http.StatusNotModified {
34580		if res.Body != nil {
34581			res.Body.Close()
34582		}
34583		return nil, &googleapi.Error{
34584			Code:   res.StatusCode,
34585			Header: res.Header,
34586		}
34587	}
34588	if err != nil {
34589		return nil, err
34590	}
34591	defer googleapi.CloseBody(res)
34592	if err := googleapi.CheckResponse(res); err != nil {
34593		return nil, err
34594	}
34595	ret := &FloodlightConfiguration{
34596		ServerResponse: googleapi.ServerResponse{
34597			Header:         res.Header,
34598			HTTPStatusCode: res.StatusCode,
34599		},
34600	}
34601	target := &ret
34602	if err := gensupport.DecodeResponse(target, res); err != nil {
34603		return nil, err
34604	}
34605	return ret, nil
34606	// {
34607	//   "description": "Updates an existing floodlight configuration.",
34608	//   "httpMethod": "PUT",
34609	//   "id": "dfareporting.floodlightConfigurations.update",
34610	//   "parameterOrder": [
34611	//     "profileId"
34612	//   ],
34613	//   "parameters": {
34614	//     "profileId": {
34615	//       "description": "User profile ID associated with this request.",
34616	//       "format": "int64",
34617	//       "location": "path",
34618	//       "required": true,
34619	//       "type": "string"
34620	//     }
34621	//   },
34622	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34623	//   "request": {
34624	//     "$ref": "FloodlightConfiguration"
34625	//   },
34626	//   "response": {
34627	//     "$ref": "FloodlightConfiguration"
34628	//   },
34629	//   "scopes": [
34630	//     "https://www.googleapis.com/auth/dfatrafficking"
34631	//   ]
34632	// }
34633
34634}
34635
34636// method id "dfareporting.inventoryItems.get":
34637
34638type InventoryItemsGetCall struct {
34639	s            *Service
34640	profileId    int64
34641	projectId    int64
34642	id           int64
34643	urlParams_   gensupport.URLParams
34644	ifNoneMatch_ string
34645	ctx_         context.Context
34646	header_      http.Header
34647}
34648
34649// Get: Gets one inventory item by ID.
34650func (r *InventoryItemsService) Get(profileId int64, projectId int64, id int64) *InventoryItemsGetCall {
34651	c := &InventoryItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34652	c.profileId = profileId
34653	c.projectId = projectId
34654	c.id = id
34655	return c
34656}
34657
34658// Fields allows partial responses to be retrieved. See
34659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34660// for more information.
34661func (c *InventoryItemsGetCall) Fields(s ...googleapi.Field) *InventoryItemsGetCall {
34662	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34663	return c
34664}
34665
34666// IfNoneMatch sets the optional parameter which makes the operation
34667// fail if the object's ETag matches the given value. This is useful for
34668// getting updates only after the object has changed since the last
34669// request. Use googleapi.IsNotModified to check whether the response
34670// error from Do is the result of In-None-Match.
34671func (c *InventoryItemsGetCall) IfNoneMatch(entityTag string) *InventoryItemsGetCall {
34672	c.ifNoneMatch_ = entityTag
34673	return c
34674}
34675
34676// Context sets the context to be used in this call's Do method. Any
34677// pending HTTP request will be aborted if the provided context is
34678// canceled.
34679func (c *InventoryItemsGetCall) Context(ctx context.Context) *InventoryItemsGetCall {
34680	c.ctx_ = ctx
34681	return c
34682}
34683
34684// Header returns an http.Header that can be modified by the caller to
34685// add HTTP headers to the request.
34686func (c *InventoryItemsGetCall) Header() http.Header {
34687	if c.header_ == nil {
34688		c.header_ = make(http.Header)
34689	}
34690	return c.header_
34691}
34692
34693func (c *InventoryItemsGetCall) doRequest(alt string) (*http.Response, error) {
34694	reqHeaders := make(http.Header)
34695	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
34696	for k, v := range c.header_ {
34697		reqHeaders[k] = v
34698	}
34699	reqHeaders.Set("User-Agent", c.s.userAgent())
34700	if c.ifNoneMatch_ != "" {
34701		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34702	}
34703	var body io.Reader = nil
34704	c.urlParams_.Set("alt", alt)
34705	c.urlParams_.Set("prettyPrint", "false")
34706	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}")
34707	urls += "?" + c.urlParams_.Encode()
34708	req, err := http.NewRequest("GET", urls, body)
34709	if err != nil {
34710		return nil, err
34711	}
34712	req.Header = reqHeaders
34713	googleapi.Expand(req.URL, map[string]string{
34714		"profileId": strconv.FormatInt(c.profileId, 10),
34715		"projectId": strconv.FormatInt(c.projectId, 10),
34716		"id":        strconv.FormatInt(c.id, 10),
34717	})
34718	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34719}
34720
34721// Do executes the "dfareporting.inventoryItems.get" call.
34722// Exactly one of *InventoryItem or error will be non-nil. Any non-2xx
34723// status code is an error. Response headers are in either
34724// *InventoryItem.ServerResponse.Header or (if a response was returned
34725// at all) in error.(*googleapi.Error).Header. Use
34726// googleapi.IsNotModified to check whether the returned error was
34727// because http.StatusNotModified was returned.
34728func (c *InventoryItemsGetCall) Do(opts ...googleapi.CallOption) (*InventoryItem, error) {
34729	gensupport.SetOptions(c.urlParams_, opts...)
34730	res, err := c.doRequest("json")
34731	if res != nil && res.StatusCode == http.StatusNotModified {
34732		if res.Body != nil {
34733			res.Body.Close()
34734		}
34735		return nil, &googleapi.Error{
34736			Code:   res.StatusCode,
34737			Header: res.Header,
34738		}
34739	}
34740	if err != nil {
34741		return nil, err
34742	}
34743	defer googleapi.CloseBody(res)
34744	if err := googleapi.CheckResponse(res); err != nil {
34745		return nil, err
34746	}
34747	ret := &InventoryItem{
34748		ServerResponse: googleapi.ServerResponse{
34749			Header:         res.Header,
34750			HTTPStatusCode: res.StatusCode,
34751		},
34752	}
34753	target := &ret
34754	if err := gensupport.DecodeResponse(target, res); err != nil {
34755		return nil, err
34756	}
34757	return ret, nil
34758	// {
34759	//   "description": "Gets one inventory item by ID.",
34760	//   "httpMethod": "GET",
34761	//   "id": "dfareporting.inventoryItems.get",
34762	//   "parameterOrder": [
34763	//     "profileId",
34764	//     "projectId",
34765	//     "id"
34766	//   ],
34767	//   "parameters": {
34768	//     "id": {
34769	//       "description": "Inventory item ID.",
34770	//       "format": "int64",
34771	//       "location": "path",
34772	//       "required": true,
34773	//       "type": "string"
34774	//     },
34775	//     "profileId": {
34776	//       "description": "User profile ID associated with this request.",
34777	//       "format": "int64",
34778	//       "location": "path",
34779	//       "required": true,
34780	//       "type": "string"
34781	//     },
34782	//     "projectId": {
34783	//       "description": "Project ID for order documents.",
34784	//       "format": "int64",
34785	//       "location": "path",
34786	//       "required": true,
34787	//       "type": "string"
34788	//     }
34789	//   },
34790	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}",
34791	//   "response": {
34792	//     "$ref": "InventoryItem"
34793	//   },
34794	//   "scopes": [
34795	//     "https://www.googleapis.com/auth/dfatrafficking"
34796	//   ]
34797	// }
34798
34799}
34800
34801// method id "dfareporting.inventoryItems.list":
34802
34803type InventoryItemsListCall struct {
34804	s            *Service
34805	profileId    int64
34806	projectId    int64
34807	urlParams_   gensupport.URLParams
34808	ifNoneMatch_ string
34809	ctx_         context.Context
34810	header_      http.Header
34811}
34812
34813// List: Retrieves a list of inventory items, possibly filtered. This
34814// method supports paging.
34815func (r *InventoryItemsService) List(profileId int64, projectId int64) *InventoryItemsListCall {
34816	c := &InventoryItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34817	c.profileId = profileId
34818	c.projectId = projectId
34819	return c
34820}
34821
34822// Ids sets the optional parameter "ids": Select only inventory items
34823// with these IDs.
34824func (c *InventoryItemsListCall) Ids(ids ...int64) *InventoryItemsListCall {
34825	var ids_ []string
34826	for _, v := range ids {
34827		ids_ = append(ids_, fmt.Sprint(v))
34828	}
34829	c.urlParams_.SetMulti("ids", ids_)
34830	return c
34831}
34832
34833// InPlan sets the optional parameter "inPlan": Select only inventory
34834// items that are in plan.
34835func (c *InventoryItemsListCall) InPlan(inPlan bool) *InventoryItemsListCall {
34836	c.urlParams_.Set("inPlan", fmt.Sprint(inPlan))
34837	return c
34838}
34839
34840// MaxResults sets the optional parameter "maxResults": Maximum number
34841// of results to return.
34842func (c *InventoryItemsListCall) MaxResults(maxResults int64) *InventoryItemsListCall {
34843	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
34844	return c
34845}
34846
34847// OrderId sets the optional parameter "orderId": Select only inventory
34848// items that belong to specified orders.
34849func (c *InventoryItemsListCall) OrderId(orderId ...int64) *InventoryItemsListCall {
34850	var orderId_ []string
34851	for _, v := range orderId {
34852		orderId_ = append(orderId_, fmt.Sprint(v))
34853	}
34854	c.urlParams_.SetMulti("orderId", orderId_)
34855	return c
34856}
34857
34858// PageToken sets the optional parameter "pageToken": Value of the
34859// nextPageToken from the previous result page.
34860func (c *InventoryItemsListCall) PageToken(pageToken string) *InventoryItemsListCall {
34861	c.urlParams_.Set("pageToken", pageToken)
34862	return c
34863}
34864
34865// SiteId sets the optional parameter "siteId": Select only inventory
34866// items that are associated with these sites.
34867func (c *InventoryItemsListCall) SiteId(siteId ...int64) *InventoryItemsListCall {
34868	var siteId_ []string
34869	for _, v := range siteId {
34870		siteId_ = append(siteId_, fmt.Sprint(v))
34871	}
34872	c.urlParams_.SetMulti("siteId", siteId_)
34873	return c
34874}
34875
34876// SortField sets the optional parameter "sortField": Field by which to
34877// sort the list.
34878//
34879// Possible values:
34880//   "ID" (default)
34881//   "NAME"
34882func (c *InventoryItemsListCall) SortField(sortField string) *InventoryItemsListCall {
34883	c.urlParams_.Set("sortField", sortField)
34884	return c
34885}
34886
34887// SortOrder sets the optional parameter "sortOrder": Order of sorted
34888// results.
34889//
34890// Possible values:
34891//   "ASCENDING" (default)
34892//   "DESCENDING"
34893func (c *InventoryItemsListCall) SortOrder(sortOrder string) *InventoryItemsListCall {
34894	c.urlParams_.Set("sortOrder", sortOrder)
34895	return c
34896}
34897
34898// Type sets the optional parameter "type": Select only inventory items
34899// with this type.
34900//
34901// Possible values:
34902//   "PLANNING_PLACEMENT_TYPE_CREDIT"
34903//   "PLANNING_PLACEMENT_TYPE_REGULAR"
34904func (c *InventoryItemsListCall) Type(type_ string) *InventoryItemsListCall {
34905	c.urlParams_.Set("type", type_)
34906	return c
34907}
34908
34909// Fields allows partial responses to be retrieved. See
34910// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34911// for more information.
34912func (c *InventoryItemsListCall) Fields(s ...googleapi.Field) *InventoryItemsListCall {
34913	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34914	return c
34915}
34916
34917// IfNoneMatch sets the optional parameter which makes the operation
34918// fail if the object's ETag matches the given value. This is useful for
34919// getting updates only after the object has changed since the last
34920// request. Use googleapi.IsNotModified to check whether the response
34921// error from Do is the result of In-None-Match.
34922func (c *InventoryItemsListCall) IfNoneMatch(entityTag string) *InventoryItemsListCall {
34923	c.ifNoneMatch_ = entityTag
34924	return c
34925}
34926
34927// Context sets the context to be used in this call's Do method. Any
34928// pending HTTP request will be aborted if the provided context is
34929// canceled.
34930func (c *InventoryItemsListCall) Context(ctx context.Context) *InventoryItemsListCall {
34931	c.ctx_ = ctx
34932	return c
34933}
34934
34935// Header returns an http.Header that can be modified by the caller to
34936// add HTTP headers to the request.
34937func (c *InventoryItemsListCall) Header() http.Header {
34938	if c.header_ == nil {
34939		c.header_ = make(http.Header)
34940	}
34941	return c.header_
34942}
34943
34944func (c *InventoryItemsListCall) doRequest(alt string) (*http.Response, error) {
34945	reqHeaders := make(http.Header)
34946	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
34947	for k, v := range c.header_ {
34948		reqHeaders[k] = v
34949	}
34950	reqHeaders.Set("User-Agent", c.s.userAgent())
34951	if c.ifNoneMatch_ != "" {
34952		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34953	}
34954	var body io.Reader = nil
34955	c.urlParams_.Set("alt", alt)
34956	c.urlParams_.Set("prettyPrint", "false")
34957	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems")
34958	urls += "?" + c.urlParams_.Encode()
34959	req, err := http.NewRequest("GET", urls, body)
34960	if err != nil {
34961		return nil, err
34962	}
34963	req.Header = reqHeaders
34964	googleapi.Expand(req.URL, map[string]string{
34965		"profileId": strconv.FormatInt(c.profileId, 10),
34966		"projectId": strconv.FormatInt(c.projectId, 10),
34967	})
34968	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34969}
34970
34971// Do executes the "dfareporting.inventoryItems.list" call.
34972// Exactly one of *InventoryItemsListResponse or error will be non-nil.
34973// Any non-2xx status code is an error. Response headers are in either
34974// *InventoryItemsListResponse.ServerResponse.Header or (if a response
34975// was returned at all) in error.(*googleapi.Error).Header. Use
34976// googleapi.IsNotModified to check whether the returned error was
34977// because http.StatusNotModified was returned.
34978func (c *InventoryItemsListCall) Do(opts ...googleapi.CallOption) (*InventoryItemsListResponse, error) {
34979	gensupport.SetOptions(c.urlParams_, opts...)
34980	res, err := c.doRequest("json")
34981	if res != nil && res.StatusCode == http.StatusNotModified {
34982		if res.Body != nil {
34983			res.Body.Close()
34984		}
34985		return nil, &googleapi.Error{
34986			Code:   res.StatusCode,
34987			Header: res.Header,
34988		}
34989	}
34990	if err != nil {
34991		return nil, err
34992	}
34993	defer googleapi.CloseBody(res)
34994	if err := googleapi.CheckResponse(res); err != nil {
34995		return nil, err
34996	}
34997	ret := &InventoryItemsListResponse{
34998		ServerResponse: googleapi.ServerResponse{
34999			Header:         res.Header,
35000			HTTPStatusCode: res.StatusCode,
35001		},
35002	}
35003	target := &ret
35004	if err := gensupport.DecodeResponse(target, res); err != nil {
35005		return nil, err
35006	}
35007	return ret, nil
35008	// {
35009	//   "description": "Retrieves a list of inventory items, possibly filtered. This method supports paging.",
35010	//   "httpMethod": "GET",
35011	//   "id": "dfareporting.inventoryItems.list",
35012	//   "parameterOrder": [
35013	//     "profileId",
35014	//     "projectId"
35015	//   ],
35016	//   "parameters": {
35017	//     "ids": {
35018	//       "description": "Select only inventory items with these IDs.",
35019	//       "format": "int64",
35020	//       "location": "query",
35021	//       "repeated": true,
35022	//       "type": "string"
35023	//     },
35024	//     "inPlan": {
35025	//       "description": "Select only inventory items that are in plan.",
35026	//       "location": "query",
35027	//       "type": "boolean"
35028	//     },
35029	//     "maxResults": {
35030	//       "default": "1000",
35031	//       "description": "Maximum number of results to return.",
35032	//       "format": "int32",
35033	//       "location": "query",
35034	//       "maximum": "1000",
35035	//       "minimum": "0",
35036	//       "type": "integer"
35037	//     },
35038	//     "orderId": {
35039	//       "description": "Select only inventory items that belong to specified orders.",
35040	//       "format": "int64",
35041	//       "location": "query",
35042	//       "repeated": true,
35043	//       "type": "string"
35044	//     },
35045	//     "pageToken": {
35046	//       "description": "Value of the nextPageToken from the previous result page.",
35047	//       "location": "query",
35048	//       "type": "string"
35049	//     },
35050	//     "profileId": {
35051	//       "description": "User profile ID associated with this request.",
35052	//       "format": "int64",
35053	//       "location": "path",
35054	//       "required": true,
35055	//       "type": "string"
35056	//     },
35057	//     "projectId": {
35058	//       "description": "Project ID for order documents.",
35059	//       "format": "int64",
35060	//       "location": "path",
35061	//       "required": true,
35062	//       "type": "string"
35063	//     },
35064	//     "siteId": {
35065	//       "description": "Select only inventory items that are associated with these sites.",
35066	//       "format": "int64",
35067	//       "location": "query",
35068	//       "repeated": true,
35069	//       "type": "string"
35070	//     },
35071	//     "sortField": {
35072	//       "default": "ID",
35073	//       "description": "Field by which to sort the list.",
35074	//       "enum": [
35075	//         "ID",
35076	//         "NAME"
35077	//       ],
35078	//       "enumDescriptions": [
35079	//         "",
35080	//         ""
35081	//       ],
35082	//       "location": "query",
35083	//       "type": "string"
35084	//     },
35085	//     "sortOrder": {
35086	//       "default": "ASCENDING",
35087	//       "description": "Order of sorted results.",
35088	//       "enum": [
35089	//         "ASCENDING",
35090	//         "DESCENDING"
35091	//       ],
35092	//       "enumDescriptions": [
35093	//         "",
35094	//         ""
35095	//       ],
35096	//       "location": "query",
35097	//       "type": "string"
35098	//     },
35099	//     "type": {
35100	//       "description": "Select only inventory items with this type.",
35101	//       "enum": [
35102	//         "PLANNING_PLACEMENT_TYPE_CREDIT",
35103	//         "PLANNING_PLACEMENT_TYPE_REGULAR"
35104	//       ],
35105	//       "enumDescriptions": [
35106	//         "",
35107	//         ""
35108	//       ],
35109	//       "location": "query",
35110	//       "type": "string"
35111	//     }
35112	//   },
35113	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems",
35114	//   "response": {
35115	//     "$ref": "InventoryItemsListResponse"
35116	//   },
35117	//   "scopes": [
35118	//     "https://www.googleapis.com/auth/dfatrafficking"
35119	//   ]
35120	// }
35121
35122}
35123
35124// Pages invokes f for each page of results.
35125// A non-nil error returned from f will halt the iteration.
35126// The provided context supersedes any context provided to the Context method.
35127func (c *InventoryItemsListCall) Pages(ctx context.Context, f func(*InventoryItemsListResponse) error) error {
35128	c.ctx_ = ctx
35129	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
35130	for {
35131		x, err := c.Do()
35132		if err != nil {
35133			return err
35134		}
35135		if err := f(x); err != nil {
35136			return err
35137		}
35138		if x.NextPageToken == "" {
35139			return nil
35140		}
35141		c.PageToken(x.NextPageToken)
35142	}
35143}
35144
35145// method id "dfareporting.languages.list":
35146
35147type LanguagesListCall struct {
35148	s            *Service
35149	profileId    int64
35150	urlParams_   gensupport.URLParams
35151	ifNoneMatch_ string
35152	ctx_         context.Context
35153	header_      http.Header
35154}
35155
35156// List: Retrieves a list of languages.
35157func (r *LanguagesService) List(profileId int64) *LanguagesListCall {
35158	c := &LanguagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35159	c.profileId = profileId
35160	return c
35161}
35162
35163// Fields allows partial responses to be retrieved. See
35164// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35165// for more information.
35166func (c *LanguagesListCall) Fields(s ...googleapi.Field) *LanguagesListCall {
35167	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35168	return c
35169}
35170
35171// IfNoneMatch sets the optional parameter which makes the operation
35172// fail if the object's ETag matches the given value. This is useful for
35173// getting updates only after the object has changed since the last
35174// request. Use googleapi.IsNotModified to check whether the response
35175// error from Do is the result of In-None-Match.
35176func (c *LanguagesListCall) IfNoneMatch(entityTag string) *LanguagesListCall {
35177	c.ifNoneMatch_ = entityTag
35178	return c
35179}
35180
35181// Context sets the context to be used in this call's Do method. Any
35182// pending HTTP request will be aborted if the provided context is
35183// canceled.
35184func (c *LanguagesListCall) Context(ctx context.Context) *LanguagesListCall {
35185	c.ctx_ = ctx
35186	return c
35187}
35188
35189// Header returns an http.Header that can be modified by the caller to
35190// add HTTP headers to the request.
35191func (c *LanguagesListCall) Header() http.Header {
35192	if c.header_ == nil {
35193		c.header_ = make(http.Header)
35194	}
35195	return c.header_
35196}
35197
35198func (c *LanguagesListCall) doRequest(alt string) (*http.Response, error) {
35199	reqHeaders := make(http.Header)
35200	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
35201	for k, v := range c.header_ {
35202		reqHeaders[k] = v
35203	}
35204	reqHeaders.Set("User-Agent", c.s.userAgent())
35205	if c.ifNoneMatch_ != "" {
35206		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35207	}
35208	var body io.Reader = nil
35209	c.urlParams_.Set("alt", alt)
35210	c.urlParams_.Set("prettyPrint", "false")
35211	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/languages")
35212	urls += "?" + c.urlParams_.Encode()
35213	req, err := http.NewRequest("GET", urls, body)
35214	if err != nil {
35215		return nil, err
35216	}
35217	req.Header = reqHeaders
35218	googleapi.Expand(req.URL, map[string]string{
35219		"profileId": strconv.FormatInt(c.profileId, 10),
35220	})
35221	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35222}
35223
35224// Do executes the "dfareporting.languages.list" call.
35225// Exactly one of *LanguagesListResponse or error will be non-nil. Any
35226// non-2xx status code is an error. Response headers are in either
35227// *LanguagesListResponse.ServerResponse.Header or (if a response was
35228// returned at all) in error.(*googleapi.Error).Header. Use
35229// googleapi.IsNotModified to check whether the returned error was
35230// because http.StatusNotModified was returned.
35231func (c *LanguagesListCall) Do(opts ...googleapi.CallOption) (*LanguagesListResponse, error) {
35232	gensupport.SetOptions(c.urlParams_, opts...)
35233	res, err := c.doRequest("json")
35234	if res != nil && res.StatusCode == http.StatusNotModified {
35235		if res.Body != nil {
35236			res.Body.Close()
35237		}
35238		return nil, &googleapi.Error{
35239			Code:   res.StatusCode,
35240			Header: res.Header,
35241		}
35242	}
35243	if err != nil {
35244		return nil, err
35245	}
35246	defer googleapi.CloseBody(res)
35247	if err := googleapi.CheckResponse(res); err != nil {
35248		return nil, err
35249	}
35250	ret := &LanguagesListResponse{
35251		ServerResponse: googleapi.ServerResponse{
35252			Header:         res.Header,
35253			HTTPStatusCode: res.StatusCode,
35254		},
35255	}
35256	target := &ret
35257	if err := gensupport.DecodeResponse(target, res); err != nil {
35258		return nil, err
35259	}
35260	return ret, nil
35261	// {
35262	//   "description": "Retrieves a list of languages.",
35263	//   "httpMethod": "GET",
35264	//   "id": "dfareporting.languages.list",
35265	//   "parameterOrder": [
35266	//     "profileId"
35267	//   ],
35268	//   "parameters": {
35269	//     "profileId": {
35270	//       "description": "User profile ID associated with this request.",
35271	//       "format": "int64",
35272	//       "location": "path",
35273	//       "required": true,
35274	//       "type": "string"
35275	//     }
35276	//   },
35277	//   "path": "userprofiles/{profileId}/languages",
35278	//   "response": {
35279	//     "$ref": "LanguagesListResponse"
35280	//   },
35281	//   "scopes": [
35282	//     "https://www.googleapis.com/auth/dfatrafficking"
35283	//   ]
35284	// }
35285
35286}
35287
35288// method id "dfareporting.metros.list":
35289
35290type MetrosListCall struct {
35291	s            *Service
35292	profileId    int64
35293	urlParams_   gensupport.URLParams
35294	ifNoneMatch_ string
35295	ctx_         context.Context
35296	header_      http.Header
35297}
35298
35299// List: Retrieves a list of metros.
35300func (r *MetrosService) List(profileId int64) *MetrosListCall {
35301	c := &MetrosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35302	c.profileId = profileId
35303	return c
35304}
35305
35306// Fields allows partial responses to be retrieved. See
35307// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35308// for more information.
35309func (c *MetrosListCall) Fields(s ...googleapi.Field) *MetrosListCall {
35310	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35311	return c
35312}
35313
35314// IfNoneMatch sets the optional parameter which makes the operation
35315// fail if the object's ETag matches the given value. This is useful for
35316// getting updates only after the object has changed since the last
35317// request. Use googleapi.IsNotModified to check whether the response
35318// error from Do is the result of In-None-Match.
35319func (c *MetrosListCall) IfNoneMatch(entityTag string) *MetrosListCall {
35320	c.ifNoneMatch_ = entityTag
35321	return c
35322}
35323
35324// Context sets the context to be used in this call's Do method. Any
35325// pending HTTP request will be aborted if the provided context is
35326// canceled.
35327func (c *MetrosListCall) Context(ctx context.Context) *MetrosListCall {
35328	c.ctx_ = ctx
35329	return c
35330}
35331
35332// Header returns an http.Header that can be modified by the caller to
35333// add HTTP headers to the request.
35334func (c *MetrosListCall) Header() http.Header {
35335	if c.header_ == nil {
35336		c.header_ = make(http.Header)
35337	}
35338	return c.header_
35339}
35340
35341func (c *MetrosListCall) doRequest(alt string) (*http.Response, error) {
35342	reqHeaders := make(http.Header)
35343	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
35344	for k, v := range c.header_ {
35345		reqHeaders[k] = v
35346	}
35347	reqHeaders.Set("User-Agent", c.s.userAgent())
35348	if c.ifNoneMatch_ != "" {
35349		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35350	}
35351	var body io.Reader = nil
35352	c.urlParams_.Set("alt", alt)
35353	c.urlParams_.Set("prettyPrint", "false")
35354	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/metros")
35355	urls += "?" + c.urlParams_.Encode()
35356	req, err := http.NewRequest("GET", urls, body)
35357	if err != nil {
35358		return nil, err
35359	}
35360	req.Header = reqHeaders
35361	googleapi.Expand(req.URL, map[string]string{
35362		"profileId": strconv.FormatInt(c.profileId, 10),
35363	})
35364	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35365}
35366
35367// Do executes the "dfareporting.metros.list" call.
35368// Exactly one of *MetrosListResponse or error will be non-nil. Any
35369// non-2xx status code is an error. Response headers are in either
35370// *MetrosListResponse.ServerResponse.Header or (if a response was
35371// returned at all) in error.(*googleapi.Error).Header. Use
35372// googleapi.IsNotModified to check whether the returned error was
35373// because http.StatusNotModified was returned.
35374func (c *MetrosListCall) Do(opts ...googleapi.CallOption) (*MetrosListResponse, error) {
35375	gensupport.SetOptions(c.urlParams_, opts...)
35376	res, err := c.doRequest("json")
35377	if res != nil && res.StatusCode == http.StatusNotModified {
35378		if res.Body != nil {
35379			res.Body.Close()
35380		}
35381		return nil, &googleapi.Error{
35382			Code:   res.StatusCode,
35383			Header: res.Header,
35384		}
35385	}
35386	if err != nil {
35387		return nil, err
35388	}
35389	defer googleapi.CloseBody(res)
35390	if err := googleapi.CheckResponse(res); err != nil {
35391		return nil, err
35392	}
35393	ret := &MetrosListResponse{
35394		ServerResponse: googleapi.ServerResponse{
35395			Header:         res.Header,
35396			HTTPStatusCode: res.StatusCode,
35397		},
35398	}
35399	target := &ret
35400	if err := gensupport.DecodeResponse(target, res); err != nil {
35401		return nil, err
35402	}
35403	return ret, nil
35404	// {
35405	//   "description": "Retrieves a list of metros.",
35406	//   "httpMethod": "GET",
35407	//   "id": "dfareporting.metros.list",
35408	//   "parameterOrder": [
35409	//     "profileId"
35410	//   ],
35411	//   "parameters": {
35412	//     "profileId": {
35413	//       "description": "User profile ID associated with this request.",
35414	//       "format": "int64",
35415	//       "location": "path",
35416	//       "required": true,
35417	//       "type": "string"
35418	//     }
35419	//   },
35420	//   "path": "userprofiles/{profileId}/metros",
35421	//   "response": {
35422	//     "$ref": "MetrosListResponse"
35423	//   },
35424	//   "scopes": [
35425	//     "https://www.googleapis.com/auth/dfatrafficking"
35426	//   ]
35427	// }
35428
35429}
35430
35431// method id "dfareporting.mobileApps.get":
35432
35433type MobileAppsGetCall struct {
35434	s            *Service
35435	profileId    int64
35436	id           string
35437	urlParams_   gensupport.URLParams
35438	ifNoneMatch_ string
35439	ctx_         context.Context
35440	header_      http.Header
35441}
35442
35443// Get: Gets one mobile app by ID.
35444func (r *MobileAppsService) Get(profileId int64, id string) *MobileAppsGetCall {
35445	c := &MobileAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35446	c.profileId = profileId
35447	c.id = id
35448	return c
35449}
35450
35451// Fields allows partial responses to be retrieved. See
35452// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35453// for more information.
35454func (c *MobileAppsGetCall) Fields(s ...googleapi.Field) *MobileAppsGetCall {
35455	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35456	return c
35457}
35458
35459// IfNoneMatch sets the optional parameter which makes the operation
35460// fail if the object's ETag matches the given value. This is useful for
35461// getting updates only after the object has changed since the last
35462// request. Use googleapi.IsNotModified to check whether the response
35463// error from Do is the result of In-None-Match.
35464func (c *MobileAppsGetCall) IfNoneMatch(entityTag string) *MobileAppsGetCall {
35465	c.ifNoneMatch_ = entityTag
35466	return c
35467}
35468
35469// Context sets the context to be used in this call's Do method. Any
35470// pending HTTP request will be aborted if the provided context is
35471// canceled.
35472func (c *MobileAppsGetCall) Context(ctx context.Context) *MobileAppsGetCall {
35473	c.ctx_ = ctx
35474	return c
35475}
35476
35477// Header returns an http.Header that can be modified by the caller to
35478// add HTTP headers to the request.
35479func (c *MobileAppsGetCall) Header() http.Header {
35480	if c.header_ == nil {
35481		c.header_ = make(http.Header)
35482	}
35483	return c.header_
35484}
35485
35486func (c *MobileAppsGetCall) doRequest(alt string) (*http.Response, error) {
35487	reqHeaders := make(http.Header)
35488	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
35489	for k, v := range c.header_ {
35490		reqHeaders[k] = v
35491	}
35492	reqHeaders.Set("User-Agent", c.s.userAgent())
35493	if c.ifNoneMatch_ != "" {
35494		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35495	}
35496	var body io.Reader = nil
35497	c.urlParams_.Set("alt", alt)
35498	c.urlParams_.Set("prettyPrint", "false")
35499	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileApps/{id}")
35500	urls += "?" + c.urlParams_.Encode()
35501	req, err := http.NewRequest("GET", urls, body)
35502	if err != nil {
35503		return nil, err
35504	}
35505	req.Header = reqHeaders
35506	googleapi.Expand(req.URL, map[string]string{
35507		"profileId": strconv.FormatInt(c.profileId, 10),
35508		"id":        c.id,
35509	})
35510	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35511}
35512
35513// Do executes the "dfareporting.mobileApps.get" call.
35514// Exactly one of *MobileApp or error will be non-nil. Any non-2xx
35515// status code is an error. Response headers are in either
35516// *MobileApp.ServerResponse.Header or (if a response was returned at
35517// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35518// to check whether the returned error was because
35519// http.StatusNotModified was returned.
35520func (c *MobileAppsGetCall) Do(opts ...googleapi.CallOption) (*MobileApp, error) {
35521	gensupport.SetOptions(c.urlParams_, opts...)
35522	res, err := c.doRequest("json")
35523	if res != nil && res.StatusCode == http.StatusNotModified {
35524		if res.Body != nil {
35525			res.Body.Close()
35526		}
35527		return nil, &googleapi.Error{
35528			Code:   res.StatusCode,
35529			Header: res.Header,
35530		}
35531	}
35532	if err != nil {
35533		return nil, err
35534	}
35535	defer googleapi.CloseBody(res)
35536	if err := googleapi.CheckResponse(res); err != nil {
35537		return nil, err
35538	}
35539	ret := &MobileApp{
35540		ServerResponse: googleapi.ServerResponse{
35541			Header:         res.Header,
35542			HTTPStatusCode: res.StatusCode,
35543		},
35544	}
35545	target := &ret
35546	if err := gensupport.DecodeResponse(target, res); err != nil {
35547		return nil, err
35548	}
35549	return ret, nil
35550	// {
35551	//   "description": "Gets one mobile app by ID.",
35552	//   "httpMethod": "GET",
35553	//   "id": "dfareporting.mobileApps.get",
35554	//   "parameterOrder": [
35555	//     "profileId",
35556	//     "id"
35557	//   ],
35558	//   "parameters": {
35559	//     "id": {
35560	//       "description": "Mobile app ID.",
35561	//       "location": "path",
35562	//       "required": true,
35563	//       "type": "string"
35564	//     },
35565	//     "profileId": {
35566	//       "description": "User profile ID associated with this request.",
35567	//       "format": "int64",
35568	//       "location": "path",
35569	//       "required": true,
35570	//       "type": "string"
35571	//     }
35572	//   },
35573	//   "path": "userprofiles/{profileId}/mobileApps/{id}",
35574	//   "response": {
35575	//     "$ref": "MobileApp"
35576	//   },
35577	//   "scopes": [
35578	//     "https://www.googleapis.com/auth/dfatrafficking"
35579	//   ]
35580	// }
35581
35582}
35583
35584// method id "dfareporting.mobileApps.list":
35585
35586type MobileAppsListCall struct {
35587	s            *Service
35588	profileId    int64
35589	urlParams_   gensupport.URLParams
35590	ifNoneMatch_ string
35591	ctx_         context.Context
35592	header_      http.Header
35593}
35594
35595// List: Retrieves list of available mobile apps.
35596func (r *MobileAppsService) List(profileId int64) *MobileAppsListCall {
35597	c := &MobileAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35598	c.profileId = profileId
35599	return c
35600}
35601
35602// Directories sets the optional parameter "directories": Select only
35603// apps from these directories.
35604//
35605// Possible values:
35606//   "APPLE_APP_STORE"
35607//   "GOOGLE_PLAY_STORE"
35608//   "UNKNOWN"
35609func (c *MobileAppsListCall) Directories(directories ...string) *MobileAppsListCall {
35610	c.urlParams_.SetMulti("directories", append([]string{}, directories...))
35611	return c
35612}
35613
35614// Ids sets the optional parameter "ids": Select only apps with these
35615// IDs.
35616func (c *MobileAppsListCall) Ids(ids ...string) *MobileAppsListCall {
35617	c.urlParams_.SetMulti("ids", append([]string{}, ids...))
35618	return c
35619}
35620
35621// MaxResults sets the optional parameter "maxResults": Maximum number
35622// of results to return.
35623func (c *MobileAppsListCall) MaxResults(maxResults int64) *MobileAppsListCall {
35624	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
35625	return c
35626}
35627
35628// PageToken sets the optional parameter "pageToken": Value of the
35629// nextPageToken from the previous result page.
35630func (c *MobileAppsListCall) PageToken(pageToken string) *MobileAppsListCall {
35631	c.urlParams_.Set("pageToken", pageToken)
35632	return c
35633}
35634
35635// SearchString sets the optional parameter "searchString": Allows
35636// searching for objects by name or ID. Wildcards (*) are allowed. For
35637// example, "app*2015" will return objects with names like "app Jan
35638// 2018", "app Jan 2018", or simply "app 2018". Most of the searches
35639// also add wildcards implicitly at the start and the end of the search
35640// string. For example, a search string of "app" will match objects with
35641// name "my app", "app 2018", or simply "app".
35642func (c *MobileAppsListCall) SearchString(searchString string) *MobileAppsListCall {
35643	c.urlParams_.Set("searchString", searchString)
35644	return c
35645}
35646
35647// Fields allows partial responses to be retrieved. See
35648// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35649// for more information.
35650func (c *MobileAppsListCall) Fields(s ...googleapi.Field) *MobileAppsListCall {
35651	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35652	return c
35653}
35654
35655// IfNoneMatch sets the optional parameter which makes the operation
35656// fail if the object's ETag matches the given value. This is useful for
35657// getting updates only after the object has changed since the last
35658// request. Use googleapi.IsNotModified to check whether the response
35659// error from Do is the result of In-None-Match.
35660func (c *MobileAppsListCall) IfNoneMatch(entityTag string) *MobileAppsListCall {
35661	c.ifNoneMatch_ = entityTag
35662	return c
35663}
35664
35665// Context sets the context to be used in this call's Do method. Any
35666// pending HTTP request will be aborted if the provided context is
35667// canceled.
35668func (c *MobileAppsListCall) Context(ctx context.Context) *MobileAppsListCall {
35669	c.ctx_ = ctx
35670	return c
35671}
35672
35673// Header returns an http.Header that can be modified by the caller to
35674// add HTTP headers to the request.
35675func (c *MobileAppsListCall) Header() http.Header {
35676	if c.header_ == nil {
35677		c.header_ = make(http.Header)
35678	}
35679	return c.header_
35680}
35681
35682func (c *MobileAppsListCall) doRequest(alt string) (*http.Response, error) {
35683	reqHeaders := make(http.Header)
35684	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
35685	for k, v := range c.header_ {
35686		reqHeaders[k] = v
35687	}
35688	reqHeaders.Set("User-Agent", c.s.userAgent())
35689	if c.ifNoneMatch_ != "" {
35690		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35691	}
35692	var body io.Reader = nil
35693	c.urlParams_.Set("alt", alt)
35694	c.urlParams_.Set("prettyPrint", "false")
35695	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileApps")
35696	urls += "?" + c.urlParams_.Encode()
35697	req, err := http.NewRequest("GET", urls, body)
35698	if err != nil {
35699		return nil, err
35700	}
35701	req.Header = reqHeaders
35702	googleapi.Expand(req.URL, map[string]string{
35703		"profileId": strconv.FormatInt(c.profileId, 10),
35704	})
35705	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35706}
35707
35708// Do executes the "dfareporting.mobileApps.list" call.
35709// Exactly one of *MobileAppsListResponse or error will be non-nil. Any
35710// non-2xx status code is an error. Response headers are in either
35711// *MobileAppsListResponse.ServerResponse.Header or (if a response was
35712// returned at all) in error.(*googleapi.Error).Header. Use
35713// googleapi.IsNotModified to check whether the returned error was
35714// because http.StatusNotModified was returned.
35715func (c *MobileAppsListCall) Do(opts ...googleapi.CallOption) (*MobileAppsListResponse, error) {
35716	gensupport.SetOptions(c.urlParams_, opts...)
35717	res, err := c.doRequest("json")
35718	if res != nil && res.StatusCode == http.StatusNotModified {
35719		if res.Body != nil {
35720			res.Body.Close()
35721		}
35722		return nil, &googleapi.Error{
35723			Code:   res.StatusCode,
35724			Header: res.Header,
35725		}
35726	}
35727	if err != nil {
35728		return nil, err
35729	}
35730	defer googleapi.CloseBody(res)
35731	if err := googleapi.CheckResponse(res); err != nil {
35732		return nil, err
35733	}
35734	ret := &MobileAppsListResponse{
35735		ServerResponse: googleapi.ServerResponse{
35736			Header:         res.Header,
35737			HTTPStatusCode: res.StatusCode,
35738		},
35739	}
35740	target := &ret
35741	if err := gensupport.DecodeResponse(target, res); err != nil {
35742		return nil, err
35743	}
35744	return ret, nil
35745	// {
35746	//   "description": "Retrieves list of available mobile apps.",
35747	//   "httpMethod": "GET",
35748	//   "id": "dfareporting.mobileApps.list",
35749	//   "parameterOrder": [
35750	//     "profileId"
35751	//   ],
35752	//   "parameters": {
35753	//     "directories": {
35754	//       "description": "Select only apps from these directories.",
35755	//       "enum": [
35756	//         "APPLE_APP_STORE",
35757	//         "GOOGLE_PLAY_STORE",
35758	//         "UNKNOWN"
35759	//       ],
35760	//       "enumDescriptions": [
35761	//         "",
35762	//         "",
35763	//         ""
35764	//       ],
35765	//       "location": "query",
35766	//       "repeated": true,
35767	//       "type": "string"
35768	//     },
35769	//     "ids": {
35770	//       "description": "Select only apps with these IDs.",
35771	//       "location": "query",
35772	//       "repeated": true,
35773	//       "type": "string"
35774	//     },
35775	//     "maxResults": {
35776	//       "default": "1000",
35777	//       "description": "Maximum number of results to return.",
35778	//       "format": "int32",
35779	//       "location": "query",
35780	//       "maximum": "1000",
35781	//       "minimum": "0",
35782	//       "type": "integer"
35783	//     },
35784	//     "pageToken": {
35785	//       "description": "Value of the nextPageToken from the previous result page.",
35786	//       "location": "query",
35787	//       "type": "string"
35788	//     },
35789	//     "profileId": {
35790	//       "description": "User profile ID associated with this request.",
35791	//       "format": "int64",
35792	//       "location": "path",
35793	//       "required": true,
35794	//       "type": "string"
35795	//     },
35796	//     "searchString": {
35797	//       "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\".",
35798	//       "location": "query",
35799	//       "type": "string"
35800	//     }
35801	//   },
35802	//   "path": "userprofiles/{profileId}/mobileApps",
35803	//   "response": {
35804	//     "$ref": "MobileAppsListResponse"
35805	//   },
35806	//   "scopes": [
35807	//     "https://www.googleapis.com/auth/dfatrafficking"
35808	//   ]
35809	// }
35810
35811}
35812
35813// Pages invokes f for each page of results.
35814// A non-nil error returned from f will halt the iteration.
35815// The provided context supersedes any context provided to the Context method.
35816func (c *MobileAppsListCall) Pages(ctx context.Context, f func(*MobileAppsListResponse) error) error {
35817	c.ctx_ = ctx
35818	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
35819	for {
35820		x, err := c.Do()
35821		if err != nil {
35822			return err
35823		}
35824		if err := f(x); err != nil {
35825			return err
35826		}
35827		if x.NextPageToken == "" {
35828			return nil
35829		}
35830		c.PageToken(x.NextPageToken)
35831	}
35832}
35833
35834// method id "dfareporting.mobileCarriers.get":
35835
35836type MobileCarriersGetCall struct {
35837	s            *Service
35838	profileId    int64
35839	id           int64
35840	urlParams_   gensupport.URLParams
35841	ifNoneMatch_ string
35842	ctx_         context.Context
35843	header_      http.Header
35844}
35845
35846// Get: Gets one mobile carrier by ID.
35847func (r *MobileCarriersService) Get(profileId int64, id int64) *MobileCarriersGetCall {
35848	c := &MobileCarriersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35849	c.profileId = profileId
35850	c.id = id
35851	return c
35852}
35853
35854// Fields allows partial responses to be retrieved. See
35855// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35856// for more information.
35857func (c *MobileCarriersGetCall) Fields(s ...googleapi.Field) *MobileCarriersGetCall {
35858	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35859	return c
35860}
35861
35862// IfNoneMatch sets the optional parameter which makes the operation
35863// fail if the object's ETag matches the given value. This is useful for
35864// getting updates only after the object has changed since the last
35865// request. Use googleapi.IsNotModified to check whether the response
35866// error from Do is the result of In-None-Match.
35867func (c *MobileCarriersGetCall) IfNoneMatch(entityTag string) *MobileCarriersGetCall {
35868	c.ifNoneMatch_ = entityTag
35869	return c
35870}
35871
35872// Context sets the context to be used in this call's Do method. Any
35873// pending HTTP request will be aborted if the provided context is
35874// canceled.
35875func (c *MobileCarriersGetCall) Context(ctx context.Context) *MobileCarriersGetCall {
35876	c.ctx_ = ctx
35877	return c
35878}
35879
35880// Header returns an http.Header that can be modified by the caller to
35881// add HTTP headers to the request.
35882func (c *MobileCarriersGetCall) Header() http.Header {
35883	if c.header_ == nil {
35884		c.header_ = make(http.Header)
35885	}
35886	return c.header_
35887}
35888
35889func (c *MobileCarriersGetCall) doRequest(alt string) (*http.Response, error) {
35890	reqHeaders := make(http.Header)
35891	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
35892	for k, v := range c.header_ {
35893		reqHeaders[k] = v
35894	}
35895	reqHeaders.Set("User-Agent", c.s.userAgent())
35896	if c.ifNoneMatch_ != "" {
35897		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35898	}
35899	var body io.Reader = nil
35900	c.urlParams_.Set("alt", alt)
35901	c.urlParams_.Set("prettyPrint", "false")
35902	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers/{id}")
35903	urls += "?" + c.urlParams_.Encode()
35904	req, err := http.NewRequest("GET", urls, body)
35905	if err != nil {
35906		return nil, err
35907	}
35908	req.Header = reqHeaders
35909	googleapi.Expand(req.URL, map[string]string{
35910		"profileId": strconv.FormatInt(c.profileId, 10),
35911		"id":        strconv.FormatInt(c.id, 10),
35912	})
35913	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35914}
35915
35916// Do executes the "dfareporting.mobileCarriers.get" call.
35917// Exactly one of *MobileCarrier or error will be non-nil. Any non-2xx
35918// status code is an error. Response headers are in either
35919// *MobileCarrier.ServerResponse.Header or (if a response was returned
35920// at all) in error.(*googleapi.Error).Header. Use
35921// googleapi.IsNotModified to check whether the returned error was
35922// because http.StatusNotModified was returned.
35923func (c *MobileCarriersGetCall) Do(opts ...googleapi.CallOption) (*MobileCarrier, error) {
35924	gensupport.SetOptions(c.urlParams_, opts...)
35925	res, err := c.doRequest("json")
35926	if res != nil && res.StatusCode == http.StatusNotModified {
35927		if res.Body != nil {
35928			res.Body.Close()
35929		}
35930		return nil, &googleapi.Error{
35931			Code:   res.StatusCode,
35932			Header: res.Header,
35933		}
35934	}
35935	if err != nil {
35936		return nil, err
35937	}
35938	defer googleapi.CloseBody(res)
35939	if err := googleapi.CheckResponse(res); err != nil {
35940		return nil, err
35941	}
35942	ret := &MobileCarrier{
35943		ServerResponse: googleapi.ServerResponse{
35944			Header:         res.Header,
35945			HTTPStatusCode: res.StatusCode,
35946		},
35947	}
35948	target := &ret
35949	if err := gensupport.DecodeResponse(target, res); err != nil {
35950		return nil, err
35951	}
35952	return ret, nil
35953	// {
35954	//   "description": "Gets one mobile carrier by ID.",
35955	//   "httpMethod": "GET",
35956	//   "id": "dfareporting.mobileCarriers.get",
35957	//   "parameterOrder": [
35958	//     "profileId",
35959	//     "id"
35960	//   ],
35961	//   "parameters": {
35962	//     "id": {
35963	//       "description": "Mobile carrier ID.",
35964	//       "format": "int64",
35965	//       "location": "path",
35966	//       "required": true,
35967	//       "type": "string"
35968	//     },
35969	//     "profileId": {
35970	//       "description": "User profile ID associated with this request.",
35971	//       "format": "int64",
35972	//       "location": "path",
35973	//       "required": true,
35974	//       "type": "string"
35975	//     }
35976	//   },
35977	//   "path": "userprofiles/{profileId}/mobileCarriers/{id}",
35978	//   "response": {
35979	//     "$ref": "MobileCarrier"
35980	//   },
35981	//   "scopes": [
35982	//     "https://www.googleapis.com/auth/dfatrafficking"
35983	//   ]
35984	// }
35985
35986}
35987
35988// method id "dfareporting.mobileCarriers.list":
35989
35990type MobileCarriersListCall struct {
35991	s            *Service
35992	profileId    int64
35993	urlParams_   gensupport.URLParams
35994	ifNoneMatch_ string
35995	ctx_         context.Context
35996	header_      http.Header
35997}
35998
35999// List: Retrieves a list of mobile carriers.
36000func (r *MobileCarriersService) List(profileId int64) *MobileCarriersListCall {
36001	c := &MobileCarriersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36002	c.profileId = profileId
36003	return c
36004}
36005
36006// Fields allows partial responses to be retrieved. See
36007// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36008// for more information.
36009func (c *MobileCarriersListCall) Fields(s ...googleapi.Field) *MobileCarriersListCall {
36010	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36011	return c
36012}
36013
36014// IfNoneMatch sets the optional parameter which makes the operation
36015// fail if the object's ETag matches the given value. This is useful for
36016// getting updates only after the object has changed since the last
36017// request. Use googleapi.IsNotModified to check whether the response
36018// error from Do is the result of In-None-Match.
36019func (c *MobileCarriersListCall) IfNoneMatch(entityTag string) *MobileCarriersListCall {
36020	c.ifNoneMatch_ = entityTag
36021	return c
36022}
36023
36024// Context sets the context to be used in this call's Do method. Any
36025// pending HTTP request will be aborted if the provided context is
36026// canceled.
36027func (c *MobileCarriersListCall) Context(ctx context.Context) *MobileCarriersListCall {
36028	c.ctx_ = ctx
36029	return c
36030}
36031
36032// Header returns an http.Header that can be modified by the caller to
36033// add HTTP headers to the request.
36034func (c *MobileCarriersListCall) Header() http.Header {
36035	if c.header_ == nil {
36036		c.header_ = make(http.Header)
36037	}
36038	return c.header_
36039}
36040
36041func (c *MobileCarriersListCall) doRequest(alt string) (*http.Response, error) {
36042	reqHeaders := make(http.Header)
36043	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
36044	for k, v := range c.header_ {
36045		reqHeaders[k] = v
36046	}
36047	reqHeaders.Set("User-Agent", c.s.userAgent())
36048	if c.ifNoneMatch_ != "" {
36049		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36050	}
36051	var body io.Reader = nil
36052	c.urlParams_.Set("alt", alt)
36053	c.urlParams_.Set("prettyPrint", "false")
36054	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers")
36055	urls += "?" + c.urlParams_.Encode()
36056	req, err := http.NewRequest("GET", urls, body)
36057	if err != nil {
36058		return nil, err
36059	}
36060	req.Header = reqHeaders
36061	googleapi.Expand(req.URL, map[string]string{
36062		"profileId": strconv.FormatInt(c.profileId, 10),
36063	})
36064	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36065}
36066
36067// Do executes the "dfareporting.mobileCarriers.list" call.
36068// Exactly one of *MobileCarriersListResponse or error will be non-nil.
36069// Any non-2xx status code is an error. Response headers are in either
36070// *MobileCarriersListResponse.ServerResponse.Header or (if a response
36071// was returned at all) in error.(*googleapi.Error).Header. Use
36072// googleapi.IsNotModified to check whether the returned error was
36073// because http.StatusNotModified was returned.
36074func (c *MobileCarriersListCall) Do(opts ...googleapi.CallOption) (*MobileCarriersListResponse, error) {
36075	gensupport.SetOptions(c.urlParams_, opts...)
36076	res, err := c.doRequest("json")
36077	if res != nil && res.StatusCode == http.StatusNotModified {
36078		if res.Body != nil {
36079			res.Body.Close()
36080		}
36081		return nil, &googleapi.Error{
36082			Code:   res.StatusCode,
36083			Header: res.Header,
36084		}
36085	}
36086	if err != nil {
36087		return nil, err
36088	}
36089	defer googleapi.CloseBody(res)
36090	if err := googleapi.CheckResponse(res); err != nil {
36091		return nil, err
36092	}
36093	ret := &MobileCarriersListResponse{
36094		ServerResponse: googleapi.ServerResponse{
36095			Header:         res.Header,
36096			HTTPStatusCode: res.StatusCode,
36097		},
36098	}
36099	target := &ret
36100	if err := gensupport.DecodeResponse(target, res); err != nil {
36101		return nil, err
36102	}
36103	return ret, nil
36104	// {
36105	//   "description": "Retrieves a list of mobile carriers.",
36106	//   "httpMethod": "GET",
36107	//   "id": "dfareporting.mobileCarriers.list",
36108	//   "parameterOrder": [
36109	//     "profileId"
36110	//   ],
36111	//   "parameters": {
36112	//     "profileId": {
36113	//       "description": "User profile ID associated with this request.",
36114	//       "format": "int64",
36115	//       "location": "path",
36116	//       "required": true,
36117	//       "type": "string"
36118	//     }
36119	//   },
36120	//   "path": "userprofiles/{profileId}/mobileCarriers",
36121	//   "response": {
36122	//     "$ref": "MobileCarriersListResponse"
36123	//   },
36124	//   "scopes": [
36125	//     "https://www.googleapis.com/auth/dfatrafficking"
36126	//   ]
36127	// }
36128
36129}
36130
36131// method id "dfareporting.operatingSystemVersions.get":
36132
36133type OperatingSystemVersionsGetCall struct {
36134	s            *Service
36135	profileId    int64
36136	id           int64
36137	urlParams_   gensupport.URLParams
36138	ifNoneMatch_ string
36139	ctx_         context.Context
36140	header_      http.Header
36141}
36142
36143// Get: Gets one operating system version by ID.
36144func (r *OperatingSystemVersionsService) Get(profileId int64, id int64) *OperatingSystemVersionsGetCall {
36145	c := &OperatingSystemVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36146	c.profileId = profileId
36147	c.id = id
36148	return c
36149}
36150
36151// Fields allows partial responses to be retrieved. See
36152// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36153// for more information.
36154func (c *OperatingSystemVersionsGetCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsGetCall {
36155	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36156	return c
36157}
36158
36159// IfNoneMatch sets the optional parameter which makes the operation
36160// fail if the object's ETag matches the given value. This is useful for
36161// getting updates only after the object has changed since the last
36162// request. Use googleapi.IsNotModified to check whether the response
36163// error from Do is the result of In-None-Match.
36164func (c *OperatingSystemVersionsGetCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsGetCall {
36165	c.ifNoneMatch_ = entityTag
36166	return c
36167}
36168
36169// Context sets the context to be used in this call's Do method. Any
36170// pending HTTP request will be aborted if the provided context is
36171// canceled.
36172func (c *OperatingSystemVersionsGetCall) Context(ctx context.Context) *OperatingSystemVersionsGetCall {
36173	c.ctx_ = ctx
36174	return c
36175}
36176
36177// Header returns an http.Header that can be modified by the caller to
36178// add HTTP headers to the request.
36179func (c *OperatingSystemVersionsGetCall) Header() http.Header {
36180	if c.header_ == nil {
36181		c.header_ = make(http.Header)
36182	}
36183	return c.header_
36184}
36185
36186func (c *OperatingSystemVersionsGetCall) doRequest(alt string) (*http.Response, error) {
36187	reqHeaders := make(http.Header)
36188	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
36189	for k, v := range c.header_ {
36190		reqHeaders[k] = v
36191	}
36192	reqHeaders.Set("User-Agent", c.s.userAgent())
36193	if c.ifNoneMatch_ != "" {
36194		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36195	}
36196	var body io.Reader = nil
36197	c.urlParams_.Set("alt", alt)
36198	c.urlParams_.Set("prettyPrint", "false")
36199	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions/{id}")
36200	urls += "?" + c.urlParams_.Encode()
36201	req, err := http.NewRequest("GET", urls, body)
36202	if err != nil {
36203		return nil, err
36204	}
36205	req.Header = reqHeaders
36206	googleapi.Expand(req.URL, map[string]string{
36207		"profileId": strconv.FormatInt(c.profileId, 10),
36208		"id":        strconv.FormatInt(c.id, 10),
36209	})
36210	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36211}
36212
36213// Do executes the "dfareporting.operatingSystemVersions.get" call.
36214// Exactly one of *OperatingSystemVersion or error will be non-nil. Any
36215// non-2xx status code is an error. Response headers are in either
36216// *OperatingSystemVersion.ServerResponse.Header or (if a response was
36217// returned at all) in error.(*googleapi.Error).Header. Use
36218// googleapi.IsNotModified to check whether the returned error was
36219// because http.StatusNotModified was returned.
36220func (c *OperatingSystemVersionsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersion, error) {
36221	gensupport.SetOptions(c.urlParams_, opts...)
36222	res, err := c.doRequest("json")
36223	if res != nil && res.StatusCode == http.StatusNotModified {
36224		if res.Body != nil {
36225			res.Body.Close()
36226		}
36227		return nil, &googleapi.Error{
36228			Code:   res.StatusCode,
36229			Header: res.Header,
36230		}
36231	}
36232	if err != nil {
36233		return nil, err
36234	}
36235	defer googleapi.CloseBody(res)
36236	if err := googleapi.CheckResponse(res); err != nil {
36237		return nil, err
36238	}
36239	ret := &OperatingSystemVersion{
36240		ServerResponse: googleapi.ServerResponse{
36241			Header:         res.Header,
36242			HTTPStatusCode: res.StatusCode,
36243		},
36244	}
36245	target := &ret
36246	if err := gensupport.DecodeResponse(target, res); err != nil {
36247		return nil, err
36248	}
36249	return ret, nil
36250	// {
36251	//   "description": "Gets one operating system version by ID.",
36252	//   "httpMethod": "GET",
36253	//   "id": "dfareporting.operatingSystemVersions.get",
36254	//   "parameterOrder": [
36255	//     "profileId",
36256	//     "id"
36257	//   ],
36258	//   "parameters": {
36259	//     "id": {
36260	//       "description": "Operating system version ID.",
36261	//       "format": "int64",
36262	//       "location": "path",
36263	//       "required": true,
36264	//       "type": "string"
36265	//     },
36266	//     "profileId": {
36267	//       "description": "User profile ID associated with this request.",
36268	//       "format": "int64",
36269	//       "location": "path",
36270	//       "required": true,
36271	//       "type": "string"
36272	//     }
36273	//   },
36274	//   "path": "userprofiles/{profileId}/operatingSystemVersions/{id}",
36275	//   "response": {
36276	//     "$ref": "OperatingSystemVersion"
36277	//   },
36278	//   "scopes": [
36279	//     "https://www.googleapis.com/auth/dfatrafficking"
36280	//   ]
36281	// }
36282
36283}
36284
36285// method id "dfareporting.operatingSystemVersions.list":
36286
36287type OperatingSystemVersionsListCall struct {
36288	s            *Service
36289	profileId    int64
36290	urlParams_   gensupport.URLParams
36291	ifNoneMatch_ string
36292	ctx_         context.Context
36293	header_      http.Header
36294}
36295
36296// List: Retrieves a list of operating system versions.
36297func (r *OperatingSystemVersionsService) List(profileId int64) *OperatingSystemVersionsListCall {
36298	c := &OperatingSystemVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36299	c.profileId = profileId
36300	return c
36301}
36302
36303// Fields allows partial responses to be retrieved. See
36304// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36305// for more information.
36306func (c *OperatingSystemVersionsListCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsListCall {
36307	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36308	return c
36309}
36310
36311// IfNoneMatch sets the optional parameter which makes the operation
36312// fail if the object's ETag matches the given value. This is useful for
36313// getting updates only after the object has changed since the last
36314// request. Use googleapi.IsNotModified to check whether the response
36315// error from Do is the result of In-None-Match.
36316func (c *OperatingSystemVersionsListCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsListCall {
36317	c.ifNoneMatch_ = entityTag
36318	return c
36319}
36320
36321// Context sets the context to be used in this call's Do method. Any
36322// pending HTTP request will be aborted if the provided context is
36323// canceled.
36324func (c *OperatingSystemVersionsListCall) Context(ctx context.Context) *OperatingSystemVersionsListCall {
36325	c.ctx_ = ctx
36326	return c
36327}
36328
36329// Header returns an http.Header that can be modified by the caller to
36330// add HTTP headers to the request.
36331func (c *OperatingSystemVersionsListCall) Header() http.Header {
36332	if c.header_ == nil {
36333		c.header_ = make(http.Header)
36334	}
36335	return c.header_
36336}
36337
36338func (c *OperatingSystemVersionsListCall) doRequest(alt string) (*http.Response, error) {
36339	reqHeaders := make(http.Header)
36340	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
36341	for k, v := range c.header_ {
36342		reqHeaders[k] = v
36343	}
36344	reqHeaders.Set("User-Agent", c.s.userAgent())
36345	if c.ifNoneMatch_ != "" {
36346		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36347	}
36348	var body io.Reader = nil
36349	c.urlParams_.Set("alt", alt)
36350	c.urlParams_.Set("prettyPrint", "false")
36351	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions")
36352	urls += "?" + c.urlParams_.Encode()
36353	req, err := http.NewRequest("GET", urls, body)
36354	if err != nil {
36355		return nil, err
36356	}
36357	req.Header = reqHeaders
36358	googleapi.Expand(req.URL, map[string]string{
36359		"profileId": strconv.FormatInt(c.profileId, 10),
36360	})
36361	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36362}
36363
36364// Do executes the "dfareporting.operatingSystemVersions.list" call.
36365// Exactly one of *OperatingSystemVersionsListResponse or error will be
36366// non-nil. Any non-2xx status code is an error. Response headers are in
36367// either *OperatingSystemVersionsListResponse.ServerResponse.Header or
36368// (if a response was returned at all) in
36369// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
36370// whether the returned error was because http.StatusNotModified was
36371// returned.
36372func (c *OperatingSystemVersionsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersionsListResponse, error) {
36373	gensupport.SetOptions(c.urlParams_, opts...)
36374	res, err := c.doRequest("json")
36375	if res != nil && res.StatusCode == http.StatusNotModified {
36376		if res.Body != nil {
36377			res.Body.Close()
36378		}
36379		return nil, &googleapi.Error{
36380			Code:   res.StatusCode,
36381			Header: res.Header,
36382		}
36383	}
36384	if err != nil {
36385		return nil, err
36386	}
36387	defer googleapi.CloseBody(res)
36388	if err := googleapi.CheckResponse(res); err != nil {
36389		return nil, err
36390	}
36391	ret := &OperatingSystemVersionsListResponse{
36392		ServerResponse: googleapi.ServerResponse{
36393			Header:         res.Header,
36394			HTTPStatusCode: res.StatusCode,
36395		},
36396	}
36397	target := &ret
36398	if err := gensupport.DecodeResponse(target, res); err != nil {
36399		return nil, err
36400	}
36401	return ret, nil
36402	// {
36403	//   "description": "Retrieves a list of operating system versions.",
36404	//   "httpMethod": "GET",
36405	//   "id": "dfareporting.operatingSystemVersions.list",
36406	//   "parameterOrder": [
36407	//     "profileId"
36408	//   ],
36409	//   "parameters": {
36410	//     "profileId": {
36411	//       "description": "User profile ID associated with this request.",
36412	//       "format": "int64",
36413	//       "location": "path",
36414	//       "required": true,
36415	//       "type": "string"
36416	//     }
36417	//   },
36418	//   "path": "userprofiles/{profileId}/operatingSystemVersions",
36419	//   "response": {
36420	//     "$ref": "OperatingSystemVersionsListResponse"
36421	//   },
36422	//   "scopes": [
36423	//     "https://www.googleapis.com/auth/dfatrafficking"
36424	//   ]
36425	// }
36426
36427}
36428
36429// method id "dfareporting.operatingSystems.get":
36430
36431type OperatingSystemsGetCall struct {
36432	s            *Service
36433	profileId    int64
36434	dartId       int64
36435	urlParams_   gensupport.URLParams
36436	ifNoneMatch_ string
36437	ctx_         context.Context
36438	header_      http.Header
36439}
36440
36441// Get: Gets one operating system by DART ID.
36442func (r *OperatingSystemsService) Get(profileId int64, dartId int64) *OperatingSystemsGetCall {
36443	c := &OperatingSystemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36444	c.profileId = profileId
36445	c.dartId = dartId
36446	return c
36447}
36448
36449// Fields allows partial responses to be retrieved. See
36450// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36451// for more information.
36452func (c *OperatingSystemsGetCall) Fields(s ...googleapi.Field) *OperatingSystemsGetCall {
36453	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36454	return c
36455}
36456
36457// IfNoneMatch sets the optional parameter which makes the operation
36458// fail if the object's ETag matches the given value. This is useful for
36459// getting updates only after the object has changed since the last
36460// request. Use googleapi.IsNotModified to check whether the response
36461// error from Do is the result of In-None-Match.
36462func (c *OperatingSystemsGetCall) IfNoneMatch(entityTag string) *OperatingSystemsGetCall {
36463	c.ifNoneMatch_ = entityTag
36464	return c
36465}
36466
36467// Context sets the context to be used in this call's Do method. Any
36468// pending HTTP request will be aborted if the provided context is
36469// canceled.
36470func (c *OperatingSystemsGetCall) Context(ctx context.Context) *OperatingSystemsGetCall {
36471	c.ctx_ = ctx
36472	return c
36473}
36474
36475// Header returns an http.Header that can be modified by the caller to
36476// add HTTP headers to the request.
36477func (c *OperatingSystemsGetCall) Header() http.Header {
36478	if c.header_ == nil {
36479		c.header_ = make(http.Header)
36480	}
36481	return c.header_
36482}
36483
36484func (c *OperatingSystemsGetCall) doRequest(alt string) (*http.Response, error) {
36485	reqHeaders := make(http.Header)
36486	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
36487	for k, v := range c.header_ {
36488		reqHeaders[k] = v
36489	}
36490	reqHeaders.Set("User-Agent", c.s.userAgent())
36491	if c.ifNoneMatch_ != "" {
36492		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36493	}
36494	var body io.Reader = nil
36495	c.urlParams_.Set("alt", alt)
36496	c.urlParams_.Set("prettyPrint", "false")
36497	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems/{dartId}")
36498	urls += "?" + c.urlParams_.Encode()
36499	req, err := http.NewRequest("GET", urls, body)
36500	if err != nil {
36501		return nil, err
36502	}
36503	req.Header = reqHeaders
36504	googleapi.Expand(req.URL, map[string]string{
36505		"profileId": strconv.FormatInt(c.profileId, 10),
36506		"dartId":    strconv.FormatInt(c.dartId, 10),
36507	})
36508	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36509}
36510
36511// Do executes the "dfareporting.operatingSystems.get" call.
36512// Exactly one of *OperatingSystem or error will be non-nil. Any non-2xx
36513// status code is an error. Response headers are in either
36514// *OperatingSystem.ServerResponse.Header or (if a response was returned
36515// at all) in error.(*googleapi.Error).Header. Use
36516// googleapi.IsNotModified to check whether the returned error was
36517// because http.StatusNotModified was returned.
36518func (c *OperatingSystemsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystem, error) {
36519	gensupport.SetOptions(c.urlParams_, opts...)
36520	res, err := c.doRequest("json")
36521	if res != nil && res.StatusCode == http.StatusNotModified {
36522		if res.Body != nil {
36523			res.Body.Close()
36524		}
36525		return nil, &googleapi.Error{
36526			Code:   res.StatusCode,
36527			Header: res.Header,
36528		}
36529	}
36530	if err != nil {
36531		return nil, err
36532	}
36533	defer googleapi.CloseBody(res)
36534	if err := googleapi.CheckResponse(res); err != nil {
36535		return nil, err
36536	}
36537	ret := &OperatingSystem{
36538		ServerResponse: googleapi.ServerResponse{
36539			Header:         res.Header,
36540			HTTPStatusCode: res.StatusCode,
36541		},
36542	}
36543	target := &ret
36544	if err := gensupport.DecodeResponse(target, res); err != nil {
36545		return nil, err
36546	}
36547	return ret, nil
36548	// {
36549	//   "description": "Gets one operating system by DART ID.",
36550	//   "httpMethod": "GET",
36551	//   "id": "dfareporting.operatingSystems.get",
36552	//   "parameterOrder": [
36553	//     "profileId",
36554	//     "dartId"
36555	//   ],
36556	//   "parameters": {
36557	//     "dartId": {
36558	//       "description": "Operating system DART ID.",
36559	//       "format": "int64",
36560	//       "location": "path",
36561	//       "required": true,
36562	//       "type": "string"
36563	//     },
36564	//     "profileId": {
36565	//       "description": "User profile ID associated with this request.",
36566	//       "format": "int64",
36567	//       "location": "path",
36568	//       "required": true,
36569	//       "type": "string"
36570	//     }
36571	//   },
36572	//   "path": "userprofiles/{profileId}/operatingSystems/{dartId}",
36573	//   "response": {
36574	//     "$ref": "OperatingSystem"
36575	//   },
36576	//   "scopes": [
36577	//     "https://www.googleapis.com/auth/dfatrafficking"
36578	//   ]
36579	// }
36580
36581}
36582
36583// method id "dfareporting.operatingSystems.list":
36584
36585type OperatingSystemsListCall struct {
36586	s            *Service
36587	profileId    int64
36588	urlParams_   gensupport.URLParams
36589	ifNoneMatch_ string
36590	ctx_         context.Context
36591	header_      http.Header
36592}
36593
36594// List: Retrieves a list of operating systems.
36595func (r *OperatingSystemsService) List(profileId int64) *OperatingSystemsListCall {
36596	c := &OperatingSystemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36597	c.profileId = profileId
36598	return c
36599}
36600
36601// Fields allows partial responses to be retrieved. See
36602// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36603// for more information.
36604func (c *OperatingSystemsListCall) Fields(s ...googleapi.Field) *OperatingSystemsListCall {
36605	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36606	return c
36607}
36608
36609// IfNoneMatch sets the optional parameter which makes the operation
36610// fail if the object's ETag matches the given value. This is useful for
36611// getting updates only after the object has changed since the last
36612// request. Use googleapi.IsNotModified to check whether the response
36613// error from Do is the result of In-None-Match.
36614func (c *OperatingSystemsListCall) IfNoneMatch(entityTag string) *OperatingSystemsListCall {
36615	c.ifNoneMatch_ = entityTag
36616	return c
36617}
36618
36619// Context sets the context to be used in this call's Do method. Any
36620// pending HTTP request will be aborted if the provided context is
36621// canceled.
36622func (c *OperatingSystemsListCall) Context(ctx context.Context) *OperatingSystemsListCall {
36623	c.ctx_ = ctx
36624	return c
36625}
36626
36627// Header returns an http.Header that can be modified by the caller to
36628// add HTTP headers to the request.
36629func (c *OperatingSystemsListCall) Header() http.Header {
36630	if c.header_ == nil {
36631		c.header_ = make(http.Header)
36632	}
36633	return c.header_
36634}
36635
36636func (c *OperatingSystemsListCall) doRequest(alt string) (*http.Response, error) {
36637	reqHeaders := make(http.Header)
36638	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
36639	for k, v := range c.header_ {
36640		reqHeaders[k] = v
36641	}
36642	reqHeaders.Set("User-Agent", c.s.userAgent())
36643	if c.ifNoneMatch_ != "" {
36644		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36645	}
36646	var body io.Reader = nil
36647	c.urlParams_.Set("alt", alt)
36648	c.urlParams_.Set("prettyPrint", "false")
36649	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems")
36650	urls += "?" + c.urlParams_.Encode()
36651	req, err := http.NewRequest("GET", urls, body)
36652	if err != nil {
36653		return nil, err
36654	}
36655	req.Header = reqHeaders
36656	googleapi.Expand(req.URL, map[string]string{
36657		"profileId": strconv.FormatInt(c.profileId, 10),
36658	})
36659	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36660}
36661
36662// Do executes the "dfareporting.operatingSystems.list" call.
36663// Exactly one of *OperatingSystemsListResponse or error will be
36664// non-nil. Any non-2xx status code is an error. Response headers are in
36665// either *OperatingSystemsListResponse.ServerResponse.Header or (if a
36666// response was returned at all) in error.(*googleapi.Error).Header. Use
36667// googleapi.IsNotModified to check whether the returned error was
36668// because http.StatusNotModified was returned.
36669func (c *OperatingSystemsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemsListResponse, error) {
36670	gensupport.SetOptions(c.urlParams_, opts...)
36671	res, err := c.doRequest("json")
36672	if res != nil && res.StatusCode == http.StatusNotModified {
36673		if res.Body != nil {
36674			res.Body.Close()
36675		}
36676		return nil, &googleapi.Error{
36677			Code:   res.StatusCode,
36678			Header: res.Header,
36679		}
36680	}
36681	if err != nil {
36682		return nil, err
36683	}
36684	defer googleapi.CloseBody(res)
36685	if err := googleapi.CheckResponse(res); err != nil {
36686		return nil, err
36687	}
36688	ret := &OperatingSystemsListResponse{
36689		ServerResponse: googleapi.ServerResponse{
36690			Header:         res.Header,
36691			HTTPStatusCode: res.StatusCode,
36692		},
36693	}
36694	target := &ret
36695	if err := gensupport.DecodeResponse(target, res); err != nil {
36696		return nil, err
36697	}
36698	return ret, nil
36699	// {
36700	//   "description": "Retrieves a list of operating systems.",
36701	//   "httpMethod": "GET",
36702	//   "id": "dfareporting.operatingSystems.list",
36703	//   "parameterOrder": [
36704	//     "profileId"
36705	//   ],
36706	//   "parameters": {
36707	//     "profileId": {
36708	//       "description": "User profile ID associated with this request.",
36709	//       "format": "int64",
36710	//       "location": "path",
36711	//       "required": true,
36712	//       "type": "string"
36713	//     }
36714	//   },
36715	//   "path": "userprofiles/{profileId}/operatingSystems",
36716	//   "response": {
36717	//     "$ref": "OperatingSystemsListResponse"
36718	//   },
36719	//   "scopes": [
36720	//     "https://www.googleapis.com/auth/dfatrafficking"
36721	//   ]
36722	// }
36723
36724}
36725
36726// method id "dfareporting.orderDocuments.get":
36727
36728type OrderDocumentsGetCall struct {
36729	s            *Service
36730	profileId    int64
36731	projectId    int64
36732	id           int64
36733	urlParams_   gensupport.URLParams
36734	ifNoneMatch_ string
36735	ctx_         context.Context
36736	header_      http.Header
36737}
36738
36739// Get: Gets one order document by ID.
36740func (r *OrderDocumentsService) Get(profileId int64, projectId int64, id int64) *OrderDocumentsGetCall {
36741	c := &OrderDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36742	c.profileId = profileId
36743	c.projectId = projectId
36744	c.id = id
36745	return c
36746}
36747
36748// Fields allows partial responses to be retrieved. See
36749// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36750// for more information.
36751func (c *OrderDocumentsGetCall) Fields(s ...googleapi.Field) *OrderDocumentsGetCall {
36752	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36753	return c
36754}
36755
36756// IfNoneMatch sets the optional parameter which makes the operation
36757// fail if the object's ETag matches the given value. This is useful for
36758// getting updates only after the object has changed since the last
36759// request. Use googleapi.IsNotModified to check whether the response
36760// error from Do is the result of In-None-Match.
36761func (c *OrderDocumentsGetCall) IfNoneMatch(entityTag string) *OrderDocumentsGetCall {
36762	c.ifNoneMatch_ = entityTag
36763	return c
36764}
36765
36766// Context sets the context to be used in this call's Do method. Any
36767// pending HTTP request will be aborted if the provided context is
36768// canceled.
36769func (c *OrderDocumentsGetCall) Context(ctx context.Context) *OrderDocumentsGetCall {
36770	c.ctx_ = ctx
36771	return c
36772}
36773
36774// Header returns an http.Header that can be modified by the caller to
36775// add HTTP headers to the request.
36776func (c *OrderDocumentsGetCall) Header() http.Header {
36777	if c.header_ == nil {
36778		c.header_ = make(http.Header)
36779	}
36780	return c.header_
36781}
36782
36783func (c *OrderDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
36784	reqHeaders := make(http.Header)
36785	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
36786	for k, v := range c.header_ {
36787		reqHeaders[k] = v
36788	}
36789	reqHeaders.Set("User-Agent", c.s.userAgent())
36790	if c.ifNoneMatch_ != "" {
36791		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36792	}
36793	var body io.Reader = nil
36794	c.urlParams_.Set("alt", alt)
36795	c.urlParams_.Set("prettyPrint", "false")
36796	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}")
36797	urls += "?" + c.urlParams_.Encode()
36798	req, err := http.NewRequest("GET", urls, body)
36799	if err != nil {
36800		return nil, err
36801	}
36802	req.Header = reqHeaders
36803	googleapi.Expand(req.URL, map[string]string{
36804		"profileId": strconv.FormatInt(c.profileId, 10),
36805		"projectId": strconv.FormatInt(c.projectId, 10),
36806		"id":        strconv.FormatInt(c.id, 10),
36807	})
36808	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36809}
36810
36811// Do executes the "dfareporting.orderDocuments.get" call.
36812// Exactly one of *OrderDocument or error will be non-nil. Any non-2xx
36813// status code is an error. Response headers are in either
36814// *OrderDocument.ServerResponse.Header or (if a response was returned
36815// at all) in error.(*googleapi.Error).Header. Use
36816// googleapi.IsNotModified to check whether the returned error was
36817// because http.StatusNotModified was returned.
36818func (c *OrderDocumentsGetCall) Do(opts ...googleapi.CallOption) (*OrderDocument, error) {
36819	gensupport.SetOptions(c.urlParams_, opts...)
36820	res, err := c.doRequest("json")
36821	if res != nil && res.StatusCode == http.StatusNotModified {
36822		if res.Body != nil {
36823			res.Body.Close()
36824		}
36825		return nil, &googleapi.Error{
36826			Code:   res.StatusCode,
36827			Header: res.Header,
36828		}
36829	}
36830	if err != nil {
36831		return nil, err
36832	}
36833	defer googleapi.CloseBody(res)
36834	if err := googleapi.CheckResponse(res); err != nil {
36835		return nil, err
36836	}
36837	ret := &OrderDocument{
36838		ServerResponse: googleapi.ServerResponse{
36839			Header:         res.Header,
36840			HTTPStatusCode: res.StatusCode,
36841		},
36842	}
36843	target := &ret
36844	if err := gensupport.DecodeResponse(target, res); err != nil {
36845		return nil, err
36846	}
36847	return ret, nil
36848	// {
36849	//   "description": "Gets one order document by ID.",
36850	//   "httpMethod": "GET",
36851	//   "id": "dfareporting.orderDocuments.get",
36852	//   "parameterOrder": [
36853	//     "profileId",
36854	//     "projectId",
36855	//     "id"
36856	//   ],
36857	//   "parameters": {
36858	//     "id": {
36859	//       "description": "Order document ID.",
36860	//       "format": "int64",
36861	//       "location": "path",
36862	//       "required": true,
36863	//       "type": "string"
36864	//     },
36865	//     "profileId": {
36866	//       "description": "User profile ID associated with this request.",
36867	//       "format": "int64",
36868	//       "location": "path",
36869	//       "required": true,
36870	//       "type": "string"
36871	//     },
36872	//     "projectId": {
36873	//       "description": "Project ID for order documents.",
36874	//       "format": "int64",
36875	//       "location": "path",
36876	//       "required": true,
36877	//       "type": "string"
36878	//     }
36879	//   },
36880	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}",
36881	//   "response": {
36882	//     "$ref": "OrderDocument"
36883	//   },
36884	//   "scopes": [
36885	//     "https://www.googleapis.com/auth/dfatrafficking"
36886	//   ]
36887	// }
36888
36889}
36890
36891// method id "dfareporting.orderDocuments.list":
36892
36893type OrderDocumentsListCall struct {
36894	s            *Service
36895	profileId    int64
36896	projectId    int64
36897	urlParams_   gensupport.URLParams
36898	ifNoneMatch_ string
36899	ctx_         context.Context
36900	header_      http.Header
36901}
36902
36903// List: Retrieves a list of order documents, possibly filtered. This
36904// method supports paging.
36905func (r *OrderDocumentsService) List(profileId int64, projectId int64) *OrderDocumentsListCall {
36906	c := &OrderDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36907	c.profileId = profileId
36908	c.projectId = projectId
36909	return c
36910}
36911
36912// Approved sets the optional parameter "approved": Select only order
36913// documents that have been approved by at least one user.
36914func (c *OrderDocumentsListCall) Approved(approved bool) *OrderDocumentsListCall {
36915	c.urlParams_.Set("approved", fmt.Sprint(approved))
36916	return c
36917}
36918
36919// Ids sets the optional parameter "ids": Select only order documents
36920// with these IDs.
36921func (c *OrderDocumentsListCall) Ids(ids ...int64) *OrderDocumentsListCall {
36922	var ids_ []string
36923	for _, v := range ids {
36924		ids_ = append(ids_, fmt.Sprint(v))
36925	}
36926	c.urlParams_.SetMulti("ids", ids_)
36927	return c
36928}
36929
36930// MaxResults sets the optional parameter "maxResults": Maximum number
36931// of results to return.
36932func (c *OrderDocumentsListCall) MaxResults(maxResults int64) *OrderDocumentsListCall {
36933	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36934	return c
36935}
36936
36937// OrderId sets the optional parameter "orderId": Select only order
36938// documents for specified orders.
36939func (c *OrderDocumentsListCall) OrderId(orderId ...int64) *OrderDocumentsListCall {
36940	var orderId_ []string
36941	for _, v := range orderId {
36942		orderId_ = append(orderId_, fmt.Sprint(v))
36943	}
36944	c.urlParams_.SetMulti("orderId", orderId_)
36945	return c
36946}
36947
36948// PageToken sets the optional parameter "pageToken": Value of the
36949// nextPageToken from the previous result page.
36950func (c *OrderDocumentsListCall) PageToken(pageToken string) *OrderDocumentsListCall {
36951	c.urlParams_.Set("pageToken", pageToken)
36952	return c
36953}
36954
36955// SearchString sets the optional parameter "searchString": Allows
36956// searching for order documents by name or ID. Wildcards (*) are
36957// allowed. For example, "orderdocument*2015" will return order
36958// documents with names like "orderdocument June 2015", "orderdocument
36959// April 2015", or simply "orderdocument 2015". Most of the searches
36960// also add wildcards implicitly at the start and the end of the search
36961// string. For example, a search string of "orderdocument" will match
36962// order documents with name "my orderdocument", "orderdocument 2015",
36963// or simply "orderdocument".
36964func (c *OrderDocumentsListCall) SearchString(searchString string) *OrderDocumentsListCall {
36965	c.urlParams_.Set("searchString", searchString)
36966	return c
36967}
36968
36969// SiteId sets the optional parameter "siteId": Select only order
36970// documents that are associated with these sites.
36971func (c *OrderDocumentsListCall) SiteId(siteId ...int64) *OrderDocumentsListCall {
36972	var siteId_ []string
36973	for _, v := range siteId {
36974		siteId_ = append(siteId_, fmt.Sprint(v))
36975	}
36976	c.urlParams_.SetMulti("siteId", siteId_)
36977	return c
36978}
36979
36980// SortField sets the optional parameter "sortField": Field by which to
36981// sort the list.
36982//
36983// Possible values:
36984//   "ID" (default)
36985//   "NAME"
36986func (c *OrderDocumentsListCall) SortField(sortField string) *OrderDocumentsListCall {
36987	c.urlParams_.Set("sortField", sortField)
36988	return c
36989}
36990
36991// SortOrder sets the optional parameter "sortOrder": Order of sorted
36992// results.
36993//
36994// Possible values:
36995//   "ASCENDING" (default)
36996//   "DESCENDING"
36997func (c *OrderDocumentsListCall) SortOrder(sortOrder string) *OrderDocumentsListCall {
36998	c.urlParams_.Set("sortOrder", sortOrder)
36999	return c
37000}
37001
37002// Fields allows partial responses to be retrieved. See
37003// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37004// for more information.
37005func (c *OrderDocumentsListCall) Fields(s ...googleapi.Field) *OrderDocumentsListCall {
37006	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37007	return c
37008}
37009
37010// IfNoneMatch sets the optional parameter which makes the operation
37011// fail if the object's ETag matches the given value. This is useful for
37012// getting updates only after the object has changed since the last
37013// request. Use googleapi.IsNotModified to check whether the response
37014// error from Do is the result of In-None-Match.
37015func (c *OrderDocumentsListCall) IfNoneMatch(entityTag string) *OrderDocumentsListCall {
37016	c.ifNoneMatch_ = entityTag
37017	return c
37018}
37019
37020// Context sets the context to be used in this call's Do method. Any
37021// pending HTTP request will be aborted if the provided context is
37022// canceled.
37023func (c *OrderDocumentsListCall) Context(ctx context.Context) *OrderDocumentsListCall {
37024	c.ctx_ = ctx
37025	return c
37026}
37027
37028// Header returns an http.Header that can be modified by the caller to
37029// add HTTP headers to the request.
37030func (c *OrderDocumentsListCall) Header() http.Header {
37031	if c.header_ == nil {
37032		c.header_ = make(http.Header)
37033	}
37034	return c.header_
37035}
37036
37037func (c *OrderDocumentsListCall) doRequest(alt string) (*http.Response, error) {
37038	reqHeaders := make(http.Header)
37039	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
37040	for k, v := range c.header_ {
37041		reqHeaders[k] = v
37042	}
37043	reqHeaders.Set("User-Agent", c.s.userAgent())
37044	if c.ifNoneMatch_ != "" {
37045		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37046	}
37047	var body io.Reader = nil
37048	c.urlParams_.Set("alt", alt)
37049	c.urlParams_.Set("prettyPrint", "false")
37050	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments")
37051	urls += "?" + c.urlParams_.Encode()
37052	req, err := http.NewRequest("GET", urls, body)
37053	if err != nil {
37054		return nil, err
37055	}
37056	req.Header = reqHeaders
37057	googleapi.Expand(req.URL, map[string]string{
37058		"profileId": strconv.FormatInt(c.profileId, 10),
37059		"projectId": strconv.FormatInt(c.projectId, 10),
37060	})
37061	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37062}
37063
37064// Do executes the "dfareporting.orderDocuments.list" call.
37065// Exactly one of *OrderDocumentsListResponse or error will be non-nil.
37066// Any non-2xx status code is an error. Response headers are in either
37067// *OrderDocumentsListResponse.ServerResponse.Header or (if a response
37068// was returned at all) in error.(*googleapi.Error).Header. Use
37069// googleapi.IsNotModified to check whether the returned error was
37070// because http.StatusNotModified was returned.
37071func (c *OrderDocumentsListCall) Do(opts ...googleapi.CallOption) (*OrderDocumentsListResponse, error) {
37072	gensupport.SetOptions(c.urlParams_, opts...)
37073	res, err := c.doRequest("json")
37074	if res != nil && res.StatusCode == http.StatusNotModified {
37075		if res.Body != nil {
37076			res.Body.Close()
37077		}
37078		return nil, &googleapi.Error{
37079			Code:   res.StatusCode,
37080			Header: res.Header,
37081		}
37082	}
37083	if err != nil {
37084		return nil, err
37085	}
37086	defer googleapi.CloseBody(res)
37087	if err := googleapi.CheckResponse(res); err != nil {
37088		return nil, err
37089	}
37090	ret := &OrderDocumentsListResponse{
37091		ServerResponse: googleapi.ServerResponse{
37092			Header:         res.Header,
37093			HTTPStatusCode: res.StatusCode,
37094		},
37095	}
37096	target := &ret
37097	if err := gensupport.DecodeResponse(target, res); err != nil {
37098		return nil, err
37099	}
37100	return ret, nil
37101	// {
37102	//   "description": "Retrieves a list of order documents, possibly filtered. This method supports paging.",
37103	//   "httpMethod": "GET",
37104	//   "id": "dfareporting.orderDocuments.list",
37105	//   "parameterOrder": [
37106	//     "profileId",
37107	//     "projectId"
37108	//   ],
37109	//   "parameters": {
37110	//     "approved": {
37111	//       "description": "Select only order documents that have been approved by at least one user.",
37112	//       "location": "query",
37113	//       "type": "boolean"
37114	//     },
37115	//     "ids": {
37116	//       "description": "Select only order documents with these IDs.",
37117	//       "format": "int64",
37118	//       "location": "query",
37119	//       "repeated": true,
37120	//       "type": "string"
37121	//     },
37122	//     "maxResults": {
37123	//       "default": "1000",
37124	//       "description": "Maximum number of results to return.",
37125	//       "format": "int32",
37126	//       "location": "query",
37127	//       "maximum": "1000",
37128	//       "minimum": "0",
37129	//       "type": "integer"
37130	//     },
37131	//     "orderId": {
37132	//       "description": "Select only order documents for specified orders.",
37133	//       "format": "int64",
37134	//       "location": "query",
37135	//       "repeated": true,
37136	//       "type": "string"
37137	//     },
37138	//     "pageToken": {
37139	//       "description": "Value of the nextPageToken from the previous result page.",
37140	//       "location": "query",
37141	//       "type": "string"
37142	//     },
37143	//     "profileId": {
37144	//       "description": "User profile ID associated with this request.",
37145	//       "format": "int64",
37146	//       "location": "path",
37147	//       "required": true,
37148	//       "type": "string"
37149	//     },
37150	//     "projectId": {
37151	//       "description": "Project ID for order documents.",
37152	//       "format": "int64",
37153	//       "location": "path",
37154	//       "required": true,
37155	//       "type": "string"
37156	//     },
37157	//     "searchString": {
37158	//       "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\".",
37159	//       "location": "query",
37160	//       "type": "string"
37161	//     },
37162	//     "siteId": {
37163	//       "description": "Select only order documents that are associated with these sites.",
37164	//       "format": "int64",
37165	//       "location": "query",
37166	//       "repeated": true,
37167	//       "type": "string"
37168	//     },
37169	//     "sortField": {
37170	//       "default": "ID",
37171	//       "description": "Field by which to sort the list.",
37172	//       "enum": [
37173	//         "ID",
37174	//         "NAME"
37175	//       ],
37176	//       "enumDescriptions": [
37177	//         "",
37178	//         ""
37179	//       ],
37180	//       "location": "query",
37181	//       "type": "string"
37182	//     },
37183	//     "sortOrder": {
37184	//       "default": "ASCENDING",
37185	//       "description": "Order of sorted results.",
37186	//       "enum": [
37187	//         "ASCENDING",
37188	//         "DESCENDING"
37189	//       ],
37190	//       "enumDescriptions": [
37191	//         "",
37192	//         ""
37193	//       ],
37194	//       "location": "query",
37195	//       "type": "string"
37196	//     }
37197	//   },
37198	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments",
37199	//   "response": {
37200	//     "$ref": "OrderDocumentsListResponse"
37201	//   },
37202	//   "scopes": [
37203	//     "https://www.googleapis.com/auth/dfatrafficking"
37204	//   ]
37205	// }
37206
37207}
37208
37209// Pages invokes f for each page of results.
37210// A non-nil error returned from f will halt the iteration.
37211// The provided context supersedes any context provided to the Context method.
37212func (c *OrderDocumentsListCall) Pages(ctx context.Context, f func(*OrderDocumentsListResponse) error) error {
37213	c.ctx_ = ctx
37214	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37215	for {
37216		x, err := c.Do()
37217		if err != nil {
37218			return err
37219		}
37220		if err := f(x); err != nil {
37221			return err
37222		}
37223		if x.NextPageToken == "" {
37224			return nil
37225		}
37226		c.PageToken(x.NextPageToken)
37227	}
37228}
37229
37230// method id "dfareporting.orders.get":
37231
37232type OrdersGetCall struct {
37233	s            *Service
37234	profileId    int64
37235	projectId    int64
37236	id           int64
37237	urlParams_   gensupport.URLParams
37238	ifNoneMatch_ string
37239	ctx_         context.Context
37240	header_      http.Header
37241}
37242
37243// Get: Gets one order by ID.
37244func (r *OrdersService) Get(profileId int64, projectId int64, id int64) *OrdersGetCall {
37245	c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37246	c.profileId = profileId
37247	c.projectId = projectId
37248	c.id = id
37249	return c
37250}
37251
37252// Fields allows partial responses to be retrieved. See
37253// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37254// for more information.
37255func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall {
37256	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37257	return c
37258}
37259
37260// IfNoneMatch sets the optional parameter which makes the operation
37261// fail if the object's ETag matches the given value. This is useful for
37262// getting updates only after the object has changed since the last
37263// request. Use googleapi.IsNotModified to check whether the response
37264// error from Do is the result of In-None-Match.
37265func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall {
37266	c.ifNoneMatch_ = entityTag
37267	return c
37268}
37269
37270// Context sets the context to be used in this call's Do method. Any
37271// pending HTTP request will be aborted if the provided context is
37272// canceled.
37273func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
37274	c.ctx_ = ctx
37275	return c
37276}
37277
37278// Header returns an http.Header that can be modified by the caller to
37279// add HTTP headers to the request.
37280func (c *OrdersGetCall) Header() http.Header {
37281	if c.header_ == nil {
37282		c.header_ = make(http.Header)
37283	}
37284	return c.header_
37285}
37286
37287func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
37288	reqHeaders := make(http.Header)
37289	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
37290	for k, v := range c.header_ {
37291		reqHeaders[k] = v
37292	}
37293	reqHeaders.Set("User-Agent", c.s.userAgent())
37294	if c.ifNoneMatch_ != "" {
37295		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37296	}
37297	var body io.Reader = nil
37298	c.urlParams_.Set("alt", alt)
37299	c.urlParams_.Set("prettyPrint", "false")
37300	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders/{id}")
37301	urls += "?" + c.urlParams_.Encode()
37302	req, err := http.NewRequest("GET", urls, body)
37303	if err != nil {
37304		return nil, err
37305	}
37306	req.Header = reqHeaders
37307	googleapi.Expand(req.URL, map[string]string{
37308		"profileId": strconv.FormatInt(c.profileId, 10),
37309		"projectId": strconv.FormatInt(c.projectId, 10),
37310		"id":        strconv.FormatInt(c.id, 10),
37311	})
37312	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37313}
37314
37315// Do executes the "dfareporting.orders.get" call.
37316// Exactly one of *Order or error will be non-nil. Any non-2xx status
37317// code is an error. Response headers are in either
37318// *Order.ServerResponse.Header or (if a response was returned at all)
37319// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
37320// check whether the returned error was because http.StatusNotModified
37321// was returned.
37322func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
37323	gensupport.SetOptions(c.urlParams_, opts...)
37324	res, err := c.doRequest("json")
37325	if res != nil && res.StatusCode == http.StatusNotModified {
37326		if res.Body != nil {
37327			res.Body.Close()
37328		}
37329		return nil, &googleapi.Error{
37330			Code:   res.StatusCode,
37331			Header: res.Header,
37332		}
37333	}
37334	if err != nil {
37335		return nil, err
37336	}
37337	defer googleapi.CloseBody(res)
37338	if err := googleapi.CheckResponse(res); err != nil {
37339		return nil, err
37340	}
37341	ret := &Order{
37342		ServerResponse: googleapi.ServerResponse{
37343			Header:         res.Header,
37344			HTTPStatusCode: res.StatusCode,
37345		},
37346	}
37347	target := &ret
37348	if err := gensupport.DecodeResponse(target, res); err != nil {
37349		return nil, err
37350	}
37351	return ret, nil
37352	// {
37353	//   "description": "Gets one order by ID.",
37354	//   "httpMethod": "GET",
37355	//   "id": "dfareporting.orders.get",
37356	//   "parameterOrder": [
37357	//     "profileId",
37358	//     "projectId",
37359	//     "id"
37360	//   ],
37361	//   "parameters": {
37362	//     "id": {
37363	//       "description": "Order ID.",
37364	//       "format": "int64",
37365	//       "location": "path",
37366	//       "required": true,
37367	//       "type": "string"
37368	//     },
37369	//     "profileId": {
37370	//       "description": "User profile ID associated with this request.",
37371	//       "format": "int64",
37372	//       "location": "path",
37373	//       "required": true,
37374	//       "type": "string"
37375	//     },
37376	//     "projectId": {
37377	//       "description": "Project ID for orders.",
37378	//       "format": "int64",
37379	//       "location": "path",
37380	//       "required": true,
37381	//       "type": "string"
37382	//     }
37383	//   },
37384	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders/{id}",
37385	//   "response": {
37386	//     "$ref": "Order"
37387	//   },
37388	//   "scopes": [
37389	//     "https://www.googleapis.com/auth/dfatrafficking"
37390	//   ]
37391	// }
37392
37393}
37394
37395// method id "dfareporting.orders.list":
37396
37397type OrdersListCall struct {
37398	s            *Service
37399	profileId    int64
37400	projectId    int64
37401	urlParams_   gensupport.URLParams
37402	ifNoneMatch_ string
37403	ctx_         context.Context
37404	header_      http.Header
37405}
37406
37407// List: Retrieves a list of orders, possibly filtered. This method
37408// supports paging.
37409func (r *OrdersService) List(profileId int64, projectId int64) *OrdersListCall {
37410	c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37411	c.profileId = profileId
37412	c.projectId = projectId
37413	return c
37414}
37415
37416// Ids sets the optional parameter "ids": Select only orders with these
37417// IDs.
37418func (c *OrdersListCall) Ids(ids ...int64) *OrdersListCall {
37419	var ids_ []string
37420	for _, v := range ids {
37421		ids_ = append(ids_, fmt.Sprint(v))
37422	}
37423	c.urlParams_.SetMulti("ids", ids_)
37424	return c
37425}
37426
37427// MaxResults sets the optional parameter "maxResults": Maximum number
37428// of results to return.
37429func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall {
37430	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37431	return c
37432}
37433
37434// PageToken sets the optional parameter "pageToken": Value of the
37435// nextPageToken from the previous result page.
37436func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall {
37437	c.urlParams_.Set("pageToken", pageToken)
37438	return c
37439}
37440
37441// SearchString sets the optional parameter "searchString": Allows
37442// searching for orders by name or ID. Wildcards (*) are allowed. For
37443// example, "order*2015" will return orders with names like "order June
37444// 2015", "order April 2015", or simply "order 2015". Most of the
37445// searches also add wildcards implicitly at the start and the end of
37446// the search string. For example, a search string of "order" will match
37447// orders with name "my order", "order 2015", or simply "order".
37448func (c *OrdersListCall) SearchString(searchString string) *OrdersListCall {
37449	c.urlParams_.Set("searchString", searchString)
37450	return c
37451}
37452
37453// SiteId sets the optional parameter "siteId": Select only orders that
37454// are associated with these site IDs.
37455func (c *OrdersListCall) SiteId(siteId ...int64) *OrdersListCall {
37456	var siteId_ []string
37457	for _, v := range siteId {
37458		siteId_ = append(siteId_, fmt.Sprint(v))
37459	}
37460	c.urlParams_.SetMulti("siteId", siteId_)
37461	return c
37462}
37463
37464// SortField sets the optional parameter "sortField": Field by which to
37465// sort the list.
37466//
37467// Possible values:
37468//   "ID" (default)
37469//   "NAME"
37470func (c *OrdersListCall) SortField(sortField string) *OrdersListCall {
37471	c.urlParams_.Set("sortField", sortField)
37472	return c
37473}
37474
37475// SortOrder sets the optional parameter "sortOrder": Order of sorted
37476// results.
37477//
37478// Possible values:
37479//   "ASCENDING" (default)
37480//   "DESCENDING"
37481func (c *OrdersListCall) SortOrder(sortOrder string) *OrdersListCall {
37482	c.urlParams_.Set("sortOrder", sortOrder)
37483	return c
37484}
37485
37486// Fields allows partial responses to be retrieved. See
37487// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37488// for more information.
37489func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall {
37490	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37491	return c
37492}
37493
37494// IfNoneMatch sets the optional parameter which makes the operation
37495// fail if the object's ETag matches the given value. This is useful for
37496// getting updates only after the object has changed since the last
37497// request. Use googleapi.IsNotModified to check whether the response
37498// error from Do is the result of In-None-Match.
37499func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall {
37500	c.ifNoneMatch_ = entityTag
37501	return c
37502}
37503
37504// Context sets the context to be used in this call's Do method. Any
37505// pending HTTP request will be aborted if the provided context is
37506// canceled.
37507func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
37508	c.ctx_ = ctx
37509	return c
37510}
37511
37512// Header returns an http.Header that can be modified by the caller to
37513// add HTTP headers to the request.
37514func (c *OrdersListCall) Header() http.Header {
37515	if c.header_ == nil {
37516		c.header_ = make(http.Header)
37517	}
37518	return c.header_
37519}
37520
37521func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
37522	reqHeaders := make(http.Header)
37523	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
37524	for k, v := range c.header_ {
37525		reqHeaders[k] = v
37526	}
37527	reqHeaders.Set("User-Agent", c.s.userAgent())
37528	if c.ifNoneMatch_ != "" {
37529		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37530	}
37531	var body io.Reader = nil
37532	c.urlParams_.Set("alt", alt)
37533	c.urlParams_.Set("prettyPrint", "false")
37534	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders")
37535	urls += "?" + c.urlParams_.Encode()
37536	req, err := http.NewRequest("GET", urls, body)
37537	if err != nil {
37538		return nil, err
37539	}
37540	req.Header = reqHeaders
37541	googleapi.Expand(req.URL, map[string]string{
37542		"profileId": strconv.FormatInt(c.profileId, 10),
37543		"projectId": strconv.FormatInt(c.projectId, 10),
37544	})
37545	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37546}
37547
37548// Do executes the "dfareporting.orders.list" call.
37549// Exactly one of *OrdersListResponse or error will be non-nil. Any
37550// non-2xx status code is an error. Response headers are in either
37551// *OrdersListResponse.ServerResponse.Header or (if a response was
37552// returned at all) in error.(*googleapi.Error).Header. Use
37553// googleapi.IsNotModified to check whether the returned error was
37554// because http.StatusNotModified was returned.
37555func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) {
37556	gensupport.SetOptions(c.urlParams_, opts...)
37557	res, err := c.doRequest("json")
37558	if res != nil && res.StatusCode == http.StatusNotModified {
37559		if res.Body != nil {
37560			res.Body.Close()
37561		}
37562		return nil, &googleapi.Error{
37563			Code:   res.StatusCode,
37564			Header: res.Header,
37565		}
37566	}
37567	if err != nil {
37568		return nil, err
37569	}
37570	defer googleapi.CloseBody(res)
37571	if err := googleapi.CheckResponse(res); err != nil {
37572		return nil, err
37573	}
37574	ret := &OrdersListResponse{
37575		ServerResponse: googleapi.ServerResponse{
37576			Header:         res.Header,
37577			HTTPStatusCode: res.StatusCode,
37578		},
37579	}
37580	target := &ret
37581	if err := gensupport.DecodeResponse(target, res); err != nil {
37582		return nil, err
37583	}
37584	return ret, nil
37585	// {
37586	//   "description": "Retrieves a list of orders, possibly filtered. This method supports paging.",
37587	//   "httpMethod": "GET",
37588	//   "id": "dfareporting.orders.list",
37589	//   "parameterOrder": [
37590	//     "profileId",
37591	//     "projectId"
37592	//   ],
37593	//   "parameters": {
37594	//     "ids": {
37595	//       "description": "Select only orders with these IDs.",
37596	//       "format": "int64",
37597	//       "location": "query",
37598	//       "repeated": true,
37599	//       "type": "string"
37600	//     },
37601	//     "maxResults": {
37602	//       "default": "1000",
37603	//       "description": "Maximum number of results to return.",
37604	//       "format": "int32",
37605	//       "location": "query",
37606	//       "maximum": "1000",
37607	//       "minimum": "0",
37608	//       "type": "integer"
37609	//     },
37610	//     "pageToken": {
37611	//       "description": "Value of the nextPageToken from the previous result page.",
37612	//       "location": "query",
37613	//       "type": "string"
37614	//     },
37615	//     "profileId": {
37616	//       "description": "User profile ID associated with this request.",
37617	//       "format": "int64",
37618	//       "location": "path",
37619	//       "required": true,
37620	//       "type": "string"
37621	//     },
37622	//     "projectId": {
37623	//       "description": "Project ID for orders.",
37624	//       "format": "int64",
37625	//       "location": "path",
37626	//       "required": true,
37627	//       "type": "string"
37628	//     },
37629	//     "searchString": {
37630	//       "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\".",
37631	//       "location": "query",
37632	//       "type": "string"
37633	//     },
37634	//     "siteId": {
37635	//       "description": "Select only orders that are associated with these site IDs.",
37636	//       "format": "int64",
37637	//       "location": "query",
37638	//       "repeated": true,
37639	//       "type": "string"
37640	//     },
37641	//     "sortField": {
37642	//       "default": "ID",
37643	//       "description": "Field by which to sort the list.",
37644	//       "enum": [
37645	//         "ID",
37646	//         "NAME"
37647	//       ],
37648	//       "enumDescriptions": [
37649	//         "",
37650	//         ""
37651	//       ],
37652	//       "location": "query",
37653	//       "type": "string"
37654	//     },
37655	//     "sortOrder": {
37656	//       "default": "ASCENDING",
37657	//       "description": "Order of sorted results.",
37658	//       "enum": [
37659	//         "ASCENDING",
37660	//         "DESCENDING"
37661	//       ],
37662	//       "enumDescriptions": [
37663	//         "",
37664	//         ""
37665	//       ],
37666	//       "location": "query",
37667	//       "type": "string"
37668	//     }
37669	//   },
37670	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders",
37671	//   "response": {
37672	//     "$ref": "OrdersListResponse"
37673	//   },
37674	//   "scopes": [
37675	//     "https://www.googleapis.com/auth/dfatrafficking"
37676	//   ]
37677	// }
37678
37679}
37680
37681// Pages invokes f for each page of results.
37682// A non-nil error returned from f will halt the iteration.
37683// The provided context supersedes any context provided to the Context method.
37684func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error {
37685	c.ctx_ = ctx
37686	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37687	for {
37688		x, err := c.Do()
37689		if err != nil {
37690			return err
37691		}
37692		if err := f(x); err != nil {
37693			return err
37694		}
37695		if x.NextPageToken == "" {
37696			return nil
37697		}
37698		c.PageToken(x.NextPageToken)
37699	}
37700}
37701
37702// method id "dfareporting.placementGroups.get":
37703
37704type PlacementGroupsGetCall struct {
37705	s            *Service
37706	profileId    int64
37707	id           int64
37708	urlParams_   gensupport.URLParams
37709	ifNoneMatch_ string
37710	ctx_         context.Context
37711	header_      http.Header
37712}
37713
37714// Get: Gets one placement group by ID.
37715func (r *PlacementGroupsService) Get(profileId int64, id int64) *PlacementGroupsGetCall {
37716	c := &PlacementGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37717	c.profileId = profileId
37718	c.id = id
37719	return c
37720}
37721
37722// Fields allows partial responses to be retrieved. See
37723// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37724// for more information.
37725func (c *PlacementGroupsGetCall) Fields(s ...googleapi.Field) *PlacementGroupsGetCall {
37726	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37727	return c
37728}
37729
37730// IfNoneMatch sets the optional parameter which makes the operation
37731// fail if the object's ETag matches the given value. This is useful for
37732// getting updates only after the object has changed since the last
37733// request. Use googleapi.IsNotModified to check whether the response
37734// error from Do is the result of In-None-Match.
37735func (c *PlacementGroupsGetCall) IfNoneMatch(entityTag string) *PlacementGroupsGetCall {
37736	c.ifNoneMatch_ = entityTag
37737	return c
37738}
37739
37740// Context sets the context to be used in this call's Do method. Any
37741// pending HTTP request will be aborted if the provided context is
37742// canceled.
37743func (c *PlacementGroupsGetCall) Context(ctx context.Context) *PlacementGroupsGetCall {
37744	c.ctx_ = ctx
37745	return c
37746}
37747
37748// Header returns an http.Header that can be modified by the caller to
37749// add HTTP headers to the request.
37750func (c *PlacementGroupsGetCall) Header() http.Header {
37751	if c.header_ == nil {
37752		c.header_ = make(http.Header)
37753	}
37754	return c.header_
37755}
37756
37757func (c *PlacementGroupsGetCall) doRequest(alt string) (*http.Response, error) {
37758	reqHeaders := make(http.Header)
37759	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
37760	for k, v := range c.header_ {
37761		reqHeaders[k] = v
37762	}
37763	reqHeaders.Set("User-Agent", c.s.userAgent())
37764	if c.ifNoneMatch_ != "" {
37765		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37766	}
37767	var body io.Reader = nil
37768	c.urlParams_.Set("alt", alt)
37769	c.urlParams_.Set("prettyPrint", "false")
37770	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups/{id}")
37771	urls += "?" + c.urlParams_.Encode()
37772	req, err := http.NewRequest("GET", urls, body)
37773	if err != nil {
37774		return nil, err
37775	}
37776	req.Header = reqHeaders
37777	googleapi.Expand(req.URL, map[string]string{
37778		"profileId": strconv.FormatInt(c.profileId, 10),
37779		"id":        strconv.FormatInt(c.id, 10),
37780	})
37781	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37782}
37783
37784// Do executes the "dfareporting.placementGroups.get" call.
37785// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37786// status code is an error. Response headers are in either
37787// *PlacementGroup.ServerResponse.Header or (if a response was returned
37788// at all) in error.(*googleapi.Error).Header. Use
37789// googleapi.IsNotModified to check whether the returned error was
37790// because http.StatusNotModified was returned.
37791func (c *PlacementGroupsGetCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37792	gensupport.SetOptions(c.urlParams_, opts...)
37793	res, err := c.doRequest("json")
37794	if res != nil && res.StatusCode == http.StatusNotModified {
37795		if res.Body != nil {
37796			res.Body.Close()
37797		}
37798		return nil, &googleapi.Error{
37799			Code:   res.StatusCode,
37800			Header: res.Header,
37801		}
37802	}
37803	if err != nil {
37804		return nil, err
37805	}
37806	defer googleapi.CloseBody(res)
37807	if err := googleapi.CheckResponse(res); err != nil {
37808		return nil, err
37809	}
37810	ret := &PlacementGroup{
37811		ServerResponse: googleapi.ServerResponse{
37812			Header:         res.Header,
37813			HTTPStatusCode: res.StatusCode,
37814		},
37815	}
37816	target := &ret
37817	if err := gensupport.DecodeResponse(target, res); err != nil {
37818		return nil, err
37819	}
37820	return ret, nil
37821	// {
37822	//   "description": "Gets one placement group by ID.",
37823	//   "httpMethod": "GET",
37824	//   "id": "dfareporting.placementGroups.get",
37825	//   "parameterOrder": [
37826	//     "profileId",
37827	//     "id"
37828	//   ],
37829	//   "parameters": {
37830	//     "id": {
37831	//       "description": "Placement group ID.",
37832	//       "format": "int64",
37833	//       "location": "path",
37834	//       "required": true,
37835	//       "type": "string"
37836	//     },
37837	//     "profileId": {
37838	//       "description": "User profile ID associated with this request.",
37839	//       "format": "int64",
37840	//       "location": "path",
37841	//       "required": true,
37842	//       "type": "string"
37843	//     }
37844	//   },
37845	//   "path": "userprofiles/{profileId}/placementGroups/{id}",
37846	//   "response": {
37847	//     "$ref": "PlacementGroup"
37848	//   },
37849	//   "scopes": [
37850	//     "https://www.googleapis.com/auth/dfatrafficking"
37851	//   ]
37852	// }
37853
37854}
37855
37856// method id "dfareporting.placementGroups.insert":
37857
37858type PlacementGroupsInsertCall struct {
37859	s              *Service
37860	profileId      int64
37861	placementgroup *PlacementGroup
37862	urlParams_     gensupport.URLParams
37863	ctx_           context.Context
37864	header_        http.Header
37865}
37866
37867// Insert: Inserts a new placement group.
37868func (r *PlacementGroupsService) Insert(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsInsertCall {
37869	c := &PlacementGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37870	c.profileId = profileId
37871	c.placementgroup = placementgroup
37872	return c
37873}
37874
37875// Fields allows partial responses to be retrieved. See
37876// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37877// for more information.
37878func (c *PlacementGroupsInsertCall) Fields(s ...googleapi.Field) *PlacementGroupsInsertCall {
37879	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37880	return c
37881}
37882
37883// Context sets the context to be used in this call's Do method. Any
37884// pending HTTP request will be aborted if the provided context is
37885// canceled.
37886func (c *PlacementGroupsInsertCall) Context(ctx context.Context) *PlacementGroupsInsertCall {
37887	c.ctx_ = ctx
37888	return c
37889}
37890
37891// Header returns an http.Header that can be modified by the caller to
37892// add HTTP headers to the request.
37893func (c *PlacementGroupsInsertCall) Header() http.Header {
37894	if c.header_ == nil {
37895		c.header_ = make(http.Header)
37896	}
37897	return c.header_
37898}
37899
37900func (c *PlacementGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
37901	reqHeaders := make(http.Header)
37902	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
37903	for k, v := range c.header_ {
37904		reqHeaders[k] = v
37905	}
37906	reqHeaders.Set("User-Agent", c.s.userAgent())
37907	var body io.Reader = nil
37908	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
37909	if err != nil {
37910		return nil, err
37911	}
37912	reqHeaders.Set("Content-Type", "application/json")
37913	c.urlParams_.Set("alt", alt)
37914	c.urlParams_.Set("prettyPrint", "false")
37915	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
37916	urls += "?" + c.urlParams_.Encode()
37917	req, err := http.NewRequest("POST", urls, body)
37918	if err != nil {
37919		return nil, err
37920	}
37921	req.Header = reqHeaders
37922	googleapi.Expand(req.URL, map[string]string{
37923		"profileId": strconv.FormatInt(c.profileId, 10),
37924	})
37925	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37926}
37927
37928// Do executes the "dfareporting.placementGroups.insert" call.
37929// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37930// status code is an error. Response headers are in either
37931// *PlacementGroup.ServerResponse.Header or (if a response was returned
37932// at all) in error.(*googleapi.Error).Header. Use
37933// googleapi.IsNotModified to check whether the returned error was
37934// because http.StatusNotModified was returned.
37935func (c *PlacementGroupsInsertCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37936	gensupport.SetOptions(c.urlParams_, opts...)
37937	res, err := c.doRequest("json")
37938	if res != nil && res.StatusCode == http.StatusNotModified {
37939		if res.Body != nil {
37940			res.Body.Close()
37941		}
37942		return nil, &googleapi.Error{
37943			Code:   res.StatusCode,
37944			Header: res.Header,
37945		}
37946	}
37947	if err != nil {
37948		return nil, err
37949	}
37950	defer googleapi.CloseBody(res)
37951	if err := googleapi.CheckResponse(res); err != nil {
37952		return nil, err
37953	}
37954	ret := &PlacementGroup{
37955		ServerResponse: googleapi.ServerResponse{
37956			Header:         res.Header,
37957			HTTPStatusCode: res.StatusCode,
37958		},
37959	}
37960	target := &ret
37961	if err := gensupport.DecodeResponse(target, res); err != nil {
37962		return nil, err
37963	}
37964	return ret, nil
37965	// {
37966	//   "description": "Inserts a new placement group.",
37967	//   "httpMethod": "POST",
37968	//   "id": "dfareporting.placementGroups.insert",
37969	//   "parameterOrder": [
37970	//     "profileId"
37971	//   ],
37972	//   "parameters": {
37973	//     "profileId": {
37974	//       "description": "User profile ID associated with this request.",
37975	//       "format": "int64",
37976	//       "location": "path",
37977	//       "required": true,
37978	//       "type": "string"
37979	//     }
37980	//   },
37981	//   "path": "userprofiles/{profileId}/placementGroups",
37982	//   "request": {
37983	//     "$ref": "PlacementGroup"
37984	//   },
37985	//   "response": {
37986	//     "$ref": "PlacementGroup"
37987	//   },
37988	//   "scopes": [
37989	//     "https://www.googleapis.com/auth/dfatrafficking"
37990	//   ]
37991	// }
37992
37993}
37994
37995// method id "dfareporting.placementGroups.list":
37996
37997type PlacementGroupsListCall struct {
37998	s            *Service
37999	profileId    int64
38000	urlParams_   gensupport.URLParams
38001	ifNoneMatch_ string
38002	ctx_         context.Context
38003	header_      http.Header
38004}
38005
38006// List: Retrieves a list of placement groups, possibly filtered. This
38007// method supports paging.
38008func (r *PlacementGroupsService) List(profileId int64) *PlacementGroupsListCall {
38009	c := &PlacementGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38010	c.profileId = profileId
38011	return c
38012}
38013
38014// AdvertiserIds sets the optional parameter "advertiserIds": Select
38015// only placement groups that belong to these advertisers.
38016func (c *PlacementGroupsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementGroupsListCall {
38017	var advertiserIds_ []string
38018	for _, v := range advertiserIds {
38019		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
38020	}
38021	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
38022	return c
38023}
38024
38025// Archived sets the optional parameter "archived": Select only archived
38026// placements. Don't set this field to select both archived and
38027// non-archived placements.
38028func (c *PlacementGroupsListCall) Archived(archived bool) *PlacementGroupsListCall {
38029	c.urlParams_.Set("archived", fmt.Sprint(archived))
38030	return c
38031}
38032
38033// CampaignIds sets the optional parameter "campaignIds": Select only
38034// placement groups that belong to these campaigns.
38035func (c *PlacementGroupsListCall) CampaignIds(campaignIds ...int64) *PlacementGroupsListCall {
38036	var campaignIds_ []string
38037	for _, v := range campaignIds {
38038		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
38039	}
38040	c.urlParams_.SetMulti("campaignIds", campaignIds_)
38041	return c
38042}
38043
38044// ContentCategoryIds sets the optional parameter "contentCategoryIds":
38045// Select only placement groups that are associated with these content
38046// categories.
38047func (c *PlacementGroupsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementGroupsListCall {
38048	var contentCategoryIds_ []string
38049	for _, v := range contentCategoryIds {
38050		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
38051	}
38052	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
38053	return c
38054}
38055
38056// DirectorySiteIds sets the optional parameter "directorySiteIds":
38057// Select only placement groups that are associated with these directory
38058// sites.
38059func (c *PlacementGroupsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementGroupsListCall {
38060	var directorySiteIds_ []string
38061	for _, v := range directorySiteIds {
38062		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
38063	}
38064	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
38065	return c
38066}
38067
38068// Ids sets the optional parameter "ids": Select only placement groups
38069// with these IDs.
38070func (c *PlacementGroupsListCall) Ids(ids ...int64) *PlacementGroupsListCall {
38071	var ids_ []string
38072	for _, v := range ids {
38073		ids_ = append(ids_, fmt.Sprint(v))
38074	}
38075	c.urlParams_.SetMulti("ids", ids_)
38076	return c
38077}
38078
38079// MaxEndDate sets the optional parameter "maxEndDate": Select only
38080// placements or placement groups whose end date is on or before the
38081// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
38082func (c *PlacementGroupsListCall) MaxEndDate(maxEndDate string) *PlacementGroupsListCall {
38083	c.urlParams_.Set("maxEndDate", maxEndDate)
38084	return c
38085}
38086
38087// MaxResults sets the optional parameter "maxResults": Maximum number
38088// of results to return.
38089func (c *PlacementGroupsListCall) MaxResults(maxResults int64) *PlacementGroupsListCall {
38090	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38091	return c
38092}
38093
38094// MaxStartDate sets the optional parameter "maxStartDate": Select only
38095// placements or placement groups whose start date is on or before the
38096// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
38097func (c *PlacementGroupsListCall) MaxStartDate(maxStartDate string) *PlacementGroupsListCall {
38098	c.urlParams_.Set("maxStartDate", maxStartDate)
38099	return c
38100}
38101
38102// MinEndDate sets the optional parameter "minEndDate": Select only
38103// placements or placement groups whose end date is on or after the
38104// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
38105func (c *PlacementGroupsListCall) MinEndDate(minEndDate string) *PlacementGroupsListCall {
38106	c.urlParams_.Set("minEndDate", minEndDate)
38107	return c
38108}
38109
38110// MinStartDate sets the optional parameter "minStartDate": Select only
38111// placements or placement groups whose start date is on or after the
38112// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
38113func (c *PlacementGroupsListCall) MinStartDate(minStartDate string) *PlacementGroupsListCall {
38114	c.urlParams_.Set("minStartDate", minStartDate)
38115	return c
38116}
38117
38118// PageToken sets the optional parameter "pageToken": Value of the
38119// nextPageToken from the previous result page.
38120func (c *PlacementGroupsListCall) PageToken(pageToken string) *PlacementGroupsListCall {
38121	c.urlParams_.Set("pageToken", pageToken)
38122	return c
38123}
38124
38125// PlacementGroupType sets the optional parameter "placementGroupType":
38126// Select only placement groups belonging with this group type. A
38127// package is a simple group of placements that acts as a single pricing
38128// point for a group of tags. A roadblock is a group of placements that
38129// not only acts as a single pricing point but also assumes that all the
38130// tags in it will be served at the same time. A roadblock requires one
38131// of its assigned placements to be marked as primary for reporting.
38132//
38133// Possible values:
38134//   "PLACEMENT_PACKAGE"
38135//   "PLACEMENT_ROADBLOCK"
38136func (c *PlacementGroupsListCall) PlacementGroupType(placementGroupType string) *PlacementGroupsListCall {
38137	c.urlParams_.Set("placementGroupType", placementGroupType)
38138	return c
38139}
38140
38141// PlacementStrategyIds sets the optional parameter
38142// "placementStrategyIds": Select only placement groups that are
38143// associated with these placement strategies.
38144func (c *PlacementGroupsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementGroupsListCall {
38145	var placementStrategyIds_ []string
38146	for _, v := range placementStrategyIds {
38147		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
38148	}
38149	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
38150	return c
38151}
38152
38153// PricingTypes sets the optional parameter "pricingTypes": Select only
38154// placement groups with these pricing types.
38155//
38156// Possible values:
38157//   "PRICING_TYPE_CPA"
38158//   "PRICING_TYPE_CPC"
38159//   "PRICING_TYPE_CPM"
38160//   "PRICING_TYPE_CPM_ACTIVEVIEW"
38161//   "PRICING_TYPE_FLAT_RATE_CLICKS"
38162//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
38163func (c *PlacementGroupsListCall) PricingTypes(pricingTypes ...string) *PlacementGroupsListCall {
38164	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
38165	return c
38166}
38167
38168// SearchString sets the optional parameter "searchString": Allows
38169// searching for placement groups by name or ID. Wildcards (*) are
38170// allowed. For example, "placement*2015" will return placement groups
38171// with names like "placement group June 2015", "placement group May
38172// 2015", or simply "placements 2015". Most of the searches also add
38173// wildcards implicitly at the start and the end of the search string.
38174// For example, a search string of "placementgroup" will match placement
38175// groups with name "my placementgroup", "placementgroup 2015", or
38176// simply "placementgroup".
38177func (c *PlacementGroupsListCall) SearchString(searchString string) *PlacementGroupsListCall {
38178	c.urlParams_.Set("searchString", searchString)
38179	return c
38180}
38181
38182// SiteIds sets the optional parameter "siteIds": Select only placement
38183// groups that are associated with these sites.
38184func (c *PlacementGroupsListCall) SiteIds(siteIds ...int64) *PlacementGroupsListCall {
38185	var siteIds_ []string
38186	for _, v := range siteIds {
38187		siteIds_ = append(siteIds_, fmt.Sprint(v))
38188	}
38189	c.urlParams_.SetMulti("siteIds", siteIds_)
38190	return c
38191}
38192
38193// SortField sets the optional parameter "sortField": Field by which to
38194// sort the list.
38195//
38196// Possible values:
38197//   "ID" (default)
38198//   "NAME"
38199func (c *PlacementGroupsListCall) SortField(sortField string) *PlacementGroupsListCall {
38200	c.urlParams_.Set("sortField", sortField)
38201	return c
38202}
38203
38204// SortOrder sets the optional parameter "sortOrder": Order of sorted
38205// results.
38206//
38207// Possible values:
38208//   "ASCENDING" (default)
38209//   "DESCENDING"
38210func (c *PlacementGroupsListCall) SortOrder(sortOrder string) *PlacementGroupsListCall {
38211	c.urlParams_.Set("sortOrder", sortOrder)
38212	return c
38213}
38214
38215// Fields allows partial responses to be retrieved. See
38216// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38217// for more information.
38218func (c *PlacementGroupsListCall) Fields(s ...googleapi.Field) *PlacementGroupsListCall {
38219	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38220	return c
38221}
38222
38223// IfNoneMatch sets the optional parameter which makes the operation
38224// fail if the object's ETag matches the given value. This is useful for
38225// getting updates only after the object has changed since the last
38226// request. Use googleapi.IsNotModified to check whether the response
38227// error from Do is the result of In-None-Match.
38228func (c *PlacementGroupsListCall) IfNoneMatch(entityTag string) *PlacementGroupsListCall {
38229	c.ifNoneMatch_ = entityTag
38230	return c
38231}
38232
38233// Context sets the context to be used in this call's Do method. Any
38234// pending HTTP request will be aborted if the provided context is
38235// canceled.
38236func (c *PlacementGroupsListCall) Context(ctx context.Context) *PlacementGroupsListCall {
38237	c.ctx_ = ctx
38238	return c
38239}
38240
38241// Header returns an http.Header that can be modified by the caller to
38242// add HTTP headers to the request.
38243func (c *PlacementGroupsListCall) Header() http.Header {
38244	if c.header_ == nil {
38245		c.header_ = make(http.Header)
38246	}
38247	return c.header_
38248}
38249
38250func (c *PlacementGroupsListCall) doRequest(alt string) (*http.Response, error) {
38251	reqHeaders := make(http.Header)
38252	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
38253	for k, v := range c.header_ {
38254		reqHeaders[k] = v
38255	}
38256	reqHeaders.Set("User-Agent", c.s.userAgent())
38257	if c.ifNoneMatch_ != "" {
38258		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38259	}
38260	var body io.Reader = nil
38261	c.urlParams_.Set("alt", alt)
38262	c.urlParams_.Set("prettyPrint", "false")
38263	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38264	urls += "?" + c.urlParams_.Encode()
38265	req, err := http.NewRequest("GET", urls, body)
38266	if err != nil {
38267		return nil, err
38268	}
38269	req.Header = reqHeaders
38270	googleapi.Expand(req.URL, map[string]string{
38271		"profileId": strconv.FormatInt(c.profileId, 10),
38272	})
38273	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38274}
38275
38276// Do executes the "dfareporting.placementGroups.list" call.
38277// Exactly one of *PlacementGroupsListResponse or error will be non-nil.
38278// Any non-2xx status code is an error. Response headers are in either
38279// *PlacementGroupsListResponse.ServerResponse.Header or (if a response
38280// was returned at all) in error.(*googleapi.Error).Header. Use
38281// googleapi.IsNotModified to check whether the returned error was
38282// because http.StatusNotModified was returned.
38283func (c *PlacementGroupsListCall) Do(opts ...googleapi.CallOption) (*PlacementGroupsListResponse, error) {
38284	gensupport.SetOptions(c.urlParams_, opts...)
38285	res, err := c.doRequest("json")
38286	if res != nil && res.StatusCode == http.StatusNotModified {
38287		if res.Body != nil {
38288			res.Body.Close()
38289		}
38290		return nil, &googleapi.Error{
38291			Code:   res.StatusCode,
38292			Header: res.Header,
38293		}
38294	}
38295	if err != nil {
38296		return nil, err
38297	}
38298	defer googleapi.CloseBody(res)
38299	if err := googleapi.CheckResponse(res); err != nil {
38300		return nil, err
38301	}
38302	ret := &PlacementGroupsListResponse{
38303		ServerResponse: googleapi.ServerResponse{
38304			Header:         res.Header,
38305			HTTPStatusCode: res.StatusCode,
38306		},
38307	}
38308	target := &ret
38309	if err := gensupport.DecodeResponse(target, res); err != nil {
38310		return nil, err
38311	}
38312	return ret, nil
38313	// {
38314	//   "description": "Retrieves a list of placement groups, possibly filtered. This method supports paging.",
38315	//   "httpMethod": "GET",
38316	//   "id": "dfareporting.placementGroups.list",
38317	//   "parameterOrder": [
38318	//     "profileId"
38319	//   ],
38320	//   "parameters": {
38321	//     "advertiserIds": {
38322	//       "description": "Select only placement groups that belong to these advertisers.",
38323	//       "format": "int64",
38324	//       "location": "query",
38325	//       "repeated": true,
38326	//       "type": "string"
38327	//     },
38328	//     "archived": {
38329	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
38330	//       "location": "query",
38331	//       "type": "boolean"
38332	//     },
38333	//     "campaignIds": {
38334	//       "description": "Select only placement groups that belong to these campaigns.",
38335	//       "format": "int64",
38336	//       "location": "query",
38337	//       "repeated": true,
38338	//       "type": "string"
38339	//     },
38340	//     "contentCategoryIds": {
38341	//       "description": "Select only placement groups that are associated with these content categories.",
38342	//       "format": "int64",
38343	//       "location": "query",
38344	//       "repeated": true,
38345	//       "type": "string"
38346	//     },
38347	//     "directorySiteIds": {
38348	//       "description": "Select only placement groups that are associated with these directory sites.",
38349	//       "format": "int64",
38350	//       "location": "query",
38351	//       "repeated": true,
38352	//       "type": "string"
38353	//     },
38354	//     "ids": {
38355	//       "description": "Select only placement groups with these IDs.",
38356	//       "format": "int64",
38357	//       "location": "query",
38358	//       "repeated": true,
38359	//       "type": "string"
38360	//     },
38361	//     "maxEndDate": {
38362	//       "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\".",
38363	//       "location": "query",
38364	//       "type": "string"
38365	//     },
38366	//     "maxResults": {
38367	//       "default": "800",
38368	//       "description": "Maximum number of results to return.",
38369	//       "format": "int32",
38370	//       "location": "query",
38371	//       "maximum": "800",
38372	//       "minimum": "0",
38373	//       "type": "integer"
38374	//     },
38375	//     "maxStartDate": {
38376	//       "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\".",
38377	//       "location": "query",
38378	//       "type": "string"
38379	//     },
38380	//     "minEndDate": {
38381	//       "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\".",
38382	//       "location": "query",
38383	//       "type": "string"
38384	//     },
38385	//     "minStartDate": {
38386	//       "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\".",
38387	//       "location": "query",
38388	//       "type": "string"
38389	//     },
38390	//     "pageToken": {
38391	//       "description": "Value of the nextPageToken from the previous result page.",
38392	//       "location": "query",
38393	//       "type": "string"
38394	//     },
38395	//     "placementGroupType": {
38396	//       "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.",
38397	//       "enum": [
38398	//         "PLACEMENT_PACKAGE",
38399	//         "PLACEMENT_ROADBLOCK"
38400	//       ],
38401	//       "enumDescriptions": [
38402	//         "",
38403	//         ""
38404	//       ],
38405	//       "location": "query",
38406	//       "type": "string"
38407	//     },
38408	//     "placementStrategyIds": {
38409	//       "description": "Select only placement groups that are associated with these placement strategies.",
38410	//       "format": "int64",
38411	//       "location": "query",
38412	//       "repeated": true,
38413	//       "type": "string"
38414	//     },
38415	//     "pricingTypes": {
38416	//       "description": "Select only placement groups with these pricing types.",
38417	//       "enum": [
38418	//         "PRICING_TYPE_CPA",
38419	//         "PRICING_TYPE_CPC",
38420	//         "PRICING_TYPE_CPM",
38421	//         "PRICING_TYPE_CPM_ACTIVEVIEW",
38422	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
38423	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
38424	//       ],
38425	//       "enumDescriptions": [
38426	//         "",
38427	//         "",
38428	//         "",
38429	//         "",
38430	//         "",
38431	//         ""
38432	//       ],
38433	//       "location": "query",
38434	//       "repeated": true,
38435	//       "type": "string"
38436	//     },
38437	//     "profileId": {
38438	//       "description": "User profile ID associated with this request.",
38439	//       "format": "int64",
38440	//       "location": "path",
38441	//       "required": true,
38442	//       "type": "string"
38443	//     },
38444	//     "searchString": {
38445	//       "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\".",
38446	//       "location": "query",
38447	//       "type": "string"
38448	//     },
38449	//     "siteIds": {
38450	//       "description": "Select only placement groups that are associated with these sites.",
38451	//       "format": "int64",
38452	//       "location": "query",
38453	//       "repeated": true,
38454	//       "type": "string"
38455	//     },
38456	//     "sortField": {
38457	//       "default": "ID",
38458	//       "description": "Field by which to sort the list.",
38459	//       "enum": [
38460	//         "ID",
38461	//         "NAME"
38462	//       ],
38463	//       "enumDescriptions": [
38464	//         "",
38465	//         ""
38466	//       ],
38467	//       "location": "query",
38468	//       "type": "string"
38469	//     },
38470	//     "sortOrder": {
38471	//       "default": "ASCENDING",
38472	//       "description": "Order of sorted results.",
38473	//       "enum": [
38474	//         "ASCENDING",
38475	//         "DESCENDING"
38476	//       ],
38477	//       "enumDescriptions": [
38478	//         "",
38479	//         ""
38480	//       ],
38481	//       "location": "query",
38482	//       "type": "string"
38483	//     }
38484	//   },
38485	//   "path": "userprofiles/{profileId}/placementGroups",
38486	//   "response": {
38487	//     "$ref": "PlacementGroupsListResponse"
38488	//   },
38489	//   "scopes": [
38490	//     "https://www.googleapis.com/auth/dfatrafficking"
38491	//   ]
38492	// }
38493
38494}
38495
38496// Pages invokes f for each page of results.
38497// A non-nil error returned from f will halt the iteration.
38498// The provided context supersedes any context provided to the Context method.
38499func (c *PlacementGroupsListCall) Pages(ctx context.Context, f func(*PlacementGroupsListResponse) error) error {
38500	c.ctx_ = ctx
38501	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38502	for {
38503		x, err := c.Do()
38504		if err != nil {
38505			return err
38506		}
38507		if err := f(x); err != nil {
38508			return err
38509		}
38510		if x.NextPageToken == "" {
38511			return nil
38512		}
38513		c.PageToken(x.NextPageToken)
38514	}
38515}
38516
38517// method id "dfareporting.placementGroups.patch":
38518
38519type PlacementGroupsPatchCall struct {
38520	s              *Service
38521	profileId      int64
38522	placementgroup *PlacementGroup
38523	urlParams_     gensupport.URLParams
38524	ctx_           context.Context
38525	header_        http.Header
38526}
38527
38528// Patch: Updates an existing placement group. This method supports
38529// patch semantics.
38530func (r *PlacementGroupsService) Patch(profileId int64, id int64, placementgroup *PlacementGroup) *PlacementGroupsPatchCall {
38531	c := &PlacementGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38532	c.profileId = profileId
38533	c.urlParams_.Set("id", fmt.Sprint(id))
38534	c.placementgroup = placementgroup
38535	return c
38536}
38537
38538// Fields allows partial responses to be retrieved. See
38539// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38540// for more information.
38541func (c *PlacementGroupsPatchCall) Fields(s ...googleapi.Field) *PlacementGroupsPatchCall {
38542	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38543	return c
38544}
38545
38546// Context sets the context to be used in this call's Do method. Any
38547// pending HTTP request will be aborted if the provided context is
38548// canceled.
38549func (c *PlacementGroupsPatchCall) Context(ctx context.Context) *PlacementGroupsPatchCall {
38550	c.ctx_ = ctx
38551	return c
38552}
38553
38554// Header returns an http.Header that can be modified by the caller to
38555// add HTTP headers to the request.
38556func (c *PlacementGroupsPatchCall) Header() http.Header {
38557	if c.header_ == nil {
38558		c.header_ = make(http.Header)
38559	}
38560	return c.header_
38561}
38562
38563func (c *PlacementGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
38564	reqHeaders := make(http.Header)
38565	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
38566	for k, v := range c.header_ {
38567		reqHeaders[k] = v
38568	}
38569	reqHeaders.Set("User-Agent", c.s.userAgent())
38570	var body io.Reader = nil
38571	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38572	if err != nil {
38573		return nil, err
38574	}
38575	reqHeaders.Set("Content-Type", "application/json")
38576	c.urlParams_.Set("alt", alt)
38577	c.urlParams_.Set("prettyPrint", "false")
38578	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38579	urls += "?" + c.urlParams_.Encode()
38580	req, err := http.NewRequest("PATCH", urls, body)
38581	if err != nil {
38582		return nil, err
38583	}
38584	req.Header = reqHeaders
38585	googleapi.Expand(req.URL, map[string]string{
38586		"profileId": strconv.FormatInt(c.profileId, 10),
38587	})
38588	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38589}
38590
38591// Do executes the "dfareporting.placementGroups.patch" call.
38592// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
38593// status code is an error. Response headers are in either
38594// *PlacementGroup.ServerResponse.Header or (if a response was returned
38595// at all) in error.(*googleapi.Error).Header. Use
38596// googleapi.IsNotModified to check whether the returned error was
38597// because http.StatusNotModified was returned.
38598func (c *PlacementGroupsPatchCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38599	gensupport.SetOptions(c.urlParams_, opts...)
38600	res, err := c.doRequest("json")
38601	if res != nil && res.StatusCode == http.StatusNotModified {
38602		if res.Body != nil {
38603			res.Body.Close()
38604		}
38605		return nil, &googleapi.Error{
38606			Code:   res.StatusCode,
38607			Header: res.Header,
38608		}
38609	}
38610	if err != nil {
38611		return nil, err
38612	}
38613	defer googleapi.CloseBody(res)
38614	if err := googleapi.CheckResponse(res); err != nil {
38615		return nil, err
38616	}
38617	ret := &PlacementGroup{
38618		ServerResponse: googleapi.ServerResponse{
38619			Header:         res.Header,
38620			HTTPStatusCode: res.StatusCode,
38621		},
38622	}
38623	target := &ret
38624	if err := gensupport.DecodeResponse(target, res); err != nil {
38625		return nil, err
38626	}
38627	return ret, nil
38628	// {
38629	//   "description": "Updates an existing placement group. This method supports patch semantics.",
38630	//   "httpMethod": "PATCH",
38631	//   "id": "dfareporting.placementGroups.patch",
38632	//   "parameterOrder": [
38633	//     "profileId",
38634	//     "id"
38635	//   ],
38636	//   "parameters": {
38637	//     "id": {
38638	//       "description": "Placement group ID.",
38639	//       "format": "int64",
38640	//       "location": "query",
38641	//       "required": true,
38642	//       "type": "string"
38643	//     },
38644	//     "profileId": {
38645	//       "description": "User profile ID associated with this request.",
38646	//       "format": "int64",
38647	//       "location": "path",
38648	//       "required": true,
38649	//       "type": "string"
38650	//     }
38651	//   },
38652	//   "path": "userprofiles/{profileId}/placementGroups",
38653	//   "request": {
38654	//     "$ref": "PlacementGroup"
38655	//   },
38656	//   "response": {
38657	//     "$ref": "PlacementGroup"
38658	//   },
38659	//   "scopes": [
38660	//     "https://www.googleapis.com/auth/dfatrafficking"
38661	//   ]
38662	// }
38663
38664}
38665
38666// method id "dfareporting.placementGroups.update":
38667
38668type PlacementGroupsUpdateCall struct {
38669	s              *Service
38670	profileId      int64
38671	placementgroup *PlacementGroup
38672	urlParams_     gensupport.URLParams
38673	ctx_           context.Context
38674	header_        http.Header
38675}
38676
38677// Update: Updates an existing placement group.
38678func (r *PlacementGroupsService) Update(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsUpdateCall {
38679	c := &PlacementGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38680	c.profileId = profileId
38681	c.placementgroup = placementgroup
38682	return c
38683}
38684
38685// Fields allows partial responses to be retrieved. See
38686// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38687// for more information.
38688func (c *PlacementGroupsUpdateCall) Fields(s ...googleapi.Field) *PlacementGroupsUpdateCall {
38689	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38690	return c
38691}
38692
38693// Context sets the context to be used in this call's Do method. Any
38694// pending HTTP request will be aborted if the provided context is
38695// canceled.
38696func (c *PlacementGroupsUpdateCall) Context(ctx context.Context) *PlacementGroupsUpdateCall {
38697	c.ctx_ = ctx
38698	return c
38699}
38700
38701// Header returns an http.Header that can be modified by the caller to
38702// add HTTP headers to the request.
38703func (c *PlacementGroupsUpdateCall) Header() http.Header {
38704	if c.header_ == nil {
38705		c.header_ = make(http.Header)
38706	}
38707	return c.header_
38708}
38709
38710func (c *PlacementGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
38711	reqHeaders := make(http.Header)
38712	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
38713	for k, v := range c.header_ {
38714		reqHeaders[k] = v
38715	}
38716	reqHeaders.Set("User-Agent", c.s.userAgent())
38717	var body io.Reader = nil
38718	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38719	if err != nil {
38720		return nil, err
38721	}
38722	reqHeaders.Set("Content-Type", "application/json")
38723	c.urlParams_.Set("alt", alt)
38724	c.urlParams_.Set("prettyPrint", "false")
38725	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38726	urls += "?" + c.urlParams_.Encode()
38727	req, err := http.NewRequest("PUT", urls, body)
38728	if err != nil {
38729		return nil, err
38730	}
38731	req.Header = reqHeaders
38732	googleapi.Expand(req.URL, map[string]string{
38733		"profileId": strconv.FormatInt(c.profileId, 10),
38734	})
38735	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38736}
38737
38738// Do executes the "dfareporting.placementGroups.update" call.
38739// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
38740// status code is an error. Response headers are in either
38741// *PlacementGroup.ServerResponse.Header or (if a response was returned
38742// at all) in error.(*googleapi.Error).Header. Use
38743// googleapi.IsNotModified to check whether the returned error was
38744// because http.StatusNotModified was returned.
38745func (c *PlacementGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38746	gensupport.SetOptions(c.urlParams_, opts...)
38747	res, err := c.doRequest("json")
38748	if res != nil && res.StatusCode == http.StatusNotModified {
38749		if res.Body != nil {
38750			res.Body.Close()
38751		}
38752		return nil, &googleapi.Error{
38753			Code:   res.StatusCode,
38754			Header: res.Header,
38755		}
38756	}
38757	if err != nil {
38758		return nil, err
38759	}
38760	defer googleapi.CloseBody(res)
38761	if err := googleapi.CheckResponse(res); err != nil {
38762		return nil, err
38763	}
38764	ret := &PlacementGroup{
38765		ServerResponse: googleapi.ServerResponse{
38766			Header:         res.Header,
38767			HTTPStatusCode: res.StatusCode,
38768		},
38769	}
38770	target := &ret
38771	if err := gensupport.DecodeResponse(target, res); err != nil {
38772		return nil, err
38773	}
38774	return ret, nil
38775	// {
38776	//   "description": "Updates an existing placement group.",
38777	//   "httpMethod": "PUT",
38778	//   "id": "dfareporting.placementGroups.update",
38779	//   "parameterOrder": [
38780	//     "profileId"
38781	//   ],
38782	//   "parameters": {
38783	//     "profileId": {
38784	//       "description": "User profile ID associated with this request.",
38785	//       "format": "int64",
38786	//       "location": "path",
38787	//       "required": true,
38788	//       "type": "string"
38789	//     }
38790	//   },
38791	//   "path": "userprofiles/{profileId}/placementGroups",
38792	//   "request": {
38793	//     "$ref": "PlacementGroup"
38794	//   },
38795	//   "response": {
38796	//     "$ref": "PlacementGroup"
38797	//   },
38798	//   "scopes": [
38799	//     "https://www.googleapis.com/auth/dfatrafficking"
38800	//   ]
38801	// }
38802
38803}
38804
38805// method id "dfareporting.placementStrategies.delete":
38806
38807type PlacementStrategiesDeleteCall struct {
38808	s          *Service
38809	profileId  int64
38810	id         int64
38811	urlParams_ gensupport.URLParams
38812	ctx_       context.Context
38813	header_    http.Header
38814}
38815
38816// Delete: Deletes an existing placement strategy.
38817func (r *PlacementStrategiesService) Delete(profileId int64, id int64) *PlacementStrategiesDeleteCall {
38818	c := &PlacementStrategiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38819	c.profileId = profileId
38820	c.id = id
38821	return c
38822}
38823
38824// Fields allows partial responses to be retrieved. See
38825// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38826// for more information.
38827func (c *PlacementStrategiesDeleteCall) Fields(s ...googleapi.Field) *PlacementStrategiesDeleteCall {
38828	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38829	return c
38830}
38831
38832// Context sets the context to be used in this call's Do method. Any
38833// pending HTTP request will be aborted if the provided context is
38834// canceled.
38835func (c *PlacementStrategiesDeleteCall) Context(ctx context.Context) *PlacementStrategiesDeleteCall {
38836	c.ctx_ = ctx
38837	return c
38838}
38839
38840// Header returns an http.Header that can be modified by the caller to
38841// add HTTP headers to the request.
38842func (c *PlacementStrategiesDeleteCall) Header() http.Header {
38843	if c.header_ == nil {
38844		c.header_ = make(http.Header)
38845	}
38846	return c.header_
38847}
38848
38849func (c *PlacementStrategiesDeleteCall) doRequest(alt string) (*http.Response, error) {
38850	reqHeaders := make(http.Header)
38851	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
38852	for k, v := range c.header_ {
38853		reqHeaders[k] = v
38854	}
38855	reqHeaders.Set("User-Agent", c.s.userAgent())
38856	var body io.Reader = nil
38857	c.urlParams_.Set("alt", alt)
38858	c.urlParams_.Set("prettyPrint", "false")
38859	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
38860	urls += "?" + c.urlParams_.Encode()
38861	req, err := http.NewRequest("DELETE", urls, body)
38862	if err != nil {
38863		return nil, err
38864	}
38865	req.Header = reqHeaders
38866	googleapi.Expand(req.URL, map[string]string{
38867		"profileId": strconv.FormatInt(c.profileId, 10),
38868		"id":        strconv.FormatInt(c.id, 10),
38869	})
38870	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38871}
38872
38873// Do executes the "dfareporting.placementStrategies.delete" call.
38874func (c *PlacementStrategiesDeleteCall) Do(opts ...googleapi.CallOption) error {
38875	gensupport.SetOptions(c.urlParams_, opts...)
38876	res, err := c.doRequest("json")
38877	if err != nil {
38878		return err
38879	}
38880	defer googleapi.CloseBody(res)
38881	if err := googleapi.CheckResponse(res); err != nil {
38882		return err
38883	}
38884	return nil
38885	// {
38886	//   "description": "Deletes an existing placement strategy.",
38887	//   "httpMethod": "DELETE",
38888	//   "id": "dfareporting.placementStrategies.delete",
38889	//   "parameterOrder": [
38890	//     "profileId",
38891	//     "id"
38892	//   ],
38893	//   "parameters": {
38894	//     "id": {
38895	//       "description": "Placement strategy ID.",
38896	//       "format": "int64",
38897	//       "location": "path",
38898	//       "required": true,
38899	//       "type": "string"
38900	//     },
38901	//     "profileId": {
38902	//       "description": "User profile ID associated with this request.",
38903	//       "format": "int64",
38904	//       "location": "path",
38905	//       "required": true,
38906	//       "type": "string"
38907	//     }
38908	//   },
38909	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
38910	//   "scopes": [
38911	//     "https://www.googleapis.com/auth/dfatrafficking"
38912	//   ]
38913	// }
38914
38915}
38916
38917// method id "dfareporting.placementStrategies.get":
38918
38919type PlacementStrategiesGetCall struct {
38920	s            *Service
38921	profileId    int64
38922	id           int64
38923	urlParams_   gensupport.URLParams
38924	ifNoneMatch_ string
38925	ctx_         context.Context
38926	header_      http.Header
38927}
38928
38929// Get: Gets one placement strategy by ID.
38930func (r *PlacementStrategiesService) Get(profileId int64, id int64) *PlacementStrategiesGetCall {
38931	c := &PlacementStrategiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38932	c.profileId = profileId
38933	c.id = id
38934	return c
38935}
38936
38937// Fields allows partial responses to be retrieved. See
38938// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38939// for more information.
38940func (c *PlacementStrategiesGetCall) Fields(s ...googleapi.Field) *PlacementStrategiesGetCall {
38941	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38942	return c
38943}
38944
38945// IfNoneMatch sets the optional parameter which makes the operation
38946// fail if the object's ETag matches the given value. This is useful for
38947// getting updates only after the object has changed since the last
38948// request. Use googleapi.IsNotModified to check whether the response
38949// error from Do is the result of In-None-Match.
38950func (c *PlacementStrategiesGetCall) IfNoneMatch(entityTag string) *PlacementStrategiesGetCall {
38951	c.ifNoneMatch_ = entityTag
38952	return c
38953}
38954
38955// Context sets the context to be used in this call's Do method. Any
38956// pending HTTP request will be aborted if the provided context is
38957// canceled.
38958func (c *PlacementStrategiesGetCall) Context(ctx context.Context) *PlacementStrategiesGetCall {
38959	c.ctx_ = ctx
38960	return c
38961}
38962
38963// Header returns an http.Header that can be modified by the caller to
38964// add HTTP headers to the request.
38965func (c *PlacementStrategiesGetCall) Header() http.Header {
38966	if c.header_ == nil {
38967		c.header_ = make(http.Header)
38968	}
38969	return c.header_
38970}
38971
38972func (c *PlacementStrategiesGetCall) doRequest(alt string) (*http.Response, error) {
38973	reqHeaders := make(http.Header)
38974	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
38975	for k, v := range c.header_ {
38976		reqHeaders[k] = v
38977	}
38978	reqHeaders.Set("User-Agent", c.s.userAgent())
38979	if c.ifNoneMatch_ != "" {
38980		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38981	}
38982	var body io.Reader = nil
38983	c.urlParams_.Set("alt", alt)
38984	c.urlParams_.Set("prettyPrint", "false")
38985	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
38986	urls += "?" + c.urlParams_.Encode()
38987	req, err := http.NewRequest("GET", urls, body)
38988	if err != nil {
38989		return nil, err
38990	}
38991	req.Header = reqHeaders
38992	googleapi.Expand(req.URL, map[string]string{
38993		"profileId": strconv.FormatInt(c.profileId, 10),
38994		"id":        strconv.FormatInt(c.id, 10),
38995	})
38996	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38997}
38998
38999// Do executes the "dfareporting.placementStrategies.get" call.
39000// Exactly one of *PlacementStrategy or error will be non-nil. Any
39001// non-2xx status code is an error. Response headers are in either
39002// *PlacementStrategy.ServerResponse.Header or (if a response was
39003// returned at all) in error.(*googleapi.Error).Header. Use
39004// googleapi.IsNotModified to check whether the returned error was
39005// because http.StatusNotModified was returned.
39006func (c *PlacementStrategiesGetCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39007	gensupport.SetOptions(c.urlParams_, opts...)
39008	res, err := c.doRequest("json")
39009	if res != nil && res.StatusCode == http.StatusNotModified {
39010		if res.Body != nil {
39011			res.Body.Close()
39012		}
39013		return nil, &googleapi.Error{
39014			Code:   res.StatusCode,
39015			Header: res.Header,
39016		}
39017	}
39018	if err != nil {
39019		return nil, err
39020	}
39021	defer googleapi.CloseBody(res)
39022	if err := googleapi.CheckResponse(res); err != nil {
39023		return nil, err
39024	}
39025	ret := &PlacementStrategy{
39026		ServerResponse: googleapi.ServerResponse{
39027			Header:         res.Header,
39028			HTTPStatusCode: res.StatusCode,
39029		},
39030	}
39031	target := &ret
39032	if err := gensupport.DecodeResponse(target, res); err != nil {
39033		return nil, err
39034	}
39035	return ret, nil
39036	// {
39037	//   "description": "Gets one placement strategy by ID.",
39038	//   "httpMethod": "GET",
39039	//   "id": "dfareporting.placementStrategies.get",
39040	//   "parameterOrder": [
39041	//     "profileId",
39042	//     "id"
39043	//   ],
39044	//   "parameters": {
39045	//     "id": {
39046	//       "description": "Placement strategy ID.",
39047	//       "format": "int64",
39048	//       "location": "path",
39049	//       "required": true,
39050	//       "type": "string"
39051	//     },
39052	//     "profileId": {
39053	//       "description": "User profile ID associated with this request.",
39054	//       "format": "int64",
39055	//       "location": "path",
39056	//       "required": true,
39057	//       "type": "string"
39058	//     }
39059	//   },
39060	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
39061	//   "response": {
39062	//     "$ref": "PlacementStrategy"
39063	//   },
39064	//   "scopes": [
39065	//     "https://www.googleapis.com/auth/dfatrafficking"
39066	//   ]
39067	// }
39068
39069}
39070
39071// method id "dfareporting.placementStrategies.insert":
39072
39073type PlacementStrategiesInsertCall struct {
39074	s                 *Service
39075	profileId         int64
39076	placementstrategy *PlacementStrategy
39077	urlParams_        gensupport.URLParams
39078	ctx_              context.Context
39079	header_           http.Header
39080}
39081
39082// Insert: Inserts a new placement strategy.
39083func (r *PlacementStrategiesService) Insert(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesInsertCall {
39084	c := &PlacementStrategiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39085	c.profileId = profileId
39086	c.placementstrategy = placementstrategy
39087	return c
39088}
39089
39090// Fields allows partial responses to be retrieved. See
39091// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39092// for more information.
39093func (c *PlacementStrategiesInsertCall) Fields(s ...googleapi.Field) *PlacementStrategiesInsertCall {
39094	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39095	return c
39096}
39097
39098// Context sets the context to be used in this call's Do method. Any
39099// pending HTTP request will be aborted if the provided context is
39100// canceled.
39101func (c *PlacementStrategiesInsertCall) Context(ctx context.Context) *PlacementStrategiesInsertCall {
39102	c.ctx_ = ctx
39103	return c
39104}
39105
39106// Header returns an http.Header that can be modified by the caller to
39107// add HTTP headers to the request.
39108func (c *PlacementStrategiesInsertCall) Header() http.Header {
39109	if c.header_ == nil {
39110		c.header_ = make(http.Header)
39111	}
39112	return c.header_
39113}
39114
39115func (c *PlacementStrategiesInsertCall) doRequest(alt string) (*http.Response, error) {
39116	reqHeaders := make(http.Header)
39117	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
39118	for k, v := range c.header_ {
39119		reqHeaders[k] = v
39120	}
39121	reqHeaders.Set("User-Agent", c.s.userAgent())
39122	var body io.Reader = nil
39123	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39124	if err != nil {
39125		return nil, err
39126	}
39127	reqHeaders.Set("Content-Type", "application/json")
39128	c.urlParams_.Set("alt", alt)
39129	c.urlParams_.Set("prettyPrint", "false")
39130	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39131	urls += "?" + c.urlParams_.Encode()
39132	req, err := http.NewRequest("POST", urls, body)
39133	if err != nil {
39134		return nil, err
39135	}
39136	req.Header = reqHeaders
39137	googleapi.Expand(req.URL, map[string]string{
39138		"profileId": strconv.FormatInt(c.profileId, 10),
39139	})
39140	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39141}
39142
39143// Do executes the "dfareporting.placementStrategies.insert" call.
39144// Exactly one of *PlacementStrategy or error will be non-nil. Any
39145// non-2xx status code is an error. Response headers are in either
39146// *PlacementStrategy.ServerResponse.Header or (if a response was
39147// returned at all) in error.(*googleapi.Error).Header. Use
39148// googleapi.IsNotModified to check whether the returned error was
39149// because http.StatusNotModified was returned.
39150func (c *PlacementStrategiesInsertCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39151	gensupport.SetOptions(c.urlParams_, opts...)
39152	res, err := c.doRequest("json")
39153	if res != nil && res.StatusCode == http.StatusNotModified {
39154		if res.Body != nil {
39155			res.Body.Close()
39156		}
39157		return nil, &googleapi.Error{
39158			Code:   res.StatusCode,
39159			Header: res.Header,
39160		}
39161	}
39162	if err != nil {
39163		return nil, err
39164	}
39165	defer googleapi.CloseBody(res)
39166	if err := googleapi.CheckResponse(res); err != nil {
39167		return nil, err
39168	}
39169	ret := &PlacementStrategy{
39170		ServerResponse: googleapi.ServerResponse{
39171			Header:         res.Header,
39172			HTTPStatusCode: res.StatusCode,
39173		},
39174	}
39175	target := &ret
39176	if err := gensupport.DecodeResponse(target, res); err != nil {
39177		return nil, err
39178	}
39179	return ret, nil
39180	// {
39181	//   "description": "Inserts a new placement strategy.",
39182	//   "httpMethod": "POST",
39183	//   "id": "dfareporting.placementStrategies.insert",
39184	//   "parameterOrder": [
39185	//     "profileId"
39186	//   ],
39187	//   "parameters": {
39188	//     "profileId": {
39189	//       "description": "User profile ID associated with this request.",
39190	//       "format": "int64",
39191	//       "location": "path",
39192	//       "required": true,
39193	//       "type": "string"
39194	//     }
39195	//   },
39196	//   "path": "userprofiles/{profileId}/placementStrategies",
39197	//   "request": {
39198	//     "$ref": "PlacementStrategy"
39199	//   },
39200	//   "response": {
39201	//     "$ref": "PlacementStrategy"
39202	//   },
39203	//   "scopes": [
39204	//     "https://www.googleapis.com/auth/dfatrafficking"
39205	//   ]
39206	// }
39207
39208}
39209
39210// method id "dfareporting.placementStrategies.list":
39211
39212type PlacementStrategiesListCall struct {
39213	s            *Service
39214	profileId    int64
39215	urlParams_   gensupport.URLParams
39216	ifNoneMatch_ string
39217	ctx_         context.Context
39218	header_      http.Header
39219}
39220
39221// List: Retrieves a list of placement strategies, possibly filtered.
39222// This method supports paging.
39223func (r *PlacementStrategiesService) List(profileId int64) *PlacementStrategiesListCall {
39224	c := &PlacementStrategiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39225	c.profileId = profileId
39226	return c
39227}
39228
39229// Ids sets the optional parameter "ids": Select only placement
39230// strategies with these IDs.
39231func (c *PlacementStrategiesListCall) Ids(ids ...int64) *PlacementStrategiesListCall {
39232	var ids_ []string
39233	for _, v := range ids {
39234		ids_ = append(ids_, fmt.Sprint(v))
39235	}
39236	c.urlParams_.SetMulti("ids", ids_)
39237	return c
39238}
39239
39240// MaxResults sets the optional parameter "maxResults": Maximum number
39241// of results to return.
39242func (c *PlacementStrategiesListCall) MaxResults(maxResults int64) *PlacementStrategiesListCall {
39243	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
39244	return c
39245}
39246
39247// PageToken sets the optional parameter "pageToken": Value of the
39248// nextPageToken from the previous result page.
39249func (c *PlacementStrategiesListCall) PageToken(pageToken string) *PlacementStrategiesListCall {
39250	c.urlParams_.Set("pageToken", pageToken)
39251	return c
39252}
39253
39254// SearchString sets the optional parameter "searchString": Allows
39255// searching for objects by name or ID. Wildcards (*) are allowed. For
39256// example, "placementstrategy*2015" will return objects with names like
39257// "placementstrategy June 2015", "placementstrategy April 2015", or
39258// simply "placementstrategy 2015". Most of the searches also add
39259// wildcards implicitly at the start and the end of the search string.
39260// For example, a search string of "placementstrategy" will match
39261// objects with name "my placementstrategy", "placementstrategy 2015",
39262// or simply "placementstrategy".
39263func (c *PlacementStrategiesListCall) SearchString(searchString string) *PlacementStrategiesListCall {
39264	c.urlParams_.Set("searchString", searchString)
39265	return c
39266}
39267
39268// SortField sets the optional parameter "sortField": Field by which to
39269// sort the list.
39270//
39271// Possible values:
39272//   "ID" (default)
39273//   "NAME"
39274func (c *PlacementStrategiesListCall) SortField(sortField string) *PlacementStrategiesListCall {
39275	c.urlParams_.Set("sortField", sortField)
39276	return c
39277}
39278
39279// SortOrder sets the optional parameter "sortOrder": Order of sorted
39280// results.
39281//
39282// Possible values:
39283//   "ASCENDING" (default)
39284//   "DESCENDING"
39285func (c *PlacementStrategiesListCall) SortOrder(sortOrder string) *PlacementStrategiesListCall {
39286	c.urlParams_.Set("sortOrder", sortOrder)
39287	return c
39288}
39289
39290// Fields allows partial responses to be retrieved. See
39291// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39292// for more information.
39293func (c *PlacementStrategiesListCall) Fields(s ...googleapi.Field) *PlacementStrategiesListCall {
39294	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39295	return c
39296}
39297
39298// IfNoneMatch sets the optional parameter which makes the operation
39299// fail if the object's ETag matches the given value. This is useful for
39300// getting updates only after the object has changed since the last
39301// request. Use googleapi.IsNotModified to check whether the response
39302// error from Do is the result of In-None-Match.
39303func (c *PlacementStrategiesListCall) IfNoneMatch(entityTag string) *PlacementStrategiesListCall {
39304	c.ifNoneMatch_ = entityTag
39305	return c
39306}
39307
39308// Context sets the context to be used in this call's Do method. Any
39309// pending HTTP request will be aborted if the provided context is
39310// canceled.
39311func (c *PlacementStrategiesListCall) Context(ctx context.Context) *PlacementStrategiesListCall {
39312	c.ctx_ = ctx
39313	return c
39314}
39315
39316// Header returns an http.Header that can be modified by the caller to
39317// add HTTP headers to the request.
39318func (c *PlacementStrategiesListCall) Header() http.Header {
39319	if c.header_ == nil {
39320		c.header_ = make(http.Header)
39321	}
39322	return c.header_
39323}
39324
39325func (c *PlacementStrategiesListCall) doRequest(alt string) (*http.Response, error) {
39326	reqHeaders := make(http.Header)
39327	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
39328	for k, v := range c.header_ {
39329		reqHeaders[k] = v
39330	}
39331	reqHeaders.Set("User-Agent", c.s.userAgent())
39332	if c.ifNoneMatch_ != "" {
39333		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39334	}
39335	var body io.Reader = nil
39336	c.urlParams_.Set("alt", alt)
39337	c.urlParams_.Set("prettyPrint", "false")
39338	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39339	urls += "?" + c.urlParams_.Encode()
39340	req, err := http.NewRequest("GET", urls, body)
39341	if err != nil {
39342		return nil, err
39343	}
39344	req.Header = reqHeaders
39345	googleapi.Expand(req.URL, map[string]string{
39346		"profileId": strconv.FormatInt(c.profileId, 10),
39347	})
39348	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39349}
39350
39351// Do executes the "dfareporting.placementStrategies.list" call.
39352// Exactly one of *PlacementStrategiesListResponse or error will be
39353// non-nil. Any non-2xx status code is an error. Response headers are in
39354// either *PlacementStrategiesListResponse.ServerResponse.Header or (if
39355// a response was returned at all) in error.(*googleapi.Error).Header.
39356// Use googleapi.IsNotModified to check whether the returned error was
39357// because http.StatusNotModified was returned.
39358func (c *PlacementStrategiesListCall) Do(opts ...googleapi.CallOption) (*PlacementStrategiesListResponse, error) {
39359	gensupport.SetOptions(c.urlParams_, opts...)
39360	res, err := c.doRequest("json")
39361	if res != nil && res.StatusCode == http.StatusNotModified {
39362		if res.Body != nil {
39363			res.Body.Close()
39364		}
39365		return nil, &googleapi.Error{
39366			Code:   res.StatusCode,
39367			Header: res.Header,
39368		}
39369	}
39370	if err != nil {
39371		return nil, err
39372	}
39373	defer googleapi.CloseBody(res)
39374	if err := googleapi.CheckResponse(res); err != nil {
39375		return nil, err
39376	}
39377	ret := &PlacementStrategiesListResponse{
39378		ServerResponse: googleapi.ServerResponse{
39379			Header:         res.Header,
39380			HTTPStatusCode: res.StatusCode,
39381		},
39382	}
39383	target := &ret
39384	if err := gensupport.DecodeResponse(target, res); err != nil {
39385		return nil, err
39386	}
39387	return ret, nil
39388	// {
39389	//   "description": "Retrieves a list of placement strategies, possibly filtered. This method supports paging.",
39390	//   "httpMethod": "GET",
39391	//   "id": "dfareporting.placementStrategies.list",
39392	//   "parameterOrder": [
39393	//     "profileId"
39394	//   ],
39395	//   "parameters": {
39396	//     "ids": {
39397	//       "description": "Select only placement strategies with these IDs.",
39398	//       "format": "int64",
39399	//       "location": "query",
39400	//       "repeated": true,
39401	//       "type": "string"
39402	//     },
39403	//     "maxResults": {
39404	//       "default": "1000",
39405	//       "description": "Maximum number of results to return.",
39406	//       "format": "int32",
39407	//       "location": "query",
39408	//       "maximum": "1000",
39409	//       "minimum": "0",
39410	//       "type": "integer"
39411	//     },
39412	//     "pageToken": {
39413	//       "description": "Value of the nextPageToken from the previous result page.",
39414	//       "location": "query",
39415	//       "type": "string"
39416	//     },
39417	//     "profileId": {
39418	//       "description": "User profile ID associated with this request.",
39419	//       "format": "int64",
39420	//       "location": "path",
39421	//       "required": true,
39422	//       "type": "string"
39423	//     },
39424	//     "searchString": {
39425	//       "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\".",
39426	//       "location": "query",
39427	//       "type": "string"
39428	//     },
39429	//     "sortField": {
39430	//       "default": "ID",
39431	//       "description": "Field by which to sort the list.",
39432	//       "enum": [
39433	//         "ID",
39434	//         "NAME"
39435	//       ],
39436	//       "enumDescriptions": [
39437	//         "",
39438	//         ""
39439	//       ],
39440	//       "location": "query",
39441	//       "type": "string"
39442	//     },
39443	//     "sortOrder": {
39444	//       "default": "ASCENDING",
39445	//       "description": "Order of sorted results.",
39446	//       "enum": [
39447	//         "ASCENDING",
39448	//         "DESCENDING"
39449	//       ],
39450	//       "enumDescriptions": [
39451	//         "",
39452	//         ""
39453	//       ],
39454	//       "location": "query",
39455	//       "type": "string"
39456	//     }
39457	//   },
39458	//   "path": "userprofiles/{profileId}/placementStrategies",
39459	//   "response": {
39460	//     "$ref": "PlacementStrategiesListResponse"
39461	//   },
39462	//   "scopes": [
39463	//     "https://www.googleapis.com/auth/dfatrafficking"
39464	//   ]
39465	// }
39466
39467}
39468
39469// Pages invokes f for each page of results.
39470// A non-nil error returned from f will halt the iteration.
39471// The provided context supersedes any context provided to the Context method.
39472func (c *PlacementStrategiesListCall) Pages(ctx context.Context, f func(*PlacementStrategiesListResponse) error) error {
39473	c.ctx_ = ctx
39474	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
39475	for {
39476		x, err := c.Do()
39477		if err != nil {
39478			return err
39479		}
39480		if err := f(x); err != nil {
39481			return err
39482		}
39483		if x.NextPageToken == "" {
39484			return nil
39485		}
39486		c.PageToken(x.NextPageToken)
39487	}
39488}
39489
39490// method id "dfareporting.placementStrategies.patch":
39491
39492type PlacementStrategiesPatchCall struct {
39493	s                 *Service
39494	profileId         int64
39495	placementstrategy *PlacementStrategy
39496	urlParams_        gensupport.URLParams
39497	ctx_              context.Context
39498	header_           http.Header
39499}
39500
39501// Patch: Updates an existing placement strategy. This method supports
39502// patch semantics.
39503func (r *PlacementStrategiesService) Patch(profileId int64, id int64, placementstrategy *PlacementStrategy) *PlacementStrategiesPatchCall {
39504	c := &PlacementStrategiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39505	c.profileId = profileId
39506	c.urlParams_.Set("id", fmt.Sprint(id))
39507	c.placementstrategy = placementstrategy
39508	return c
39509}
39510
39511// Fields allows partial responses to be retrieved. See
39512// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39513// for more information.
39514func (c *PlacementStrategiesPatchCall) Fields(s ...googleapi.Field) *PlacementStrategiesPatchCall {
39515	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39516	return c
39517}
39518
39519// Context sets the context to be used in this call's Do method. Any
39520// pending HTTP request will be aborted if the provided context is
39521// canceled.
39522func (c *PlacementStrategiesPatchCall) Context(ctx context.Context) *PlacementStrategiesPatchCall {
39523	c.ctx_ = ctx
39524	return c
39525}
39526
39527// Header returns an http.Header that can be modified by the caller to
39528// add HTTP headers to the request.
39529func (c *PlacementStrategiesPatchCall) Header() http.Header {
39530	if c.header_ == nil {
39531		c.header_ = make(http.Header)
39532	}
39533	return c.header_
39534}
39535
39536func (c *PlacementStrategiesPatchCall) doRequest(alt string) (*http.Response, error) {
39537	reqHeaders := make(http.Header)
39538	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
39539	for k, v := range c.header_ {
39540		reqHeaders[k] = v
39541	}
39542	reqHeaders.Set("User-Agent", c.s.userAgent())
39543	var body io.Reader = nil
39544	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39545	if err != nil {
39546		return nil, err
39547	}
39548	reqHeaders.Set("Content-Type", "application/json")
39549	c.urlParams_.Set("alt", alt)
39550	c.urlParams_.Set("prettyPrint", "false")
39551	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39552	urls += "?" + c.urlParams_.Encode()
39553	req, err := http.NewRequest("PATCH", urls, body)
39554	if err != nil {
39555		return nil, err
39556	}
39557	req.Header = reqHeaders
39558	googleapi.Expand(req.URL, map[string]string{
39559		"profileId": strconv.FormatInt(c.profileId, 10),
39560	})
39561	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39562}
39563
39564// Do executes the "dfareporting.placementStrategies.patch" call.
39565// Exactly one of *PlacementStrategy or error will be non-nil. Any
39566// non-2xx status code is an error. Response headers are in either
39567// *PlacementStrategy.ServerResponse.Header or (if a response was
39568// returned at all) in error.(*googleapi.Error).Header. Use
39569// googleapi.IsNotModified to check whether the returned error was
39570// because http.StatusNotModified was returned.
39571func (c *PlacementStrategiesPatchCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39572	gensupport.SetOptions(c.urlParams_, opts...)
39573	res, err := c.doRequest("json")
39574	if res != nil && res.StatusCode == http.StatusNotModified {
39575		if res.Body != nil {
39576			res.Body.Close()
39577		}
39578		return nil, &googleapi.Error{
39579			Code:   res.StatusCode,
39580			Header: res.Header,
39581		}
39582	}
39583	if err != nil {
39584		return nil, err
39585	}
39586	defer googleapi.CloseBody(res)
39587	if err := googleapi.CheckResponse(res); err != nil {
39588		return nil, err
39589	}
39590	ret := &PlacementStrategy{
39591		ServerResponse: googleapi.ServerResponse{
39592			Header:         res.Header,
39593			HTTPStatusCode: res.StatusCode,
39594		},
39595	}
39596	target := &ret
39597	if err := gensupport.DecodeResponse(target, res); err != nil {
39598		return nil, err
39599	}
39600	return ret, nil
39601	// {
39602	//   "description": "Updates an existing placement strategy. This method supports patch semantics.",
39603	//   "httpMethod": "PATCH",
39604	//   "id": "dfareporting.placementStrategies.patch",
39605	//   "parameterOrder": [
39606	//     "profileId",
39607	//     "id"
39608	//   ],
39609	//   "parameters": {
39610	//     "id": {
39611	//       "description": "Placement strategy ID.",
39612	//       "format": "int64",
39613	//       "location": "query",
39614	//       "required": true,
39615	//       "type": "string"
39616	//     },
39617	//     "profileId": {
39618	//       "description": "User profile ID associated with this request.",
39619	//       "format": "int64",
39620	//       "location": "path",
39621	//       "required": true,
39622	//       "type": "string"
39623	//     }
39624	//   },
39625	//   "path": "userprofiles/{profileId}/placementStrategies",
39626	//   "request": {
39627	//     "$ref": "PlacementStrategy"
39628	//   },
39629	//   "response": {
39630	//     "$ref": "PlacementStrategy"
39631	//   },
39632	//   "scopes": [
39633	//     "https://www.googleapis.com/auth/dfatrafficking"
39634	//   ]
39635	// }
39636
39637}
39638
39639// method id "dfareporting.placementStrategies.update":
39640
39641type PlacementStrategiesUpdateCall struct {
39642	s                 *Service
39643	profileId         int64
39644	placementstrategy *PlacementStrategy
39645	urlParams_        gensupport.URLParams
39646	ctx_              context.Context
39647	header_           http.Header
39648}
39649
39650// Update: Updates an existing placement strategy.
39651func (r *PlacementStrategiesService) Update(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesUpdateCall {
39652	c := &PlacementStrategiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39653	c.profileId = profileId
39654	c.placementstrategy = placementstrategy
39655	return c
39656}
39657
39658// Fields allows partial responses to be retrieved. See
39659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39660// for more information.
39661func (c *PlacementStrategiesUpdateCall) Fields(s ...googleapi.Field) *PlacementStrategiesUpdateCall {
39662	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39663	return c
39664}
39665
39666// Context sets the context to be used in this call's Do method. Any
39667// pending HTTP request will be aborted if the provided context is
39668// canceled.
39669func (c *PlacementStrategiesUpdateCall) Context(ctx context.Context) *PlacementStrategiesUpdateCall {
39670	c.ctx_ = ctx
39671	return c
39672}
39673
39674// Header returns an http.Header that can be modified by the caller to
39675// add HTTP headers to the request.
39676func (c *PlacementStrategiesUpdateCall) Header() http.Header {
39677	if c.header_ == nil {
39678		c.header_ = make(http.Header)
39679	}
39680	return c.header_
39681}
39682
39683func (c *PlacementStrategiesUpdateCall) doRequest(alt string) (*http.Response, error) {
39684	reqHeaders := make(http.Header)
39685	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
39686	for k, v := range c.header_ {
39687		reqHeaders[k] = v
39688	}
39689	reqHeaders.Set("User-Agent", c.s.userAgent())
39690	var body io.Reader = nil
39691	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39692	if err != nil {
39693		return nil, err
39694	}
39695	reqHeaders.Set("Content-Type", "application/json")
39696	c.urlParams_.Set("alt", alt)
39697	c.urlParams_.Set("prettyPrint", "false")
39698	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39699	urls += "?" + c.urlParams_.Encode()
39700	req, err := http.NewRequest("PUT", urls, body)
39701	if err != nil {
39702		return nil, err
39703	}
39704	req.Header = reqHeaders
39705	googleapi.Expand(req.URL, map[string]string{
39706		"profileId": strconv.FormatInt(c.profileId, 10),
39707	})
39708	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39709}
39710
39711// Do executes the "dfareporting.placementStrategies.update" call.
39712// Exactly one of *PlacementStrategy or error will be non-nil. Any
39713// non-2xx status code is an error. Response headers are in either
39714// *PlacementStrategy.ServerResponse.Header or (if a response was
39715// returned at all) in error.(*googleapi.Error).Header. Use
39716// googleapi.IsNotModified to check whether the returned error was
39717// because http.StatusNotModified was returned.
39718func (c *PlacementStrategiesUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39719	gensupport.SetOptions(c.urlParams_, opts...)
39720	res, err := c.doRequest("json")
39721	if res != nil && res.StatusCode == http.StatusNotModified {
39722		if res.Body != nil {
39723			res.Body.Close()
39724		}
39725		return nil, &googleapi.Error{
39726			Code:   res.StatusCode,
39727			Header: res.Header,
39728		}
39729	}
39730	if err != nil {
39731		return nil, err
39732	}
39733	defer googleapi.CloseBody(res)
39734	if err := googleapi.CheckResponse(res); err != nil {
39735		return nil, err
39736	}
39737	ret := &PlacementStrategy{
39738		ServerResponse: googleapi.ServerResponse{
39739			Header:         res.Header,
39740			HTTPStatusCode: res.StatusCode,
39741		},
39742	}
39743	target := &ret
39744	if err := gensupport.DecodeResponse(target, res); err != nil {
39745		return nil, err
39746	}
39747	return ret, nil
39748	// {
39749	//   "description": "Updates an existing placement strategy.",
39750	//   "httpMethod": "PUT",
39751	//   "id": "dfareporting.placementStrategies.update",
39752	//   "parameterOrder": [
39753	//     "profileId"
39754	//   ],
39755	//   "parameters": {
39756	//     "profileId": {
39757	//       "description": "User profile ID associated with this request.",
39758	//       "format": "int64",
39759	//       "location": "path",
39760	//       "required": true,
39761	//       "type": "string"
39762	//     }
39763	//   },
39764	//   "path": "userprofiles/{profileId}/placementStrategies",
39765	//   "request": {
39766	//     "$ref": "PlacementStrategy"
39767	//   },
39768	//   "response": {
39769	//     "$ref": "PlacementStrategy"
39770	//   },
39771	//   "scopes": [
39772	//     "https://www.googleapis.com/auth/dfatrafficking"
39773	//   ]
39774	// }
39775
39776}
39777
39778// method id "dfareporting.placements.generatetags":
39779
39780type PlacementsGeneratetagsCall struct {
39781	s          *Service
39782	profileId  int64
39783	urlParams_ gensupport.URLParams
39784	ctx_       context.Context
39785	header_    http.Header
39786}
39787
39788// Generatetags: Generates tags for a placement.
39789func (r *PlacementsService) Generatetags(profileId int64) *PlacementsGeneratetagsCall {
39790	c := &PlacementsGeneratetagsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39791	c.profileId = profileId
39792	return c
39793}
39794
39795// CampaignId sets the optional parameter "campaignId": Generate
39796// placements belonging to this campaign. This is a required field.
39797func (c *PlacementsGeneratetagsCall) CampaignId(campaignId int64) *PlacementsGeneratetagsCall {
39798	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
39799	return c
39800}
39801
39802// PlacementIds sets the optional parameter "placementIds": Generate
39803// tags for these placements.
39804func (c *PlacementsGeneratetagsCall) PlacementIds(placementIds ...int64) *PlacementsGeneratetagsCall {
39805	var placementIds_ []string
39806	for _, v := range placementIds {
39807		placementIds_ = append(placementIds_, fmt.Sprint(v))
39808	}
39809	c.urlParams_.SetMulti("placementIds", placementIds_)
39810	return c
39811}
39812
39813// TagFormats sets the optional parameter "tagFormats": Tag formats to
39814// generate for these placements.
39815//
39816// Note: PLACEMENT_TAG_STANDARD can only be generated for 1x1
39817// placements.
39818//
39819// Possible values:
39820//   "PLACEMENT_TAG_CLICK_COMMANDS"
39821//   "PLACEMENT_TAG_IFRAME_ILAYER"
39822//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
39823//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
39824//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
39825//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
39826//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
39827//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
39828//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
39829//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
39830//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
39831//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
39832//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
39833//   "PLACEMENT_TAG_JAVASCRIPT"
39834//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
39835//   "PLACEMENT_TAG_STANDARD"
39836//   "PLACEMENT_TAG_TRACKING"
39837//   "PLACEMENT_TAG_TRACKING_IFRAME"
39838//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
39839func (c *PlacementsGeneratetagsCall) TagFormats(tagFormats ...string) *PlacementsGeneratetagsCall {
39840	c.urlParams_.SetMulti("tagFormats", append([]string{}, tagFormats...))
39841	return c
39842}
39843
39844// Fields allows partial responses to be retrieved. See
39845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39846// for more information.
39847func (c *PlacementsGeneratetagsCall) Fields(s ...googleapi.Field) *PlacementsGeneratetagsCall {
39848	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39849	return c
39850}
39851
39852// Context sets the context to be used in this call's Do method. Any
39853// pending HTTP request will be aborted if the provided context is
39854// canceled.
39855func (c *PlacementsGeneratetagsCall) Context(ctx context.Context) *PlacementsGeneratetagsCall {
39856	c.ctx_ = ctx
39857	return c
39858}
39859
39860// Header returns an http.Header that can be modified by the caller to
39861// add HTTP headers to the request.
39862func (c *PlacementsGeneratetagsCall) Header() http.Header {
39863	if c.header_ == nil {
39864		c.header_ = make(http.Header)
39865	}
39866	return c.header_
39867}
39868
39869func (c *PlacementsGeneratetagsCall) doRequest(alt string) (*http.Response, error) {
39870	reqHeaders := make(http.Header)
39871	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
39872	for k, v := range c.header_ {
39873		reqHeaders[k] = v
39874	}
39875	reqHeaders.Set("User-Agent", c.s.userAgent())
39876	var body io.Reader = nil
39877	c.urlParams_.Set("alt", alt)
39878	c.urlParams_.Set("prettyPrint", "false")
39879	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/generatetags")
39880	urls += "?" + c.urlParams_.Encode()
39881	req, err := http.NewRequest("POST", urls, body)
39882	if err != nil {
39883		return nil, err
39884	}
39885	req.Header = reqHeaders
39886	googleapi.Expand(req.URL, map[string]string{
39887		"profileId": strconv.FormatInt(c.profileId, 10),
39888	})
39889	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39890}
39891
39892// Do executes the "dfareporting.placements.generatetags" call.
39893// Exactly one of *PlacementsGenerateTagsResponse or error will be
39894// non-nil. Any non-2xx status code is an error. Response headers are in
39895// either *PlacementsGenerateTagsResponse.ServerResponse.Header or (if a
39896// response was returned at all) in error.(*googleapi.Error).Header. Use
39897// googleapi.IsNotModified to check whether the returned error was
39898// because http.StatusNotModified was returned.
39899func (c *PlacementsGeneratetagsCall) Do(opts ...googleapi.CallOption) (*PlacementsGenerateTagsResponse, error) {
39900	gensupport.SetOptions(c.urlParams_, opts...)
39901	res, err := c.doRequest("json")
39902	if res != nil && res.StatusCode == http.StatusNotModified {
39903		if res.Body != nil {
39904			res.Body.Close()
39905		}
39906		return nil, &googleapi.Error{
39907			Code:   res.StatusCode,
39908			Header: res.Header,
39909		}
39910	}
39911	if err != nil {
39912		return nil, err
39913	}
39914	defer googleapi.CloseBody(res)
39915	if err := googleapi.CheckResponse(res); err != nil {
39916		return nil, err
39917	}
39918	ret := &PlacementsGenerateTagsResponse{
39919		ServerResponse: googleapi.ServerResponse{
39920			Header:         res.Header,
39921			HTTPStatusCode: res.StatusCode,
39922		},
39923	}
39924	target := &ret
39925	if err := gensupport.DecodeResponse(target, res); err != nil {
39926		return nil, err
39927	}
39928	return ret, nil
39929	// {
39930	//   "description": "Generates tags for a placement.",
39931	//   "httpMethod": "POST",
39932	//   "id": "dfareporting.placements.generatetags",
39933	//   "parameterOrder": [
39934	//     "profileId"
39935	//   ],
39936	//   "parameters": {
39937	//     "campaignId": {
39938	//       "description": "Generate placements belonging to this campaign. This is a required field.",
39939	//       "format": "int64",
39940	//       "location": "query",
39941	//       "type": "string"
39942	//     },
39943	//     "placementIds": {
39944	//       "description": "Generate tags for these placements.",
39945	//       "format": "int64",
39946	//       "location": "query",
39947	//       "repeated": true,
39948	//       "type": "string"
39949	//     },
39950	//     "profileId": {
39951	//       "description": "User profile ID associated with this request.",
39952	//       "format": "int64",
39953	//       "location": "path",
39954	//       "required": true,
39955	//       "type": "string"
39956	//     },
39957	//     "tagFormats": {
39958	//       "description": "Tag formats to generate for these placements.\n\nNote: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.",
39959	//       "enum": [
39960	//         "PLACEMENT_TAG_CLICK_COMMANDS",
39961	//         "PLACEMENT_TAG_IFRAME_ILAYER",
39962	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT",
39963	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY",
39964	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH",
39965	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3",
39966	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4",
39967	//         "PLACEMENT_TAG_INTERNAL_REDIRECT",
39968	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT",
39969	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY",
39970	//         "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT",
39971	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT",
39972	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY",
39973	//         "PLACEMENT_TAG_JAVASCRIPT",
39974	//         "PLACEMENT_TAG_JAVASCRIPT_LEGACY",
39975	//         "PLACEMENT_TAG_STANDARD",
39976	//         "PLACEMENT_TAG_TRACKING",
39977	//         "PLACEMENT_TAG_TRACKING_IFRAME",
39978	//         "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
39979	//       ],
39980	//       "enumDescriptions": [
39981	//         "",
39982	//         "",
39983	//         "",
39984	//         "",
39985	//         "",
39986	//         "",
39987	//         "",
39988	//         "",
39989	//         "",
39990	//         "",
39991	//         "",
39992	//         "",
39993	//         "",
39994	//         "",
39995	//         "",
39996	//         "",
39997	//         "",
39998	//         "",
39999	//         ""
40000	//       ],
40001	//       "location": "query",
40002	//       "repeated": true,
40003	//       "type": "string"
40004	//     }
40005	//   },
40006	//   "path": "userprofiles/{profileId}/placements/generatetags",
40007	//   "response": {
40008	//     "$ref": "PlacementsGenerateTagsResponse"
40009	//   },
40010	//   "scopes": [
40011	//     "https://www.googleapis.com/auth/dfatrafficking"
40012	//   ]
40013	// }
40014
40015}
40016
40017// method id "dfareporting.placements.get":
40018
40019type PlacementsGetCall struct {
40020	s            *Service
40021	profileId    int64
40022	id           int64
40023	urlParams_   gensupport.URLParams
40024	ifNoneMatch_ string
40025	ctx_         context.Context
40026	header_      http.Header
40027}
40028
40029// Get: Gets one placement by ID.
40030func (r *PlacementsService) Get(profileId int64, id int64) *PlacementsGetCall {
40031	c := &PlacementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40032	c.profileId = profileId
40033	c.id = id
40034	return c
40035}
40036
40037// Fields allows partial responses to be retrieved. See
40038// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40039// for more information.
40040func (c *PlacementsGetCall) Fields(s ...googleapi.Field) *PlacementsGetCall {
40041	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40042	return c
40043}
40044
40045// IfNoneMatch sets the optional parameter which makes the operation
40046// fail if the object's ETag matches the given value. This is useful for
40047// getting updates only after the object has changed since the last
40048// request. Use googleapi.IsNotModified to check whether the response
40049// error from Do is the result of In-None-Match.
40050func (c *PlacementsGetCall) IfNoneMatch(entityTag string) *PlacementsGetCall {
40051	c.ifNoneMatch_ = entityTag
40052	return c
40053}
40054
40055// Context sets the context to be used in this call's Do method. Any
40056// pending HTTP request will be aborted if the provided context is
40057// canceled.
40058func (c *PlacementsGetCall) Context(ctx context.Context) *PlacementsGetCall {
40059	c.ctx_ = ctx
40060	return c
40061}
40062
40063// Header returns an http.Header that can be modified by the caller to
40064// add HTTP headers to the request.
40065func (c *PlacementsGetCall) Header() http.Header {
40066	if c.header_ == nil {
40067		c.header_ = make(http.Header)
40068	}
40069	return c.header_
40070}
40071
40072func (c *PlacementsGetCall) doRequest(alt string) (*http.Response, error) {
40073	reqHeaders := make(http.Header)
40074	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
40075	for k, v := range c.header_ {
40076		reqHeaders[k] = v
40077	}
40078	reqHeaders.Set("User-Agent", c.s.userAgent())
40079	if c.ifNoneMatch_ != "" {
40080		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40081	}
40082	var body io.Reader = nil
40083	c.urlParams_.Set("alt", alt)
40084	c.urlParams_.Set("prettyPrint", "false")
40085	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/{id}")
40086	urls += "?" + c.urlParams_.Encode()
40087	req, err := http.NewRequest("GET", urls, body)
40088	if err != nil {
40089		return nil, err
40090	}
40091	req.Header = reqHeaders
40092	googleapi.Expand(req.URL, map[string]string{
40093		"profileId": strconv.FormatInt(c.profileId, 10),
40094		"id":        strconv.FormatInt(c.id, 10),
40095	})
40096	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40097}
40098
40099// Do executes the "dfareporting.placements.get" call.
40100// Exactly one of *Placement or error will be non-nil. Any non-2xx
40101// status code is an error. Response headers are in either
40102// *Placement.ServerResponse.Header or (if a response was returned at
40103// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40104// to check whether the returned error was because
40105// http.StatusNotModified was returned.
40106func (c *PlacementsGetCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40107	gensupport.SetOptions(c.urlParams_, opts...)
40108	res, err := c.doRequest("json")
40109	if res != nil && res.StatusCode == http.StatusNotModified {
40110		if res.Body != nil {
40111			res.Body.Close()
40112		}
40113		return nil, &googleapi.Error{
40114			Code:   res.StatusCode,
40115			Header: res.Header,
40116		}
40117	}
40118	if err != nil {
40119		return nil, err
40120	}
40121	defer googleapi.CloseBody(res)
40122	if err := googleapi.CheckResponse(res); err != nil {
40123		return nil, err
40124	}
40125	ret := &Placement{
40126		ServerResponse: googleapi.ServerResponse{
40127			Header:         res.Header,
40128			HTTPStatusCode: res.StatusCode,
40129		},
40130	}
40131	target := &ret
40132	if err := gensupport.DecodeResponse(target, res); err != nil {
40133		return nil, err
40134	}
40135	return ret, nil
40136	// {
40137	//   "description": "Gets one placement by ID.",
40138	//   "httpMethod": "GET",
40139	//   "id": "dfareporting.placements.get",
40140	//   "parameterOrder": [
40141	//     "profileId",
40142	//     "id"
40143	//   ],
40144	//   "parameters": {
40145	//     "id": {
40146	//       "description": "Placement ID.",
40147	//       "format": "int64",
40148	//       "location": "path",
40149	//       "required": true,
40150	//       "type": "string"
40151	//     },
40152	//     "profileId": {
40153	//       "description": "User profile ID associated with this request.",
40154	//       "format": "int64",
40155	//       "location": "path",
40156	//       "required": true,
40157	//       "type": "string"
40158	//     }
40159	//   },
40160	//   "path": "userprofiles/{profileId}/placements/{id}",
40161	//   "response": {
40162	//     "$ref": "Placement"
40163	//   },
40164	//   "scopes": [
40165	//     "https://www.googleapis.com/auth/dfatrafficking"
40166	//   ]
40167	// }
40168
40169}
40170
40171// method id "dfareporting.placements.insert":
40172
40173type PlacementsInsertCall struct {
40174	s          *Service
40175	profileId  int64
40176	placement  *Placement
40177	urlParams_ gensupport.URLParams
40178	ctx_       context.Context
40179	header_    http.Header
40180}
40181
40182// Insert: Inserts a new placement.
40183func (r *PlacementsService) Insert(profileId int64, placement *Placement) *PlacementsInsertCall {
40184	c := &PlacementsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40185	c.profileId = profileId
40186	c.placement = placement
40187	return c
40188}
40189
40190// Fields allows partial responses to be retrieved. See
40191// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40192// for more information.
40193func (c *PlacementsInsertCall) Fields(s ...googleapi.Field) *PlacementsInsertCall {
40194	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40195	return c
40196}
40197
40198// Context sets the context to be used in this call's Do method. Any
40199// pending HTTP request will be aborted if the provided context is
40200// canceled.
40201func (c *PlacementsInsertCall) Context(ctx context.Context) *PlacementsInsertCall {
40202	c.ctx_ = ctx
40203	return c
40204}
40205
40206// Header returns an http.Header that can be modified by the caller to
40207// add HTTP headers to the request.
40208func (c *PlacementsInsertCall) Header() http.Header {
40209	if c.header_ == nil {
40210		c.header_ = make(http.Header)
40211	}
40212	return c.header_
40213}
40214
40215func (c *PlacementsInsertCall) doRequest(alt string) (*http.Response, error) {
40216	reqHeaders := make(http.Header)
40217	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
40218	for k, v := range c.header_ {
40219		reqHeaders[k] = v
40220	}
40221	reqHeaders.Set("User-Agent", c.s.userAgent())
40222	var body io.Reader = nil
40223	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40224	if err != nil {
40225		return nil, err
40226	}
40227	reqHeaders.Set("Content-Type", "application/json")
40228	c.urlParams_.Set("alt", alt)
40229	c.urlParams_.Set("prettyPrint", "false")
40230	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40231	urls += "?" + c.urlParams_.Encode()
40232	req, err := http.NewRequest("POST", urls, body)
40233	if err != nil {
40234		return nil, err
40235	}
40236	req.Header = reqHeaders
40237	googleapi.Expand(req.URL, map[string]string{
40238		"profileId": strconv.FormatInt(c.profileId, 10),
40239	})
40240	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40241}
40242
40243// Do executes the "dfareporting.placements.insert" call.
40244// Exactly one of *Placement or error will be non-nil. Any non-2xx
40245// status code is an error. Response headers are in either
40246// *Placement.ServerResponse.Header or (if a response was returned at
40247// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40248// to check whether the returned error was because
40249// http.StatusNotModified was returned.
40250func (c *PlacementsInsertCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40251	gensupport.SetOptions(c.urlParams_, opts...)
40252	res, err := c.doRequest("json")
40253	if res != nil && res.StatusCode == http.StatusNotModified {
40254		if res.Body != nil {
40255			res.Body.Close()
40256		}
40257		return nil, &googleapi.Error{
40258			Code:   res.StatusCode,
40259			Header: res.Header,
40260		}
40261	}
40262	if err != nil {
40263		return nil, err
40264	}
40265	defer googleapi.CloseBody(res)
40266	if err := googleapi.CheckResponse(res); err != nil {
40267		return nil, err
40268	}
40269	ret := &Placement{
40270		ServerResponse: googleapi.ServerResponse{
40271			Header:         res.Header,
40272			HTTPStatusCode: res.StatusCode,
40273		},
40274	}
40275	target := &ret
40276	if err := gensupport.DecodeResponse(target, res); err != nil {
40277		return nil, err
40278	}
40279	return ret, nil
40280	// {
40281	//   "description": "Inserts a new placement.",
40282	//   "httpMethod": "POST",
40283	//   "id": "dfareporting.placements.insert",
40284	//   "parameterOrder": [
40285	//     "profileId"
40286	//   ],
40287	//   "parameters": {
40288	//     "profileId": {
40289	//       "description": "User profile ID associated with this request.",
40290	//       "format": "int64",
40291	//       "location": "path",
40292	//       "required": true,
40293	//       "type": "string"
40294	//     }
40295	//   },
40296	//   "path": "userprofiles/{profileId}/placements",
40297	//   "request": {
40298	//     "$ref": "Placement"
40299	//   },
40300	//   "response": {
40301	//     "$ref": "Placement"
40302	//   },
40303	//   "scopes": [
40304	//     "https://www.googleapis.com/auth/dfatrafficking"
40305	//   ]
40306	// }
40307
40308}
40309
40310// method id "dfareporting.placements.list":
40311
40312type PlacementsListCall struct {
40313	s            *Service
40314	profileId    int64
40315	urlParams_   gensupport.URLParams
40316	ifNoneMatch_ string
40317	ctx_         context.Context
40318	header_      http.Header
40319}
40320
40321// List: Retrieves a list of placements, possibly filtered. This method
40322// supports paging.
40323func (r *PlacementsService) List(profileId int64) *PlacementsListCall {
40324	c := &PlacementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40325	c.profileId = profileId
40326	return c
40327}
40328
40329// AdvertiserIds sets the optional parameter "advertiserIds": Select
40330// only placements that belong to these advertisers.
40331func (c *PlacementsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementsListCall {
40332	var advertiserIds_ []string
40333	for _, v := range advertiserIds {
40334		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
40335	}
40336	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
40337	return c
40338}
40339
40340// Archived sets the optional parameter "archived": Select only archived
40341// placements. Don't set this field to select both archived and
40342// non-archived placements.
40343func (c *PlacementsListCall) Archived(archived bool) *PlacementsListCall {
40344	c.urlParams_.Set("archived", fmt.Sprint(archived))
40345	return c
40346}
40347
40348// CampaignIds sets the optional parameter "campaignIds": Select only
40349// placements that belong to these campaigns.
40350func (c *PlacementsListCall) CampaignIds(campaignIds ...int64) *PlacementsListCall {
40351	var campaignIds_ []string
40352	for _, v := range campaignIds {
40353		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
40354	}
40355	c.urlParams_.SetMulti("campaignIds", campaignIds_)
40356	return c
40357}
40358
40359// Compatibilities sets the optional parameter "compatibilities": Select
40360// only placements that are associated with these compatibilities.
40361// DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop
40362// or on mobile devices for regular or interstitial ads respectively.
40363// APP and APP_INTERSTITIAL are for rendering in mobile apps.
40364// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
40365// with the VAST standard.
40366//
40367// Possible values:
40368//   "APP"
40369//   "APP_INTERSTITIAL"
40370//   "DISPLAY"
40371//   "DISPLAY_INTERSTITIAL"
40372//   "IN_STREAM_AUDIO"
40373//   "IN_STREAM_VIDEO"
40374func (c *PlacementsListCall) Compatibilities(compatibilities ...string) *PlacementsListCall {
40375	c.urlParams_.SetMulti("compatibilities", append([]string{}, compatibilities...))
40376	return c
40377}
40378
40379// ContentCategoryIds sets the optional parameter "contentCategoryIds":
40380// Select only placements that are associated with these content
40381// categories.
40382func (c *PlacementsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementsListCall {
40383	var contentCategoryIds_ []string
40384	for _, v := range contentCategoryIds {
40385		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
40386	}
40387	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
40388	return c
40389}
40390
40391// DirectorySiteIds sets the optional parameter "directorySiteIds":
40392// Select only placements that are associated with these directory
40393// sites.
40394func (c *PlacementsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementsListCall {
40395	var directorySiteIds_ []string
40396	for _, v := range directorySiteIds {
40397		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
40398	}
40399	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
40400	return c
40401}
40402
40403// GroupIds sets the optional parameter "groupIds": Select only
40404// placements that belong to these placement groups.
40405func (c *PlacementsListCall) GroupIds(groupIds ...int64) *PlacementsListCall {
40406	var groupIds_ []string
40407	for _, v := range groupIds {
40408		groupIds_ = append(groupIds_, fmt.Sprint(v))
40409	}
40410	c.urlParams_.SetMulti("groupIds", groupIds_)
40411	return c
40412}
40413
40414// Ids sets the optional parameter "ids": Select only placements with
40415// these IDs.
40416func (c *PlacementsListCall) Ids(ids ...int64) *PlacementsListCall {
40417	var ids_ []string
40418	for _, v := range ids {
40419		ids_ = append(ids_, fmt.Sprint(v))
40420	}
40421	c.urlParams_.SetMulti("ids", ids_)
40422	return c
40423}
40424
40425// MaxEndDate sets the optional parameter "maxEndDate": Select only
40426// placements or placement groups whose end date is on or before the
40427// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
40428func (c *PlacementsListCall) MaxEndDate(maxEndDate string) *PlacementsListCall {
40429	c.urlParams_.Set("maxEndDate", maxEndDate)
40430	return c
40431}
40432
40433// MaxResults sets the optional parameter "maxResults": Maximum number
40434// of results to return.
40435func (c *PlacementsListCall) MaxResults(maxResults int64) *PlacementsListCall {
40436	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
40437	return c
40438}
40439
40440// MaxStartDate sets the optional parameter "maxStartDate": Select only
40441// placements or placement groups whose start date is on or before the
40442// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
40443func (c *PlacementsListCall) MaxStartDate(maxStartDate string) *PlacementsListCall {
40444	c.urlParams_.Set("maxStartDate", maxStartDate)
40445	return c
40446}
40447
40448// MinEndDate sets the optional parameter "minEndDate": Select only
40449// placements or placement groups whose end date is on or after the
40450// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
40451func (c *PlacementsListCall) MinEndDate(minEndDate string) *PlacementsListCall {
40452	c.urlParams_.Set("minEndDate", minEndDate)
40453	return c
40454}
40455
40456// MinStartDate sets the optional parameter "minStartDate": Select only
40457// placements or placement groups whose start date is on or after the
40458// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
40459func (c *PlacementsListCall) MinStartDate(minStartDate string) *PlacementsListCall {
40460	c.urlParams_.Set("minStartDate", minStartDate)
40461	return c
40462}
40463
40464// PageToken sets the optional parameter "pageToken": Value of the
40465// nextPageToken from the previous result page.
40466func (c *PlacementsListCall) PageToken(pageToken string) *PlacementsListCall {
40467	c.urlParams_.Set("pageToken", pageToken)
40468	return c
40469}
40470
40471// PaymentSource sets the optional parameter "paymentSource": Select
40472// only placements with this payment source.
40473//
40474// Possible values:
40475//   "PLACEMENT_AGENCY_PAID"
40476//   "PLACEMENT_PUBLISHER_PAID"
40477func (c *PlacementsListCall) PaymentSource(paymentSource string) *PlacementsListCall {
40478	c.urlParams_.Set("paymentSource", paymentSource)
40479	return c
40480}
40481
40482// PlacementStrategyIds sets the optional parameter
40483// "placementStrategyIds": Select only placements that are associated
40484// with these placement strategies.
40485func (c *PlacementsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementsListCall {
40486	var placementStrategyIds_ []string
40487	for _, v := range placementStrategyIds {
40488		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
40489	}
40490	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
40491	return c
40492}
40493
40494// PricingTypes sets the optional parameter "pricingTypes": Select only
40495// placements with these pricing types.
40496//
40497// Possible values:
40498//   "PRICING_TYPE_CPA"
40499//   "PRICING_TYPE_CPC"
40500//   "PRICING_TYPE_CPM"
40501//   "PRICING_TYPE_CPM_ACTIVEVIEW"
40502//   "PRICING_TYPE_FLAT_RATE_CLICKS"
40503//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
40504func (c *PlacementsListCall) PricingTypes(pricingTypes ...string) *PlacementsListCall {
40505	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
40506	return c
40507}
40508
40509// SearchString sets the optional parameter "searchString": Allows
40510// searching for placements by name or ID. Wildcards (*) are allowed.
40511// For example, "placement*2015" will return placements with names like
40512// "placement June 2015", "placement May 2015", or simply "placements
40513// 2015". Most of the searches also add wildcards implicitly at the
40514// start and the end of the search string. For example, a search string
40515// of "placement" will match placements with name "my placement",
40516// "placement 2015", or simply "placement".
40517func (c *PlacementsListCall) SearchString(searchString string) *PlacementsListCall {
40518	c.urlParams_.Set("searchString", searchString)
40519	return c
40520}
40521
40522// SiteIds sets the optional parameter "siteIds": Select only placements
40523// that are associated with these sites.
40524func (c *PlacementsListCall) SiteIds(siteIds ...int64) *PlacementsListCall {
40525	var siteIds_ []string
40526	for _, v := range siteIds {
40527		siteIds_ = append(siteIds_, fmt.Sprint(v))
40528	}
40529	c.urlParams_.SetMulti("siteIds", siteIds_)
40530	return c
40531}
40532
40533// SizeIds sets the optional parameter "sizeIds": Select only placements
40534// that are associated with these sizes.
40535func (c *PlacementsListCall) SizeIds(sizeIds ...int64) *PlacementsListCall {
40536	var sizeIds_ []string
40537	for _, v := range sizeIds {
40538		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
40539	}
40540	c.urlParams_.SetMulti("sizeIds", sizeIds_)
40541	return c
40542}
40543
40544// SortField sets the optional parameter "sortField": Field by which to
40545// sort the list.
40546//
40547// Possible values:
40548//   "ID" (default)
40549//   "NAME"
40550func (c *PlacementsListCall) SortField(sortField string) *PlacementsListCall {
40551	c.urlParams_.Set("sortField", sortField)
40552	return c
40553}
40554
40555// SortOrder sets the optional parameter "sortOrder": Order of sorted
40556// results.
40557//
40558// Possible values:
40559//   "ASCENDING" (default)
40560//   "DESCENDING"
40561func (c *PlacementsListCall) SortOrder(sortOrder string) *PlacementsListCall {
40562	c.urlParams_.Set("sortOrder", sortOrder)
40563	return c
40564}
40565
40566// Fields allows partial responses to be retrieved. See
40567// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40568// for more information.
40569func (c *PlacementsListCall) Fields(s ...googleapi.Field) *PlacementsListCall {
40570	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40571	return c
40572}
40573
40574// IfNoneMatch sets the optional parameter which makes the operation
40575// fail if the object's ETag matches the given value. This is useful for
40576// getting updates only after the object has changed since the last
40577// request. Use googleapi.IsNotModified to check whether the response
40578// error from Do is the result of In-None-Match.
40579func (c *PlacementsListCall) IfNoneMatch(entityTag string) *PlacementsListCall {
40580	c.ifNoneMatch_ = entityTag
40581	return c
40582}
40583
40584// Context sets the context to be used in this call's Do method. Any
40585// pending HTTP request will be aborted if the provided context is
40586// canceled.
40587func (c *PlacementsListCall) Context(ctx context.Context) *PlacementsListCall {
40588	c.ctx_ = ctx
40589	return c
40590}
40591
40592// Header returns an http.Header that can be modified by the caller to
40593// add HTTP headers to the request.
40594func (c *PlacementsListCall) Header() http.Header {
40595	if c.header_ == nil {
40596		c.header_ = make(http.Header)
40597	}
40598	return c.header_
40599}
40600
40601func (c *PlacementsListCall) doRequest(alt string) (*http.Response, error) {
40602	reqHeaders := make(http.Header)
40603	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
40604	for k, v := range c.header_ {
40605		reqHeaders[k] = v
40606	}
40607	reqHeaders.Set("User-Agent", c.s.userAgent())
40608	if c.ifNoneMatch_ != "" {
40609		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40610	}
40611	var body io.Reader = nil
40612	c.urlParams_.Set("alt", alt)
40613	c.urlParams_.Set("prettyPrint", "false")
40614	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40615	urls += "?" + c.urlParams_.Encode()
40616	req, err := http.NewRequest("GET", urls, body)
40617	if err != nil {
40618		return nil, err
40619	}
40620	req.Header = reqHeaders
40621	googleapi.Expand(req.URL, map[string]string{
40622		"profileId": strconv.FormatInt(c.profileId, 10),
40623	})
40624	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40625}
40626
40627// Do executes the "dfareporting.placements.list" call.
40628// Exactly one of *PlacementsListResponse or error will be non-nil. Any
40629// non-2xx status code is an error. Response headers are in either
40630// *PlacementsListResponse.ServerResponse.Header or (if a response was
40631// returned at all) in error.(*googleapi.Error).Header. Use
40632// googleapi.IsNotModified to check whether the returned error was
40633// because http.StatusNotModified was returned.
40634func (c *PlacementsListCall) Do(opts ...googleapi.CallOption) (*PlacementsListResponse, error) {
40635	gensupport.SetOptions(c.urlParams_, opts...)
40636	res, err := c.doRequest("json")
40637	if res != nil && res.StatusCode == http.StatusNotModified {
40638		if res.Body != nil {
40639			res.Body.Close()
40640		}
40641		return nil, &googleapi.Error{
40642			Code:   res.StatusCode,
40643			Header: res.Header,
40644		}
40645	}
40646	if err != nil {
40647		return nil, err
40648	}
40649	defer googleapi.CloseBody(res)
40650	if err := googleapi.CheckResponse(res); err != nil {
40651		return nil, err
40652	}
40653	ret := &PlacementsListResponse{
40654		ServerResponse: googleapi.ServerResponse{
40655			Header:         res.Header,
40656			HTTPStatusCode: res.StatusCode,
40657		},
40658	}
40659	target := &ret
40660	if err := gensupport.DecodeResponse(target, res); err != nil {
40661		return nil, err
40662	}
40663	return ret, nil
40664	// {
40665	//   "description": "Retrieves a list of placements, possibly filtered. This method supports paging.",
40666	//   "httpMethod": "GET",
40667	//   "id": "dfareporting.placements.list",
40668	//   "parameterOrder": [
40669	//     "profileId"
40670	//   ],
40671	//   "parameters": {
40672	//     "advertiserIds": {
40673	//       "description": "Select only placements that belong to these advertisers.",
40674	//       "format": "int64",
40675	//       "location": "query",
40676	//       "repeated": true,
40677	//       "type": "string"
40678	//     },
40679	//     "archived": {
40680	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
40681	//       "location": "query",
40682	//       "type": "boolean"
40683	//     },
40684	//     "campaignIds": {
40685	//       "description": "Select only placements that belong to these campaigns.",
40686	//       "format": "int64",
40687	//       "location": "query",
40688	//       "repeated": true,
40689	//       "type": "string"
40690	//     },
40691	//     "compatibilities": {
40692	//       "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.",
40693	//       "enum": [
40694	//         "APP",
40695	//         "APP_INTERSTITIAL",
40696	//         "DISPLAY",
40697	//         "DISPLAY_INTERSTITIAL",
40698	//         "IN_STREAM_AUDIO",
40699	//         "IN_STREAM_VIDEO"
40700	//       ],
40701	//       "enumDescriptions": [
40702	//         "",
40703	//         "",
40704	//         "",
40705	//         "",
40706	//         "",
40707	//         ""
40708	//       ],
40709	//       "location": "query",
40710	//       "repeated": true,
40711	//       "type": "string"
40712	//     },
40713	//     "contentCategoryIds": {
40714	//       "description": "Select only placements that are associated with these content categories.",
40715	//       "format": "int64",
40716	//       "location": "query",
40717	//       "repeated": true,
40718	//       "type": "string"
40719	//     },
40720	//     "directorySiteIds": {
40721	//       "description": "Select only placements that are associated with these directory sites.",
40722	//       "format": "int64",
40723	//       "location": "query",
40724	//       "repeated": true,
40725	//       "type": "string"
40726	//     },
40727	//     "groupIds": {
40728	//       "description": "Select only placements that belong to these placement groups.",
40729	//       "format": "int64",
40730	//       "location": "query",
40731	//       "repeated": true,
40732	//       "type": "string"
40733	//     },
40734	//     "ids": {
40735	//       "description": "Select only placements with these IDs.",
40736	//       "format": "int64",
40737	//       "location": "query",
40738	//       "repeated": true,
40739	//       "type": "string"
40740	//     },
40741	//     "maxEndDate": {
40742	//       "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\".",
40743	//       "location": "query",
40744	//       "type": "string"
40745	//     },
40746	//     "maxResults": {
40747	//       "default": "1000",
40748	//       "description": "Maximum number of results to return.",
40749	//       "format": "int32",
40750	//       "location": "query",
40751	//       "maximum": "1000",
40752	//       "minimum": "0",
40753	//       "type": "integer"
40754	//     },
40755	//     "maxStartDate": {
40756	//       "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\".",
40757	//       "location": "query",
40758	//       "type": "string"
40759	//     },
40760	//     "minEndDate": {
40761	//       "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\".",
40762	//       "location": "query",
40763	//       "type": "string"
40764	//     },
40765	//     "minStartDate": {
40766	//       "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\".",
40767	//       "location": "query",
40768	//       "type": "string"
40769	//     },
40770	//     "pageToken": {
40771	//       "description": "Value of the nextPageToken from the previous result page.",
40772	//       "location": "query",
40773	//       "type": "string"
40774	//     },
40775	//     "paymentSource": {
40776	//       "description": "Select only placements with this payment source.",
40777	//       "enum": [
40778	//         "PLACEMENT_AGENCY_PAID",
40779	//         "PLACEMENT_PUBLISHER_PAID"
40780	//       ],
40781	//       "enumDescriptions": [
40782	//         "",
40783	//         ""
40784	//       ],
40785	//       "location": "query",
40786	//       "type": "string"
40787	//     },
40788	//     "placementStrategyIds": {
40789	//       "description": "Select only placements that are associated with these placement strategies.",
40790	//       "format": "int64",
40791	//       "location": "query",
40792	//       "repeated": true,
40793	//       "type": "string"
40794	//     },
40795	//     "pricingTypes": {
40796	//       "description": "Select only placements with these pricing types.",
40797	//       "enum": [
40798	//         "PRICING_TYPE_CPA",
40799	//         "PRICING_TYPE_CPC",
40800	//         "PRICING_TYPE_CPM",
40801	//         "PRICING_TYPE_CPM_ACTIVEVIEW",
40802	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
40803	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
40804	//       ],
40805	//       "enumDescriptions": [
40806	//         "",
40807	//         "",
40808	//         "",
40809	//         "",
40810	//         "",
40811	//         ""
40812	//       ],
40813	//       "location": "query",
40814	//       "repeated": true,
40815	//       "type": "string"
40816	//     },
40817	//     "profileId": {
40818	//       "description": "User profile ID associated with this request.",
40819	//       "format": "int64",
40820	//       "location": "path",
40821	//       "required": true,
40822	//       "type": "string"
40823	//     },
40824	//     "searchString": {
40825	//       "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\".",
40826	//       "location": "query",
40827	//       "type": "string"
40828	//     },
40829	//     "siteIds": {
40830	//       "description": "Select only placements that are associated with these sites.",
40831	//       "format": "int64",
40832	//       "location": "query",
40833	//       "repeated": true,
40834	//       "type": "string"
40835	//     },
40836	//     "sizeIds": {
40837	//       "description": "Select only placements that are associated with these sizes.",
40838	//       "format": "int64",
40839	//       "location": "query",
40840	//       "repeated": true,
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}/placements",
40873	//   "response": {
40874	//     "$ref": "PlacementsListResponse"
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 *PlacementsListCall) Pages(ctx context.Context, f func(*PlacementsListResponse) 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.placements.patch":
40905
40906type PlacementsPatchCall struct {
40907	s          *Service
40908	profileId  int64
40909	placement  *Placement
40910	urlParams_ gensupport.URLParams
40911	ctx_       context.Context
40912	header_    http.Header
40913}
40914
40915// Patch: Updates an existing placement. This method supports patch
40916// semantics.
40917func (r *PlacementsService) Patch(profileId int64, id int64, placement *Placement) *PlacementsPatchCall {
40918	c := &PlacementsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40919	c.profileId = profileId
40920	c.urlParams_.Set("id", fmt.Sprint(id))
40921	c.placement = placement
40922	return c
40923}
40924
40925// Fields allows partial responses to be retrieved. See
40926// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40927// for more information.
40928func (c *PlacementsPatchCall) Fields(s ...googleapi.Field) *PlacementsPatchCall {
40929	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40930	return c
40931}
40932
40933// Context sets the context to be used in this call's Do method. Any
40934// pending HTTP request will be aborted if the provided context is
40935// canceled.
40936func (c *PlacementsPatchCall) Context(ctx context.Context) *PlacementsPatchCall {
40937	c.ctx_ = ctx
40938	return c
40939}
40940
40941// Header returns an http.Header that can be modified by the caller to
40942// add HTTP headers to the request.
40943func (c *PlacementsPatchCall) Header() http.Header {
40944	if c.header_ == nil {
40945		c.header_ = make(http.Header)
40946	}
40947	return c.header_
40948}
40949
40950func (c *PlacementsPatchCall) doRequest(alt string) (*http.Response, error) {
40951	reqHeaders := make(http.Header)
40952	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
40953	for k, v := range c.header_ {
40954		reqHeaders[k] = v
40955	}
40956	reqHeaders.Set("User-Agent", c.s.userAgent())
40957	var body io.Reader = nil
40958	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40959	if err != nil {
40960		return nil, err
40961	}
40962	reqHeaders.Set("Content-Type", "application/json")
40963	c.urlParams_.Set("alt", alt)
40964	c.urlParams_.Set("prettyPrint", "false")
40965	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40966	urls += "?" + c.urlParams_.Encode()
40967	req, err := http.NewRequest("PATCH", urls, body)
40968	if err != nil {
40969		return nil, err
40970	}
40971	req.Header = reqHeaders
40972	googleapi.Expand(req.URL, map[string]string{
40973		"profileId": strconv.FormatInt(c.profileId, 10),
40974	})
40975	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40976}
40977
40978// Do executes the "dfareporting.placements.patch" call.
40979// Exactly one of *Placement or error will be non-nil. Any non-2xx
40980// status code is an error. Response headers are in either
40981// *Placement.ServerResponse.Header or (if a response was returned at
40982// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40983// to check whether the returned error was because
40984// http.StatusNotModified was returned.
40985func (c *PlacementsPatchCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40986	gensupport.SetOptions(c.urlParams_, opts...)
40987	res, err := c.doRequest("json")
40988	if res != nil && res.StatusCode == http.StatusNotModified {
40989		if res.Body != nil {
40990			res.Body.Close()
40991		}
40992		return nil, &googleapi.Error{
40993			Code:   res.StatusCode,
40994			Header: res.Header,
40995		}
40996	}
40997	if err != nil {
40998		return nil, err
40999	}
41000	defer googleapi.CloseBody(res)
41001	if err := googleapi.CheckResponse(res); err != nil {
41002		return nil, err
41003	}
41004	ret := &Placement{
41005		ServerResponse: googleapi.ServerResponse{
41006			Header:         res.Header,
41007			HTTPStatusCode: res.StatusCode,
41008		},
41009	}
41010	target := &ret
41011	if err := gensupport.DecodeResponse(target, res); err != nil {
41012		return nil, err
41013	}
41014	return ret, nil
41015	// {
41016	//   "description": "Updates an existing placement. This method supports patch semantics.",
41017	//   "httpMethod": "PATCH",
41018	//   "id": "dfareporting.placements.patch",
41019	//   "parameterOrder": [
41020	//     "profileId",
41021	//     "id"
41022	//   ],
41023	//   "parameters": {
41024	//     "id": {
41025	//       "description": "Placement ID.",
41026	//       "format": "int64",
41027	//       "location": "query",
41028	//       "required": true,
41029	//       "type": "string"
41030	//     },
41031	//     "profileId": {
41032	//       "description": "User profile ID associated with this request.",
41033	//       "format": "int64",
41034	//       "location": "path",
41035	//       "required": true,
41036	//       "type": "string"
41037	//     }
41038	//   },
41039	//   "path": "userprofiles/{profileId}/placements",
41040	//   "request": {
41041	//     "$ref": "Placement"
41042	//   },
41043	//   "response": {
41044	//     "$ref": "Placement"
41045	//   },
41046	//   "scopes": [
41047	//     "https://www.googleapis.com/auth/dfatrafficking"
41048	//   ]
41049	// }
41050
41051}
41052
41053// method id "dfareporting.placements.update":
41054
41055type PlacementsUpdateCall struct {
41056	s          *Service
41057	profileId  int64
41058	placement  *Placement
41059	urlParams_ gensupport.URLParams
41060	ctx_       context.Context
41061	header_    http.Header
41062}
41063
41064// Update: Updates an existing placement.
41065func (r *PlacementsService) Update(profileId int64, placement *Placement) *PlacementsUpdateCall {
41066	c := &PlacementsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41067	c.profileId = profileId
41068	c.placement = placement
41069	return c
41070}
41071
41072// Fields allows partial responses to be retrieved. See
41073// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41074// for more information.
41075func (c *PlacementsUpdateCall) Fields(s ...googleapi.Field) *PlacementsUpdateCall {
41076	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41077	return c
41078}
41079
41080// Context sets the context to be used in this call's Do method. Any
41081// pending HTTP request will be aborted if the provided context is
41082// canceled.
41083func (c *PlacementsUpdateCall) Context(ctx context.Context) *PlacementsUpdateCall {
41084	c.ctx_ = ctx
41085	return c
41086}
41087
41088// Header returns an http.Header that can be modified by the caller to
41089// add HTTP headers to the request.
41090func (c *PlacementsUpdateCall) Header() http.Header {
41091	if c.header_ == nil {
41092		c.header_ = make(http.Header)
41093	}
41094	return c.header_
41095}
41096
41097func (c *PlacementsUpdateCall) doRequest(alt string) (*http.Response, error) {
41098	reqHeaders := make(http.Header)
41099	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
41100	for k, v := range c.header_ {
41101		reqHeaders[k] = v
41102	}
41103	reqHeaders.Set("User-Agent", c.s.userAgent())
41104	var body io.Reader = nil
41105	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
41106	if err != nil {
41107		return nil, err
41108	}
41109	reqHeaders.Set("Content-Type", "application/json")
41110	c.urlParams_.Set("alt", alt)
41111	c.urlParams_.Set("prettyPrint", "false")
41112	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
41113	urls += "?" + c.urlParams_.Encode()
41114	req, err := http.NewRequest("PUT", urls, body)
41115	if err != nil {
41116		return nil, err
41117	}
41118	req.Header = reqHeaders
41119	googleapi.Expand(req.URL, map[string]string{
41120		"profileId": strconv.FormatInt(c.profileId, 10),
41121	})
41122	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41123}
41124
41125// Do executes the "dfareporting.placements.update" call.
41126// Exactly one of *Placement or error will be non-nil. Any non-2xx
41127// status code is an error. Response headers are in either
41128// *Placement.ServerResponse.Header or (if a response was returned at
41129// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41130// to check whether the returned error was because
41131// http.StatusNotModified was returned.
41132func (c *PlacementsUpdateCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
41133	gensupport.SetOptions(c.urlParams_, opts...)
41134	res, err := c.doRequest("json")
41135	if res != nil && res.StatusCode == http.StatusNotModified {
41136		if res.Body != nil {
41137			res.Body.Close()
41138		}
41139		return nil, &googleapi.Error{
41140			Code:   res.StatusCode,
41141			Header: res.Header,
41142		}
41143	}
41144	if err != nil {
41145		return nil, err
41146	}
41147	defer googleapi.CloseBody(res)
41148	if err := googleapi.CheckResponse(res); err != nil {
41149		return nil, err
41150	}
41151	ret := &Placement{
41152		ServerResponse: googleapi.ServerResponse{
41153			Header:         res.Header,
41154			HTTPStatusCode: res.StatusCode,
41155		},
41156	}
41157	target := &ret
41158	if err := gensupport.DecodeResponse(target, res); err != nil {
41159		return nil, err
41160	}
41161	return ret, nil
41162	// {
41163	//   "description": "Updates an existing placement.",
41164	//   "httpMethod": "PUT",
41165	//   "id": "dfareporting.placements.update",
41166	//   "parameterOrder": [
41167	//     "profileId"
41168	//   ],
41169	//   "parameters": {
41170	//     "profileId": {
41171	//       "description": "User profile ID associated with this request.",
41172	//       "format": "int64",
41173	//       "location": "path",
41174	//       "required": true,
41175	//       "type": "string"
41176	//     }
41177	//   },
41178	//   "path": "userprofiles/{profileId}/placements",
41179	//   "request": {
41180	//     "$ref": "Placement"
41181	//   },
41182	//   "response": {
41183	//     "$ref": "Placement"
41184	//   },
41185	//   "scopes": [
41186	//     "https://www.googleapis.com/auth/dfatrafficking"
41187	//   ]
41188	// }
41189
41190}
41191
41192// method id "dfareporting.platformTypes.get":
41193
41194type PlatformTypesGetCall struct {
41195	s            *Service
41196	profileId    int64
41197	id           int64
41198	urlParams_   gensupport.URLParams
41199	ifNoneMatch_ string
41200	ctx_         context.Context
41201	header_      http.Header
41202}
41203
41204// Get: Gets one platform type by ID.
41205func (r *PlatformTypesService) Get(profileId int64, id int64) *PlatformTypesGetCall {
41206	c := &PlatformTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41207	c.profileId = profileId
41208	c.id = id
41209	return c
41210}
41211
41212// Fields allows partial responses to be retrieved. See
41213// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41214// for more information.
41215func (c *PlatformTypesGetCall) Fields(s ...googleapi.Field) *PlatformTypesGetCall {
41216	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41217	return c
41218}
41219
41220// IfNoneMatch sets the optional parameter which makes the operation
41221// fail if the object's ETag matches the given value. This is useful for
41222// getting updates only after the object has changed since the last
41223// request. Use googleapi.IsNotModified to check whether the response
41224// error from Do is the result of In-None-Match.
41225func (c *PlatformTypesGetCall) IfNoneMatch(entityTag string) *PlatformTypesGetCall {
41226	c.ifNoneMatch_ = entityTag
41227	return c
41228}
41229
41230// Context sets the context to be used in this call's Do method. Any
41231// pending HTTP request will be aborted if the provided context is
41232// canceled.
41233func (c *PlatformTypesGetCall) Context(ctx context.Context) *PlatformTypesGetCall {
41234	c.ctx_ = ctx
41235	return c
41236}
41237
41238// Header returns an http.Header that can be modified by the caller to
41239// add HTTP headers to the request.
41240func (c *PlatformTypesGetCall) Header() http.Header {
41241	if c.header_ == nil {
41242		c.header_ = make(http.Header)
41243	}
41244	return c.header_
41245}
41246
41247func (c *PlatformTypesGetCall) doRequest(alt string) (*http.Response, error) {
41248	reqHeaders := make(http.Header)
41249	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
41250	for k, v := range c.header_ {
41251		reqHeaders[k] = v
41252	}
41253	reqHeaders.Set("User-Agent", c.s.userAgent())
41254	if c.ifNoneMatch_ != "" {
41255		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41256	}
41257	var body io.Reader = nil
41258	c.urlParams_.Set("alt", alt)
41259	c.urlParams_.Set("prettyPrint", "false")
41260	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes/{id}")
41261	urls += "?" + c.urlParams_.Encode()
41262	req, err := http.NewRequest("GET", urls, body)
41263	if err != nil {
41264		return nil, err
41265	}
41266	req.Header = reqHeaders
41267	googleapi.Expand(req.URL, map[string]string{
41268		"profileId": strconv.FormatInt(c.profileId, 10),
41269		"id":        strconv.FormatInt(c.id, 10),
41270	})
41271	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41272}
41273
41274// Do executes the "dfareporting.platformTypes.get" call.
41275// Exactly one of *PlatformType or error will be non-nil. Any non-2xx
41276// status code is an error. Response headers are in either
41277// *PlatformType.ServerResponse.Header or (if a response was returned at
41278// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41279// to check whether the returned error was because
41280// http.StatusNotModified was returned.
41281func (c *PlatformTypesGetCall) Do(opts ...googleapi.CallOption) (*PlatformType, error) {
41282	gensupport.SetOptions(c.urlParams_, opts...)
41283	res, err := c.doRequest("json")
41284	if res != nil && res.StatusCode == http.StatusNotModified {
41285		if res.Body != nil {
41286			res.Body.Close()
41287		}
41288		return nil, &googleapi.Error{
41289			Code:   res.StatusCode,
41290			Header: res.Header,
41291		}
41292	}
41293	if err != nil {
41294		return nil, err
41295	}
41296	defer googleapi.CloseBody(res)
41297	if err := googleapi.CheckResponse(res); err != nil {
41298		return nil, err
41299	}
41300	ret := &PlatformType{
41301		ServerResponse: googleapi.ServerResponse{
41302			Header:         res.Header,
41303			HTTPStatusCode: res.StatusCode,
41304		},
41305	}
41306	target := &ret
41307	if err := gensupport.DecodeResponse(target, res); err != nil {
41308		return nil, err
41309	}
41310	return ret, nil
41311	// {
41312	//   "description": "Gets one platform type by ID.",
41313	//   "httpMethod": "GET",
41314	//   "id": "dfareporting.platformTypes.get",
41315	//   "parameterOrder": [
41316	//     "profileId",
41317	//     "id"
41318	//   ],
41319	//   "parameters": {
41320	//     "id": {
41321	//       "description": "Platform type ID.",
41322	//       "format": "int64",
41323	//       "location": "path",
41324	//       "required": true,
41325	//       "type": "string"
41326	//     },
41327	//     "profileId": {
41328	//       "description": "User profile ID associated with this request.",
41329	//       "format": "int64",
41330	//       "location": "path",
41331	//       "required": true,
41332	//       "type": "string"
41333	//     }
41334	//   },
41335	//   "path": "userprofiles/{profileId}/platformTypes/{id}",
41336	//   "response": {
41337	//     "$ref": "PlatformType"
41338	//   },
41339	//   "scopes": [
41340	//     "https://www.googleapis.com/auth/dfatrafficking"
41341	//   ]
41342	// }
41343
41344}
41345
41346// method id "dfareporting.platformTypes.list":
41347
41348type PlatformTypesListCall struct {
41349	s            *Service
41350	profileId    int64
41351	urlParams_   gensupport.URLParams
41352	ifNoneMatch_ string
41353	ctx_         context.Context
41354	header_      http.Header
41355}
41356
41357// List: Retrieves a list of platform types.
41358func (r *PlatformTypesService) List(profileId int64) *PlatformTypesListCall {
41359	c := &PlatformTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41360	c.profileId = profileId
41361	return c
41362}
41363
41364// Fields allows partial responses to be retrieved. See
41365// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41366// for more information.
41367func (c *PlatformTypesListCall) Fields(s ...googleapi.Field) *PlatformTypesListCall {
41368	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41369	return c
41370}
41371
41372// IfNoneMatch sets the optional parameter which makes the operation
41373// fail if the object's ETag matches the given value. This is useful for
41374// getting updates only after the object has changed since the last
41375// request. Use googleapi.IsNotModified to check whether the response
41376// error from Do is the result of In-None-Match.
41377func (c *PlatformTypesListCall) IfNoneMatch(entityTag string) *PlatformTypesListCall {
41378	c.ifNoneMatch_ = entityTag
41379	return c
41380}
41381
41382// Context sets the context to be used in this call's Do method. Any
41383// pending HTTP request will be aborted if the provided context is
41384// canceled.
41385func (c *PlatformTypesListCall) Context(ctx context.Context) *PlatformTypesListCall {
41386	c.ctx_ = ctx
41387	return c
41388}
41389
41390// Header returns an http.Header that can be modified by the caller to
41391// add HTTP headers to the request.
41392func (c *PlatformTypesListCall) Header() http.Header {
41393	if c.header_ == nil {
41394		c.header_ = make(http.Header)
41395	}
41396	return c.header_
41397}
41398
41399func (c *PlatformTypesListCall) doRequest(alt string) (*http.Response, error) {
41400	reqHeaders := make(http.Header)
41401	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
41402	for k, v := range c.header_ {
41403		reqHeaders[k] = v
41404	}
41405	reqHeaders.Set("User-Agent", c.s.userAgent())
41406	if c.ifNoneMatch_ != "" {
41407		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41408	}
41409	var body io.Reader = nil
41410	c.urlParams_.Set("alt", alt)
41411	c.urlParams_.Set("prettyPrint", "false")
41412	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes")
41413	urls += "?" + c.urlParams_.Encode()
41414	req, err := http.NewRequest("GET", urls, body)
41415	if err != nil {
41416		return nil, err
41417	}
41418	req.Header = reqHeaders
41419	googleapi.Expand(req.URL, map[string]string{
41420		"profileId": strconv.FormatInt(c.profileId, 10),
41421	})
41422	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41423}
41424
41425// Do executes the "dfareporting.platformTypes.list" call.
41426// Exactly one of *PlatformTypesListResponse or error will be non-nil.
41427// Any non-2xx status code is an error. Response headers are in either
41428// *PlatformTypesListResponse.ServerResponse.Header or (if a response
41429// was returned at all) in error.(*googleapi.Error).Header. Use
41430// googleapi.IsNotModified to check whether the returned error was
41431// because http.StatusNotModified was returned.
41432func (c *PlatformTypesListCall) Do(opts ...googleapi.CallOption) (*PlatformTypesListResponse, error) {
41433	gensupport.SetOptions(c.urlParams_, opts...)
41434	res, err := c.doRequest("json")
41435	if res != nil && res.StatusCode == http.StatusNotModified {
41436		if res.Body != nil {
41437			res.Body.Close()
41438		}
41439		return nil, &googleapi.Error{
41440			Code:   res.StatusCode,
41441			Header: res.Header,
41442		}
41443	}
41444	if err != nil {
41445		return nil, err
41446	}
41447	defer googleapi.CloseBody(res)
41448	if err := googleapi.CheckResponse(res); err != nil {
41449		return nil, err
41450	}
41451	ret := &PlatformTypesListResponse{
41452		ServerResponse: googleapi.ServerResponse{
41453			Header:         res.Header,
41454			HTTPStatusCode: res.StatusCode,
41455		},
41456	}
41457	target := &ret
41458	if err := gensupport.DecodeResponse(target, res); err != nil {
41459		return nil, err
41460	}
41461	return ret, nil
41462	// {
41463	//   "description": "Retrieves a list of platform types.",
41464	//   "httpMethod": "GET",
41465	//   "id": "dfareporting.platformTypes.list",
41466	//   "parameterOrder": [
41467	//     "profileId"
41468	//   ],
41469	//   "parameters": {
41470	//     "profileId": {
41471	//       "description": "User profile ID associated with this request.",
41472	//       "format": "int64",
41473	//       "location": "path",
41474	//       "required": true,
41475	//       "type": "string"
41476	//     }
41477	//   },
41478	//   "path": "userprofiles/{profileId}/platformTypes",
41479	//   "response": {
41480	//     "$ref": "PlatformTypesListResponse"
41481	//   },
41482	//   "scopes": [
41483	//     "https://www.googleapis.com/auth/dfatrafficking"
41484	//   ]
41485	// }
41486
41487}
41488
41489// method id "dfareporting.postalCodes.get":
41490
41491type PostalCodesGetCall struct {
41492	s            *Service
41493	profileId    int64
41494	code         string
41495	urlParams_   gensupport.URLParams
41496	ifNoneMatch_ string
41497	ctx_         context.Context
41498	header_      http.Header
41499}
41500
41501// Get: Gets one postal code by ID.
41502func (r *PostalCodesService) Get(profileId int64, code string) *PostalCodesGetCall {
41503	c := &PostalCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41504	c.profileId = profileId
41505	c.code = code
41506	return c
41507}
41508
41509// Fields allows partial responses to be retrieved. See
41510// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41511// for more information.
41512func (c *PostalCodesGetCall) Fields(s ...googleapi.Field) *PostalCodesGetCall {
41513	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41514	return c
41515}
41516
41517// IfNoneMatch sets the optional parameter which makes the operation
41518// fail if the object's ETag matches the given value. This is useful for
41519// getting updates only after the object has changed since the last
41520// request. Use googleapi.IsNotModified to check whether the response
41521// error from Do is the result of In-None-Match.
41522func (c *PostalCodesGetCall) IfNoneMatch(entityTag string) *PostalCodesGetCall {
41523	c.ifNoneMatch_ = entityTag
41524	return c
41525}
41526
41527// Context sets the context to be used in this call's Do method. Any
41528// pending HTTP request will be aborted if the provided context is
41529// canceled.
41530func (c *PostalCodesGetCall) Context(ctx context.Context) *PostalCodesGetCall {
41531	c.ctx_ = ctx
41532	return c
41533}
41534
41535// Header returns an http.Header that can be modified by the caller to
41536// add HTTP headers to the request.
41537func (c *PostalCodesGetCall) Header() http.Header {
41538	if c.header_ == nil {
41539		c.header_ = make(http.Header)
41540	}
41541	return c.header_
41542}
41543
41544func (c *PostalCodesGetCall) doRequest(alt string) (*http.Response, error) {
41545	reqHeaders := make(http.Header)
41546	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
41547	for k, v := range c.header_ {
41548		reqHeaders[k] = v
41549	}
41550	reqHeaders.Set("User-Agent", c.s.userAgent())
41551	if c.ifNoneMatch_ != "" {
41552		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41553	}
41554	var body io.Reader = nil
41555	c.urlParams_.Set("alt", alt)
41556	c.urlParams_.Set("prettyPrint", "false")
41557	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes/{code}")
41558	urls += "?" + c.urlParams_.Encode()
41559	req, err := http.NewRequest("GET", urls, body)
41560	if err != nil {
41561		return nil, err
41562	}
41563	req.Header = reqHeaders
41564	googleapi.Expand(req.URL, map[string]string{
41565		"profileId": strconv.FormatInt(c.profileId, 10),
41566		"code":      c.code,
41567	})
41568	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41569}
41570
41571// Do executes the "dfareporting.postalCodes.get" call.
41572// Exactly one of *PostalCode or error will be non-nil. Any non-2xx
41573// status code is an error. Response headers are in either
41574// *PostalCode.ServerResponse.Header or (if a response was returned at
41575// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41576// to check whether the returned error was because
41577// http.StatusNotModified was returned.
41578func (c *PostalCodesGetCall) Do(opts ...googleapi.CallOption) (*PostalCode, error) {
41579	gensupport.SetOptions(c.urlParams_, opts...)
41580	res, err := c.doRequest("json")
41581	if res != nil && res.StatusCode == http.StatusNotModified {
41582		if res.Body != nil {
41583			res.Body.Close()
41584		}
41585		return nil, &googleapi.Error{
41586			Code:   res.StatusCode,
41587			Header: res.Header,
41588		}
41589	}
41590	if err != nil {
41591		return nil, err
41592	}
41593	defer googleapi.CloseBody(res)
41594	if err := googleapi.CheckResponse(res); err != nil {
41595		return nil, err
41596	}
41597	ret := &PostalCode{
41598		ServerResponse: googleapi.ServerResponse{
41599			Header:         res.Header,
41600			HTTPStatusCode: res.StatusCode,
41601		},
41602	}
41603	target := &ret
41604	if err := gensupport.DecodeResponse(target, res); err != nil {
41605		return nil, err
41606	}
41607	return ret, nil
41608	// {
41609	//   "description": "Gets one postal code by ID.",
41610	//   "httpMethod": "GET",
41611	//   "id": "dfareporting.postalCodes.get",
41612	//   "parameterOrder": [
41613	//     "profileId",
41614	//     "code"
41615	//   ],
41616	//   "parameters": {
41617	//     "code": {
41618	//       "description": "Postal code ID.",
41619	//       "location": "path",
41620	//       "required": true,
41621	//       "type": "string"
41622	//     },
41623	//     "profileId": {
41624	//       "description": "User profile ID associated with this request.",
41625	//       "format": "int64",
41626	//       "location": "path",
41627	//       "required": true,
41628	//       "type": "string"
41629	//     }
41630	//   },
41631	//   "path": "userprofiles/{profileId}/postalCodes/{code}",
41632	//   "response": {
41633	//     "$ref": "PostalCode"
41634	//   },
41635	//   "scopes": [
41636	//     "https://www.googleapis.com/auth/dfatrafficking"
41637	//   ]
41638	// }
41639
41640}
41641
41642// method id "dfareporting.postalCodes.list":
41643
41644type PostalCodesListCall struct {
41645	s            *Service
41646	profileId    int64
41647	urlParams_   gensupport.URLParams
41648	ifNoneMatch_ string
41649	ctx_         context.Context
41650	header_      http.Header
41651}
41652
41653// List: Retrieves a list of postal codes.
41654func (r *PostalCodesService) List(profileId int64) *PostalCodesListCall {
41655	c := &PostalCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41656	c.profileId = profileId
41657	return c
41658}
41659
41660// Fields allows partial responses to be retrieved. See
41661// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41662// for more information.
41663func (c *PostalCodesListCall) Fields(s ...googleapi.Field) *PostalCodesListCall {
41664	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41665	return c
41666}
41667
41668// IfNoneMatch sets the optional parameter which makes the operation
41669// fail if the object's ETag matches the given value. This is useful for
41670// getting updates only after the object has changed since the last
41671// request. Use googleapi.IsNotModified to check whether the response
41672// error from Do is the result of In-None-Match.
41673func (c *PostalCodesListCall) IfNoneMatch(entityTag string) *PostalCodesListCall {
41674	c.ifNoneMatch_ = entityTag
41675	return c
41676}
41677
41678// Context sets the context to be used in this call's Do method. Any
41679// pending HTTP request will be aborted if the provided context is
41680// canceled.
41681func (c *PostalCodesListCall) Context(ctx context.Context) *PostalCodesListCall {
41682	c.ctx_ = ctx
41683	return c
41684}
41685
41686// Header returns an http.Header that can be modified by the caller to
41687// add HTTP headers to the request.
41688func (c *PostalCodesListCall) Header() http.Header {
41689	if c.header_ == nil {
41690		c.header_ = make(http.Header)
41691	}
41692	return c.header_
41693}
41694
41695func (c *PostalCodesListCall) doRequest(alt string) (*http.Response, error) {
41696	reqHeaders := make(http.Header)
41697	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
41698	for k, v := range c.header_ {
41699		reqHeaders[k] = v
41700	}
41701	reqHeaders.Set("User-Agent", c.s.userAgent())
41702	if c.ifNoneMatch_ != "" {
41703		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41704	}
41705	var body io.Reader = nil
41706	c.urlParams_.Set("alt", alt)
41707	c.urlParams_.Set("prettyPrint", "false")
41708	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes")
41709	urls += "?" + c.urlParams_.Encode()
41710	req, err := http.NewRequest("GET", urls, body)
41711	if err != nil {
41712		return nil, err
41713	}
41714	req.Header = reqHeaders
41715	googleapi.Expand(req.URL, map[string]string{
41716		"profileId": strconv.FormatInt(c.profileId, 10),
41717	})
41718	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41719}
41720
41721// Do executes the "dfareporting.postalCodes.list" call.
41722// Exactly one of *PostalCodesListResponse or error will be non-nil. Any
41723// non-2xx status code is an error. Response headers are in either
41724// *PostalCodesListResponse.ServerResponse.Header or (if a response was
41725// returned at all) in error.(*googleapi.Error).Header. Use
41726// googleapi.IsNotModified to check whether the returned error was
41727// because http.StatusNotModified was returned.
41728func (c *PostalCodesListCall) Do(opts ...googleapi.CallOption) (*PostalCodesListResponse, error) {
41729	gensupport.SetOptions(c.urlParams_, opts...)
41730	res, err := c.doRequest("json")
41731	if res != nil && res.StatusCode == http.StatusNotModified {
41732		if res.Body != nil {
41733			res.Body.Close()
41734		}
41735		return nil, &googleapi.Error{
41736			Code:   res.StatusCode,
41737			Header: res.Header,
41738		}
41739	}
41740	if err != nil {
41741		return nil, err
41742	}
41743	defer googleapi.CloseBody(res)
41744	if err := googleapi.CheckResponse(res); err != nil {
41745		return nil, err
41746	}
41747	ret := &PostalCodesListResponse{
41748		ServerResponse: googleapi.ServerResponse{
41749			Header:         res.Header,
41750			HTTPStatusCode: res.StatusCode,
41751		},
41752	}
41753	target := &ret
41754	if err := gensupport.DecodeResponse(target, res); err != nil {
41755		return nil, err
41756	}
41757	return ret, nil
41758	// {
41759	//   "description": "Retrieves a list of postal codes.",
41760	//   "httpMethod": "GET",
41761	//   "id": "dfareporting.postalCodes.list",
41762	//   "parameterOrder": [
41763	//     "profileId"
41764	//   ],
41765	//   "parameters": {
41766	//     "profileId": {
41767	//       "description": "User profile ID associated with this request.",
41768	//       "format": "int64",
41769	//       "location": "path",
41770	//       "required": true,
41771	//       "type": "string"
41772	//     }
41773	//   },
41774	//   "path": "userprofiles/{profileId}/postalCodes",
41775	//   "response": {
41776	//     "$ref": "PostalCodesListResponse"
41777	//   },
41778	//   "scopes": [
41779	//     "https://www.googleapis.com/auth/dfatrafficking"
41780	//   ]
41781	// }
41782
41783}
41784
41785// method id "dfareporting.projects.get":
41786
41787type ProjectsGetCall struct {
41788	s            *Service
41789	profileId    int64
41790	id           int64
41791	urlParams_   gensupport.URLParams
41792	ifNoneMatch_ string
41793	ctx_         context.Context
41794	header_      http.Header
41795}
41796
41797// Get: Gets one project by ID.
41798func (r *ProjectsService) Get(profileId int64, id int64) *ProjectsGetCall {
41799	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41800	c.profileId = profileId
41801	c.id = id
41802	return c
41803}
41804
41805// Fields allows partial responses to be retrieved. See
41806// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41807// for more information.
41808func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
41809	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41810	return c
41811}
41812
41813// IfNoneMatch sets the optional parameter which makes the operation
41814// fail if the object's ETag matches the given value. This is useful for
41815// getting updates only after the object has changed since the last
41816// request. Use googleapi.IsNotModified to check whether the response
41817// error from Do is the result of In-None-Match.
41818func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
41819	c.ifNoneMatch_ = entityTag
41820	return c
41821}
41822
41823// Context sets the context to be used in this call's Do method. Any
41824// pending HTTP request will be aborted if the provided context is
41825// canceled.
41826func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
41827	c.ctx_ = ctx
41828	return c
41829}
41830
41831// Header returns an http.Header that can be modified by the caller to
41832// add HTTP headers to the request.
41833func (c *ProjectsGetCall) Header() http.Header {
41834	if c.header_ == nil {
41835		c.header_ = make(http.Header)
41836	}
41837	return c.header_
41838}
41839
41840func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
41841	reqHeaders := make(http.Header)
41842	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
41843	for k, v := range c.header_ {
41844		reqHeaders[k] = v
41845	}
41846	reqHeaders.Set("User-Agent", c.s.userAgent())
41847	if c.ifNoneMatch_ != "" {
41848		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41849	}
41850	var body io.Reader = nil
41851	c.urlParams_.Set("alt", alt)
41852	c.urlParams_.Set("prettyPrint", "false")
41853	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{id}")
41854	urls += "?" + c.urlParams_.Encode()
41855	req, err := http.NewRequest("GET", urls, body)
41856	if err != nil {
41857		return nil, err
41858	}
41859	req.Header = reqHeaders
41860	googleapi.Expand(req.URL, map[string]string{
41861		"profileId": strconv.FormatInt(c.profileId, 10),
41862		"id":        strconv.FormatInt(c.id, 10),
41863	})
41864	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41865}
41866
41867// Do executes the "dfareporting.projects.get" call.
41868// Exactly one of *Project or error will be non-nil. Any non-2xx status
41869// code is an error. Response headers are in either
41870// *Project.ServerResponse.Header or (if a response was returned at all)
41871// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
41872// check whether the returned error was because http.StatusNotModified
41873// was returned.
41874func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
41875	gensupport.SetOptions(c.urlParams_, opts...)
41876	res, err := c.doRequest("json")
41877	if res != nil && res.StatusCode == http.StatusNotModified {
41878		if res.Body != nil {
41879			res.Body.Close()
41880		}
41881		return nil, &googleapi.Error{
41882			Code:   res.StatusCode,
41883			Header: res.Header,
41884		}
41885	}
41886	if err != nil {
41887		return nil, err
41888	}
41889	defer googleapi.CloseBody(res)
41890	if err := googleapi.CheckResponse(res); err != nil {
41891		return nil, err
41892	}
41893	ret := &Project{
41894		ServerResponse: googleapi.ServerResponse{
41895			Header:         res.Header,
41896			HTTPStatusCode: res.StatusCode,
41897		},
41898	}
41899	target := &ret
41900	if err := gensupport.DecodeResponse(target, res); err != nil {
41901		return nil, err
41902	}
41903	return ret, nil
41904	// {
41905	//   "description": "Gets one project by ID.",
41906	//   "httpMethod": "GET",
41907	//   "id": "dfareporting.projects.get",
41908	//   "parameterOrder": [
41909	//     "profileId",
41910	//     "id"
41911	//   ],
41912	//   "parameters": {
41913	//     "id": {
41914	//       "description": "Project ID.",
41915	//       "format": "int64",
41916	//       "location": "path",
41917	//       "required": true,
41918	//       "type": "string"
41919	//     },
41920	//     "profileId": {
41921	//       "description": "User profile ID associated with this request.",
41922	//       "format": "int64",
41923	//       "location": "path",
41924	//       "required": true,
41925	//       "type": "string"
41926	//     }
41927	//   },
41928	//   "path": "userprofiles/{profileId}/projects/{id}",
41929	//   "response": {
41930	//     "$ref": "Project"
41931	//   },
41932	//   "scopes": [
41933	//     "https://www.googleapis.com/auth/dfatrafficking"
41934	//   ]
41935	// }
41936
41937}
41938
41939// method id "dfareporting.projects.list":
41940
41941type ProjectsListCall struct {
41942	s            *Service
41943	profileId    int64
41944	urlParams_   gensupport.URLParams
41945	ifNoneMatch_ string
41946	ctx_         context.Context
41947	header_      http.Header
41948}
41949
41950// List: Retrieves a list of projects, possibly filtered. This method
41951// supports paging.
41952func (r *ProjectsService) List(profileId int64) *ProjectsListCall {
41953	c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41954	c.profileId = profileId
41955	return c
41956}
41957
41958// AdvertiserIds sets the optional parameter "advertiserIds": Select
41959// only projects with these advertiser IDs.
41960func (c *ProjectsListCall) AdvertiserIds(advertiserIds ...int64) *ProjectsListCall {
41961	var advertiserIds_ []string
41962	for _, v := range advertiserIds {
41963		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
41964	}
41965	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
41966	return c
41967}
41968
41969// Ids sets the optional parameter "ids": Select only projects with
41970// these IDs.
41971func (c *ProjectsListCall) Ids(ids ...int64) *ProjectsListCall {
41972	var ids_ []string
41973	for _, v := range ids {
41974		ids_ = append(ids_, fmt.Sprint(v))
41975	}
41976	c.urlParams_.SetMulti("ids", ids_)
41977	return c
41978}
41979
41980// MaxResults sets the optional parameter "maxResults": Maximum number
41981// of results to return.
41982func (c *ProjectsListCall) MaxResults(maxResults int64) *ProjectsListCall {
41983	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
41984	return c
41985}
41986
41987// PageToken sets the optional parameter "pageToken": Value of the
41988// nextPageToken from the previous result page.
41989func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall {
41990	c.urlParams_.Set("pageToken", pageToken)
41991	return c
41992}
41993
41994// SearchString sets the optional parameter "searchString": Allows
41995// searching for projects by name or ID. Wildcards (*) are allowed. For
41996// example, "project*2015" will return projects with names like "project
41997// June 2015", "project April 2015", or simply "project 2015". Most of
41998// the searches also add wildcards implicitly at the start and the end
41999// of the search string. For example, a search string of "project" will
42000// match projects with name "my project", "project 2015", or simply
42001// "project".
42002func (c *ProjectsListCall) SearchString(searchString string) *ProjectsListCall {
42003	c.urlParams_.Set("searchString", searchString)
42004	return c
42005}
42006
42007// SortField sets the optional parameter "sortField": Field by which to
42008// sort the list.
42009//
42010// Possible values:
42011//   "ID" (default)
42012//   "NAME"
42013func (c *ProjectsListCall) SortField(sortField string) *ProjectsListCall {
42014	c.urlParams_.Set("sortField", sortField)
42015	return c
42016}
42017
42018// SortOrder sets the optional parameter "sortOrder": Order of sorted
42019// results.
42020//
42021// Possible values:
42022//   "ASCENDING" (default)
42023//   "DESCENDING"
42024func (c *ProjectsListCall) SortOrder(sortOrder string) *ProjectsListCall {
42025	c.urlParams_.Set("sortOrder", sortOrder)
42026	return c
42027}
42028
42029// Fields allows partial responses to be retrieved. See
42030// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42031// for more information.
42032func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall {
42033	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42034	return c
42035}
42036
42037// IfNoneMatch sets the optional parameter which makes the operation
42038// fail if the object's ETag matches the given value. This is useful for
42039// getting updates only after the object has changed since the last
42040// request. Use googleapi.IsNotModified to check whether the response
42041// error from Do is the result of In-None-Match.
42042func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall {
42043	c.ifNoneMatch_ = entityTag
42044	return c
42045}
42046
42047// Context sets the context to be used in this call's Do method. Any
42048// pending HTTP request will be aborted if the provided context is
42049// canceled.
42050func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
42051	c.ctx_ = ctx
42052	return c
42053}
42054
42055// Header returns an http.Header that can be modified by the caller to
42056// add HTTP headers to the request.
42057func (c *ProjectsListCall) Header() http.Header {
42058	if c.header_ == nil {
42059		c.header_ = make(http.Header)
42060	}
42061	return c.header_
42062}
42063
42064func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
42065	reqHeaders := make(http.Header)
42066	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
42067	for k, v := range c.header_ {
42068		reqHeaders[k] = v
42069	}
42070	reqHeaders.Set("User-Agent", c.s.userAgent())
42071	if c.ifNoneMatch_ != "" {
42072		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42073	}
42074	var body io.Reader = nil
42075	c.urlParams_.Set("alt", alt)
42076	c.urlParams_.Set("prettyPrint", "false")
42077	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects")
42078	urls += "?" + c.urlParams_.Encode()
42079	req, err := http.NewRequest("GET", urls, body)
42080	if err != nil {
42081		return nil, err
42082	}
42083	req.Header = reqHeaders
42084	googleapi.Expand(req.URL, map[string]string{
42085		"profileId": strconv.FormatInt(c.profileId, 10),
42086	})
42087	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42088}
42089
42090// Do executes the "dfareporting.projects.list" call.
42091// Exactly one of *ProjectsListResponse or error will be non-nil. Any
42092// non-2xx status code is an error. Response headers are in either
42093// *ProjectsListResponse.ServerResponse.Header or (if a response was
42094// returned at all) in error.(*googleapi.Error).Header. Use
42095// googleapi.IsNotModified to check whether the returned error was
42096// because http.StatusNotModified was returned.
42097func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ProjectsListResponse, error) {
42098	gensupport.SetOptions(c.urlParams_, opts...)
42099	res, err := c.doRequest("json")
42100	if res != nil && res.StatusCode == http.StatusNotModified {
42101		if res.Body != nil {
42102			res.Body.Close()
42103		}
42104		return nil, &googleapi.Error{
42105			Code:   res.StatusCode,
42106			Header: res.Header,
42107		}
42108	}
42109	if err != nil {
42110		return nil, err
42111	}
42112	defer googleapi.CloseBody(res)
42113	if err := googleapi.CheckResponse(res); err != nil {
42114		return nil, err
42115	}
42116	ret := &ProjectsListResponse{
42117		ServerResponse: googleapi.ServerResponse{
42118			Header:         res.Header,
42119			HTTPStatusCode: res.StatusCode,
42120		},
42121	}
42122	target := &ret
42123	if err := gensupport.DecodeResponse(target, res); err != nil {
42124		return nil, err
42125	}
42126	return ret, nil
42127	// {
42128	//   "description": "Retrieves a list of projects, possibly filtered. This method supports paging.",
42129	//   "httpMethod": "GET",
42130	//   "id": "dfareporting.projects.list",
42131	//   "parameterOrder": [
42132	//     "profileId"
42133	//   ],
42134	//   "parameters": {
42135	//     "advertiserIds": {
42136	//       "description": "Select only projects with these advertiser IDs.",
42137	//       "format": "int64",
42138	//       "location": "query",
42139	//       "repeated": true,
42140	//       "type": "string"
42141	//     },
42142	//     "ids": {
42143	//       "description": "Select only projects with these IDs.",
42144	//       "format": "int64",
42145	//       "location": "query",
42146	//       "repeated": true,
42147	//       "type": "string"
42148	//     },
42149	//     "maxResults": {
42150	//       "default": "1000",
42151	//       "description": "Maximum number of results to return.",
42152	//       "format": "int32",
42153	//       "location": "query",
42154	//       "maximum": "1000",
42155	//       "minimum": "0",
42156	//       "type": "integer"
42157	//     },
42158	//     "pageToken": {
42159	//       "description": "Value of the nextPageToken from the previous result page.",
42160	//       "location": "query",
42161	//       "type": "string"
42162	//     },
42163	//     "profileId": {
42164	//       "description": "User profile ID associated with this request.",
42165	//       "format": "int64",
42166	//       "location": "path",
42167	//       "required": true,
42168	//       "type": "string"
42169	//     },
42170	//     "searchString": {
42171	//       "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\".",
42172	//       "location": "query",
42173	//       "type": "string"
42174	//     },
42175	//     "sortField": {
42176	//       "default": "ID",
42177	//       "description": "Field by which to sort the list.",
42178	//       "enum": [
42179	//         "ID",
42180	//         "NAME"
42181	//       ],
42182	//       "enumDescriptions": [
42183	//         "",
42184	//         ""
42185	//       ],
42186	//       "location": "query",
42187	//       "type": "string"
42188	//     },
42189	//     "sortOrder": {
42190	//       "default": "ASCENDING",
42191	//       "description": "Order of sorted results.",
42192	//       "enum": [
42193	//         "ASCENDING",
42194	//         "DESCENDING"
42195	//       ],
42196	//       "enumDescriptions": [
42197	//         "",
42198	//         ""
42199	//       ],
42200	//       "location": "query",
42201	//       "type": "string"
42202	//     }
42203	//   },
42204	//   "path": "userprofiles/{profileId}/projects",
42205	//   "response": {
42206	//     "$ref": "ProjectsListResponse"
42207	//   },
42208	//   "scopes": [
42209	//     "https://www.googleapis.com/auth/dfatrafficking"
42210	//   ]
42211	// }
42212
42213}
42214
42215// Pages invokes f for each page of results.
42216// A non-nil error returned from f will halt the iteration.
42217// The provided context supersedes any context provided to the Context method.
42218func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ProjectsListResponse) error) error {
42219	c.ctx_ = ctx
42220	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
42221	for {
42222		x, err := c.Do()
42223		if err != nil {
42224			return err
42225		}
42226		if err := f(x); err != nil {
42227			return err
42228		}
42229		if x.NextPageToken == "" {
42230			return nil
42231		}
42232		c.PageToken(x.NextPageToken)
42233	}
42234}
42235
42236// method id "dfareporting.regions.list":
42237
42238type RegionsListCall struct {
42239	s            *Service
42240	profileId    int64
42241	urlParams_   gensupport.URLParams
42242	ifNoneMatch_ string
42243	ctx_         context.Context
42244	header_      http.Header
42245}
42246
42247// List: Retrieves a list of regions.
42248func (r *RegionsService) List(profileId int64) *RegionsListCall {
42249	c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42250	c.profileId = profileId
42251	return c
42252}
42253
42254// Fields allows partial responses to be retrieved. See
42255// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42256// for more information.
42257func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall {
42258	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42259	return c
42260}
42261
42262// IfNoneMatch sets the optional parameter which makes the operation
42263// fail if the object's ETag matches the given value. This is useful for
42264// getting updates only after the object has changed since the last
42265// request. Use googleapi.IsNotModified to check whether the response
42266// error from Do is the result of In-None-Match.
42267func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall {
42268	c.ifNoneMatch_ = entityTag
42269	return c
42270}
42271
42272// Context sets the context to be used in this call's Do method. Any
42273// pending HTTP request will be aborted if the provided context is
42274// canceled.
42275func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
42276	c.ctx_ = ctx
42277	return c
42278}
42279
42280// Header returns an http.Header that can be modified by the caller to
42281// add HTTP headers to the request.
42282func (c *RegionsListCall) Header() http.Header {
42283	if c.header_ == nil {
42284		c.header_ = make(http.Header)
42285	}
42286	return c.header_
42287}
42288
42289func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
42290	reqHeaders := make(http.Header)
42291	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
42292	for k, v := range c.header_ {
42293		reqHeaders[k] = v
42294	}
42295	reqHeaders.Set("User-Agent", c.s.userAgent())
42296	if c.ifNoneMatch_ != "" {
42297		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42298	}
42299	var body io.Reader = nil
42300	c.urlParams_.Set("alt", alt)
42301	c.urlParams_.Set("prettyPrint", "false")
42302	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/regions")
42303	urls += "?" + c.urlParams_.Encode()
42304	req, err := http.NewRequest("GET", urls, body)
42305	if err != nil {
42306		return nil, err
42307	}
42308	req.Header = reqHeaders
42309	googleapi.Expand(req.URL, map[string]string{
42310		"profileId": strconv.FormatInt(c.profileId, 10),
42311	})
42312	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42313}
42314
42315// Do executes the "dfareporting.regions.list" call.
42316// Exactly one of *RegionsListResponse or error will be non-nil. Any
42317// non-2xx status code is an error. Response headers are in either
42318// *RegionsListResponse.ServerResponse.Header or (if a response was
42319// returned at all) in error.(*googleapi.Error).Header. Use
42320// googleapi.IsNotModified to check whether the returned error was
42321// because http.StatusNotModified was returned.
42322func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionsListResponse, error) {
42323	gensupport.SetOptions(c.urlParams_, opts...)
42324	res, err := c.doRequest("json")
42325	if res != nil && res.StatusCode == http.StatusNotModified {
42326		if res.Body != nil {
42327			res.Body.Close()
42328		}
42329		return nil, &googleapi.Error{
42330			Code:   res.StatusCode,
42331			Header: res.Header,
42332		}
42333	}
42334	if err != nil {
42335		return nil, err
42336	}
42337	defer googleapi.CloseBody(res)
42338	if err := googleapi.CheckResponse(res); err != nil {
42339		return nil, err
42340	}
42341	ret := &RegionsListResponse{
42342		ServerResponse: googleapi.ServerResponse{
42343			Header:         res.Header,
42344			HTTPStatusCode: res.StatusCode,
42345		},
42346	}
42347	target := &ret
42348	if err := gensupport.DecodeResponse(target, res); err != nil {
42349		return nil, err
42350	}
42351	return ret, nil
42352	// {
42353	//   "description": "Retrieves a list of regions.",
42354	//   "httpMethod": "GET",
42355	//   "id": "dfareporting.regions.list",
42356	//   "parameterOrder": [
42357	//     "profileId"
42358	//   ],
42359	//   "parameters": {
42360	//     "profileId": {
42361	//       "description": "User profile ID associated with this request.",
42362	//       "format": "int64",
42363	//       "location": "path",
42364	//       "required": true,
42365	//       "type": "string"
42366	//     }
42367	//   },
42368	//   "path": "userprofiles/{profileId}/regions",
42369	//   "response": {
42370	//     "$ref": "RegionsListResponse"
42371	//   },
42372	//   "scopes": [
42373	//     "https://www.googleapis.com/auth/dfatrafficking"
42374	//   ]
42375	// }
42376
42377}
42378
42379// method id "dfareporting.remarketingListShares.get":
42380
42381type RemarketingListSharesGetCall struct {
42382	s                 *Service
42383	profileId         int64
42384	remarketingListId int64
42385	urlParams_        gensupport.URLParams
42386	ifNoneMatch_      string
42387	ctx_              context.Context
42388	header_           http.Header
42389}
42390
42391// Get: Gets one remarketing list share by remarketing list ID.
42392func (r *RemarketingListSharesService) Get(profileId int64, remarketingListId int64) *RemarketingListSharesGetCall {
42393	c := &RemarketingListSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42394	c.profileId = profileId
42395	c.remarketingListId = remarketingListId
42396	return c
42397}
42398
42399// Fields allows partial responses to be retrieved. See
42400// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42401// for more information.
42402func (c *RemarketingListSharesGetCall) Fields(s ...googleapi.Field) *RemarketingListSharesGetCall {
42403	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42404	return c
42405}
42406
42407// IfNoneMatch sets the optional parameter which makes the operation
42408// fail if the object's ETag matches the given value. This is useful for
42409// getting updates only after the object has changed since the last
42410// request. Use googleapi.IsNotModified to check whether the response
42411// error from Do is the result of In-None-Match.
42412func (c *RemarketingListSharesGetCall) IfNoneMatch(entityTag string) *RemarketingListSharesGetCall {
42413	c.ifNoneMatch_ = entityTag
42414	return c
42415}
42416
42417// Context sets the context to be used in this call's Do method. Any
42418// pending HTTP request will be aborted if the provided context is
42419// canceled.
42420func (c *RemarketingListSharesGetCall) Context(ctx context.Context) *RemarketingListSharesGetCall {
42421	c.ctx_ = ctx
42422	return c
42423}
42424
42425// Header returns an http.Header that can be modified by the caller to
42426// add HTTP headers to the request.
42427func (c *RemarketingListSharesGetCall) Header() http.Header {
42428	if c.header_ == nil {
42429		c.header_ = make(http.Header)
42430	}
42431	return c.header_
42432}
42433
42434func (c *RemarketingListSharesGetCall) doRequest(alt string) (*http.Response, error) {
42435	reqHeaders := make(http.Header)
42436	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
42437	for k, v := range c.header_ {
42438		reqHeaders[k] = v
42439	}
42440	reqHeaders.Set("User-Agent", c.s.userAgent())
42441	if c.ifNoneMatch_ != "" {
42442		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42443	}
42444	var body io.Reader = nil
42445	c.urlParams_.Set("alt", alt)
42446	c.urlParams_.Set("prettyPrint", "false")
42447	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares/{remarketingListId}")
42448	urls += "?" + c.urlParams_.Encode()
42449	req, err := http.NewRequest("GET", urls, body)
42450	if err != nil {
42451		return nil, err
42452	}
42453	req.Header = reqHeaders
42454	googleapi.Expand(req.URL, map[string]string{
42455		"profileId":         strconv.FormatInt(c.profileId, 10),
42456		"remarketingListId": strconv.FormatInt(c.remarketingListId, 10),
42457	})
42458	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42459}
42460
42461// Do executes the "dfareporting.remarketingListShares.get" call.
42462// Exactly one of *RemarketingListShare or error will be non-nil. Any
42463// non-2xx status code is an error. Response headers are in either
42464// *RemarketingListShare.ServerResponse.Header or (if a response was
42465// returned at all) in error.(*googleapi.Error).Header. Use
42466// googleapi.IsNotModified to check whether the returned error was
42467// because http.StatusNotModified was returned.
42468func (c *RemarketingListSharesGetCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42469	gensupport.SetOptions(c.urlParams_, opts...)
42470	res, err := c.doRequest("json")
42471	if res != nil && res.StatusCode == http.StatusNotModified {
42472		if res.Body != nil {
42473			res.Body.Close()
42474		}
42475		return nil, &googleapi.Error{
42476			Code:   res.StatusCode,
42477			Header: res.Header,
42478		}
42479	}
42480	if err != nil {
42481		return nil, err
42482	}
42483	defer googleapi.CloseBody(res)
42484	if err := googleapi.CheckResponse(res); err != nil {
42485		return nil, err
42486	}
42487	ret := &RemarketingListShare{
42488		ServerResponse: googleapi.ServerResponse{
42489			Header:         res.Header,
42490			HTTPStatusCode: res.StatusCode,
42491		},
42492	}
42493	target := &ret
42494	if err := gensupport.DecodeResponse(target, res); err != nil {
42495		return nil, err
42496	}
42497	return ret, nil
42498	// {
42499	//   "description": "Gets one remarketing list share by remarketing list ID.",
42500	//   "httpMethod": "GET",
42501	//   "id": "dfareporting.remarketingListShares.get",
42502	//   "parameterOrder": [
42503	//     "profileId",
42504	//     "remarketingListId"
42505	//   ],
42506	//   "parameters": {
42507	//     "profileId": {
42508	//       "description": "User profile ID associated with this request.",
42509	//       "format": "int64",
42510	//       "location": "path",
42511	//       "required": true,
42512	//       "type": "string"
42513	//     },
42514	//     "remarketingListId": {
42515	//       "description": "Remarketing list ID.",
42516	//       "format": "int64",
42517	//       "location": "path",
42518	//       "required": true,
42519	//       "type": "string"
42520	//     }
42521	//   },
42522	//   "path": "userprofiles/{profileId}/remarketingListShares/{remarketingListId}",
42523	//   "response": {
42524	//     "$ref": "RemarketingListShare"
42525	//   },
42526	//   "scopes": [
42527	//     "https://www.googleapis.com/auth/dfatrafficking"
42528	//   ]
42529	// }
42530
42531}
42532
42533// method id "dfareporting.remarketingListShares.patch":
42534
42535type RemarketingListSharesPatchCall struct {
42536	s                    *Service
42537	profileId            int64
42538	remarketinglistshare *RemarketingListShare
42539	urlParams_           gensupport.URLParams
42540	ctx_                 context.Context
42541	header_              http.Header
42542}
42543
42544// Patch: Updates an existing remarketing list share. This method
42545// supports patch semantics.
42546func (r *RemarketingListSharesService) Patch(profileId int64, remarketingListId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesPatchCall {
42547	c := &RemarketingListSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42548	c.profileId = profileId
42549	c.urlParams_.Set("remarketingListId", fmt.Sprint(remarketingListId))
42550	c.remarketinglistshare = remarketinglistshare
42551	return c
42552}
42553
42554// Fields allows partial responses to be retrieved. See
42555// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42556// for more information.
42557func (c *RemarketingListSharesPatchCall) Fields(s ...googleapi.Field) *RemarketingListSharesPatchCall {
42558	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42559	return c
42560}
42561
42562// Context sets the context to be used in this call's Do method. Any
42563// pending HTTP request will be aborted if the provided context is
42564// canceled.
42565func (c *RemarketingListSharesPatchCall) Context(ctx context.Context) *RemarketingListSharesPatchCall {
42566	c.ctx_ = ctx
42567	return c
42568}
42569
42570// Header returns an http.Header that can be modified by the caller to
42571// add HTTP headers to the request.
42572func (c *RemarketingListSharesPatchCall) Header() http.Header {
42573	if c.header_ == nil {
42574		c.header_ = make(http.Header)
42575	}
42576	return c.header_
42577}
42578
42579func (c *RemarketingListSharesPatchCall) doRequest(alt string) (*http.Response, error) {
42580	reqHeaders := make(http.Header)
42581	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
42582	for k, v := range c.header_ {
42583		reqHeaders[k] = v
42584	}
42585	reqHeaders.Set("User-Agent", c.s.userAgent())
42586	var body io.Reader = nil
42587	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
42588	if err != nil {
42589		return nil, err
42590	}
42591	reqHeaders.Set("Content-Type", "application/json")
42592	c.urlParams_.Set("alt", alt)
42593	c.urlParams_.Set("prettyPrint", "false")
42594	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
42595	urls += "?" + c.urlParams_.Encode()
42596	req, err := http.NewRequest("PATCH", urls, body)
42597	if err != nil {
42598		return nil, err
42599	}
42600	req.Header = reqHeaders
42601	googleapi.Expand(req.URL, map[string]string{
42602		"profileId": strconv.FormatInt(c.profileId, 10),
42603	})
42604	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42605}
42606
42607// Do executes the "dfareporting.remarketingListShares.patch" call.
42608// Exactly one of *RemarketingListShare or error will be non-nil. Any
42609// non-2xx status code is an error. Response headers are in either
42610// *RemarketingListShare.ServerResponse.Header or (if a response was
42611// returned at all) in error.(*googleapi.Error).Header. Use
42612// googleapi.IsNotModified to check whether the returned error was
42613// because http.StatusNotModified was returned.
42614func (c *RemarketingListSharesPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42615	gensupport.SetOptions(c.urlParams_, opts...)
42616	res, err := c.doRequest("json")
42617	if res != nil && res.StatusCode == http.StatusNotModified {
42618		if res.Body != nil {
42619			res.Body.Close()
42620		}
42621		return nil, &googleapi.Error{
42622			Code:   res.StatusCode,
42623			Header: res.Header,
42624		}
42625	}
42626	if err != nil {
42627		return nil, err
42628	}
42629	defer googleapi.CloseBody(res)
42630	if err := googleapi.CheckResponse(res); err != nil {
42631		return nil, err
42632	}
42633	ret := &RemarketingListShare{
42634		ServerResponse: googleapi.ServerResponse{
42635			Header:         res.Header,
42636			HTTPStatusCode: res.StatusCode,
42637		},
42638	}
42639	target := &ret
42640	if err := gensupport.DecodeResponse(target, res); err != nil {
42641		return nil, err
42642	}
42643	return ret, nil
42644	// {
42645	//   "description": "Updates an existing remarketing list share. This method supports patch semantics.",
42646	//   "httpMethod": "PATCH",
42647	//   "id": "dfareporting.remarketingListShares.patch",
42648	//   "parameterOrder": [
42649	//     "profileId",
42650	//     "remarketingListId"
42651	//   ],
42652	//   "parameters": {
42653	//     "profileId": {
42654	//       "description": "User profile ID associated with this request.",
42655	//       "format": "int64",
42656	//       "location": "path",
42657	//       "required": true,
42658	//       "type": "string"
42659	//     },
42660	//     "remarketingListId": {
42661	//       "description": "Remarketing list ID.",
42662	//       "format": "int64",
42663	//       "location": "query",
42664	//       "required": true,
42665	//       "type": "string"
42666	//     }
42667	//   },
42668	//   "path": "userprofiles/{profileId}/remarketingListShares",
42669	//   "request": {
42670	//     "$ref": "RemarketingListShare"
42671	//   },
42672	//   "response": {
42673	//     "$ref": "RemarketingListShare"
42674	//   },
42675	//   "scopes": [
42676	//     "https://www.googleapis.com/auth/dfatrafficking"
42677	//   ]
42678	// }
42679
42680}
42681
42682// method id "dfareporting.remarketingListShares.update":
42683
42684type RemarketingListSharesUpdateCall struct {
42685	s                    *Service
42686	profileId            int64
42687	remarketinglistshare *RemarketingListShare
42688	urlParams_           gensupport.URLParams
42689	ctx_                 context.Context
42690	header_              http.Header
42691}
42692
42693// Update: Updates an existing remarketing list share.
42694func (r *RemarketingListSharesService) Update(profileId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesUpdateCall {
42695	c := &RemarketingListSharesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42696	c.profileId = profileId
42697	c.remarketinglistshare = remarketinglistshare
42698	return c
42699}
42700
42701// Fields allows partial responses to be retrieved. See
42702// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42703// for more information.
42704func (c *RemarketingListSharesUpdateCall) Fields(s ...googleapi.Field) *RemarketingListSharesUpdateCall {
42705	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42706	return c
42707}
42708
42709// Context sets the context to be used in this call's Do method. Any
42710// pending HTTP request will be aborted if the provided context is
42711// canceled.
42712func (c *RemarketingListSharesUpdateCall) Context(ctx context.Context) *RemarketingListSharesUpdateCall {
42713	c.ctx_ = ctx
42714	return c
42715}
42716
42717// Header returns an http.Header that can be modified by the caller to
42718// add HTTP headers to the request.
42719func (c *RemarketingListSharesUpdateCall) Header() http.Header {
42720	if c.header_ == nil {
42721		c.header_ = make(http.Header)
42722	}
42723	return c.header_
42724}
42725
42726func (c *RemarketingListSharesUpdateCall) doRequest(alt string) (*http.Response, error) {
42727	reqHeaders := make(http.Header)
42728	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
42729	for k, v := range c.header_ {
42730		reqHeaders[k] = v
42731	}
42732	reqHeaders.Set("User-Agent", c.s.userAgent())
42733	var body io.Reader = nil
42734	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
42735	if err != nil {
42736		return nil, err
42737	}
42738	reqHeaders.Set("Content-Type", "application/json")
42739	c.urlParams_.Set("alt", alt)
42740	c.urlParams_.Set("prettyPrint", "false")
42741	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
42742	urls += "?" + c.urlParams_.Encode()
42743	req, err := http.NewRequest("PUT", urls, body)
42744	if err != nil {
42745		return nil, err
42746	}
42747	req.Header = reqHeaders
42748	googleapi.Expand(req.URL, map[string]string{
42749		"profileId": strconv.FormatInt(c.profileId, 10),
42750	})
42751	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42752}
42753
42754// Do executes the "dfareporting.remarketingListShares.update" call.
42755// Exactly one of *RemarketingListShare or error will be non-nil. Any
42756// non-2xx status code is an error. Response headers are in either
42757// *RemarketingListShare.ServerResponse.Header or (if a response was
42758// returned at all) in error.(*googleapi.Error).Header. Use
42759// googleapi.IsNotModified to check whether the returned error was
42760// because http.StatusNotModified was returned.
42761func (c *RemarketingListSharesUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42762	gensupport.SetOptions(c.urlParams_, opts...)
42763	res, err := c.doRequest("json")
42764	if res != nil && res.StatusCode == http.StatusNotModified {
42765		if res.Body != nil {
42766			res.Body.Close()
42767		}
42768		return nil, &googleapi.Error{
42769			Code:   res.StatusCode,
42770			Header: res.Header,
42771		}
42772	}
42773	if err != nil {
42774		return nil, err
42775	}
42776	defer googleapi.CloseBody(res)
42777	if err := googleapi.CheckResponse(res); err != nil {
42778		return nil, err
42779	}
42780	ret := &RemarketingListShare{
42781		ServerResponse: googleapi.ServerResponse{
42782			Header:         res.Header,
42783			HTTPStatusCode: res.StatusCode,
42784		},
42785	}
42786	target := &ret
42787	if err := gensupport.DecodeResponse(target, res); err != nil {
42788		return nil, err
42789	}
42790	return ret, nil
42791	// {
42792	//   "description": "Updates an existing remarketing list share.",
42793	//   "httpMethod": "PUT",
42794	//   "id": "dfareporting.remarketingListShares.update",
42795	//   "parameterOrder": [
42796	//     "profileId"
42797	//   ],
42798	//   "parameters": {
42799	//     "profileId": {
42800	//       "description": "User profile ID associated with this request.",
42801	//       "format": "int64",
42802	//       "location": "path",
42803	//       "required": true,
42804	//       "type": "string"
42805	//     }
42806	//   },
42807	//   "path": "userprofiles/{profileId}/remarketingListShares",
42808	//   "request": {
42809	//     "$ref": "RemarketingListShare"
42810	//   },
42811	//   "response": {
42812	//     "$ref": "RemarketingListShare"
42813	//   },
42814	//   "scopes": [
42815	//     "https://www.googleapis.com/auth/dfatrafficking"
42816	//   ]
42817	// }
42818
42819}
42820
42821// method id "dfareporting.remarketingLists.get":
42822
42823type RemarketingListsGetCall struct {
42824	s            *Service
42825	profileId    int64
42826	id           int64
42827	urlParams_   gensupport.URLParams
42828	ifNoneMatch_ string
42829	ctx_         context.Context
42830	header_      http.Header
42831}
42832
42833// Get: Gets one remarketing list by ID.
42834func (r *RemarketingListsService) Get(profileId int64, id int64) *RemarketingListsGetCall {
42835	c := &RemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42836	c.profileId = profileId
42837	c.id = id
42838	return c
42839}
42840
42841// Fields allows partial responses to be retrieved. See
42842// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42843// for more information.
42844func (c *RemarketingListsGetCall) Fields(s ...googleapi.Field) *RemarketingListsGetCall {
42845	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42846	return c
42847}
42848
42849// IfNoneMatch sets the optional parameter which makes the operation
42850// fail if the object's ETag matches the given value. This is useful for
42851// getting updates only after the object has changed since the last
42852// request. Use googleapi.IsNotModified to check whether the response
42853// error from Do is the result of In-None-Match.
42854func (c *RemarketingListsGetCall) IfNoneMatch(entityTag string) *RemarketingListsGetCall {
42855	c.ifNoneMatch_ = entityTag
42856	return c
42857}
42858
42859// Context sets the context to be used in this call's Do method. Any
42860// pending HTTP request will be aborted if the provided context is
42861// canceled.
42862func (c *RemarketingListsGetCall) Context(ctx context.Context) *RemarketingListsGetCall {
42863	c.ctx_ = ctx
42864	return c
42865}
42866
42867// Header returns an http.Header that can be modified by the caller to
42868// add HTTP headers to the request.
42869func (c *RemarketingListsGetCall) Header() http.Header {
42870	if c.header_ == nil {
42871		c.header_ = make(http.Header)
42872	}
42873	return c.header_
42874}
42875
42876func (c *RemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
42877	reqHeaders := make(http.Header)
42878	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
42879	for k, v := range c.header_ {
42880		reqHeaders[k] = v
42881	}
42882	reqHeaders.Set("User-Agent", c.s.userAgent())
42883	if c.ifNoneMatch_ != "" {
42884		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42885	}
42886	var body io.Reader = nil
42887	c.urlParams_.Set("alt", alt)
42888	c.urlParams_.Set("prettyPrint", "false")
42889	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists/{id}")
42890	urls += "?" + c.urlParams_.Encode()
42891	req, err := http.NewRequest("GET", urls, body)
42892	if err != nil {
42893		return nil, err
42894	}
42895	req.Header = reqHeaders
42896	googleapi.Expand(req.URL, map[string]string{
42897		"profileId": strconv.FormatInt(c.profileId, 10),
42898		"id":        strconv.FormatInt(c.id, 10),
42899	})
42900	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42901}
42902
42903// Do executes the "dfareporting.remarketingLists.get" call.
42904// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
42905// status code is an error. Response headers are in either
42906// *RemarketingList.ServerResponse.Header or (if a response was returned
42907// at all) in error.(*googleapi.Error).Header. Use
42908// googleapi.IsNotModified to check whether the returned error was
42909// because http.StatusNotModified was returned.
42910func (c *RemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
42911	gensupport.SetOptions(c.urlParams_, opts...)
42912	res, err := c.doRequest("json")
42913	if res != nil && res.StatusCode == http.StatusNotModified {
42914		if res.Body != nil {
42915			res.Body.Close()
42916		}
42917		return nil, &googleapi.Error{
42918			Code:   res.StatusCode,
42919			Header: res.Header,
42920		}
42921	}
42922	if err != nil {
42923		return nil, err
42924	}
42925	defer googleapi.CloseBody(res)
42926	if err := googleapi.CheckResponse(res); err != nil {
42927		return nil, err
42928	}
42929	ret := &RemarketingList{
42930		ServerResponse: googleapi.ServerResponse{
42931			Header:         res.Header,
42932			HTTPStatusCode: res.StatusCode,
42933		},
42934	}
42935	target := &ret
42936	if err := gensupport.DecodeResponse(target, res); err != nil {
42937		return nil, err
42938	}
42939	return ret, nil
42940	// {
42941	//   "description": "Gets one remarketing list by ID.",
42942	//   "httpMethod": "GET",
42943	//   "id": "dfareporting.remarketingLists.get",
42944	//   "parameterOrder": [
42945	//     "profileId",
42946	//     "id"
42947	//   ],
42948	//   "parameters": {
42949	//     "id": {
42950	//       "description": "Remarketing list ID.",
42951	//       "format": "int64",
42952	//       "location": "path",
42953	//       "required": true,
42954	//       "type": "string"
42955	//     },
42956	//     "profileId": {
42957	//       "description": "User profile ID associated with this request.",
42958	//       "format": "int64",
42959	//       "location": "path",
42960	//       "required": true,
42961	//       "type": "string"
42962	//     }
42963	//   },
42964	//   "path": "userprofiles/{profileId}/remarketingLists/{id}",
42965	//   "response": {
42966	//     "$ref": "RemarketingList"
42967	//   },
42968	//   "scopes": [
42969	//     "https://www.googleapis.com/auth/dfatrafficking"
42970	//   ]
42971	// }
42972
42973}
42974
42975// method id "dfareporting.remarketingLists.insert":
42976
42977type RemarketingListsInsertCall struct {
42978	s               *Service
42979	profileId       int64
42980	remarketinglist *RemarketingList
42981	urlParams_      gensupport.URLParams
42982	ctx_            context.Context
42983	header_         http.Header
42984}
42985
42986// Insert: Inserts a new remarketing list.
42987func (r *RemarketingListsService) Insert(profileId int64, remarketinglist *RemarketingList) *RemarketingListsInsertCall {
42988	c := &RemarketingListsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42989	c.profileId = profileId
42990	c.remarketinglist = remarketinglist
42991	return c
42992}
42993
42994// Fields allows partial responses to be retrieved. See
42995// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42996// for more information.
42997func (c *RemarketingListsInsertCall) Fields(s ...googleapi.Field) *RemarketingListsInsertCall {
42998	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42999	return c
43000}
43001
43002// Context sets the context to be used in this call's Do method. Any
43003// pending HTTP request will be aborted if the provided context is
43004// canceled.
43005func (c *RemarketingListsInsertCall) Context(ctx context.Context) *RemarketingListsInsertCall {
43006	c.ctx_ = ctx
43007	return c
43008}
43009
43010// Header returns an http.Header that can be modified by the caller to
43011// add HTTP headers to the request.
43012func (c *RemarketingListsInsertCall) Header() http.Header {
43013	if c.header_ == nil {
43014		c.header_ = make(http.Header)
43015	}
43016	return c.header_
43017}
43018
43019func (c *RemarketingListsInsertCall) doRequest(alt string) (*http.Response, error) {
43020	reqHeaders := make(http.Header)
43021	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
43022	for k, v := range c.header_ {
43023		reqHeaders[k] = v
43024	}
43025	reqHeaders.Set("User-Agent", c.s.userAgent())
43026	var body io.Reader = nil
43027	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43028	if err != nil {
43029		return nil, err
43030	}
43031	reqHeaders.Set("Content-Type", "application/json")
43032	c.urlParams_.Set("alt", alt)
43033	c.urlParams_.Set("prettyPrint", "false")
43034	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43035	urls += "?" + c.urlParams_.Encode()
43036	req, err := http.NewRequest("POST", urls, body)
43037	if err != nil {
43038		return nil, err
43039	}
43040	req.Header = reqHeaders
43041	googleapi.Expand(req.URL, map[string]string{
43042		"profileId": strconv.FormatInt(c.profileId, 10),
43043	})
43044	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43045}
43046
43047// Do executes the "dfareporting.remarketingLists.insert" call.
43048// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
43049// status code is an error. Response headers are in either
43050// *RemarketingList.ServerResponse.Header or (if a response was returned
43051// at all) in error.(*googleapi.Error).Header. Use
43052// googleapi.IsNotModified to check whether the returned error was
43053// because http.StatusNotModified was returned.
43054func (c *RemarketingListsInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43055	gensupport.SetOptions(c.urlParams_, opts...)
43056	res, err := c.doRequest("json")
43057	if res != nil && res.StatusCode == http.StatusNotModified {
43058		if res.Body != nil {
43059			res.Body.Close()
43060		}
43061		return nil, &googleapi.Error{
43062			Code:   res.StatusCode,
43063			Header: res.Header,
43064		}
43065	}
43066	if err != nil {
43067		return nil, err
43068	}
43069	defer googleapi.CloseBody(res)
43070	if err := googleapi.CheckResponse(res); err != nil {
43071		return nil, err
43072	}
43073	ret := &RemarketingList{
43074		ServerResponse: googleapi.ServerResponse{
43075			Header:         res.Header,
43076			HTTPStatusCode: res.StatusCode,
43077		},
43078	}
43079	target := &ret
43080	if err := gensupport.DecodeResponse(target, res); err != nil {
43081		return nil, err
43082	}
43083	return ret, nil
43084	// {
43085	//   "description": "Inserts a new remarketing list.",
43086	//   "httpMethod": "POST",
43087	//   "id": "dfareporting.remarketingLists.insert",
43088	//   "parameterOrder": [
43089	//     "profileId"
43090	//   ],
43091	//   "parameters": {
43092	//     "profileId": {
43093	//       "description": "User profile ID associated with this request.",
43094	//       "format": "int64",
43095	//       "location": "path",
43096	//       "required": true,
43097	//       "type": "string"
43098	//     }
43099	//   },
43100	//   "path": "userprofiles/{profileId}/remarketingLists",
43101	//   "request": {
43102	//     "$ref": "RemarketingList"
43103	//   },
43104	//   "response": {
43105	//     "$ref": "RemarketingList"
43106	//   },
43107	//   "scopes": [
43108	//     "https://www.googleapis.com/auth/dfatrafficking"
43109	//   ]
43110	// }
43111
43112}
43113
43114// method id "dfareporting.remarketingLists.list":
43115
43116type RemarketingListsListCall struct {
43117	s            *Service
43118	profileId    int64
43119	urlParams_   gensupport.URLParams
43120	ifNoneMatch_ string
43121	ctx_         context.Context
43122	header_      http.Header
43123}
43124
43125// List: Retrieves a list of remarketing lists, possibly filtered. This
43126// method supports paging.
43127func (r *RemarketingListsService) List(profileId int64, advertiserId int64) *RemarketingListsListCall {
43128	c := &RemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43129	c.profileId = profileId
43130	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
43131	return c
43132}
43133
43134// Active sets the optional parameter "active": Select only active or
43135// only inactive remarketing lists.
43136func (c *RemarketingListsListCall) Active(active bool) *RemarketingListsListCall {
43137	c.urlParams_.Set("active", fmt.Sprint(active))
43138	return c
43139}
43140
43141// FloodlightActivityId sets the optional parameter
43142// "floodlightActivityId": Select only remarketing lists that have this
43143// floodlight activity ID.
43144func (c *RemarketingListsListCall) FloodlightActivityId(floodlightActivityId int64) *RemarketingListsListCall {
43145	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
43146	return c
43147}
43148
43149// MaxResults sets the optional parameter "maxResults": Maximum number
43150// of results to return.
43151func (c *RemarketingListsListCall) MaxResults(maxResults int64) *RemarketingListsListCall {
43152	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
43153	return c
43154}
43155
43156// Name sets the optional parameter "name": Allows searching for objects
43157// by name or ID. Wildcards (*) are allowed. For example, "remarketing
43158// list*2015" will return objects with names like "remarketing list June
43159// 2015", "remarketing list April 2015", or simply "remarketing list
43160// 2015". Most of the searches also add wildcards implicitly at the
43161// start and the end of the search string. For example, a search string
43162// of "remarketing list" will match objects with name "my remarketing
43163// list", "remarketing list 2015", or simply "remarketing list".
43164func (c *RemarketingListsListCall) Name(name string) *RemarketingListsListCall {
43165	c.urlParams_.Set("name", name)
43166	return c
43167}
43168
43169// PageToken sets the optional parameter "pageToken": Value of the
43170// nextPageToken from the previous result page.
43171func (c *RemarketingListsListCall) PageToken(pageToken string) *RemarketingListsListCall {
43172	c.urlParams_.Set("pageToken", pageToken)
43173	return c
43174}
43175
43176// SortField sets the optional parameter "sortField": Field by which to
43177// sort the list.
43178//
43179// Possible values:
43180//   "ID" (default)
43181//   "NAME"
43182func (c *RemarketingListsListCall) SortField(sortField string) *RemarketingListsListCall {
43183	c.urlParams_.Set("sortField", sortField)
43184	return c
43185}
43186
43187// SortOrder sets the optional parameter "sortOrder": Order of sorted
43188// results.
43189//
43190// Possible values:
43191//   "ASCENDING" (default)
43192//   "DESCENDING"
43193func (c *RemarketingListsListCall) SortOrder(sortOrder string) *RemarketingListsListCall {
43194	c.urlParams_.Set("sortOrder", sortOrder)
43195	return c
43196}
43197
43198// Fields allows partial responses to be retrieved. See
43199// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43200// for more information.
43201func (c *RemarketingListsListCall) Fields(s ...googleapi.Field) *RemarketingListsListCall {
43202	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43203	return c
43204}
43205
43206// IfNoneMatch sets the optional parameter which makes the operation
43207// fail if the object's ETag matches the given value. This is useful for
43208// getting updates only after the object has changed since the last
43209// request. Use googleapi.IsNotModified to check whether the response
43210// error from Do is the result of In-None-Match.
43211func (c *RemarketingListsListCall) IfNoneMatch(entityTag string) *RemarketingListsListCall {
43212	c.ifNoneMatch_ = entityTag
43213	return c
43214}
43215
43216// Context sets the context to be used in this call's Do method. Any
43217// pending HTTP request will be aborted if the provided context is
43218// canceled.
43219func (c *RemarketingListsListCall) Context(ctx context.Context) *RemarketingListsListCall {
43220	c.ctx_ = ctx
43221	return c
43222}
43223
43224// Header returns an http.Header that can be modified by the caller to
43225// add HTTP headers to the request.
43226func (c *RemarketingListsListCall) Header() http.Header {
43227	if c.header_ == nil {
43228		c.header_ = make(http.Header)
43229	}
43230	return c.header_
43231}
43232
43233func (c *RemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
43234	reqHeaders := make(http.Header)
43235	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
43236	for k, v := range c.header_ {
43237		reqHeaders[k] = v
43238	}
43239	reqHeaders.Set("User-Agent", c.s.userAgent())
43240	if c.ifNoneMatch_ != "" {
43241		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43242	}
43243	var body io.Reader = nil
43244	c.urlParams_.Set("alt", alt)
43245	c.urlParams_.Set("prettyPrint", "false")
43246	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43247	urls += "?" + c.urlParams_.Encode()
43248	req, err := http.NewRequest("GET", urls, body)
43249	if err != nil {
43250		return nil, err
43251	}
43252	req.Header = reqHeaders
43253	googleapi.Expand(req.URL, map[string]string{
43254		"profileId": strconv.FormatInt(c.profileId, 10),
43255	})
43256	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43257}
43258
43259// Do executes the "dfareporting.remarketingLists.list" call.
43260// Exactly one of *RemarketingListsListResponse or error will be
43261// non-nil. Any non-2xx status code is an error. Response headers are in
43262// either *RemarketingListsListResponse.ServerResponse.Header or (if a
43263// response was returned at all) in error.(*googleapi.Error).Header. Use
43264// googleapi.IsNotModified to check whether the returned error was
43265// because http.StatusNotModified was returned.
43266func (c *RemarketingListsListCall) Do(opts ...googleapi.CallOption) (*RemarketingListsListResponse, error) {
43267	gensupport.SetOptions(c.urlParams_, opts...)
43268	res, err := c.doRequest("json")
43269	if res != nil && res.StatusCode == http.StatusNotModified {
43270		if res.Body != nil {
43271			res.Body.Close()
43272		}
43273		return nil, &googleapi.Error{
43274			Code:   res.StatusCode,
43275			Header: res.Header,
43276		}
43277	}
43278	if err != nil {
43279		return nil, err
43280	}
43281	defer googleapi.CloseBody(res)
43282	if err := googleapi.CheckResponse(res); err != nil {
43283		return nil, err
43284	}
43285	ret := &RemarketingListsListResponse{
43286		ServerResponse: googleapi.ServerResponse{
43287			Header:         res.Header,
43288			HTTPStatusCode: res.StatusCode,
43289		},
43290	}
43291	target := &ret
43292	if err := gensupport.DecodeResponse(target, res); err != nil {
43293		return nil, err
43294	}
43295	return ret, nil
43296	// {
43297	//   "description": "Retrieves a list of remarketing lists, possibly filtered. This method supports paging.",
43298	//   "httpMethod": "GET",
43299	//   "id": "dfareporting.remarketingLists.list",
43300	//   "parameterOrder": [
43301	//     "profileId",
43302	//     "advertiserId"
43303	//   ],
43304	//   "parameters": {
43305	//     "active": {
43306	//       "description": "Select only active or only inactive remarketing lists.",
43307	//       "location": "query",
43308	//       "type": "boolean"
43309	//     },
43310	//     "advertiserId": {
43311	//       "description": "Select only remarketing lists owned by this advertiser.",
43312	//       "format": "int64",
43313	//       "location": "query",
43314	//       "required": true,
43315	//       "type": "string"
43316	//     },
43317	//     "floodlightActivityId": {
43318	//       "description": "Select only remarketing lists that have this floodlight activity ID.",
43319	//       "format": "int64",
43320	//       "location": "query",
43321	//       "type": "string"
43322	//     },
43323	//     "maxResults": {
43324	//       "default": "1000",
43325	//       "description": "Maximum number of results to return.",
43326	//       "format": "int32",
43327	//       "location": "query",
43328	//       "maximum": "1000",
43329	//       "minimum": "0",
43330	//       "type": "integer"
43331	//     },
43332	//     "name": {
43333	//       "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\".",
43334	//       "location": "query",
43335	//       "type": "string"
43336	//     },
43337	//     "pageToken": {
43338	//       "description": "Value of the nextPageToken from the previous result page.",
43339	//       "location": "query",
43340	//       "type": "string"
43341	//     },
43342	//     "profileId": {
43343	//       "description": "User profile ID associated with this request.",
43344	//       "format": "int64",
43345	//       "location": "path",
43346	//       "required": true,
43347	//       "type": "string"
43348	//     },
43349	//     "sortField": {
43350	//       "default": "ID",
43351	//       "description": "Field by which to sort the list.",
43352	//       "enum": [
43353	//         "ID",
43354	//         "NAME"
43355	//       ],
43356	//       "enumDescriptions": [
43357	//         "",
43358	//         ""
43359	//       ],
43360	//       "location": "query",
43361	//       "type": "string"
43362	//     },
43363	//     "sortOrder": {
43364	//       "default": "ASCENDING",
43365	//       "description": "Order of sorted results.",
43366	//       "enum": [
43367	//         "ASCENDING",
43368	//         "DESCENDING"
43369	//       ],
43370	//       "enumDescriptions": [
43371	//         "",
43372	//         ""
43373	//       ],
43374	//       "location": "query",
43375	//       "type": "string"
43376	//     }
43377	//   },
43378	//   "path": "userprofiles/{profileId}/remarketingLists",
43379	//   "response": {
43380	//     "$ref": "RemarketingListsListResponse"
43381	//   },
43382	//   "scopes": [
43383	//     "https://www.googleapis.com/auth/dfatrafficking"
43384	//   ]
43385	// }
43386
43387}
43388
43389// Pages invokes f for each page of results.
43390// A non-nil error returned from f will halt the iteration.
43391// The provided context supersedes any context provided to the Context method.
43392func (c *RemarketingListsListCall) Pages(ctx context.Context, f func(*RemarketingListsListResponse) error) error {
43393	c.ctx_ = ctx
43394	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
43395	for {
43396		x, err := c.Do()
43397		if err != nil {
43398			return err
43399		}
43400		if err := f(x); err != nil {
43401			return err
43402		}
43403		if x.NextPageToken == "" {
43404			return nil
43405		}
43406		c.PageToken(x.NextPageToken)
43407	}
43408}
43409
43410// method id "dfareporting.remarketingLists.patch":
43411
43412type RemarketingListsPatchCall struct {
43413	s               *Service
43414	profileId       int64
43415	remarketinglist *RemarketingList
43416	urlParams_      gensupport.URLParams
43417	ctx_            context.Context
43418	header_         http.Header
43419}
43420
43421// Patch: Updates an existing remarketing list. This method supports
43422// patch semantics.
43423func (r *RemarketingListsService) Patch(profileId int64, id int64, remarketinglist *RemarketingList) *RemarketingListsPatchCall {
43424	c := &RemarketingListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43425	c.profileId = profileId
43426	c.urlParams_.Set("id", fmt.Sprint(id))
43427	c.remarketinglist = remarketinglist
43428	return c
43429}
43430
43431// Fields allows partial responses to be retrieved. See
43432// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43433// for more information.
43434func (c *RemarketingListsPatchCall) Fields(s ...googleapi.Field) *RemarketingListsPatchCall {
43435	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43436	return c
43437}
43438
43439// Context sets the context to be used in this call's Do method. Any
43440// pending HTTP request will be aborted if the provided context is
43441// canceled.
43442func (c *RemarketingListsPatchCall) Context(ctx context.Context) *RemarketingListsPatchCall {
43443	c.ctx_ = ctx
43444	return c
43445}
43446
43447// Header returns an http.Header that can be modified by the caller to
43448// add HTTP headers to the request.
43449func (c *RemarketingListsPatchCall) Header() http.Header {
43450	if c.header_ == nil {
43451		c.header_ = make(http.Header)
43452	}
43453	return c.header_
43454}
43455
43456func (c *RemarketingListsPatchCall) doRequest(alt string) (*http.Response, error) {
43457	reqHeaders := make(http.Header)
43458	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
43459	for k, v := range c.header_ {
43460		reqHeaders[k] = v
43461	}
43462	reqHeaders.Set("User-Agent", c.s.userAgent())
43463	var body io.Reader = nil
43464	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43465	if err != nil {
43466		return nil, err
43467	}
43468	reqHeaders.Set("Content-Type", "application/json")
43469	c.urlParams_.Set("alt", alt)
43470	c.urlParams_.Set("prettyPrint", "false")
43471	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43472	urls += "?" + c.urlParams_.Encode()
43473	req, err := http.NewRequest("PATCH", urls, body)
43474	if err != nil {
43475		return nil, err
43476	}
43477	req.Header = reqHeaders
43478	googleapi.Expand(req.URL, map[string]string{
43479		"profileId": strconv.FormatInt(c.profileId, 10),
43480	})
43481	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43482}
43483
43484// Do executes the "dfareporting.remarketingLists.patch" call.
43485// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
43486// status code is an error. Response headers are in either
43487// *RemarketingList.ServerResponse.Header or (if a response was returned
43488// at all) in error.(*googleapi.Error).Header. Use
43489// googleapi.IsNotModified to check whether the returned error was
43490// because http.StatusNotModified was returned.
43491func (c *RemarketingListsPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43492	gensupport.SetOptions(c.urlParams_, opts...)
43493	res, err := c.doRequest("json")
43494	if res != nil && res.StatusCode == http.StatusNotModified {
43495		if res.Body != nil {
43496			res.Body.Close()
43497		}
43498		return nil, &googleapi.Error{
43499			Code:   res.StatusCode,
43500			Header: res.Header,
43501		}
43502	}
43503	if err != nil {
43504		return nil, err
43505	}
43506	defer googleapi.CloseBody(res)
43507	if err := googleapi.CheckResponse(res); err != nil {
43508		return nil, err
43509	}
43510	ret := &RemarketingList{
43511		ServerResponse: googleapi.ServerResponse{
43512			Header:         res.Header,
43513			HTTPStatusCode: res.StatusCode,
43514		},
43515	}
43516	target := &ret
43517	if err := gensupport.DecodeResponse(target, res); err != nil {
43518		return nil, err
43519	}
43520	return ret, nil
43521	// {
43522	//   "description": "Updates an existing remarketing list. This method supports patch semantics.",
43523	//   "httpMethod": "PATCH",
43524	//   "id": "dfareporting.remarketingLists.patch",
43525	//   "parameterOrder": [
43526	//     "profileId",
43527	//     "id"
43528	//   ],
43529	//   "parameters": {
43530	//     "id": {
43531	//       "description": "Remarketing list ID.",
43532	//       "format": "int64",
43533	//       "location": "query",
43534	//       "required": true,
43535	//       "type": "string"
43536	//     },
43537	//     "profileId": {
43538	//       "description": "User profile ID associated with this request.",
43539	//       "format": "int64",
43540	//       "location": "path",
43541	//       "required": true,
43542	//       "type": "string"
43543	//     }
43544	//   },
43545	//   "path": "userprofiles/{profileId}/remarketingLists",
43546	//   "request": {
43547	//     "$ref": "RemarketingList"
43548	//   },
43549	//   "response": {
43550	//     "$ref": "RemarketingList"
43551	//   },
43552	//   "scopes": [
43553	//     "https://www.googleapis.com/auth/dfatrafficking"
43554	//   ]
43555	// }
43556
43557}
43558
43559// method id "dfareporting.remarketingLists.update":
43560
43561type RemarketingListsUpdateCall struct {
43562	s               *Service
43563	profileId       int64
43564	remarketinglist *RemarketingList
43565	urlParams_      gensupport.URLParams
43566	ctx_            context.Context
43567	header_         http.Header
43568}
43569
43570// Update: Updates an existing remarketing list.
43571func (r *RemarketingListsService) Update(profileId int64, remarketinglist *RemarketingList) *RemarketingListsUpdateCall {
43572	c := &RemarketingListsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43573	c.profileId = profileId
43574	c.remarketinglist = remarketinglist
43575	return c
43576}
43577
43578// Fields allows partial responses to be retrieved. See
43579// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43580// for more information.
43581func (c *RemarketingListsUpdateCall) Fields(s ...googleapi.Field) *RemarketingListsUpdateCall {
43582	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43583	return c
43584}
43585
43586// Context sets the context to be used in this call's Do method. Any
43587// pending HTTP request will be aborted if the provided context is
43588// canceled.
43589func (c *RemarketingListsUpdateCall) Context(ctx context.Context) *RemarketingListsUpdateCall {
43590	c.ctx_ = ctx
43591	return c
43592}
43593
43594// Header returns an http.Header that can be modified by the caller to
43595// add HTTP headers to the request.
43596func (c *RemarketingListsUpdateCall) Header() http.Header {
43597	if c.header_ == nil {
43598		c.header_ = make(http.Header)
43599	}
43600	return c.header_
43601}
43602
43603func (c *RemarketingListsUpdateCall) doRequest(alt string) (*http.Response, error) {
43604	reqHeaders := make(http.Header)
43605	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
43606	for k, v := range c.header_ {
43607		reqHeaders[k] = v
43608	}
43609	reqHeaders.Set("User-Agent", c.s.userAgent())
43610	var body io.Reader = nil
43611	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43612	if err != nil {
43613		return nil, err
43614	}
43615	reqHeaders.Set("Content-Type", "application/json")
43616	c.urlParams_.Set("alt", alt)
43617	c.urlParams_.Set("prettyPrint", "false")
43618	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43619	urls += "?" + c.urlParams_.Encode()
43620	req, err := http.NewRequest("PUT", urls, body)
43621	if err != nil {
43622		return nil, err
43623	}
43624	req.Header = reqHeaders
43625	googleapi.Expand(req.URL, map[string]string{
43626		"profileId": strconv.FormatInt(c.profileId, 10),
43627	})
43628	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43629}
43630
43631// Do executes the "dfareporting.remarketingLists.update" call.
43632// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
43633// status code is an error. Response headers are in either
43634// *RemarketingList.ServerResponse.Header or (if a response was returned
43635// at all) in error.(*googleapi.Error).Header. Use
43636// googleapi.IsNotModified to check whether the returned error was
43637// because http.StatusNotModified was returned.
43638func (c *RemarketingListsUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43639	gensupport.SetOptions(c.urlParams_, opts...)
43640	res, err := c.doRequest("json")
43641	if res != nil && res.StatusCode == http.StatusNotModified {
43642		if res.Body != nil {
43643			res.Body.Close()
43644		}
43645		return nil, &googleapi.Error{
43646			Code:   res.StatusCode,
43647			Header: res.Header,
43648		}
43649	}
43650	if err != nil {
43651		return nil, err
43652	}
43653	defer googleapi.CloseBody(res)
43654	if err := googleapi.CheckResponse(res); err != nil {
43655		return nil, err
43656	}
43657	ret := &RemarketingList{
43658		ServerResponse: googleapi.ServerResponse{
43659			Header:         res.Header,
43660			HTTPStatusCode: res.StatusCode,
43661		},
43662	}
43663	target := &ret
43664	if err := gensupport.DecodeResponse(target, res); err != nil {
43665		return nil, err
43666	}
43667	return ret, nil
43668	// {
43669	//   "description": "Updates an existing remarketing list.",
43670	//   "httpMethod": "PUT",
43671	//   "id": "dfareporting.remarketingLists.update",
43672	//   "parameterOrder": [
43673	//     "profileId"
43674	//   ],
43675	//   "parameters": {
43676	//     "profileId": {
43677	//       "description": "User profile ID associated with this request.",
43678	//       "format": "int64",
43679	//       "location": "path",
43680	//       "required": true,
43681	//       "type": "string"
43682	//     }
43683	//   },
43684	//   "path": "userprofiles/{profileId}/remarketingLists",
43685	//   "request": {
43686	//     "$ref": "RemarketingList"
43687	//   },
43688	//   "response": {
43689	//     "$ref": "RemarketingList"
43690	//   },
43691	//   "scopes": [
43692	//     "https://www.googleapis.com/auth/dfatrafficking"
43693	//   ]
43694	// }
43695
43696}
43697
43698// method id "dfareporting.reports.delete":
43699
43700type ReportsDeleteCall struct {
43701	s          *Service
43702	profileId  int64
43703	reportId   int64
43704	urlParams_ gensupport.URLParams
43705	ctx_       context.Context
43706	header_    http.Header
43707}
43708
43709// Delete: Deletes a report by its ID.
43710func (r *ReportsService) Delete(profileId int64, reportId int64) *ReportsDeleteCall {
43711	c := &ReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43712	c.profileId = profileId
43713	c.reportId = reportId
43714	return c
43715}
43716
43717// Fields allows partial responses to be retrieved. See
43718// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43719// for more information.
43720func (c *ReportsDeleteCall) Fields(s ...googleapi.Field) *ReportsDeleteCall {
43721	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43722	return c
43723}
43724
43725// Context sets the context to be used in this call's Do method. Any
43726// pending HTTP request will be aborted if the provided context is
43727// canceled.
43728func (c *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
43729	c.ctx_ = ctx
43730	return c
43731}
43732
43733// Header returns an http.Header that can be modified by the caller to
43734// add HTTP headers to the request.
43735func (c *ReportsDeleteCall) Header() http.Header {
43736	if c.header_ == nil {
43737		c.header_ = make(http.Header)
43738	}
43739	return c.header_
43740}
43741
43742func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
43743	reqHeaders := make(http.Header)
43744	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
43745	for k, v := range c.header_ {
43746		reqHeaders[k] = v
43747	}
43748	reqHeaders.Set("User-Agent", c.s.userAgent())
43749	var body io.Reader = nil
43750	c.urlParams_.Set("alt", alt)
43751	c.urlParams_.Set("prettyPrint", "false")
43752	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43753	urls += "?" + c.urlParams_.Encode()
43754	req, err := http.NewRequest("DELETE", urls, body)
43755	if err != nil {
43756		return nil, err
43757	}
43758	req.Header = reqHeaders
43759	googleapi.Expand(req.URL, map[string]string{
43760		"profileId": strconv.FormatInt(c.profileId, 10),
43761		"reportId":  strconv.FormatInt(c.reportId, 10),
43762	})
43763	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43764}
43765
43766// Do executes the "dfareporting.reports.delete" call.
43767func (c *ReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
43768	gensupport.SetOptions(c.urlParams_, opts...)
43769	res, err := c.doRequest("json")
43770	if err != nil {
43771		return err
43772	}
43773	defer googleapi.CloseBody(res)
43774	if err := googleapi.CheckResponse(res); err != nil {
43775		return err
43776	}
43777	return nil
43778	// {
43779	//   "description": "Deletes a report by its ID.",
43780	//   "httpMethod": "DELETE",
43781	//   "id": "dfareporting.reports.delete",
43782	//   "parameterOrder": [
43783	//     "profileId",
43784	//     "reportId"
43785	//   ],
43786	//   "parameters": {
43787	//     "profileId": {
43788	//       "description": "The DFA user profile ID.",
43789	//       "format": "int64",
43790	//       "location": "path",
43791	//       "required": true,
43792	//       "type": "string"
43793	//     },
43794	//     "reportId": {
43795	//       "description": "The ID of the report.",
43796	//       "format": "int64",
43797	//       "location": "path",
43798	//       "required": true,
43799	//       "type": "string"
43800	//     }
43801	//   },
43802	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43803	//   "scopes": [
43804	//     "https://www.googleapis.com/auth/dfareporting"
43805	//   ]
43806	// }
43807
43808}
43809
43810// method id "dfareporting.reports.get":
43811
43812type ReportsGetCall struct {
43813	s            *Service
43814	profileId    int64
43815	reportId     int64
43816	urlParams_   gensupport.URLParams
43817	ifNoneMatch_ string
43818	ctx_         context.Context
43819	header_      http.Header
43820}
43821
43822// Get: Retrieves a report by its ID.
43823func (r *ReportsService) Get(profileId int64, reportId int64) *ReportsGetCall {
43824	c := &ReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43825	c.profileId = profileId
43826	c.reportId = reportId
43827	return c
43828}
43829
43830// Fields allows partial responses to be retrieved. See
43831// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43832// for more information.
43833func (c *ReportsGetCall) Fields(s ...googleapi.Field) *ReportsGetCall {
43834	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43835	return c
43836}
43837
43838// IfNoneMatch sets the optional parameter which makes the operation
43839// fail if the object's ETag matches the given value. This is useful for
43840// getting updates only after the object has changed since the last
43841// request. Use googleapi.IsNotModified to check whether the response
43842// error from Do is the result of In-None-Match.
43843func (c *ReportsGetCall) IfNoneMatch(entityTag string) *ReportsGetCall {
43844	c.ifNoneMatch_ = entityTag
43845	return c
43846}
43847
43848// Context sets the context to be used in this call's Do method. Any
43849// pending HTTP request will be aborted if the provided context is
43850// canceled.
43851func (c *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
43852	c.ctx_ = ctx
43853	return c
43854}
43855
43856// Header returns an http.Header that can be modified by the caller to
43857// add HTTP headers to the request.
43858func (c *ReportsGetCall) Header() http.Header {
43859	if c.header_ == nil {
43860		c.header_ = make(http.Header)
43861	}
43862	return c.header_
43863}
43864
43865func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
43866	reqHeaders := make(http.Header)
43867	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
43868	for k, v := range c.header_ {
43869		reqHeaders[k] = v
43870	}
43871	reqHeaders.Set("User-Agent", c.s.userAgent())
43872	if c.ifNoneMatch_ != "" {
43873		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43874	}
43875	var body io.Reader = nil
43876	c.urlParams_.Set("alt", alt)
43877	c.urlParams_.Set("prettyPrint", "false")
43878	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43879	urls += "?" + c.urlParams_.Encode()
43880	req, err := http.NewRequest("GET", urls, body)
43881	if err != nil {
43882		return nil, err
43883	}
43884	req.Header = reqHeaders
43885	googleapi.Expand(req.URL, map[string]string{
43886		"profileId": strconv.FormatInt(c.profileId, 10),
43887		"reportId":  strconv.FormatInt(c.reportId, 10),
43888	})
43889	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43890}
43891
43892// Do executes the "dfareporting.reports.get" call.
43893// Exactly one of *Report or error will be non-nil. Any non-2xx status
43894// code is an error. Response headers are in either
43895// *Report.ServerResponse.Header or (if a response was returned at all)
43896// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
43897// check whether the returned error was because http.StatusNotModified
43898// was returned.
43899func (c *ReportsGetCall) Do(opts ...googleapi.CallOption) (*Report, error) {
43900	gensupport.SetOptions(c.urlParams_, opts...)
43901	res, err := c.doRequest("json")
43902	if res != nil && res.StatusCode == http.StatusNotModified {
43903		if res.Body != nil {
43904			res.Body.Close()
43905		}
43906		return nil, &googleapi.Error{
43907			Code:   res.StatusCode,
43908			Header: res.Header,
43909		}
43910	}
43911	if err != nil {
43912		return nil, err
43913	}
43914	defer googleapi.CloseBody(res)
43915	if err := googleapi.CheckResponse(res); err != nil {
43916		return nil, err
43917	}
43918	ret := &Report{
43919		ServerResponse: googleapi.ServerResponse{
43920			Header:         res.Header,
43921			HTTPStatusCode: res.StatusCode,
43922		},
43923	}
43924	target := &ret
43925	if err := gensupport.DecodeResponse(target, res); err != nil {
43926		return nil, err
43927	}
43928	return ret, nil
43929	// {
43930	//   "description": "Retrieves a report by its ID.",
43931	//   "httpMethod": "GET",
43932	//   "id": "dfareporting.reports.get",
43933	//   "parameterOrder": [
43934	//     "profileId",
43935	//     "reportId"
43936	//   ],
43937	//   "parameters": {
43938	//     "profileId": {
43939	//       "description": "The DFA user profile ID.",
43940	//       "format": "int64",
43941	//       "location": "path",
43942	//       "required": true,
43943	//       "type": "string"
43944	//     },
43945	//     "reportId": {
43946	//       "description": "The ID of the report.",
43947	//       "format": "int64",
43948	//       "location": "path",
43949	//       "required": true,
43950	//       "type": "string"
43951	//     }
43952	//   },
43953	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43954	//   "response": {
43955	//     "$ref": "Report"
43956	//   },
43957	//   "scopes": [
43958	//     "https://www.googleapis.com/auth/dfareporting"
43959	//   ]
43960	// }
43961
43962}
43963
43964// method id "dfareporting.reports.insert":
43965
43966type ReportsInsertCall struct {
43967	s          *Service
43968	profileId  int64
43969	report     *Report
43970	urlParams_ gensupport.URLParams
43971	ctx_       context.Context
43972	header_    http.Header
43973}
43974
43975// Insert: Creates a report.
43976func (r *ReportsService) Insert(profileId int64, report *Report) *ReportsInsertCall {
43977	c := &ReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43978	c.profileId = profileId
43979	c.report = report
43980	return c
43981}
43982
43983// Fields allows partial responses to be retrieved. See
43984// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43985// for more information.
43986func (c *ReportsInsertCall) Fields(s ...googleapi.Field) *ReportsInsertCall {
43987	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43988	return c
43989}
43990
43991// Context sets the context to be used in this call's Do method. Any
43992// pending HTTP request will be aborted if the provided context is
43993// canceled.
43994func (c *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
43995	c.ctx_ = ctx
43996	return c
43997}
43998
43999// Header returns an http.Header that can be modified by the caller to
44000// add HTTP headers to the request.
44001func (c *ReportsInsertCall) Header() http.Header {
44002	if c.header_ == nil {
44003		c.header_ = make(http.Header)
44004	}
44005	return c.header_
44006}
44007
44008func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
44009	reqHeaders := make(http.Header)
44010	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
44011	for k, v := range c.header_ {
44012		reqHeaders[k] = v
44013	}
44014	reqHeaders.Set("User-Agent", c.s.userAgent())
44015	var body io.Reader = nil
44016	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44017	if err != nil {
44018		return nil, err
44019	}
44020	reqHeaders.Set("Content-Type", "application/json")
44021	c.urlParams_.Set("alt", alt)
44022	c.urlParams_.Set("prettyPrint", "false")
44023	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
44024	urls += "?" + c.urlParams_.Encode()
44025	req, err := http.NewRequest("POST", urls, body)
44026	if err != nil {
44027		return nil, err
44028	}
44029	req.Header = reqHeaders
44030	googleapi.Expand(req.URL, map[string]string{
44031		"profileId": strconv.FormatInt(c.profileId, 10),
44032	})
44033	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44034}
44035
44036// Do executes the "dfareporting.reports.insert" call.
44037// Exactly one of *Report or error will be non-nil. Any non-2xx status
44038// code is an error. Response headers are in either
44039// *Report.ServerResponse.Header or (if a response was returned at all)
44040// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44041// check whether the returned error was because http.StatusNotModified
44042// was returned.
44043func (c *ReportsInsertCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44044	gensupport.SetOptions(c.urlParams_, opts...)
44045	res, err := c.doRequest("json")
44046	if res != nil && res.StatusCode == http.StatusNotModified {
44047		if res.Body != nil {
44048			res.Body.Close()
44049		}
44050		return nil, &googleapi.Error{
44051			Code:   res.StatusCode,
44052			Header: res.Header,
44053		}
44054	}
44055	if err != nil {
44056		return nil, err
44057	}
44058	defer googleapi.CloseBody(res)
44059	if err := googleapi.CheckResponse(res); err != nil {
44060		return nil, err
44061	}
44062	ret := &Report{
44063		ServerResponse: googleapi.ServerResponse{
44064			Header:         res.Header,
44065			HTTPStatusCode: res.StatusCode,
44066		},
44067	}
44068	target := &ret
44069	if err := gensupport.DecodeResponse(target, res); err != nil {
44070		return nil, err
44071	}
44072	return ret, nil
44073	// {
44074	//   "description": "Creates a report.",
44075	//   "httpMethod": "POST",
44076	//   "id": "dfareporting.reports.insert",
44077	//   "parameterOrder": [
44078	//     "profileId"
44079	//   ],
44080	//   "parameters": {
44081	//     "profileId": {
44082	//       "description": "The DFA user profile ID.",
44083	//       "format": "int64",
44084	//       "location": "path",
44085	//       "required": true,
44086	//       "type": "string"
44087	//     }
44088	//   },
44089	//   "path": "userprofiles/{profileId}/reports",
44090	//   "request": {
44091	//     "$ref": "Report"
44092	//   },
44093	//   "response": {
44094	//     "$ref": "Report"
44095	//   },
44096	//   "scopes": [
44097	//     "https://www.googleapis.com/auth/dfareporting"
44098	//   ]
44099	// }
44100
44101}
44102
44103// method id "dfareporting.reports.list":
44104
44105type ReportsListCall struct {
44106	s            *Service
44107	profileId    int64
44108	urlParams_   gensupport.URLParams
44109	ifNoneMatch_ string
44110	ctx_         context.Context
44111	header_      http.Header
44112}
44113
44114// List: Retrieves list of reports.
44115func (r *ReportsService) List(profileId int64) *ReportsListCall {
44116	c := &ReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44117	c.profileId = profileId
44118	return c
44119}
44120
44121// MaxResults sets the optional parameter "maxResults": Maximum number
44122// of results to return.
44123func (c *ReportsListCall) MaxResults(maxResults int64) *ReportsListCall {
44124	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
44125	return c
44126}
44127
44128// PageToken sets the optional parameter "pageToken": The value of the
44129// nextToken from the previous result page.
44130func (c *ReportsListCall) PageToken(pageToken string) *ReportsListCall {
44131	c.urlParams_.Set("pageToken", pageToken)
44132	return c
44133}
44134
44135// Scope sets the optional parameter "scope": The scope that defines
44136// which results are returned.
44137//
44138// Possible values:
44139//   "ALL" - All reports in account.
44140//   "MINE" (default) - My reports.
44141func (c *ReportsListCall) Scope(scope string) *ReportsListCall {
44142	c.urlParams_.Set("scope", scope)
44143	return c
44144}
44145
44146// SortField sets the optional parameter "sortField": The field by which
44147// to sort the list.
44148//
44149// Possible values:
44150//   "ID" - Sort by report ID.
44151//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastModifiedTime' field.
44152//   "NAME" - Sort by name of reports.
44153func (c *ReportsListCall) SortField(sortField string) *ReportsListCall {
44154	c.urlParams_.Set("sortField", sortField)
44155	return c
44156}
44157
44158// SortOrder sets the optional parameter "sortOrder": Order of sorted
44159// results.
44160//
44161// Possible values:
44162//   "ASCENDING" - Ascending order.
44163//   "DESCENDING" (default) - Descending order.
44164func (c *ReportsListCall) SortOrder(sortOrder string) *ReportsListCall {
44165	c.urlParams_.Set("sortOrder", sortOrder)
44166	return c
44167}
44168
44169// Fields allows partial responses to be retrieved. See
44170// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44171// for more information.
44172func (c *ReportsListCall) Fields(s ...googleapi.Field) *ReportsListCall {
44173	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44174	return c
44175}
44176
44177// IfNoneMatch sets the optional parameter which makes the operation
44178// fail if the object's ETag matches the given value. This is useful for
44179// getting updates only after the object has changed since the last
44180// request. Use googleapi.IsNotModified to check whether the response
44181// error from Do is the result of In-None-Match.
44182func (c *ReportsListCall) IfNoneMatch(entityTag string) *ReportsListCall {
44183	c.ifNoneMatch_ = entityTag
44184	return c
44185}
44186
44187// Context sets the context to be used in this call's Do method. Any
44188// pending HTTP request will be aborted if the provided context is
44189// canceled.
44190func (c *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
44191	c.ctx_ = ctx
44192	return c
44193}
44194
44195// Header returns an http.Header that can be modified by the caller to
44196// add HTTP headers to the request.
44197func (c *ReportsListCall) Header() http.Header {
44198	if c.header_ == nil {
44199		c.header_ = make(http.Header)
44200	}
44201	return c.header_
44202}
44203
44204func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
44205	reqHeaders := make(http.Header)
44206	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
44207	for k, v := range c.header_ {
44208		reqHeaders[k] = v
44209	}
44210	reqHeaders.Set("User-Agent", c.s.userAgent())
44211	if c.ifNoneMatch_ != "" {
44212		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44213	}
44214	var body io.Reader = nil
44215	c.urlParams_.Set("alt", alt)
44216	c.urlParams_.Set("prettyPrint", "false")
44217	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
44218	urls += "?" + c.urlParams_.Encode()
44219	req, err := http.NewRequest("GET", urls, body)
44220	if err != nil {
44221		return nil, err
44222	}
44223	req.Header = reqHeaders
44224	googleapi.Expand(req.URL, map[string]string{
44225		"profileId": strconv.FormatInt(c.profileId, 10),
44226	})
44227	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44228}
44229
44230// Do executes the "dfareporting.reports.list" call.
44231// Exactly one of *ReportList or error will be non-nil. Any non-2xx
44232// status code is an error. Response headers are in either
44233// *ReportList.ServerResponse.Header or (if a response was returned at
44234// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44235// to check whether the returned error was because
44236// http.StatusNotModified was returned.
44237func (c *ReportsListCall) Do(opts ...googleapi.CallOption) (*ReportList, error) {
44238	gensupport.SetOptions(c.urlParams_, opts...)
44239	res, err := c.doRequest("json")
44240	if res != nil && res.StatusCode == http.StatusNotModified {
44241		if res.Body != nil {
44242			res.Body.Close()
44243		}
44244		return nil, &googleapi.Error{
44245			Code:   res.StatusCode,
44246			Header: res.Header,
44247		}
44248	}
44249	if err != nil {
44250		return nil, err
44251	}
44252	defer googleapi.CloseBody(res)
44253	if err := googleapi.CheckResponse(res); err != nil {
44254		return nil, err
44255	}
44256	ret := &ReportList{
44257		ServerResponse: googleapi.ServerResponse{
44258			Header:         res.Header,
44259			HTTPStatusCode: res.StatusCode,
44260		},
44261	}
44262	target := &ret
44263	if err := gensupport.DecodeResponse(target, res); err != nil {
44264		return nil, err
44265	}
44266	return ret, nil
44267	// {
44268	//   "description": "Retrieves list of reports.",
44269	//   "httpMethod": "GET",
44270	//   "id": "dfareporting.reports.list",
44271	//   "parameterOrder": [
44272	//     "profileId"
44273	//   ],
44274	//   "parameters": {
44275	//     "maxResults": {
44276	//       "default": "10",
44277	//       "description": "Maximum number of results to return.",
44278	//       "format": "int32",
44279	//       "location": "query",
44280	//       "maximum": "10",
44281	//       "minimum": "0",
44282	//       "type": "integer"
44283	//     },
44284	//     "pageToken": {
44285	//       "description": "The value of the nextToken from the previous result page.",
44286	//       "location": "query",
44287	//       "type": "string"
44288	//     },
44289	//     "profileId": {
44290	//       "description": "The DFA user profile ID.",
44291	//       "format": "int64",
44292	//       "location": "path",
44293	//       "required": true,
44294	//       "type": "string"
44295	//     },
44296	//     "scope": {
44297	//       "default": "MINE",
44298	//       "description": "The scope that defines which results are returned.",
44299	//       "enum": [
44300	//         "ALL",
44301	//         "MINE"
44302	//       ],
44303	//       "enumDescriptions": [
44304	//         "All reports in account.",
44305	//         "My reports."
44306	//       ],
44307	//       "location": "query",
44308	//       "type": "string"
44309	//     },
44310	//     "sortField": {
44311	//       "default": "LAST_MODIFIED_TIME",
44312	//       "description": "The field by which to sort the list.",
44313	//       "enum": [
44314	//         "ID",
44315	//         "LAST_MODIFIED_TIME",
44316	//         "NAME"
44317	//       ],
44318	//       "enumDescriptions": [
44319	//         "Sort by report ID.",
44320	//         "Sort by 'lastModifiedTime' field.",
44321	//         "Sort by name of reports."
44322	//       ],
44323	//       "location": "query",
44324	//       "type": "string"
44325	//     },
44326	//     "sortOrder": {
44327	//       "default": "DESCENDING",
44328	//       "description": "Order of sorted results.",
44329	//       "enum": [
44330	//         "ASCENDING",
44331	//         "DESCENDING"
44332	//       ],
44333	//       "enumDescriptions": [
44334	//         "Ascending order.",
44335	//         "Descending order."
44336	//       ],
44337	//       "location": "query",
44338	//       "type": "string"
44339	//     }
44340	//   },
44341	//   "path": "userprofiles/{profileId}/reports",
44342	//   "response": {
44343	//     "$ref": "ReportList"
44344	//   },
44345	//   "scopes": [
44346	//     "https://www.googleapis.com/auth/dfareporting"
44347	//   ]
44348	// }
44349
44350}
44351
44352// Pages invokes f for each page of results.
44353// A non-nil error returned from f will halt the iteration.
44354// The provided context supersedes any context provided to the Context method.
44355func (c *ReportsListCall) Pages(ctx context.Context, f func(*ReportList) error) error {
44356	c.ctx_ = ctx
44357	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
44358	for {
44359		x, err := c.Do()
44360		if err != nil {
44361			return err
44362		}
44363		if err := f(x); err != nil {
44364			return err
44365		}
44366		if x.NextPageToken == "" {
44367			return nil
44368		}
44369		c.PageToken(x.NextPageToken)
44370	}
44371}
44372
44373// method id "dfareporting.reports.patch":
44374
44375type ReportsPatchCall struct {
44376	s          *Service
44377	profileId  int64
44378	reportId   int64
44379	report     *Report
44380	urlParams_ gensupport.URLParams
44381	ctx_       context.Context
44382	header_    http.Header
44383}
44384
44385// Patch: Updates a report. This method supports patch semantics.
44386func (r *ReportsService) Patch(profileId int64, reportId int64, report *Report) *ReportsPatchCall {
44387	c := &ReportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44388	c.profileId = profileId
44389	c.reportId = reportId
44390	c.report = report
44391	return c
44392}
44393
44394// Fields allows partial responses to be retrieved. See
44395// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44396// for more information.
44397func (c *ReportsPatchCall) Fields(s ...googleapi.Field) *ReportsPatchCall {
44398	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44399	return c
44400}
44401
44402// Context sets the context to be used in this call's Do method. Any
44403// pending HTTP request will be aborted if the provided context is
44404// canceled.
44405func (c *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
44406	c.ctx_ = ctx
44407	return c
44408}
44409
44410// Header returns an http.Header that can be modified by the caller to
44411// add HTTP headers to the request.
44412func (c *ReportsPatchCall) Header() http.Header {
44413	if c.header_ == nil {
44414		c.header_ = make(http.Header)
44415	}
44416	return c.header_
44417}
44418
44419func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
44420	reqHeaders := make(http.Header)
44421	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
44422	for k, v := range c.header_ {
44423		reqHeaders[k] = v
44424	}
44425	reqHeaders.Set("User-Agent", c.s.userAgent())
44426	var body io.Reader = nil
44427	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44428	if err != nil {
44429		return nil, err
44430	}
44431	reqHeaders.Set("Content-Type", "application/json")
44432	c.urlParams_.Set("alt", alt)
44433	c.urlParams_.Set("prettyPrint", "false")
44434	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44435	urls += "?" + c.urlParams_.Encode()
44436	req, err := http.NewRequest("PATCH", urls, body)
44437	if err != nil {
44438		return nil, err
44439	}
44440	req.Header = reqHeaders
44441	googleapi.Expand(req.URL, map[string]string{
44442		"profileId": strconv.FormatInt(c.profileId, 10),
44443		"reportId":  strconv.FormatInt(c.reportId, 10),
44444	})
44445	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44446}
44447
44448// Do executes the "dfareporting.reports.patch" call.
44449// Exactly one of *Report or error will be non-nil. Any non-2xx status
44450// code is an error. Response headers are in either
44451// *Report.ServerResponse.Header or (if a response was returned at all)
44452// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44453// check whether the returned error was because http.StatusNotModified
44454// was returned.
44455func (c *ReportsPatchCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44456	gensupport.SetOptions(c.urlParams_, opts...)
44457	res, err := c.doRequest("json")
44458	if res != nil && res.StatusCode == http.StatusNotModified {
44459		if res.Body != nil {
44460			res.Body.Close()
44461		}
44462		return nil, &googleapi.Error{
44463			Code:   res.StatusCode,
44464			Header: res.Header,
44465		}
44466	}
44467	if err != nil {
44468		return nil, err
44469	}
44470	defer googleapi.CloseBody(res)
44471	if err := googleapi.CheckResponse(res); err != nil {
44472		return nil, err
44473	}
44474	ret := &Report{
44475		ServerResponse: googleapi.ServerResponse{
44476			Header:         res.Header,
44477			HTTPStatusCode: res.StatusCode,
44478		},
44479	}
44480	target := &ret
44481	if err := gensupport.DecodeResponse(target, res); err != nil {
44482		return nil, err
44483	}
44484	return ret, nil
44485	// {
44486	//   "description": "Updates a report. This method supports patch semantics.",
44487	//   "httpMethod": "PATCH",
44488	//   "id": "dfareporting.reports.patch",
44489	//   "parameterOrder": [
44490	//     "profileId",
44491	//     "reportId"
44492	//   ],
44493	//   "parameters": {
44494	//     "profileId": {
44495	//       "description": "The DFA user profile ID.",
44496	//       "format": "int64",
44497	//       "location": "path",
44498	//       "required": true,
44499	//       "type": "string"
44500	//     },
44501	//     "reportId": {
44502	//       "description": "The ID of the report.",
44503	//       "format": "int64",
44504	//       "location": "path",
44505	//       "required": true,
44506	//       "type": "string"
44507	//     }
44508	//   },
44509	//   "path": "userprofiles/{profileId}/reports/{reportId}",
44510	//   "request": {
44511	//     "$ref": "Report"
44512	//   },
44513	//   "response": {
44514	//     "$ref": "Report"
44515	//   },
44516	//   "scopes": [
44517	//     "https://www.googleapis.com/auth/dfareporting"
44518	//   ]
44519	// }
44520
44521}
44522
44523// method id "dfareporting.reports.run":
44524
44525type ReportsRunCall struct {
44526	s          *Service
44527	profileId  int64
44528	reportId   int64
44529	urlParams_ gensupport.URLParams
44530	ctx_       context.Context
44531	header_    http.Header
44532}
44533
44534// Run: Runs a report.
44535func (r *ReportsService) Run(profileId int64, reportId int64) *ReportsRunCall {
44536	c := &ReportsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44537	c.profileId = profileId
44538	c.reportId = reportId
44539	return c
44540}
44541
44542// Synchronous sets the optional parameter "synchronous": If set and
44543// true, tries to run the report synchronously.
44544func (c *ReportsRunCall) Synchronous(synchronous bool) *ReportsRunCall {
44545	c.urlParams_.Set("synchronous", fmt.Sprint(synchronous))
44546	return c
44547}
44548
44549// Fields allows partial responses to be retrieved. See
44550// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44551// for more information.
44552func (c *ReportsRunCall) Fields(s ...googleapi.Field) *ReportsRunCall {
44553	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44554	return c
44555}
44556
44557// Context sets the context to be used in this call's Do method. Any
44558// pending HTTP request will be aborted if the provided context is
44559// canceled.
44560func (c *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
44561	c.ctx_ = ctx
44562	return c
44563}
44564
44565// Header returns an http.Header that can be modified by the caller to
44566// add HTTP headers to the request.
44567func (c *ReportsRunCall) Header() http.Header {
44568	if c.header_ == nil {
44569		c.header_ = make(http.Header)
44570	}
44571	return c.header_
44572}
44573
44574func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
44575	reqHeaders := make(http.Header)
44576	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
44577	for k, v := range c.header_ {
44578		reqHeaders[k] = v
44579	}
44580	reqHeaders.Set("User-Agent", c.s.userAgent())
44581	var body io.Reader = nil
44582	c.urlParams_.Set("alt", alt)
44583	c.urlParams_.Set("prettyPrint", "false")
44584	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/run")
44585	urls += "?" + c.urlParams_.Encode()
44586	req, err := http.NewRequest("POST", urls, body)
44587	if err != nil {
44588		return nil, err
44589	}
44590	req.Header = reqHeaders
44591	googleapi.Expand(req.URL, map[string]string{
44592		"profileId": strconv.FormatInt(c.profileId, 10),
44593		"reportId":  strconv.FormatInt(c.reportId, 10),
44594	})
44595	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44596}
44597
44598// Do executes the "dfareporting.reports.run" call.
44599// Exactly one of *File or error will be non-nil. Any non-2xx status
44600// code is an error. Response headers are in either
44601// *File.ServerResponse.Header or (if a response was returned at all) in
44602// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44603// whether the returned error was because http.StatusNotModified was
44604// returned.
44605func (c *ReportsRunCall) Do(opts ...googleapi.CallOption) (*File, error) {
44606	gensupport.SetOptions(c.urlParams_, opts...)
44607	res, err := c.doRequest("json")
44608	if res != nil && res.StatusCode == http.StatusNotModified {
44609		if res.Body != nil {
44610			res.Body.Close()
44611		}
44612		return nil, &googleapi.Error{
44613			Code:   res.StatusCode,
44614			Header: res.Header,
44615		}
44616	}
44617	if err != nil {
44618		return nil, err
44619	}
44620	defer googleapi.CloseBody(res)
44621	if err := googleapi.CheckResponse(res); err != nil {
44622		return nil, err
44623	}
44624	ret := &File{
44625		ServerResponse: googleapi.ServerResponse{
44626			Header:         res.Header,
44627			HTTPStatusCode: res.StatusCode,
44628		},
44629	}
44630	target := &ret
44631	if err := gensupport.DecodeResponse(target, res); err != nil {
44632		return nil, err
44633	}
44634	return ret, nil
44635	// {
44636	//   "description": "Runs a report.",
44637	//   "httpMethod": "POST",
44638	//   "id": "dfareporting.reports.run",
44639	//   "parameterOrder": [
44640	//     "profileId",
44641	//     "reportId"
44642	//   ],
44643	//   "parameters": {
44644	//     "profileId": {
44645	//       "description": "The DFA profile ID.",
44646	//       "format": "int64",
44647	//       "location": "path",
44648	//       "required": true,
44649	//       "type": "string"
44650	//     },
44651	//     "reportId": {
44652	//       "description": "The ID of the report.",
44653	//       "format": "int64",
44654	//       "location": "path",
44655	//       "required": true,
44656	//       "type": "string"
44657	//     },
44658	//     "synchronous": {
44659	//       "default": "false",
44660	//       "description": "If set and true, tries to run the report synchronously.",
44661	//       "location": "query",
44662	//       "type": "boolean"
44663	//     }
44664	//   },
44665	//   "path": "userprofiles/{profileId}/reports/{reportId}/run",
44666	//   "response": {
44667	//     "$ref": "File"
44668	//   },
44669	//   "scopes": [
44670	//     "https://www.googleapis.com/auth/dfareporting"
44671	//   ]
44672	// }
44673
44674}
44675
44676// method id "dfareporting.reports.update":
44677
44678type ReportsUpdateCall struct {
44679	s          *Service
44680	profileId  int64
44681	reportId   int64
44682	report     *Report
44683	urlParams_ gensupport.URLParams
44684	ctx_       context.Context
44685	header_    http.Header
44686}
44687
44688// Update: Updates a report.
44689func (r *ReportsService) Update(profileId int64, reportId int64, report *Report) *ReportsUpdateCall {
44690	c := &ReportsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44691	c.profileId = profileId
44692	c.reportId = reportId
44693	c.report = report
44694	return c
44695}
44696
44697// Fields allows partial responses to be retrieved. See
44698// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44699// for more information.
44700func (c *ReportsUpdateCall) Fields(s ...googleapi.Field) *ReportsUpdateCall {
44701	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44702	return c
44703}
44704
44705// Context sets the context to be used in this call's Do method. Any
44706// pending HTTP request will be aborted if the provided context is
44707// canceled.
44708func (c *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
44709	c.ctx_ = ctx
44710	return c
44711}
44712
44713// Header returns an http.Header that can be modified by the caller to
44714// add HTTP headers to the request.
44715func (c *ReportsUpdateCall) Header() http.Header {
44716	if c.header_ == nil {
44717		c.header_ = make(http.Header)
44718	}
44719	return c.header_
44720}
44721
44722func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
44723	reqHeaders := make(http.Header)
44724	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
44725	for k, v := range c.header_ {
44726		reqHeaders[k] = v
44727	}
44728	reqHeaders.Set("User-Agent", c.s.userAgent())
44729	var body io.Reader = nil
44730	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44731	if err != nil {
44732		return nil, err
44733	}
44734	reqHeaders.Set("Content-Type", "application/json")
44735	c.urlParams_.Set("alt", alt)
44736	c.urlParams_.Set("prettyPrint", "false")
44737	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44738	urls += "?" + c.urlParams_.Encode()
44739	req, err := http.NewRequest("PUT", urls, body)
44740	if err != nil {
44741		return nil, err
44742	}
44743	req.Header = reqHeaders
44744	googleapi.Expand(req.URL, map[string]string{
44745		"profileId": strconv.FormatInt(c.profileId, 10),
44746		"reportId":  strconv.FormatInt(c.reportId, 10),
44747	})
44748	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44749}
44750
44751// Do executes the "dfareporting.reports.update" call.
44752// Exactly one of *Report or error will be non-nil. Any non-2xx status
44753// code is an error. Response headers are in either
44754// *Report.ServerResponse.Header or (if a response was returned at all)
44755// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44756// check whether the returned error was because http.StatusNotModified
44757// was returned.
44758func (c *ReportsUpdateCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44759	gensupport.SetOptions(c.urlParams_, opts...)
44760	res, err := c.doRequest("json")
44761	if res != nil && res.StatusCode == http.StatusNotModified {
44762		if res.Body != nil {
44763			res.Body.Close()
44764		}
44765		return nil, &googleapi.Error{
44766			Code:   res.StatusCode,
44767			Header: res.Header,
44768		}
44769	}
44770	if err != nil {
44771		return nil, err
44772	}
44773	defer googleapi.CloseBody(res)
44774	if err := googleapi.CheckResponse(res); err != nil {
44775		return nil, err
44776	}
44777	ret := &Report{
44778		ServerResponse: googleapi.ServerResponse{
44779			Header:         res.Header,
44780			HTTPStatusCode: res.StatusCode,
44781		},
44782	}
44783	target := &ret
44784	if err := gensupport.DecodeResponse(target, res); err != nil {
44785		return nil, err
44786	}
44787	return ret, nil
44788	// {
44789	//   "description": "Updates a report.",
44790	//   "httpMethod": "PUT",
44791	//   "id": "dfareporting.reports.update",
44792	//   "parameterOrder": [
44793	//     "profileId",
44794	//     "reportId"
44795	//   ],
44796	//   "parameters": {
44797	//     "profileId": {
44798	//       "description": "The DFA user profile ID.",
44799	//       "format": "int64",
44800	//       "location": "path",
44801	//       "required": true,
44802	//       "type": "string"
44803	//     },
44804	//     "reportId": {
44805	//       "description": "The ID of the report.",
44806	//       "format": "int64",
44807	//       "location": "path",
44808	//       "required": true,
44809	//       "type": "string"
44810	//     }
44811	//   },
44812	//   "path": "userprofiles/{profileId}/reports/{reportId}",
44813	//   "request": {
44814	//     "$ref": "Report"
44815	//   },
44816	//   "response": {
44817	//     "$ref": "Report"
44818	//   },
44819	//   "scopes": [
44820	//     "https://www.googleapis.com/auth/dfareporting"
44821	//   ]
44822	// }
44823
44824}
44825
44826// method id "dfareporting.reports.compatibleFields.query":
44827
44828type ReportsCompatibleFieldsQueryCall struct {
44829	s          *Service
44830	profileId  int64
44831	report     *Report
44832	urlParams_ gensupport.URLParams
44833	ctx_       context.Context
44834	header_    http.Header
44835}
44836
44837// Query: Returns the fields that are compatible to be selected in the
44838// respective sections of a report criteria, given the fields already
44839// selected in the input report and user permissions.
44840func (r *ReportsCompatibleFieldsService) Query(profileId int64, report *Report) *ReportsCompatibleFieldsQueryCall {
44841	c := &ReportsCompatibleFieldsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44842	c.profileId = profileId
44843	c.report = report
44844	return c
44845}
44846
44847// Fields allows partial responses to be retrieved. See
44848// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44849// for more information.
44850func (c *ReportsCompatibleFieldsQueryCall) Fields(s ...googleapi.Field) *ReportsCompatibleFieldsQueryCall {
44851	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44852	return c
44853}
44854
44855// Context sets the context to be used in this call's Do method. Any
44856// pending HTTP request will be aborted if the provided context is
44857// canceled.
44858func (c *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
44859	c.ctx_ = ctx
44860	return c
44861}
44862
44863// Header returns an http.Header that can be modified by the caller to
44864// add HTTP headers to the request.
44865func (c *ReportsCompatibleFieldsQueryCall) Header() http.Header {
44866	if c.header_ == nil {
44867		c.header_ = make(http.Header)
44868	}
44869	return c.header_
44870}
44871
44872func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
44873	reqHeaders := make(http.Header)
44874	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
44875	for k, v := range c.header_ {
44876		reqHeaders[k] = v
44877	}
44878	reqHeaders.Set("User-Agent", c.s.userAgent())
44879	var body io.Reader = nil
44880	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44881	if err != nil {
44882		return nil, err
44883	}
44884	reqHeaders.Set("Content-Type", "application/json")
44885	c.urlParams_.Set("alt", alt)
44886	c.urlParams_.Set("prettyPrint", "false")
44887	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/compatiblefields/query")
44888	urls += "?" + c.urlParams_.Encode()
44889	req, err := http.NewRequest("POST", urls, body)
44890	if err != nil {
44891		return nil, err
44892	}
44893	req.Header = reqHeaders
44894	googleapi.Expand(req.URL, map[string]string{
44895		"profileId": strconv.FormatInt(c.profileId, 10),
44896	})
44897	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44898}
44899
44900// Do executes the "dfareporting.reports.compatibleFields.query" call.
44901// Exactly one of *CompatibleFields or error will be non-nil. Any
44902// non-2xx status code is an error. Response headers are in either
44903// *CompatibleFields.ServerResponse.Header or (if a response was
44904// returned at all) in error.(*googleapi.Error).Header. Use
44905// googleapi.IsNotModified to check whether the returned error was
44906// because http.StatusNotModified was returned.
44907func (c *ReportsCompatibleFieldsQueryCall) Do(opts ...googleapi.CallOption) (*CompatibleFields, error) {
44908	gensupport.SetOptions(c.urlParams_, opts...)
44909	res, err := c.doRequest("json")
44910	if res != nil && res.StatusCode == http.StatusNotModified {
44911		if res.Body != nil {
44912			res.Body.Close()
44913		}
44914		return nil, &googleapi.Error{
44915			Code:   res.StatusCode,
44916			Header: res.Header,
44917		}
44918	}
44919	if err != nil {
44920		return nil, err
44921	}
44922	defer googleapi.CloseBody(res)
44923	if err := googleapi.CheckResponse(res); err != nil {
44924		return nil, err
44925	}
44926	ret := &CompatibleFields{
44927		ServerResponse: googleapi.ServerResponse{
44928			Header:         res.Header,
44929			HTTPStatusCode: res.StatusCode,
44930		},
44931	}
44932	target := &ret
44933	if err := gensupport.DecodeResponse(target, res); err != nil {
44934		return nil, err
44935	}
44936	return ret, nil
44937	// {
44938	//   "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.",
44939	//   "httpMethod": "POST",
44940	//   "id": "dfareporting.reports.compatibleFields.query",
44941	//   "parameterOrder": [
44942	//     "profileId"
44943	//   ],
44944	//   "parameters": {
44945	//     "profileId": {
44946	//       "description": "The DFA user profile ID.",
44947	//       "format": "int64",
44948	//       "location": "path",
44949	//       "required": true,
44950	//       "type": "string"
44951	//     }
44952	//   },
44953	//   "path": "userprofiles/{profileId}/reports/compatiblefields/query",
44954	//   "request": {
44955	//     "$ref": "Report"
44956	//   },
44957	//   "response": {
44958	//     "$ref": "CompatibleFields"
44959	//   },
44960	//   "scopes": [
44961	//     "https://www.googleapis.com/auth/dfareporting"
44962	//   ]
44963	// }
44964
44965}
44966
44967// method id "dfareporting.reports.files.get":
44968
44969type ReportsFilesGetCall struct {
44970	s            *Service
44971	profileId    int64
44972	reportId     int64
44973	fileId       int64
44974	urlParams_   gensupport.URLParams
44975	ifNoneMatch_ string
44976	ctx_         context.Context
44977	header_      http.Header
44978}
44979
44980// Get: Retrieves a report file. This method supports media download.
44981func (r *ReportsFilesService) Get(profileId int64, reportId int64, fileId int64) *ReportsFilesGetCall {
44982	c := &ReportsFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44983	c.profileId = profileId
44984	c.reportId = reportId
44985	c.fileId = fileId
44986	return c
44987}
44988
44989// Fields allows partial responses to be retrieved. See
44990// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44991// for more information.
44992func (c *ReportsFilesGetCall) Fields(s ...googleapi.Field) *ReportsFilesGetCall {
44993	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44994	return c
44995}
44996
44997// IfNoneMatch sets the optional parameter which makes the operation
44998// fail if the object's ETag matches the given value. This is useful for
44999// getting updates only after the object has changed since the last
45000// request. Use googleapi.IsNotModified to check whether the response
45001// error from Do is the result of In-None-Match.
45002func (c *ReportsFilesGetCall) IfNoneMatch(entityTag string) *ReportsFilesGetCall {
45003	c.ifNoneMatch_ = entityTag
45004	return c
45005}
45006
45007// Context sets the context to be used in this call's Do and Download
45008// methods. Any pending HTTP request will be aborted if the provided
45009// context is canceled.
45010func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
45011	c.ctx_ = ctx
45012	return c
45013}
45014
45015// Header returns an http.Header that can be modified by the caller to
45016// add HTTP headers to the request.
45017func (c *ReportsFilesGetCall) Header() http.Header {
45018	if c.header_ == nil {
45019		c.header_ = make(http.Header)
45020	}
45021	return c.header_
45022}
45023
45024func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
45025	reqHeaders := make(http.Header)
45026	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
45027	for k, v := range c.header_ {
45028		reqHeaders[k] = v
45029	}
45030	reqHeaders.Set("User-Agent", c.s.userAgent())
45031	if c.ifNoneMatch_ != "" {
45032		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45033	}
45034	var body io.Reader = nil
45035	c.urlParams_.Set("alt", alt)
45036	c.urlParams_.Set("prettyPrint", "false")
45037	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files/{fileId}")
45038	urls += "?" + c.urlParams_.Encode()
45039	req, err := http.NewRequest("GET", urls, body)
45040	if err != nil {
45041		return nil, err
45042	}
45043	req.Header = reqHeaders
45044	googleapi.Expand(req.URL, map[string]string{
45045		"profileId": strconv.FormatInt(c.profileId, 10),
45046		"reportId":  strconv.FormatInt(c.reportId, 10),
45047		"fileId":    strconv.FormatInt(c.fileId, 10),
45048	})
45049	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45050}
45051
45052// Download fetches the API endpoint's "media" value, instead of the normal
45053// API response value. If the returned error is nil, the Response is guaranteed to
45054// have a 2xx status code. Callers must close the Response.Body as usual.
45055func (c *ReportsFilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
45056	gensupport.SetOptions(c.urlParams_, opts...)
45057	res, err := c.doRequest("media")
45058	if err != nil {
45059		return nil, err
45060	}
45061	if err := googleapi.CheckMediaResponse(res); err != nil {
45062		res.Body.Close()
45063		return nil, err
45064	}
45065	return res, nil
45066}
45067
45068// Do executes the "dfareporting.reports.files.get" call.
45069// Exactly one of *File or error will be non-nil. Any non-2xx status
45070// code is an error. Response headers are in either
45071// *File.ServerResponse.Header or (if a response was returned at all) in
45072// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45073// whether the returned error was because http.StatusNotModified was
45074// returned.
45075func (c *ReportsFilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
45076	gensupport.SetOptions(c.urlParams_, opts...)
45077	res, err := c.doRequest("json")
45078	if res != nil && res.StatusCode == http.StatusNotModified {
45079		if res.Body != nil {
45080			res.Body.Close()
45081		}
45082		return nil, &googleapi.Error{
45083			Code:   res.StatusCode,
45084			Header: res.Header,
45085		}
45086	}
45087	if err != nil {
45088		return nil, err
45089	}
45090	defer googleapi.CloseBody(res)
45091	if err := googleapi.CheckResponse(res); err != nil {
45092		return nil, err
45093	}
45094	ret := &File{
45095		ServerResponse: googleapi.ServerResponse{
45096			Header:         res.Header,
45097			HTTPStatusCode: res.StatusCode,
45098		},
45099	}
45100	target := &ret
45101	if err := gensupport.DecodeResponse(target, res); err != nil {
45102		return nil, err
45103	}
45104	return ret, nil
45105	// {
45106	//   "description": "Retrieves a report file. This method supports media download.",
45107	//   "httpMethod": "GET",
45108	//   "id": "dfareporting.reports.files.get",
45109	//   "parameterOrder": [
45110	//     "profileId",
45111	//     "reportId",
45112	//     "fileId"
45113	//   ],
45114	//   "parameters": {
45115	//     "fileId": {
45116	//       "description": "The ID of the report file.",
45117	//       "format": "int64",
45118	//       "location": "path",
45119	//       "required": true,
45120	//       "type": "string"
45121	//     },
45122	//     "profileId": {
45123	//       "description": "The DFA profile ID.",
45124	//       "format": "int64",
45125	//       "location": "path",
45126	//       "required": true,
45127	//       "type": "string"
45128	//     },
45129	//     "reportId": {
45130	//       "description": "The ID of the report.",
45131	//       "format": "int64",
45132	//       "location": "path",
45133	//       "required": true,
45134	//       "type": "string"
45135	//     }
45136	//   },
45137	//   "path": "userprofiles/{profileId}/reports/{reportId}/files/{fileId}",
45138	//   "response": {
45139	//     "$ref": "File"
45140	//   },
45141	//   "scopes": [
45142	//     "https://www.googleapis.com/auth/dfareporting"
45143	//   ],
45144	//   "supportsMediaDownload": true
45145	// }
45146
45147}
45148
45149// method id "dfareporting.reports.files.list":
45150
45151type ReportsFilesListCall struct {
45152	s            *Service
45153	profileId    int64
45154	reportId     int64
45155	urlParams_   gensupport.URLParams
45156	ifNoneMatch_ string
45157	ctx_         context.Context
45158	header_      http.Header
45159}
45160
45161// List: Lists files for a report.
45162func (r *ReportsFilesService) List(profileId int64, reportId int64) *ReportsFilesListCall {
45163	c := &ReportsFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45164	c.profileId = profileId
45165	c.reportId = reportId
45166	return c
45167}
45168
45169// MaxResults sets the optional parameter "maxResults": Maximum number
45170// of results to return.
45171func (c *ReportsFilesListCall) MaxResults(maxResults int64) *ReportsFilesListCall {
45172	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45173	return c
45174}
45175
45176// PageToken sets the optional parameter "pageToken": The value of the
45177// nextToken from the previous result page.
45178func (c *ReportsFilesListCall) PageToken(pageToken string) *ReportsFilesListCall {
45179	c.urlParams_.Set("pageToken", pageToken)
45180	return c
45181}
45182
45183// SortField sets the optional parameter "sortField": The field by which
45184// to sort the list.
45185//
45186// Possible values:
45187//   "ID" - Sort by file ID.
45188//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
45189func (c *ReportsFilesListCall) SortField(sortField string) *ReportsFilesListCall {
45190	c.urlParams_.Set("sortField", sortField)
45191	return c
45192}
45193
45194// SortOrder sets the optional parameter "sortOrder": Order of sorted
45195// results.
45196//
45197// Possible values:
45198//   "ASCENDING" - Ascending order.
45199//   "DESCENDING" (default) - Descending order.
45200func (c *ReportsFilesListCall) SortOrder(sortOrder string) *ReportsFilesListCall {
45201	c.urlParams_.Set("sortOrder", sortOrder)
45202	return c
45203}
45204
45205// Fields allows partial responses to be retrieved. See
45206// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45207// for more information.
45208func (c *ReportsFilesListCall) Fields(s ...googleapi.Field) *ReportsFilesListCall {
45209	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45210	return c
45211}
45212
45213// IfNoneMatch sets the optional parameter which makes the operation
45214// fail if the object's ETag matches the given value. This is useful for
45215// getting updates only after the object has changed since the last
45216// request. Use googleapi.IsNotModified to check whether the response
45217// error from Do is the result of In-None-Match.
45218func (c *ReportsFilesListCall) IfNoneMatch(entityTag string) *ReportsFilesListCall {
45219	c.ifNoneMatch_ = entityTag
45220	return c
45221}
45222
45223// Context sets the context to be used in this call's Do method. Any
45224// pending HTTP request will be aborted if the provided context is
45225// canceled.
45226func (c *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
45227	c.ctx_ = ctx
45228	return c
45229}
45230
45231// Header returns an http.Header that can be modified by the caller to
45232// add HTTP headers to the request.
45233func (c *ReportsFilesListCall) Header() http.Header {
45234	if c.header_ == nil {
45235		c.header_ = make(http.Header)
45236	}
45237	return c.header_
45238}
45239
45240func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
45241	reqHeaders := make(http.Header)
45242	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
45243	for k, v := range c.header_ {
45244		reqHeaders[k] = v
45245	}
45246	reqHeaders.Set("User-Agent", c.s.userAgent())
45247	if c.ifNoneMatch_ != "" {
45248		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45249	}
45250	var body io.Reader = nil
45251	c.urlParams_.Set("alt", alt)
45252	c.urlParams_.Set("prettyPrint", "false")
45253	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files")
45254	urls += "?" + c.urlParams_.Encode()
45255	req, err := http.NewRequest("GET", urls, body)
45256	if err != nil {
45257		return nil, err
45258	}
45259	req.Header = reqHeaders
45260	googleapi.Expand(req.URL, map[string]string{
45261		"profileId": strconv.FormatInt(c.profileId, 10),
45262		"reportId":  strconv.FormatInt(c.reportId, 10),
45263	})
45264	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45265}
45266
45267// Do executes the "dfareporting.reports.files.list" call.
45268// Exactly one of *FileList or error will be non-nil. Any non-2xx status
45269// code is an error. Response headers are in either
45270// *FileList.ServerResponse.Header or (if a response was returned at
45271// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
45272// to check whether the returned error was because
45273// http.StatusNotModified was returned.
45274func (c *ReportsFilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
45275	gensupport.SetOptions(c.urlParams_, opts...)
45276	res, err := c.doRequest("json")
45277	if res != nil && res.StatusCode == http.StatusNotModified {
45278		if res.Body != nil {
45279			res.Body.Close()
45280		}
45281		return nil, &googleapi.Error{
45282			Code:   res.StatusCode,
45283			Header: res.Header,
45284		}
45285	}
45286	if err != nil {
45287		return nil, err
45288	}
45289	defer googleapi.CloseBody(res)
45290	if err := googleapi.CheckResponse(res); err != nil {
45291		return nil, err
45292	}
45293	ret := &FileList{
45294		ServerResponse: googleapi.ServerResponse{
45295			Header:         res.Header,
45296			HTTPStatusCode: res.StatusCode,
45297		},
45298	}
45299	target := &ret
45300	if err := gensupport.DecodeResponse(target, res); err != nil {
45301		return nil, err
45302	}
45303	return ret, nil
45304	// {
45305	//   "description": "Lists files for a report.",
45306	//   "httpMethod": "GET",
45307	//   "id": "dfareporting.reports.files.list",
45308	//   "parameterOrder": [
45309	//     "profileId",
45310	//     "reportId"
45311	//   ],
45312	//   "parameters": {
45313	//     "maxResults": {
45314	//       "default": "10",
45315	//       "description": "Maximum number of results to return.",
45316	//       "format": "int32",
45317	//       "location": "query",
45318	//       "maximum": "10",
45319	//       "minimum": "0",
45320	//       "type": "integer"
45321	//     },
45322	//     "pageToken": {
45323	//       "description": "The value of the nextToken from the previous result page.",
45324	//       "location": "query",
45325	//       "type": "string"
45326	//     },
45327	//     "profileId": {
45328	//       "description": "The DFA profile ID.",
45329	//       "format": "int64",
45330	//       "location": "path",
45331	//       "required": true,
45332	//       "type": "string"
45333	//     },
45334	//     "reportId": {
45335	//       "description": "The ID of the parent report.",
45336	//       "format": "int64",
45337	//       "location": "path",
45338	//       "required": true,
45339	//       "type": "string"
45340	//     },
45341	//     "sortField": {
45342	//       "default": "LAST_MODIFIED_TIME",
45343	//       "description": "The field by which to sort the list.",
45344	//       "enum": [
45345	//         "ID",
45346	//         "LAST_MODIFIED_TIME"
45347	//       ],
45348	//       "enumDescriptions": [
45349	//         "Sort by file ID.",
45350	//         "Sort by 'lastmodifiedAt' field."
45351	//       ],
45352	//       "location": "query",
45353	//       "type": "string"
45354	//     },
45355	//     "sortOrder": {
45356	//       "default": "DESCENDING",
45357	//       "description": "Order of sorted results.",
45358	//       "enum": [
45359	//         "ASCENDING",
45360	//         "DESCENDING"
45361	//       ],
45362	//       "enumDescriptions": [
45363	//         "Ascending order.",
45364	//         "Descending order."
45365	//       ],
45366	//       "location": "query",
45367	//       "type": "string"
45368	//     }
45369	//   },
45370	//   "path": "userprofiles/{profileId}/reports/{reportId}/files",
45371	//   "response": {
45372	//     "$ref": "FileList"
45373	//   },
45374	//   "scopes": [
45375	//     "https://www.googleapis.com/auth/dfareporting"
45376	//   ]
45377	// }
45378
45379}
45380
45381// Pages invokes f for each page of results.
45382// A non-nil error returned from f will halt the iteration.
45383// The provided context supersedes any context provided to the Context method.
45384func (c *ReportsFilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
45385	c.ctx_ = ctx
45386	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45387	for {
45388		x, err := c.Do()
45389		if err != nil {
45390			return err
45391		}
45392		if err := f(x); err != nil {
45393			return err
45394		}
45395		if x.NextPageToken == "" {
45396			return nil
45397		}
45398		c.PageToken(x.NextPageToken)
45399	}
45400}
45401
45402// method id "dfareporting.sites.get":
45403
45404type SitesGetCall struct {
45405	s            *Service
45406	profileId    int64
45407	id           int64
45408	urlParams_   gensupport.URLParams
45409	ifNoneMatch_ string
45410	ctx_         context.Context
45411	header_      http.Header
45412}
45413
45414// Get: Gets one site by ID.
45415func (r *SitesService) Get(profileId int64, id int64) *SitesGetCall {
45416	c := &SitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45417	c.profileId = profileId
45418	c.id = id
45419	return c
45420}
45421
45422// Fields allows partial responses to be retrieved. See
45423// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45424// for more information.
45425func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall {
45426	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45427	return c
45428}
45429
45430// IfNoneMatch sets the optional parameter which makes the operation
45431// fail if the object's ETag matches the given value. This is useful for
45432// getting updates only after the object has changed since the last
45433// request. Use googleapi.IsNotModified to check whether the response
45434// error from Do is the result of In-None-Match.
45435func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall {
45436	c.ifNoneMatch_ = entityTag
45437	return c
45438}
45439
45440// Context sets the context to be used in this call's Do method. Any
45441// pending HTTP request will be aborted if the provided context is
45442// canceled.
45443func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
45444	c.ctx_ = ctx
45445	return c
45446}
45447
45448// Header returns an http.Header that can be modified by the caller to
45449// add HTTP headers to the request.
45450func (c *SitesGetCall) Header() http.Header {
45451	if c.header_ == nil {
45452		c.header_ = make(http.Header)
45453	}
45454	return c.header_
45455}
45456
45457func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
45458	reqHeaders := make(http.Header)
45459	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
45460	for k, v := range c.header_ {
45461		reqHeaders[k] = v
45462	}
45463	reqHeaders.Set("User-Agent", c.s.userAgent())
45464	if c.ifNoneMatch_ != "" {
45465		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45466	}
45467	var body io.Reader = nil
45468	c.urlParams_.Set("alt", alt)
45469	c.urlParams_.Set("prettyPrint", "false")
45470	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites/{id}")
45471	urls += "?" + c.urlParams_.Encode()
45472	req, err := http.NewRequest("GET", urls, body)
45473	if err != nil {
45474		return nil, err
45475	}
45476	req.Header = reqHeaders
45477	googleapi.Expand(req.URL, map[string]string{
45478		"profileId": strconv.FormatInt(c.profileId, 10),
45479		"id":        strconv.FormatInt(c.id, 10),
45480	})
45481	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45482}
45483
45484// Do executes the "dfareporting.sites.get" call.
45485// Exactly one of *Site or error will be non-nil. Any non-2xx status
45486// code is an error. Response headers are in either
45487// *Site.ServerResponse.Header or (if a response was returned at all) in
45488// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45489// whether the returned error was because http.StatusNotModified was
45490// returned.
45491func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45492	gensupport.SetOptions(c.urlParams_, opts...)
45493	res, err := c.doRequest("json")
45494	if res != nil && res.StatusCode == http.StatusNotModified {
45495		if res.Body != nil {
45496			res.Body.Close()
45497		}
45498		return nil, &googleapi.Error{
45499			Code:   res.StatusCode,
45500			Header: res.Header,
45501		}
45502	}
45503	if err != nil {
45504		return nil, err
45505	}
45506	defer googleapi.CloseBody(res)
45507	if err := googleapi.CheckResponse(res); err != nil {
45508		return nil, err
45509	}
45510	ret := &Site{
45511		ServerResponse: googleapi.ServerResponse{
45512			Header:         res.Header,
45513			HTTPStatusCode: res.StatusCode,
45514		},
45515	}
45516	target := &ret
45517	if err := gensupport.DecodeResponse(target, res); err != nil {
45518		return nil, err
45519	}
45520	return ret, nil
45521	// {
45522	//   "description": "Gets one site by ID.",
45523	//   "httpMethod": "GET",
45524	//   "id": "dfareporting.sites.get",
45525	//   "parameterOrder": [
45526	//     "profileId",
45527	//     "id"
45528	//   ],
45529	//   "parameters": {
45530	//     "id": {
45531	//       "description": "Site ID.",
45532	//       "format": "int64",
45533	//       "location": "path",
45534	//       "required": true,
45535	//       "type": "string"
45536	//     },
45537	//     "profileId": {
45538	//       "description": "User profile ID associated with this request.",
45539	//       "format": "int64",
45540	//       "location": "path",
45541	//       "required": true,
45542	//       "type": "string"
45543	//     }
45544	//   },
45545	//   "path": "userprofiles/{profileId}/sites/{id}",
45546	//   "response": {
45547	//     "$ref": "Site"
45548	//   },
45549	//   "scopes": [
45550	//     "https://www.googleapis.com/auth/dfatrafficking"
45551	//   ]
45552	// }
45553
45554}
45555
45556// method id "dfareporting.sites.insert":
45557
45558type SitesInsertCall struct {
45559	s          *Service
45560	profileId  int64
45561	site       *Site
45562	urlParams_ gensupport.URLParams
45563	ctx_       context.Context
45564	header_    http.Header
45565}
45566
45567// Insert: Inserts a new site.
45568func (r *SitesService) Insert(profileId int64, site *Site) *SitesInsertCall {
45569	c := &SitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45570	c.profileId = profileId
45571	c.site = site
45572	return c
45573}
45574
45575// Fields allows partial responses to be retrieved. See
45576// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45577// for more information.
45578func (c *SitesInsertCall) Fields(s ...googleapi.Field) *SitesInsertCall {
45579	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45580	return c
45581}
45582
45583// Context sets the context to be used in this call's Do method. Any
45584// pending HTTP request will be aborted if the provided context is
45585// canceled.
45586func (c *SitesInsertCall) Context(ctx context.Context) *SitesInsertCall {
45587	c.ctx_ = ctx
45588	return c
45589}
45590
45591// Header returns an http.Header that can be modified by the caller to
45592// add HTTP headers to the request.
45593func (c *SitesInsertCall) Header() http.Header {
45594	if c.header_ == nil {
45595		c.header_ = make(http.Header)
45596	}
45597	return c.header_
45598}
45599
45600func (c *SitesInsertCall) doRequest(alt string) (*http.Response, error) {
45601	reqHeaders := make(http.Header)
45602	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
45603	for k, v := range c.header_ {
45604		reqHeaders[k] = v
45605	}
45606	reqHeaders.Set("User-Agent", c.s.userAgent())
45607	var body io.Reader = nil
45608	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
45609	if err != nil {
45610		return nil, err
45611	}
45612	reqHeaders.Set("Content-Type", "application/json")
45613	c.urlParams_.Set("alt", alt)
45614	c.urlParams_.Set("prettyPrint", "false")
45615	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45616	urls += "?" + c.urlParams_.Encode()
45617	req, err := http.NewRequest("POST", urls, body)
45618	if err != nil {
45619		return nil, err
45620	}
45621	req.Header = reqHeaders
45622	googleapi.Expand(req.URL, map[string]string{
45623		"profileId": strconv.FormatInt(c.profileId, 10),
45624	})
45625	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45626}
45627
45628// Do executes the "dfareporting.sites.insert" call.
45629// Exactly one of *Site or error will be non-nil. Any non-2xx status
45630// code is an error. Response headers are in either
45631// *Site.ServerResponse.Header or (if a response was returned at all) in
45632// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45633// whether the returned error was because http.StatusNotModified was
45634// returned.
45635func (c *SitesInsertCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45636	gensupport.SetOptions(c.urlParams_, opts...)
45637	res, err := c.doRequest("json")
45638	if res != nil && res.StatusCode == http.StatusNotModified {
45639		if res.Body != nil {
45640			res.Body.Close()
45641		}
45642		return nil, &googleapi.Error{
45643			Code:   res.StatusCode,
45644			Header: res.Header,
45645		}
45646	}
45647	if err != nil {
45648		return nil, err
45649	}
45650	defer googleapi.CloseBody(res)
45651	if err := googleapi.CheckResponse(res); err != nil {
45652		return nil, err
45653	}
45654	ret := &Site{
45655		ServerResponse: googleapi.ServerResponse{
45656			Header:         res.Header,
45657			HTTPStatusCode: res.StatusCode,
45658		},
45659	}
45660	target := &ret
45661	if err := gensupport.DecodeResponse(target, res); err != nil {
45662		return nil, err
45663	}
45664	return ret, nil
45665	// {
45666	//   "description": "Inserts a new site.",
45667	//   "httpMethod": "POST",
45668	//   "id": "dfareporting.sites.insert",
45669	//   "parameterOrder": [
45670	//     "profileId"
45671	//   ],
45672	//   "parameters": {
45673	//     "profileId": {
45674	//       "description": "User profile ID associated with this request.",
45675	//       "format": "int64",
45676	//       "location": "path",
45677	//       "required": true,
45678	//       "type": "string"
45679	//     }
45680	//   },
45681	//   "path": "userprofiles/{profileId}/sites",
45682	//   "request": {
45683	//     "$ref": "Site"
45684	//   },
45685	//   "response": {
45686	//     "$ref": "Site"
45687	//   },
45688	//   "scopes": [
45689	//     "https://www.googleapis.com/auth/dfatrafficking"
45690	//   ]
45691	// }
45692
45693}
45694
45695// method id "dfareporting.sites.list":
45696
45697type SitesListCall struct {
45698	s            *Service
45699	profileId    int64
45700	urlParams_   gensupport.URLParams
45701	ifNoneMatch_ string
45702	ctx_         context.Context
45703	header_      http.Header
45704}
45705
45706// List: Retrieves a list of sites, possibly filtered. This method
45707// supports paging.
45708func (r *SitesService) List(profileId int64) *SitesListCall {
45709	c := &SitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45710	c.profileId = profileId
45711	return c
45712}
45713
45714// AcceptsInStreamVideoPlacements sets the optional parameter
45715// "acceptsInStreamVideoPlacements": This search filter is no longer
45716// supported and will have no effect on the results returned.
45717func (c *SitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *SitesListCall {
45718	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
45719	return c
45720}
45721
45722// AcceptsInterstitialPlacements sets the optional parameter
45723// "acceptsInterstitialPlacements": This search filter is no longer
45724// supported and will have no effect on the results returned.
45725func (c *SitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *SitesListCall {
45726	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
45727	return c
45728}
45729
45730// AcceptsPublisherPaidPlacements sets the optional parameter
45731// "acceptsPublisherPaidPlacements": Select only sites that accept
45732// publisher paid placements.
45733func (c *SitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *SitesListCall {
45734	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
45735	return c
45736}
45737
45738// AdWordsSite sets the optional parameter "adWordsSite": Select only
45739// AdWords sites.
45740func (c *SitesListCall) AdWordsSite(adWordsSite bool) *SitesListCall {
45741	c.urlParams_.Set("adWordsSite", fmt.Sprint(adWordsSite))
45742	return c
45743}
45744
45745// Approved sets the optional parameter "approved": Select only approved
45746// sites.
45747func (c *SitesListCall) Approved(approved bool) *SitesListCall {
45748	c.urlParams_.Set("approved", fmt.Sprint(approved))
45749	return c
45750}
45751
45752// CampaignIds sets the optional parameter "campaignIds": Select only
45753// sites with these campaign IDs.
45754func (c *SitesListCall) CampaignIds(campaignIds ...int64) *SitesListCall {
45755	var campaignIds_ []string
45756	for _, v := range campaignIds {
45757		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
45758	}
45759	c.urlParams_.SetMulti("campaignIds", campaignIds_)
45760	return c
45761}
45762
45763// DirectorySiteIds sets the optional parameter "directorySiteIds":
45764// Select only sites with these directory site IDs.
45765func (c *SitesListCall) DirectorySiteIds(directorySiteIds ...int64) *SitesListCall {
45766	var directorySiteIds_ []string
45767	for _, v := range directorySiteIds {
45768		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
45769	}
45770	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
45771	return c
45772}
45773
45774// Ids sets the optional parameter "ids": Select only sites with these
45775// IDs.
45776func (c *SitesListCall) Ids(ids ...int64) *SitesListCall {
45777	var ids_ []string
45778	for _, v := range ids {
45779		ids_ = append(ids_, fmt.Sprint(v))
45780	}
45781	c.urlParams_.SetMulti("ids", ids_)
45782	return c
45783}
45784
45785// MaxResults sets the optional parameter "maxResults": Maximum number
45786// of results to return.
45787func (c *SitesListCall) MaxResults(maxResults int64) *SitesListCall {
45788	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45789	return c
45790}
45791
45792// PageToken sets the optional parameter "pageToken": Value of the
45793// nextPageToken from the previous result page.
45794func (c *SitesListCall) PageToken(pageToken string) *SitesListCall {
45795	c.urlParams_.Set("pageToken", pageToken)
45796	return c
45797}
45798
45799// SearchString sets the optional parameter "searchString": Allows
45800// searching for objects by name, ID or keyName. Wildcards (*) are
45801// allowed. For example, "site*2015" will return objects with names like
45802// "site June 2015", "site April 2015", or simply "site 2015". Most of
45803// the searches also add wildcards implicitly at the start and the end
45804// of the search string. For example, a search string of "site" will
45805// match objects with name "my site", "site 2015", or simply "site".
45806func (c *SitesListCall) SearchString(searchString string) *SitesListCall {
45807	c.urlParams_.Set("searchString", searchString)
45808	return c
45809}
45810
45811// SortField sets the optional parameter "sortField": Field by which to
45812// sort the list.
45813//
45814// Possible values:
45815//   "ID" (default)
45816//   "NAME"
45817func (c *SitesListCall) SortField(sortField string) *SitesListCall {
45818	c.urlParams_.Set("sortField", sortField)
45819	return c
45820}
45821
45822// SortOrder sets the optional parameter "sortOrder": Order of sorted
45823// results.
45824//
45825// Possible values:
45826//   "ASCENDING" (default)
45827//   "DESCENDING"
45828func (c *SitesListCall) SortOrder(sortOrder string) *SitesListCall {
45829	c.urlParams_.Set("sortOrder", sortOrder)
45830	return c
45831}
45832
45833// SubaccountId sets the optional parameter "subaccountId": Select only
45834// sites with this subaccount ID.
45835func (c *SitesListCall) SubaccountId(subaccountId int64) *SitesListCall {
45836	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
45837	return c
45838}
45839
45840// UnmappedSite sets the optional parameter "unmappedSite": Select only
45841// sites that have not been mapped to a directory site.
45842func (c *SitesListCall) UnmappedSite(unmappedSite bool) *SitesListCall {
45843	c.urlParams_.Set("unmappedSite", fmt.Sprint(unmappedSite))
45844	return c
45845}
45846
45847// Fields allows partial responses to be retrieved. See
45848// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45849// for more information.
45850func (c *SitesListCall) Fields(s ...googleapi.Field) *SitesListCall {
45851	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45852	return c
45853}
45854
45855// IfNoneMatch sets the optional parameter which makes the operation
45856// fail if the object's ETag matches the given value. This is useful for
45857// getting updates only after the object has changed since the last
45858// request. Use googleapi.IsNotModified to check whether the response
45859// error from Do is the result of In-None-Match.
45860func (c *SitesListCall) IfNoneMatch(entityTag string) *SitesListCall {
45861	c.ifNoneMatch_ = entityTag
45862	return c
45863}
45864
45865// Context sets the context to be used in this call's Do method. Any
45866// pending HTTP request will be aborted if the provided context is
45867// canceled.
45868func (c *SitesListCall) Context(ctx context.Context) *SitesListCall {
45869	c.ctx_ = ctx
45870	return c
45871}
45872
45873// Header returns an http.Header that can be modified by the caller to
45874// add HTTP headers to the request.
45875func (c *SitesListCall) Header() http.Header {
45876	if c.header_ == nil {
45877		c.header_ = make(http.Header)
45878	}
45879	return c.header_
45880}
45881
45882func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
45883	reqHeaders := make(http.Header)
45884	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
45885	for k, v := range c.header_ {
45886		reqHeaders[k] = v
45887	}
45888	reqHeaders.Set("User-Agent", c.s.userAgent())
45889	if c.ifNoneMatch_ != "" {
45890		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45891	}
45892	var body io.Reader = nil
45893	c.urlParams_.Set("alt", alt)
45894	c.urlParams_.Set("prettyPrint", "false")
45895	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45896	urls += "?" + c.urlParams_.Encode()
45897	req, err := http.NewRequest("GET", urls, body)
45898	if err != nil {
45899		return nil, err
45900	}
45901	req.Header = reqHeaders
45902	googleapi.Expand(req.URL, map[string]string{
45903		"profileId": strconv.FormatInt(c.profileId, 10),
45904	})
45905	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45906}
45907
45908// Do executes the "dfareporting.sites.list" call.
45909// Exactly one of *SitesListResponse or error will be non-nil. Any
45910// non-2xx status code is an error. Response headers are in either
45911// *SitesListResponse.ServerResponse.Header or (if a response was
45912// returned at all) in error.(*googleapi.Error).Header. Use
45913// googleapi.IsNotModified to check whether the returned error was
45914// because http.StatusNotModified was returned.
45915func (c *SitesListCall) Do(opts ...googleapi.CallOption) (*SitesListResponse, error) {
45916	gensupport.SetOptions(c.urlParams_, opts...)
45917	res, err := c.doRequest("json")
45918	if res != nil && res.StatusCode == http.StatusNotModified {
45919		if res.Body != nil {
45920			res.Body.Close()
45921		}
45922		return nil, &googleapi.Error{
45923			Code:   res.StatusCode,
45924			Header: res.Header,
45925		}
45926	}
45927	if err != nil {
45928		return nil, err
45929	}
45930	defer googleapi.CloseBody(res)
45931	if err := googleapi.CheckResponse(res); err != nil {
45932		return nil, err
45933	}
45934	ret := &SitesListResponse{
45935		ServerResponse: googleapi.ServerResponse{
45936			Header:         res.Header,
45937			HTTPStatusCode: res.StatusCode,
45938		},
45939	}
45940	target := &ret
45941	if err := gensupport.DecodeResponse(target, res); err != nil {
45942		return nil, err
45943	}
45944	return ret, nil
45945	// {
45946	//   "description": "Retrieves a list of sites, possibly filtered. This method supports paging.",
45947	//   "httpMethod": "GET",
45948	//   "id": "dfareporting.sites.list",
45949	//   "parameterOrder": [
45950	//     "profileId"
45951	//   ],
45952	//   "parameters": {
45953	//     "acceptsInStreamVideoPlacements": {
45954	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
45955	//       "location": "query",
45956	//       "type": "boolean"
45957	//     },
45958	//     "acceptsInterstitialPlacements": {
45959	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
45960	//       "location": "query",
45961	//       "type": "boolean"
45962	//     },
45963	//     "acceptsPublisherPaidPlacements": {
45964	//       "description": "Select only sites that accept publisher paid placements.",
45965	//       "location": "query",
45966	//       "type": "boolean"
45967	//     },
45968	//     "adWordsSite": {
45969	//       "description": "Select only AdWords sites.",
45970	//       "location": "query",
45971	//       "type": "boolean"
45972	//     },
45973	//     "approved": {
45974	//       "description": "Select only approved sites.",
45975	//       "location": "query",
45976	//       "type": "boolean"
45977	//     },
45978	//     "campaignIds": {
45979	//       "description": "Select only sites with these campaign IDs.",
45980	//       "format": "int64",
45981	//       "location": "query",
45982	//       "repeated": true,
45983	//       "type": "string"
45984	//     },
45985	//     "directorySiteIds": {
45986	//       "description": "Select only sites with these directory site IDs.",
45987	//       "format": "int64",
45988	//       "location": "query",
45989	//       "repeated": true,
45990	//       "type": "string"
45991	//     },
45992	//     "ids": {
45993	//       "description": "Select only sites with these IDs.",
45994	//       "format": "int64",
45995	//       "location": "query",
45996	//       "repeated": true,
45997	//       "type": "string"
45998	//     },
45999	//     "maxResults": {
46000	//       "default": "1000",
46001	//       "description": "Maximum number of results to return.",
46002	//       "format": "int32",
46003	//       "location": "query",
46004	//       "maximum": "1000",
46005	//       "minimum": "0",
46006	//       "type": "integer"
46007	//     },
46008	//     "pageToken": {
46009	//       "description": "Value of the nextPageToken from the previous result page.",
46010	//       "location": "query",
46011	//       "type": "string"
46012	//     },
46013	//     "profileId": {
46014	//       "description": "User profile ID associated with this request.",
46015	//       "format": "int64",
46016	//       "location": "path",
46017	//       "required": true,
46018	//       "type": "string"
46019	//     },
46020	//     "searchString": {
46021	//       "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\".",
46022	//       "location": "query",
46023	//       "type": "string"
46024	//     },
46025	//     "sortField": {
46026	//       "default": "ID",
46027	//       "description": "Field by which to sort the list.",
46028	//       "enum": [
46029	//         "ID",
46030	//         "NAME"
46031	//       ],
46032	//       "enumDescriptions": [
46033	//         "",
46034	//         ""
46035	//       ],
46036	//       "location": "query",
46037	//       "type": "string"
46038	//     },
46039	//     "sortOrder": {
46040	//       "default": "ASCENDING",
46041	//       "description": "Order of sorted results.",
46042	//       "enum": [
46043	//         "ASCENDING",
46044	//         "DESCENDING"
46045	//       ],
46046	//       "enumDescriptions": [
46047	//         "",
46048	//         ""
46049	//       ],
46050	//       "location": "query",
46051	//       "type": "string"
46052	//     },
46053	//     "subaccountId": {
46054	//       "description": "Select only sites with this subaccount ID.",
46055	//       "format": "int64",
46056	//       "location": "query",
46057	//       "type": "string"
46058	//     },
46059	//     "unmappedSite": {
46060	//       "description": "Select only sites that have not been mapped to a directory site.",
46061	//       "location": "query",
46062	//       "type": "boolean"
46063	//     }
46064	//   },
46065	//   "path": "userprofiles/{profileId}/sites",
46066	//   "response": {
46067	//     "$ref": "SitesListResponse"
46068	//   },
46069	//   "scopes": [
46070	//     "https://www.googleapis.com/auth/dfatrafficking"
46071	//   ]
46072	// }
46073
46074}
46075
46076// Pages invokes f for each page of results.
46077// A non-nil error returned from f will halt the iteration.
46078// The provided context supersedes any context provided to the Context method.
46079func (c *SitesListCall) Pages(ctx context.Context, f func(*SitesListResponse) error) error {
46080	c.ctx_ = ctx
46081	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
46082	for {
46083		x, err := c.Do()
46084		if err != nil {
46085			return err
46086		}
46087		if err := f(x); err != nil {
46088			return err
46089		}
46090		if x.NextPageToken == "" {
46091			return nil
46092		}
46093		c.PageToken(x.NextPageToken)
46094	}
46095}
46096
46097// method id "dfareporting.sites.patch":
46098
46099type SitesPatchCall struct {
46100	s          *Service
46101	profileId  int64
46102	site       *Site
46103	urlParams_ gensupport.URLParams
46104	ctx_       context.Context
46105	header_    http.Header
46106}
46107
46108// Patch: Updates an existing site. This method supports patch
46109// semantics.
46110func (r *SitesService) Patch(profileId int64, id int64, site *Site) *SitesPatchCall {
46111	c := &SitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46112	c.profileId = profileId
46113	c.urlParams_.Set("id", fmt.Sprint(id))
46114	c.site = site
46115	return c
46116}
46117
46118// Fields allows partial responses to be retrieved. See
46119// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46120// for more information.
46121func (c *SitesPatchCall) Fields(s ...googleapi.Field) *SitesPatchCall {
46122	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46123	return c
46124}
46125
46126// Context sets the context to be used in this call's Do method. Any
46127// pending HTTP request will be aborted if the provided context is
46128// canceled.
46129func (c *SitesPatchCall) Context(ctx context.Context) *SitesPatchCall {
46130	c.ctx_ = ctx
46131	return c
46132}
46133
46134// Header returns an http.Header that can be modified by the caller to
46135// add HTTP headers to the request.
46136func (c *SitesPatchCall) Header() http.Header {
46137	if c.header_ == nil {
46138		c.header_ = make(http.Header)
46139	}
46140	return c.header_
46141}
46142
46143func (c *SitesPatchCall) doRequest(alt string) (*http.Response, error) {
46144	reqHeaders := make(http.Header)
46145	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
46146	for k, v := range c.header_ {
46147		reqHeaders[k] = v
46148	}
46149	reqHeaders.Set("User-Agent", c.s.userAgent())
46150	var body io.Reader = nil
46151	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
46152	if err != nil {
46153		return nil, err
46154	}
46155	reqHeaders.Set("Content-Type", "application/json")
46156	c.urlParams_.Set("alt", alt)
46157	c.urlParams_.Set("prettyPrint", "false")
46158	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
46159	urls += "?" + c.urlParams_.Encode()
46160	req, err := http.NewRequest("PATCH", urls, body)
46161	if err != nil {
46162		return nil, err
46163	}
46164	req.Header = reqHeaders
46165	googleapi.Expand(req.URL, map[string]string{
46166		"profileId": strconv.FormatInt(c.profileId, 10),
46167	})
46168	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46169}
46170
46171// Do executes the "dfareporting.sites.patch" call.
46172// Exactly one of *Site or error will be non-nil. Any non-2xx status
46173// code is an error. Response headers are in either
46174// *Site.ServerResponse.Header or (if a response was returned at all) in
46175// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46176// whether the returned error was because http.StatusNotModified was
46177// returned.
46178func (c *SitesPatchCall) Do(opts ...googleapi.CallOption) (*Site, error) {
46179	gensupport.SetOptions(c.urlParams_, opts...)
46180	res, err := c.doRequest("json")
46181	if res != nil && res.StatusCode == http.StatusNotModified {
46182		if res.Body != nil {
46183			res.Body.Close()
46184		}
46185		return nil, &googleapi.Error{
46186			Code:   res.StatusCode,
46187			Header: res.Header,
46188		}
46189	}
46190	if err != nil {
46191		return nil, err
46192	}
46193	defer googleapi.CloseBody(res)
46194	if err := googleapi.CheckResponse(res); err != nil {
46195		return nil, err
46196	}
46197	ret := &Site{
46198		ServerResponse: googleapi.ServerResponse{
46199			Header:         res.Header,
46200			HTTPStatusCode: res.StatusCode,
46201		},
46202	}
46203	target := &ret
46204	if err := gensupport.DecodeResponse(target, res); err != nil {
46205		return nil, err
46206	}
46207	return ret, nil
46208	// {
46209	//   "description": "Updates an existing site. This method supports patch semantics.",
46210	//   "httpMethod": "PATCH",
46211	//   "id": "dfareporting.sites.patch",
46212	//   "parameterOrder": [
46213	//     "profileId",
46214	//     "id"
46215	//   ],
46216	//   "parameters": {
46217	//     "id": {
46218	//       "description": "Site ID.",
46219	//       "format": "int64",
46220	//       "location": "query",
46221	//       "required": true,
46222	//       "type": "string"
46223	//     },
46224	//     "profileId": {
46225	//       "description": "User profile ID associated with this request.",
46226	//       "format": "int64",
46227	//       "location": "path",
46228	//       "required": true,
46229	//       "type": "string"
46230	//     }
46231	//   },
46232	//   "path": "userprofiles/{profileId}/sites",
46233	//   "request": {
46234	//     "$ref": "Site"
46235	//   },
46236	//   "response": {
46237	//     "$ref": "Site"
46238	//   },
46239	//   "scopes": [
46240	//     "https://www.googleapis.com/auth/dfatrafficking"
46241	//   ]
46242	// }
46243
46244}
46245
46246// method id "dfareporting.sites.update":
46247
46248type SitesUpdateCall struct {
46249	s          *Service
46250	profileId  int64
46251	site       *Site
46252	urlParams_ gensupport.URLParams
46253	ctx_       context.Context
46254	header_    http.Header
46255}
46256
46257// Update: Updates an existing site.
46258func (r *SitesService) Update(profileId int64, site *Site) *SitesUpdateCall {
46259	c := &SitesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46260	c.profileId = profileId
46261	c.site = site
46262	return c
46263}
46264
46265// Fields allows partial responses to be retrieved. See
46266// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46267// for more information.
46268func (c *SitesUpdateCall) Fields(s ...googleapi.Field) *SitesUpdateCall {
46269	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46270	return c
46271}
46272
46273// Context sets the context to be used in this call's Do method. Any
46274// pending HTTP request will be aborted if the provided context is
46275// canceled.
46276func (c *SitesUpdateCall) Context(ctx context.Context) *SitesUpdateCall {
46277	c.ctx_ = ctx
46278	return c
46279}
46280
46281// Header returns an http.Header that can be modified by the caller to
46282// add HTTP headers to the request.
46283func (c *SitesUpdateCall) Header() http.Header {
46284	if c.header_ == nil {
46285		c.header_ = make(http.Header)
46286	}
46287	return c.header_
46288}
46289
46290func (c *SitesUpdateCall) doRequest(alt string) (*http.Response, error) {
46291	reqHeaders := make(http.Header)
46292	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
46293	for k, v := range c.header_ {
46294		reqHeaders[k] = v
46295	}
46296	reqHeaders.Set("User-Agent", c.s.userAgent())
46297	var body io.Reader = nil
46298	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
46299	if err != nil {
46300		return nil, err
46301	}
46302	reqHeaders.Set("Content-Type", "application/json")
46303	c.urlParams_.Set("alt", alt)
46304	c.urlParams_.Set("prettyPrint", "false")
46305	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
46306	urls += "?" + c.urlParams_.Encode()
46307	req, err := http.NewRequest("PUT", urls, body)
46308	if err != nil {
46309		return nil, err
46310	}
46311	req.Header = reqHeaders
46312	googleapi.Expand(req.URL, map[string]string{
46313		"profileId": strconv.FormatInt(c.profileId, 10),
46314	})
46315	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46316}
46317
46318// Do executes the "dfareporting.sites.update" call.
46319// Exactly one of *Site or error will be non-nil. Any non-2xx status
46320// code is an error. Response headers are in either
46321// *Site.ServerResponse.Header or (if a response was returned at all) in
46322// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46323// whether the returned error was because http.StatusNotModified was
46324// returned.
46325func (c *SitesUpdateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
46326	gensupport.SetOptions(c.urlParams_, opts...)
46327	res, err := c.doRequest("json")
46328	if res != nil && res.StatusCode == http.StatusNotModified {
46329		if res.Body != nil {
46330			res.Body.Close()
46331		}
46332		return nil, &googleapi.Error{
46333			Code:   res.StatusCode,
46334			Header: res.Header,
46335		}
46336	}
46337	if err != nil {
46338		return nil, err
46339	}
46340	defer googleapi.CloseBody(res)
46341	if err := googleapi.CheckResponse(res); err != nil {
46342		return nil, err
46343	}
46344	ret := &Site{
46345		ServerResponse: googleapi.ServerResponse{
46346			Header:         res.Header,
46347			HTTPStatusCode: res.StatusCode,
46348		},
46349	}
46350	target := &ret
46351	if err := gensupport.DecodeResponse(target, res); err != nil {
46352		return nil, err
46353	}
46354	return ret, nil
46355	// {
46356	//   "description": "Updates an existing site.",
46357	//   "httpMethod": "PUT",
46358	//   "id": "dfareporting.sites.update",
46359	//   "parameterOrder": [
46360	//     "profileId"
46361	//   ],
46362	//   "parameters": {
46363	//     "profileId": {
46364	//       "description": "User profile ID associated with this request.",
46365	//       "format": "int64",
46366	//       "location": "path",
46367	//       "required": true,
46368	//       "type": "string"
46369	//     }
46370	//   },
46371	//   "path": "userprofiles/{profileId}/sites",
46372	//   "request": {
46373	//     "$ref": "Site"
46374	//   },
46375	//   "response": {
46376	//     "$ref": "Site"
46377	//   },
46378	//   "scopes": [
46379	//     "https://www.googleapis.com/auth/dfatrafficking"
46380	//   ]
46381	// }
46382
46383}
46384
46385// method id "dfareporting.sizes.get":
46386
46387type SizesGetCall struct {
46388	s            *Service
46389	profileId    int64
46390	id           int64
46391	urlParams_   gensupport.URLParams
46392	ifNoneMatch_ string
46393	ctx_         context.Context
46394	header_      http.Header
46395}
46396
46397// Get: Gets one size by ID.
46398func (r *SizesService) Get(profileId int64, id int64) *SizesGetCall {
46399	c := &SizesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46400	c.profileId = profileId
46401	c.id = id
46402	return c
46403}
46404
46405// Fields allows partial responses to be retrieved. See
46406// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46407// for more information.
46408func (c *SizesGetCall) Fields(s ...googleapi.Field) *SizesGetCall {
46409	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46410	return c
46411}
46412
46413// IfNoneMatch sets the optional parameter which makes the operation
46414// fail if the object's ETag matches the given value. This is useful for
46415// getting updates only after the object has changed since the last
46416// request. Use googleapi.IsNotModified to check whether the response
46417// error from Do is the result of In-None-Match.
46418func (c *SizesGetCall) IfNoneMatch(entityTag string) *SizesGetCall {
46419	c.ifNoneMatch_ = entityTag
46420	return c
46421}
46422
46423// Context sets the context to be used in this call's Do method. Any
46424// pending HTTP request will be aborted if the provided context is
46425// canceled.
46426func (c *SizesGetCall) Context(ctx context.Context) *SizesGetCall {
46427	c.ctx_ = ctx
46428	return c
46429}
46430
46431// Header returns an http.Header that can be modified by the caller to
46432// add HTTP headers to the request.
46433func (c *SizesGetCall) Header() http.Header {
46434	if c.header_ == nil {
46435		c.header_ = make(http.Header)
46436	}
46437	return c.header_
46438}
46439
46440func (c *SizesGetCall) doRequest(alt string) (*http.Response, error) {
46441	reqHeaders := make(http.Header)
46442	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
46443	for k, v := range c.header_ {
46444		reqHeaders[k] = v
46445	}
46446	reqHeaders.Set("User-Agent", c.s.userAgent())
46447	if c.ifNoneMatch_ != "" {
46448		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46449	}
46450	var body io.Reader = nil
46451	c.urlParams_.Set("alt", alt)
46452	c.urlParams_.Set("prettyPrint", "false")
46453	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes/{id}")
46454	urls += "?" + c.urlParams_.Encode()
46455	req, err := http.NewRequest("GET", urls, body)
46456	if err != nil {
46457		return nil, err
46458	}
46459	req.Header = reqHeaders
46460	googleapi.Expand(req.URL, map[string]string{
46461		"profileId": strconv.FormatInt(c.profileId, 10),
46462		"id":        strconv.FormatInt(c.id, 10),
46463	})
46464	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46465}
46466
46467// Do executes the "dfareporting.sizes.get" call.
46468// Exactly one of *Size or error will be non-nil. Any non-2xx status
46469// code is an error. Response headers are in either
46470// *Size.ServerResponse.Header or (if a response was returned at all) in
46471// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46472// whether the returned error was because http.StatusNotModified was
46473// returned.
46474func (c *SizesGetCall) Do(opts ...googleapi.CallOption) (*Size, error) {
46475	gensupport.SetOptions(c.urlParams_, opts...)
46476	res, err := c.doRequest("json")
46477	if res != nil && res.StatusCode == http.StatusNotModified {
46478		if res.Body != nil {
46479			res.Body.Close()
46480		}
46481		return nil, &googleapi.Error{
46482			Code:   res.StatusCode,
46483			Header: res.Header,
46484		}
46485	}
46486	if err != nil {
46487		return nil, err
46488	}
46489	defer googleapi.CloseBody(res)
46490	if err := googleapi.CheckResponse(res); err != nil {
46491		return nil, err
46492	}
46493	ret := &Size{
46494		ServerResponse: googleapi.ServerResponse{
46495			Header:         res.Header,
46496			HTTPStatusCode: res.StatusCode,
46497		},
46498	}
46499	target := &ret
46500	if err := gensupport.DecodeResponse(target, res); err != nil {
46501		return nil, err
46502	}
46503	return ret, nil
46504	// {
46505	//   "description": "Gets one size by ID.",
46506	//   "httpMethod": "GET",
46507	//   "id": "dfareporting.sizes.get",
46508	//   "parameterOrder": [
46509	//     "profileId",
46510	//     "id"
46511	//   ],
46512	//   "parameters": {
46513	//     "id": {
46514	//       "description": "Size ID.",
46515	//       "format": "int64",
46516	//       "location": "path",
46517	//       "required": true,
46518	//       "type": "string"
46519	//     },
46520	//     "profileId": {
46521	//       "description": "User profile ID associated with this request.",
46522	//       "format": "int64",
46523	//       "location": "path",
46524	//       "required": true,
46525	//       "type": "string"
46526	//     }
46527	//   },
46528	//   "path": "userprofiles/{profileId}/sizes/{id}",
46529	//   "response": {
46530	//     "$ref": "Size"
46531	//   },
46532	//   "scopes": [
46533	//     "https://www.googleapis.com/auth/dfatrafficking"
46534	//   ]
46535	// }
46536
46537}
46538
46539// method id "dfareporting.sizes.insert":
46540
46541type SizesInsertCall struct {
46542	s          *Service
46543	profileId  int64
46544	size       *Size
46545	urlParams_ gensupport.URLParams
46546	ctx_       context.Context
46547	header_    http.Header
46548}
46549
46550// Insert: Inserts a new size.
46551func (r *SizesService) Insert(profileId int64, size *Size) *SizesInsertCall {
46552	c := &SizesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46553	c.profileId = profileId
46554	c.size = size
46555	return c
46556}
46557
46558// Fields allows partial responses to be retrieved. See
46559// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46560// for more information.
46561func (c *SizesInsertCall) Fields(s ...googleapi.Field) *SizesInsertCall {
46562	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46563	return c
46564}
46565
46566// Context sets the context to be used in this call's Do method. Any
46567// pending HTTP request will be aborted if the provided context is
46568// canceled.
46569func (c *SizesInsertCall) Context(ctx context.Context) *SizesInsertCall {
46570	c.ctx_ = ctx
46571	return c
46572}
46573
46574// Header returns an http.Header that can be modified by the caller to
46575// add HTTP headers to the request.
46576func (c *SizesInsertCall) Header() http.Header {
46577	if c.header_ == nil {
46578		c.header_ = make(http.Header)
46579	}
46580	return c.header_
46581}
46582
46583func (c *SizesInsertCall) doRequest(alt string) (*http.Response, error) {
46584	reqHeaders := make(http.Header)
46585	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
46586	for k, v := range c.header_ {
46587		reqHeaders[k] = v
46588	}
46589	reqHeaders.Set("User-Agent", c.s.userAgent())
46590	var body io.Reader = nil
46591	body, err := googleapi.WithoutDataWrapper.JSONReader(c.size)
46592	if err != nil {
46593		return nil, err
46594	}
46595	reqHeaders.Set("Content-Type", "application/json")
46596	c.urlParams_.Set("alt", alt)
46597	c.urlParams_.Set("prettyPrint", "false")
46598	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
46599	urls += "?" + c.urlParams_.Encode()
46600	req, err := http.NewRequest("POST", urls, body)
46601	if err != nil {
46602		return nil, err
46603	}
46604	req.Header = reqHeaders
46605	googleapi.Expand(req.URL, map[string]string{
46606		"profileId": strconv.FormatInt(c.profileId, 10),
46607	})
46608	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46609}
46610
46611// Do executes the "dfareporting.sizes.insert" call.
46612// Exactly one of *Size or error will be non-nil. Any non-2xx status
46613// code is an error. Response headers are in either
46614// *Size.ServerResponse.Header or (if a response was returned at all) in
46615// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46616// whether the returned error was because http.StatusNotModified was
46617// returned.
46618func (c *SizesInsertCall) Do(opts ...googleapi.CallOption) (*Size, error) {
46619	gensupport.SetOptions(c.urlParams_, opts...)
46620	res, err := c.doRequest("json")
46621	if res != nil && res.StatusCode == http.StatusNotModified {
46622		if res.Body != nil {
46623			res.Body.Close()
46624		}
46625		return nil, &googleapi.Error{
46626			Code:   res.StatusCode,
46627			Header: res.Header,
46628		}
46629	}
46630	if err != nil {
46631		return nil, err
46632	}
46633	defer googleapi.CloseBody(res)
46634	if err := googleapi.CheckResponse(res); err != nil {
46635		return nil, err
46636	}
46637	ret := &Size{
46638		ServerResponse: googleapi.ServerResponse{
46639			Header:         res.Header,
46640			HTTPStatusCode: res.StatusCode,
46641		},
46642	}
46643	target := &ret
46644	if err := gensupport.DecodeResponse(target, res); err != nil {
46645		return nil, err
46646	}
46647	return ret, nil
46648	// {
46649	//   "description": "Inserts a new size.",
46650	//   "httpMethod": "POST",
46651	//   "id": "dfareporting.sizes.insert",
46652	//   "parameterOrder": [
46653	//     "profileId"
46654	//   ],
46655	//   "parameters": {
46656	//     "profileId": {
46657	//       "description": "User profile ID associated with this request.",
46658	//       "format": "int64",
46659	//       "location": "path",
46660	//       "required": true,
46661	//       "type": "string"
46662	//     }
46663	//   },
46664	//   "path": "userprofiles/{profileId}/sizes",
46665	//   "request": {
46666	//     "$ref": "Size"
46667	//   },
46668	//   "response": {
46669	//     "$ref": "Size"
46670	//   },
46671	//   "scopes": [
46672	//     "https://www.googleapis.com/auth/dfatrafficking"
46673	//   ]
46674	// }
46675
46676}
46677
46678// method id "dfareporting.sizes.list":
46679
46680type SizesListCall struct {
46681	s            *Service
46682	profileId    int64
46683	urlParams_   gensupport.URLParams
46684	ifNoneMatch_ string
46685	ctx_         context.Context
46686	header_      http.Header
46687}
46688
46689// List: Retrieves a list of sizes, possibly filtered. Retrieved sizes
46690// are globally unique and may include values not currently in use by
46691// your account. Due to this, the list of sizes returned by this method
46692// may differ from the list seen in the Trafficking UI.
46693func (r *SizesService) List(profileId int64) *SizesListCall {
46694	c := &SizesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46695	c.profileId = profileId
46696	return c
46697}
46698
46699// Height sets the optional parameter "height": Select only sizes with
46700// this height.
46701func (c *SizesListCall) Height(height int64) *SizesListCall {
46702	c.urlParams_.Set("height", fmt.Sprint(height))
46703	return c
46704}
46705
46706// IabStandard sets the optional parameter "iabStandard": Select only
46707// IAB standard sizes.
46708func (c *SizesListCall) IabStandard(iabStandard bool) *SizesListCall {
46709	c.urlParams_.Set("iabStandard", fmt.Sprint(iabStandard))
46710	return c
46711}
46712
46713// Ids sets the optional parameter "ids": Select only sizes with these
46714// IDs.
46715func (c *SizesListCall) Ids(ids ...int64) *SizesListCall {
46716	var ids_ []string
46717	for _, v := range ids {
46718		ids_ = append(ids_, fmt.Sprint(v))
46719	}
46720	c.urlParams_.SetMulti("ids", ids_)
46721	return c
46722}
46723
46724// Width sets the optional parameter "width": Select only sizes with
46725// this width.
46726func (c *SizesListCall) Width(width int64) *SizesListCall {
46727	c.urlParams_.Set("width", fmt.Sprint(width))
46728	return c
46729}
46730
46731// Fields allows partial responses to be retrieved. See
46732// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46733// for more information.
46734func (c *SizesListCall) Fields(s ...googleapi.Field) *SizesListCall {
46735	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46736	return c
46737}
46738
46739// IfNoneMatch sets the optional parameter which makes the operation
46740// fail if the object's ETag matches the given value. This is useful for
46741// getting updates only after the object has changed since the last
46742// request. Use googleapi.IsNotModified to check whether the response
46743// error from Do is the result of In-None-Match.
46744func (c *SizesListCall) IfNoneMatch(entityTag string) *SizesListCall {
46745	c.ifNoneMatch_ = entityTag
46746	return c
46747}
46748
46749// Context sets the context to be used in this call's Do method. Any
46750// pending HTTP request will be aborted if the provided context is
46751// canceled.
46752func (c *SizesListCall) Context(ctx context.Context) *SizesListCall {
46753	c.ctx_ = ctx
46754	return c
46755}
46756
46757// Header returns an http.Header that can be modified by the caller to
46758// add HTTP headers to the request.
46759func (c *SizesListCall) Header() http.Header {
46760	if c.header_ == nil {
46761		c.header_ = make(http.Header)
46762	}
46763	return c.header_
46764}
46765
46766func (c *SizesListCall) doRequest(alt string) (*http.Response, error) {
46767	reqHeaders := make(http.Header)
46768	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
46769	for k, v := range c.header_ {
46770		reqHeaders[k] = v
46771	}
46772	reqHeaders.Set("User-Agent", c.s.userAgent())
46773	if c.ifNoneMatch_ != "" {
46774		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46775	}
46776	var body io.Reader = nil
46777	c.urlParams_.Set("alt", alt)
46778	c.urlParams_.Set("prettyPrint", "false")
46779	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
46780	urls += "?" + c.urlParams_.Encode()
46781	req, err := http.NewRequest("GET", urls, body)
46782	if err != nil {
46783		return nil, err
46784	}
46785	req.Header = reqHeaders
46786	googleapi.Expand(req.URL, map[string]string{
46787		"profileId": strconv.FormatInt(c.profileId, 10),
46788	})
46789	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46790}
46791
46792// Do executes the "dfareporting.sizes.list" call.
46793// Exactly one of *SizesListResponse or error will be non-nil. Any
46794// non-2xx status code is an error. Response headers are in either
46795// *SizesListResponse.ServerResponse.Header or (if a response was
46796// returned at all) in error.(*googleapi.Error).Header. Use
46797// googleapi.IsNotModified to check whether the returned error was
46798// because http.StatusNotModified was returned.
46799func (c *SizesListCall) Do(opts ...googleapi.CallOption) (*SizesListResponse, error) {
46800	gensupport.SetOptions(c.urlParams_, opts...)
46801	res, err := c.doRequest("json")
46802	if res != nil && res.StatusCode == http.StatusNotModified {
46803		if res.Body != nil {
46804			res.Body.Close()
46805		}
46806		return nil, &googleapi.Error{
46807			Code:   res.StatusCode,
46808			Header: res.Header,
46809		}
46810	}
46811	if err != nil {
46812		return nil, err
46813	}
46814	defer googleapi.CloseBody(res)
46815	if err := googleapi.CheckResponse(res); err != nil {
46816		return nil, err
46817	}
46818	ret := &SizesListResponse{
46819		ServerResponse: googleapi.ServerResponse{
46820			Header:         res.Header,
46821			HTTPStatusCode: res.StatusCode,
46822		},
46823	}
46824	target := &ret
46825	if err := gensupport.DecodeResponse(target, res); err != nil {
46826		return nil, err
46827	}
46828	return ret, nil
46829	// {
46830	//   "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.",
46831	//   "httpMethod": "GET",
46832	//   "id": "dfareporting.sizes.list",
46833	//   "parameterOrder": [
46834	//     "profileId"
46835	//   ],
46836	//   "parameters": {
46837	//     "height": {
46838	//       "description": "Select only sizes with this height.",
46839	//       "format": "int32",
46840	//       "location": "query",
46841	//       "maximum": "32767",
46842	//       "minimum": "0",
46843	//       "type": "integer"
46844	//     },
46845	//     "iabStandard": {
46846	//       "description": "Select only IAB standard sizes.",
46847	//       "location": "query",
46848	//       "type": "boolean"
46849	//     },
46850	//     "ids": {
46851	//       "description": "Select only sizes with these IDs.",
46852	//       "format": "int64",
46853	//       "location": "query",
46854	//       "repeated": true,
46855	//       "type": "string"
46856	//     },
46857	//     "profileId": {
46858	//       "description": "User profile ID associated with this request.",
46859	//       "format": "int64",
46860	//       "location": "path",
46861	//       "required": true,
46862	//       "type": "string"
46863	//     },
46864	//     "width": {
46865	//       "description": "Select only sizes with this width.",
46866	//       "format": "int32",
46867	//       "location": "query",
46868	//       "maximum": "32767",
46869	//       "minimum": "0",
46870	//       "type": "integer"
46871	//     }
46872	//   },
46873	//   "path": "userprofiles/{profileId}/sizes",
46874	//   "response": {
46875	//     "$ref": "SizesListResponse"
46876	//   },
46877	//   "scopes": [
46878	//     "https://www.googleapis.com/auth/dfatrafficking"
46879	//   ]
46880	// }
46881
46882}
46883
46884// method id "dfareporting.subaccounts.get":
46885
46886type SubaccountsGetCall struct {
46887	s            *Service
46888	profileId    int64
46889	id           int64
46890	urlParams_   gensupport.URLParams
46891	ifNoneMatch_ string
46892	ctx_         context.Context
46893	header_      http.Header
46894}
46895
46896// Get: Gets one subaccount by ID.
46897func (r *SubaccountsService) Get(profileId int64, id int64) *SubaccountsGetCall {
46898	c := &SubaccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46899	c.profileId = profileId
46900	c.id = id
46901	return c
46902}
46903
46904// Fields allows partial responses to be retrieved. See
46905// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46906// for more information.
46907func (c *SubaccountsGetCall) Fields(s ...googleapi.Field) *SubaccountsGetCall {
46908	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46909	return c
46910}
46911
46912// IfNoneMatch sets the optional parameter which makes the operation
46913// fail if the object's ETag matches the given value. This is useful for
46914// getting updates only after the object has changed since the last
46915// request. Use googleapi.IsNotModified to check whether the response
46916// error from Do is the result of In-None-Match.
46917func (c *SubaccountsGetCall) IfNoneMatch(entityTag string) *SubaccountsGetCall {
46918	c.ifNoneMatch_ = entityTag
46919	return c
46920}
46921
46922// Context sets the context to be used in this call's Do method. Any
46923// pending HTTP request will be aborted if the provided context is
46924// canceled.
46925func (c *SubaccountsGetCall) Context(ctx context.Context) *SubaccountsGetCall {
46926	c.ctx_ = ctx
46927	return c
46928}
46929
46930// Header returns an http.Header that can be modified by the caller to
46931// add HTTP headers to the request.
46932func (c *SubaccountsGetCall) Header() http.Header {
46933	if c.header_ == nil {
46934		c.header_ = make(http.Header)
46935	}
46936	return c.header_
46937}
46938
46939func (c *SubaccountsGetCall) doRequest(alt string) (*http.Response, error) {
46940	reqHeaders := make(http.Header)
46941	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
46942	for k, v := range c.header_ {
46943		reqHeaders[k] = v
46944	}
46945	reqHeaders.Set("User-Agent", c.s.userAgent())
46946	if c.ifNoneMatch_ != "" {
46947		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46948	}
46949	var body io.Reader = nil
46950	c.urlParams_.Set("alt", alt)
46951	c.urlParams_.Set("prettyPrint", "false")
46952	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts/{id}")
46953	urls += "?" + c.urlParams_.Encode()
46954	req, err := http.NewRequest("GET", urls, body)
46955	if err != nil {
46956		return nil, err
46957	}
46958	req.Header = reqHeaders
46959	googleapi.Expand(req.URL, map[string]string{
46960		"profileId": strconv.FormatInt(c.profileId, 10),
46961		"id":        strconv.FormatInt(c.id, 10),
46962	})
46963	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46964}
46965
46966// Do executes the "dfareporting.subaccounts.get" call.
46967// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
46968// status code is an error. Response headers are in either
46969// *Subaccount.ServerResponse.Header or (if a response was returned at
46970// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46971// to check whether the returned error was because
46972// http.StatusNotModified was returned.
46973func (c *SubaccountsGetCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
46974	gensupport.SetOptions(c.urlParams_, opts...)
46975	res, err := c.doRequest("json")
46976	if res != nil && res.StatusCode == http.StatusNotModified {
46977		if res.Body != nil {
46978			res.Body.Close()
46979		}
46980		return nil, &googleapi.Error{
46981			Code:   res.StatusCode,
46982			Header: res.Header,
46983		}
46984	}
46985	if err != nil {
46986		return nil, err
46987	}
46988	defer googleapi.CloseBody(res)
46989	if err := googleapi.CheckResponse(res); err != nil {
46990		return nil, err
46991	}
46992	ret := &Subaccount{
46993		ServerResponse: googleapi.ServerResponse{
46994			Header:         res.Header,
46995			HTTPStatusCode: res.StatusCode,
46996		},
46997	}
46998	target := &ret
46999	if err := gensupport.DecodeResponse(target, res); err != nil {
47000		return nil, err
47001	}
47002	return ret, nil
47003	// {
47004	//   "description": "Gets one subaccount by ID.",
47005	//   "httpMethod": "GET",
47006	//   "id": "dfareporting.subaccounts.get",
47007	//   "parameterOrder": [
47008	//     "profileId",
47009	//     "id"
47010	//   ],
47011	//   "parameters": {
47012	//     "id": {
47013	//       "description": "Subaccount ID.",
47014	//       "format": "int64",
47015	//       "location": "path",
47016	//       "required": true,
47017	//       "type": "string"
47018	//     },
47019	//     "profileId": {
47020	//       "description": "User profile ID associated with this request.",
47021	//       "format": "int64",
47022	//       "location": "path",
47023	//       "required": true,
47024	//       "type": "string"
47025	//     }
47026	//   },
47027	//   "path": "userprofiles/{profileId}/subaccounts/{id}",
47028	//   "response": {
47029	//     "$ref": "Subaccount"
47030	//   },
47031	//   "scopes": [
47032	//     "https://www.googleapis.com/auth/dfatrafficking"
47033	//   ]
47034	// }
47035
47036}
47037
47038// method id "dfareporting.subaccounts.insert":
47039
47040type SubaccountsInsertCall struct {
47041	s          *Service
47042	profileId  int64
47043	subaccount *Subaccount
47044	urlParams_ gensupport.URLParams
47045	ctx_       context.Context
47046	header_    http.Header
47047}
47048
47049// Insert: Inserts a new subaccount.
47050func (r *SubaccountsService) Insert(profileId int64, subaccount *Subaccount) *SubaccountsInsertCall {
47051	c := &SubaccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47052	c.profileId = profileId
47053	c.subaccount = subaccount
47054	return c
47055}
47056
47057// Fields allows partial responses to be retrieved. See
47058// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47059// for more information.
47060func (c *SubaccountsInsertCall) Fields(s ...googleapi.Field) *SubaccountsInsertCall {
47061	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47062	return c
47063}
47064
47065// Context sets the context to be used in this call's Do method. Any
47066// pending HTTP request will be aborted if the provided context is
47067// canceled.
47068func (c *SubaccountsInsertCall) Context(ctx context.Context) *SubaccountsInsertCall {
47069	c.ctx_ = ctx
47070	return c
47071}
47072
47073// Header returns an http.Header that can be modified by the caller to
47074// add HTTP headers to the request.
47075func (c *SubaccountsInsertCall) Header() http.Header {
47076	if c.header_ == nil {
47077		c.header_ = make(http.Header)
47078	}
47079	return c.header_
47080}
47081
47082func (c *SubaccountsInsertCall) doRequest(alt string) (*http.Response, error) {
47083	reqHeaders := make(http.Header)
47084	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
47085	for k, v := range c.header_ {
47086		reqHeaders[k] = v
47087	}
47088	reqHeaders.Set("User-Agent", c.s.userAgent())
47089	var body io.Reader = nil
47090	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47091	if err != nil {
47092		return nil, err
47093	}
47094	reqHeaders.Set("Content-Type", "application/json")
47095	c.urlParams_.Set("alt", alt)
47096	c.urlParams_.Set("prettyPrint", "false")
47097	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47098	urls += "?" + c.urlParams_.Encode()
47099	req, err := http.NewRequest("POST", urls, body)
47100	if err != nil {
47101		return nil, err
47102	}
47103	req.Header = reqHeaders
47104	googleapi.Expand(req.URL, map[string]string{
47105		"profileId": strconv.FormatInt(c.profileId, 10),
47106	})
47107	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47108}
47109
47110// Do executes the "dfareporting.subaccounts.insert" call.
47111// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
47112// status code is an error. Response headers are in either
47113// *Subaccount.ServerResponse.Header or (if a response was returned at
47114// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47115// to check whether the returned error was because
47116// http.StatusNotModified was returned.
47117func (c *SubaccountsInsertCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47118	gensupport.SetOptions(c.urlParams_, opts...)
47119	res, err := c.doRequest("json")
47120	if res != nil && res.StatusCode == http.StatusNotModified {
47121		if res.Body != nil {
47122			res.Body.Close()
47123		}
47124		return nil, &googleapi.Error{
47125			Code:   res.StatusCode,
47126			Header: res.Header,
47127		}
47128	}
47129	if err != nil {
47130		return nil, err
47131	}
47132	defer googleapi.CloseBody(res)
47133	if err := googleapi.CheckResponse(res); err != nil {
47134		return nil, err
47135	}
47136	ret := &Subaccount{
47137		ServerResponse: googleapi.ServerResponse{
47138			Header:         res.Header,
47139			HTTPStatusCode: res.StatusCode,
47140		},
47141	}
47142	target := &ret
47143	if err := gensupport.DecodeResponse(target, res); err != nil {
47144		return nil, err
47145	}
47146	return ret, nil
47147	// {
47148	//   "description": "Inserts a new subaccount.",
47149	//   "httpMethod": "POST",
47150	//   "id": "dfareporting.subaccounts.insert",
47151	//   "parameterOrder": [
47152	//     "profileId"
47153	//   ],
47154	//   "parameters": {
47155	//     "profileId": {
47156	//       "description": "User profile ID associated with this request.",
47157	//       "format": "int64",
47158	//       "location": "path",
47159	//       "required": true,
47160	//       "type": "string"
47161	//     }
47162	//   },
47163	//   "path": "userprofiles/{profileId}/subaccounts",
47164	//   "request": {
47165	//     "$ref": "Subaccount"
47166	//   },
47167	//   "response": {
47168	//     "$ref": "Subaccount"
47169	//   },
47170	//   "scopes": [
47171	//     "https://www.googleapis.com/auth/dfatrafficking"
47172	//   ]
47173	// }
47174
47175}
47176
47177// method id "dfareporting.subaccounts.list":
47178
47179type SubaccountsListCall struct {
47180	s            *Service
47181	profileId    int64
47182	urlParams_   gensupport.URLParams
47183	ifNoneMatch_ string
47184	ctx_         context.Context
47185	header_      http.Header
47186}
47187
47188// List: Gets a list of subaccounts, possibly filtered. This method
47189// supports paging.
47190func (r *SubaccountsService) List(profileId int64) *SubaccountsListCall {
47191	c := &SubaccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47192	c.profileId = profileId
47193	return c
47194}
47195
47196// Ids sets the optional parameter "ids": Select only subaccounts with
47197// these IDs.
47198func (c *SubaccountsListCall) Ids(ids ...int64) *SubaccountsListCall {
47199	var ids_ []string
47200	for _, v := range ids {
47201		ids_ = append(ids_, fmt.Sprint(v))
47202	}
47203	c.urlParams_.SetMulti("ids", ids_)
47204	return c
47205}
47206
47207// MaxResults sets the optional parameter "maxResults": Maximum number
47208// of results to return.
47209func (c *SubaccountsListCall) MaxResults(maxResults int64) *SubaccountsListCall {
47210	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47211	return c
47212}
47213
47214// PageToken sets the optional parameter "pageToken": Value of the
47215// nextPageToken from the previous result page.
47216func (c *SubaccountsListCall) PageToken(pageToken string) *SubaccountsListCall {
47217	c.urlParams_.Set("pageToken", pageToken)
47218	return c
47219}
47220
47221// SearchString sets the optional parameter "searchString": Allows
47222// searching for objects by name or ID. Wildcards (*) are allowed. For
47223// example, "subaccount*2015" will return objects with names like
47224// "subaccount June 2015", "subaccount April 2015", or simply
47225// "subaccount 2015". Most of the searches also add wildcards implicitly
47226// at the start and the end of the search string. For example, a search
47227// string of "subaccount" will match objects with name "my subaccount",
47228// "subaccount 2015", or simply "subaccount".
47229func (c *SubaccountsListCall) SearchString(searchString string) *SubaccountsListCall {
47230	c.urlParams_.Set("searchString", searchString)
47231	return c
47232}
47233
47234// SortField sets the optional parameter "sortField": Field by which to
47235// sort the list.
47236//
47237// Possible values:
47238//   "ID" (default)
47239//   "NAME"
47240func (c *SubaccountsListCall) SortField(sortField string) *SubaccountsListCall {
47241	c.urlParams_.Set("sortField", sortField)
47242	return c
47243}
47244
47245// SortOrder sets the optional parameter "sortOrder": Order of sorted
47246// results.
47247//
47248// Possible values:
47249//   "ASCENDING" (default)
47250//   "DESCENDING"
47251func (c *SubaccountsListCall) SortOrder(sortOrder string) *SubaccountsListCall {
47252	c.urlParams_.Set("sortOrder", sortOrder)
47253	return c
47254}
47255
47256// Fields allows partial responses to be retrieved. See
47257// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47258// for more information.
47259func (c *SubaccountsListCall) Fields(s ...googleapi.Field) *SubaccountsListCall {
47260	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47261	return c
47262}
47263
47264// IfNoneMatch sets the optional parameter which makes the operation
47265// fail if the object's ETag matches the given value. This is useful for
47266// getting updates only after the object has changed since the last
47267// request. Use googleapi.IsNotModified to check whether the response
47268// error from Do is the result of In-None-Match.
47269func (c *SubaccountsListCall) IfNoneMatch(entityTag string) *SubaccountsListCall {
47270	c.ifNoneMatch_ = entityTag
47271	return c
47272}
47273
47274// Context sets the context to be used in this call's Do method. Any
47275// pending HTTP request will be aborted if the provided context is
47276// canceled.
47277func (c *SubaccountsListCall) Context(ctx context.Context) *SubaccountsListCall {
47278	c.ctx_ = ctx
47279	return c
47280}
47281
47282// Header returns an http.Header that can be modified by the caller to
47283// add HTTP headers to the request.
47284func (c *SubaccountsListCall) Header() http.Header {
47285	if c.header_ == nil {
47286		c.header_ = make(http.Header)
47287	}
47288	return c.header_
47289}
47290
47291func (c *SubaccountsListCall) doRequest(alt string) (*http.Response, error) {
47292	reqHeaders := make(http.Header)
47293	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
47294	for k, v := range c.header_ {
47295		reqHeaders[k] = v
47296	}
47297	reqHeaders.Set("User-Agent", c.s.userAgent())
47298	if c.ifNoneMatch_ != "" {
47299		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47300	}
47301	var body io.Reader = nil
47302	c.urlParams_.Set("alt", alt)
47303	c.urlParams_.Set("prettyPrint", "false")
47304	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47305	urls += "?" + c.urlParams_.Encode()
47306	req, err := http.NewRequest("GET", urls, body)
47307	if err != nil {
47308		return nil, err
47309	}
47310	req.Header = reqHeaders
47311	googleapi.Expand(req.URL, map[string]string{
47312		"profileId": strconv.FormatInt(c.profileId, 10),
47313	})
47314	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47315}
47316
47317// Do executes the "dfareporting.subaccounts.list" call.
47318// Exactly one of *SubaccountsListResponse or error will be non-nil. Any
47319// non-2xx status code is an error. Response headers are in either
47320// *SubaccountsListResponse.ServerResponse.Header or (if a response was
47321// returned at all) in error.(*googleapi.Error).Header. Use
47322// googleapi.IsNotModified to check whether the returned error was
47323// because http.StatusNotModified was returned.
47324func (c *SubaccountsListCall) Do(opts ...googleapi.CallOption) (*SubaccountsListResponse, error) {
47325	gensupport.SetOptions(c.urlParams_, opts...)
47326	res, err := c.doRequest("json")
47327	if res != nil && res.StatusCode == http.StatusNotModified {
47328		if res.Body != nil {
47329			res.Body.Close()
47330		}
47331		return nil, &googleapi.Error{
47332			Code:   res.StatusCode,
47333			Header: res.Header,
47334		}
47335	}
47336	if err != nil {
47337		return nil, err
47338	}
47339	defer googleapi.CloseBody(res)
47340	if err := googleapi.CheckResponse(res); err != nil {
47341		return nil, err
47342	}
47343	ret := &SubaccountsListResponse{
47344		ServerResponse: googleapi.ServerResponse{
47345			Header:         res.Header,
47346			HTTPStatusCode: res.StatusCode,
47347		},
47348	}
47349	target := &ret
47350	if err := gensupport.DecodeResponse(target, res); err != nil {
47351		return nil, err
47352	}
47353	return ret, nil
47354	// {
47355	//   "description": "Gets a list of subaccounts, possibly filtered. This method supports paging.",
47356	//   "httpMethod": "GET",
47357	//   "id": "dfareporting.subaccounts.list",
47358	//   "parameterOrder": [
47359	//     "profileId"
47360	//   ],
47361	//   "parameters": {
47362	//     "ids": {
47363	//       "description": "Select only subaccounts with these IDs.",
47364	//       "format": "int64",
47365	//       "location": "query",
47366	//       "repeated": true,
47367	//       "type": "string"
47368	//     },
47369	//     "maxResults": {
47370	//       "default": "1000",
47371	//       "description": "Maximum number of results to return.",
47372	//       "format": "int32",
47373	//       "location": "query",
47374	//       "maximum": "1000",
47375	//       "minimum": "0",
47376	//       "type": "integer"
47377	//     },
47378	//     "pageToken": {
47379	//       "description": "Value of the nextPageToken from the previous result page.",
47380	//       "location": "query",
47381	//       "type": "string"
47382	//     },
47383	//     "profileId": {
47384	//       "description": "User profile ID associated with this request.",
47385	//       "format": "int64",
47386	//       "location": "path",
47387	//       "required": true,
47388	//       "type": "string"
47389	//     },
47390	//     "searchString": {
47391	//       "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\".",
47392	//       "location": "query",
47393	//       "type": "string"
47394	//     },
47395	//     "sortField": {
47396	//       "default": "ID",
47397	//       "description": "Field by which to sort the list.",
47398	//       "enum": [
47399	//         "ID",
47400	//         "NAME"
47401	//       ],
47402	//       "enumDescriptions": [
47403	//         "",
47404	//         ""
47405	//       ],
47406	//       "location": "query",
47407	//       "type": "string"
47408	//     },
47409	//     "sortOrder": {
47410	//       "default": "ASCENDING",
47411	//       "description": "Order of sorted results.",
47412	//       "enum": [
47413	//         "ASCENDING",
47414	//         "DESCENDING"
47415	//       ],
47416	//       "enumDescriptions": [
47417	//         "",
47418	//         ""
47419	//       ],
47420	//       "location": "query",
47421	//       "type": "string"
47422	//     }
47423	//   },
47424	//   "path": "userprofiles/{profileId}/subaccounts",
47425	//   "response": {
47426	//     "$ref": "SubaccountsListResponse"
47427	//   },
47428	//   "scopes": [
47429	//     "https://www.googleapis.com/auth/dfatrafficking"
47430	//   ]
47431	// }
47432
47433}
47434
47435// Pages invokes f for each page of results.
47436// A non-nil error returned from f will halt the iteration.
47437// The provided context supersedes any context provided to the Context method.
47438func (c *SubaccountsListCall) Pages(ctx context.Context, f func(*SubaccountsListResponse) error) error {
47439	c.ctx_ = ctx
47440	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47441	for {
47442		x, err := c.Do()
47443		if err != nil {
47444			return err
47445		}
47446		if err := f(x); err != nil {
47447			return err
47448		}
47449		if x.NextPageToken == "" {
47450			return nil
47451		}
47452		c.PageToken(x.NextPageToken)
47453	}
47454}
47455
47456// method id "dfareporting.subaccounts.patch":
47457
47458type SubaccountsPatchCall struct {
47459	s          *Service
47460	profileId  int64
47461	subaccount *Subaccount
47462	urlParams_ gensupport.URLParams
47463	ctx_       context.Context
47464	header_    http.Header
47465}
47466
47467// Patch: Updates an existing subaccount. This method supports patch
47468// semantics.
47469func (r *SubaccountsService) Patch(profileId int64, id int64, subaccount *Subaccount) *SubaccountsPatchCall {
47470	c := &SubaccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47471	c.profileId = profileId
47472	c.urlParams_.Set("id", fmt.Sprint(id))
47473	c.subaccount = subaccount
47474	return c
47475}
47476
47477// Fields allows partial responses to be retrieved. See
47478// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47479// for more information.
47480func (c *SubaccountsPatchCall) Fields(s ...googleapi.Field) *SubaccountsPatchCall {
47481	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47482	return c
47483}
47484
47485// Context sets the context to be used in this call's Do method. Any
47486// pending HTTP request will be aborted if the provided context is
47487// canceled.
47488func (c *SubaccountsPatchCall) Context(ctx context.Context) *SubaccountsPatchCall {
47489	c.ctx_ = ctx
47490	return c
47491}
47492
47493// Header returns an http.Header that can be modified by the caller to
47494// add HTTP headers to the request.
47495func (c *SubaccountsPatchCall) Header() http.Header {
47496	if c.header_ == nil {
47497		c.header_ = make(http.Header)
47498	}
47499	return c.header_
47500}
47501
47502func (c *SubaccountsPatchCall) doRequest(alt string) (*http.Response, error) {
47503	reqHeaders := make(http.Header)
47504	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
47505	for k, v := range c.header_ {
47506		reqHeaders[k] = v
47507	}
47508	reqHeaders.Set("User-Agent", c.s.userAgent())
47509	var body io.Reader = nil
47510	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47511	if err != nil {
47512		return nil, err
47513	}
47514	reqHeaders.Set("Content-Type", "application/json")
47515	c.urlParams_.Set("alt", alt)
47516	c.urlParams_.Set("prettyPrint", "false")
47517	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47518	urls += "?" + c.urlParams_.Encode()
47519	req, err := http.NewRequest("PATCH", urls, body)
47520	if err != nil {
47521		return nil, err
47522	}
47523	req.Header = reqHeaders
47524	googleapi.Expand(req.URL, map[string]string{
47525		"profileId": strconv.FormatInt(c.profileId, 10),
47526	})
47527	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47528}
47529
47530// Do executes the "dfareporting.subaccounts.patch" call.
47531// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
47532// status code is an error. Response headers are in either
47533// *Subaccount.ServerResponse.Header or (if a response was returned at
47534// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47535// to check whether the returned error was because
47536// http.StatusNotModified was returned.
47537func (c *SubaccountsPatchCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47538	gensupport.SetOptions(c.urlParams_, opts...)
47539	res, err := c.doRequest("json")
47540	if res != nil && res.StatusCode == http.StatusNotModified {
47541		if res.Body != nil {
47542			res.Body.Close()
47543		}
47544		return nil, &googleapi.Error{
47545			Code:   res.StatusCode,
47546			Header: res.Header,
47547		}
47548	}
47549	if err != nil {
47550		return nil, err
47551	}
47552	defer googleapi.CloseBody(res)
47553	if err := googleapi.CheckResponse(res); err != nil {
47554		return nil, err
47555	}
47556	ret := &Subaccount{
47557		ServerResponse: googleapi.ServerResponse{
47558			Header:         res.Header,
47559			HTTPStatusCode: res.StatusCode,
47560		},
47561	}
47562	target := &ret
47563	if err := gensupport.DecodeResponse(target, res); err != nil {
47564		return nil, err
47565	}
47566	return ret, nil
47567	// {
47568	//   "description": "Updates an existing subaccount. This method supports patch semantics.",
47569	//   "httpMethod": "PATCH",
47570	//   "id": "dfareporting.subaccounts.patch",
47571	//   "parameterOrder": [
47572	//     "profileId",
47573	//     "id"
47574	//   ],
47575	//   "parameters": {
47576	//     "id": {
47577	//       "description": "Subaccount ID.",
47578	//       "format": "int64",
47579	//       "location": "query",
47580	//       "required": true,
47581	//       "type": "string"
47582	//     },
47583	//     "profileId": {
47584	//       "description": "User profile ID associated with this request.",
47585	//       "format": "int64",
47586	//       "location": "path",
47587	//       "required": true,
47588	//       "type": "string"
47589	//     }
47590	//   },
47591	//   "path": "userprofiles/{profileId}/subaccounts",
47592	//   "request": {
47593	//     "$ref": "Subaccount"
47594	//   },
47595	//   "response": {
47596	//     "$ref": "Subaccount"
47597	//   },
47598	//   "scopes": [
47599	//     "https://www.googleapis.com/auth/dfatrafficking"
47600	//   ]
47601	// }
47602
47603}
47604
47605// method id "dfareporting.subaccounts.update":
47606
47607type SubaccountsUpdateCall struct {
47608	s          *Service
47609	profileId  int64
47610	subaccount *Subaccount
47611	urlParams_ gensupport.URLParams
47612	ctx_       context.Context
47613	header_    http.Header
47614}
47615
47616// Update: Updates an existing subaccount.
47617func (r *SubaccountsService) Update(profileId int64, subaccount *Subaccount) *SubaccountsUpdateCall {
47618	c := &SubaccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47619	c.profileId = profileId
47620	c.subaccount = subaccount
47621	return c
47622}
47623
47624// Fields allows partial responses to be retrieved. See
47625// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47626// for more information.
47627func (c *SubaccountsUpdateCall) Fields(s ...googleapi.Field) *SubaccountsUpdateCall {
47628	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47629	return c
47630}
47631
47632// Context sets the context to be used in this call's Do method. Any
47633// pending HTTP request will be aborted if the provided context is
47634// canceled.
47635func (c *SubaccountsUpdateCall) Context(ctx context.Context) *SubaccountsUpdateCall {
47636	c.ctx_ = ctx
47637	return c
47638}
47639
47640// Header returns an http.Header that can be modified by the caller to
47641// add HTTP headers to the request.
47642func (c *SubaccountsUpdateCall) Header() http.Header {
47643	if c.header_ == nil {
47644		c.header_ = make(http.Header)
47645	}
47646	return c.header_
47647}
47648
47649func (c *SubaccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
47650	reqHeaders := make(http.Header)
47651	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
47652	for k, v := range c.header_ {
47653		reqHeaders[k] = v
47654	}
47655	reqHeaders.Set("User-Agent", c.s.userAgent())
47656	var body io.Reader = nil
47657	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47658	if err != nil {
47659		return nil, err
47660	}
47661	reqHeaders.Set("Content-Type", "application/json")
47662	c.urlParams_.Set("alt", alt)
47663	c.urlParams_.Set("prettyPrint", "false")
47664	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47665	urls += "?" + c.urlParams_.Encode()
47666	req, err := http.NewRequest("PUT", urls, body)
47667	if err != nil {
47668		return nil, err
47669	}
47670	req.Header = reqHeaders
47671	googleapi.Expand(req.URL, map[string]string{
47672		"profileId": strconv.FormatInt(c.profileId, 10),
47673	})
47674	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47675}
47676
47677// Do executes the "dfareporting.subaccounts.update" call.
47678// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
47679// status code is an error. Response headers are in either
47680// *Subaccount.ServerResponse.Header or (if a response was returned at
47681// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47682// to check whether the returned error was because
47683// http.StatusNotModified was returned.
47684func (c *SubaccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47685	gensupport.SetOptions(c.urlParams_, opts...)
47686	res, err := c.doRequest("json")
47687	if res != nil && res.StatusCode == http.StatusNotModified {
47688		if res.Body != nil {
47689			res.Body.Close()
47690		}
47691		return nil, &googleapi.Error{
47692			Code:   res.StatusCode,
47693			Header: res.Header,
47694		}
47695	}
47696	if err != nil {
47697		return nil, err
47698	}
47699	defer googleapi.CloseBody(res)
47700	if err := googleapi.CheckResponse(res); err != nil {
47701		return nil, err
47702	}
47703	ret := &Subaccount{
47704		ServerResponse: googleapi.ServerResponse{
47705			Header:         res.Header,
47706			HTTPStatusCode: res.StatusCode,
47707		},
47708	}
47709	target := &ret
47710	if err := gensupport.DecodeResponse(target, res); err != nil {
47711		return nil, err
47712	}
47713	return ret, nil
47714	// {
47715	//   "description": "Updates an existing subaccount.",
47716	//   "httpMethod": "PUT",
47717	//   "id": "dfareporting.subaccounts.update",
47718	//   "parameterOrder": [
47719	//     "profileId"
47720	//   ],
47721	//   "parameters": {
47722	//     "profileId": {
47723	//       "description": "User profile ID associated with this request.",
47724	//       "format": "int64",
47725	//       "location": "path",
47726	//       "required": true,
47727	//       "type": "string"
47728	//     }
47729	//   },
47730	//   "path": "userprofiles/{profileId}/subaccounts",
47731	//   "request": {
47732	//     "$ref": "Subaccount"
47733	//   },
47734	//   "response": {
47735	//     "$ref": "Subaccount"
47736	//   },
47737	//   "scopes": [
47738	//     "https://www.googleapis.com/auth/dfatrafficking"
47739	//   ]
47740	// }
47741
47742}
47743
47744// method id "dfareporting.targetableRemarketingLists.get":
47745
47746type TargetableRemarketingListsGetCall struct {
47747	s            *Service
47748	profileId    int64
47749	id           int64
47750	urlParams_   gensupport.URLParams
47751	ifNoneMatch_ string
47752	ctx_         context.Context
47753	header_      http.Header
47754}
47755
47756// Get: Gets one remarketing list by ID.
47757func (r *TargetableRemarketingListsService) Get(profileId int64, id int64) *TargetableRemarketingListsGetCall {
47758	c := &TargetableRemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47759	c.profileId = profileId
47760	c.id = id
47761	return c
47762}
47763
47764// Fields allows partial responses to be retrieved. See
47765// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47766// for more information.
47767func (c *TargetableRemarketingListsGetCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsGetCall {
47768	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47769	return c
47770}
47771
47772// IfNoneMatch sets the optional parameter which makes the operation
47773// fail if the object's ETag matches the given value. This is useful for
47774// getting updates only after the object has changed since the last
47775// request. Use googleapi.IsNotModified to check whether the response
47776// error from Do is the result of In-None-Match.
47777func (c *TargetableRemarketingListsGetCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsGetCall {
47778	c.ifNoneMatch_ = entityTag
47779	return c
47780}
47781
47782// Context sets the context to be used in this call's Do method. Any
47783// pending HTTP request will be aborted if the provided context is
47784// canceled.
47785func (c *TargetableRemarketingListsGetCall) Context(ctx context.Context) *TargetableRemarketingListsGetCall {
47786	c.ctx_ = ctx
47787	return c
47788}
47789
47790// Header returns an http.Header that can be modified by the caller to
47791// add HTTP headers to the request.
47792func (c *TargetableRemarketingListsGetCall) Header() http.Header {
47793	if c.header_ == nil {
47794		c.header_ = make(http.Header)
47795	}
47796	return c.header_
47797}
47798
47799func (c *TargetableRemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
47800	reqHeaders := make(http.Header)
47801	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
47802	for k, v := range c.header_ {
47803		reqHeaders[k] = v
47804	}
47805	reqHeaders.Set("User-Agent", c.s.userAgent())
47806	if c.ifNoneMatch_ != "" {
47807		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47808	}
47809	var body io.Reader = nil
47810	c.urlParams_.Set("alt", alt)
47811	c.urlParams_.Set("prettyPrint", "false")
47812	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists/{id}")
47813	urls += "?" + c.urlParams_.Encode()
47814	req, err := http.NewRequest("GET", urls, body)
47815	if err != nil {
47816		return nil, err
47817	}
47818	req.Header = reqHeaders
47819	googleapi.Expand(req.URL, map[string]string{
47820		"profileId": strconv.FormatInt(c.profileId, 10),
47821		"id":        strconv.FormatInt(c.id, 10),
47822	})
47823	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47824}
47825
47826// Do executes the "dfareporting.targetableRemarketingLists.get" call.
47827// Exactly one of *TargetableRemarketingList or error will be non-nil.
47828// Any non-2xx status code is an error. Response headers are in either
47829// *TargetableRemarketingList.ServerResponse.Header or (if a response
47830// was returned at all) in error.(*googleapi.Error).Header. Use
47831// googleapi.IsNotModified to check whether the returned error was
47832// because http.StatusNotModified was returned.
47833func (c *TargetableRemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingList, error) {
47834	gensupport.SetOptions(c.urlParams_, opts...)
47835	res, err := c.doRequest("json")
47836	if res != nil && res.StatusCode == http.StatusNotModified {
47837		if res.Body != nil {
47838			res.Body.Close()
47839		}
47840		return nil, &googleapi.Error{
47841			Code:   res.StatusCode,
47842			Header: res.Header,
47843		}
47844	}
47845	if err != nil {
47846		return nil, err
47847	}
47848	defer googleapi.CloseBody(res)
47849	if err := googleapi.CheckResponse(res); err != nil {
47850		return nil, err
47851	}
47852	ret := &TargetableRemarketingList{
47853		ServerResponse: googleapi.ServerResponse{
47854			Header:         res.Header,
47855			HTTPStatusCode: res.StatusCode,
47856		},
47857	}
47858	target := &ret
47859	if err := gensupport.DecodeResponse(target, res); err != nil {
47860		return nil, err
47861	}
47862	return ret, nil
47863	// {
47864	//   "description": "Gets one remarketing list by ID.",
47865	//   "httpMethod": "GET",
47866	//   "id": "dfareporting.targetableRemarketingLists.get",
47867	//   "parameterOrder": [
47868	//     "profileId",
47869	//     "id"
47870	//   ],
47871	//   "parameters": {
47872	//     "id": {
47873	//       "description": "Remarketing list ID.",
47874	//       "format": "int64",
47875	//       "location": "path",
47876	//       "required": true,
47877	//       "type": "string"
47878	//     },
47879	//     "profileId": {
47880	//       "description": "User profile ID associated with this request.",
47881	//       "format": "int64",
47882	//       "location": "path",
47883	//       "required": true,
47884	//       "type": "string"
47885	//     }
47886	//   },
47887	//   "path": "userprofiles/{profileId}/targetableRemarketingLists/{id}",
47888	//   "response": {
47889	//     "$ref": "TargetableRemarketingList"
47890	//   },
47891	//   "scopes": [
47892	//     "https://www.googleapis.com/auth/dfatrafficking"
47893	//   ]
47894	// }
47895
47896}
47897
47898// method id "dfareporting.targetableRemarketingLists.list":
47899
47900type TargetableRemarketingListsListCall struct {
47901	s            *Service
47902	profileId    int64
47903	urlParams_   gensupport.URLParams
47904	ifNoneMatch_ string
47905	ctx_         context.Context
47906	header_      http.Header
47907}
47908
47909// List: Retrieves a list of targetable remarketing lists, possibly
47910// filtered. This method supports paging.
47911func (r *TargetableRemarketingListsService) List(profileId int64, advertiserId int64) *TargetableRemarketingListsListCall {
47912	c := &TargetableRemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47913	c.profileId = profileId
47914	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
47915	return c
47916}
47917
47918// Active sets the optional parameter "active": Select only active or
47919// only inactive targetable remarketing lists.
47920func (c *TargetableRemarketingListsListCall) Active(active bool) *TargetableRemarketingListsListCall {
47921	c.urlParams_.Set("active", fmt.Sprint(active))
47922	return c
47923}
47924
47925// MaxResults sets the optional parameter "maxResults": Maximum number
47926// of results to return.
47927func (c *TargetableRemarketingListsListCall) MaxResults(maxResults int64) *TargetableRemarketingListsListCall {
47928	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47929	return c
47930}
47931
47932// Name sets the optional parameter "name": Allows searching for objects
47933// by name or ID. Wildcards (*) are allowed. For example, "remarketing
47934// list*2015" will return objects with names like "remarketing list June
47935// 2015", "remarketing list April 2015", or simply "remarketing list
47936// 2015". Most of the searches also add wildcards implicitly at the
47937// start and the end of the search string. For example, a search string
47938// of "remarketing list" will match objects with name "my remarketing
47939// list", "remarketing list 2015", or simply "remarketing list".
47940func (c *TargetableRemarketingListsListCall) Name(name string) *TargetableRemarketingListsListCall {
47941	c.urlParams_.Set("name", name)
47942	return c
47943}
47944
47945// PageToken sets the optional parameter "pageToken": Value of the
47946// nextPageToken from the previous result page.
47947func (c *TargetableRemarketingListsListCall) PageToken(pageToken string) *TargetableRemarketingListsListCall {
47948	c.urlParams_.Set("pageToken", pageToken)
47949	return c
47950}
47951
47952// SortField sets the optional parameter "sortField": Field by which to
47953// sort the list.
47954//
47955// Possible values:
47956//   "ID" (default)
47957//   "NAME"
47958func (c *TargetableRemarketingListsListCall) SortField(sortField string) *TargetableRemarketingListsListCall {
47959	c.urlParams_.Set("sortField", sortField)
47960	return c
47961}
47962
47963// SortOrder sets the optional parameter "sortOrder": Order of sorted
47964// results.
47965//
47966// Possible values:
47967//   "ASCENDING" (default)
47968//   "DESCENDING"
47969func (c *TargetableRemarketingListsListCall) SortOrder(sortOrder string) *TargetableRemarketingListsListCall {
47970	c.urlParams_.Set("sortOrder", sortOrder)
47971	return c
47972}
47973
47974// Fields allows partial responses to be retrieved. See
47975// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47976// for more information.
47977func (c *TargetableRemarketingListsListCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsListCall {
47978	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47979	return c
47980}
47981
47982// IfNoneMatch sets the optional parameter which makes the operation
47983// fail if the object's ETag matches the given value. This is useful for
47984// getting updates only after the object has changed since the last
47985// request. Use googleapi.IsNotModified to check whether the response
47986// error from Do is the result of In-None-Match.
47987func (c *TargetableRemarketingListsListCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsListCall {
47988	c.ifNoneMatch_ = entityTag
47989	return c
47990}
47991
47992// Context sets the context to be used in this call's Do method. Any
47993// pending HTTP request will be aborted if the provided context is
47994// canceled.
47995func (c *TargetableRemarketingListsListCall) Context(ctx context.Context) *TargetableRemarketingListsListCall {
47996	c.ctx_ = ctx
47997	return c
47998}
47999
48000// Header returns an http.Header that can be modified by the caller to
48001// add HTTP headers to the request.
48002func (c *TargetableRemarketingListsListCall) Header() http.Header {
48003	if c.header_ == nil {
48004		c.header_ = make(http.Header)
48005	}
48006	return c.header_
48007}
48008
48009func (c *TargetableRemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
48010	reqHeaders := make(http.Header)
48011	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
48012	for k, v := range c.header_ {
48013		reqHeaders[k] = v
48014	}
48015	reqHeaders.Set("User-Agent", c.s.userAgent())
48016	if c.ifNoneMatch_ != "" {
48017		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48018	}
48019	var body io.Reader = nil
48020	c.urlParams_.Set("alt", alt)
48021	c.urlParams_.Set("prettyPrint", "false")
48022	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists")
48023	urls += "?" + c.urlParams_.Encode()
48024	req, err := http.NewRequest("GET", urls, body)
48025	if err != nil {
48026		return nil, err
48027	}
48028	req.Header = reqHeaders
48029	googleapi.Expand(req.URL, map[string]string{
48030		"profileId": strconv.FormatInt(c.profileId, 10),
48031	})
48032	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48033}
48034
48035// Do executes the "dfareporting.targetableRemarketingLists.list" call.
48036// Exactly one of *TargetableRemarketingListsListResponse or error will
48037// be non-nil. Any non-2xx status code is an error. Response headers are
48038// in either
48039// *TargetableRemarketingListsListResponse.ServerResponse.Header or (if
48040// a response was returned at all) in error.(*googleapi.Error).Header.
48041// Use googleapi.IsNotModified to check whether the returned error was
48042// because http.StatusNotModified was returned.
48043func (c *TargetableRemarketingListsListCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingListsListResponse, error) {
48044	gensupport.SetOptions(c.urlParams_, opts...)
48045	res, err := c.doRequest("json")
48046	if res != nil && res.StatusCode == http.StatusNotModified {
48047		if res.Body != nil {
48048			res.Body.Close()
48049		}
48050		return nil, &googleapi.Error{
48051			Code:   res.StatusCode,
48052			Header: res.Header,
48053		}
48054	}
48055	if err != nil {
48056		return nil, err
48057	}
48058	defer googleapi.CloseBody(res)
48059	if err := googleapi.CheckResponse(res); err != nil {
48060		return nil, err
48061	}
48062	ret := &TargetableRemarketingListsListResponse{
48063		ServerResponse: googleapi.ServerResponse{
48064			Header:         res.Header,
48065			HTTPStatusCode: res.StatusCode,
48066		},
48067	}
48068	target := &ret
48069	if err := gensupport.DecodeResponse(target, res); err != nil {
48070		return nil, err
48071	}
48072	return ret, nil
48073	// {
48074	//   "description": "Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging.",
48075	//   "httpMethod": "GET",
48076	//   "id": "dfareporting.targetableRemarketingLists.list",
48077	//   "parameterOrder": [
48078	//     "profileId",
48079	//     "advertiserId"
48080	//   ],
48081	//   "parameters": {
48082	//     "active": {
48083	//       "description": "Select only active or only inactive targetable remarketing lists.",
48084	//       "location": "query",
48085	//       "type": "boolean"
48086	//     },
48087	//     "advertiserId": {
48088	//       "description": "Select only targetable remarketing lists targetable by these advertisers.",
48089	//       "format": "int64",
48090	//       "location": "query",
48091	//       "required": true,
48092	//       "type": "string"
48093	//     },
48094	//     "maxResults": {
48095	//       "default": "1000",
48096	//       "description": "Maximum number of results to return.",
48097	//       "format": "int32",
48098	//       "location": "query",
48099	//       "maximum": "1000",
48100	//       "minimum": "0",
48101	//       "type": "integer"
48102	//     },
48103	//     "name": {
48104	//       "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\".",
48105	//       "location": "query",
48106	//       "type": "string"
48107	//     },
48108	//     "pageToken": {
48109	//       "description": "Value of the nextPageToken from the previous result page.",
48110	//       "location": "query",
48111	//       "type": "string"
48112	//     },
48113	//     "profileId": {
48114	//       "description": "User profile ID associated with this request.",
48115	//       "format": "int64",
48116	//       "location": "path",
48117	//       "required": true,
48118	//       "type": "string"
48119	//     },
48120	//     "sortField": {
48121	//       "default": "ID",
48122	//       "description": "Field by which to sort the list.",
48123	//       "enum": [
48124	//         "ID",
48125	//         "NAME"
48126	//       ],
48127	//       "enumDescriptions": [
48128	//         "",
48129	//         ""
48130	//       ],
48131	//       "location": "query",
48132	//       "type": "string"
48133	//     },
48134	//     "sortOrder": {
48135	//       "default": "ASCENDING",
48136	//       "description": "Order of sorted results.",
48137	//       "enum": [
48138	//         "ASCENDING",
48139	//         "DESCENDING"
48140	//       ],
48141	//       "enumDescriptions": [
48142	//         "",
48143	//         ""
48144	//       ],
48145	//       "location": "query",
48146	//       "type": "string"
48147	//     }
48148	//   },
48149	//   "path": "userprofiles/{profileId}/targetableRemarketingLists",
48150	//   "response": {
48151	//     "$ref": "TargetableRemarketingListsListResponse"
48152	//   },
48153	//   "scopes": [
48154	//     "https://www.googleapis.com/auth/dfatrafficking"
48155	//   ]
48156	// }
48157
48158}
48159
48160// Pages invokes f for each page of results.
48161// A non-nil error returned from f will halt the iteration.
48162// The provided context supersedes any context provided to the Context method.
48163func (c *TargetableRemarketingListsListCall) Pages(ctx context.Context, f func(*TargetableRemarketingListsListResponse) error) error {
48164	c.ctx_ = ctx
48165	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
48166	for {
48167		x, err := c.Do()
48168		if err != nil {
48169			return err
48170		}
48171		if err := f(x); err != nil {
48172			return err
48173		}
48174		if x.NextPageToken == "" {
48175			return nil
48176		}
48177		c.PageToken(x.NextPageToken)
48178	}
48179}
48180
48181// method id "dfareporting.targetingTemplates.get":
48182
48183type TargetingTemplatesGetCall struct {
48184	s            *Service
48185	profileId    int64
48186	id           int64
48187	urlParams_   gensupport.URLParams
48188	ifNoneMatch_ string
48189	ctx_         context.Context
48190	header_      http.Header
48191}
48192
48193// Get: Gets one targeting template by ID.
48194func (r *TargetingTemplatesService) Get(profileId int64, id int64) *TargetingTemplatesGetCall {
48195	c := &TargetingTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48196	c.profileId = profileId
48197	c.id = id
48198	return c
48199}
48200
48201// Fields allows partial responses to be retrieved. See
48202// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48203// for more information.
48204func (c *TargetingTemplatesGetCall) Fields(s ...googleapi.Field) *TargetingTemplatesGetCall {
48205	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48206	return c
48207}
48208
48209// IfNoneMatch sets the optional parameter which makes the operation
48210// fail if the object's ETag matches the given value. This is useful for
48211// getting updates only after the object has changed since the last
48212// request. Use googleapi.IsNotModified to check whether the response
48213// error from Do is the result of In-None-Match.
48214func (c *TargetingTemplatesGetCall) IfNoneMatch(entityTag string) *TargetingTemplatesGetCall {
48215	c.ifNoneMatch_ = entityTag
48216	return c
48217}
48218
48219// Context sets the context to be used in this call's Do method. Any
48220// pending HTTP request will be aborted if the provided context is
48221// canceled.
48222func (c *TargetingTemplatesGetCall) Context(ctx context.Context) *TargetingTemplatesGetCall {
48223	c.ctx_ = ctx
48224	return c
48225}
48226
48227// Header returns an http.Header that can be modified by the caller to
48228// add HTTP headers to the request.
48229func (c *TargetingTemplatesGetCall) Header() http.Header {
48230	if c.header_ == nil {
48231		c.header_ = make(http.Header)
48232	}
48233	return c.header_
48234}
48235
48236func (c *TargetingTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
48237	reqHeaders := make(http.Header)
48238	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
48239	for k, v := range c.header_ {
48240		reqHeaders[k] = v
48241	}
48242	reqHeaders.Set("User-Agent", c.s.userAgent())
48243	if c.ifNoneMatch_ != "" {
48244		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48245	}
48246	var body io.Reader = nil
48247	c.urlParams_.Set("alt", alt)
48248	c.urlParams_.Set("prettyPrint", "false")
48249	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates/{id}")
48250	urls += "?" + c.urlParams_.Encode()
48251	req, err := http.NewRequest("GET", urls, body)
48252	if err != nil {
48253		return nil, err
48254	}
48255	req.Header = reqHeaders
48256	googleapi.Expand(req.URL, map[string]string{
48257		"profileId": strconv.FormatInt(c.profileId, 10),
48258		"id":        strconv.FormatInt(c.id, 10),
48259	})
48260	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48261}
48262
48263// Do executes the "dfareporting.targetingTemplates.get" call.
48264// Exactly one of *TargetingTemplate or error will be non-nil. Any
48265// non-2xx status code is an error. Response headers are in either
48266// *TargetingTemplate.ServerResponse.Header or (if a response was
48267// returned at all) in error.(*googleapi.Error).Header. Use
48268// googleapi.IsNotModified to check whether the returned error was
48269// because http.StatusNotModified was returned.
48270func (c *TargetingTemplatesGetCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48271	gensupport.SetOptions(c.urlParams_, opts...)
48272	res, err := c.doRequest("json")
48273	if res != nil && res.StatusCode == http.StatusNotModified {
48274		if res.Body != nil {
48275			res.Body.Close()
48276		}
48277		return nil, &googleapi.Error{
48278			Code:   res.StatusCode,
48279			Header: res.Header,
48280		}
48281	}
48282	if err != nil {
48283		return nil, err
48284	}
48285	defer googleapi.CloseBody(res)
48286	if err := googleapi.CheckResponse(res); err != nil {
48287		return nil, err
48288	}
48289	ret := &TargetingTemplate{
48290		ServerResponse: googleapi.ServerResponse{
48291			Header:         res.Header,
48292			HTTPStatusCode: res.StatusCode,
48293		},
48294	}
48295	target := &ret
48296	if err := gensupport.DecodeResponse(target, res); err != nil {
48297		return nil, err
48298	}
48299	return ret, nil
48300	// {
48301	//   "description": "Gets one targeting template by ID.",
48302	//   "httpMethod": "GET",
48303	//   "id": "dfareporting.targetingTemplates.get",
48304	//   "parameterOrder": [
48305	//     "profileId",
48306	//     "id"
48307	//   ],
48308	//   "parameters": {
48309	//     "id": {
48310	//       "description": "Targeting template ID.",
48311	//       "format": "int64",
48312	//       "location": "path",
48313	//       "required": true,
48314	//       "type": "string"
48315	//     },
48316	//     "profileId": {
48317	//       "description": "User profile ID associated with this request.",
48318	//       "format": "int64",
48319	//       "location": "path",
48320	//       "required": true,
48321	//       "type": "string"
48322	//     }
48323	//   },
48324	//   "path": "userprofiles/{profileId}/targetingTemplates/{id}",
48325	//   "response": {
48326	//     "$ref": "TargetingTemplate"
48327	//   },
48328	//   "scopes": [
48329	//     "https://www.googleapis.com/auth/dfatrafficking"
48330	//   ]
48331	// }
48332
48333}
48334
48335// method id "dfareporting.targetingTemplates.insert":
48336
48337type TargetingTemplatesInsertCall struct {
48338	s                 *Service
48339	profileId         int64
48340	targetingtemplate *TargetingTemplate
48341	urlParams_        gensupport.URLParams
48342	ctx_              context.Context
48343	header_           http.Header
48344}
48345
48346// Insert: Inserts a new targeting template.
48347func (r *TargetingTemplatesService) Insert(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesInsertCall {
48348	c := &TargetingTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48349	c.profileId = profileId
48350	c.targetingtemplate = targetingtemplate
48351	return c
48352}
48353
48354// Fields allows partial responses to be retrieved. See
48355// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48356// for more information.
48357func (c *TargetingTemplatesInsertCall) Fields(s ...googleapi.Field) *TargetingTemplatesInsertCall {
48358	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48359	return c
48360}
48361
48362// Context sets the context to be used in this call's Do method. Any
48363// pending HTTP request will be aborted if the provided context is
48364// canceled.
48365func (c *TargetingTemplatesInsertCall) Context(ctx context.Context) *TargetingTemplatesInsertCall {
48366	c.ctx_ = ctx
48367	return c
48368}
48369
48370// Header returns an http.Header that can be modified by the caller to
48371// add HTTP headers to the request.
48372func (c *TargetingTemplatesInsertCall) Header() http.Header {
48373	if c.header_ == nil {
48374		c.header_ = make(http.Header)
48375	}
48376	return c.header_
48377}
48378
48379func (c *TargetingTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
48380	reqHeaders := make(http.Header)
48381	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
48382	for k, v := range c.header_ {
48383		reqHeaders[k] = v
48384	}
48385	reqHeaders.Set("User-Agent", c.s.userAgent())
48386	var body io.Reader = nil
48387	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48388	if err != nil {
48389		return nil, err
48390	}
48391	reqHeaders.Set("Content-Type", "application/json")
48392	c.urlParams_.Set("alt", alt)
48393	c.urlParams_.Set("prettyPrint", "false")
48394	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48395	urls += "?" + c.urlParams_.Encode()
48396	req, err := http.NewRequest("POST", urls, body)
48397	if err != nil {
48398		return nil, err
48399	}
48400	req.Header = reqHeaders
48401	googleapi.Expand(req.URL, map[string]string{
48402		"profileId": strconv.FormatInt(c.profileId, 10),
48403	})
48404	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48405}
48406
48407// Do executes the "dfareporting.targetingTemplates.insert" call.
48408// Exactly one of *TargetingTemplate or error will be non-nil. Any
48409// non-2xx status code is an error. Response headers are in either
48410// *TargetingTemplate.ServerResponse.Header or (if a response was
48411// returned at all) in error.(*googleapi.Error).Header. Use
48412// googleapi.IsNotModified to check whether the returned error was
48413// because http.StatusNotModified was returned.
48414func (c *TargetingTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48415	gensupport.SetOptions(c.urlParams_, opts...)
48416	res, err := c.doRequest("json")
48417	if res != nil && res.StatusCode == http.StatusNotModified {
48418		if res.Body != nil {
48419			res.Body.Close()
48420		}
48421		return nil, &googleapi.Error{
48422			Code:   res.StatusCode,
48423			Header: res.Header,
48424		}
48425	}
48426	if err != nil {
48427		return nil, err
48428	}
48429	defer googleapi.CloseBody(res)
48430	if err := googleapi.CheckResponse(res); err != nil {
48431		return nil, err
48432	}
48433	ret := &TargetingTemplate{
48434		ServerResponse: googleapi.ServerResponse{
48435			Header:         res.Header,
48436			HTTPStatusCode: res.StatusCode,
48437		},
48438	}
48439	target := &ret
48440	if err := gensupport.DecodeResponse(target, res); err != nil {
48441		return nil, err
48442	}
48443	return ret, nil
48444	// {
48445	//   "description": "Inserts a new targeting template.",
48446	//   "httpMethod": "POST",
48447	//   "id": "dfareporting.targetingTemplates.insert",
48448	//   "parameterOrder": [
48449	//     "profileId"
48450	//   ],
48451	//   "parameters": {
48452	//     "profileId": {
48453	//       "description": "User profile ID associated with this request.",
48454	//       "format": "int64",
48455	//       "location": "path",
48456	//       "required": true,
48457	//       "type": "string"
48458	//     }
48459	//   },
48460	//   "path": "userprofiles/{profileId}/targetingTemplates",
48461	//   "request": {
48462	//     "$ref": "TargetingTemplate"
48463	//   },
48464	//   "response": {
48465	//     "$ref": "TargetingTemplate"
48466	//   },
48467	//   "scopes": [
48468	//     "https://www.googleapis.com/auth/dfatrafficking"
48469	//   ]
48470	// }
48471
48472}
48473
48474// method id "dfareporting.targetingTemplates.list":
48475
48476type TargetingTemplatesListCall struct {
48477	s            *Service
48478	profileId    int64
48479	urlParams_   gensupport.URLParams
48480	ifNoneMatch_ string
48481	ctx_         context.Context
48482	header_      http.Header
48483}
48484
48485// List: Retrieves a list of targeting templates, optionally filtered.
48486// This method supports paging.
48487func (r *TargetingTemplatesService) List(profileId int64) *TargetingTemplatesListCall {
48488	c := &TargetingTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48489	c.profileId = profileId
48490	return c
48491}
48492
48493// AdvertiserId sets the optional parameter "advertiserId": Select only
48494// targeting templates with this advertiser ID.
48495func (c *TargetingTemplatesListCall) AdvertiserId(advertiserId int64) *TargetingTemplatesListCall {
48496	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
48497	return c
48498}
48499
48500// Ids sets the optional parameter "ids": Select only targeting
48501// templates with these IDs.
48502func (c *TargetingTemplatesListCall) Ids(ids ...int64) *TargetingTemplatesListCall {
48503	var ids_ []string
48504	for _, v := range ids {
48505		ids_ = append(ids_, fmt.Sprint(v))
48506	}
48507	c.urlParams_.SetMulti("ids", ids_)
48508	return c
48509}
48510
48511// MaxResults sets the optional parameter "maxResults": Maximum number
48512// of results to return.
48513func (c *TargetingTemplatesListCall) MaxResults(maxResults int64) *TargetingTemplatesListCall {
48514	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
48515	return c
48516}
48517
48518// PageToken sets the optional parameter "pageToken": Value of the
48519// nextPageToken from the previous result page.
48520func (c *TargetingTemplatesListCall) PageToken(pageToken string) *TargetingTemplatesListCall {
48521	c.urlParams_.Set("pageToken", pageToken)
48522	return c
48523}
48524
48525// SearchString sets the optional parameter "searchString": Allows
48526// searching for objects by name or ID. Wildcards (*) are allowed. For
48527// example, "template*2015" will return objects with names like
48528// "template June 2015", "template April 2015", or simply "template
48529// 2015". Most of the searches also add wildcards implicitly at the
48530// start and the end of the search string. For example, a search string
48531// of "template" will match objects with name "my template", "template
48532// 2015", or simply "template".
48533func (c *TargetingTemplatesListCall) SearchString(searchString string) *TargetingTemplatesListCall {
48534	c.urlParams_.Set("searchString", searchString)
48535	return c
48536}
48537
48538// SortField sets the optional parameter "sortField": Field by which to
48539// sort the list.
48540//
48541// Possible values:
48542//   "ID" (default)
48543//   "NAME"
48544func (c *TargetingTemplatesListCall) SortField(sortField string) *TargetingTemplatesListCall {
48545	c.urlParams_.Set("sortField", sortField)
48546	return c
48547}
48548
48549// SortOrder sets the optional parameter "sortOrder": Order of sorted
48550// results.
48551//
48552// Possible values:
48553//   "ASCENDING" (default)
48554//   "DESCENDING"
48555func (c *TargetingTemplatesListCall) SortOrder(sortOrder string) *TargetingTemplatesListCall {
48556	c.urlParams_.Set("sortOrder", sortOrder)
48557	return c
48558}
48559
48560// Fields allows partial responses to be retrieved. See
48561// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48562// for more information.
48563func (c *TargetingTemplatesListCall) Fields(s ...googleapi.Field) *TargetingTemplatesListCall {
48564	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48565	return c
48566}
48567
48568// IfNoneMatch sets the optional parameter which makes the operation
48569// fail if the object's ETag matches the given value. This is useful for
48570// getting updates only after the object has changed since the last
48571// request. Use googleapi.IsNotModified to check whether the response
48572// error from Do is the result of In-None-Match.
48573func (c *TargetingTemplatesListCall) IfNoneMatch(entityTag string) *TargetingTemplatesListCall {
48574	c.ifNoneMatch_ = entityTag
48575	return c
48576}
48577
48578// Context sets the context to be used in this call's Do method. Any
48579// pending HTTP request will be aborted if the provided context is
48580// canceled.
48581func (c *TargetingTemplatesListCall) Context(ctx context.Context) *TargetingTemplatesListCall {
48582	c.ctx_ = ctx
48583	return c
48584}
48585
48586// Header returns an http.Header that can be modified by the caller to
48587// add HTTP headers to the request.
48588func (c *TargetingTemplatesListCall) Header() http.Header {
48589	if c.header_ == nil {
48590		c.header_ = make(http.Header)
48591	}
48592	return c.header_
48593}
48594
48595func (c *TargetingTemplatesListCall) doRequest(alt string) (*http.Response, error) {
48596	reqHeaders := make(http.Header)
48597	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
48598	for k, v := range c.header_ {
48599		reqHeaders[k] = v
48600	}
48601	reqHeaders.Set("User-Agent", c.s.userAgent())
48602	if c.ifNoneMatch_ != "" {
48603		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48604	}
48605	var body io.Reader = nil
48606	c.urlParams_.Set("alt", alt)
48607	c.urlParams_.Set("prettyPrint", "false")
48608	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48609	urls += "?" + c.urlParams_.Encode()
48610	req, err := http.NewRequest("GET", urls, body)
48611	if err != nil {
48612		return nil, err
48613	}
48614	req.Header = reqHeaders
48615	googleapi.Expand(req.URL, map[string]string{
48616		"profileId": strconv.FormatInt(c.profileId, 10),
48617	})
48618	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48619}
48620
48621// Do executes the "dfareporting.targetingTemplates.list" call.
48622// Exactly one of *TargetingTemplatesListResponse or error will be
48623// non-nil. Any non-2xx status code is an error. Response headers are in
48624// either *TargetingTemplatesListResponse.ServerResponse.Header or (if a
48625// response was returned at all) in error.(*googleapi.Error).Header. Use
48626// googleapi.IsNotModified to check whether the returned error was
48627// because http.StatusNotModified was returned.
48628func (c *TargetingTemplatesListCall) Do(opts ...googleapi.CallOption) (*TargetingTemplatesListResponse, error) {
48629	gensupport.SetOptions(c.urlParams_, opts...)
48630	res, err := c.doRequest("json")
48631	if res != nil && res.StatusCode == http.StatusNotModified {
48632		if res.Body != nil {
48633			res.Body.Close()
48634		}
48635		return nil, &googleapi.Error{
48636			Code:   res.StatusCode,
48637			Header: res.Header,
48638		}
48639	}
48640	if err != nil {
48641		return nil, err
48642	}
48643	defer googleapi.CloseBody(res)
48644	if err := googleapi.CheckResponse(res); err != nil {
48645		return nil, err
48646	}
48647	ret := &TargetingTemplatesListResponse{
48648		ServerResponse: googleapi.ServerResponse{
48649			Header:         res.Header,
48650			HTTPStatusCode: res.StatusCode,
48651		},
48652	}
48653	target := &ret
48654	if err := gensupport.DecodeResponse(target, res); err != nil {
48655		return nil, err
48656	}
48657	return ret, nil
48658	// {
48659	//   "description": "Retrieves a list of targeting templates, optionally filtered. This method supports paging.",
48660	//   "httpMethod": "GET",
48661	//   "id": "dfareporting.targetingTemplates.list",
48662	//   "parameterOrder": [
48663	//     "profileId"
48664	//   ],
48665	//   "parameters": {
48666	//     "advertiserId": {
48667	//       "description": "Select only targeting templates with this advertiser ID.",
48668	//       "format": "int64",
48669	//       "location": "query",
48670	//       "type": "string"
48671	//     },
48672	//     "ids": {
48673	//       "description": "Select only targeting templates with these IDs.",
48674	//       "format": "int64",
48675	//       "location": "query",
48676	//       "repeated": true,
48677	//       "type": "string"
48678	//     },
48679	//     "maxResults": {
48680	//       "default": "1000",
48681	//       "description": "Maximum number of results to return.",
48682	//       "format": "int32",
48683	//       "location": "query",
48684	//       "maximum": "1000",
48685	//       "minimum": "0",
48686	//       "type": "integer"
48687	//     },
48688	//     "pageToken": {
48689	//       "description": "Value of the nextPageToken from the previous result page.",
48690	//       "location": "query",
48691	//       "type": "string"
48692	//     },
48693	//     "profileId": {
48694	//       "description": "User profile ID associated with this request.",
48695	//       "format": "int64",
48696	//       "location": "path",
48697	//       "required": true,
48698	//       "type": "string"
48699	//     },
48700	//     "searchString": {
48701	//       "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\".",
48702	//       "location": "query",
48703	//       "type": "string"
48704	//     },
48705	//     "sortField": {
48706	//       "default": "ID",
48707	//       "description": "Field by which to sort the list.",
48708	//       "enum": [
48709	//         "ID",
48710	//         "NAME"
48711	//       ],
48712	//       "enumDescriptions": [
48713	//         "",
48714	//         ""
48715	//       ],
48716	//       "location": "query",
48717	//       "type": "string"
48718	//     },
48719	//     "sortOrder": {
48720	//       "default": "ASCENDING",
48721	//       "description": "Order of sorted results.",
48722	//       "enum": [
48723	//         "ASCENDING",
48724	//         "DESCENDING"
48725	//       ],
48726	//       "enumDescriptions": [
48727	//         "",
48728	//         ""
48729	//       ],
48730	//       "location": "query",
48731	//       "type": "string"
48732	//     }
48733	//   },
48734	//   "path": "userprofiles/{profileId}/targetingTemplates",
48735	//   "response": {
48736	//     "$ref": "TargetingTemplatesListResponse"
48737	//   },
48738	//   "scopes": [
48739	//     "https://www.googleapis.com/auth/dfatrafficking"
48740	//   ]
48741	// }
48742
48743}
48744
48745// Pages invokes f for each page of results.
48746// A non-nil error returned from f will halt the iteration.
48747// The provided context supersedes any context provided to the Context method.
48748func (c *TargetingTemplatesListCall) Pages(ctx context.Context, f func(*TargetingTemplatesListResponse) error) error {
48749	c.ctx_ = ctx
48750	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
48751	for {
48752		x, err := c.Do()
48753		if err != nil {
48754			return err
48755		}
48756		if err := f(x); err != nil {
48757			return err
48758		}
48759		if x.NextPageToken == "" {
48760			return nil
48761		}
48762		c.PageToken(x.NextPageToken)
48763	}
48764}
48765
48766// method id "dfareporting.targetingTemplates.patch":
48767
48768type TargetingTemplatesPatchCall struct {
48769	s                 *Service
48770	profileId         int64
48771	targetingtemplate *TargetingTemplate
48772	urlParams_        gensupport.URLParams
48773	ctx_              context.Context
48774	header_           http.Header
48775}
48776
48777// Patch: Updates an existing targeting template. This method supports
48778// patch semantics.
48779func (r *TargetingTemplatesService) Patch(profileId int64, id int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesPatchCall {
48780	c := &TargetingTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48781	c.profileId = profileId
48782	c.urlParams_.Set("id", fmt.Sprint(id))
48783	c.targetingtemplate = targetingtemplate
48784	return c
48785}
48786
48787// Fields allows partial responses to be retrieved. See
48788// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48789// for more information.
48790func (c *TargetingTemplatesPatchCall) Fields(s ...googleapi.Field) *TargetingTemplatesPatchCall {
48791	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48792	return c
48793}
48794
48795// Context sets the context to be used in this call's Do method. Any
48796// pending HTTP request will be aborted if the provided context is
48797// canceled.
48798func (c *TargetingTemplatesPatchCall) Context(ctx context.Context) *TargetingTemplatesPatchCall {
48799	c.ctx_ = ctx
48800	return c
48801}
48802
48803// Header returns an http.Header that can be modified by the caller to
48804// add HTTP headers to the request.
48805func (c *TargetingTemplatesPatchCall) Header() http.Header {
48806	if c.header_ == nil {
48807		c.header_ = make(http.Header)
48808	}
48809	return c.header_
48810}
48811
48812func (c *TargetingTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
48813	reqHeaders := make(http.Header)
48814	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
48815	for k, v := range c.header_ {
48816		reqHeaders[k] = v
48817	}
48818	reqHeaders.Set("User-Agent", c.s.userAgent())
48819	var body io.Reader = nil
48820	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48821	if err != nil {
48822		return nil, err
48823	}
48824	reqHeaders.Set("Content-Type", "application/json")
48825	c.urlParams_.Set("alt", alt)
48826	c.urlParams_.Set("prettyPrint", "false")
48827	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48828	urls += "?" + c.urlParams_.Encode()
48829	req, err := http.NewRequest("PATCH", urls, body)
48830	if err != nil {
48831		return nil, err
48832	}
48833	req.Header = reqHeaders
48834	googleapi.Expand(req.URL, map[string]string{
48835		"profileId": strconv.FormatInt(c.profileId, 10),
48836	})
48837	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48838}
48839
48840// Do executes the "dfareporting.targetingTemplates.patch" call.
48841// Exactly one of *TargetingTemplate or error will be non-nil. Any
48842// non-2xx status code is an error. Response headers are in either
48843// *TargetingTemplate.ServerResponse.Header or (if a response was
48844// returned at all) in error.(*googleapi.Error).Header. Use
48845// googleapi.IsNotModified to check whether the returned error was
48846// because http.StatusNotModified was returned.
48847func (c *TargetingTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48848	gensupport.SetOptions(c.urlParams_, opts...)
48849	res, err := c.doRequest("json")
48850	if res != nil && res.StatusCode == http.StatusNotModified {
48851		if res.Body != nil {
48852			res.Body.Close()
48853		}
48854		return nil, &googleapi.Error{
48855			Code:   res.StatusCode,
48856			Header: res.Header,
48857		}
48858	}
48859	if err != nil {
48860		return nil, err
48861	}
48862	defer googleapi.CloseBody(res)
48863	if err := googleapi.CheckResponse(res); err != nil {
48864		return nil, err
48865	}
48866	ret := &TargetingTemplate{
48867		ServerResponse: googleapi.ServerResponse{
48868			Header:         res.Header,
48869			HTTPStatusCode: res.StatusCode,
48870		},
48871	}
48872	target := &ret
48873	if err := gensupport.DecodeResponse(target, res); err != nil {
48874		return nil, err
48875	}
48876	return ret, nil
48877	// {
48878	//   "description": "Updates an existing targeting template. This method supports patch semantics.",
48879	//   "httpMethod": "PATCH",
48880	//   "id": "dfareporting.targetingTemplates.patch",
48881	//   "parameterOrder": [
48882	//     "profileId",
48883	//     "id"
48884	//   ],
48885	//   "parameters": {
48886	//     "id": {
48887	//       "description": "Targeting template ID.",
48888	//       "format": "int64",
48889	//       "location": "query",
48890	//       "required": true,
48891	//       "type": "string"
48892	//     },
48893	//     "profileId": {
48894	//       "description": "User profile ID associated with this request.",
48895	//       "format": "int64",
48896	//       "location": "path",
48897	//       "required": true,
48898	//       "type": "string"
48899	//     }
48900	//   },
48901	//   "path": "userprofiles/{profileId}/targetingTemplates",
48902	//   "request": {
48903	//     "$ref": "TargetingTemplate"
48904	//   },
48905	//   "response": {
48906	//     "$ref": "TargetingTemplate"
48907	//   },
48908	//   "scopes": [
48909	//     "https://www.googleapis.com/auth/dfatrafficking"
48910	//   ]
48911	// }
48912
48913}
48914
48915// method id "dfareporting.targetingTemplates.update":
48916
48917type TargetingTemplatesUpdateCall struct {
48918	s                 *Service
48919	profileId         int64
48920	targetingtemplate *TargetingTemplate
48921	urlParams_        gensupport.URLParams
48922	ctx_              context.Context
48923	header_           http.Header
48924}
48925
48926// Update: Updates an existing targeting template.
48927func (r *TargetingTemplatesService) Update(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesUpdateCall {
48928	c := &TargetingTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48929	c.profileId = profileId
48930	c.targetingtemplate = targetingtemplate
48931	return c
48932}
48933
48934// Fields allows partial responses to be retrieved. See
48935// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48936// for more information.
48937func (c *TargetingTemplatesUpdateCall) Fields(s ...googleapi.Field) *TargetingTemplatesUpdateCall {
48938	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48939	return c
48940}
48941
48942// Context sets the context to be used in this call's Do method. Any
48943// pending HTTP request will be aborted if the provided context is
48944// canceled.
48945func (c *TargetingTemplatesUpdateCall) Context(ctx context.Context) *TargetingTemplatesUpdateCall {
48946	c.ctx_ = ctx
48947	return c
48948}
48949
48950// Header returns an http.Header that can be modified by the caller to
48951// add HTTP headers to the request.
48952func (c *TargetingTemplatesUpdateCall) Header() http.Header {
48953	if c.header_ == nil {
48954		c.header_ = make(http.Header)
48955	}
48956	return c.header_
48957}
48958
48959func (c *TargetingTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
48960	reqHeaders := make(http.Header)
48961	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
48962	for k, v := range c.header_ {
48963		reqHeaders[k] = v
48964	}
48965	reqHeaders.Set("User-Agent", c.s.userAgent())
48966	var body io.Reader = nil
48967	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48968	if err != nil {
48969		return nil, err
48970	}
48971	reqHeaders.Set("Content-Type", "application/json")
48972	c.urlParams_.Set("alt", alt)
48973	c.urlParams_.Set("prettyPrint", "false")
48974	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48975	urls += "?" + c.urlParams_.Encode()
48976	req, err := http.NewRequest("PUT", urls, body)
48977	if err != nil {
48978		return nil, err
48979	}
48980	req.Header = reqHeaders
48981	googleapi.Expand(req.URL, map[string]string{
48982		"profileId": strconv.FormatInt(c.profileId, 10),
48983	})
48984	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48985}
48986
48987// Do executes the "dfareporting.targetingTemplates.update" call.
48988// Exactly one of *TargetingTemplate or error will be non-nil. Any
48989// non-2xx status code is an error. Response headers are in either
48990// *TargetingTemplate.ServerResponse.Header or (if a response was
48991// returned at all) in error.(*googleapi.Error).Header. Use
48992// googleapi.IsNotModified to check whether the returned error was
48993// because http.StatusNotModified was returned.
48994func (c *TargetingTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48995	gensupport.SetOptions(c.urlParams_, opts...)
48996	res, err := c.doRequest("json")
48997	if res != nil && res.StatusCode == http.StatusNotModified {
48998		if res.Body != nil {
48999			res.Body.Close()
49000		}
49001		return nil, &googleapi.Error{
49002			Code:   res.StatusCode,
49003			Header: res.Header,
49004		}
49005	}
49006	if err != nil {
49007		return nil, err
49008	}
49009	defer googleapi.CloseBody(res)
49010	if err := googleapi.CheckResponse(res); err != nil {
49011		return nil, err
49012	}
49013	ret := &TargetingTemplate{
49014		ServerResponse: googleapi.ServerResponse{
49015			Header:         res.Header,
49016			HTTPStatusCode: res.StatusCode,
49017		},
49018	}
49019	target := &ret
49020	if err := gensupport.DecodeResponse(target, res); err != nil {
49021		return nil, err
49022	}
49023	return ret, nil
49024	// {
49025	//   "description": "Updates an existing targeting template.",
49026	//   "httpMethod": "PUT",
49027	//   "id": "dfareporting.targetingTemplates.update",
49028	//   "parameterOrder": [
49029	//     "profileId"
49030	//   ],
49031	//   "parameters": {
49032	//     "profileId": {
49033	//       "description": "User profile ID associated with this request.",
49034	//       "format": "int64",
49035	//       "location": "path",
49036	//       "required": true,
49037	//       "type": "string"
49038	//     }
49039	//   },
49040	//   "path": "userprofiles/{profileId}/targetingTemplates",
49041	//   "request": {
49042	//     "$ref": "TargetingTemplate"
49043	//   },
49044	//   "response": {
49045	//     "$ref": "TargetingTemplate"
49046	//   },
49047	//   "scopes": [
49048	//     "https://www.googleapis.com/auth/dfatrafficking"
49049	//   ]
49050	// }
49051
49052}
49053
49054// method id "dfareporting.userProfiles.get":
49055
49056type UserProfilesGetCall struct {
49057	s            *Service
49058	profileId    int64
49059	urlParams_   gensupport.URLParams
49060	ifNoneMatch_ string
49061	ctx_         context.Context
49062	header_      http.Header
49063}
49064
49065// Get: Gets one user profile by ID.
49066func (r *UserProfilesService) Get(profileId int64) *UserProfilesGetCall {
49067	c := &UserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49068	c.profileId = profileId
49069	return c
49070}
49071
49072// Fields allows partial responses to be retrieved. See
49073// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49074// for more information.
49075func (c *UserProfilesGetCall) Fields(s ...googleapi.Field) *UserProfilesGetCall {
49076	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49077	return c
49078}
49079
49080// IfNoneMatch sets the optional parameter which makes the operation
49081// fail if the object's ETag matches the given value. This is useful for
49082// getting updates only after the object has changed since the last
49083// request. Use googleapi.IsNotModified to check whether the response
49084// error from Do is the result of In-None-Match.
49085func (c *UserProfilesGetCall) IfNoneMatch(entityTag string) *UserProfilesGetCall {
49086	c.ifNoneMatch_ = entityTag
49087	return c
49088}
49089
49090// Context sets the context to be used in this call's Do method. Any
49091// pending HTTP request will be aborted if the provided context is
49092// canceled.
49093func (c *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
49094	c.ctx_ = ctx
49095	return c
49096}
49097
49098// Header returns an http.Header that can be modified by the caller to
49099// add HTTP headers to the request.
49100func (c *UserProfilesGetCall) Header() http.Header {
49101	if c.header_ == nil {
49102		c.header_ = make(http.Header)
49103	}
49104	return c.header_
49105}
49106
49107func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
49108	reqHeaders := make(http.Header)
49109	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
49110	for k, v := range c.header_ {
49111		reqHeaders[k] = v
49112	}
49113	reqHeaders.Set("User-Agent", c.s.userAgent())
49114	if c.ifNoneMatch_ != "" {
49115		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49116	}
49117	var body io.Reader = nil
49118	c.urlParams_.Set("alt", alt)
49119	c.urlParams_.Set("prettyPrint", "false")
49120	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}")
49121	urls += "?" + c.urlParams_.Encode()
49122	req, err := http.NewRequest("GET", urls, body)
49123	if err != nil {
49124		return nil, err
49125	}
49126	req.Header = reqHeaders
49127	googleapi.Expand(req.URL, map[string]string{
49128		"profileId": strconv.FormatInt(c.profileId, 10),
49129	})
49130	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49131}
49132
49133// Do executes the "dfareporting.userProfiles.get" call.
49134// Exactly one of *UserProfile or error will be non-nil. Any non-2xx
49135// status code is an error. Response headers are in either
49136// *UserProfile.ServerResponse.Header or (if a response was returned at
49137// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49138// to check whether the returned error was because
49139// http.StatusNotModified was returned.
49140func (c *UserProfilesGetCall) Do(opts ...googleapi.CallOption) (*UserProfile, error) {
49141	gensupport.SetOptions(c.urlParams_, opts...)
49142	res, err := c.doRequest("json")
49143	if res != nil && res.StatusCode == http.StatusNotModified {
49144		if res.Body != nil {
49145			res.Body.Close()
49146		}
49147		return nil, &googleapi.Error{
49148			Code:   res.StatusCode,
49149			Header: res.Header,
49150		}
49151	}
49152	if err != nil {
49153		return nil, err
49154	}
49155	defer googleapi.CloseBody(res)
49156	if err := googleapi.CheckResponse(res); err != nil {
49157		return nil, err
49158	}
49159	ret := &UserProfile{
49160		ServerResponse: googleapi.ServerResponse{
49161			Header:         res.Header,
49162			HTTPStatusCode: res.StatusCode,
49163		},
49164	}
49165	target := &ret
49166	if err := gensupport.DecodeResponse(target, res); err != nil {
49167		return nil, err
49168	}
49169	return ret, nil
49170	// {
49171	//   "description": "Gets one user profile by ID.",
49172	//   "httpMethod": "GET",
49173	//   "id": "dfareporting.userProfiles.get",
49174	//   "parameterOrder": [
49175	//     "profileId"
49176	//   ],
49177	//   "parameters": {
49178	//     "profileId": {
49179	//       "description": "The user profile ID.",
49180	//       "format": "int64",
49181	//       "location": "path",
49182	//       "required": true,
49183	//       "type": "string"
49184	//     }
49185	//   },
49186	//   "path": "userprofiles/{profileId}",
49187	//   "response": {
49188	//     "$ref": "UserProfile"
49189	//   },
49190	//   "scopes": [
49191	//     "https://www.googleapis.com/auth/dfareporting",
49192	//     "https://www.googleapis.com/auth/dfatrafficking"
49193	//   ]
49194	// }
49195
49196}
49197
49198// method id "dfareporting.userProfiles.list":
49199
49200type UserProfilesListCall struct {
49201	s            *Service
49202	urlParams_   gensupport.URLParams
49203	ifNoneMatch_ string
49204	ctx_         context.Context
49205	header_      http.Header
49206}
49207
49208// List: Retrieves list of user profiles for a user.
49209func (r *UserProfilesService) List() *UserProfilesListCall {
49210	c := &UserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49211	return c
49212}
49213
49214// Fields allows partial responses to be retrieved. See
49215// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49216// for more information.
49217func (c *UserProfilesListCall) Fields(s ...googleapi.Field) *UserProfilesListCall {
49218	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49219	return c
49220}
49221
49222// IfNoneMatch sets the optional parameter which makes the operation
49223// fail if the object's ETag matches the given value. This is useful for
49224// getting updates only after the object has changed since the last
49225// request. Use googleapi.IsNotModified to check whether the response
49226// error from Do is the result of In-None-Match.
49227func (c *UserProfilesListCall) IfNoneMatch(entityTag string) *UserProfilesListCall {
49228	c.ifNoneMatch_ = entityTag
49229	return c
49230}
49231
49232// Context sets the context to be used in this call's Do method. Any
49233// pending HTTP request will be aborted if the provided context is
49234// canceled.
49235func (c *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
49236	c.ctx_ = ctx
49237	return c
49238}
49239
49240// Header returns an http.Header that can be modified by the caller to
49241// add HTTP headers to the request.
49242func (c *UserProfilesListCall) Header() http.Header {
49243	if c.header_ == nil {
49244		c.header_ = make(http.Header)
49245	}
49246	return c.header_
49247}
49248
49249func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
49250	reqHeaders := make(http.Header)
49251	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
49252	for k, v := range c.header_ {
49253		reqHeaders[k] = v
49254	}
49255	reqHeaders.Set("User-Agent", c.s.userAgent())
49256	if c.ifNoneMatch_ != "" {
49257		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49258	}
49259	var body io.Reader = nil
49260	c.urlParams_.Set("alt", alt)
49261	c.urlParams_.Set("prettyPrint", "false")
49262	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles")
49263	urls += "?" + c.urlParams_.Encode()
49264	req, err := http.NewRequest("GET", urls, body)
49265	if err != nil {
49266		return nil, err
49267	}
49268	req.Header = reqHeaders
49269	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49270}
49271
49272// Do executes the "dfareporting.userProfiles.list" call.
49273// Exactly one of *UserProfileList or error will be non-nil. Any non-2xx
49274// status code is an error. Response headers are in either
49275// *UserProfileList.ServerResponse.Header or (if a response was returned
49276// at all) in error.(*googleapi.Error).Header. Use
49277// googleapi.IsNotModified to check whether the returned error was
49278// because http.StatusNotModified was returned.
49279func (c *UserProfilesListCall) Do(opts ...googleapi.CallOption) (*UserProfileList, error) {
49280	gensupport.SetOptions(c.urlParams_, opts...)
49281	res, err := c.doRequest("json")
49282	if res != nil && res.StatusCode == http.StatusNotModified {
49283		if res.Body != nil {
49284			res.Body.Close()
49285		}
49286		return nil, &googleapi.Error{
49287			Code:   res.StatusCode,
49288			Header: res.Header,
49289		}
49290	}
49291	if err != nil {
49292		return nil, err
49293	}
49294	defer googleapi.CloseBody(res)
49295	if err := googleapi.CheckResponse(res); err != nil {
49296		return nil, err
49297	}
49298	ret := &UserProfileList{
49299		ServerResponse: googleapi.ServerResponse{
49300			Header:         res.Header,
49301			HTTPStatusCode: res.StatusCode,
49302		},
49303	}
49304	target := &ret
49305	if err := gensupport.DecodeResponse(target, res); err != nil {
49306		return nil, err
49307	}
49308	return ret, nil
49309	// {
49310	//   "description": "Retrieves list of user profiles for a user.",
49311	//   "httpMethod": "GET",
49312	//   "id": "dfareporting.userProfiles.list",
49313	//   "path": "userprofiles",
49314	//   "response": {
49315	//     "$ref": "UserProfileList"
49316	//   },
49317	//   "scopes": [
49318	//     "https://www.googleapis.com/auth/dfareporting",
49319	//     "https://www.googleapis.com/auth/dfatrafficking"
49320	//   ]
49321	// }
49322
49323}
49324
49325// method id "dfareporting.userRolePermissionGroups.get":
49326
49327type UserRolePermissionGroupsGetCall struct {
49328	s            *Service
49329	profileId    int64
49330	id           int64
49331	urlParams_   gensupport.URLParams
49332	ifNoneMatch_ string
49333	ctx_         context.Context
49334	header_      http.Header
49335}
49336
49337// Get: Gets one user role permission group by ID.
49338func (r *UserRolePermissionGroupsService) Get(profileId int64, id int64) *UserRolePermissionGroupsGetCall {
49339	c := &UserRolePermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49340	c.profileId = profileId
49341	c.id = id
49342	return c
49343}
49344
49345// Fields allows partial responses to be retrieved. See
49346// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49347// for more information.
49348func (c *UserRolePermissionGroupsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsGetCall {
49349	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49350	return c
49351}
49352
49353// IfNoneMatch sets the optional parameter which makes the operation
49354// fail if the object's ETag matches the given value. This is useful for
49355// getting updates only after the object has changed since the last
49356// request. Use googleapi.IsNotModified to check whether the response
49357// error from Do is the result of In-None-Match.
49358func (c *UserRolePermissionGroupsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsGetCall {
49359	c.ifNoneMatch_ = entityTag
49360	return c
49361}
49362
49363// Context sets the context to be used in this call's Do method. Any
49364// pending HTTP request will be aborted if the provided context is
49365// canceled.
49366func (c *UserRolePermissionGroupsGetCall) Context(ctx context.Context) *UserRolePermissionGroupsGetCall {
49367	c.ctx_ = ctx
49368	return c
49369}
49370
49371// Header returns an http.Header that can be modified by the caller to
49372// add HTTP headers to the request.
49373func (c *UserRolePermissionGroupsGetCall) Header() http.Header {
49374	if c.header_ == nil {
49375		c.header_ = make(http.Header)
49376	}
49377	return c.header_
49378}
49379
49380func (c *UserRolePermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
49381	reqHeaders := make(http.Header)
49382	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
49383	for k, v := range c.header_ {
49384		reqHeaders[k] = v
49385	}
49386	reqHeaders.Set("User-Agent", c.s.userAgent())
49387	if c.ifNoneMatch_ != "" {
49388		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49389	}
49390	var body io.Reader = nil
49391	c.urlParams_.Set("alt", alt)
49392	c.urlParams_.Set("prettyPrint", "false")
49393	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups/{id}")
49394	urls += "?" + c.urlParams_.Encode()
49395	req, err := http.NewRequest("GET", urls, body)
49396	if err != nil {
49397		return nil, err
49398	}
49399	req.Header = reqHeaders
49400	googleapi.Expand(req.URL, map[string]string{
49401		"profileId": strconv.FormatInt(c.profileId, 10),
49402		"id":        strconv.FormatInt(c.id, 10),
49403	})
49404	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49405}
49406
49407// Do executes the "dfareporting.userRolePermissionGroups.get" call.
49408// Exactly one of *UserRolePermissionGroup or error will be non-nil. Any
49409// non-2xx status code is an error. Response headers are in either
49410// *UserRolePermissionGroup.ServerResponse.Header or (if a response was
49411// returned at all) in error.(*googleapi.Error).Header. Use
49412// googleapi.IsNotModified to check whether the returned error was
49413// because http.StatusNotModified was returned.
49414func (c *UserRolePermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroup, error) {
49415	gensupport.SetOptions(c.urlParams_, opts...)
49416	res, err := c.doRequest("json")
49417	if res != nil && res.StatusCode == http.StatusNotModified {
49418		if res.Body != nil {
49419			res.Body.Close()
49420		}
49421		return nil, &googleapi.Error{
49422			Code:   res.StatusCode,
49423			Header: res.Header,
49424		}
49425	}
49426	if err != nil {
49427		return nil, err
49428	}
49429	defer googleapi.CloseBody(res)
49430	if err := googleapi.CheckResponse(res); err != nil {
49431		return nil, err
49432	}
49433	ret := &UserRolePermissionGroup{
49434		ServerResponse: googleapi.ServerResponse{
49435			Header:         res.Header,
49436			HTTPStatusCode: res.StatusCode,
49437		},
49438	}
49439	target := &ret
49440	if err := gensupport.DecodeResponse(target, res); err != nil {
49441		return nil, err
49442	}
49443	return ret, nil
49444	// {
49445	//   "description": "Gets one user role permission group by ID.",
49446	//   "httpMethod": "GET",
49447	//   "id": "dfareporting.userRolePermissionGroups.get",
49448	//   "parameterOrder": [
49449	//     "profileId",
49450	//     "id"
49451	//   ],
49452	//   "parameters": {
49453	//     "id": {
49454	//       "description": "User role permission group 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}/userRolePermissionGroups/{id}",
49469	//   "response": {
49470	//     "$ref": "UserRolePermissionGroup"
49471	//   },
49472	//   "scopes": [
49473	//     "https://www.googleapis.com/auth/dfatrafficking"
49474	//   ]
49475	// }
49476
49477}
49478
49479// method id "dfareporting.userRolePermissionGroups.list":
49480
49481type UserRolePermissionGroupsListCall 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: Gets a list of all supported user role permission groups.
49491func (r *UserRolePermissionGroupsService) List(profileId int64) *UserRolePermissionGroupsListCall {
49492	c := &UserRolePermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49493	c.profileId = profileId
49494	return c
49495}
49496
49497// Fields allows partial responses to be retrieved. See
49498// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49499// for more information.
49500func (c *UserRolePermissionGroupsListCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsListCall {
49501	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49502	return c
49503}
49504
49505// IfNoneMatch sets the optional parameter which makes the operation
49506// fail if the object's ETag matches the given value. This is useful for
49507// getting updates only after the object has changed since the last
49508// request. Use googleapi.IsNotModified to check whether the response
49509// error from Do is the result of In-None-Match.
49510func (c *UserRolePermissionGroupsListCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsListCall {
49511	c.ifNoneMatch_ = entityTag
49512	return c
49513}
49514
49515// Context sets the context to be used in this call's Do method. Any
49516// pending HTTP request will be aborted if the provided context is
49517// canceled.
49518func (c *UserRolePermissionGroupsListCall) Context(ctx context.Context) *UserRolePermissionGroupsListCall {
49519	c.ctx_ = ctx
49520	return c
49521}
49522
49523// Header returns an http.Header that can be modified by the caller to
49524// add HTTP headers to the request.
49525func (c *UserRolePermissionGroupsListCall) Header() http.Header {
49526	if c.header_ == nil {
49527		c.header_ = make(http.Header)
49528	}
49529	return c.header_
49530}
49531
49532func (c *UserRolePermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
49533	reqHeaders := make(http.Header)
49534	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
49535	for k, v := range c.header_ {
49536		reqHeaders[k] = v
49537	}
49538	reqHeaders.Set("User-Agent", c.s.userAgent())
49539	if c.ifNoneMatch_ != "" {
49540		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49541	}
49542	var body io.Reader = nil
49543	c.urlParams_.Set("alt", alt)
49544	c.urlParams_.Set("prettyPrint", "false")
49545	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups")
49546	urls += "?" + c.urlParams_.Encode()
49547	req, err := http.NewRequest("GET", urls, body)
49548	if err != nil {
49549		return nil, err
49550	}
49551	req.Header = reqHeaders
49552	googleapi.Expand(req.URL, map[string]string{
49553		"profileId": strconv.FormatInt(c.profileId, 10),
49554	})
49555	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49556}
49557
49558// Do executes the "dfareporting.userRolePermissionGroups.list" call.
49559// Exactly one of *UserRolePermissionGroupsListResponse or error will be
49560// non-nil. Any non-2xx status code is an error. Response headers are in
49561// either *UserRolePermissionGroupsListResponse.ServerResponse.Header or
49562// (if a response was returned at all) in
49563// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
49564// whether the returned error was because http.StatusNotModified was
49565// returned.
49566func (c *UserRolePermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroupsListResponse, error) {
49567	gensupport.SetOptions(c.urlParams_, opts...)
49568	res, err := c.doRequest("json")
49569	if res != nil && res.StatusCode == http.StatusNotModified {
49570		if res.Body != nil {
49571			res.Body.Close()
49572		}
49573		return nil, &googleapi.Error{
49574			Code:   res.StatusCode,
49575			Header: res.Header,
49576		}
49577	}
49578	if err != nil {
49579		return nil, err
49580	}
49581	defer googleapi.CloseBody(res)
49582	if err := googleapi.CheckResponse(res); err != nil {
49583		return nil, err
49584	}
49585	ret := &UserRolePermissionGroupsListResponse{
49586		ServerResponse: googleapi.ServerResponse{
49587			Header:         res.Header,
49588			HTTPStatusCode: res.StatusCode,
49589		},
49590	}
49591	target := &ret
49592	if err := gensupport.DecodeResponse(target, res); err != nil {
49593		return nil, err
49594	}
49595	return ret, nil
49596	// {
49597	//   "description": "Gets a list of all supported user role permission groups.",
49598	//   "httpMethod": "GET",
49599	//   "id": "dfareporting.userRolePermissionGroups.list",
49600	//   "parameterOrder": [
49601	//     "profileId"
49602	//   ],
49603	//   "parameters": {
49604	//     "profileId": {
49605	//       "description": "User profile ID associated with this request.",
49606	//       "format": "int64",
49607	//       "location": "path",
49608	//       "required": true,
49609	//       "type": "string"
49610	//     }
49611	//   },
49612	//   "path": "userprofiles/{profileId}/userRolePermissionGroups",
49613	//   "response": {
49614	//     "$ref": "UserRolePermissionGroupsListResponse"
49615	//   },
49616	//   "scopes": [
49617	//     "https://www.googleapis.com/auth/dfatrafficking"
49618	//   ]
49619	// }
49620
49621}
49622
49623// method id "dfareporting.userRolePermissions.get":
49624
49625type UserRolePermissionsGetCall struct {
49626	s            *Service
49627	profileId    int64
49628	id           int64
49629	urlParams_   gensupport.URLParams
49630	ifNoneMatch_ string
49631	ctx_         context.Context
49632	header_      http.Header
49633}
49634
49635// Get: Gets one user role permission by ID.
49636func (r *UserRolePermissionsService) Get(profileId int64, id int64) *UserRolePermissionsGetCall {
49637	c := &UserRolePermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49638	c.profileId = profileId
49639	c.id = id
49640	return c
49641}
49642
49643// Fields allows partial responses to be retrieved. See
49644// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49645// for more information.
49646func (c *UserRolePermissionsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionsGetCall {
49647	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49648	return c
49649}
49650
49651// IfNoneMatch sets the optional parameter which makes the operation
49652// fail if the object's ETag matches the given value. This is useful for
49653// getting updates only after the object has changed since the last
49654// request. Use googleapi.IsNotModified to check whether the response
49655// error from Do is the result of In-None-Match.
49656func (c *UserRolePermissionsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionsGetCall {
49657	c.ifNoneMatch_ = entityTag
49658	return c
49659}
49660
49661// Context sets the context to be used in this call's Do method. Any
49662// pending HTTP request will be aborted if the provided context is
49663// canceled.
49664func (c *UserRolePermissionsGetCall) Context(ctx context.Context) *UserRolePermissionsGetCall {
49665	c.ctx_ = ctx
49666	return c
49667}
49668
49669// Header returns an http.Header that can be modified by the caller to
49670// add HTTP headers to the request.
49671func (c *UserRolePermissionsGetCall) Header() http.Header {
49672	if c.header_ == nil {
49673		c.header_ = make(http.Header)
49674	}
49675	return c.header_
49676}
49677
49678func (c *UserRolePermissionsGetCall) doRequest(alt string) (*http.Response, error) {
49679	reqHeaders := make(http.Header)
49680	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
49681	for k, v := range c.header_ {
49682		reqHeaders[k] = v
49683	}
49684	reqHeaders.Set("User-Agent", c.s.userAgent())
49685	if c.ifNoneMatch_ != "" {
49686		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49687	}
49688	var body io.Reader = nil
49689	c.urlParams_.Set("alt", alt)
49690	c.urlParams_.Set("prettyPrint", "false")
49691	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions/{id}")
49692	urls += "?" + c.urlParams_.Encode()
49693	req, err := http.NewRequest("GET", urls, body)
49694	if err != nil {
49695		return nil, err
49696	}
49697	req.Header = reqHeaders
49698	googleapi.Expand(req.URL, map[string]string{
49699		"profileId": strconv.FormatInt(c.profileId, 10),
49700		"id":        strconv.FormatInt(c.id, 10),
49701	})
49702	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49703}
49704
49705// Do executes the "dfareporting.userRolePermissions.get" call.
49706// Exactly one of *UserRolePermission or error will be non-nil. Any
49707// non-2xx status code is an error. Response headers are in either
49708// *UserRolePermission.ServerResponse.Header or (if a response was
49709// returned at all) in error.(*googleapi.Error).Header. Use
49710// googleapi.IsNotModified to check whether the returned error was
49711// because http.StatusNotModified was returned.
49712func (c *UserRolePermissionsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermission, error) {
49713	gensupport.SetOptions(c.urlParams_, opts...)
49714	res, err := c.doRequest("json")
49715	if res != nil && res.StatusCode == http.StatusNotModified {
49716		if res.Body != nil {
49717			res.Body.Close()
49718		}
49719		return nil, &googleapi.Error{
49720			Code:   res.StatusCode,
49721			Header: res.Header,
49722		}
49723	}
49724	if err != nil {
49725		return nil, err
49726	}
49727	defer googleapi.CloseBody(res)
49728	if err := googleapi.CheckResponse(res); err != nil {
49729		return nil, err
49730	}
49731	ret := &UserRolePermission{
49732		ServerResponse: googleapi.ServerResponse{
49733			Header:         res.Header,
49734			HTTPStatusCode: res.StatusCode,
49735		},
49736	}
49737	target := &ret
49738	if err := gensupport.DecodeResponse(target, res); err != nil {
49739		return nil, err
49740	}
49741	return ret, nil
49742	// {
49743	//   "description": "Gets one user role permission by ID.",
49744	//   "httpMethod": "GET",
49745	//   "id": "dfareporting.userRolePermissions.get",
49746	//   "parameterOrder": [
49747	//     "profileId",
49748	//     "id"
49749	//   ],
49750	//   "parameters": {
49751	//     "id": {
49752	//       "description": "User role permission ID.",
49753	//       "format": "int64",
49754	//       "location": "path",
49755	//       "required": true,
49756	//       "type": "string"
49757	//     },
49758	//     "profileId": {
49759	//       "description": "User profile ID associated with this request.",
49760	//       "format": "int64",
49761	//       "location": "path",
49762	//       "required": true,
49763	//       "type": "string"
49764	//     }
49765	//   },
49766	//   "path": "userprofiles/{profileId}/userRolePermissions/{id}",
49767	//   "response": {
49768	//     "$ref": "UserRolePermission"
49769	//   },
49770	//   "scopes": [
49771	//     "https://www.googleapis.com/auth/dfatrafficking"
49772	//   ]
49773	// }
49774
49775}
49776
49777// method id "dfareporting.userRolePermissions.list":
49778
49779type UserRolePermissionsListCall struct {
49780	s            *Service
49781	profileId    int64
49782	urlParams_   gensupport.URLParams
49783	ifNoneMatch_ string
49784	ctx_         context.Context
49785	header_      http.Header
49786}
49787
49788// List: Gets a list of user role permissions, possibly filtered.
49789func (r *UserRolePermissionsService) List(profileId int64) *UserRolePermissionsListCall {
49790	c := &UserRolePermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49791	c.profileId = profileId
49792	return c
49793}
49794
49795// Ids sets the optional parameter "ids": Select only user role
49796// permissions with these IDs.
49797func (c *UserRolePermissionsListCall) Ids(ids ...int64) *UserRolePermissionsListCall {
49798	var ids_ []string
49799	for _, v := range ids {
49800		ids_ = append(ids_, fmt.Sprint(v))
49801	}
49802	c.urlParams_.SetMulti("ids", ids_)
49803	return c
49804}
49805
49806// Fields allows partial responses to be retrieved. See
49807// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49808// for more information.
49809func (c *UserRolePermissionsListCall) Fields(s ...googleapi.Field) *UserRolePermissionsListCall {
49810	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49811	return c
49812}
49813
49814// IfNoneMatch sets the optional parameter which makes the operation
49815// fail if the object's ETag matches the given value. This is useful for
49816// getting updates only after the object has changed since the last
49817// request. Use googleapi.IsNotModified to check whether the response
49818// error from Do is the result of In-None-Match.
49819func (c *UserRolePermissionsListCall) IfNoneMatch(entityTag string) *UserRolePermissionsListCall {
49820	c.ifNoneMatch_ = entityTag
49821	return c
49822}
49823
49824// Context sets the context to be used in this call's Do method. Any
49825// pending HTTP request will be aborted if the provided context is
49826// canceled.
49827func (c *UserRolePermissionsListCall) Context(ctx context.Context) *UserRolePermissionsListCall {
49828	c.ctx_ = ctx
49829	return c
49830}
49831
49832// Header returns an http.Header that can be modified by the caller to
49833// add HTTP headers to the request.
49834func (c *UserRolePermissionsListCall) Header() http.Header {
49835	if c.header_ == nil {
49836		c.header_ = make(http.Header)
49837	}
49838	return c.header_
49839}
49840
49841func (c *UserRolePermissionsListCall) doRequest(alt string) (*http.Response, error) {
49842	reqHeaders := make(http.Header)
49843	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
49844	for k, v := range c.header_ {
49845		reqHeaders[k] = v
49846	}
49847	reqHeaders.Set("User-Agent", c.s.userAgent())
49848	if c.ifNoneMatch_ != "" {
49849		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49850	}
49851	var body io.Reader = nil
49852	c.urlParams_.Set("alt", alt)
49853	c.urlParams_.Set("prettyPrint", "false")
49854	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions")
49855	urls += "?" + c.urlParams_.Encode()
49856	req, err := http.NewRequest("GET", urls, body)
49857	if err != nil {
49858		return nil, err
49859	}
49860	req.Header = reqHeaders
49861	googleapi.Expand(req.URL, map[string]string{
49862		"profileId": strconv.FormatInt(c.profileId, 10),
49863	})
49864	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49865}
49866
49867// Do executes the "dfareporting.userRolePermissions.list" call.
49868// Exactly one of *UserRolePermissionsListResponse or error will be
49869// non-nil. Any non-2xx status code is an error. Response headers are in
49870// either *UserRolePermissionsListResponse.ServerResponse.Header or (if
49871// a response was returned at all) in error.(*googleapi.Error).Header.
49872// Use googleapi.IsNotModified to check whether the returned error was
49873// because http.StatusNotModified was returned.
49874func (c *UserRolePermissionsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionsListResponse, error) {
49875	gensupport.SetOptions(c.urlParams_, opts...)
49876	res, err := c.doRequest("json")
49877	if res != nil && res.StatusCode == http.StatusNotModified {
49878		if res.Body != nil {
49879			res.Body.Close()
49880		}
49881		return nil, &googleapi.Error{
49882			Code:   res.StatusCode,
49883			Header: res.Header,
49884		}
49885	}
49886	if err != nil {
49887		return nil, err
49888	}
49889	defer googleapi.CloseBody(res)
49890	if err := googleapi.CheckResponse(res); err != nil {
49891		return nil, err
49892	}
49893	ret := &UserRolePermissionsListResponse{
49894		ServerResponse: googleapi.ServerResponse{
49895			Header:         res.Header,
49896			HTTPStatusCode: res.StatusCode,
49897		},
49898	}
49899	target := &ret
49900	if err := gensupport.DecodeResponse(target, res); err != nil {
49901		return nil, err
49902	}
49903	return ret, nil
49904	// {
49905	//   "description": "Gets a list of user role permissions, possibly filtered.",
49906	//   "httpMethod": "GET",
49907	//   "id": "dfareporting.userRolePermissions.list",
49908	//   "parameterOrder": [
49909	//     "profileId"
49910	//   ],
49911	//   "parameters": {
49912	//     "ids": {
49913	//       "description": "Select only user role permissions with these IDs.",
49914	//       "format": "int64",
49915	//       "location": "query",
49916	//       "repeated": true,
49917	//       "type": "string"
49918	//     },
49919	//     "profileId": {
49920	//       "description": "User profile ID associated with this request.",
49921	//       "format": "int64",
49922	//       "location": "path",
49923	//       "required": true,
49924	//       "type": "string"
49925	//     }
49926	//   },
49927	//   "path": "userprofiles/{profileId}/userRolePermissions",
49928	//   "response": {
49929	//     "$ref": "UserRolePermissionsListResponse"
49930	//   },
49931	//   "scopes": [
49932	//     "https://www.googleapis.com/auth/dfatrafficking"
49933	//   ]
49934	// }
49935
49936}
49937
49938// method id "dfareporting.userRoles.delete":
49939
49940type UserRolesDeleteCall struct {
49941	s          *Service
49942	profileId  int64
49943	id         int64
49944	urlParams_ gensupport.URLParams
49945	ctx_       context.Context
49946	header_    http.Header
49947}
49948
49949// Delete: Deletes an existing user role.
49950func (r *UserRolesService) Delete(profileId int64, id int64) *UserRolesDeleteCall {
49951	c := &UserRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49952	c.profileId = profileId
49953	c.id = id
49954	return c
49955}
49956
49957// Fields allows partial responses to be retrieved. See
49958// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49959// for more information.
49960func (c *UserRolesDeleteCall) Fields(s ...googleapi.Field) *UserRolesDeleteCall {
49961	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49962	return c
49963}
49964
49965// Context sets the context to be used in this call's Do method. Any
49966// pending HTTP request will be aborted if the provided context is
49967// canceled.
49968func (c *UserRolesDeleteCall) Context(ctx context.Context) *UserRolesDeleteCall {
49969	c.ctx_ = ctx
49970	return c
49971}
49972
49973// Header returns an http.Header that can be modified by the caller to
49974// add HTTP headers to the request.
49975func (c *UserRolesDeleteCall) Header() http.Header {
49976	if c.header_ == nil {
49977		c.header_ = make(http.Header)
49978	}
49979	return c.header_
49980}
49981
49982func (c *UserRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
49983	reqHeaders := make(http.Header)
49984	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
49985	for k, v := range c.header_ {
49986		reqHeaders[k] = v
49987	}
49988	reqHeaders.Set("User-Agent", c.s.userAgent())
49989	var body io.Reader = nil
49990	c.urlParams_.Set("alt", alt)
49991	c.urlParams_.Set("prettyPrint", "false")
49992	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
49993	urls += "?" + c.urlParams_.Encode()
49994	req, err := http.NewRequest("DELETE", urls, body)
49995	if err != nil {
49996		return nil, err
49997	}
49998	req.Header = reqHeaders
49999	googleapi.Expand(req.URL, map[string]string{
50000		"profileId": strconv.FormatInt(c.profileId, 10),
50001		"id":        strconv.FormatInt(c.id, 10),
50002	})
50003	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50004}
50005
50006// Do executes the "dfareporting.userRoles.delete" call.
50007func (c *UserRolesDeleteCall) Do(opts ...googleapi.CallOption) error {
50008	gensupport.SetOptions(c.urlParams_, opts...)
50009	res, err := c.doRequest("json")
50010	if err != nil {
50011		return err
50012	}
50013	defer googleapi.CloseBody(res)
50014	if err := googleapi.CheckResponse(res); err != nil {
50015		return err
50016	}
50017	return nil
50018	// {
50019	//   "description": "Deletes an existing user role.",
50020	//   "httpMethod": "DELETE",
50021	//   "id": "dfareporting.userRoles.delete",
50022	//   "parameterOrder": [
50023	//     "profileId",
50024	//     "id"
50025	//   ],
50026	//   "parameters": {
50027	//     "id": {
50028	//       "description": "User role ID.",
50029	//       "format": "int64",
50030	//       "location": "path",
50031	//       "required": true,
50032	//       "type": "string"
50033	//     },
50034	//     "profileId": {
50035	//       "description": "User profile ID associated with this request.",
50036	//       "format": "int64",
50037	//       "location": "path",
50038	//       "required": true,
50039	//       "type": "string"
50040	//     }
50041	//   },
50042	//   "path": "userprofiles/{profileId}/userRoles/{id}",
50043	//   "scopes": [
50044	//     "https://www.googleapis.com/auth/dfatrafficking"
50045	//   ]
50046	// }
50047
50048}
50049
50050// method id "dfareporting.userRoles.get":
50051
50052type UserRolesGetCall struct {
50053	s            *Service
50054	profileId    int64
50055	id           int64
50056	urlParams_   gensupport.URLParams
50057	ifNoneMatch_ string
50058	ctx_         context.Context
50059	header_      http.Header
50060}
50061
50062// Get: Gets one user role by ID.
50063func (r *UserRolesService) Get(profileId int64, id int64) *UserRolesGetCall {
50064	c := &UserRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50065	c.profileId = profileId
50066	c.id = id
50067	return c
50068}
50069
50070// Fields allows partial responses to be retrieved. See
50071// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50072// for more information.
50073func (c *UserRolesGetCall) Fields(s ...googleapi.Field) *UserRolesGetCall {
50074	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50075	return c
50076}
50077
50078// IfNoneMatch sets the optional parameter which makes the operation
50079// fail if the object's ETag matches the given value. This is useful for
50080// getting updates only after the object has changed since the last
50081// request. Use googleapi.IsNotModified to check whether the response
50082// error from Do is the result of In-None-Match.
50083func (c *UserRolesGetCall) IfNoneMatch(entityTag string) *UserRolesGetCall {
50084	c.ifNoneMatch_ = entityTag
50085	return c
50086}
50087
50088// Context sets the context to be used in this call's Do method. Any
50089// pending HTTP request will be aborted if the provided context is
50090// canceled.
50091func (c *UserRolesGetCall) Context(ctx context.Context) *UserRolesGetCall {
50092	c.ctx_ = ctx
50093	return c
50094}
50095
50096// Header returns an http.Header that can be modified by the caller to
50097// add HTTP headers to the request.
50098func (c *UserRolesGetCall) Header() http.Header {
50099	if c.header_ == nil {
50100		c.header_ = make(http.Header)
50101	}
50102	return c.header_
50103}
50104
50105func (c *UserRolesGetCall) doRequest(alt string) (*http.Response, error) {
50106	reqHeaders := make(http.Header)
50107	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
50108	for k, v := range c.header_ {
50109		reqHeaders[k] = v
50110	}
50111	reqHeaders.Set("User-Agent", c.s.userAgent())
50112	if c.ifNoneMatch_ != "" {
50113		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50114	}
50115	var body io.Reader = nil
50116	c.urlParams_.Set("alt", alt)
50117	c.urlParams_.Set("prettyPrint", "false")
50118	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
50119	urls += "?" + c.urlParams_.Encode()
50120	req, err := http.NewRequest("GET", urls, body)
50121	if err != nil {
50122		return nil, err
50123	}
50124	req.Header = reqHeaders
50125	googleapi.Expand(req.URL, map[string]string{
50126		"profileId": strconv.FormatInt(c.profileId, 10),
50127		"id":        strconv.FormatInt(c.id, 10),
50128	})
50129	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50130}
50131
50132// Do executes the "dfareporting.userRoles.get" call.
50133// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50134// code is an error. Response headers are in either
50135// *UserRole.ServerResponse.Header or (if a response was returned at
50136// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50137// to check whether the returned error was because
50138// http.StatusNotModified was returned.
50139func (c *UserRolesGetCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50140	gensupport.SetOptions(c.urlParams_, opts...)
50141	res, err := c.doRequest("json")
50142	if res != nil && res.StatusCode == http.StatusNotModified {
50143		if res.Body != nil {
50144			res.Body.Close()
50145		}
50146		return nil, &googleapi.Error{
50147			Code:   res.StatusCode,
50148			Header: res.Header,
50149		}
50150	}
50151	if err != nil {
50152		return nil, err
50153	}
50154	defer googleapi.CloseBody(res)
50155	if err := googleapi.CheckResponse(res); err != nil {
50156		return nil, err
50157	}
50158	ret := &UserRole{
50159		ServerResponse: googleapi.ServerResponse{
50160			Header:         res.Header,
50161			HTTPStatusCode: res.StatusCode,
50162		},
50163	}
50164	target := &ret
50165	if err := gensupport.DecodeResponse(target, res); err != nil {
50166		return nil, err
50167	}
50168	return ret, nil
50169	// {
50170	//   "description": "Gets one user role by ID.",
50171	//   "httpMethod": "GET",
50172	//   "id": "dfareporting.userRoles.get",
50173	//   "parameterOrder": [
50174	//     "profileId",
50175	//     "id"
50176	//   ],
50177	//   "parameters": {
50178	//     "id": {
50179	//       "description": "User role ID.",
50180	//       "format": "int64",
50181	//       "location": "path",
50182	//       "required": true,
50183	//       "type": "string"
50184	//     },
50185	//     "profileId": {
50186	//       "description": "User profile ID associated with this request.",
50187	//       "format": "int64",
50188	//       "location": "path",
50189	//       "required": true,
50190	//       "type": "string"
50191	//     }
50192	//   },
50193	//   "path": "userprofiles/{profileId}/userRoles/{id}",
50194	//   "response": {
50195	//     "$ref": "UserRole"
50196	//   },
50197	//   "scopes": [
50198	//     "https://www.googleapis.com/auth/dfatrafficking"
50199	//   ]
50200	// }
50201
50202}
50203
50204// method id "dfareporting.userRoles.insert":
50205
50206type UserRolesInsertCall struct {
50207	s          *Service
50208	profileId  int64
50209	userrole   *UserRole
50210	urlParams_ gensupport.URLParams
50211	ctx_       context.Context
50212	header_    http.Header
50213}
50214
50215// Insert: Inserts a new user role.
50216func (r *UserRolesService) Insert(profileId int64, userrole *UserRole) *UserRolesInsertCall {
50217	c := &UserRolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50218	c.profileId = profileId
50219	c.userrole = userrole
50220	return c
50221}
50222
50223// Fields allows partial responses to be retrieved. See
50224// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50225// for more information.
50226func (c *UserRolesInsertCall) Fields(s ...googleapi.Field) *UserRolesInsertCall {
50227	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50228	return c
50229}
50230
50231// Context sets the context to be used in this call's Do method. Any
50232// pending HTTP request will be aborted if the provided context is
50233// canceled.
50234func (c *UserRolesInsertCall) Context(ctx context.Context) *UserRolesInsertCall {
50235	c.ctx_ = ctx
50236	return c
50237}
50238
50239// Header returns an http.Header that can be modified by the caller to
50240// add HTTP headers to the request.
50241func (c *UserRolesInsertCall) Header() http.Header {
50242	if c.header_ == nil {
50243		c.header_ = make(http.Header)
50244	}
50245	return c.header_
50246}
50247
50248func (c *UserRolesInsertCall) doRequest(alt string) (*http.Response, error) {
50249	reqHeaders := make(http.Header)
50250	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
50251	for k, v := range c.header_ {
50252		reqHeaders[k] = v
50253	}
50254	reqHeaders.Set("User-Agent", c.s.userAgent())
50255	var body io.Reader = nil
50256	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50257	if err != nil {
50258		return nil, err
50259	}
50260	reqHeaders.Set("Content-Type", "application/json")
50261	c.urlParams_.Set("alt", alt)
50262	c.urlParams_.Set("prettyPrint", "false")
50263	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50264	urls += "?" + c.urlParams_.Encode()
50265	req, err := http.NewRequest("POST", urls, body)
50266	if err != nil {
50267		return nil, err
50268	}
50269	req.Header = reqHeaders
50270	googleapi.Expand(req.URL, map[string]string{
50271		"profileId": strconv.FormatInt(c.profileId, 10),
50272	})
50273	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50274}
50275
50276// Do executes the "dfareporting.userRoles.insert" call.
50277// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50278// code is an error. Response headers are in either
50279// *UserRole.ServerResponse.Header or (if a response was returned at
50280// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50281// to check whether the returned error was because
50282// http.StatusNotModified was returned.
50283func (c *UserRolesInsertCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50284	gensupport.SetOptions(c.urlParams_, opts...)
50285	res, err := c.doRequest("json")
50286	if res != nil && res.StatusCode == http.StatusNotModified {
50287		if res.Body != nil {
50288			res.Body.Close()
50289		}
50290		return nil, &googleapi.Error{
50291			Code:   res.StatusCode,
50292			Header: res.Header,
50293		}
50294	}
50295	if err != nil {
50296		return nil, err
50297	}
50298	defer googleapi.CloseBody(res)
50299	if err := googleapi.CheckResponse(res); err != nil {
50300		return nil, err
50301	}
50302	ret := &UserRole{
50303		ServerResponse: googleapi.ServerResponse{
50304			Header:         res.Header,
50305			HTTPStatusCode: res.StatusCode,
50306		},
50307	}
50308	target := &ret
50309	if err := gensupport.DecodeResponse(target, res); err != nil {
50310		return nil, err
50311	}
50312	return ret, nil
50313	// {
50314	//   "description": "Inserts a new user role.",
50315	//   "httpMethod": "POST",
50316	//   "id": "dfareporting.userRoles.insert",
50317	//   "parameterOrder": [
50318	//     "profileId"
50319	//   ],
50320	//   "parameters": {
50321	//     "profileId": {
50322	//       "description": "User profile ID associated with this request.",
50323	//       "format": "int64",
50324	//       "location": "path",
50325	//       "required": true,
50326	//       "type": "string"
50327	//     }
50328	//   },
50329	//   "path": "userprofiles/{profileId}/userRoles",
50330	//   "request": {
50331	//     "$ref": "UserRole"
50332	//   },
50333	//   "response": {
50334	//     "$ref": "UserRole"
50335	//   },
50336	//   "scopes": [
50337	//     "https://www.googleapis.com/auth/dfatrafficking"
50338	//   ]
50339	// }
50340
50341}
50342
50343// method id "dfareporting.userRoles.list":
50344
50345type UserRolesListCall struct {
50346	s            *Service
50347	profileId    int64
50348	urlParams_   gensupport.URLParams
50349	ifNoneMatch_ string
50350	ctx_         context.Context
50351	header_      http.Header
50352}
50353
50354// List: Retrieves a list of user roles, possibly filtered. This method
50355// supports paging.
50356func (r *UserRolesService) List(profileId int64) *UserRolesListCall {
50357	c := &UserRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50358	c.profileId = profileId
50359	return c
50360}
50361
50362// AccountUserRoleOnly sets the optional parameter
50363// "accountUserRoleOnly": Select only account level user roles not
50364// associated with any specific subaccount.
50365func (c *UserRolesListCall) AccountUserRoleOnly(accountUserRoleOnly bool) *UserRolesListCall {
50366	c.urlParams_.Set("accountUserRoleOnly", fmt.Sprint(accountUserRoleOnly))
50367	return c
50368}
50369
50370// Ids sets the optional parameter "ids": Select only user roles with
50371// the specified IDs.
50372func (c *UserRolesListCall) Ids(ids ...int64) *UserRolesListCall {
50373	var ids_ []string
50374	for _, v := range ids {
50375		ids_ = append(ids_, fmt.Sprint(v))
50376	}
50377	c.urlParams_.SetMulti("ids", ids_)
50378	return c
50379}
50380
50381// MaxResults sets the optional parameter "maxResults": Maximum number
50382// of results to return.
50383func (c *UserRolesListCall) MaxResults(maxResults int64) *UserRolesListCall {
50384	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
50385	return c
50386}
50387
50388// PageToken sets the optional parameter "pageToken": Value of the
50389// nextPageToken from the previous result page.
50390func (c *UserRolesListCall) PageToken(pageToken string) *UserRolesListCall {
50391	c.urlParams_.Set("pageToken", pageToken)
50392	return c
50393}
50394
50395// SearchString sets the optional parameter "searchString": Allows
50396// searching for objects by name or ID. Wildcards (*) are allowed. For
50397// example, "userrole*2015" will return objects with names like
50398// "userrole June 2015", "userrole April 2015", or simply "userrole
50399// 2015". Most of the searches also add wildcards implicitly at the
50400// start and the end of the search string. For example, a search string
50401// of "userrole" will match objects with name "my userrole", "userrole
50402// 2015", or simply "userrole".
50403func (c *UserRolesListCall) SearchString(searchString string) *UserRolesListCall {
50404	c.urlParams_.Set("searchString", searchString)
50405	return c
50406}
50407
50408// SortField sets the optional parameter "sortField": Field by which to
50409// sort the list.
50410//
50411// Possible values:
50412//   "ID" (default)
50413//   "NAME"
50414func (c *UserRolesListCall) SortField(sortField string) *UserRolesListCall {
50415	c.urlParams_.Set("sortField", sortField)
50416	return c
50417}
50418
50419// SortOrder sets the optional parameter "sortOrder": Order of sorted
50420// results.
50421//
50422// Possible values:
50423//   "ASCENDING" (default)
50424//   "DESCENDING"
50425func (c *UserRolesListCall) SortOrder(sortOrder string) *UserRolesListCall {
50426	c.urlParams_.Set("sortOrder", sortOrder)
50427	return c
50428}
50429
50430// SubaccountId sets the optional parameter "subaccountId": Select only
50431// user roles that belong to this subaccount.
50432func (c *UserRolesListCall) SubaccountId(subaccountId int64) *UserRolesListCall {
50433	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
50434	return c
50435}
50436
50437// Fields allows partial responses to be retrieved. See
50438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50439// for more information.
50440func (c *UserRolesListCall) Fields(s ...googleapi.Field) *UserRolesListCall {
50441	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50442	return c
50443}
50444
50445// IfNoneMatch sets the optional parameter which makes the operation
50446// fail if the object's ETag matches the given value. This is useful for
50447// getting updates only after the object has changed since the last
50448// request. Use googleapi.IsNotModified to check whether the response
50449// error from Do is the result of In-None-Match.
50450func (c *UserRolesListCall) IfNoneMatch(entityTag string) *UserRolesListCall {
50451	c.ifNoneMatch_ = entityTag
50452	return c
50453}
50454
50455// Context sets the context to be used in this call's Do method. Any
50456// pending HTTP request will be aborted if the provided context is
50457// canceled.
50458func (c *UserRolesListCall) Context(ctx context.Context) *UserRolesListCall {
50459	c.ctx_ = ctx
50460	return c
50461}
50462
50463// Header returns an http.Header that can be modified by the caller to
50464// add HTTP headers to the request.
50465func (c *UserRolesListCall) Header() http.Header {
50466	if c.header_ == nil {
50467		c.header_ = make(http.Header)
50468	}
50469	return c.header_
50470}
50471
50472func (c *UserRolesListCall) doRequest(alt string) (*http.Response, error) {
50473	reqHeaders := make(http.Header)
50474	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
50475	for k, v := range c.header_ {
50476		reqHeaders[k] = v
50477	}
50478	reqHeaders.Set("User-Agent", c.s.userAgent())
50479	if c.ifNoneMatch_ != "" {
50480		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50481	}
50482	var body io.Reader = nil
50483	c.urlParams_.Set("alt", alt)
50484	c.urlParams_.Set("prettyPrint", "false")
50485	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50486	urls += "?" + c.urlParams_.Encode()
50487	req, err := http.NewRequest("GET", urls, body)
50488	if err != nil {
50489		return nil, err
50490	}
50491	req.Header = reqHeaders
50492	googleapi.Expand(req.URL, map[string]string{
50493		"profileId": strconv.FormatInt(c.profileId, 10),
50494	})
50495	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50496}
50497
50498// Do executes the "dfareporting.userRoles.list" call.
50499// Exactly one of *UserRolesListResponse or error will be non-nil. Any
50500// non-2xx status code is an error. Response headers are in either
50501// *UserRolesListResponse.ServerResponse.Header or (if a response was
50502// returned at all) in error.(*googleapi.Error).Header. Use
50503// googleapi.IsNotModified to check whether the returned error was
50504// because http.StatusNotModified was returned.
50505func (c *UserRolesListCall) Do(opts ...googleapi.CallOption) (*UserRolesListResponse, error) {
50506	gensupport.SetOptions(c.urlParams_, opts...)
50507	res, err := c.doRequest("json")
50508	if res != nil && res.StatusCode == http.StatusNotModified {
50509		if res.Body != nil {
50510			res.Body.Close()
50511		}
50512		return nil, &googleapi.Error{
50513			Code:   res.StatusCode,
50514			Header: res.Header,
50515		}
50516	}
50517	if err != nil {
50518		return nil, err
50519	}
50520	defer googleapi.CloseBody(res)
50521	if err := googleapi.CheckResponse(res); err != nil {
50522		return nil, err
50523	}
50524	ret := &UserRolesListResponse{
50525		ServerResponse: googleapi.ServerResponse{
50526			Header:         res.Header,
50527			HTTPStatusCode: res.StatusCode,
50528		},
50529	}
50530	target := &ret
50531	if err := gensupport.DecodeResponse(target, res); err != nil {
50532		return nil, err
50533	}
50534	return ret, nil
50535	// {
50536	//   "description": "Retrieves a list of user roles, possibly filtered. This method supports paging.",
50537	//   "httpMethod": "GET",
50538	//   "id": "dfareporting.userRoles.list",
50539	//   "parameterOrder": [
50540	//     "profileId"
50541	//   ],
50542	//   "parameters": {
50543	//     "accountUserRoleOnly": {
50544	//       "description": "Select only account level user roles not associated with any specific subaccount.",
50545	//       "location": "query",
50546	//       "type": "boolean"
50547	//     },
50548	//     "ids": {
50549	//       "description": "Select only user roles with the specified IDs.",
50550	//       "format": "int64",
50551	//       "location": "query",
50552	//       "repeated": true,
50553	//       "type": "string"
50554	//     },
50555	//     "maxResults": {
50556	//       "default": "1000",
50557	//       "description": "Maximum number of results to return.",
50558	//       "format": "int32",
50559	//       "location": "query",
50560	//       "maximum": "1000",
50561	//       "minimum": "0",
50562	//       "type": "integer"
50563	//     },
50564	//     "pageToken": {
50565	//       "description": "Value of the nextPageToken from the previous result page.",
50566	//       "location": "query",
50567	//       "type": "string"
50568	//     },
50569	//     "profileId": {
50570	//       "description": "User profile ID associated with this request.",
50571	//       "format": "int64",
50572	//       "location": "path",
50573	//       "required": true,
50574	//       "type": "string"
50575	//     },
50576	//     "searchString": {
50577	//       "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\".",
50578	//       "location": "query",
50579	//       "type": "string"
50580	//     },
50581	//     "sortField": {
50582	//       "default": "ID",
50583	//       "description": "Field by which to sort the list.",
50584	//       "enum": [
50585	//         "ID",
50586	//         "NAME"
50587	//       ],
50588	//       "enumDescriptions": [
50589	//         "",
50590	//         ""
50591	//       ],
50592	//       "location": "query",
50593	//       "type": "string"
50594	//     },
50595	//     "sortOrder": {
50596	//       "default": "ASCENDING",
50597	//       "description": "Order of sorted results.",
50598	//       "enum": [
50599	//         "ASCENDING",
50600	//         "DESCENDING"
50601	//       ],
50602	//       "enumDescriptions": [
50603	//         "",
50604	//         ""
50605	//       ],
50606	//       "location": "query",
50607	//       "type": "string"
50608	//     },
50609	//     "subaccountId": {
50610	//       "description": "Select only user roles that belong to this subaccount.",
50611	//       "format": "int64",
50612	//       "location": "query",
50613	//       "type": "string"
50614	//     }
50615	//   },
50616	//   "path": "userprofiles/{profileId}/userRoles",
50617	//   "response": {
50618	//     "$ref": "UserRolesListResponse"
50619	//   },
50620	//   "scopes": [
50621	//     "https://www.googleapis.com/auth/dfatrafficking"
50622	//   ]
50623	// }
50624
50625}
50626
50627// Pages invokes f for each page of results.
50628// A non-nil error returned from f will halt the iteration.
50629// The provided context supersedes any context provided to the Context method.
50630func (c *UserRolesListCall) Pages(ctx context.Context, f func(*UserRolesListResponse) error) error {
50631	c.ctx_ = ctx
50632	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
50633	for {
50634		x, err := c.Do()
50635		if err != nil {
50636			return err
50637		}
50638		if err := f(x); err != nil {
50639			return err
50640		}
50641		if x.NextPageToken == "" {
50642			return nil
50643		}
50644		c.PageToken(x.NextPageToken)
50645	}
50646}
50647
50648// method id "dfareporting.userRoles.patch":
50649
50650type UserRolesPatchCall struct {
50651	s          *Service
50652	profileId  int64
50653	userrole   *UserRole
50654	urlParams_ gensupport.URLParams
50655	ctx_       context.Context
50656	header_    http.Header
50657}
50658
50659// Patch: Updates an existing user role. This method supports patch
50660// semantics.
50661func (r *UserRolesService) Patch(profileId int64, id int64, userrole *UserRole) *UserRolesPatchCall {
50662	c := &UserRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50663	c.profileId = profileId
50664	c.urlParams_.Set("id", fmt.Sprint(id))
50665	c.userrole = userrole
50666	return c
50667}
50668
50669// Fields allows partial responses to be retrieved. See
50670// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50671// for more information.
50672func (c *UserRolesPatchCall) Fields(s ...googleapi.Field) *UserRolesPatchCall {
50673	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50674	return c
50675}
50676
50677// Context sets the context to be used in this call's Do method. Any
50678// pending HTTP request will be aborted if the provided context is
50679// canceled.
50680func (c *UserRolesPatchCall) Context(ctx context.Context) *UserRolesPatchCall {
50681	c.ctx_ = ctx
50682	return c
50683}
50684
50685// Header returns an http.Header that can be modified by the caller to
50686// add HTTP headers to the request.
50687func (c *UserRolesPatchCall) Header() http.Header {
50688	if c.header_ == nil {
50689		c.header_ = make(http.Header)
50690	}
50691	return c.header_
50692}
50693
50694func (c *UserRolesPatchCall) doRequest(alt string) (*http.Response, error) {
50695	reqHeaders := make(http.Header)
50696	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
50697	for k, v := range c.header_ {
50698		reqHeaders[k] = v
50699	}
50700	reqHeaders.Set("User-Agent", c.s.userAgent())
50701	var body io.Reader = nil
50702	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50703	if err != nil {
50704		return nil, err
50705	}
50706	reqHeaders.Set("Content-Type", "application/json")
50707	c.urlParams_.Set("alt", alt)
50708	c.urlParams_.Set("prettyPrint", "false")
50709	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50710	urls += "?" + c.urlParams_.Encode()
50711	req, err := http.NewRequest("PATCH", urls, body)
50712	if err != nil {
50713		return nil, err
50714	}
50715	req.Header = reqHeaders
50716	googleapi.Expand(req.URL, map[string]string{
50717		"profileId": strconv.FormatInt(c.profileId, 10),
50718	})
50719	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50720}
50721
50722// Do executes the "dfareporting.userRoles.patch" call.
50723// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50724// code is an error. Response headers are in either
50725// *UserRole.ServerResponse.Header or (if a response was returned at
50726// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50727// to check whether the returned error was because
50728// http.StatusNotModified was returned.
50729func (c *UserRolesPatchCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50730	gensupport.SetOptions(c.urlParams_, opts...)
50731	res, err := c.doRequest("json")
50732	if res != nil && res.StatusCode == http.StatusNotModified {
50733		if res.Body != nil {
50734			res.Body.Close()
50735		}
50736		return nil, &googleapi.Error{
50737			Code:   res.StatusCode,
50738			Header: res.Header,
50739		}
50740	}
50741	if err != nil {
50742		return nil, err
50743	}
50744	defer googleapi.CloseBody(res)
50745	if err := googleapi.CheckResponse(res); err != nil {
50746		return nil, err
50747	}
50748	ret := &UserRole{
50749		ServerResponse: googleapi.ServerResponse{
50750			Header:         res.Header,
50751			HTTPStatusCode: res.StatusCode,
50752		},
50753	}
50754	target := &ret
50755	if err := gensupport.DecodeResponse(target, res); err != nil {
50756		return nil, err
50757	}
50758	return ret, nil
50759	// {
50760	//   "description": "Updates an existing user role. This method supports patch semantics.",
50761	//   "httpMethod": "PATCH",
50762	//   "id": "dfareporting.userRoles.patch",
50763	//   "parameterOrder": [
50764	//     "profileId",
50765	//     "id"
50766	//   ],
50767	//   "parameters": {
50768	//     "id": {
50769	//       "description": "User role ID.",
50770	//       "format": "int64",
50771	//       "location": "query",
50772	//       "required": true,
50773	//       "type": "string"
50774	//     },
50775	//     "profileId": {
50776	//       "description": "User profile ID associated with this request.",
50777	//       "format": "int64",
50778	//       "location": "path",
50779	//       "required": true,
50780	//       "type": "string"
50781	//     }
50782	//   },
50783	//   "path": "userprofiles/{profileId}/userRoles",
50784	//   "request": {
50785	//     "$ref": "UserRole"
50786	//   },
50787	//   "response": {
50788	//     "$ref": "UserRole"
50789	//   },
50790	//   "scopes": [
50791	//     "https://www.googleapis.com/auth/dfatrafficking"
50792	//   ]
50793	// }
50794
50795}
50796
50797// method id "dfareporting.userRoles.update":
50798
50799type UserRolesUpdateCall struct {
50800	s          *Service
50801	profileId  int64
50802	userrole   *UserRole
50803	urlParams_ gensupport.URLParams
50804	ctx_       context.Context
50805	header_    http.Header
50806}
50807
50808// Update: Updates an existing user role.
50809func (r *UserRolesService) Update(profileId int64, userrole *UserRole) *UserRolesUpdateCall {
50810	c := &UserRolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50811	c.profileId = profileId
50812	c.userrole = userrole
50813	return c
50814}
50815
50816// Fields allows partial responses to be retrieved. See
50817// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50818// for more information.
50819func (c *UserRolesUpdateCall) Fields(s ...googleapi.Field) *UserRolesUpdateCall {
50820	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50821	return c
50822}
50823
50824// Context sets the context to be used in this call's Do method. Any
50825// pending HTTP request will be aborted if the provided context is
50826// canceled.
50827func (c *UserRolesUpdateCall) Context(ctx context.Context) *UserRolesUpdateCall {
50828	c.ctx_ = ctx
50829	return c
50830}
50831
50832// Header returns an http.Header that can be modified by the caller to
50833// add HTTP headers to the request.
50834func (c *UserRolesUpdateCall) Header() http.Header {
50835	if c.header_ == nil {
50836		c.header_ = make(http.Header)
50837	}
50838	return c.header_
50839}
50840
50841func (c *UserRolesUpdateCall) doRequest(alt string) (*http.Response, error) {
50842	reqHeaders := make(http.Header)
50843	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
50844	for k, v := range c.header_ {
50845		reqHeaders[k] = v
50846	}
50847	reqHeaders.Set("User-Agent", c.s.userAgent())
50848	var body io.Reader = nil
50849	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50850	if err != nil {
50851		return nil, err
50852	}
50853	reqHeaders.Set("Content-Type", "application/json")
50854	c.urlParams_.Set("alt", alt)
50855	c.urlParams_.Set("prettyPrint", "false")
50856	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50857	urls += "?" + c.urlParams_.Encode()
50858	req, err := http.NewRequest("PUT", urls, body)
50859	if err != nil {
50860		return nil, err
50861	}
50862	req.Header = reqHeaders
50863	googleapi.Expand(req.URL, map[string]string{
50864		"profileId": strconv.FormatInt(c.profileId, 10),
50865	})
50866	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50867}
50868
50869// Do executes the "dfareporting.userRoles.update" call.
50870// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50871// code is an error. Response headers are in either
50872// *UserRole.ServerResponse.Header or (if a response was returned at
50873// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50874// to check whether the returned error was because
50875// http.StatusNotModified was returned.
50876func (c *UserRolesUpdateCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50877	gensupport.SetOptions(c.urlParams_, opts...)
50878	res, err := c.doRequest("json")
50879	if res != nil && res.StatusCode == http.StatusNotModified {
50880		if res.Body != nil {
50881			res.Body.Close()
50882		}
50883		return nil, &googleapi.Error{
50884			Code:   res.StatusCode,
50885			Header: res.Header,
50886		}
50887	}
50888	if err != nil {
50889		return nil, err
50890	}
50891	defer googleapi.CloseBody(res)
50892	if err := googleapi.CheckResponse(res); err != nil {
50893		return nil, err
50894	}
50895	ret := &UserRole{
50896		ServerResponse: googleapi.ServerResponse{
50897			Header:         res.Header,
50898			HTTPStatusCode: res.StatusCode,
50899		},
50900	}
50901	target := &ret
50902	if err := gensupport.DecodeResponse(target, res); err != nil {
50903		return nil, err
50904	}
50905	return ret, nil
50906	// {
50907	//   "description": "Updates an existing user role.",
50908	//   "httpMethod": "PUT",
50909	//   "id": "dfareporting.userRoles.update",
50910	//   "parameterOrder": [
50911	//     "profileId"
50912	//   ],
50913	//   "parameters": {
50914	//     "profileId": {
50915	//       "description": "User profile ID associated with this request.",
50916	//       "format": "int64",
50917	//       "location": "path",
50918	//       "required": true,
50919	//       "type": "string"
50920	//     }
50921	//   },
50922	//   "path": "userprofiles/{profileId}/userRoles",
50923	//   "request": {
50924	//     "$ref": "UserRole"
50925	//   },
50926	//   "response": {
50927	//     "$ref": "UserRole"
50928	//   },
50929	//   "scopes": [
50930	//     "https://www.googleapis.com/auth/dfatrafficking"
50931	//   ]
50932	// }
50933
50934}
50935
50936// method id "dfareporting.videoFormats.get":
50937
50938type VideoFormatsGetCall 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 video format by ID.
50949func (r *VideoFormatsService) Get(profileId int64, id int64) *VideoFormatsGetCall {
50950	c := &VideoFormatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50951	c.profileId = profileId
50952	c.id = id
50953	return c
50954}
50955
50956// Fields allows partial responses to be retrieved. See
50957// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50958// for more information.
50959func (c *VideoFormatsGetCall) Fields(s ...googleapi.Field) *VideoFormatsGetCall {
50960	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50961	return c
50962}
50963
50964// IfNoneMatch sets the optional parameter which makes the operation
50965// fail if the object's ETag matches the given value. This is useful for
50966// getting updates only after the object has changed since the last
50967// request. Use googleapi.IsNotModified to check whether the response
50968// error from Do is the result of In-None-Match.
50969func (c *VideoFormatsGetCall) IfNoneMatch(entityTag string) *VideoFormatsGetCall {
50970	c.ifNoneMatch_ = entityTag
50971	return c
50972}
50973
50974// Context sets the context to be used in this call's Do method. Any
50975// pending HTTP request will be aborted if the provided context is
50976// canceled.
50977func (c *VideoFormatsGetCall) Context(ctx context.Context) *VideoFormatsGetCall {
50978	c.ctx_ = ctx
50979	return c
50980}
50981
50982// Header returns an http.Header that can be modified by the caller to
50983// add HTTP headers to the request.
50984func (c *VideoFormatsGetCall) Header() http.Header {
50985	if c.header_ == nil {
50986		c.header_ = make(http.Header)
50987	}
50988	return c.header_
50989}
50990
50991func (c *VideoFormatsGetCall) doRequest(alt string) (*http.Response, error) {
50992	reqHeaders := make(http.Header)
50993	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
50994	for k, v := range c.header_ {
50995		reqHeaders[k] = v
50996	}
50997	reqHeaders.Set("User-Agent", c.s.userAgent())
50998	if c.ifNoneMatch_ != "" {
50999		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51000	}
51001	var body io.Reader = nil
51002	c.urlParams_.Set("alt", alt)
51003	c.urlParams_.Set("prettyPrint", "false")
51004	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats/{id}")
51005	urls += "?" + c.urlParams_.Encode()
51006	req, err := http.NewRequest("GET", urls, body)
51007	if err != nil {
51008		return nil, err
51009	}
51010	req.Header = reqHeaders
51011	googleapi.Expand(req.URL, map[string]string{
51012		"profileId": strconv.FormatInt(c.profileId, 10),
51013		"id":        strconv.FormatInt(c.id, 10),
51014	})
51015	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51016}
51017
51018// Do executes the "dfareporting.videoFormats.get" call.
51019// Exactly one of *VideoFormat or error will be non-nil. Any non-2xx
51020// status code is an error. Response headers are in either
51021// *VideoFormat.ServerResponse.Header or (if a response was returned at
51022// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
51023// to check whether the returned error was because
51024// http.StatusNotModified was returned.
51025func (c *VideoFormatsGetCall) Do(opts ...googleapi.CallOption) (*VideoFormat, error) {
51026	gensupport.SetOptions(c.urlParams_, opts...)
51027	res, err := c.doRequest("json")
51028	if res != nil && res.StatusCode == http.StatusNotModified {
51029		if res.Body != nil {
51030			res.Body.Close()
51031		}
51032		return nil, &googleapi.Error{
51033			Code:   res.StatusCode,
51034			Header: res.Header,
51035		}
51036	}
51037	if err != nil {
51038		return nil, err
51039	}
51040	defer googleapi.CloseBody(res)
51041	if err := googleapi.CheckResponse(res); err != nil {
51042		return nil, err
51043	}
51044	ret := &VideoFormat{
51045		ServerResponse: googleapi.ServerResponse{
51046			Header:         res.Header,
51047			HTTPStatusCode: res.StatusCode,
51048		},
51049	}
51050	target := &ret
51051	if err := gensupport.DecodeResponse(target, res); err != nil {
51052		return nil, err
51053	}
51054	return ret, nil
51055	// {
51056	//   "description": "Gets one video format by ID.",
51057	//   "httpMethod": "GET",
51058	//   "id": "dfareporting.videoFormats.get",
51059	//   "parameterOrder": [
51060	//     "profileId",
51061	//     "id"
51062	//   ],
51063	//   "parameters": {
51064	//     "id": {
51065	//       "description": "Video format ID.",
51066	//       "format": "int32",
51067	//       "location": "path",
51068	//       "required": true,
51069	//       "type": "integer"
51070	//     },
51071	//     "profileId": {
51072	//       "description": "User profile ID associated with this request.",
51073	//       "format": "int64",
51074	//       "location": "path",
51075	//       "required": true,
51076	//       "type": "string"
51077	//     }
51078	//   },
51079	//   "path": "userprofiles/{profileId}/videoFormats/{id}",
51080	//   "response": {
51081	//     "$ref": "VideoFormat"
51082	//   },
51083	//   "scopes": [
51084	//     "https://www.googleapis.com/auth/dfatrafficking"
51085	//   ]
51086	// }
51087
51088}
51089
51090// method id "dfareporting.videoFormats.list":
51091
51092type VideoFormatsListCall struct {
51093	s            *Service
51094	profileId    int64
51095	urlParams_   gensupport.URLParams
51096	ifNoneMatch_ string
51097	ctx_         context.Context
51098	header_      http.Header
51099}
51100
51101// List: Lists available video formats.
51102func (r *VideoFormatsService) List(profileId int64) *VideoFormatsListCall {
51103	c := &VideoFormatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51104	c.profileId = profileId
51105	return c
51106}
51107
51108// Fields allows partial responses to be retrieved. See
51109// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51110// for more information.
51111func (c *VideoFormatsListCall) Fields(s ...googleapi.Field) *VideoFormatsListCall {
51112	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51113	return c
51114}
51115
51116// IfNoneMatch sets the optional parameter which makes the operation
51117// fail if the object's ETag matches the given value. This is useful for
51118// getting updates only after the object has changed since the last
51119// request. Use googleapi.IsNotModified to check whether the response
51120// error from Do is the result of In-None-Match.
51121func (c *VideoFormatsListCall) IfNoneMatch(entityTag string) *VideoFormatsListCall {
51122	c.ifNoneMatch_ = entityTag
51123	return c
51124}
51125
51126// Context sets the context to be used in this call's Do method. Any
51127// pending HTTP request will be aborted if the provided context is
51128// canceled.
51129func (c *VideoFormatsListCall) Context(ctx context.Context) *VideoFormatsListCall {
51130	c.ctx_ = ctx
51131	return c
51132}
51133
51134// Header returns an http.Header that can be modified by the caller to
51135// add HTTP headers to the request.
51136func (c *VideoFormatsListCall) Header() http.Header {
51137	if c.header_ == nil {
51138		c.header_ = make(http.Header)
51139	}
51140	return c.header_
51141}
51142
51143func (c *VideoFormatsListCall) doRequest(alt string) (*http.Response, error) {
51144	reqHeaders := make(http.Header)
51145	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
51146	for k, v := range c.header_ {
51147		reqHeaders[k] = v
51148	}
51149	reqHeaders.Set("User-Agent", c.s.userAgent())
51150	if c.ifNoneMatch_ != "" {
51151		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51152	}
51153	var body io.Reader = nil
51154	c.urlParams_.Set("alt", alt)
51155	c.urlParams_.Set("prettyPrint", "false")
51156	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats")
51157	urls += "?" + c.urlParams_.Encode()
51158	req, err := http.NewRequest("GET", urls, body)
51159	if err != nil {
51160		return nil, err
51161	}
51162	req.Header = reqHeaders
51163	googleapi.Expand(req.URL, map[string]string{
51164		"profileId": strconv.FormatInt(c.profileId, 10),
51165	})
51166	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51167}
51168
51169// Do executes the "dfareporting.videoFormats.list" call.
51170// Exactly one of *VideoFormatsListResponse or error will be non-nil.
51171// Any non-2xx status code is an error. Response headers are in either
51172// *VideoFormatsListResponse.ServerResponse.Header or (if a response was
51173// returned at all) in error.(*googleapi.Error).Header. Use
51174// googleapi.IsNotModified to check whether the returned error was
51175// because http.StatusNotModified was returned.
51176func (c *VideoFormatsListCall) Do(opts ...googleapi.CallOption) (*VideoFormatsListResponse, error) {
51177	gensupport.SetOptions(c.urlParams_, opts...)
51178	res, err := c.doRequest("json")
51179	if res != nil && res.StatusCode == http.StatusNotModified {
51180		if res.Body != nil {
51181			res.Body.Close()
51182		}
51183		return nil, &googleapi.Error{
51184			Code:   res.StatusCode,
51185			Header: res.Header,
51186		}
51187	}
51188	if err != nil {
51189		return nil, err
51190	}
51191	defer googleapi.CloseBody(res)
51192	if err := googleapi.CheckResponse(res); err != nil {
51193		return nil, err
51194	}
51195	ret := &VideoFormatsListResponse{
51196		ServerResponse: googleapi.ServerResponse{
51197			Header:         res.Header,
51198			HTTPStatusCode: res.StatusCode,
51199		},
51200	}
51201	target := &ret
51202	if err := gensupport.DecodeResponse(target, res); err != nil {
51203		return nil, err
51204	}
51205	return ret, nil
51206	// {
51207	//   "description": "Lists available video formats.",
51208	//   "httpMethod": "GET",
51209	//   "id": "dfareporting.videoFormats.list",
51210	//   "parameterOrder": [
51211	//     "profileId"
51212	//   ],
51213	//   "parameters": {
51214	//     "profileId": {
51215	//       "description": "User profile ID associated with this request.",
51216	//       "format": "int64",
51217	//       "location": "path",
51218	//       "required": true,
51219	//       "type": "string"
51220	//     }
51221	//   },
51222	//   "path": "userprofiles/{profileId}/videoFormats",
51223	//   "response": {
51224	//     "$ref": "VideoFormatsListResponse"
51225	//   },
51226	//   "scopes": [
51227	//     "https://www.googleapis.com/auth/dfatrafficking"
51228	//   ]
51229	// }
51230
51231}
51232