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.0"
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.0"
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	htransport "google.golang.org/api/transport/http"
60)
61
62// Always reference these packages, just in case the auto-generated code
63// below doesn't.
64var _ = bytes.NewBuffer
65var _ = strconv.Itoa
66var _ = fmt.Sprintf
67var _ = json.NewDecoder
68var _ = io.Copy
69var _ = url.Parse
70var _ = gensupport.MarshalJSON
71var _ = googleapi.Version
72var _ = errors.New
73var _ = strings.Replace
74var _ = context.Canceled
75
76const apiId = "dfareporting:v3.0"
77const apiName = "dfareporting"
78const apiVersion = "v3.0"
79const basePath = "https://www.googleapis.com/dfareporting/v3.0/"
80
81// OAuth2 scopes used by this API.
82const (
83	// Manage DoubleClick Digital Marketing conversions
84	DdmconversionsScope = "https://www.googleapis.com/auth/ddmconversions"
85
86	// View and manage DoubleClick for Advertisers reports
87	DfareportingScope = "https://www.googleapis.com/auth/dfareporting"
88
89	// View and manage your DoubleClick Campaign Manager's (DCM) display ad
90	// campaigns
91	DfatraffickingScope = "https://www.googleapis.com/auth/dfatrafficking"
92)
93
94// NewService creates a new Service.
95func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
96	scopesOption := option.WithScopes(
97		"https://www.googleapis.com/auth/ddmconversions",
98		"https://www.googleapis.com/auth/dfareporting",
99		"https://www.googleapis.com/auth/dfatrafficking",
100	)
101	// NOTE: prepend, so we don't override user-specified scopes.
102	opts = append([]option.ClientOption{scopesOption}, opts...)
103	client, endpoint, err := htransport.NewClient(ctx, opts...)
104	if err != nil {
105		return nil, err
106	}
107	s, err := New(client)
108	if err != nil {
109		return nil, err
110	}
111	if endpoint != "" {
112		s.BasePath = endpoint
113	}
114	return s, nil
115}
116
117// New creates a new Service. It uses the provided http.Client for requests.
118//
119// Deprecated: please use NewService instead.
120// To provide a custom HTTP client, use option.WithHTTPClient.
121// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
122func New(client *http.Client) (*Service, error) {
123	if client == nil {
124		return nil, errors.New("client is nil")
125	}
126	s := &Service{client: client, BasePath: basePath}
127	s.AccountActiveAdSummaries = NewAccountActiveAdSummariesService(s)
128	s.AccountPermissionGroups = NewAccountPermissionGroupsService(s)
129	s.AccountPermissions = NewAccountPermissionsService(s)
130	s.AccountUserProfiles = NewAccountUserProfilesService(s)
131	s.Accounts = NewAccountsService(s)
132	s.Ads = NewAdsService(s)
133	s.AdvertiserGroups = NewAdvertiserGroupsService(s)
134	s.AdvertiserLandingPages = NewAdvertiserLandingPagesService(s)
135	s.Advertisers = NewAdvertisersService(s)
136	s.Browsers = NewBrowsersService(s)
137	s.CampaignCreativeAssociations = NewCampaignCreativeAssociationsService(s)
138	s.Campaigns = NewCampaignsService(s)
139	s.ChangeLogs = NewChangeLogsService(s)
140	s.Cities = NewCitiesService(s)
141	s.ConnectionTypes = NewConnectionTypesService(s)
142	s.ContentCategories = NewContentCategoriesService(s)
143	s.Conversions = NewConversionsService(s)
144	s.Countries = NewCountriesService(s)
145	s.CreativeAssets = NewCreativeAssetsService(s)
146	s.CreativeFieldValues = NewCreativeFieldValuesService(s)
147	s.CreativeFields = NewCreativeFieldsService(s)
148	s.CreativeGroups = NewCreativeGroupsService(s)
149	s.Creatives = NewCreativesService(s)
150	s.DimensionValues = NewDimensionValuesService(s)
151	s.DirectorySiteContacts = NewDirectorySiteContactsService(s)
152	s.DirectorySites = NewDirectorySitesService(s)
153	s.DynamicTargetingKeys = NewDynamicTargetingKeysService(s)
154	s.EventTags = NewEventTagsService(s)
155	s.Files = NewFilesService(s)
156	s.FloodlightActivities = NewFloodlightActivitiesService(s)
157	s.FloodlightActivityGroups = NewFloodlightActivityGroupsService(s)
158	s.FloodlightConfigurations = NewFloodlightConfigurationsService(s)
159	s.InventoryItems = NewInventoryItemsService(s)
160	s.Languages = NewLanguagesService(s)
161	s.Metros = NewMetrosService(s)
162	s.MobileCarriers = NewMobileCarriersService(s)
163	s.OperatingSystemVersions = NewOperatingSystemVersionsService(s)
164	s.OperatingSystems = NewOperatingSystemsService(s)
165	s.OrderDocuments = NewOrderDocumentsService(s)
166	s.Orders = NewOrdersService(s)
167	s.PlacementGroups = NewPlacementGroupsService(s)
168	s.PlacementStrategies = NewPlacementStrategiesService(s)
169	s.Placements = NewPlacementsService(s)
170	s.PlatformTypes = NewPlatformTypesService(s)
171	s.PostalCodes = NewPostalCodesService(s)
172	s.Projects = NewProjectsService(s)
173	s.Regions = NewRegionsService(s)
174	s.RemarketingListShares = NewRemarketingListSharesService(s)
175	s.RemarketingLists = NewRemarketingListsService(s)
176	s.Reports = NewReportsService(s)
177	s.Sites = NewSitesService(s)
178	s.Sizes = NewSizesService(s)
179	s.Subaccounts = NewSubaccountsService(s)
180	s.TargetableRemarketingLists = NewTargetableRemarketingListsService(s)
181	s.TargetingTemplates = NewTargetingTemplatesService(s)
182	s.UserProfiles = NewUserProfilesService(s)
183	s.UserRolePermissionGroups = NewUserRolePermissionGroupsService(s)
184	s.UserRolePermissions = NewUserRolePermissionsService(s)
185	s.UserRoles = NewUserRolesService(s)
186	s.VideoFormats = NewVideoFormatsService(s)
187	return s, nil
188}
189
190type Service struct {
191	client    *http.Client
192	BasePath  string // API endpoint base URL
193	UserAgent string // optional additional User-Agent fragment
194
195	AccountActiveAdSummaries *AccountActiveAdSummariesService
196
197	AccountPermissionGroups *AccountPermissionGroupsService
198
199	AccountPermissions *AccountPermissionsService
200
201	AccountUserProfiles *AccountUserProfilesService
202
203	Accounts *AccountsService
204
205	Ads *AdsService
206
207	AdvertiserGroups *AdvertiserGroupsService
208
209	AdvertiserLandingPages *AdvertiserLandingPagesService
210
211	Advertisers *AdvertisersService
212
213	Browsers *BrowsersService
214
215	CampaignCreativeAssociations *CampaignCreativeAssociationsService
216
217	Campaigns *CampaignsService
218
219	ChangeLogs *ChangeLogsService
220
221	Cities *CitiesService
222
223	ConnectionTypes *ConnectionTypesService
224
225	ContentCategories *ContentCategoriesService
226
227	Conversions *ConversionsService
228
229	Countries *CountriesService
230
231	CreativeAssets *CreativeAssetsService
232
233	CreativeFieldValues *CreativeFieldValuesService
234
235	CreativeFields *CreativeFieldsService
236
237	CreativeGroups *CreativeGroupsService
238
239	Creatives *CreativesService
240
241	DimensionValues *DimensionValuesService
242
243	DirectorySiteContacts *DirectorySiteContactsService
244
245	DirectorySites *DirectorySitesService
246
247	DynamicTargetingKeys *DynamicTargetingKeysService
248
249	EventTags *EventTagsService
250
251	Files *FilesService
252
253	FloodlightActivities *FloodlightActivitiesService
254
255	FloodlightActivityGroups *FloodlightActivityGroupsService
256
257	FloodlightConfigurations *FloodlightConfigurationsService
258
259	InventoryItems *InventoryItemsService
260
261	Languages *LanguagesService
262
263	Metros *MetrosService
264
265	MobileCarriers *MobileCarriersService
266
267	OperatingSystemVersions *OperatingSystemVersionsService
268
269	OperatingSystems *OperatingSystemsService
270
271	OrderDocuments *OrderDocumentsService
272
273	Orders *OrdersService
274
275	PlacementGroups *PlacementGroupsService
276
277	PlacementStrategies *PlacementStrategiesService
278
279	Placements *PlacementsService
280
281	PlatformTypes *PlatformTypesService
282
283	PostalCodes *PostalCodesService
284
285	Projects *ProjectsService
286
287	Regions *RegionsService
288
289	RemarketingListShares *RemarketingListSharesService
290
291	RemarketingLists *RemarketingListsService
292
293	Reports *ReportsService
294
295	Sites *SitesService
296
297	Sizes *SizesService
298
299	Subaccounts *SubaccountsService
300
301	TargetableRemarketingLists *TargetableRemarketingListsService
302
303	TargetingTemplates *TargetingTemplatesService
304
305	UserProfiles *UserProfilesService
306
307	UserRolePermissionGroups *UserRolePermissionGroupsService
308
309	UserRolePermissions *UserRolePermissionsService
310
311	UserRoles *UserRolesService
312
313	VideoFormats *VideoFormatsService
314}
315
316func (s *Service) userAgent() string {
317	if s.UserAgent == "" {
318		return googleapi.UserAgent
319	}
320	return googleapi.UserAgent + " " + s.UserAgent
321}
322
323func NewAccountActiveAdSummariesService(s *Service) *AccountActiveAdSummariesService {
324	rs := &AccountActiveAdSummariesService{s: s}
325	return rs
326}
327
328type AccountActiveAdSummariesService struct {
329	s *Service
330}
331
332func NewAccountPermissionGroupsService(s *Service) *AccountPermissionGroupsService {
333	rs := &AccountPermissionGroupsService{s: s}
334	return rs
335}
336
337type AccountPermissionGroupsService struct {
338	s *Service
339}
340
341func NewAccountPermissionsService(s *Service) *AccountPermissionsService {
342	rs := &AccountPermissionsService{s: s}
343	return rs
344}
345
346type AccountPermissionsService struct {
347	s *Service
348}
349
350func NewAccountUserProfilesService(s *Service) *AccountUserProfilesService {
351	rs := &AccountUserProfilesService{s: s}
352	return rs
353}
354
355type AccountUserProfilesService struct {
356	s *Service
357}
358
359func NewAccountsService(s *Service) *AccountsService {
360	rs := &AccountsService{s: s}
361	return rs
362}
363
364type AccountsService struct {
365	s *Service
366}
367
368func NewAdsService(s *Service) *AdsService {
369	rs := &AdsService{s: s}
370	return rs
371}
372
373type AdsService struct {
374	s *Service
375}
376
377func NewAdvertiserGroupsService(s *Service) *AdvertiserGroupsService {
378	rs := &AdvertiserGroupsService{s: s}
379	return rs
380}
381
382type AdvertiserGroupsService struct {
383	s *Service
384}
385
386func NewAdvertiserLandingPagesService(s *Service) *AdvertiserLandingPagesService {
387	rs := &AdvertiserLandingPagesService{s: s}
388	return rs
389}
390
391type AdvertiserLandingPagesService struct {
392	s *Service
393}
394
395func NewAdvertisersService(s *Service) *AdvertisersService {
396	rs := &AdvertisersService{s: s}
397	return rs
398}
399
400type AdvertisersService struct {
401	s *Service
402}
403
404func NewBrowsersService(s *Service) *BrowsersService {
405	rs := &BrowsersService{s: s}
406	return rs
407}
408
409type BrowsersService struct {
410	s *Service
411}
412
413func NewCampaignCreativeAssociationsService(s *Service) *CampaignCreativeAssociationsService {
414	rs := &CampaignCreativeAssociationsService{s: s}
415	return rs
416}
417
418type CampaignCreativeAssociationsService struct {
419	s *Service
420}
421
422func NewCampaignsService(s *Service) *CampaignsService {
423	rs := &CampaignsService{s: s}
424	return rs
425}
426
427type CampaignsService struct {
428	s *Service
429}
430
431func NewChangeLogsService(s *Service) *ChangeLogsService {
432	rs := &ChangeLogsService{s: s}
433	return rs
434}
435
436type ChangeLogsService struct {
437	s *Service
438}
439
440func NewCitiesService(s *Service) *CitiesService {
441	rs := &CitiesService{s: s}
442	return rs
443}
444
445type CitiesService struct {
446	s *Service
447}
448
449func NewConnectionTypesService(s *Service) *ConnectionTypesService {
450	rs := &ConnectionTypesService{s: s}
451	return rs
452}
453
454type ConnectionTypesService struct {
455	s *Service
456}
457
458func NewContentCategoriesService(s *Service) *ContentCategoriesService {
459	rs := &ContentCategoriesService{s: s}
460	return rs
461}
462
463type ContentCategoriesService struct {
464	s *Service
465}
466
467func NewConversionsService(s *Service) *ConversionsService {
468	rs := &ConversionsService{s: s}
469	return rs
470}
471
472type ConversionsService struct {
473	s *Service
474}
475
476func NewCountriesService(s *Service) *CountriesService {
477	rs := &CountriesService{s: s}
478	return rs
479}
480
481type CountriesService struct {
482	s *Service
483}
484
485func NewCreativeAssetsService(s *Service) *CreativeAssetsService {
486	rs := &CreativeAssetsService{s: s}
487	return rs
488}
489
490type CreativeAssetsService struct {
491	s *Service
492}
493
494func NewCreativeFieldValuesService(s *Service) *CreativeFieldValuesService {
495	rs := &CreativeFieldValuesService{s: s}
496	return rs
497}
498
499type CreativeFieldValuesService struct {
500	s *Service
501}
502
503func NewCreativeFieldsService(s *Service) *CreativeFieldsService {
504	rs := &CreativeFieldsService{s: s}
505	return rs
506}
507
508type CreativeFieldsService struct {
509	s *Service
510}
511
512func NewCreativeGroupsService(s *Service) *CreativeGroupsService {
513	rs := &CreativeGroupsService{s: s}
514	return rs
515}
516
517type CreativeGroupsService struct {
518	s *Service
519}
520
521func NewCreativesService(s *Service) *CreativesService {
522	rs := &CreativesService{s: s}
523	return rs
524}
525
526type CreativesService struct {
527	s *Service
528}
529
530func NewDimensionValuesService(s *Service) *DimensionValuesService {
531	rs := &DimensionValuesService{s: s}
532	return rs
533}
534
535type DimensionValuesService struct {
536	s *Service
537}
538
539func NewDirectorySiteContactsService(s *Service) *DirectorySiteContactsService {
540	rs := &DirectorySiteContactsService{s: s}
541	return rs
542}
543
544type DirectorySiteContactsService struct {
545	s *Service
546}
547
548func NewDirectorySitesService(s *Service) *DirectorySitesService {
549	rs := &DirectorySitesService{s: s}
550	return rs
551}
552
553type DirectorySitesService struct {
554	s *Service
555}
556
557func NewDynamicTargetingKeysService(s *Service) *DynamicTargetingKeysService {
558	rs := &DynamicTargetingKeysService{s: s}
559	return rs
560}
561
562type DynamicTargetingKeysService struct {
563	s *Service
564}
565
566func NewEventTagsService(s *Service) *EventTagsService {
567	rs := &EventTagsService{s: s}
568	return rs
569}
570
571type EventTagsService struct {
572	s *Service
573}
574
575func NewFilesService(s *Service) *FilesService {
576	rs := &FilesService{s: s}
577	return rs
578}
579
580type FilesService struct {
581	s *Service
582}
583
584func NewFloodlightActivitiesService(s *Service) *FloodlightActivitiesService {
585	rs := &FloodlightActivitiesService{s: s}
586	return rs
587}
588
589type FloodlightActivitiesService struct {
590	s *Service
591}
592
593func NewFloodlightActivityGroupsService(s *Service) *FloodlightActivityGroupsService {
594	rs := &FloodlightActivityGroupsService{s: s}
595	return rs
596}
597
598type FloodlightActivityGroupsService struct {
599	s *Service
600}
601
602func NewFloodlightConfigurationsService(s *Service) *FloodlightConfigurationsService {
603	rs := &FloodlightConfigurationsService{s: s}
604	return rs
605}
606
607type FloodlightConfigurationsService struct {
608	s *Service
609}
610
611func NewInventoryItemsService(s *Service) *InventoryItemsService {
612	rs := &InventoryItemsService{s: s}
613	return rs
614}
615
616type InventoryItemsService struct {
617	s *Service
618}
619
620func NewLanguagesService(s *Service) *LanguagesService {
621	rs := &LanguagesService{s: s}
622	return rs
623}
624
625type LanguagesService struct {
626	s *Service
627}
628
629func NewMetrosService(s *Service) *MetrosService {
630	rs := &MetrosService{s: s}
631	return rs
632}
633
634type MetrosService struct {
635	s *Service
636}
637
638func NewMobileCarriersService(s *Service) *MobileCarriersService {
639	rs := &MobileCarriersService{s: s}
640	return rs
641}
642
643type MobileCarriersService struct {
644	s *Service
645}
646
647func NewOperatingSystemVersionsService(s *Service) *OperatingSystemVersionsService {
648	rs := &OperatingSystemVersionsService{s: s}
649	return rs
650}
651
652type OperatingSystemVersionsService struct {
653	s *Service
654}
655
656func NewOperatingSystemsService(s *Service) *OperatingSystemsService {
657	rs := &OperatingSystemsService{s: s}
658	return rs
659}
660
661type OperatingSystemsService struct {
662	s *Service
663}
664
665func NewOrderDocumentsService(s *Service) *OrderDocumentsService {
666	rs := &OrderDocumentsService{s: s}
667	return rs
668}
669
670type OrderDocumentsService struct {
671	s *Service
672}
673
674func NewOrdersService(s *Service) *OrdersService {
675	rs := &OrdersService{s: s}
676	return rs
677}
678
679type OrdersService struct {
680	s *Service
681}
682
683func NewPlacementGroupsService(s *Service) *PlacementGroupsService {
684	rs := &PlacementGroupsService{s: s}
685	return rs
686}
687
688type PlacementGroupsService struct {
689	s *Service
690}
691
692func NewPlacementStrategiesService(s *Service) *PlacementStrategiesService {
693	rs := &PlacementStrategiesService{s: s}
694	return rs
695}
696
697type PlacementStrategiesService struct {
698	s *Service
699}
700
701func NewPlacementsService(s *Service) *PlacementsService {
702	rs := &PlacementsService{s: s}
703	return rs
704}
705
706type PlacementsService struct {
707	s *Service
708}
709
710func NewPlatformTypesService(s *Service) *PlatformTypesService {
711	rs := &PlatformTypesService{s: s}
712	return rs
713}
714
715type PlatformTypesService struct {
716	s *Service
717}
718
719func NewPostalCodesService(s *Service) *PostalCodesService {
720	rs := &PostalCodesService{s: s}
721	return rs
722}
723
724type PostalCodesService struct {
725	s *Service
726}
727
728func NewProjectsService(s *Service) *ProjectsService {
729	rs := &ProjectsService{s: s}
730	return rs
731}
732
733type ProjectsService struct {
734	s *Service
735}
736
737func NewRegionsService(s *Service) *RegionsService {
738	rs := &RegionsService{s: s}
739	return rs
740}
741
742type RegionsService struct {
743	s *Service
744}
745
746func NewRemarketingListSharesService(s *Service) *RemarketingListSharesService {
747	rs := &RemarketingListSharesService{s: s}
748	return rs
749}
750
751type RemarketingListSharesService struct {
752	s *Service
753}
754
755func NewRemarketingListsService(s *Service) *RemarketingListsService {
756	rs := &RemarketingListsService{s: s}
757	return rs
758}
759
760type RemarketingListsService struct {
761	s *Service
762}
763
764func NewReportsService(s *Service) *ReportsService {
765	rs := &ReportsService{s: s}
766	rs.CompatibleFields = NewReportsCompatibleFieldsService(s)
767	rs.Files = NewReportsFilesService(s)
768	return rs
769}
770
771type ReportsService struct {
772	s *Service
773
774	CompatibleFields *ReportsCompatibleFieldsService
775
776	Files *ReportsFilesService
777}
778
779func NewReportsCompatibleFieldsService(s *Service) *ReportsCompatibleFieldsService {
780	rs := &ReportsCompatibleFieldsService{s: s}
781	return rs
782}
783
784type ReportsCompatibleFieldsService struct {
785	s *Service
786}
787
788func NewReportsFilesService(s *Service) *ReportsFilesService {
789	rs := &ReportsFilesService{s: s}
790	return rs
791}
792
793type ReportsFilesService struct {
794	s *Service
795}
796
797func NewSitesService(s *Service) *SitesService {
798	rs := &SitesService{s: s}
799	return rs
800}
801
802type SitesService struct {
803	s *Service
804}
805
806func NewSizesService(s *Service) *SizesService {
807	rs := &SizesService{s: s}
808	return rs
809}
810
811type SizesService struct {
812	s *Service
813}
814
815func NewSubaccountsService(s *Service) *SubaccountsService {
816	rs := &SubaccountsService{s: s}
817	return rs
818}
819
820type SubaccountsService struct {
821	s *Service
822}
823
824func NewTargetableRemarketingListsService(s *Service) *TargetableRemarketingListsService {
825	rs := &TargetableRemarketingListsService{s: s}
826	return rs
827}
828
829type TargetableRemarketingListsService struct {
830	s *Service
831}
832
833func NewTargetingTemplatesService(s *Service) *TargetingTemplatesService {
834	rs := &TargetingTemplatesService{s: s}
835	return rs
836}
837
838type TargetingTemplatesService struct {
839	s *Service
840}
841
842func NewUserProfilesService(s *Service) *UserProfilesService {
843	rs := &UserProfilesService{s: s}
844	return rs
845}
846
847type UserProfilesService struct {
848	s *Service
849}
850
851func NewUserRolePermissionGroupsService(s *Service) *UserRolePermissionGroupsService {
852	rs := &UserRolePermissionGroupsService{s: s}
853	return rs
854}
855
856type UserRolePermissionGroupsService struct {
857	s *Service
858}
859
860func NewUserRolePermissionsService(s *Service) *UserRolePermissionsService {
861	rs := &UserRolePermissionsService{s: s}
862	return rs
863}
864
865type UserRolePermissionsService struct {
866	s *Service
867}
868
869func NewUserRolesService(s *Service) *UserRolesService {
870	rs := &UserRolesService{s: s}
871	return rs
872}
873
874type UserRolesService struct {
875	s *Service
876}
877
878func NewVideoFormatsService(s *Service) *VideoFormatsService {
879	rs := &VideoFormatsService{s: s}
880	return rs
881}
882
883type VideoFormatsService struct {
884	s *Service
885}
886
887// Account: Contains properties of a Campaign Manager account.
888type Account struct {
889	// AccountPermissionIds: Account permissions assigned to this account.
890	AccountPermissionIds googleapi.Int64s `json:"accountPermissionIds,omitempty"`
891
892	// AccountProfile: Profile for this account. This is a read-only field
893	// that can be left blank.
894	//
895	// Possible values:
896	//   "ACCOUNT_PROFILE_BASIC"
897	//   "ACCOUNT_PROFILE_STANDARD"
898	AccountProfile string `json:"accountProfile,omitempty"`
899
900	// Active: Whether this account is active.
901	Active bool `json:"active,omitempty"`
902
903	// ActiveAdsLimitTier: Maximum number of active ads allowed for this
904	// account.
905	//
906	// Possible values:
907	//   "ACTIVE_ADS_TIER_100K"
908	//   "ACTIVE_ADS_TIER_1M"
909	//   "ACTIVE_ADS_TIER_200K"
910	//   "ACTIVE_ADS_TIER_300K"
911	//   "ACTIVE_ADS_TIER_40K"
912	//   "ACTIVE_ADS_TIER_500K"
913	//   "ACTIVE_ADS_TIER_750K"
914	//   "ACTIVE_ADS_TIER_75K"
915	ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
916
917	// ActiveViewOptOut: Whether to serve creatives with Active View tags.
918	// If disabled, viewability data will not be available for any
919	// impressions.
920	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
921
922	// AvailablePermissionIds: User role permissions available to the user
923	// roles of this account.
924	AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
925
926	// CountryId: ID of the country associated with this account.
927	CountryId int64 `json:"countryId,omitempty,string"`
928
929	// CurrencyId: ID of currency associated with this account. This is a
930	// required field.
931	// Acceptable values are:
932	// - "1" for USD
933	// - "2" for GBP
934	// - "3" for ESP
935	// - "4" for SEK
936	// - "5" for CAD
937	// - "6" for JPY
938	// - "7" for DEM
939	// - "8" for AUD
940	// - "9" for FRF
941	// - "10" for ITL
942	// - "11" for DKK
943	// - "12" for NOK
944	// - "13" for FIM
945	// - "14" for ZAR
946	// - "15" for IEP
947	// - "16" for NLG
948	// - "17" for EUR
949	// - "18" for KRW
950	// - "19" for TWD
951	// - "20" for SGD
952	// - "21" for CNY
953	// - "22" for HKD
954	// - "23" for NZD
955	// - "24" for MYR
956	// - "25" for BRL
957	// - "26" for PTE
958	// - "27" for MXP
959	// - "28" for CLP
960	// - "29" for TRY
961	// - "30" for ARS
962	// - "31" for PEN
963	// - "32" for ILS
964	// - "33" for CHF
965	// - "34" for VEF
966	// - "35" for COP
967	// - "36" for GTQ
968	// - "37" for PLN
969	// - "39" for INR
970	// - "40" for THB
971	// - "41" for IDR
972	// - "42" for CZK
973	// - "43" for RON
974	// - "44" for HUF
975	// - "45" for RUB
976	// - "46" for AED
977	// - "47" for BGN
978	// - "48" for HRK
979	// - "49" for MXN
980	// - "50" for NGN
981	CurrencyId int64 `json:"currencyId,omitempty,string"`
982
983	// DefaultCreativeSizeId: Default placement dimensions for this account.
984	DefaultCreativeSizeId int64 `json:"defaultCreativeSizeId,omitempty,string"`
985
986	// Description: Description of this account.
987	Description string `json:"description,omitempty"`
988
989	// Id: ID of this account. This is a read-only, auto-generated field.
990	Id int64 `json:"id,omitempty,string"`
991
992	// Kind: Identifies what kind of resource this is. Value: the fixed
993	// string "dfareporting#account".
994	Kind string `json:"kind,omitempty"`
995
996	// Locale: Locale of this account.
997	// Acceptable values are:
998	// - "cs" (Czech)
999	// - "de" (German)
1000	// - "en" (English)
1001	// - "en-GB" (English United Kingdom)
1002	// - "es" (Spanish)
1003	// - "fr" (French)
1004	// - "it" (Italian)
1005	// - "ja" (Japanese)
1006	// - "ko" (Korean)
1007	// - "pl" (Polish)
1008	// - "pt-BR" (Portuguese Brazil)
1009	// - "ru" (Russian)
1010	// - "sv" (Swedish)
1011	// - "tr" (Turkish)
1012	// - "zh-CN" (Chinese Simplified)
1013	// - "zh-TW" (Chinese Traditional)
1014	Locale string `json:"locale,omitempty"`
1015
1016	// MaximumImageSize: Maximum image size allowed for this account, in
1017	// kilobytes. Value must be greater than or equal to 1.
1018	MaximumImageSize int64 `json:"maximumImageSize,omitempty,string"`
1019
1020	// Name: Name of this account. This is a required field, and must be
1021	// less than 128 characters long and be globally unique.
1022	Name string `json:"name,omitempty"`
1023
1024	// NielsenOcrEnabled: Whether campaigns created in this account will be
1025	// enabled for Nielsen OCR reach ratings by default.
1026	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
1027
1028	// ReportsConfiguration: Reporting configuration of this account.
1029	ReportsConfiguration *ReportsConfiguration `json:"reportsConfiguration,omitempty"`
1030
1031	// ShareReportsWithTwitter: Share Path to Conversion reports with
1032	// Twitter.
1033	ShareReportsWithTwitter bool `json:"shareReportsWithTwitter,omitempty"`
1034
1035	// TeaserSizeLimit: File size limit in kilobytes of Rich Media teaser
1036	// creatives. Acceptable values are 1 to 10240, inclusive.
1037	TeaserSizeLimit int64 `json:"teaserSizeLimit,omitempty,string"`
1038
1039	// ServerResponse contains the HTTP response code and headers from the
1040	// server.
1041	googleapi.ServerResponse `json:"-"`
1042
1043	// ForceSendFields is a list of field names (e.g.
1044	// "AccountPermissionIds") to unconditionally include in API requests.
1045	// By default, fields with empty values are omitted from API requests.
1046	// However, any non-pointer, non-interface field appearing in
1047	// ForceSendFields will be sent to the server regardless of whether the
1048	// field is empty or not. This may be used to include empty fields in
1049	// Patch requests.
1050	ForceSendFields []string `json:"-"`
1051
1052	// NullFields is a list of field names (e.g. "AccountPermissionIds") to
1053	// include in API requests with the JSON null value. By default, fields
1054	// with empty values are omitted from API requests. However, any field
1055	// with an empty value appearing in NullFields will be sent to the
1056	// server as null. It is an error if a field in this list has a
1057	// non-empty value. This may be used to include null fields in Patch
1058	// requests.
1059	NullFields []string `json:"-"`
1060}
1061
1062func (s *Account) MarshalJSON() ([]byte, error) {
1063	type NoMethod Account
1064	raw := NoMethod(*s)
1065	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1066}
1067
1068// AccountActiveAdSummary: Gets a summary of active ads in an account.
1069type AccountActiveAdSummary struct {
1070	// AccountId: ID of the account.
1071	AccountId int64 `json:"accountId,omitempty,string"`
1072
1073	// ActiveAds: Ads that have been activated for the account
1074	ActiveAds int64 `json:"activeAds,omitempty,string"`
1075
1076	// ActiveAdsLimitTier: Maximum number of active ads allowed for the
1077	// account.
1078	//
1079	// Possible values:
1080	//   "ACTIVE_ADS_TIER_100K"
1081	//   "ACTIVE_ADS_TIER_1M"
1082	//   "ACTIVE_ADS_TIER_200K"
1083	//   "ACTIVE_ADS_TIER_300K"
1084	//   "ACTIVE_ADS_TIER_40K"
1085	//   "ACTIVE_ADS_TIER_500K"
1086	//   "ACTIVE_ADS_TIER_750K"
1087	//   "ACTIVE_ADS_TIER_75K"
1088	ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
1089
1090	// AvailableAds: Ads that can be activated for the account.
1091	AvailableAds int64 `json:"availableAds,omitempty,string"`
1092
1093	// Kind: Identifies what kind of resource this is. Value: the fixed
1094	// string "dfareporting#accountActiveAdSummary".
1095	Kind string `json:"kind,omitempty"`
1096
1097	// ServerResponse contains the HTTP response code and headers from the
1098	// server.
1099	googleapi.ServerResponse `json:"-"`
1100
1101	// ForceSendFields is a list of field names (e.g. "AccountId") to
1102	// unconditionally include in API requests. By default, fields with
1103	// empty values are omitted from API requests. However, any non-pointer,
1104	// non-interface field appearing in ForceSendFields will be sent to the
1105	// server regardless of whether the field is empty or not. This may be
1106	// used to include empty fields in Patch requests.
1107	ForceSendFields []string `json:"-"`
1108
1109	// NullFields is a list of field names (e.g. "AccountId") to include in
1110	// API requests with the JSON null value. By default, fields with empty
1111	// values are omitted from API requests. However, any field with an
1112	// empty value appearing in NullFields will be sent to the server as
1113	// null. It is an error if a field in this list has a non-empty value.
1114	// This may be used to include null fields in Patch requests.
1115	NullFields []string `json:"-"`
1116}
1117
1118func (s *AccountActiveAdSummary) MarshalJSON() ([]byte, error) {
1119	type NoMethod AccountActiveAdSummary
1120	raw := NoMethod(*s)
1121	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1122}
1123
1124// AccountPermission: AccountPermissions contains information about a
1125// particular account permission. Some features of Campaign Manager
1126// require an account permission to be present in the account.
1127type AccountPermission struct {
1128	// AccountProfiles: Account profiles associated with this account
1129	// permission.
1130	//
1131	// Possible values are:
1132	// - "ACCOUNT_PROFILE_BASIC"
1133	// - "ACCOUNT_PROFILE_STANDARD"
1134	//
1135	// Possible values:
1136	//   "ACCOUNT_PROFILE_BASIC"
1137	//   "ACCOUNT_PROFILE_STANDARD"
1138	AccountProfiles []string `json:"accountProfiles,omitempty"`
1139
1140	// Id: ID of this account permission.
1141	Id int64 `json:"id,omitempty,string"`
1142
1143	// Kind: Identifies what kind of resource this is. Value: the fixed
1144	// string "dfareporting#accountPermission".
1145	Kind string `json:"kind,omitempty"`
1146
1147	// Level: Administrative level required to enable this account
1148	// permission.
1149	//
1150	// Possible values:
1151	//   "ADMINISTRATOR"
1152	//   "USER"
1153	Level string `json:"level,omitempty"`
1154
1155	// Name: Name of this account permission.
1156	Name string `json:"name,omitempty"`
1157
1158	// PermissionGroupId: Permission group of this account permission.
1159	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
1160
1161	// ServerResponse contains the HTTP response code and headers from the
1162	// server.
1163	googleapi.ServerResponse `json:"-"`
1164
1165	// ForceSendFields is a list of field names (e.g. "AccountProfiles") to
1166	// unconditionally include in API requests. By default, fields with
1167	// empty values are omitted from API requests. However, any non-pointer,
1168	// non-interface field appearing in ForceSendFields will be sent to the
1169	// server regardless of whether the field is empty or not. This may be
1170	// used to include empty fields in Patch requests.
1171	ForceSendFields []string `json:"-"`
1172
1173	// NullFields is a list of field names (e.g. "AccountProfiles") to
1174	// include in API requests with the JSON null value. By default, fields
1175	// with empty values are omitted from API requests. However, any field
1176	// with an empty value appearing in NullFields will be sent to the
1177	// server as null. It is an error if a field in this list has a
1178	// non-empty value. This may be used to include null fields in Patch
1179	// requests.
1180	NullFields []string `json:"-"`
1181}
1182
1183func (s *AccountPermission) MarshalJSON() ([]byte, error) {
1184	type NoMethod AccountPermission
1185	raw := NoMethod(*s)
1186	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1187}
1188
1189// AccountPermissionGroup: AccountPermissionGroups contains a mapping of
1190// permission group IDs to names. A permission group is a grouping of
1191// account permissions.
1192type AccountPermissionGroup struct {
1193	// Id: ID of this account permission group.
1194	Id int64 `json:"id,omitempty,string"`
1195
1196	// Kind: Identifies what kind of resource this is. Value: the fixed
1197	// string "dfareporting#accountPermissionGroup".
1198	Kind string `json:"kind,omitempty"`
1199
1200	// Name: Name of this account permission group.
1201	Name string `json:"name,omitempty"`
1202
1203	// ServerResponse contains the HTTP response code and headers from the
1204	// server.
1205	googleapi.ServerResponse `json:"-"`
1206
1207	// ForceSendFields is a list of field names (e.g. "Id") to
1208	// unconditionally include in API requests. By default, fields with
1209	// empty values are omitted from API requests. However, any non-pointer,
1210	// non-interface field appearing in ForceSendFields will be sent to the
1211	// server regardless of whether the field is empty or not. This may be
1212	// used to include empty fields in Patch requests.
1213	ForceSendFields []string `json:"-"`
1214
1215	// NullFields is a list of field names (e.g. "Id") to include in API
1216	// requests with the JSON null value. By default, fields with empty
1217	// values are omitted from API requests. However, any field with an
1218	// empty value appearing in NullFields will be sent to the server as
1219	// null. It is an error if a field in this list has a non-empty value.
1220	// This may be used to include null fields in Patch requests.
1221	NullFields []string `json:"-"`
1222}
1223
1224func (s *AccountPermissionGroup) MarshalJSON() ([]byte, error) {
1225	type NoMethod AccountPermissionGroup
1226	raw := NoMethod(*s)
1227	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1228}
1229
1230// AccountPermissionGroupsListResponse: Account Permission Group List
1231// Response
1232type AccountPermissionGroupsListResponse struct {
1233	// AccountPermissionGroups: Account permission group collection.
1234	AccountPermissionGroups []*AccountPermissionGroup `json:"accountPermissionGroups,omitempty"`
1235
1236	// Kind: Identifies what kind of resource this is. Value: the fixed
1237	// string "dfareporting#accountPermissionGroupsListResponse".
1238	Kind string `json:"kind,omitempty"`
1239
1240	// ServerResponse contains the HTTP response code and headers from the
1241	// server.
1242	googleapi.ServerResponse `json:"-"`
1243
1244	// ForceSendFields is a list of field names (e.g.
1245	// "AccountPermissionGroups") to unconditionally include in API
1246	// requests. By default, fields with empty values are omitted from API
1247	// requests. However, any non-pointer, non-interface field appearing in
1248	// ForceSendFields will be sent to the server regardless of whether the
1249	// field is empty or not. This may be used to include empty fields in
1250	// Patch requests.
1251	ForceSendFields []string `json:"-"`
1252
1253	// NullFields is a list of field names (e.g. "AccountPermissionGroups")
1254	// to include in API requests with the JSON null value. By default,
1255	// fields with empty values are omitted from API requests. However, any
1256	// field with an empty value appearing in NullFields will be sent to the
1257	// server as null. It is an error if a field in this list has a
1258	// non-empty value. This may be used to include null fields in Patch
1259	// requests.
1260	NullFields []string `json:"-"`
1261}
1262
1263func (s *AccountPermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
1264	type NoMethod AccountPermissionGroupsListResponse
1265	raw := NoMethod(*s)
1266	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1267}
1268
1269// AccountPermissionsListResponse: Account Permission List Response
1270type AccountPermissionsListResponse struct {
1271	// AccountPermissions: Account permission collection.
1272	AccountPermissions []*AccountPermission `json:"accountPermissions,omitempty"`
1273
1274	// Kind: Identifies what kind of resource this is. Value: the fixed
1275	// string "dfareporting#accountPermissionsListResponse".
1276	Kind string `json:"kind,omitempty"`
1277
1278	// ServerResponse contains the HTTP response code and headers from the
1279	// server.
1280	googleapi.ServerResponse `json:"-"`
1281
1282	// ForceSendFields is a list of field names (e.g. "AccountPermissions")
1283	// to unconditionally include in API requests. By default, fields with
1284	// empty values are omitted from API requests. However, any non-pointer,
1285	// non-interface field appearing in ForceSendFields will be sent to the
1286	// server regardless of whether the field is empty or not. This may be
1287	// used to include empty fields in Patch requests.
1288	ForceSendFields []string `json:"-"`
1289
1290	// NullFields is a list of field names (e.g. "AccountPermissions") to
1291	// include in API requests with the JSON null value. By default, fields
1292	// with empty values are omitted from API requests. However, any field
1293	// with an empty value appearing in NullFields will be sent to the
1294	// server as null. It is an error if a field in this list has a
1295	// non-empty value. This may be used to include null fields in Patch
1296	// requests.
1297	NullFields []string `json:"-"`
1298}
1299
1300func (s *AccountPermissionsListResponse) MarshalJSON() ([]byte, error) {
1301	type NoMethod AccountPermissionsListResponse
1302	raw := NoMethod(*s)
1303	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1304}
1305
1306// AccountUserProfile: AccountUserProfiles contains properties of a
1307// Campaign Manager user profile. This resource is specifically for
1308// managing user profiles, whereas UserProfiles is for accessing the
1309// API.
1310type AccountUserProfile struct {
1311	// AccountId: Account ID of the user profile. This is a read-only field
1312	// that can be left blank.
1313	AccountId int64 `json:"accountId,omitempty,string"`
1314
1315	// Active: Whether this user profile is active. This defaults to false,
1316	// and must be set true on insert for the user profile to be usable.
1317	Active bool `json:"active,omitempty"`
1318
1319	// AdvertiserFilter: Filter that describes which advertisers are visible
1320	// to the user profile.
1321	AdvertiserFilter *ObjectFilter `json:"advertiserFilter,omitempty"`
1322
1323	// CampaignFilter: Filter that describes which campaigns are visible to
1324	// the user profile.
1325	CampaignFilter *ObjectFilter `json:"campaignFilter,omitempty"`
1326
1327	// Comments: Comments for this user profile.
1328	Comments string `json:"comments,omitempty"`
1329
1330	// Email: Email of the user profile. The email addresss must be linked
1331	// to a Google Account. This field is required on insertion and is
1332	// read-only after insertion.
1333	Email string `json:"email,omitempty"`
1334
1335	// Id: ID of the user profile. This is a read-only, auto-generated
1336	// field.
1337	Id int64 `json:"id,omitempty,string"`
1338
1339	// Kind: Identifies what kind of resource this is. Value: the fixed
1340	// string "dfareporting#accountUserProfile".
1341	Kind string `json:"kind,omitempty"`
1342
1343	// Locale: Locale of the user profile. This is a required
1344	// field.
1345	// Acceptable values are:
1346	// - "cs" (Czech)
1347	// - "de" (German)
1348	// - "en" (English)
1349	// - "en-GB" (English United Kingdom)
1350	// - "es" (Spanish)
1351	// - "fr" (French)
1352	// - "it" (Italian)
1353	// - "ja" (Japanese)
1354	// - "ko" (Korean)
1355	// - "pl" (Polish)
1356	// - "pt-BR" (Portuguese Brazil)
1357	// - "ru" (Russian)
1358	// - "sv" (Swedish)
1359	// - "tr" (Turkish)
1360	// - "zh-CN" (Chinese Simplified)
1361	// - "zh-TW" (Chinese Traditional)
1362	Locale string `json:"locale,omitempty"`
1363
1364	// Name: Name of the user profile. This is a required field. Must be
1365	// less than 64 characters long, must be globally unique, and cannot
1366	// contain whitespace or any of the following characters: "&;"#%,".
1367	Name string `json:"name,omitempty"`
1368
1369	// SiteFilter: Filter that describes which sites are visible to the user
1370	// profile.
1371	SiteFilter *ObjectFilter `json:"siteFilter,omitempty"`
1372
1373	// SubaccountId: Subaccount ID of the user profile. This is a read-only
1374	// field that can be left blank.
1375	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1376
1377	// TraffickerType: Trafficker type of this user profile. This is a
1378	// read-only field.
1379	//
1380	// Possible values:
1381	//   "EXTERNAL_TRAFFICKER"
1382	//   "INTERNAL_NON_TRAFFICKER"
1383	//   "INTERNAL_TRAFFICKER"
1384	TraffickerType string `json:"traffickerType,omitempty"`
1385
1386	// UserAccessType: User type of the user profile. This is a read-only
1387	// field that can be left blank.
1388	//
1389	// Possible values:
1390	//   "INTERNAL_ADMINISTRATOR"
1391	//   "NORMAL_USER"
1392	//   "READ_ONLY_SUPER_USER"
1393	//   "SUPER_USER"
1394	UserAccessType string `json:"userAccessType,omitempty"`
1395
1396	// UserRoleFilter: Filter that describes which user roles are visible to
1397	// the user profile.
1398	UserRoleFilter *ObjectFilter `json:"userRoleFilter,omitempty"`
1399
1400	// UserRoleId: User role ID of the user profile. This is a required
1401	// field.
1402	UserRoleId int64 `json:"userRoleId,omitempty,string"`
1403
1404	// ServerResponse contains the HTTP response code and headers from the
1405	// server.
1406	googleapi.ServerResponse `json:"-"`
1407
1408	// ForceSendFields is a list of field names (e.g. "AccountId") to
1409	// unconditionally include in API requests. By default, fields with
1410	// empty values are omitted from API requests. However, any non-pointer,
1411	// non-interface field appearing in ForceSendFields will be sent to the
1412	// server regardless of whether the field is empty or not. This may be
1413	// used to include empty fields in Patch requests.
1414	ForceSendFields []string `json:"-"`
1415
1416	// NullFields is a list of field names (e.g. "AccountId") to include in
1417	// API requests with the JSON null value. By default, fields with empty
1418	// values are omitted from API requests. However, any field with an
1419	// empty value appearing in NullFields will be sent to the server as
1420	// null. It is an error if a field in this list has a non-empty value.
1421	// This may be used to include null fields in Patch requests.
1422	NullFields []string `json:"-"`
1423}
1424
1425func (s *AccountUserProfile) MarshalJSON() ([]byte, error) {
1426	type NoMethod AccountUserProfile
1427	raw := NoMethod(*s)
1428	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1429}
1430
1431// AccountUserProfilesListResponse: Account User Profile List Response
1432type AccountUserProfilesListResponse struct {
1433	// AccountUserProfiles: Account user profile collection.
1434	AccountUserProfiles []*AccountUserProfile `json:"accountUserProfiles,omitempty"`
1435
1436	// Kind: Identifies what kind of resource this is. Value: the fixed
1437	// string "dfareporting#accountUserProfilesListResponse".
1438	Kind string `json:"kind,omitempty"`
1439
1440	// NextPageToken: Pagination token to be used for the next list
1441	// operation.
1442	NextPageToken string `json:"nextPageToken,omitempty"`
1443
1444	// ServerResponse contains the HTTP response code and headers from the
1445	// server.
1446	googleapi.ServerResponse `json:"-"`
1447
1448	// ForceSendFields is a list of field names (e.g. "AccountUserProfiles")
1449	// to unconditionally include in API requests. By default, fields with
1450	// empty values are omitted from API requests. However, any non-pointer,
1451	// non-interface field appearing in ForceSendFields will be sent to the
1452	// server regardless of whether the field is empty or not. This may be
1453	// used to include empty fields in Patch requests.
1454	ForceSendFields []string `json:"-"`
1455
1456	// NullFields is a list of field names (e.g. "AccountUserProfiles") to
1457	// include in API requests with the JSON null value. By default, fields
1458	// with empty values are omitted from API requests. However, any field
1459	// with an empty value appearing in NullFields will be sent to the
1460	// server as null. It is an error if a field in this list has a
1461	// non-empty value. This may be used to include null fields in Patch
1462	// requests.
1463	NullFields []string `json:"-"`
1464}
1465
1466func (s *AccountUserProfilesListResponse) MarshalJSON() ([]byte, error) {
1467	type NoMethod AccountUserProfilesListResponse
1468	raw := NoMethod(*s)
1469	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1470}
1471
1472// AccountsListResponse: Account List Response
1473type AccountsListResponse struct {
1474	// Accounts: Account collection.
1475	Accounts []*Account `json:"accounts,omitempty"`
1476
1477	// Kind: Identifies what kind of resource this is. Value: the fixed
1478	// string "dfareporting#accountsListResponse".
1479	Kind string `json:"kind,omitempty"`
1480
1481	// NextPageToken: Pagination token to be used for the next list
1482	// operation.
1483	NextPageToken string `json:"nextPageToken,omitempty"`
1484
1485	// ServerResponse contains the HTTP response code and headers from the
1486	// server.
1487	googleapi.ServerResponse `json:"-"`
1488
1489	// ForceSendFields is a list of field names (e.g. "Accounts") to
1490	// unconditionally include in API requests. By default, fields with
1491	// empty values are omitted from API requests. However, any non-pointer,
1492	// non-interface field appearing in ForceSendFields will be sent to the
1493	// server regardless of whether the field is empty or not. This may be
1494	// used to include empty fields in Patch requests.
1495	ForceSendFields []string `json:"-"`
1496
1497	// NullFields is a list of field names (e.g. "Accounts") to include in
1498	// API requests with the JSON null value. By default, fields with empty
1499	// values are omitted from API requests. However, any field with an
1500	// empty value appearing in NullFields will be sent to the server as
1501	// null. It is an error if a field in this list has a non-empty value.
1502	// This may be used to include null fields in Patch requests.
1503	NullFields []string `json:"-"`
1504}
1505
1506func (s *AccountsListResponse) MarshalJSON() ([]byte, error) {
1507	type NoMethod AccountsListResponse
1508	raw := NoMethod(*s)
1509	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1510}
1511
1512// Activities: Represents an activity group.
1513type Activities struct {
1514	// Filters: List of activity filters. The dimension values need to be
1515	// all either of type "dfa:activity" or "dfa:activityGroup".
1516	Filters []*DimensionValue `json:"filters,omitempty"`
1517
1518	// Kind: The kind of resource this is, in this case
1519	// dfareporting#activities.
1520	Kind string `json:"kind,omitempty"`
1521
1522	// MetricNames: List of names of floodlight activity metrics.
1523	MetricNames []string `json:"metricNames,omitempty"`
1524
1525	// ForceSendFields is a list of field names (e.g. "Filters") to
1526	// unconditionally include in API requests. By default, fields with
1527	// empty values are omitted from API requests. However, any non-pointer,
1528	// non-interface field appearing in ForceSendFields will be sent to the
1529	// server regardless of whether the field is empty or not. This may be
1530	// used to include empty fields in Patch requests.
1531	ForceSendFields []string `json:"-"`
1532
1533	// NullFields is a list of field names (e.g. "Filters") to include in
1534	// API requests with the JSON null value. By default, fields with empty
1535	// values are omitted from API requests. However, any field with an
1536	// empty value appearing in NullFields will be sent to the server as
1537	// null. It is an error if a field in this list has a non-empty value.
1538	// This may be used to include null fields in Patch requests.
1539	NullFields []string `json:"-"`
1540}
1541
1542func (s *Activities) MarshalJSON() ([]byte, error) {
1543	type NoMethod Activities
1544	raw := NoMethod(*s)
1545	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1546}
1547
1548// Ad: Contains properties of a Campaign Manager ad.
1549type Ad struct {
1550	// AccountId: Account ID of this ad. This is a read-only field that can
1551	// be left blank.
1552	AccountId int64 `json:"accountId,omitempty,string"`
1553
1554	// Active: Whether this ad is active. When true, archived must be false.
1555	Active bool `json:"active,omitempty"`
1556
1557	// AdvertiserId: Advertiser ID of this ad. This is a required field on
1558	// insertion.
1559	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
1560
1561	// AdvertiserIdDimensionValue: Dimension value for the ID of the
1562	// advertiser. This is a read-only, auto-generated field.
1563	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
1564
1565	// Archived: Whether this ad is archived. When true, active must be
1566	// false.
1567	Archived bool `json:"archived,omitempty"`
1568
1569	// AudienceSegmentId: Audience segment ID that is being targeted for
1570	// this ad. Applicable when type is AD_SERVING_STANDARD_AD.
1571	AudienceSegmentId int64 `json:"audienceSegmentId,omitempty,string"`
1572
1573	// CampaignId: Campaign ID of this ad. This is a required field on
1574	// insertion.
1575	CampaignId int64 `json:"campaignId,omitempty,string"`
1576
1577	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
1578	// This is a read-only, auto-generated field.
1579	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
1580
1581	// ClickThroughUrl: Click-through URL for this ad. This is a required
1582	// field on insertion. Applicable when type is AD_SERVING_CLICK_TRACKER.
1583	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
1584
1585	// ClickThroughUrlSuffixProperties: Click-through URL suffix properties
1586	// for this ad. Applies to the URL in the ad or (if overriding ad
1587	// properties) the URL in the creative.
1588	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
1589
1590	// Comments: Comments for this ad.
1591	Comments string `json:"comments,omitempty"`
1592
1593	// Compatibility: Compatibility of this ad. Applicable when type is
1594	// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
1595	// either rendering on desktop or on mobile devices or in mobile apps
1596	// for regular or interstitial ads, respectively. APP and
1597	// APP_INTERSTITIAL are only used for existing default ads. New mobile
1598	// placements must be assigned DISPLAY or DISPLAY_INTERSTITIAL and
1599	// default ads created for those placements will be limited to those
1600	// compatibility types. IN_STREAM_VIDEO refers to rendering in-stream
1601	// video ads developed with the VAST standard.
1602	//
1603	// Possible values:
1604	//   "APP"
1605	//   "APP_INTERSTITIAL"
1606	//   "DISPLAY"
1607	//   "DISPLAY_INTERSTITIAL"
1608	//   "IN_STREAM_AUDIO"
1609	//   "IN_STREAM_VIDEO"
1610	Compatibility string `json:"compatibility,omitempty"`
1611
1612	// CreateInfo: Information about the creation of this ad. This is a
1613	// read-only field.
1614	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
1615
1616	// CreativeGroupAssignments: Creative group assignments for this ad.
1617	// Applicable when type is AD_SERVING_CLICK_TRACKER. Only one assignment
1618	// per creative group number is allowed for a maximum of two
1619	// assignments.
1620	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
1621
1622	// CreativeRotation: Creative rotation for this ad. Applicable when type
1623	// is AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or
1624	// AD_SERVING_TRACKING. When type is AD_SERVING_DEFAULT_AD, this field
1625	// should have exactly one creativeAssignment.
1626	CreativeRotation *CreativeRotation `json:"creativeRotation,omitempty"`
1627
1628	// DayPartTargeting: Time and day targeting information for this ad.
1629	// This field must be left blank if the ad is using a targeting
1630	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1631	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
1632
1633	// DefaultClickThroughEventTagProperties: Default click-through event
1634	// tag properties for this ad.
1635	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
1636
1637	// DeliverySchedule: Delivery schedule information for this ad.
1638	// Applicable when type is AD_SERVING_STANDARD_AD or
1639	// AD_SERVING_TRACKING. This field along with subfields priority and
1640	// impressionRatio are required on insertion when type is
1641	// AD_SERVING_STANDARD_AD.
1642	DeliverySchedule *DeliverySchedule `json:"deliverySchedule,omitempty"`
1643
1644	// DynamicClickTracker: Whether this ad is a dynamic click tracker.
1645	// Applicable when type is AD_SERVING_CLICK_TRACKER. This is a required
1646	// field on insert, and is read-only after insert.
1647	DynamicClickTracker bool `json:"dynamicClickTracker,omitempty"`
1648
1649	// EndTime: Date and time that this ad should stop serving. Must be
1650	// later than the start time. This is a required field on insertion.
1651	EndTime string `json:"endTime,omitempty"`
1652
1653	// EventTagOverrides: Event tag overrides for this ad.
1654	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
1655
1656	// GeoTargeting: Geographical targeting information for this ad. This
1657	// field must be left blank if the ad is using a targeting template.
1658	// Applicable when type is AD_SERVING_STANDARD_AD.
1659	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
1660
1661	// Id: ID of this ad. This is a read-only, auto-generated field.
1662	Id int64 `json:"id,omitempty,string"`
1663
1664	// IdDimensionValue: Dimension value for the ID of this ad. This is a
1665	// read-only, auto-generated field.
1666	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1667
1668	// KeyValueTargetingExpression: Key-value targeting information for this
1669	// ad. This field must be left blank if the ad is using a targeting
1670	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1671	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
1672
1673	// Kind: Identifies what kind of resource this is. Value: the fixed
1674	// string "dfareporting#ad".
1675	Kind string `json:"kind,omitempty"`
1676
1677	// LanguageTargeting: Language targeting information for this ad. This
1678	// field must be left blank if the ad is using a targeting template.
1679	// Applicable when type is AD_SERVING_STANDARD_AD.
1680	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
1681
1682	// LastModifiedInfo: Information about the most recent modification of
1683	// this ad. This is a read-only field.
1684	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
1685
1686	// Name: Name of this ad. This is a required field and must be less than
1687	// 256 characters long.
1688	Name string `json:"name,omitempty"`
1689
1690	// PlacementAssignments: Placement assignments for this ad.
1691	PlacementAssignments []*PlacementAssignment `json:"placementAssignments,omitempty"`
1692
1693	// RemarketingListExpression: Remarketing list targeting expression for
1694	// this ad. This field must be left blank if the ad is using a targeting
1695	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1696	RemarketingListExpression *ListTargetingExpression `json:"remarketingListExpression,omitempty"`
1697
1698	// Size: Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD.
1699	Size *Size `json:"size,omitempty"`
1700
1701	// SslCompliant: Whether this ad is ssl compliant. This is a read-only
1702	// field that is auto-generated when the ad is inserted or updated.
1703	SslCompliant bool `json:"sslCompliant,omitempty"`
1704
1705	// SslRequired: Whether this ad requires ssl. This is a read-only field
1706	// that is auto-generated when the ad is inserted or updated.
1707	SslRequired bool `json:"sslRequired,omitempty"`
1708
1709	// StartTime: Date and time that this ad should start serving. If
1710	// creating an ad, this field must be a time in the future. This is a
1711	// required field on insertion.
1712	StartTime string `json:"startTime,omitempty"`
1713
1714	// SubaccountId: Subaccount ID of this ad. This is a read-only field
1715	// that can be left blank.
1716	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1717
1718	// TargetingTemplateId: Targeting template ID, used to apply
1719	// preconfigured targeting information to this ad. This cannot be set
1720	// while any of dayPartTargeting, geoTargeting,
1721	// keyValueTargetingExpression, languageTargeting,
1722	// remarketingListExpression, or technologyTargeting are set. Applicable
1723	// when type is AD_SERVING_STANDARD_AD.
1724	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
1725
1726	// TechnologyTargeting: Technology platform targeting information for
1727	// this ad. This field must be left blank if the ad is using a targeting
1728	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1729	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
1730
1731	// Type: Type of ad. This is a required field on insertion. Note that
1732	// default ads (AD_SERVING_DEFAULT_AD) cannot be created directly (see
1733	// Creative resource).
1734	//
1735	// Possible values:
1736	//   "AD_SERVING_CLICK_TRACKER"
1737	//   "AD_SERVING_DEFAULT_AD"
1738	//   "AD_SERVING_STANDARD_AD"
1739	//   "AD_SERVING_TRACKING"
1740	Type string `json:"type,omitempty"`
1741
1742	// ServerResponse contains the HTTP response code and headers from the
1743	// server.
1744	googleapi.ServerResponse `json:"-"`
1745
1746	// ForceSendFields is a list of field names (e.g. "AccountId") to
1747	// unconditionally include in API requests. By default, fields with
1748	// empty values are omitted from API requests. However, any non-pointer,
1749	// non-interface field appearing in ForceSendFields will be sent to the
1750	// server regardless of whether the field is empty or not. This may be
1751	// used to include empty fields in Patch requests.
1752	ForceSendFields []string `json:"-"`
1753
1754	// NullFields is a list of field names (e.g. "AccountId") to include in
1755	// API requests with the JSON null value. By default, fields with empty
1756	// values are omitted from API requests. However, any field with an
1757	// empty value appearing in NullFields will be sent to the server as
1758	// null. It is an error if a field in this list has a non-empty value.
1759	// This may be used to include null fields in Patch requests.
1760	NullFields []string `json:"-"`
1761}
1762
1763func (s *Ad) MarshalJSON() ([]byte, error) {
1764	type NoMethod Ad
1765	raw := NoMethod(*s)
1766	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1767}
1768
1769// AdBlockingConfiguration: Campaign ad blocking settings.
1770type AdBlockingConfiguration struct {
1771	// ClickThroughUrl: Click-through URL used by brand-neutral ads. This is
1772	// a required field when overrideClickThroughUrl is set to true.
1773	ClickThroughUrl string `json:"clickThroughUrl,omitempty"`
1774
1775	// CreativeBundleId: ID of a creative bundle to use for this campaign.
1776	// If set, brand-neutral ads will select creatives from this bundle.
1777	// Otherwise, a default transparent pixel will be used.
1778	CreativeBundleId int64 `json:"creativeBundleId,omitempty,string"`
1779
1780	// Enabled: Whether this campaign has enabled ad blocking. When true, ad
1781	// blocking is enabled for placements in the campaign, but this may be
1782	// overridden by site and placement settings. When false, ad blocking is
1783	// disabled for all placements under the campaign, regardless of site
1784	// and placement settings.
1785	Enabled bool `json:"enabled,omitempty"`
1786
1787	// OverrideClickThroughUrl: Whether the brand-neutral ad's click-through
1788	// URL comes from the campaign's creative bundle or the override URL.
1789	// Must be set to true if ad blocking is enabled and no creative bundle
1790	// is configured.
1791	OverrideClickThroughUrl bool `json:"overrideClickThroughUrl,omitempty"`
1792
1793	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
1794	// unconditionally include in API requests. By default, fields with
1795	// empty values are omitted from API requests. However, any non-pointer,
1796	// non-interface field appearing in ForceSendFields will be sent to the
1797	// server regardless of whether the field is empty or not. This may be
1798	// used to include empty fields in Patch requests.
1799	ForceSendFields []string `json:"-"`
1800
1801	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
1802	// include in API requests with the JSON null value. By default, fields
1803	// with empty values are omitted from API requests. However, any field
1804	// with an empty value appearing in NullFields will be sent to the
1805	// server as null. It is an error if a field in this list has a
1806	// non-empty value. This may be used to include null fields in Patch
1807	// requests.
1808	NullFields []string `json:"-"`
1809}
1810
1811func (s *AdBlockingConfiguration) MarshalJSON() ([]byte, error) {
1812	type NoMethod AdBlockingConfiguration
1813	raw := NoMethod(*s)
1814	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1815}
1816
1817// AdSlot: Ad Slot
1818type AdSlot struct {
1819	// Comment: Comment for this ad slot.
1820	Comment string `json:"comment,omitempty"`
1821
1822	// Compatibility: Ad slot compatibility. DISPLAY and
1823	// DISPLAY_INTERSTITIAL refer to rendering either on desktop, mobile
1824	// devices or in mobile apps for regular or interstitial ads
1825	// respectively. APP and APP_INTERSTITIAL are for rendering in mobile
1826	// apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads
1827	// developed with the VAST standard.
1828	//
1829	// Possible values:
1830	//   "APP"
1831	//   "APP_INTERSTITIAL"
1832	//   "DISPLAY"
1833	//   "DISPLAY_INTERSTITIAL"
1834	//   "IN_STREAM_AUDIO"
1835	//   "IN_STREAM_VIDEO"
1836	Compatibility string `json:"compatibility,omitempty"`
1837
1838	// Height: Height of this ad slot.
1839	Height int64 `json:"height,omitempty,string"`
1840
1841	// LinkedPlacementId: ID of the placement from an external platform that
1842	// is linked to this ad slot.
1843	LinkedPlacementId int64 `json:"linkedPlacementId,omitempty,string"`
1844
1845	// Name: Name of this ad slot.
1846	Name string `json:"name,omitempty"`
1847
1848	// PaymentSourceType: Payment source type of this ad slot.
1849	//
1850	// Possible values:
1851	//   "PLANNING_PAYMENT_SOURCE_TYPE_AGENCY_PAID"
1852	//   "PLANNING_PAYMENT_SOURCE_TYPE_PUBLISHER_PAID"
1853	PaymentSourceType string `json:"paymentSourceType,omitempty"`
1854
1855	// Primary: Primary ad slot of a roadblock inventory item.
1856	Primary bool `json:"primary,omitempty"`
1857
1858	// Width: Width of this ad slot.
1859	Width int64 `json:"width,omitempty,string"`
1860
1861	// ForceSendFields is a list of field names (e.g. "Comment") to
1862	// unconditionally include in API requests. By default, fields with
1863	// empty values are omitted from API requests. However, any non-pointer,
1864	// non-interface field appearing in ForceSendFields will be sent to the
1865	// server regardless of whether the field is empty or not. This may be
1866	// used to include empty fields in Patch requests.
1867	ForceSendFields []string `json:"-"`
1868
1869	// NullFields is a list of field names (e.g. "Comment") to include in
1870	// API requests with the JSON null value. By default, fields with empty
1871	// values are omitted from API requests. However, any field with an
1872	// empty value appearing in NullFields will be sent to the server as
1873	// null. It is an error if a field in this list has a non-empty value.
1874	// This may be used to include null fields in Patch requests.
1875	NullFields []string `json:"-"`
1876}
1877
1878func (s *AdSlot) MarshalJSON() ([]byte, error) {
1879	type NoMethod AdSlot
1880	raw := NoMethod(*s)
1881	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1882}
1883
1884// AdsListResponse: Ad List Response
1885type AdsListResponse struct {
1886	// Ads: Ad collection.
1887	Ads []*Ad `json:"ads,omitempty"`
1888
1889	// Kind: Identifies what kind of resource this is. Value: the fixed
1890	// string "dfareporting#adsListResponse".
1891	Kind string `json:"kind,omitempty"`
1892
1893	// NextPageToken: Pagination token to be used for the next list
1894	// operation.
1895	NextPageToken string `json:"nextPageToken,omitempty"`
1896
1897	// ServerResponse contains the HTTP response code and headers from the
1898	// server.
1899	googleapi.ServerResponse `json:"-"`
1900
1901	// ForceSendFields is a list of field names (e.g. "Ads") to
1902	// unconditionally include in API requests. By default, fields with
1903	// empty values are omitted from API requests. However, any non-pointer,
1904	// non-interface field appearing in ForceSendFields will be sent to the
1905	// server regardless of whether the field is empty or not. This may be
1906	// used to include empty fields in Patch requests.
1907	ForceSendFields []string `json:"-"`
1908
1909	// NullFields is a list of field names (e.g. "Ads") to include in API
1910	// requests with the JSON null value. By default, fields with empty
1911	// values are omitted from API requests. However, any field with an
1912	// empty value appearing in NullFields will be sent to the server as
1913	// null. It is an error if a field in this list has a non-empty value.
1914	// This may be used to include null fields in Patch requests.
1915	NullFields []string `json:"-"`
1916}
1917
1918func (s *AdsListResponse) MarshalJSON() ([]byte, error) {
1919	type NoMethod AdsListResponse
1920	raw := NoMethod(*s)
1921	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1922}
1923
1924// Advertiser: Contains properties of a Campaign Manager advertiser.
1925type Advertiser struct {
1926	// AccountId: Account ID of this advertiser.This is a read-only field
1927	// that can be left blank.
1928	AccountId int64 `json:"accountId,omitempty,string"`
1929
1930	// AdvertiserGroupId: ID of the advertiser group this advertiser belongs
1931	// to. You can group advertisers for reporting purposes, allowing you to
1932	// see aggregated information for all advertisers in each group.
1933	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
1934
1935	// ClickThroughUrlSuffix: Suffix added to click-through URL of ad
1936	// creative associations under this advertiser. Must be less than 129
1937	// characters long.
1938	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
1939
1940	// DefaultClickThroughEventTagId: ID of the click-through event tag to
1941	// apply by default to the landing pages of this advertiser's campaigns.
1942	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
1943
1944	// DefaultEmail: Default email address used in sender field for tag
1945	// emails.
1946	DefaultEmail string `json:"defaultEmail,omitempty"`
1947
1948	// FloodlightConfigurationId: Floodlight configuration ID of this
1949	// advertiser. The floodlight configuration ID will be created
1950	// automatically, so on insert this field should be left blank. This
1951	// field can be set to another advertiser's floodlight configuration ID
1952	// in order to share that advertiser's floodlight configuration with
1953	// this advertiser, so long as:
1954	// - This advertiser's original floodlight configuration is not already
1955	// associated with floodlight activities or floodlight activity groups.
1956	//
1957	// - This advertiser's original floodlight configuration is not already
1958	// shared with another advertiser.
1959	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
1960
1961	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
1962	// of the floodlight configuration. This is a read-only, auto-generated
1963	// field.
1964	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
1965
1966	// Id: ID of this advertiser. This is a read-only, auto-generated field.
1967	Id int64 `json:"id,omitempty,string"`
1968
1969	// IdDimensionValue: Dimension value for the ID of this advertiser. This
1970	// is a read-only, auto-generated field.
1971	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1972
1973	// Kind: Identifies what kind of resource this is. Value: the fixed
1974	// string "dfareporting#advertiser".
1975	Kind string `json:"kind,omitempty"`
1976
1977	// Name: Name of this advertiser. This is a required field and must be
1978	// less than 256 characters long and unique among advertisers of the
1979	// same account.
1980	Name string `json:"name,omitempty"`
1981
1982	// OriginalFloodlightConfigurationId: Original floodlight configuration
1983	// before any sharing occurred. Set the floodlightConfigurationId of
1984	// this advertiser to originalFloodlightConfigurationId to unshare the
1985	// advertiser's current floodlight configuration. You cannot unshare an
1986	// advertiser's floodlight configuration if the shared configuration has
1987	// activities associated with any campaign or placement.
1988	OriginalFloodlightConfigurationId int64 `json:"originalFloodlightConfigurationId,omitempty,string"`
1989
1990	// Status: Status of this advertiser.
1991	//
1992	// Possible values:
1993	//   "APPROVED"
1994	//   "ON_HOLD"
1995	Status string `json:"status,omitempty"`
1996
1997	// SubaccountId: Subaccount ID of this advertiser.This is a read-only
1998	// field that can be left blank.
1999	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2000
2001	// Suspended: Suspension status of this advertiser.
2002	Suspended bool `json:"suspended,omitempty"`
2003
2004	// ServerResponse contains the HTTP response code and headers from the
2005	// server.
2006	googleapi.ServerResponse `json:"-"`
2007
2008	// ForceSendFields is a list of field names (e.g. "AccountId") to
2009	// unconditionally include in API requests. By default, fields with
2010	// empty values are omitted from API requests. However, any non-pointer,
2011	// non-interface field appearing in ForceSendFields will be sent to the
2012	// server regardless of whether the field is empty or not. This may be
2013	// used to include empty fields in Patch requests.
2014	ForceSendFields []string `json:"-"`
2015
2016	// NullFields is a list of field names (e.g. "AccountId") to include in
2017	// API requests with the JSON null value. By default, fields with empty
2018	// values are omitted from API requests. However, any field with an
2019	// empty value appearing in NullFields will be sent to the server as
2020	// null. It is an error if a field in this list has a non-empty value.
2021	// This may be used to include null fields in Patch requests.
2022	NullFields []string `json:"-"`
2023}
2024
2025func (s *Advertiser) MarshalJSON() ([]byte, error) {
2026	type NoMethod Advertiser
2027	raw := NoMethod(*s)
2028	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2029}
2030
2031// AdvertiserGroup: Groups advertisers together so that reports can be
2032// generated for the entire group at once.
2033type AdvertiserGroup struct {
2034	// AccountId: Account ID of this advertiser group. This is a read-only
2035	// field that can be left blank.
2036	AccountId int64 `json:"accountId,omitempty,string"`
2037
2038	// Id: ID of this advertiser group. This is a read-only, auto-generated
2039	// field.
2040	Id int64 `json:"id,omitempty,string"`
2041
2042	// Kind: Identifies what kind of resource this is. Value: the fixed
2043	// string "dfareporting#advertiserGroup".
2044	Kind string `json:"kind,omitempty"`
2045
2046	// Name: Name of this advertiser group. This is a required field and
2047	// must be less than 256 characters long and unique among advertiser
2048	// groups of the same account.
2049	Name string `json:"name,omitempty"`
2050
2051	// ServerResponse contains the HTTP response code and headers from the
2052	// server.
2053	googleapi.ServerResponse `json:"-"`
2054
2055	// ForceSendFields is a list of field names (e.g. "AccountId") to
2056	// unconditionally include in API requests. By default, fields with
2057	// empty values are omitted from API requests. However, any non-pointer,
2058	// non-interface field appearing in ForceSendFields will be sent to the
2059	// server regardless of whether the field is empty or not. This may be
2060	// used to include empty fields in Patch requests.
2061	ForceSendFields []string `json:"-"`
2062
2063	// NullFields is a list of field names (e.g. "AccountId") to include in
2064	// API requests with the JSON null value. By default, fields with empty
2065	// values are omitted from API requests. However, any field with an
2066	// empty value appearing in NullFields will be sent to the server as
2067	// null. It is an error if a field in this list has a non-empty value.
2068	// This may be used to include null fields in Patch requests.
2069	NullFields []string `json:"-"`
2070}
2071
2072func (s *AdvertiserGroup) MarshalJSON() ([]byte, error) {
2073	type NoMethod AdvertiserGroup
2074	raw := NoMethod(*s)
2075	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2076}
2077
2078// AdvertiserGroupsListResponse: Advertiser Group List Response
2079type AdvertiserGroupsListResponse struct {
2080	// AdvertiserGroups: Advertiser group collection.
2081	AdvertiserGroups []*AdvertiserGroup `json:"advertiserGroups,omitempty"`
2082
2083	// Kind: Identifies what kind of resource this is. Value: the fixed
2084	// string "dfareporting#advertiserGroupsListResponse".
2085	Kind string `json:"kind,omitempty"`
2086
2087	// NextPageToken: Pagination token to be used for the next list
2088	// operation.
2089	NextPageToken string `json:"nextPageToken,omitempty"`
2090
2091	// ServerResponse contains the HTTP response code and headers from the
2092	// server.
2093	googleapi.ServerResponse `json:"-"`
2094
2095	// ForceSendFields is a list of field names (e.g. "AdvertiserGroups") to
2096	// unconditionally include in API requests. By default, fields with
2097	// empty values are omitted from API requests. However, any non-pointer,
2098	// non-interface field appearing in ForceSendFields will be sent to the
2099	// server regardless of whether the field is empty or not. This may be
2100	// used to include empty fields in Patch requests.
2101	ForceSendFields []string `json:"-"`
2102
2103	// NullFields is a list of field names (e.g. "AdvertiserGroups") to
2104	// include in API requests with the JSON null value. By default, fields
2105	// with empty values are omitted from API requests. However, any field
2106	// with an empty value appearing in NullFields will be sent to the
2107	// server as null. It is an error if a field in this list has a
2108	// non-empty value. This may be used to include null fields in Patch
2109	// requests.
2110	NullFields []string `json:"-"`
2111}
2112
2113func (s *AdvertiserGroupsListResponse) MarshalJSON() ([]byte, error) {
2114	type NoMethod AdvertiserGroupsListResponse
2115	raw := NoMethod(*s)
2116	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2117}
2118
2119// AdvertiserLandingPagesListResponse: Landing Page List Response
2120type AdvertiserLandingPagesListResponse struct {
2121	// Kind: Identifies what kind of resource this is. Value: the fixed
2122	// string "dfareporting#advertiserLandingPagesListResponse".
2123	Kind string `json:"kind,omitempty"`
2124
2125	// LandingPages: Landing page collection
2126	LandingPages []*LandingPage `json:"landingPages,omitempty"`
2127
2128	// NextPageToken: Pagination token to be used for the next list
2129	// operation.
2130	NextPageToken string `json:"nextPageToken,omitempty"`
2131
2132	// ServerResponse contains the HTTP response code and headers from the
2133	// server.
2134	googleapi.ServerResponse `json:"-"`
2135
2136	// ForceSendFields is a list of field names (e.g. "Kind") to
2137	// unconditionally include in API requests. By default, fields with
2138	// empty values are omitted from API requests. However, any non-pointer,
2139	// non-interface field appearing in ForceSendFields will be sent to the
2140	// server regardless of whether the field is empty or not. This may be
2141	// used to include empty fields in Patch requests.
2142	ForceSendFields []string `json:"-"`
2143
2144	// NullFields is a list of field names (e.g. "Kind") to include in API
2145	// requests with the JSON null value. By default, fields with empty
2146	// values are omitted from API requests. However, any field with an
2147	// empty value appearing in NullFields will be sent to the server as
2148	// null. It is an error if a field in this list has a non-empty value.
2149	// This may be used to include null fields in Patch requests.
2150	NullFields []string `json:"-"`
2151}
2152
2153func (s *AdvertiserLandingPagesListResponse) MarshalJSON() ([]byte, error) {
2154	type NoMethod AdvertiserLandingPagesListResponse
2155	raw := NoMethod(*s)
2156	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2157}
2158
2159// AdvertisersListResponse: Advertiser List Response
2160type AdvertisersListResponse struct {
2161	// Advertisers: Advertiser collection.
2162	Advertisers []*Advertiser `json:"advertisers,omitempty"`
2163
2164	// Kind: Identifies what kind of resource this is. Value: the fixed
2165	// string "dfareporting#advertisersListResponse".
2166	Kind string `json:"kind,omitempty"`
2167
2168	// NextPageToken: Pagination token to be used for the next list
2169	// operation.
2170	NextPageToken string `json:"nextPageToken,omitempty"`
2171
2172	// ServerResponse contains the HTTP response code and headers from the
2173	// server.
2174	googleapi.ServerResponse `json:"-"`
2175
2176	// ForceSendFields is a list of field names (e.g. "Advertisers") to
2177	// unconditionally include in API requests. By default, fields with
2178	// empty values are omitted from API requests. However, any non-pointer,
2179	// non-interface field appearing in ForceSendFields will be sent to the
2180	// server regardless of whether the field is empty or not. This may be
2181	// used to include empty fields in Patch requests.
2182	ForceSendFields []string `json:"-"`
2183
2184	// NullFields is a list of field names (e.g. "Advertisers") to include
2185	// in API requests with the JSON null value. By default, fields with
2186	// empty values are omitted from API requests. However, any field with
2187	// an empty value appearing in NullFields will be sent to the server as
2188	// null. It is an error if a field in this list has a non-empty value.
2189	// This may be used to include null fields in Patch requests.
2190	NullFields []string `json:"-"`
2191}
2192
2193func (s *AdvertisersListResponse) MarshalJSON() ([]byte, error) {
2194	type NoMethod AdvertisersListResponse
2195	raw := NoMethod(*s)
2196	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2197}
2198
2199// AudienceSegment: Audience Segment.
2200type AudienceSegment struct {
2201	// Allocation: Weight allocated to this segment. The weight assigned
2202	// will be understood in proportion to the weights assigned to other
2203	// segments in the same segment group. Acceptable values are 1 to 1000,
2204	// inclusive.
2205	Allocation int64 `json:"allocation,omitempty"`
2206
2207	// Id: ID of this audience segment. This is a read-only, auto-generated
2208	// field.
2209	Id int64 `json:"id,omitempty,string"`
2210
2211	// Name: Name of this audience segment. This is a required field and
2212	// must be less than 65 characters long.
2213	Name string `json:"name,omitempty"`
2214
2215	// ForceSendFields is a list of field names (e.g. "Allocation") to
2216	// unconditionally include in API requests. By default, fields with
2217	// empty values are omitted from API requests. However, any non-pointer,
2218	// non-interface field appearing in ForceSendFields will be sent to the
2219	// server regardless of whether the field is empty or not. This may be
2220	// used to include empty fields in Patch requests.
2221	ForceSendFields []string `json:"-"`
2222
2223	// NullFields is a list of field names (e.g. "Allocation") to include in
2224	// API requests with the JSON null value. By default, fields with empty
2225	// values are omitted from API requests. However, any field with an
2226	// empty value appearing in NullFields will be sent to the server as
2227	// null. It is an error if a field in this list has a non-empty value.
2228	// This may be used to include null fields in Patch requests.
2229	NullFields []string `json:"-"`
2230}
2231
2232func (s *AudienceSegment) MarshalJSON() ([]byte, error) {
2233	type NoMethod AudienceSegment
2234	raw := NoMethod(*s)
2235	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2236}
2237
2238// AudienceSegmentGroup: Audience Segment Group.
2239type AudienceSegmentGroup struct {
2240	// AudienceSegments: Audience segments assigned to this group. The
2241	// number of segments must be between 2 and 100.
2242	AudienceSegments []*AudienceSegment `json:"audienceSegments,omitempty"`
2243
2244	// Id: ID of this audience segment group. This is a read-only,
2245	// auto-generated field.
2246	Id int64 `json:"id,omitempty,string"`
2247
2248	// Name: Name of this audience segment group. This is a required field
2249	// and must be less than 65 characters long.
2250	Name string `json:"name,omitempty"`
2251
2252	// ForceSendFields is a list of field names (e.g. "AudienceSegments") to
2253	// unconditionally include in API requests. By default, fields with
2254	// empty values are omitted from API requests. However, any non-pointer,
2255	// non-interface field appearing in ForceSendFields will be sent to the
2256	// server regardless of whether the field is empty or not. This may be
2257	// used to include empty fields in Patch requests.
2258	ForceSendFields []string `json:"-"`
2259
2260	// NullFields is a list of field names (e.g. "AudienceSegments") to
2261	// include in API requests with the JSON null value. By default, fields
2262	// with empty values are omitted from API requests. However, any field
2263	// with an empty value appearing in NullFields will be sent to the
2264	// server as null. It is an error if a field in this list has a
2265	// non-empty value. This may be used to include null fields in Patch
2266	// requests.
2267	NullFields []string `json:"-"`
2268}
2269
2270func (s *AudienceSegmentGroup) MarshalJSON() ([]byte, error) {
2271	type NoMethod AudienceSegmentGroup
2272	raw := NoMethod(*s)
2273	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2274}
2275
2276// Browser: Contains information about a browser that can be targeted by
2277// ads.
2278type Browser struct {
2279	// BrowserVersionId: ID referring to this grouping of browser and
2280	// version numbers. This is the ID used for targeting.
2281	BrowserVersionId int64 `json:"browserVersionId,omitempty,string"`
2282
2283	// DartId: DART ID of this browser. This is the ID used when generating
2284	// reports.
2285	DartId int64 `json:"dartId,omitempty,string"`
2286
2287	// Kind: Identifies what kind of resource this is. Value: the fixed
2288	// string "dfareporting#browser".
2289	Kind string `json:"kind,omitempty"`
2290
2291	// MajorVersion: Major version number (leftmost number) of this browser.
2292	// For example, for Chrome 5.0.376.86 beta, this field should be set to
2293	// 5. An asterisk (*) may be used to target any version number, and a
2294	// question mark (?) may be used to target cases where the version
2295	// number cannot be identified. For example, Chrome *.* targets any
2296	// version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2297	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2298	// server knows the browser is Firefox but can't tell which version it
2299	// is.
2300	MajorVersion string `json:"majorVersion,omitempty"`
2301
2302	// MinorVersion: Minor version number (number after first dot on left)
2303	// of this browser. For example, for Chrome 5.0.375.86 beta, this field
2304	// should be set to 0. An asterisk (*) may be used to target any version
2305	// number, and a question mark (?) may be used to target cases where the
2306	// version number cannot be identified. For example, Chrome *.* targets
2307	// any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2308	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2309	// server knows the browser is Firefox but can't tell which version it
2310	// is.
2311	MinorVersion string `json:"minorVersion,omitempty"`
2312
2313	// Name: Name of this browser.
2314	Name string `json:"name,omitempty"`
2315
2316	// ForceSendFields is a list of field names (e.g. "BrowserVersionId") to
2317	// unconditionally include in API requests. By default, fields with
2318	// empty values are omitted from API requests. However, any non-pointer,
2319	// non-interface field appearing in ForceSendFields will be sent to the
2320	// server regardless of whether the field is empty or not. This may be
2321	// used to include empty fields in Patch requests.
2322	ForceSendFields []string `json:"-"`
2323
2324	// NullFields is a list of field names (e.g. "BrowserVersionId") to
2325	// include in API requests with the JSON null value. By default, fields
2326	// with empty values are omitted from API requests. However, any field
2327	// with an empty value appearing in NullFields will be sent to the
2328	// server as null. It is an error if a field in this list has a
2329	// non-empty value. This may be used to include null fields in Patch
2330	// requests.
2331	NullFields []string `json:"-"`
2332}
2333
2334func (s *Browser) MarshalJSON() ([]byte, error) {
2335	type NoMethod Browser
2336	raw := NoMethod(*s)
2337	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2338}
2339
2340// BrowsersListResponse: Browser List Response
2341type BrowsersListResponse struct {
2342	// Browsers: Browser collection.
2343	Browsers []*Browser `json:"browsers,omitempty"`
2344
2345	// Kind: Identifies what kind of resource this is. Value: the fixed
2346	// string "dfareporting#browsersListResponse".
2347	Kind string `json:"kind,omitempty"`
2348
2349	// ServerResponse contains the HTTP response code and headers from the
2350	// server.
2351	googleapi.ServerResponse `json:"-"`
2352
2353	// ForceSendFields is a list of field names (e.g. "Browsers") to
2354	// unconditionally include in API requests. By default, fields with
2355	// empty values are omitted from API requests. However, any non-pointer,
2356	// non-interface field appearing in ForceSendFields will be sent to the
2357	// server regardless of whether the field is empty or not. This may be
2358	// used to include empty fields in Patch requests.
2359	ForceSendFields []string `json:"-"`
2360
2361	// NullFields is a list of field names (e.g. "Browsers") to include in
2362	// API requests with the JSON null value. By default, fields with empty
2363	// values are omitted from API requests. However, any field with an
2364	// empty value appearing in NullFields will be sent to the server as
2365	// null. It is an error if a field in this list has a non-empty value.
2366	// This may be used to include null fields in Patch requests.
2367	NullFields []string `json:"-"`
2368}
2369
2370func (s *BrowsersListResponse) MarshalJSON() ([]byte, error) {
2371	type NoMethod BrowsersListResponse
2372	raw := NoMethod(*s)
2373	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2374}
2375
2376// Campaign: Contains properties of a Campaign Manager campaign.
2377type Campaign struct {
2378	// AccountId: Account ID of this campaign. This is a read-only field
2379	// that can be left blank.
2380	AccountId int64 `json:"accountId,omitempty,string"`
2381
2382	// AdBlockingConfiguration: Ad blocking settings for this campaign.
2383	AdBlockingConfiguration *AdBlockingConfiguration `json:"adBlockingConfiguration,omitempty"`
2384
2385	// AdditionalCreativeOptimizationConfigurations: Additional creative
2386	// optimization configurations for the campaign.
2387	AdditionalCreativeOptimizationConfigurations []*CreativeOptimizationConfiguration `json:"additionalCreativeOptimizationConfigurations,omitempty"`
2388
2389	// AdvertiserGroupId: Advertiser group ID of the associated advertiser.
2390	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
2391
2392	// AdvertiserId: Advertiser ID of this campaign. This is a required
2393	// field.
2394	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2395
2396	// AdvertiserIdDimensionValue: Dimension value for the advertiser ID of
2397	// this campaign. This is a read-only, auto-generated field.
2398	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
2399
2400	// Archived: Whether this campaign has been archived.
2401	Archived bool `json:"archived,omitempty"`
2402
2403	// AudienceSegmentGroups: Audience segment groups assigned to this
2404	// campaign. Cannot have more than 300 segment groups.
2405	AudienceSegmentGroups []*AudienceSegmentGroup `json:"audienceSegmentGroups,omitempty"`
2406
2407	// BillingInvoiceCode: Billing invoice code included in the Campaign
2408	// Manager client billing invoices associated with the campaign.
2409	BillingInvoiceCode string `json:"billingInvoiceCode,omitempty"`
2410
2411	// ClickThroughUrlSuffixProperties: Click-through URL suffix override
2412	// properties for this campaign.
2413	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
2414
2415	// Comment: Arbitrary comments about this campaign. Must be less than
2416	// 256 characters long.
2417	Comment string `json:"comment,omitempty"`
2418
2419	// CreateInfo: Information about the creation of this campaign. This is
2420	// a read-only field.
2421	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
2422
2423	// CreativeGroupIds: List of creative group IDs that are assigned to the
2424	// campaign.
2425	CreativeGroupIds googleapi.Int64s `json:"creativeGroupIds,omitempty"`
2426
2427	// CreativeOptimizationConfiguration: Creative optimization
2428	// configuration for the campaign.
2429	CreativeOptimizationConfiguration *CreativeOptimizationConfiguration `json:"creativeOptimizationConfiguration,omitempty"`
2430
2431	// DefaultClickThroughEventTagProperties: Click-through event tag ID
2432	// override properties for this campaign.
2433	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
2434
2435	// DefaultLandingPageId: The default landing page ID for this campaign.
2436	DefaultLandingPageId int64 `json:"defaultLandingPageId,omitempty,string"`
2437
2438	// EndDate: Date on which the campaign will stop running. On insert, the
2439	// end date must be today or a future date. The end date must be later
2440	// than or be the same as the start date. If, for example, you set
2441	// 6/25/2015 as both the start and end dates, the effective campaign run
2442	// date is just that day only, 6/25/2015. The hours, minutes, and
2443	// seconds of the end date should not be set, as doing so will result in
2444	// an error. This is a required field.
2445	EndDate string `json:"endDate,omitempty"`
2446
2447	// EventTagOverrides: Overrides that can be used to activate or
2448	// deactivate advertiser event tags.
2449	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
2450
2451	// ExternalId: External ID for this campaign.
2452	ExternalId string `json:"externalId,omitempty"`
2453
2454	// Id: ID of this campaign. This is a read-only auto-generated field.
2455	Id int64 `json:"id,omitempty,string"`
2456
2457	// IdDimensionValue: Dimension value for the ID of this campaign. This
2458	// is a read-only, auto-generated field.
2459	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
2460
2461	// Kind: Identifies what kind of resource this is. Value: the fixed
2462	// string "dfareporting#campaign".
2463	Kind string `json:"kind,omitempty"`
2464
2465	// LastModifiedInfo: Information about the most recent modification of
2466	// this campaign. This is a read-only field.
2467	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
2468
2469	// LookbackConfiguration: Lookback window settings for the campaign.
2470	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
2471
2472	// Name: Name of this campaign. This is a required field and must be
2473	// less than 256 characters long and unique among campaigns of the same
2474	// advertiser.
2475	Name string `json:"name,omitempty"`
2476
2477	// NielsenOcrEnabled: Whether Nielsen reports are enabled for this
2478	// campaign.
2479	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
2480
2481	// StartDate: Date on which the campaign starts running. The start date
2482	// can be any date. The hours, minutes, and seconds of the start date
2483	// should not be set, as doing so will result in an error. This is a
2484	// required field.
2485	StartDate string `json:"startDate,omitempty"`
2486
2487	// SubaccountId: Subaccount ID of this campaign. This is a read-only
2488	// field that can be left blank.
2489	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2490
2491	// TraffickerEmails: Campaign trafficker contact emails.
2492	TraffickerEmails []string `json:"traffickerEmails,omitempty"`
2493
2494	// ServerResponse contains the HTTP response code and headers from the
2495	// server.
2496	googleapi.ServerResponse `json:"-"`
2497
2498	// ForceSendFields is a list of field names (e.g. "AccountId") to
2499	// unconditionally include in API requests. By default, fields with
2500	// empty values are omitted from API requests. However, any non-pointer,
2501	// non-interface field appearing in ForceSendFields will be sent to the
2502	// server regardless of whether the field is empty or not. This may be
2503	// used to include empty fields in Patch requests.
2504	ForceSendFields []string `json:"-"`
2505
2506	// NullFields is a list of field names (e.g. "AccountId") to include in
2507	// API requests with the JSON null value. By default, fields with empty
2508	// values are omitted from API requests. However, any field with an
2509	// empty value appearing in NullFields will be sent to the server as
2510	// null. It is an error if a field in this list has a non-empty value.
2511	// This may be used to include null fields in Patch requests.
2512	NullFields []string `json:"-"`
2513}
2514
2515func (s *Campaign) MarshalJSON() ([]byte, error) {
2516	type NoMethod Campaign
2517	raw := NoMethod(*s)
2518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2519}
2520
2521// CampaignCreativeAssociation: Identifies a creative which has been
2522// associated with a given campaign.
2523type CampaignCreativeAssociation struct {
2524	// CreativeId: ID of the creative associated with the campaign. This is
2525	// a required field.
2526	CreativeId int64 `json:"creativeId,omitempty,string"`
2527
2528	// Kind: Identifies what kind of resource this is. Value: the fixed
2529	// string "dfareporting#campaignCreativeAssociation".
2530	Kind string `json:"kind,omitempty"`
2531
2532	// ServerResponse contains the HTTP response code and headers from the
2533	// server.
2534	googleapi.ServerResponse `json:"-"`
2535
2536	// ForceSendFields is a list of field names (e.g. "CreativeId") to
2537	// unconditionally include in API requests. By default, fields with
2538	// empty values are omitted from API requests. However, any non-pointer,
2539	// non-interface field appearing in ForceSendFields will be sent to the
2540	// server regardless of whether the field is empty or not. This may be
2541	// used to include empty fields in Patch requests.
2542	ForceSendFields []string `json:"-"`
2543
2544	// NullFields is a list of field names (e.g. "CreativeId") to include in
2545	// API requests with the JSON null value. By default, fields with empty
2546	// values are omitted from API requests. However, any field with an
2547	// empty value appearing in NullFields will be sent to the server as
2548	// null. It is an error if a field in this list has a non-empty value.
2549	// This may be used to include null fields in Patch requests.
2550	NullFields []string `json:"-"`
2551}
2552
2553func (s *CampaignCreativeAssociation) MarshalJSON() ([]byte, error) {
2554	type NoMethod CampaignCreativeAssociation
2555	raw := NoMethod(*s)
2556	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2557}
2558
2559// CampaignCreativeAssociationsListResponse: Campaign Creative
2560// Association List Response
2561type CampaignCreativeAssociationsListResponse struct {
2562	// CampaignCreativeAssociations: Campaign creative association
2563	// collection
2564	CampaignCreativeAssociations []*CampaignCreativeAssociation `json:"campaignCreativeAssociations,omitempty"`
2565
2566	// Kind: Identifies what kind of resource this is. Value: the fixed
2567	// string "dfareporting#campaignCreativeAssociationsListResponse".
2568	Kind string `json:"kind,omitempty"`
2569
2570	// NextPageToken: Pagination token to be used for the next list
2571	// operation.
2572	NextPageToken string `json:"nextPageToken,omitempty"`
2573
2574	// ServerResponse contains the HTTP response code and headers from the
2575	// server.
2576	googleapi.ServerResponse `json:"-"`
2577
2578	// ForceSendFields is a list of field names (e.g.
2579	// "CampaignCreativeAssociations") to unconditionally include in API
2580	// requests. By default, fields with empty values are omitted from API
2581	// requests. However, any non-pointer, non-interface field appearing in
2582	// ForceSendFields will be sent to the server regardless of whether the
2583	// field is empty or not. This may be used to include empty fields in
2584	// Patch requests.
2585	ForceSendFields []string `json:"-"`
2586
2587	// NullFields is a list of field names (e.g.
2588	// "CampaignCreativeAssociations") to include in API requests with the
2589	// JSON null value. By default, fields with empty values are omitted
2590	// from API requests. However, any field with an empty value appearing
2591	// in NullFields will be sent to the server as null. It is an error if a
2592	// field in this list has a non-empty value. This may be used to include
2593	// null fields in Patch requests.
2594	NullFields []string `json:"-"`
2595}
2596
2597func (s *CampaignCreativeAssociationsListResponse) MarshalJSON() ([]byte, error) {
2598	type NoMethod CampaignCreativeAssociationsListResponse
2599	raw := NoMethod(*s)
2600	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2601}
2602
2603// CampaignsListResponse: Campaign List Response
2604type CampaignsListResponse struct {
2605	// Campaigns: Campaign collection.
2606	Campaigns []*Campaign `json:"campaigns,omitempty"`
2607
2608	// Kind: Identifies what kind of resource this is. Value: the fixed
2609	// string "dfareporting#campaignsListResponse".
2610	Kind string `json:"kind,omitempty"`
2611
2612	// NextPageToken: Pagination token to be used for the next list
2613	// operation.
2614	NextPageToken string `json:"nextPageToken,omitempty"`
2615
2616	// ServerResponse contains the HTTP response code and headers from the
2617	// server.
2618	googleapi.ServerResponse `json:"-"`
2619
2620	// ForceSendFields is a list of field names (e.g. "Campaigns") to
2621	// unconditionally include in API requests. By default, fields with
2622	// empty values are omitted from API requests. However, any non-pointer,
2623	// non-interface field appearing in ForceSendFields will be sent to the
2624	// server regardless of whether the field is empty or not. This may be
2625	// used to include empty fields in Patch requests.
2626	ForceSendFields []string `json:"-"`
2627
2628	// NullFields is a list of field names (e.g. "Campaigns") to include in
2629	// API requests with the JSON null value. By default, fields with empty
2630	// values are omitted from API requests. However, any field with an
2631	// empty value appearing in NullFields will be sent to the server as
2632	// null. It is an error if a field in this list has a non-empty value.
2633	// This may be used to include null fields in Patch requests.
2634	NullFields []string `json:"-"`
2635}
2636
2637func (s *CampaignsListResponse) MarshalJSON() ([]byte, error) {
2638	type NoMethod CampaignsListResponse
2639	raw := NoMethod(*s)
2640	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2641}
2642
2643// ChangeLog: Describes a change that a user has made to a resource.
2644type ChangeLog struct {
2645	// AccountId: Account ID of the modified object.
2646	AccountId int64 `json:"accountId,omitempty,string"`
2647
2648	// Action: Action which caused the change.
2649	Action string `json:"action,omitempty"`
2650
2651	// ChangeTime: Time when the object was modified.
2652	ChangeTime string `json:"changeTime,omitempty"`
2653
2654	// FieldName: Field name of the object which changed.
2655	FieldName string `json:"fieldName,omitempty"`
2656
2657	// Id: ID of this change log.
2658	Id int64 `json:"id,omitempty,string"`
2659
2660	// Kind: Identifies what kind of resource this is. Value: the fixed
2661	// string "dfareporting#changeLog".
2662	Kind string `json:"kind,omitempty"`
2663
2664	// NewValue: New value of the object field.
2665	NewValue string `json:"newValue,omitempty"`
2666
2667	// ObjectId: ID of the object of this change log. The object could be a
2668	// campaign, placement, ad, or other type.
2669	ObjectId int64 `json:"objectId,omitempty,string"`
2670
2671	// ObjectType: Object type of the change log.
2672	ObjectType string `json:"objectType,omitempty"`
2673
2674	// OldValue: Old value of the object field.
2675	OldValue string `json:"oldValue,omitempty"`
2676
2677	// SubaccountId: Subaccount ID of the modified object.
2678	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2679
2680	// TransactionId: Transaction ID of this change log. When a single API
2681	// call results in many changes, each change will have a separate ID in
2682	// the change log but will share the same transactionId.
2683	TransactionId int64 `json:"transactionId,omitempty,string"`
2684
2685	// UserProfileId: ID of the user who modified the object.
2686	UserProfileId int64 `json:"userProfileId,omitempty,string"`
2687
2688	// UserProfileName: User profile name of the user who modified the
2689	// object.
2690	UserProfileName string `json:"userProfileName,omitempty"`
2691
2692	// ServerResponse contains the HTTP response code and headers from the
2693	// server.
2694	googleapi.ServerResponse `json:"-"`
2695
2696	// ForceSendFields is a list of field names (e.g. "AccountId") to
2697	// unconditionally include in API requests. By default, fields with
2698	// empty values are omitted from API requests. However, any non-pointer,
2699	// non-interface field appearing in ForceSendFields will be sent to the
2700	// server regardless of whether the field is empty or not. This may be
2701	// used to include empty fields in Patch requests.
2702	ForceSendFields []string `json:"-"`
2703
2704	// NullFields is a list of field names (e.g. "AccountId") to include in
2705	// API requests with the JSON null value. By default, fields with empty
2706	// values are omitted from API requests. However, any field with an
2707	// empty value appearing in NullFields will be sent to the server as
2708	// null. It is an error if a field in this list has a non-empty value.
2709	// This may be used to include null fields in Patch requests.
2710	NullFields []string `json:"-"`
2711}
2712
2713func (s *ChangeLog) MarshalJSON() ([]byte, error) {
2714	type NoMethod ChangeLog
2715	raw := NoMethod(*s)
2716	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2717}
2718
2719// ChangeLogsListResponse: Change Log List Response
2720type ChangeLogsListResponse struct {
2721	// ChangeLogs: Change log collection.
2722	ChangeLogs []*ChangeLog `json:"changeLogs,omitempty"`
2723
2724	// Kind: Identifies what kind of resource this is. Value: the fixed
2725	// string "dfareporting#changeLogsListResponse".
2726	Kind string `json:"kind,omitempty"`
2727
2728	// NextPageToken: Pagination token to be used for the next list
2729	// operation.
2730	NextPageToken string `json:"nextPageToken,omitempty"`
2731
2732	// ServerResponse contains the HTTP response code and headers from the
2733	// server.
2734	googleapi.ServerResponse `json:"-"`
2735
2736	// ForceSendFields is a list of field names (e.g. "ChangeLogs") to
2737	// unconditionally include in API requests. By default, fields with
2738	// empty values are omitted from API requests. However, any non-pointer,
2739	// non-interface field appearing in ForceSendFields will be sent to the
2740	// server regardless of whether the field is empty or not. This may be
2741	// used to include empty fields in Patch requests.
2742	ForceSendFields []string `json:"-"`
2743
2744	// NullFields is a list of field names (e.g. "ChangeLogs") to include in
2745	// API requests with the JSON null value. By default, fields with empty
2746	// values are omitted from API requests. However, any field with an
2747	// empty value appearing in NullFields will be sent to the server as
2748	// null. It is an error if a field in this list has a non-empty value.
2749	// This may be used to include null fields in Patch requests.
2750	NullFields []string `json:"-"`
2751}
2752
2753func (s *ChangeLogsListResponse) MarshalJSON() ([]byte, error) {
2754	type NoMethod ChangeLogsListResponse
2755	raw := NoMethod(*s)
2756	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2757}
2758
2759// CitiesListResponse: City List Response
2760type CitiesListResponse struct {
2761	// Cities: City collection.
2762	Cities []*City `json:"cities,omitempty"`
2763
2764	// Kind: Identifies what kind of resource this is. Value: the fixed
2765	// string "dfareporting#citiesListResponse".
2766	Kind string `json:"kind,omitempty"`
2767
2768	// ServerResponse contains the HTTP response code and headers from the
2769	// server.
2770	googleapi.ServerResponse `json:"-"`
2771
2772	// ForceSendFields is a list of field names (e.g. "Cities") to
2773	// unconditionally include in API requests. By default, fields with
2774	// empty values are omitted from API requests. However, any non-pointer,
2775	// non-interface field appearing in ForceSendFields will be sent to the
2776	// server regardless of whether the field is empty or not. This may be
2777	// used to include empty fields in Patch requests.
2778	ForceSendFields []string `json:"-"`
2779
2780	// NullFields is a list of field names (e.g. "Cities") to include in API
2781	// requests with the JSON null value. By default, fields with empty
2782	// values are omitted from API requests. However, any field with an
2783	// empty value appearing in NullFields will be sent to the server as
2784	// null. It is an error if a field in this list has a non-empty value.
2785	// This may be used to include null fields in Patch requests.
2786	NullFields []string `json:"-"`
2787}
2788
2789func (s *CitiesListResponse) MarshalJSON() ([]byte, error) {
2790	type NoMethod CitiesListResponse
2791	raw := NoMethod(*s)
2792	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2793}
2794
2795// City: Contains information about a city that can be targeted by ads.
2796type City struct {
2797	// CountryCode: Country code of the country to which this city belongs.
2798	CountryCode string `json:"countryCode,omitempty"`
2799
2800	// CountryDartId: DART ID of the country to which this city belongs.
2801	CountryDartId int64 `json:"countryDartId,omitempty,string"`
2802
2803	// DartId: DART ID of this city. This is the ID used for targeting and
2804	// generating reports.
2805	DartId int64 `json:"dartId,omitempty,string"`
2806
2807	// Kind: Identifies what kind of resource this is. Value: the fixed
2808	// string "dfareporting#city".
2809	Kind string `json:"kind,omitempty"`
2810
2811	// MetroCode: Metro region code of the metro region (DMA) to which this
2812	// city belongs.
2813	MetroCode string `json:"metroCode,omitempty"`
2814
2815	// MetroDmaId: ID of the metro region (DMA) to which this city belongs.
2816	MetroDmaId int64 `json:"metroDmaId,omitempty,string"`
2817
2818	// Name: Name of this city.
2819	Name string `json:"name,omitempty"`
2820
2821	// RegionCode: Region code of the region to which this city belongs.
2822	RegionCode string `json:"regionCode,omitempty"`
2823
2824	// RegionDartId: DART ID of the region to which this city belongs.
2825	RegionDartId int64 `json:"regionDartId,omitempty,string"`
2826
2827	// ForceSendFields is a list of field names (e.g. "CountryCode") to
2828	// unconditionally include in API requests. By default, fields with
2829	// empty values are omitted from API requests. However, any non-pointer,
2830	// non-interface field appearing in ForceSendFields will be sent to the
2831	// server regardless of whether the field is empty or not. This may be
2832	// used to include empty fields in Patch requests.
2833	ForceSendFields []string `json:"-"`
2834
2835	// NullFields is a list of field names (e.g. "CountryCode") to include
2836	// in API requests with the JSON null value. By default, fields with
2837	// empty values are omitted from API requests. However, any field with
2838	// an empty value appearing in NullFields will be sent to the server as
2839	// null. It is an error if a field in this list has a non-empty value.
2840	// This may be used to include null fields in Patch requests.
2841	NullFields []string `json:"-"`
2842}
2843
2844func (s *City) MarshalJSON() ([]byte, error) {
2845	type NoMethod City
2846	raw := NoMethod(*s)
2847	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2848}
2849
2850// ClickTag: Creative Click Tag.
2851type ClickTag struct {
2852	// ClickThroughUrl: Parameter value for the specified click tag. This
2853	// field contains a click-through url.
2854	ClickThroughUrl *CreativeClickThroughUrl `json:"clickThroughUrl,omitempty"`
2855
2856	// EventName: Advertiser event name associated with the click tag. This
2857	// field is used by DISPLAY_IMAGE_GALLERY and HTML5_BANNER creatives.
2858	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
2859	EventName string `json:"eventName,omitempty"`
2860
2861	// Name: Parameter name for the specified click tag. For
2862	// DISPLAY_IMAGE_GALLERY creative assets, this field must match the
2863	// value of the creative asset's creativeAssetId.name field.
2864	Name string `json:"name,omitempty"`
2865
2866	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
2867	// unconditionally include in API requests. By default, fields with
2868	// empty values are omitted from API requests. However, any non-pointer,
2869	// non-interface field appearing in ForceSendFields will be sent to the
2870	// server regardless of whether the field is empty or not. This may be
2871	// used to include empty fields in Patch requests.
2872	ForceSendFields []string `json:"-"`
2873
2874	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
2875	// include in API requests with the JSON null value. By default, fields
2876	// with empty values are omitted from API requests. However, any field
2877	// with an empty value appearing in NullFields will be sent to the
2878	// server as null. It is an error if a field in this list has a
2879	// non-empty value. This may be used to include null fields in Patch
2880	// requests.
2881	NullFields []string `json:"-"`
2882}
2883
2884func (s *ClickTag) MarshalJSON() ([]byte, error) {
2885	type NoMethod ClickTag
2886	raw := NoMethod(*s)
2887	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2888}
2889
2890// ClickThroughUrl: Click-through URL
2891type ClickThroughUrl struct {
2892	// ComputedClickThroughUrl: Read-only convenience field representing the
2893	// actual URL that will be used for this click-through. The URL is
2894	// computed as follows:
2895	// - If defaultLandingPage is enabled then the campaign's default
2896	// landing page URL is assigned to this field.
2897	// - If defaultLandingPage is not enabled and a landingPageId is
2898	// specified then that landing page's URL is assigned to this field.
2899	// - If neither of the above cases apply, then the customClickThroughUrl
2900	// is assigned to this field.
2901	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
2902
2903	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
2904	// defaultLandingPage field is set to false and the landingPageId field
2905	// is left unset.
2906	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
2907
2908	// DefaultLandingPage: Whether the campaign default landing page is
2909	// used.
2910	DefaultLandingPage bool `json:"defaultLandingPage,omitempty"`
2911
2912	// LandingPageId: ID of the landing page for the click-through URL.
2913	// Applicable if the defaultLandingPage field is set to false.
2914	LandingPageId int64 `json:"landingPageId,omitempty,string"`
2915
2916	// ForceSendFields is a list of field names (e.g.
2917	// "ComputedClickThroughUrl") to unconditionally include in API
2918	// requests. By default, fields with empty values are omitted from API
2919	// requests. However, any non-pointer, non-interface field appearing in
2920	// ForceSendFields will be sent to the server regardless of whether the
2921	// field is empty or not. This may be used to include empty fields in
2922	// Patch requests.
2923	ForceSendFields []string `json:"-"`
2924
2925	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
2926	// to include in API requests with the JSON null value. By default,
2927	// fields with empty values are omitted from API requests. However, any
2928	// field with an empty value appearing in NullFields will be sent to the
2929	// server as null. It is an error if a field in this list has a
2930	// non-empty value. This may be used to include null fields in Patch
2931	// requests.
2932	NullFields []string `json:"-"`
2933}
2934
2935func (s *ClickThroughUrl) MarshalJSON() ([]byte, error) {
2936	type NoMethod ClickThroughUrl
2937	raw := NoMethod(*s)
2938	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2939}
2940
2941// ClickThroughUrlSuffixProperties: Click Through URL Suffix settings.
2942type ClickThroughUrlSuffixProperties struct {
2943	// ClickThroughUrlSuffix: Click-through URL suffix to apply to all ads
2944	// in this entity's scope. Must be less than 128 characters long.
2945	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
2946
2947	// OverrideInheritedSuffix: Whether this entity should override the
2948	// inherited click-through URL suffix with its own defined value.
2949	OverrideInheritedSuffix bool `json:"overrideInheritedSuffix,omitempty"`
2950
2951	// ForceSendFields is a list of field names (e.g.
2952	// "ClickThroughUrlSuffix") to unconditionally include in API requests.
2953	// By default, fields with empty values are omitted from API requests.
2954	// However, any non-pointer, non-interface field appearing in
2955	// ForceSendFields will be sent to the server regardless of whether the
2956	// field is empty or not. This may be used to include empty fields in
2957	// Patch requests.
2958	ForceSendFields []string `json:"-"`
2959
2960	// NullFields is a list of field names (e.g. "ClickThroughUrlSuffix") to
2961	// include in API requests with the JSON null value. By default, fields
2962	// with empty values are omitted from API requests. However, any field
2963	// with an empty value appearing in NullFields will be sent to the
2964	// server as null. It is an error if a field in this list has a
2965	// non-empty value. This may be used to include null fields in Patch
2966	// requests.
2967	NullFields []string `json:"-"`
2968}
2969
2970func (s *ClickThroughUrlSuffixProperties) MarshalJSON() ([]byte, error) {
2971	type NoMethod ClickThroughUrlSuffixProperties
2972	raw := NoMethod(*s)
2973	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2974}
2975
2976// CompanionClickThroughOverride: Companion Click-through override.
2977type CompanionClickThroughOverride struct {
2978	// ClickThroughUrl: Click-through URL of this companion click-through
2979	// override.
2980	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
2981
2982	// CreativeId: ID of the creative for this companion click-through
2983	// override.
2984	CreativeId int64 `json:"creativeId,omitempty,string"`
2985
2986	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
2987	// unconditionally include in API requests. By default, fields with
2988	// empty values are omitted from API requests. However, any non-pointer,
2989	// non-interface field appearing in ForceSendFields will be sent to the
2990	// server regardless of whether the field is empty or not. This may be
2991	// used to include empty fields in Patch requests.
2992	ForceSendFields []string `json:"-"`
2993
2994	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
2995	// include in API requests with the JSON null value. By default, fields
2996	// with empty values are omitted from API requests. However, any field
2997	// with an empty value appearing in NullFields will be sent to the
2998	// server as null. It is an error if a field in this list has a
2999	// non-empty value. This may be used to include null fields in Patch
3000	// requests.
3001	NullFields []string `json:"-"`
3002}
3003
3004func (s *CompanionClickThroughOverride) MarshalJSON() ([]byte, error) {
3005	type NoMethod CompanionClickThroughOverride
3006	raw := NoMethod(*s)
3007	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3008}
3009
3010// CompanionSetting: Companion Settings
3011type CompanionSetting struct {
3012	// CompanionsDisabled: Whether companions are disabled for this
3013	// placement.
3014	CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
3015
3016	// EnabledSizes: Whitelist of companion sizes to be served to this
3017	// placement. Set this list to null or empty to serve all companion
3018	// sizes.
3019	EnabledSizes []*Size `json:"enabledSizes,omitempty"`
3020
3021	// ImageOnly: Whether to serve only static images as companions.
3022	ImageOnly bool `json:"imageOnly,omitempty"`
3023
3024	// Kind: Identifies what kind of resource this is. Value: the fixed
3025	// string "dfareporting#companionSetting".
3026	Kind string `json:"kind,omitempty"`
3027
3028	// ForceSendFields is a list of field names (e.g. "CompanionsDisabled")
3029	// to unconditionally include in API requests. By default, fields with
3030	// empty values are omitted from API requests. However, any non-pointer,
3031	// non-interface field appearing in ForceSendFields will be sent to the
3032	// server regardless of whether the field is empty or not. This may be
3033	// used to include empty fields in Patch requests.
3034	ForceSendFields []string `json:"-"`
3035
3036	// NullFields is a list of field names (e.g. "CompanionsDisabled") to
3037	// include in API requests with the JSON null value. By default, fields
3038	// with empty values are omitted from API requests. However, any field
3039	// with an empty value appearing in NullFields will be sent to the
3040	// server as null. It is an error if a field in this list has a
3041	// non-empty value. This may be used to include null fields in Patch
3042	// requests.
3043	NullFields []string `json:"-"`
3044}
3045
3046func (s *CompanionSetting) MarshalJSON() ([]byte, error) {
3047	type NoMethod CompanionSetting
3048	raw := NoMethod(*s)
3049	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3050}
3051
3052// CompatibleFields: Represents a response to the queryCompatibleFields
3053// method.
3054type CompatibleFields struct {
3055	// CrossDimensionReachReportCompatibleFields: Contains items that are
3056	// compatible to be selected for a report of type
3057	// "CROSS_DIMENSION_REACH".
3058	CrossDimensionReachReportCompatibleFields *CrossDimensionReachReportCompatibleFields `json:"crossDimensionReachReportCompatibleFields,omitempty"`
3059
3060	// FloodlightReportCompatibleFields: Contains items that are compatible
3061	// to be selected for a report of type "FLOODLIGHT".
3062	FloodlightReportCompatibleFields *FloodlightReportCompatibleFields `json:"floodlightReportCompatibleFields,omitempty"`
3063
3064	// Kind: The kind of resource this is, in this case
3065	// dfareporting#compatibleFields.
3066	Kind string `json:"kind,omitempty"`
3067
3068	// PathToConversionReportCompatibleFields: Contains items that are
3069	// compatible to be selected for a report of type "PATH_TO_CONVERSION".
3070	PathToConversionReportCompatibleFields *PathToConversionReportCompatibleFields `json:"pathToConversionReportCompatibleFields,omitempty"`
3071
3072	// ReachReportCompatibleFields: Contains items that are compatible to be
3073	// selected for a report of type "REACH".
3074	ReachReportCompatibleFields *ReachReportCompatibleFields `json:"reachReportCompatibleFields,omitempty"`
3075
3076	// ReportCompatibleFields: Contains items that are compatible to be
3077	// selected for a report of type "STANDARD".
3078	ReportCompatibleFields *ReportCompatibleFields `json:"reportCompatibleFields,omitempty"`
3079
3080	// ServerResponse contains the HTTP response code and headers from the
3081	// server.
3082	googleapi.ServerResponse `json:"-"`
3083
3084	// ForceSendFields is a list of field names (e.g.
3085	// "CrossDimensionReachReportCompatibleFields") to unconditionally
3086	// include in API requests. By default, fields with empty values are
3087	// omitted from API requests. However, any non-pointer, non-interface
3088	// field appearing in ForceSendFields will be sent to the server
3089	// regardless of whether the field is empty or not. This may be used to
3090	// include empty fields in Patch requests.
3091	ForceSendFields []string `json:"-"`
3092
3093	// NullFields is a list of field names (e.g.
3094	// "CrossDimensionReachReportCompatibleFields") to include in API
3095	// requests with the JSON null value. By default, fields with empty
3096	// values are omitted from API requests. However, any field with an
3097	// empty value appearing in NullFields will be sent to the server as
3098	// null. It is an error if a field in this list has a non-empty value.
3099	// This may be used to include null fields in Patch requests.
3100	NullFields []string `json:"-"`
3101}
3102
3103func (s *CompatibleFields) MarshalJSON() ([]byte, error) {
3104	type NoMethod CompatibleFields
3105	raw := NoMethod(*s)
3106	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3107}
3108
3109// ConnectionType: Contains information about an internet connection
3110// type that can be targeted by ads. Clients can use the connection type
3111// to target mobile vs. broadband users.
3112type ConnectionType struct {
3113	// Id: ID of this connection type.
3114	Id int64 `json:"id,omitempty,string"`
3115
3116	// Kind: Identifies what kind of resource this is. Value: the fixed
3117	// string "dfareporting#connectionType".
3118	Kind string `json:"kind,omitempty"`
3119
3120	// Name: Name of this connection type.
3121	Name string `json:"name,omitempty"`
3122
3123	// ServerResponse contains the HTTP response code and headers from the
3124	// server.
3125	googleapi.ServerResponse `json:"-"`
3126
3127	// ForceSendFields is a list of field names (e.g. "Id") to
3128	// unconditionally include in API requests. By default, fields with
3129	// empty values are omitted from API requests. However, any non-pointer,
3130	// non-interface field appearing in ForceSendFields will be sent to the
3131	// server regardless of whether the field is empty or not. This may be
3132	// used to include empty fields in Patch requests.
3133	ForceSendFields []string `json:"-"`
3134
3135	// NullFields is a list of field names (e.g. "Id") to include in API
3136	// requests with the JSON null value. By default, fields with empty
3137	// values are omitted from API requests. However, any field with an
3138	// empty value appearing in NullFields will be sent to the server as
3139	// null. It is an error if a field in this list has a non-empty value.
3140	// This may be used to include null fields in Patch requests.
3141	NullFields []string `json:"-"`
3142}
3143
3144func (s *ConnectionType) MarshalJSON() ([]byte, error) {
3145	type NoMethod ConnectionType
3146	raw := NoMethod(*s)
3147	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3148}
3149
3150// ConnectionTypesListResponse: Connection Type List Response
3151type ConnectionTypesListResponse struct {
3152	// ConnectionTypes: Collection of connection types such as broadband and
3153	// mobile.
3154	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
3155
3156	// Kind: Identifies what kind of resource this is. Value: the fixed
3157	// string "dfareporting#connectionTypesListResponse".
3158	Kind string `json:"kind,omitempty"`
3159
3160	// ServerResponse contains the HTTP response code and headers from the
3161	// server.
3162	googleapi.ServerResponse `json:"-"`
3163
3164	// ForceSendFields is a list of field names (e.g. "ConnectionTypes") to
3165	// unconditionally include in API requests. By default, fields with
3166	// empty values are omitted from API requests. However, any non-pointer,
3167	// non-interface field appearing in ForceSendFields will be sent to the
3168	// server regardless of whether the field is empty or not. This may be
3169	// used to include empty fields in Patch requests.
3170	ForceSendFields []string `json:"-"`
3171
3172	// NullFields is a list of field names (e.g. "ConnectionTypes") to
3173	// include in API requests with the JSON null value. By default, fields
3174	// with empty values are omitted from API requests. However, any field
3175	// with an empty value appearing in NullFields will be sent to the
3176	// server as null. It is an error if a field in this list has a
3177	// non-empty value. This may be used to include null fields in Patch
3178	// requests.
3179	NullFields []string `json:"-"`
3180}
3181
3182func (s *ConnectionTypesListResponse) MarshalJSON() ([]byte, error) {
3183	type NoMethod ConnectionTypesListResponse
3184	raw := NoMethod(*s)
3185	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3186}
3187
3188// ContentCategoriesListResponse: Content Category List Response
3189type ContentCategoriesListResponse struct {
3190	// ContentCategories: Content category collection.
3191	ContentCategories []*ContentCategory `json:"contentCategories,omitempty"`
3192
3193	// Kind: Identifies what kind of resource this is. Value: the fixed
3194	// string "dfareporting#contentCategoriesListResponse".
3195	Kind string `json:"kind,omitempty"`
3196
3197	// NextPageToken: Pagination token to be used for the next list
3198	// operation.
3199	NextPageToken string `json:"nextPageToken,omitempty"`
3200
3201	// ServerResponse contains the HTTP response code and headers from the
3202	// server.
3203	googleapi.ServerResponse `json:"-"`
3204
3205	// ForceSendFields is a list of field names (e.g. "ContentCategories")
3206	// to unconditionally include in API requests. By default, fields with
3207	// empty values are omitted from API requests. However, any non-pointer,
3208	// non-interface field appearing in ForceSendFields will be sent to the
3209	// server regardless of whether the field is empty or not. This may be
3210	// used to include empty fields in Patch requests.
3211	ForceSendFields []string `json:"-"`
3212
3213	// NullFields is a list of field names (e.g. "ContentCategories") to
3214	// include in API requests with the JSON null value. By default, fields
3215	// with empty values are omitted from API requests. However, any field
3216	// with an empty value appearing in NullFields will be sent to the
3217	// server as null. It is an error if a field in this list has a
3218	// non-empty value. This may be used to include null fields in Patch
3219	// requests.
3220	NullFields []string `json:"-"`
3221}
3222
3223func (s *ContentCategoriesListResponse) MarshalJSON() ([]byte, error) {
3224	type NoMethod ContentCategoriesListResponse
3225	raw := NoMethod(*s)
3226	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3227}
3228
3229// ContentCategory: Organizes placements according to the contents of
3230// their associated webpages.
3231type ContentCategory struct {
3232	// AccountId: Account ID of this content category. This is a read-only
3233	// field that can be left blank.
3234	AccountId int64 `json:"accountId,omitempty,string"`
3235
3236	// Id: ID of this content category. This is a read-only, auto-generated
3237	// field.
3238	Id int64 `json:"id,omitempty,string"`
3239
3240	// Kind: Identifies what kind of resource this is. Value: the fixed
3241	// string "dfareporting#contentCategory".
3242	Kind string `json:"kind,omitempty"`
3243
3244	// Name: Name of this content category. This is a required field and
3245	// must be less than 256 characters long and unique among content
3246	// categories of the same account.
3247	Name string `json:"name,omitempty"`
3248
3249	// ServerResponse contains the HTTP response code and headers from the
3250	// server.
3251	googleapi.ServerResponse `json:"-"`
3252
3253	// ForceSendFields is a list of field names (e.g. "AccountId") to
3254	// unconditionally include in API requests. By default, fields with
3255	// empty values are omitted from API requests. However, any non-pointer,
3256	// non-interface field appearing in ForceSendFields will be sent to the
3257	// server regardless of whether the field is empty or not. This may be
3258	// used to include empty fields in Patch requests.
3259	ForceSendFields []string `json:"-"`
3260
3261	// NullFields is a list of field names (e.g. "AccountId") to include in
3262	// API requests with the JSON null value. By default, fields with empty
3263	// values are omitted from API requests. However, any field with an
3264	// empty value appearing in NullFields will be sent to the server as
3265	// null. It is an error if a field in this list has a non-empty value.
3266	// This may be used to include null fields in Patch requests.
3267	NullFields []string `json:"-"`
3268}
3269
3270func (s *ContentCategory) MarshalJSON() ([]byte, error) {
3271	type NoMethod ContentCategory
3272	raw := NoMethod(*s)
3273	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3274}
3275
3276// Conversion: A Conversion represents when a user successfully performs
3277// a desired action after seeing an ad.
3278type Conversion struct {
3279	// ChildDirectedTreatment: Whether the conversion was directed toward
3280	// children.
3281	ChildDirectedTreatment bool `json:"childDirectedTreatment,omitempty"`
3282
3283	// CustomVariables: Custom floodlight variables.
3284	CustomVariables []*CustomFloodlightVariable `json:"customVariables,omitempty"`
3285
3286	// EncryptedUserId: The alphanumeric encrypted user ID. When set,
3287	// encryptionInfo should also be specified. This field is mutually
3288	// exclusive with encryptedUserIdCandidates[], mobileDeviceId and gclid.
3289	// This or encryptedUserIdCandidates[] or mobileDeviceId or gclid is a
3290	// required field.
3291	EncryptedUserId string `json:"encryptedUserId,omitempty"`
3292
3293	// EncryptedUserIdCandidates: A list of the alphanumeric encrypted user
3294	// IDs. Any user ID with exposure prior to the conversion timestamp will
3295	// be used in the inserted conversion. If no such user ID is found then
3296	// the conversion will be rejected with NO_COOKIE_MATCH_FOUND error.
3297	// When set, encryptionInfo should also be specified. This field may
3298	// only be used when calling batchinsert; it is not supported by
3299	// batchupdate. This field is mutually exclusive with encryptedUserId,
3300	// mobileDeviceId and gclid. This or encryptedUserId or mobileDeviceId
3301	// or gclid is a required field.
3302	EncryptedUserIdCandidates []string `json:"encryptedUserIdCandidates,omitempty"`
3303
3304	// FloodlightActivityId: Floodlight Activity ID of this conversion. This
3305	// is a required field.
3306	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
3307
3308	// FloodlightConfigurationId: Floodlight Configuration ID of this
3309	// conversion. This is a required field.
3310	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
3311
3312	// Gclid: The Google click ID. This field is mutually exclusive with
3313	// encryptedUserId, encryptedUserIdCandidates[] and mobileDeviceId. This
3314	// or encryptedUserId or encryptedUserIdCandidates[] or mobileDeviceId
3315	// is a required field.
3316	Gclid string `json:"gclid,omitempty"`
3317
3318	// Kind: Identifies what kind of resource this is. Value: the fixed
3319	// string "dfareporting#conversion".
3320	Kind string `json:"kind,omitempty"`
3321
3322	// LimitAdTracking: Whether Limit Ad Tracking is enabled. When set to
3323	// true, the conversion will be used for reporting but not targeting.
3324	// This will prevent remarketing.
3325	LimitAdTracking bool `json:"limitAdTracking,omitempty"`
3326
3327	// MobileDeviceId: The mobile device ID. This field is mutually
3328	// exclusive with encryptedUserId, encryptedUserIdCandidates[] and
3329	// gclid. This or encryptedUserId or encryptedUserIdCandidates[] or
3330	// gclid is a required field.
3331	MobileDeviceId string `json:"mobileDeviceId,omitempty"`
3332
3333	// Ordinal: The ordinal of the conversion. Use this field to control how
3334	// conversions of the same user and day are de-duplicated. This is a
3335	// required field.
3336	Ordinal string `json:"ordinal,omitempty"`
3337
3338	// Quantity: The quantity of the conversion.
3339	Quantity int64 `json:"quantity,omitempty,string"`
3340
3341	// TimestampMicros: The timestamp of conversion, in Unix epoch micros.
3342	// This is a required field.
3343	TimestampMicros int64 `json:"timestampMicros,omitempty,string"`
3344
3345	// Value: The value of the conversion.
3346	Value float64 `json:"value,omitempty"`
3347
3348	// ForceSendFields is a list of field names (e.g.
3349	// "ChildDirectedTreatment") to unconditionally include in API requests.
3350	// By default, fields with empty values are omitted from API requests.
3351	// However, any non-pointer, non-interface field appearing in
3352	// ForceSendFields will be sent to the server regardless of whether the
3353	// field is empty or not. This may be used to include empty fields in
3354	// Patch requests.
3355	ForceSendFields []string `json:"-"`
3356
3357	// NullFields is a list of field names (e.g. "ChildDirectedTreatment")
3358	// to include in API requests with the JSON null value. By default,
3359	// fields with empty values are omitted from API requests. However, any
3360	// field with an empty value appearing in NullFields will be sent to the
3361	// server as null. It is an error if a field in this list has a
3362	// non-empty value. This may be used to include null fields in Patch
3363	// requests.
3364	NullFields []string `json:"-"`
3365}
3366
3367func (s *Conversion) MarshalJSON() ([]byte, error) {
3368	type NoMethod Conversion
3369	raw := NoMethod(*s)
3370	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3371}
3372
3373func (s *Conversion) UnmarshalJSON(data []byte) error {
3374	type NoMethod Conversion
3375	var s1 struct {
3376		Value gensupport.JSONFloat64 `json:"value"`
3377		*NoMethod
3378	}
3379	s1.NoMethod = (*NoMethod)(s)
3380	if err := json.Unmarshal(data, &s1); err != nil {
3381		return err
3382	}
3383	s.Value = float64(s1.Value)
3384	return nil
3385}
3386
3387// ConversionError: The error code and description for a conversion that
3388// failed to insert or update.
3389type ConversionError struct {
3390	// Code: The error code.
3391	//
3392	// Possible values:
3393	//   "INTERNAL"
3394	//   "INVALID_ARGUMENT"
3395	//   "NOT_FOUND"
3396	//   "PERMISSION_DENIED"
3397	Code string `json:"code,omitempty"`
3398
3399	// Kind: Identifies what kind of resource this is. Value: the fixed
3400	// string "dfareporting#conversionError".
3401	Kind string `json:"kind,omitempty"`
3402
3403	// Message: A description of the error.
3404	Message string `json:"message,omitempty"`
3405
3406	// ForceSendFields is a list of field names (e.g. "Code") to
3407	// unconditionally include in API requests. By default, fields with
3408	// empty values are omitted from API requests. However, any non-pointer,
3409	// non-interface field appearing in ForceSendFields will be sent to the
3410	// server regardless of whether the field is empty or not. This may be
3411	// used to include empty fields in Patch requests.
3412	ForceSendFields []string `json:"-"`
3413
3414	// NullFields is a list of field names (e.g. "Code") to include in API
3415	// requests with the JSON null value. By default, fields with empty
3416	// values are omitted from API requests. However, any field with an
3417	// empty value appearing in NullFields will be sent to the server as
3418	// null. It is an error if a field in this list has a non-empty value.
3419	// This may be used to include null fields in Patch requests.
3420	NullFields []string `json:"-"`
3421}
3422
3423func (s *ConversionError) MarshalJSON() ([]byte, error) {
3424	type NoMethod ConversionError
3425	raw := NoMethod(*s)
3426	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3427}
3428
3429// ConversionStatus: The original conversion that was inserted or
3430// updated and whether there were any errors.
3431type ConversionStatus struct {
3432	// Conversion: The original conversion that was inserted or updated.
3433	Conversion *Conversion `json:"conversion,omitempty"`
3434
3435	// Errors: A list of errors related to this conversion.
3436	Errors []*ConversionError `json:"errors,omitempty"`
3437
3438	// Kind: Identifies what kind of resource this is. Value: the fixed
3439	// string "dfareporting#conversionStatus".
3440	Kind string `json:"kind,omitempty"`
3441
3442	// ForceSendFields is a list of field names (e.g. "Conversion") to
3443	// unconditionally include in API requests. By default, fields with
3444	// empty values are omitted from API requests. However, any non-pointer,
3445	// non-interface field appearing in ForceSendFields will be sent to the
3446	// server regardless of whether the field is empty or not. This may be
3447	// used to include empty fields in Patch requests.
3448	ForceSendFields []string `json:"-"`
3449
3450	// NullFields is a list of field names (e.g. "Conversion") to include in
3451	// API requests with the JSON null value. By default, fields with empty
3452	// values are omitted from API requests. However, any field with an
3453	// empty value appearing in NullFields will be sent to the server as
3454	// null. It is an error if a field in this list has a non-empty value.
3455	// This may be used to include null fields in Patch requests.
3456	NullFields []string `json:"-"`
3457}
3458
3459func (s *ConversionStatus) MarshalJSON() ([]byte, error) {
3460	type NoMethod ConversionStatus
3461	raw := NoMethod(*s)
3462	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3463}
3464
3465// ConversionsBatchInsertRequest: Insert Conversions Request.
3466type ConversionsBatchInsertRequest struct {
3467	// Conversions: The set of conversions to insert.
3468	Conversions []*Conversion `json:"conversions,omitempty"`
3469
3470	// EncryptionInfo: Describes how encryptedUserId or
3471	// encryptedUserIdCandidates[] is encrypted. This is a required field if
3472	// encryptedUserId or encryptedUserIdCandidates[] is used.
3473	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3474
3475	// Kind: Identifies what kind of resource this is. Value: the fixed
3476	// string "dfareporting#conversionsBatchInsertRequest".
3477	Kind string `json:"kind,omitempty"`
3478
3479	// ForceSendFields is a list of field names (e.g. "Conversions") to
3480	// unconditionally include in API requests. By default, fields with
3481	// empty values are omitted from API requests. However, any non-pointer,
3482	// non-interface field appearing in ForceSendFields will be sent to the
3483	// server regardless of whether the field is empty or not. This may be
3484	// used to include empty fields in Patch requests.
3485	ForceSendFields []string `json:"-"`
3486
3487	// NullFields is a list of field names (e.g. "Conversions") to include
3488	// in API requests with the JSON null value. By default, fields with
3489	// empty values are omitted from API requests. However, any field with
3490	// an empty value appearing in NullFields will be sent to the server as
3491	// null. It is an error if a field in this list has a non-empty value.
3492	// This may be used to include null fields in Patch requests.
3493	NullFields []string `json:"-"`
3494}
3495
3496func (s *ConversionsBatchInsertRequest) MarshalJSON() ([]byte, error) {
3497	type NoMethod ConversionsBatchInsertRequest
3498	raw := NoMethod(*s)
3499	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3500}
3501
3502// ConversionsBatchInsertResponse: Insert Conversions Response.
3503type ConversionsBatchInsertResponse struct {
3504	// HasFailures: Indicates that some or all conversions failed to insert.
3505	HasFailures bool `json:"hasFailures,omitempty"`
3506
3507	// Kind: Identifies what kind of resource this is. Value: the fixed
3508	// string "dfareporting#conversionsBatchInsertResponse".
3509	Kind string `json:"kind,omitempty"`
3510
3511	// Status: The insert status of each conversion. Statuses are returned
3512	// in the same order that conversions are inserted.
3513	Status []*ConversionStatus `json:"status,omitempty"`
3514
3515	// ServerResponse contains the HTTP response code and headers from the
3516	// server.
3517	googleapi.ServerResponse `json:"-"`
3518
3519	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3520	// unconditionally include in API requests. By default, fields with
3521	// empty values are omitted from API requests. However, any non-pointer,
3522	// non-interface field appearing in ForceSendFields will be sent to the
3523	// server regardless of whether the field is empty or not. This may be
3524	// used to include empty fields in Patch requests.
3525	ForceSendFields []string `json:"-"`
3526
3527	// NullFields is a list of field names (e.g. "HasFailures") to include
3528	// in API requests with the JSON null value. By default, fields with
3529	// empty values are omitted from API requests. However, any field with
3530	// an empty value appearing in NullFields will be sent to the server as
3531	// null. It is an error if a field in this list has a non-empty value.
3532	// This may be used to include null fields in Patch requests.
3533	NullFields []string `json:"-"`
3534}
3535
3536func (s *ConversionsBatchInsertResponse) MarshalJSON() ([]byte, error) {
3537	type NoMethod ConversionsBatchInsertResponse
3538	raw := NoMethod(*s)
3539	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3540}
3541
3542// ConversionsBatchUpdateRequest: Update Conversions Request.
3543type ConversionsBatchUpdateRequest struct {
3544	// Conversions: The set of conversions to update.
3545	Conversions []*Conversion `json:"conversions,omitempty"`
3546
3547	// EncryptionInfo: Describes how encryptedUserId is encrypted. This is a
3548	// required field if encryptedUserId is used.
3549	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3550
3551	// Kind: Identifies what kind of resource this is. Value: the fixed
3552	// string "dfareporting#conversionsBatchUpdateRequest".
3553	Kind string `json:"kind,omitempty"`
3554
3555	// ForceSendFields is a list of field names (e.g. "Conversions") to
3556	// unconditionally include in API requests. By default, fields with
3557	// empty values are omitted from API requests. However, any non-pointer,
3558	// non-interface field appearing in ForceSendFields will be sent to the
3559	// server regardless of whether the field is empty or not. This may be
3560	// used to include empty fields in Patch requests.
3561	ForceSendFields []string `json:"-"`
3562
3563	// NullFields is a list of field names (e.g. "Conversions") to include
3564	// in API requests with the JSON null value. By default, fields with
3565	// empty values are omitted from API requests. However, any field with
3566	// an empty value appearing in NullFields will be sent to the server as
3567	// null. It is an error if a field in this list has a non-empty value.
3568	// This may be used to include null fields in Patch requests.
3569	NullFields []string `json:"-"`
3570}
3571
3572func (s *ConversionsBatchUpdateRequest) MarshalJSON() ([]byte, error) {
3573	type NoMethod ConversionsBatchUpdateRequest
3574	raw := NoMethod(*s)
3575	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3576}
3577
3578// ConversionsBatchUpdateResponse: Update Conversions Response.
3579type ConversionsBatchUpdateResponse struct {
3580	// HasFailures: Indicates that some or all conversions failed to update.
3581	HasFailures bool `json:"hasFailures,omitempty"`
3582
3583	// Kind: Identifies what kind of resource this is. Value: the fixed
3584	// string "dfareporting#conversionsBatchUpdateResponse".
3585	Kind string `json:"kind,omitempty"`
3586
3587	// Status: The update status of each conversion. Statuses are returned
3588	// in the same order that conversions are updated.
3589	Status []*ConversionStatus `json:"status,omitempty"`
3590
3591	// ServerResponse contains the HTTP response code and headers from the
3592	// server.
3593	googleapi.ServerResponse `json:"-"`
3594
3595	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3596	// unconditionally include in API requests. By default, fields with
3597	// empty values are omitted from API requests. However, any non-pointer,
3598	// non-interface field appearing in ForceSendFields will be sent to the
3599	// server regardless of whether the field is empty or not. This may be
3600	// used to include empty fields in Patch requests.
3601	ForceSendFields []string `json:"-"`
3602
3603	// NullFields is a list of field names (e.g. "HasFailures") to include
3604	// in API requests with the JSON null value. By default, fields with
3605	// empty values are omitted from API requests. However, any field with
3606	// an empty value appearing in NullFields will be sent to the server as
3607	// null. It is an error if a field in this list has a non-empty value.
3608	// This may be used to include null fields in Patch requests.
3609	NullFields []string `json:"-"`
3610}
3611
3612func (s *ConversionsBatchUpdateResponse) MarshalJSON() ([]byte, error) {
3613	type NoMethod ConversionsBatchUpdateResponse
3614	raw := NoMethod(*s)
3615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3616}
3617
3618// CountriesListResponse: Country List Response
3619type CountriesListResponse struct {
3620	// Countries: Country collection.
3621	Countries []*Country `json:"countries,omitempty"`
3622
3623	// Kind: Identifies what kind of resource this is. Value: the fixed
3624	// string "dfareporting#countriesListResponse".
3625	Kind string `json:"kind,omitempty"`
3626
3627	// ServerResponse contains the HTTP response code and headers from the
3628	// server.
3629	googleapi.ServerResponse `json:"-"`
3630
3631	// ForceSendFields is a list of field names (e.g. "Countries") to
3632	// unconditionally include in API requests. By default, fields with
3633	// empty values are omitted from API requests. However, any non-pointer,
3634	// non-interface field appearing in ForceSendFields will be sent to the
3635	// server regardless of whether the field is empty or not. This may be
3636	// used to include empty fields in Patch requests.
3637	ForceSendFields []string `json:"-"`
3638
3639	// NullFields is a list of field names (e.g. "Countries") to include in
3640	// API requests with the JSON null value. By default, fields with empty
3641	// values are omitted from API requests. However, any field with an
3642	// empty value appearing in NullFields will be sent to the server as
3643	// null. It is an error if a field in this list has a non-empty value.
3644	// This may be used to include null fields in Patch requests.
3645	NullFields []string `json:"-"`
3646}
3647
3648func (s *CountriesListResponse) MarshalJSON() ([]byte, error) {
3649	type NoMethod CountriesListResponse
3650	raw := NoMethod(*s)
3651	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3652}
3653
3654// Country: Contains information about a country that can be targeted by
3655// ads.
3656type Country struct {
3657	// CountryCode: Country code.
3658	CountryCode string `json:"countryCode,omitempty"`
3659
3660	// DartId: DART ID of this country. This is the ID used for targeting
3661	// and generating reports.
3662	DartId int64 `json:"dartId,omitempty,string"`
3663
3664	// Kind: Identifies what kind of resource this is. Value: the fixed
3665	// string "dfareporting#country".
3666	Kind string `json:"kind,omitempty"`
3667
3668	// Name: Name of this country.
3669	Name string `json:"name,omitempty"`
3670
3671	// SslEnabled: Whether ad serving supports secure servers in this
3672	// country.
3673	SslEnabled bool `json:"sslEnabled,omitempty"`
3674
3675	// ServerResponse contains the HTTP response code and headers from the
3676	// server.
3677	googleapi.ServerResponse `json:"-"`
3678
3679	// ForceSendFields is a list of field names (e.g. "CountryCode") to
3680	// unconditionally include in API requests. By default, fields with
3681	// empty values are omitted from API requests. However, any non-pointer,
3682	// non-interface field appearing in ForceSendFields will be sent to the
3683	// server regardless of whether the field is empty or not. This may be
3684	// used to include empty fields in Patch requests.
3685	ForceSendFields []string `json:"-"`
3686
3687	// NullFields is a list of field names (e.g. "CountryCode") to include
3688	// in API requests with the JSON null value. By default, fields with
3689	// empty values are omitted from API requests. However, any field with
3690	// an empty value appearing in NullFields will be sent to the server as
3691	// null. It is an error if a field in this list has a non-empty value.
3692	// This may be used to include null fields in Patch requests.
3693	NullFields []string `json:"-"`
3694}
3695
3696func (s *Country) MarshalJSON() ([]byte, error) {
3697	type NoMethod Country
3698	raw := NoMethod(*s)
3699	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3700}
3701
3702// Creative: Contains properties of a Creative.
3703type Creative struct {
3704	// AccountId: Account ID of this creative. This field, if left unset,
3705	// will be auto-generated for both insert and update operations.
3706	// Applicable to all creative types.
3707	AccountId int64 `json:"accountId,omitempty,string"`
3708
3709	// Active: Whether the creative is active. Applicable to all creative
3710	// types.
3711	Active bool `json:"active,omitempty"`
3712
3713	// AdParameters: Ad parameters user for VPAID creative. This is a
3714	// read-only field. Applicable to the following creative types: all
3715	// VPAID.
3716	AdParameters string `json:"adParameters,omitempty"`
3717
3718	// AdTagKeys: Keywords for a Rich Media creative. Keywords let you
3719	// customize the creative settings of a Rich Media ad running on your
3720	// site without having to contact the advertiser. You can use keywords
3721	// to dynamically change the look or functionality of a creative.
3722	// Applicable to the following creative types: all RICH_MEDIA, and all
3723	// VPAID.
3724	AdTagKeys []string `json:"adTagKeys,omitempty"`
3725
3726	// AdvertiserId: Advertiser ID of this creative. This is a required
3727	// field. Applicable to all creative types.
3728	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3729
3730	// AllowScriptAccess: Whether script access is allowed for this
3731	// creative. This is a read-only and deprecated field which will
3732	// automatically be set to true on update. Applicable to the following
3733	// creative types: FLASH_INPAGE.
3734	AllowScriptAccess bool `json:"allowScriptAccess,omitempty"`
3735
3736	// Archived: Whether the creative is archived. Applicable to all
3737	// creative types.
3738	Archived bool `json:"archived,omitempty"`
3739
3740	// ArtworkType: Type of artwork used for the creative. This is a
3741	// read-only field. Applicable to the following creative types: all
3742	// RICH_MEDIA, and all VPAID.
3743	//
3744	// Possible values:
3745	//   "ARTWORK_TYPE_FLASH"
3746	//   "ARTWORK_TYPE_HTML5"
3747	//   "ARTWORK_TYPE_IMAGE"
3748	//   "ARTWORK_TYPE_MIXED"
3749	ArtworkType string `json:"artworkType,omitempty"`
3750
3751	// AuthoringSource: Source application where creative was authored.
3752	// Presently, only DBM authored creatives will have this field set.
3753	// Applicable to all creative types.
3754	//
3755	// Possible values:
3756	//   "CREATIVE_AUTHORING_SOURCE_DBM"
3757	//   "CREATIVE_AUTHORING_SOURCE_DCM"
3758	//   "CREATIVE_AUTHORING_SOURCE_STUDIO"
3759	AuthoringSource string `json:"authoringSource,omitempty"`
3760
3761	// AuthoringTool: Authoring tool for HTML5 banner creatives. This is a
3762	// read-only field. Applicable to the following creative types:
3763	// HTML5_BANNER.
3764	//
3765	// Possible values:
3766	//   "NINJA"
3767	//   "SWIFFY"
3768	AuthoringTool string `json:"authoringTool,omitempty"`
3769
3770	// AutoAdvanceImages: Whether images are automatically advanced for
3771	// image gallery creatives. Applicable to the following creative types:
3772	// DISPLAY_IMAGE_GALLERY.
3773	AutoAdvanceImages bool `json:"autoAdvanceImages,omitempty"`
3774
3775	// BackgroundColor: The 6-character HTML color code, beginning with #,
3776	// for the background of the window area where the Flash file is
3777	// displayed. Default is white. Applicable to the following creative
3778	// types: FLASH_INPAGE.
3779	BackgroundColor string `json:"backgroundColor,omitempty"`
3780
3781	// BackupImageClickThroughUrl: Click-through URL for backup image.
3782	// Applicable to ENHANCED_BANNER when the primary asset type is not
3783	// HTML_IMAGE.
3784	BackupImageClickThroughUrl *CreativeClickThroughUrl `json:"backupImageClickThroughUrl,omitempty"`
3785
3786	// BackupImageFeatures: List of feature dependencies that will cause a
3787	// backup image to be served if the browser that serves the ad does not
3788	// support them. Feature dependencies are features that a browser must
3789	// be able to support in order to render your HTML5 creative asset
3790	// correctly. This field is initially auto-generated to contain all
3791	// features detected by Campaign Manager for all the assets of this
3792	// creative and can then be modified by the client. To reset this field,
3793	// copy over all the creativeAssets' detected features. Applicable to
3794	// the following creative types: HTML5_BANNER. Applicable to DISPLAY
3795	// when the primary asset type is not HTML_IMAGE.
3796	//
3797	// Possible values:
3798	//   "APPLICATION_CACHE"
3799	//   "AUDIO"
3800	//   "CANVAS"
3801	//   "CANVAS_TEXT"
3802	//   "CSS_ANIMATIONS"
3803	//   "CSS_BACKGROUND_SIZE"
3804	//   "CSS_BORDER_IMAGE"
3805	//   "CSS_BORDER_RADIUS"
3806	//   "CSS_BOX_SHADOW"
3807	//   "CSS_COLUMNS"
3808	//   "CSS_FLEX_BOX"
3809	//   "CSS_FONT_FACE"
3810	//   "CSS_GENERATED_CONTENT"
3811	//   "CSS_GRADIENTS"
3812	//   "CSS_HSLA"
3813	//   "CSS_MULTIPLE_BGS"
3814	//   "CSS_OPACITY"
3815	//   "CSS_REFLECTIONS"
3816	//   "CSS_RGBA"
3817	//   "CSS_TEXT_SHADOW"
3818	//   "CSS_TRANSFORMS"
3819	//   "CSS_TRANSFORMS3D"
3820	//   "CSS_TRANSITIONS"
3821	//   "DRAG_AND_DROP"
3822	//   "GEO_LOCATION"
3823	//   "HASH_CHANGE"
3824	//   "HISTORY"
3825	//   "INDEXED_DB"
3826	//   "INLINE_SVG"
3827	//   "INPUT_ATTR_AUTOCOMPLETE"
3828	//   "INPUT_ATTR_AUTOFOCUS"
3829	//   "INPUT_ATTR_LIST"
3830	//   "INPUT_ATTR_MAX"
3831	//   "INPUT_ATTR_MIN"
3832	//   "INPUT_ATTR_MULTIPLE"
3833	//   "INPUT_ATTR_PATTERN"
3834	//   "INPUT_ATTR_PLACEHOLDER"
3835	//   "INPUT_ATTR_REQUIRED"
3836	//   "INPUT_ATTR_STEP"
3837	//   "INPUT_TYPE_COLOR"
3838	//   "INPUT_TYPE_DATE"
3839	//   "INPUT_TYPE_DATETIME"
3840	//   "INPUT_TYPE_DATETIME_LOCAL"
3841	//   "INPUT_TYPE_EMAIL"
3842	//   "INPUT_TYPE_MONTH"
3843	//   "INPUT_TYPE_NUMBER"
3844	//   "INPUT_TYPE_RANGE"
3845	//   "INPUT_TYPE_SEARCH"
3846	//   "INPUT_TYPE_TEL"
3847	//   "INPUT_TYPE_TIME"
3848	//   "INPUT_TYPE_URL"
3849	//   "INPUT_TYPE_WEEK"
3850	//   "LOCAL_STORAGE"
3851	//   "POST_MESSAGE"
3852	//   "SESSION_STORAGE"
3853	//   "SMIL"
3854	//   "SVG_CLIP_PATHS"
3855	//   "SVG_FE_IMAGE"
3856	//   "SVG_FILTERS"
3857	//   "SVG_HREF"
3858	//   "TOUCH"
3859	//   "VIDEO"
3860	//   "WEBGL"
3861	//   "WEB_SOCKETS"
3862	//   "WEB_SQL_DATABASE"
3863	//   "WEB_WORKERS"
3864	BackupImageFeatures []string `json:"backupImageFeatures,omitempty"`
3865
3866	// BackupImageReportingLabel: Reporting label used for HTML5 banner
3867	// backup image. Applicable to the following creative types: DISPLAY
3868	// when the primary asset type is not HTML_IMAGE.
3869	BackupImageReportingLabel string `json:"backupImageReportingLabel,omitempty"`
3870
3871	// BackupImageTargetWindow: Target window for backup image. Applicable
3872	// to the following creative types: FLASH_INPAGE and HTML5_BANNER.
3873	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
3874	BackupImageTargetWindow *TargetWindow `json:"backupImageTargetWindow,omitempty"`
3875
3876	// ClickTags: Click tags of the creative. For DISPLAY, FLASH_INPAGE, and
3877	// HTML5_BANNER creatives, this is a subset of detected click tags for
3878	// the assets associated with this creative. After creating a flash
3879	// asset, detected click tags will be returned in the
3880	// creativeAssetMetadata. When inserting the creative, populate the
3881	// creative clickTags field using the creativeAssetMetadata.clickTags
3882	// field. For DISPLAY_IMAGE_GALLERY creatives, there should be exactly
3883	// one entry in this list for each image creative asset. A click tag is
3884	// matched with a corresponding creative asset by matching the
3885	// clickTag.name field with the creativeAsset.assetIdentifier.name
3886	// field. Applicable to the following creative types:
3887	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER. Applicable to
3888	// DISPLAY when the primary asset type is not HTML_IMAGE.
3889	ClickTags []*ClickTag `json:"clickTags,omitempty"`
3890
3891	// CommercialId: Industry standard ID assigned to creative for reach and
3892	// frequency. Applicable to INSTREAM_VIDEO_REDIRECT creatives.
3893	CommercialId string `json:"commercialId,omitempty"`
3894
3895	// CompanionCreatives: List of companion creatives assigned to an
3896	// in-Stream video creative. Acceptable values include IDs of existing
3897	// flash and image creatives. Applicable to the following creative
3898	// types: all VPAID and all INSTREAM_VIDEO with dynamicAssetSelection
3899	// set to false.
3900	CompanionCreatives googleapi.Int64s `json:"companionCreatives,omitempty"`
3901
3902	// Compatibility: Compatibilities associated with this creative. This is
3903	// a read-only field. DISPLAY and DISPLAY_INTERSTITIAL refer to
3904	// rendering either on desktop or on mobile devices or in mobile apps
3905	// for regular or interstitial ads, respectively. APP and
3906	// APP_INTERSTITIAL are for rendering in mobile apps. Only pre-existing
3907	// creatives may have these compatibilities since new creatives will
3908	// either be assigned DISPLAY or DISPLAY_INTERSTITIAL instead.
3909	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
3910	// with the VAST standard. Applicable to all creative types.
3911	//
3912	// Acceptable values are:
3913	// - "APP"
3914	// - "APP_INTERSTITIAL"
3915	// - "IN_STREAM_VIDEO"
3916	// - "DISPLAY"
3917	// - "DISPLAY_INTERSTITIAL"
3918	//
3919	// Possible values:
3920	//   "APP"
3921	//   "APP_INTERSTITIAL"
3922	//   "DISPLAY"
3923	//   "DISPLAY_INTERSTITIAL"
3924	//   "IN_STREAM_AUDIO"
3925	//   "IN_STREAM_VIDEO"
3926	Compatibility []string `json:"compatibility,omitempty"`
3927
3928	// ConvertFlashToHtml5: Whether Flash assets associated with the
3929	// creative need to be automatically converted to HTML5. This flag is
3930	// enabled by default and users can choose to disable it if they don't
3931	// want the system to generate and use HTML5 asset for this creative.
3932	// Applicable to the following creative type: FLASH_INPAGE. Applicable
3933	// to DISPLAY when the primary asset type is not HTML_IMAGE.
3934	ConvertFlashToHtml5 bool `json:"convertFlashToHtml5,omitempty"`
3935
3936	// CounterCustomEvents: List of counter events configured for the
3937	// creative. For DISPLAY_IMAGE_GALLERY creatives, these are read-only
3938	// and auto-generated from clickTags. Applicable to the following
3939	// creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
3940	CounterCustomEvents []*CreativeCustomEvent `json:"counterCustomEvents,omitempty"`
3941
3942	// CreativeAssetSelection: Required if dynamicAssetSelection is true.
3943	CreativeAssetSelection *CreativeAssetSelection `json:"creativeAssetSelection,omitempty"`
3944
3945	// CreativeAssets: Assets associated with a creative. Applicable to all
3946	// but the following creative types: INTERNAL_REDIRECT,
3947	// INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT
3948	CreativeAssets []*CreativeAsset `json:"creativeAssets,omitempty"`
3949
3950	// CreativeFieldAssignments: Creative field assignments for this
3951	// creative. Applicable to all creative types.
3952	CreativeFieldAssignments []*CreativeFieldAssignment `json:"creativeFieldAssignments,omitempty"`
3953
3954	// CustomKeyValues: Custom key-values for a Rich Media creative.
3955	// Key-values let you customize the creative settings of a Rich Media ad
3956	// running on your site without having to contact the advertiser. You
3957	// can use key-values to dynamically change the look or functionality of
3958	// a creative. Applicable to the following creative types: all
3959	// RICH_MEDIA, and all VPAID.
3960	CustomKeyValues []string `json:"customKeyValues,omitempty"`
3961
3962	// DynamicAssetSelection: Set this to true to enable the use of rules to
3963	// target individual assets in this creative. When set to true
3964	// creativeAssetSelection must be set. This also controls asset-level
3965	// companions. When this is true, companion creatives should be assigned
3966	// to creative assets. Learn more. Applicable to INSTREAM_VIDEO
3967	// creatives.
3968	DynamicAssetSelection bool `json:"dynamicAssetSelection,omitempty"`
3969
3970	// ExitCustomEvents: List of exit events configured for the creative.
3971	// For DISPLAY and DISPLAY_IMAGE_GALLERY creatives, these are read-only
3972	// and auto-generated from clickTags, For DISPLAY, an event is also
3973	// created from the backupImageReportingLabel. Applicable to the
3974	// following creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and
3975	// all VPAID. Applicable to DISPLAY when the primary asset type is not
3976	// HTML_IMAGE.
3977	ExitCustomEvents []*CreativeCustomEvent `json:"exitCustomEvents,omitempty"`
3978
3979	// FsCommand: OpenWindow FSCommand of this creative. This lets the SWF
3980	// file communicate with either Flash Player or the program hosting
3981	// Flash Player, such as a web browser. This is only triggered if
3982	// allowScriptAccess field is true. Applicable to the following creative
3983	// types: FLASH_INPAGE.
3984	FsCommand *FsCommand `json:"fsCommand,omitempty"`
3985
3986	// HtmlCode: HTML code for the creative. This is a required field when
3987	// applicable. This field is ignored if htmlCodeLocked is true.
3988	// Applicable to the following creative types: all CUSTOM, FLASH_INPAGE,
3989	// and HTML5_BANNER, and all RICH_MEDIA.
3990	HtmlCode string `json:"htmlCode,omitempty"`
3991
3992	// HtmlCodeLocked: Whether HTML code is generated by Campaign Manager or
3993	// manually entered. Set to true to ignore changes to htmlCode.
3994	// Applicable to the following creative types: FLASH_INPAGE and
3995	// HTML5_BANNER.
3996	HtmlCodeLocked bool `json:"htmlCodeLocked,omitempty"`
3997
3998	// Id: ID of this creative. This is a read-only, auto-generated field.
3999	// Applicable to all creative types.
4000	Id int64 `json:"id,omitempty,string"`
4001
4002	// IdDimensionValue: Dimension value for the ID of this creative. This
4003	// is a read-only field. Applicable to all creative types.
4004	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4005
4006	// Kind: Identifies what kind of resource this is. Value: the fixed
4007	// string "dfareporting#creative".
4008	Kind string `json:"kind,omitempty"`
4009
4010	// LastModifiedInfo: Creative last modification information. This is a
4011	// read-only field. Applicable to all creative types.
4012	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
4013
4014	// LatestTraffickedCreativeId: Latest Studio trafficked creative ID
4015	// associated with rich media and VPAID creatives. This is a read-only
4016	// field. Applicable to the following creative types: all RICH_MEDIA,
4017	// and all VPAID.
4018	LatestTraffickedCreativeId int64 `json:"latestTraffickedCreativeId,omitempty,string"`
4019
4020	// Name: Name of the creative. This is a required field and must be less
4021	// than 256 characters long. Applicable to all creative types.
4022	Name string `json:"name,omitempty"`
4023
4024	// OverrideCss: Override CSS value for rich media creatives. Applicable
4025	// to the following creative types: all RICH_MEDIA.
4026	OverrideCss string `json:"overrideCss,omitempty"`
4027
4028	// PoliteLoadAssetId: The asset ID of the polite load image asset.
4029	// Applicable to the creative type: DISPLAY.
4030	PoliteLoadAssetId int64 `json:"politeLoadAssetId,omitempty,string"`
4031
4032	// ProgressOffset: Amount of time to play the video before counting a
4033	// view. Applicable to the following creative types: all INSTREAM_VIDEO.
4034	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
4035
4036	// RedirectUrl: URL of hosted image or hosted video or another ad tag.
4037	// For INSTREAM_VIDEO_REDIRECT creatives this is the in-stream video
4038	// redirect URL. The standard for a VAST (Video Ad Serving Template) ad
4039	// response allows for a redirect link to another VAST 2.0 or 3.0 call.
4040	// This is a required field when applicable. Applicable to the following
4041	// creative types: DISPLAY_REDIRECT, INTERNAL_REDIRECT,
4042	// INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO_REDIRECT
4043	RedirectUrl string `json:"redirectUrl,omitempty"`
4044
4045	// RenderingId: ID of current rendering version. This is a read-only
4046	// field. Applicable to all creative types.
4047	RenderingId int64 `json:"renderingId,omitempty,string"`
4048
4049	// RenderingIdDimensionValue: Dimension value for the rendering ID of
4050	// this creative. This is a read-only field. Applicable to all creative
4051	// types.
4052	RenderingIdDimensionValue *DimensionValue `json:"renderingIdDimensionValue,omitempty"`
4053
4054	// RequiredFlashPluginVersion: The minimum required Flash plugin version
4055	// for this creative. For example, 11.2.202.235. This is a read-only
4056	// field. Applicable to the following creative types: all RICH_MEDIA,
4057	// and all VPAID.
4058	RequiredFlashPluginVersion string `json:"requiredFlashPluginVersion,omitempty"`
4059
4060	// RequiredFlashVersion: The internal Flash version for this creative as
4061	// calculated by Studio. This is a read-only field. Applicable to the
4062	// following creative types: FLASH_INPAGE all RICH_MEDIA, and all VPAID.
4063	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
4064	RequiredFlashVersion int64 `json:"requiredFlashVersion,omitempty"`
4065
4066	// Size: Size associated with this creative. When inserting or updating
4067	// a creative either the size ID field or size width and height fields
4068	// can be used. This is a required field when applicable; however for
4069	// IMAGE, FLASH_INPAGE creatives, and for DISPLAY creatives with a
4070	// primary asset of type HTML_IMAGE, if left blank, this field will be
4071	// automatically set using the actual size of the associated image
4072	// assets. Applicable to the following creative types: DISPLAY,
4073	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all
4074	// RICH_MEDIA.
4075	Size *Size `json:"size,omitempty"`
4076
4077	// SkipOffset: Amount of time to play the video before the skip button
4078	// appears. Applicable to the following creative types: all
4079	// INSTREAM_VIDEO.
4080	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
4081
4082	// Skippable: Whether the user can choose to skip the creative.
4083	// Applicable to the following creative types: all INSTREAM_VIDEO and
4084	// all VPAID.
4085	Skippable bool `json:"skippable,omitempty"`
4086
4087	// SslCompliant: Whether the creative is SSL-compliant. This is a
4088	// read-only field. Applicable to all creative types.
4089	SslCompliant bool `json:"sslCompliant,omitempty"`
4090
4091	// SslOverride: Whether creative should be treated as SSL compliant even
4092	// if the system scan shows it's not. Applicable to all creative types.
4093	SslOverride bool `json:"sslOverride,omitempty"`
4094
4095	// StudioAdvertiserId: Studio advertiser ID associated with rich media
4096	// and VPAID creatives. This is a read-only field. Applicable to the
4097	// following creative types: all RICH_MEDIA, and all VPAID.
4098	StudioAdvertiserId int64 `json:"studioAdvertiserId,omitempty,string"`
4099
4100	// StudioCreativeId: Studio creative ID associated with rich media and
4101	// VPAID creatives. This is a read-only field. Applicable to the
4102	// following creative types: all RICH_MEDIA, and all VPAID.
4103	StudioCreativeId int64 `json:"studioCreativeId,omitempty,string"`
4104
4105	// StudioTraffickedCreativeId: Studio trafficked creative ID associated
4106	// with rich media and VPAID creatives. This is a read-only field.
4107	// Applicable to the following creative types: all RICH_MEDIA, and all
4108	// VPAID.
4109	StudioTraffickedCreativeId int64 `json:"studioTraffickedCreativeId,omitempty,string"`
4110
4111	// SubaccountId: Subaccount ID of this creative. This field, if left
4112	// unset, will be auto-generated for both insert and update operations.
4113	// Applicable to all creative types.
4114	SubaccountId int64 `json:"subaccountId,omitempty,string"`
4115
4116	// ThirdPartyBackupImageImpressionsUrl: Third-party URL used to record
4117	// backup image impressions. Applicable to the following creative types:
4118	// all RICH_MEDIA.
4119	ThirdPartyBackupImageImpressionsUrl string `json:"thirdPartyBackupImageImpressionsUrl,omitempty"`
4120
4121	// ThirdPartyRichMediaImpressionsUrl: Third-party URL used to record
4122	// rich media impressions. Applicable to the following creative types:
4123	// all RICH_MEDIA.
4124	ThirdPartyRichMediaImpressionsUrl string `json:"thirdPartyRichMediaImpressionsUrl,omitempty"`
4125
4126	// ThirdPartyUrls: Third-party URLs for tracking in-stream video
4127	// creative events. Applicable to the following creative types: all
4128	// INSTREAM_VIDEO and all VPAID.
4129	ThirdPartyUrls []*ThirdPartyTrackingUrl `json:"thirdPartyUrls,omitempty"`
4130
4131	// TimerCustomEvents: List of timer events configured for the creative.
4132	// For DISPLAY_IMAGE_GALLERY creatives, these are read-only and
4133	// auto-generated from clickTags. Applicable to the following creative
4134	// types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
4135	// Applicable to DISPLAY when the primary asset is not HTML_IMAGE.
4136	TimerCustomEvents []*CreativeCustomEvent `json:"timerCustomEvents,omitempty"`
4137
4138	// TotalFileSize: Combined size of all creative assets. This is a
4139	// read-only field. Applicable to the following creative types: all
4140	// RICH_MEDIA, and all VPAID.
4141	TotalFileSize int64 `json:"totalFileSize,omitempty,string"`
4142
4143	// Type: Type of this creative. This is a required field. Applicable to
4144	// all creative types.
4145	//
4146	// Note: FLASH_INPAGE, HTML5_BANNER, and IMAGE are only used for
4147	// existing creatives. New creatives should use DISPLAY as a replacement
4148	// for these types.
4149	//
4150	// Possible values:
4151	//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
4152	//   "CUSTOM_DISPLAY"
4153	//   "CUSTOM_DISPLAY_INTERSTITIAL"
4154	//   "DISPLAY"
4155	//   "DISPLAY_IMAGE_GALLERY"
4156	//   "DISPLAY_REDIRECT"
4157	//   "FLASH_INPAGE"
4158	//   "HTML5_BANNER"
4159	//   "IMAGE"
4160	//   "INSTREAM_AUDIO"
4161	//   "INSTREAM_VIDEO"
4162	//   "INSTREAM_VIDEO_REDIRECT"
4163	//   "INTERNAL_REDIRECT"
4164	//   "INTERSTITIAL_INTERNAL_REDIRECT"
4165	//   "RICH_MEDIA_DISPLAY_BANNER"
4166	//   "RICH_MEDIA_DISPLAY_EXPANDING"
4167	//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
4168	//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
4169	//   "RICH_MEDIA_IM_EXPAND"
4170	//   "RICH_MEDIA_INPAGE_FLOATING"
4171	//   "RICH_MEDIA_MOBILE_IN_APP"
4172	//   "RICH_MEDIA_PEEL_DOWN"
4173	//   "TRACKING_TEXT"
4174	//   "VPAID_LINEAR_VIDEO"
4175	//   "VPAID_NON_LINEAR_VIDEO"
4176	Type string `json:"type,omitempty"`
4177
4178	// UniversalAdId: A Universal Ad ID as per the VAST 4.0 spec. Applicable
4179	// to the following creative types: INSTREAM_VIDEO and VPAID.
4180	UniversalAdId *UniversalAdId `json:"universalAdId,omitempty"`
4181
4182	// Version: The version number helps you keep track of multiple versions
4183	// of your creative in your reports. The version number will always be
4184	// auto-generated during insert operations to start at 1. For tracking
4185	// creatives the version cannot be incremented and will always remain at
4186	// 1. For all other creative types the version can be incremented only
4187	// by 1 during update operations. In addition, the version will be
4188	// automatically incremented by 1 when undergoing Rich Media creative
4189	// merging. Applicable to all creative types.
4190	Version int64 `json:"version,omitempty"`
4191
4192	// VideoDescription: Description of the video ad. Applicable to the
4193	// following creative types: all INSTREAM_VIDEO and all VPAID.
4194	VideoDescription string `json:"videoDescription,omitempty"`
4195
4196	// VideoDuration: Creative video duration in seconds. This is a
4197	// read-only field. Applicable to the following creative types:
4198	// INSTREAM_VIDEO, all RICH_MEDIA, and all VPAID.
4199	VideoDuration float64 `json:"videoDuration,omitempty"`
4200
4201	// ServerResponse contains the HTTP response code and headers from the
4202	// server.
4203	googleapi.ServerResponse `json:"-"`
4204
4205	// ForceSendFields is a list of field names (e.g. "AccountId") to
4206	// unconditionally include in API requests. By default, fields with
4207	// empty values are omitted from API requests. However, any non-pointer,
4208	// non-interface field appearing in ForceSendFields will be sent to the
4209	// server regardless of whether the field is empty or not. This may be
4210	// used to include empty fields in Patch requests.
4211	ForceSendFields []string `json:"-"`
4212
4213	// NullFields is a list of field names (e.g. "AccountId") to include in
4214	// API requests with the JSON null value. By default, fields with empty
4215	// values are omitted from API requests. However, any field with an
4216	// empty value appearing in NullFields will be sent to the server as
4217	// null. It is an error if a field in this list has a non-empty value.
4218	// This may be used to include null fields in Patch requests.
4219	NullFields []string `json:"-"`
4220}
4221
4222func (s *Creative) MarshalJSON() ([]byte, error) {
4223	type NoMethod Creative
4224	raw := NoMethod(*s)
4225	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4226}
4227
4228func (s *Creative) UnmarshalJSON(data []byte) error {
4229	type NoMethod Creative
4230	var s1 struct {
4231		VideoDuration gensupport.JSONFloat64 `json:"videoDuration"`
4232		*NoMethod
4233	}
4234	s1.NoMethod = (*NoMethod)(s)
4235	if err := json.Unmarshal(data, &s1); err != nil {
4236		return err
4237	}
4238	s.VideoDuration = float64(s1.VideoDuration)
4239	return nil
4240}
4241
4242// CreativeAsset: Creative Asset.
4243type CreativeAsset struct {
4244	// ActionScript3: Whether ActionScript3 is enabled for the flash asset.
4245	// This is a read-only field. Applicable to the following creative type:
4246	// FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is
4247	// not HTML_IMAGE.
4248	ActionScript3 bool `json:"actionScript3,omitempty"`
4249
4250	// Active: Whether the video asset is active. This is a read-only field
4251	// for VPAID_NON_LINEAR_VIDEO assets. Applicable to the following
4252	// creative types: INSTREAM_VIDEO and all VPAID.
4253	Active bool `json:"active,omitempty"`
4254
4255	// Alignment: Possible alignments for an asset. This is a read-only
4256	// field. Applicable to the following creative types:
4257	// RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL.
4258	//
4259	// Possible values:
4260	//   "ALIGNMENT_BOTTOM"
4261	//   "ALIGNMENT_LEFT"
4262	//   "ALIGNMENT_RIGHT"
4263	//   "ALIGNMENT_TOP"
4264	Alignment string `json:"alignment,omitempty"`
4265
4266	// ArtworkType: Artwork type of rich media creative. This is a read-only
4267	// field. Applicable to the following creative types: all RICH_MEDIA.
4268	//
4269	// Possible values:
4270	//   "ARTWORK_TYPE_FLASH"
4271	//   "ARTWORK_TYPE_HTML5"
4272	//   "ARTWORK_TYPE_IMAGE"
4273	//   "ARTWORK_TYPE_MIXED"
4274	ArtworkType string `json:"artworkType,omitempty"`
4275
4276	// AssetIdentifier: Identifier of this asset. This is the same
4277	// identifier returned during creative asset insert operation. This is a
4278	// required field. Applicable to all but the following creative types:
4279	// all REDIRECT and TRACKING_TEXT.
4280	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4281
4282	// BackupImageExit: Exit event configured for the backup image.
4283	// Applicable to the following creative types: all RICH_MEDIA.
4284	BackupImageExit *CreativeCustomEvent `json:"backupImageExit,omitempty"`
4285
4286	// BitRate: Detected bit-rate for video asset. This is a read-only
4287	// field. Applicable to the following creative types: INSTREAM_VIDEO and
4288	// all VPAID.
4289	BitRate int64 `json:"bitRate,omitempty"`
4290
4291	// ChildAssetType: Rich media child asset type. This is a read-only
4292	// field. Applicable to the following creative types: all VPAID.
4293	//
4294	// Possible values:
4295	//   "CHILD_ASSET_TYPE_DATA"
4296	//   "CHILD_ASSET_TYPE_FLASH"
4297	//   "CHILD_ASSET_TYPE_IMAGE"
4298	//   "CHILD_ASSET_TYPE_VIDEO"
4299	ChildAssetType string `json:"childAssetType,omitempty"`
4300
4301	// CollapsedSize: Size of an asset when collapsed. This is a read-only
4302	// field. Applicable to the following creative types: all RICH_MEDIA and
4303	// all VPAID. Additionally, applicable to assets whose displayType is
4304	// ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN.
4305	CollapsedSize *Size `json:"collapsedSize,omitempty"`
4306
4307	// CompanionCreativeIds: List of companion creatives assigned to an
4308	// in-stream video creative asset. Acceptable values include IDs of
4309	// existing flash and image creatives. Applicable to INSTREAM_VIDEO
4310	// creative type with dynamicAssetSelection set to true.
4311	CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"`
4312
4313	// CustomStartTimeValue: Custom start time in seconds for making the
4314	// asset visible. Applicable to the following creative types: all
4315	// RICH_MEDIA. Value must be greater than or equal to 0.
4316	CustomStartTimeValue int64 `json:"customStartTimeValue,omitempty"`
4317
4318	// DetectedFeatures: List of feature dependencies for the creative asset
4319	// that are detected by Campaign Manager. Feature dependencies are
4320	// features that a browser must be able to support in order to render
4321	// your HTML5 creative correctly. This is a read-only, auto-generated
4322	// field. Applicable to the following creative types: HTML5_BANNER.
4323	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
4324	//
4325	// Possible values:
4326	//   "APPLICATION_CACHE"
4327	//   "AUDIO"
4328	//   "CANVAS"
4329	//   "CANVAS_TEXT"
4330	//   "CSS_ANIMATIONS"
4331	//   "CSS_BACKGROUND_SIZE"
4332	//   "CSS_BORDER_IMAGE"
4333	//   "CSS_BORDER_RADIUS"
4334	//   "CSS_BOX_SHADOW"
4335	//   "CSS_COLUMNS"
4336	//   "CSS_FLEX_BOX"
4337	//   "CSS_FONT_FACE"
4338	//   "CSS_GENERATED_CONTENT"
4339	//   "CSS_GRADIENTS"
4340	//   "CSS_HSLA"
4341	//   "CSS_MULTIPLE_BGS"
4342	//   "CSS_OPACITY"
4343	//   "CSS_REFLECTIONS"
4344	//   "CSS_RGBA"
4345	//   "CSS_TEXT_SHADOW"
4346	//   "CSS_TRANSFORMS"
4347	//   "CSS_TRANSFORMS3D"
4348	//   "CSS_TRANSITIONS"
4349	//   "DRAG_AND_DROP"
4350	//   "GEO_LOCATION"
4351	//   "HASH_CHANGE"
4352	//   "HISTORY"
4353	//   "INDEXED_DB"
4354	//   "INLINE_SVG"
4355	//   "INPUT_ATTR_AUTOCOMPLETE"
4356	//   "INPUT_ATTR_AUTOFOCUS"
4357	//   "INPUT_ATTR_LIST"
4358	//   "INPUT_ATTR_MAX"
4359	//   "INPUT_ATTR_MIN"
4360	//   "INPUT_ATTR_MULTIPLE"
4361	//   "INPUT_ATTR_PATTERN"
4362	//   "INPUT_ATTR_PLACEHOLDER"
4363	//   "INPUT_ATTR_REQUIRED"
4364	//   "INPUT_ATTR_STEP"
4365	//   "INPUT_TYPE_COLOR"
4366	//   "INPUT_TYPE_DATE"
4367	//   "INPUT_TYPE_DATETIME"
4368	//   "INPUT_TYPE_DATETIME_LOCAL"
4369	//   "INPUT_TYPE_EMAIL"
4370	//   "INPUT_TYPE_MONTH"
4371	//   "INPUT_TYPE_NUMBER"
4372	//   "INPUT_TYPE_RANGE"
4373	//   "INPUT_TYPE_SEARCH"
4374	//   "INPUT_TYPE_TEL"
4375	//   "INPUT_TYPE_TIME"
4376	//   "INPUT_TYPE_URL"
4377	//   "INPUT_TYPE_WEEK"
4378	//   "LOCAL_STORAGE"
4379	//   "POST_MESSAGE"
4380	//   "SESSION_STORAGE"
4381	//   "SMIL"
4382	//   "SVG_CLIP_PATHS"
4383	//   "SVG_FE_IMAGE"
4384	//   "SVG_FILTERS"
4385	//   "SVG_HREF"
4386	//   "TOUCH"
4387	//   "VIDEO"
4388	//   "WEBGL"
4389	//   "WEB_SOCKETS"
4390	//   "WEB_SQL_DATABASE"
4391	//   "WEB_WORKERS"
4392	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4393
4394	// DisplayType: Type of rich media asset. This is a read-only field.
4395	// Applicable to the following creative types: all RICH_MEDIA.
4396	//
4397	// Possible values:
4398	//   "ASSET_DISPLAY_TYPE_BACKDROP"
4399	//   "ASSET_DISPLAY_TYPE_EXPANDING"
4400	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH"
4401	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH_EXPANDING"
4402	//   "ASSET_DISPLAY_TYPE_FLOATING"
4403	//   "ASSET_DISPLAY_TYPE_INPAGE"
4404	//   "ASSET_DISPLAY_TYPE_OVERLAY"
4405	//   "ASSET_DISPLAY_TYPE_PEEL_DOWN"
4406	//   "ASSET_DISPLAY_TYPE_VPAID_LINEAR"
4407	//   "ASSET_DISPLAY_TYPE_VPAID_NON_LINEAR"
4408	DisplayType string `json:"displayType,omitempty"`
4409
4410	// Duration: Duration in seconds for which an asset will be displayed.
4411	// Applicable to the following creative types: INSTREAM_VIDEO and
4412	// VPAID_LINEAR_VIDEO. Value must be greater than or equal to 1.
4413	Duration int64 `json:"duration,omitempty"`
4414
4415	// DurationType: Duration type for which an asset will be displayed.
4416	// Applicable to the following creative types: all RICH_MEDIA.
4417	//
4418	// Possible values:
4419	//   "ASSET_DURATION_TYPE_AUTO"
4420	//   "ASSET_DURATION_TYPE_CUSTOM"
4421	//   "ASSET_DURATION_TYPE_NONE"
4422	DurationType string `json:"durationType,omitempty"`
4423
4424	// ExpandedDimension: Detected expanded dimension for video asset. This
4425	// is a read-only field. Applicable to the following creative types:
4426	// INSTREAM_VIDEO and all VPAID.
4427	ExpandedDimension *Size `json:"expandedDimension,omitempty"`
4428
4429	// FileSize: File size associated with this creative asset. This is a
4430	// read-only field. Applicable to all but the following creative types:
4431	// all REDIRECT and TRACKING_TEXT.
4432	FileSize int64 `json:"fileSize,omitempty,string"`
4433
4434	// FlashVersion: Flash version of the asset. This is a read-only field.
4435	// Applicable to the following creative types: FLASH_INPAGE, all
4436	// RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
4437	// asset type is not HTML_IMAGE.
4438	FlashVersion int64 `json:"flashVersion,omitempty"`
4439
4440	// HideFlashObjects: Whether to hide Flash objects flag for an asset.
4441	// Applicable to the following creative types: all RICH_MEDIA.
4442	HideFlashObjects bool `json:"hideFlashObjects,omitempty"`
4443
4444	// HideSelectionBoxes: Whether to hide selection boxes flag for an
4445	// asset. Applicable to the following creative types: all RICH_MEDIA.
4446	HideSelectionBoxes bool `json:"hideSelectionBoxes,omitempty"`
4447
4448	// HorizontallyLocked: Whether the asset is horizontally locked. This is
4449	// a read-only field. Applicable to the following creative types: all
4450	// RICH_MEDIA.
4451	HorizontallyLocked bool `json:"horizontallyLocked,omitempty"`
4452
4453	// Id: Numeric ID of this creative asset. This is a required field and
4454	// should not be modified. Applicable to all but the following creative
4455	// types: all REDIRECT and TRACKING_TEXT.
4456	Id int64 `json:"id,omitempty,string"`
4457
4458	// IdDimensionValue: Dimension value for the ID of the asset. This is a
4459	// read-only, auto-generated field.
4460	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4461
4462	// MimeType: Detected MIME type for video asset. This is a read-only
4463	// field. Applicable to the following creative types: INSTREAM_VIDEO and
4464	// all VPAID.
4465	MimeType string `json:"mimeType,omitempty"`
4466
4467	// Offset: Offset position for an asset in collapsed mode. This is a
4468	// read-only field. Applicable to the following creative types: all
4469	// RICH_MEDIA and all VPAID. Additionally, only applicable to assets
4470	// whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or
4471	// ASSET_DISPLAY_TYPE_PEEL_DOWN.
4472	Offset *OffsetPosition `json:"offset,omitempty"`
4473
4474	// Orientation: Orientation of video asset. This is a read-only,
4475	// auto-generated field.
4476	//
4477	// Possible values:
4478	//   "LANDSCAPE"
4479	//   "PORTRAIT"
4480	//   "SQUARE"
4481	Orientation string `json:"orientation,omitempty"`
4482
4483	// OriginalBackup: Whether the backup asset is original or changed by
4484	// the user in Campaign Manager. Applicable to the following creative
4485	// types: all RICH_MEDIA.
4486	OriginalBackup bool `json:"originalBackup,omitempty"`
4487
4488	// Position: Offset position for an asset. Applicable to the following
4489	// creative types: all RICH_MEDIA.
4490	Position *OffsetPosition `json:"position,omitempty"`
4491
4492	// PositionLeftUnit: Offset left unit for an asset. This is a read-only
4493	// field. Applicable to the following creative types: all RICH_MEDIA.
4494	//
4495	// Possible values:
4496	//   "OFFSET_UNIT_PERCENT"
4497	//   "OFFSET_UNIT_PIXEL"
4498	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4499	PositionLeftUnit string `json:"positionLeftUnit,omitempty"`
4500
4501	// PositionTopUnit: Offset top unit for an asset. This is a read-only
4502	// field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY.
4503	// Applicable to the following creative types: all RICH_MEDIA.
4504	//
4505	// Possible values:
4506	//   "OFFSET_UNIT_PERCENT"
4507	//   "OFFSET_UNIT_PIXEL"
4508	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4509	PositionTopUnit string `json:"positionTopUnit,omitempty"`
4510
4511	// ProgressiveServingUrl: Progressive URL for video asset. This is a
4512	// read-only field. Applicable to the following creative types:
4513	// INSTREAM_VIDEO and all VPAID.
4514	ProgressiveServingUrl string `json:"progressiveServingUrl,omitempty"`
4515
4516	// Pushdown: Whether the asset pushes down other content. Applicable to
4517	// the following creative types: all RICH_MEDIA. Additionally, only
4518	// applicable when the asset offsets are 0, the collapsedSize.width
4519	// matches size.width, and the collapsedSize.height is less than
4520	// size.height.
4521	Pushdown bool `json:"pushdown,omitempty"`
4522
4523	// PushdownDuration: Pushdown duration in seconds for an asset.
4524	// Applicable to the following creative types: all
4525	// RICH_MEDIA.Additionally, only applicable when the asset pushdown
4526	// field is true, the offsets are 0, the collapsedSize.width matches
4527	// size.width, and the collapsedSize.height is less than size.height.
4528	// Acceptable values are 0 to 9.99, inclusive.
4529	PushdownDuration float64 `json:"pushdownDuration,omitempty"`
4530
4531	// Role: Role of the asset in relation to creative. Applicable to all
4532	// but the following creative types: all REDIRECT and TRACKING_TEXT.
4533	// This is a required field.
4534	// PRIMARY applies to DISPLAY, FLASH_INPAGE, HTML5_BANNER, IMAGE,
4535	// DISPLAY_IMAGE_GALLERY, all RICH_MEDIA (which may contain multiple
4536	// primary assets), and all VPAID creatives.
4537	// BACKUP_IMAGE applies to FLASH_INPAGE, HTML5_BANNER, all RICH_MEDIA,
4538	// and all VPAID creatives. Applicable to DISPLAY when the primary asset
4539	// type is not HTML_IMAGE.
4540	// ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply to FLASH_INPAGE
4541	// creatives.
4542	// OTHER refers to assets from sources other than Campaign Manager, such
4543	// as Studio uploaded assets, applicable to all RICH_MEDIA and all VPAID
4544	// creatives.
4545	// PARENT_VIDEO refers to videos uploaded by the user in Campaign
4546	// Manager and is applicable to INSTREAM_VIDEO and VPAID_LINEAR_VIDEO
4547	// creatives.
4548	// TRANSCODED_VIDEO refers to videos transcoded by Campaign Manager from
4549	// PARENT_VIDEO assets and is applicable to INSTREAM_VIDEO and
4550	// VPAID_LINEAR_VIDEO creatives.
4551	// ALTERNATE_VIDEO refers to the Campaign Manager representation of
4552	// child asset videos from Studio, and is applicable to
4553	// VPAID_LINEAR_VIDEO creatives. These cannot be added or removed within
4554	// Campaign Manager.
4555	// For VPAID_LINEAR_VIDEO creatives, PARENT_VIDEO, TRANSCODED_VIDEO and
4556	// ALTERNATE_VIDEO assets that are marked active serve as backup in case
4557	// the VPAID creative cannot be served. Only PARENT_VIDEO assets can be
4558	// added or removed for an INSTREAM_VIDEO or VPAID_LINEAR_VIDEO
4559	// creative.
4560	//
4561	// Possible values:
4562	//   "ADDITIONAL_FLASH"
4563	//   "ADDITIONAL_IMAGE"
4564	//   "ALTERNATE_VIDEO"
4565	//   "BACKUP_IMAGE"
4566	//   "OTHER"
4567	//   "PARENT_VIDEO"
4568	//   "PRIMARY"
4569	//   "TRANSCODED_VIDEO"
4570	Role string `json:"role,omitempty"`
4571
4572	// Size: Size associated with this creative asset. This is a required
4573	// field when applicable; however for IMAGE and FLASH_INPAGE, creatives
4574	// if left blank, this field will be automatically set using the actual
4575	// size of the associated image asset. Applicable to the following
4576	// creative types: DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER,
4577	// IMAGE, and all RICH_MEDIA. Applicable to DISPLAY when the primary
4578	// asset type is not HTML_IMAGE.
4579	Size *Size `json:"size,omitempty"`
4580
4581	// SslCompliant: Whether the asset is SSL-compliant. This is a read-only
4582	// field. Applicable to all but the following creative types: all
4583	// REDIRECT and TRACKING_TEXT.
4584	SslCompliant bool `json:"sslCompliant,omitempty"`
4585
4586	// StartTimeType: Initial wait time type before making the asset
4587	// visible. Applicable to the following creative types: all RICH_MEDIA.
4588	//
4589	// Possible values:
4590	//   "ASSET_START_TIME_TYPE_CUSTOM"
4591	//   "ASSET_START_TIME_TYPE_NONE"
4592	StartTimeType string `json:"startTimeType,omitempty"`
4593
4594	// StreamingServingUrl: Streaming URL for video asset. This is a
4595	// read-only field. Applicable to the following creative types:
4596	// INSTREAM_VIDEO and all VPAID.
4597	StreamingServingUrl string `json:"streamingServingUrl,omitempty"`
4598
4599	// Transparency: Whether the asset is transparent. Applicable to the
4600	// following creative types: all RICH_MEDIA. Additionally, only
4601	// applicable to HTML5 assets.
4602	Transparency bool `json:"transparency,omitempty"`
4603
4604	// VerticallyLocked: Whether the asset is vertically locked. This is a
4605	// read-only field. Applicable to the following creative types: all
4606	// RICH_MEDIA.
4607	VerticallyLocked bool `json:"verticallyLocked,omitempty"`
4608
4609	// VideoDuration: Detected video duration for video asset. This is a
4610	// read-only field. Applicable to the following creative types:
4611	// INSTREAM_VIDEO and all VPAID.
4612	VideoDuration float64 `json:"videoDuration,omitempty"`
4613
4614	// WindowMode: Window mode options for flash assets. Applicable to the
4615	// following creative types: FLASH_INPAGE, RICH_MEDIA_DISPLAY_EXPANDING,
4616	// RICH_MEDIA_IM_EXPAND, RICH_MEDIA_DISPLAY_BANNER, and
4617	// RICH_MEDIA_INPAGE_FLOATING.
4618	//
4619	// Possible values:
4620	//   "OPAQUE"
4621	//   "TRANSPARENT"
4622	//   "WINDOW"
4623	WindowMode string `json:"windowMode,omitempty"`
4624
4625	// ZIndex: zIndex value of an asset. Applicable to the following
4626	// creative types: all RICH_MEDIA.Additionally, only applicable to
4627	// assets whose displayType is NOT one of the following types:
4628	// ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable
4629	// values are -999999999 to 999999999, inclusive.
4630	ZIndex int64 `json:"zIndex,omitempty"`
4631
4632	// ZipFilename: File name of zip file. This is a read-only field.
4633	// Applicable to the following creative types: HTML5_BANNER.
4634	ZipFilename string `json:"zipFilename,omitempty"`
4635
4636	// ZipFilesize: Size of zip file. This is a read-only field. Applicable
4637	// to the following creative types: HTML5_BANNER.
4638	ZipFilesize string `json:"zipFilesize,omitempty"`
4639
4640	// ForceSendFields is a list of field names (e.g. "ActionScript3") to
4641	// unconditionally include in API requests. By default, fields with
4642	// empty values are omitted from API requests. However, any non-pointer,
4643	// non-interface field appearing in ForceSendFields will be sent to the
4644	// server regardless of whether the field is empty or not. This may be
4645	// used to include empty fields in Patch requests.
4646	ForceSendFields []string `json:"-"`
4647
4648	// NullFields is a list of field names (e.g. "ActionScript3") to include
4649	// in API requests with the JSON null value. By default, fields with
4650	// empty values are omitted from API requests. However, any field with
4651	// an empty value appearing in NullFields will be sent to the server as
4652	// null. It is an error if a field in this list has a non-empty value.
4653	// This may be used to include null fields in Patch requests.
4654	NullFields []string `json:"-"`
4655}
4656
4657func (s *CreativeAsset) MarshalJSON() ([]byte, error) {
4658	type NoMethod CreativeAsset
4659	raw := NoMethod(*s)
4660	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4661}
4662
4663func (s *CreativeAsset) UnmarshalJSON(data []byte) error {
4664	type NoMethod CreativeAsset
4665	var s1 struct {
4666		PushdownDuration gensupport.JSONFloat64 `json:"pushdownDuration"`
4667		VideoDuration    gensupport.JSONFloat64 `json:"videoDuration"`
4668		*NoMethod
4669	}
4670	s1.NoMethod = (*NoMethod)(s)
4671	if err := json.Unmarshal(data, &s1); err != nil {
4672		return err
4673	}
4674	s.PushdownDuration = float64(s1.PushdownDuration)
4675	s.VideoDuration = float64(s1.VideoDuration)
4676	return nil
4677}
4678
4679// CreativeAssetId: Creative Asset ID.
4680type CreativeAssetId struct {
4681	// Name: Name of the creative asset. This is a required field while
4682	// inserting an asset. After insertion, this assetIdentifier is used to
4683	// identify the uploaded asset. Characters in the name must be
4684	// alphanumeric or one of the following: ".-_ ". Spaces are allowed.
4685	Name string `json:"name,omitempty"`
4686
4687	// Type: Type of asset to upload. This is a required field. FLASH and
4688	// IMAGE are no longer supported for new uploads. All image assets
4689	// should use HTML_IMAGE.
4690	//
4691	// Possible values:
4692	//   "FLASH"
4693	//   "HTML"
4694	//   "HTML_IMAGE"
4695	//   "IMAGE"
4696	//   "VIDEO"
4697	Type string `json:"type,omitempty"`
4698
4699	// ForceSendFields is a list of field names (e.g. "Name") to
4700	// unconditionally include in API requests. By default, fields with
4701	// empty values are omitted from API requests. However, any non-pointer,
4702	// non-interface field appearing in ForceSendFields will be sent to the
4703	// server regardless of whether the field is empty or not. This may be
4704	// used to include empty fields in Patch requests.
4705	ForceSendFields []string `json:"-"`
4706
4707	// NullFields is a list of field names (e.g. "Name") to include in API
4708	// requests with the JSON null value. By default, fields with empty
4709	// values are omitted from API requests. However, any field with an
4710	// empty value appearing in NullFields will be sent to the server as
4711	// null. It is an error if a field in this list has a non-empty value.
4712	// This may be used to include null fields in Patch requests.
4713	NullFields []string `json:"-"`
4714}
4715
4716func (s *CreativeAssetId) MarshalJSON() ([]byte, error) {
4717	type NoMethod CreativeAssetId
4718	raw := NoMethod(*s)
4719	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4720}
4721
4722// CreativeAssetMetadata: CreativeAssets contains properties of a
4723// creative asset file which will be uploaded or has already been
4724// uploaded. Refer to the creative sample code for how to upload assets
4725// and insert a creative.
4726type CreativeAssetMetadata struct {
4727	// AssetIdentifier: ID of the creative asset. This is a required field.
4728	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4729
4730	// ClickTags: List of detected click tags for assets. This is a
4731	// read-only auto-generated field.
4732	ClickTags []*ClickTag `json:"clickTags,omitempty"`
4733
4734	// DetectedFeatures: List of feature dependencies for the creative asset
4735	// that are detected by Campaign Manager. Feature dependencies are
4736	// features that a browser must be able to support in order to render
4737	// your HTML5 creative correctly. This is a read-only, auto-generated
4738	// field.
4739	//
4740	// Possible values:
4741	//   "APPLICATION_CACHE"
4742	//   "AUDIO"
4743	//   "CANVAS"
4744	//   "CANVAS_TEXT"
4745	//   "CSS_ANIMATIONS"
4746	//   "CSS_BACKGROUND_SIZE"
4747	//   "CSS_BORDER_IMAGE"
4748	//   "CSS_BORDER_RADIUS"
4749	//   "CSS_BOX_SHADOW"
4750	//   "CSS_COLUMNS"
4751	//   "CSS_FLEX_BOX"
4752	//   "CSS_FONT_FACE"
4753	//   "CSS_GENERATED_CONTENT"
4754	//   "CSS_GRADIENTS"
4755	//   "CSS_HSLA"
4756	//   "CSS_MULTIPLE_BGS"
4757	//   "CSS_OPACITY"
4758	//   "CSS_REFLECTIONS"
4759	//   "CSS_RGBA"
4760	//   "CSS_TEXT_SHADOW"
4761	//   "CSS_TRANSFORMS"
4762	//   "CSS_TRANSFORMS3D"
4763	//   "CSS_TRANSITIONS"
4764	//   "DRAG_AND_DROP"
4765	//   "GEO_LOCATION"
4766	//   "HASH_CHANGE"
4767	//   "HISTORY"
4768	//   "INDEXED_DB"
4769	//   "INLINE_SVG"
4770	//   "INPUT_ATTR_AUTOCOMPLETE"
4771	//   "INPUT_ATTR_AUTOFOCUS"
4772	//   "INPUT_ATTR_LIST"
4773	//   "INPUT_ATTR_MAX"
4774	//   "INPUT_ATTR_MIN"
4775	//   "INPUT_ATTR_MULTIPLE"
4776	//   "INPUT_ATTR_PATTERN"
4777	//   "INPUT_ATTR_PLACEHOLDER"
4778	//   "INPUT_ATTR_REQUIRED"
4779	//   "INPUT_ATTR_STEP"
4780	//   "INPUT_TYPE_COLOR"
4781	//   "INPUT_TYPE_DATE"
4782	//   "INPUT_TYPE_DATETIME"
4783	//   "INPUT_TYPE_DATETIME_LOCAL"
4784	//   "INPUT_TYPE_EMAIL"
4785	//   "INPUT_TYPE_MONTH"
4786	//   "INPUT_TYPE_NUMBER"
4787	//   "INPUT_TYPE_RANGE"
4788	//   "INPUT_TYPE_SEARCH"
4789	//   "INPUT_TYPE_TEL"
4790	//   "INPUT_TYPE_TIME"
4791	//   "INPUT_TYPE_URL"
4792	//   "INPUT_TYPE_WEEK"
4793	//   "LOCAL_STORAGE"
4794	//   "POST_MESSAGE"
4795	//   "SESSION_STORAGE"
4796	//   "SMIL"
4797	//   "SVG_CLIP_PATHS"
4798	//   "SVG_FE_IMAGE"
4799	//   "SVG_FILTERS"
4800	//   "SVG_HREF"
4801	//   "TOUCH"
4802	//   "VIDEO"
4803	//   "WEBGL"
4804	//   "WEB_SOCKETS"
4805	//   "WEB_SQL_DATABASE"
4806	//   "WEB_WORKERS"
4807	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4808
4809	// Id: Numeric ID of the asset. This is a read-only, auto-generated
4810	// field.
4811	Id int64 `json:"id,omitempty,string"`
4812
4813	// IdDimensionValue: Dimension value for the numeric ID of the asset.
4814	// This is a read-only, auto-generated field.
4815	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4816
4817	// Kind: Identifies what kind of resource this is. Value: the fixed
4818	// string "dfareporting#creativeAssetMetadata".
4819	Kind string `json:"kind,omitempty"`
4820
4821	// WarnedValidationRules: Rules validated during code generation that
4822	// generated a warning. This is a read-only, auto-generated
4823	// field.
4824	//
4825	// Possible values are:
4826	// - "ADMOB_REFERENCED"
4827	// - "ASSET_FORMAT_UNSUPPORTED_DCM"
4828	// - "ASSET_INVALID"
4829	// - "CLICK_TAG_HARD_CODED"
4830	// - "CLICK_TAG_INVALID"
4831	// - "CLICK_TAG_IN_GWD"
4832	// - "CLICK_TAG_MISSING"
4833	// - "CLICK_TAG_MORE_THAN_ONE"
4834	// - "CLICK_TAG_NON_TOP_LEVEL"
4835	// - "COMPONENT_UNSUPPORTED_DCM"
4836	// - "ENABLER_UNSUPPORTED_METHOD_DCM"
4837	// - "EXTERNAL_FILE_REFERENCED"
4838	// - "FILE_DETAIL_EMPTY"
4839	// - "FILE_TYPE_INVALID"
4840	// - "GWD_PROPERTIES_INVALID"
4841	// - "HTML5_FEATURE_UNSUPPORTED"
4842	// - "LINKED_FILE_NOT_FOUND"
4843	// - "MAX_FLASH_VERSION_11"
4844	// - "MRAID_REFERENCED"
4845	// - "NOT_SSL_COMPLIANT"
4846	// - "ORPHANED_ASSET"
4847	// - "PRIMARY_HTML_MISSING"
4848	// - "SVG_INVALID"
4849	// - "ZIP_INVALID"
4850	//
4851	// Possible values:
4852	//   "ADMOB_REFERENCED"
4853	//   "ASSET_FORMAT_UNSUPPORTED_DCM"
4854	//   "ASSET_INVALID"
4855	//   "CLICK_TAG_HARD_CODED"
4856	//   "CLICK_TAG_INVALID"
4857	//   "CLICK_TAG_IN_GWD"
4858	//   "CLICK_TAG_MISSING"
4859	//   "CLICK_TAG_MORE_THAN_ONE"
4860	//   "CLICK_TAG_NON_TOP_LEVEL"
4861	//   "COMPONENT_UNSUPPORTED_DCM"
4862	//   "ENABLER_UNSUPPORTED_METHOD_DCM"
4863	//   "EXTERNAL_FILE_REFERENCED"
4864	//   "FILE_DETAIL_EMPTY"
4865	//   "FILE_TYPE_INVALID"
4866	//   "GWD_PROPERTIES_INVALID"
4867	//   "HTML5_FEATURE_UNSUPPORTED"
4868	//   "LINKED_FILE_NOT_FOUND"
4869	//   "MAX_FLASH_VERSION_11"
4870	//   "MRAID_REFERENCED"
4871	//   "NOT_SSL_COMPLIANT"
4872	//   "ORPHANED_ASSET"
4873	//   "PRIMARY_HTML_MISSING"
4874	//   "SVG_INVALID"
4875	//   "ZIP_INVALID"
4876	WarnedValidationRules []string `json:"warnedValidationRules,omitempty"`
4877
4878	// ServerResponse contains the HTTP response code and headers from the
4879	// server.
4880	googleapi.ServerResponse `json:"-"`
4881
4882	// ForceSendFields is a list of field names (e.g. "AssetIdentifier") to
4883	// unconditionally include in API requests. By default, fields with
4884	// empty values are omitted from API requests. However, any non-pointer,
4885	// non-interface field appearing in ForceSendFields will be sent to the
4886	// server regardless of whether the field is empty or not. This may be
4887	// used to include empty fields in Patch requests.
4888	ForceSendFields []string `json:"-"`
4889
4890	// NullFields is a list of field names (e.g. "AssetIdentifier") to
4891	// include in API requests with the JSON null value. By default, fields
4892	// with empty values are omitted from API requests. However, any field
4893	// with an empty value appearing in NullFields will be sent to the
4894	// server as null. It is an error if a field in this list has a
4895	// non-empty value. This may be used to include null fields in Patch
4896	// requests.
4897	NullFields []string `json:"-"`
4898}
4899
4900func (s *CreativeAssetMetadata) MarshalJSON() ([]byte, error) {
4901	type NoMethod CreativeAssetMetadata
4902	raw := NoMethod(*s)
4903	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4904}
4905
4906// CreativeAssetSelection: Encapsulates the list of rules for asset
4907// selection and a default asset in case none of the rules match.
4908// Applicable to INSTREAM_VIDEO creatives.
4909type CreativeAssetSelection struct {
4910	// DefaultAssetId: A creativeAssets[].id. This should refer to one of
4911	// the parent assets in this creative, and will be served if none of the
4912	// rules match. This is a required field.
4913	DefaultAssetId int64 `json:"defaultAssetId,omitempty,string"`
4914
4915	// Rules: Rules determine which asset will be served to a viewer. Rules
4916	// will be evaluated in the order in which they are stored in this list.
4917	// This list must contain at least one rule. Applicable to
4918	// INSTREAM_VIDEO creatives.
4919	Rules []*Rule `json:"rules,omitempty"`
4920
4921	// ForceSendFields is a list of field names (e.g. "DefaultAssetId") to
4922	// unconditionally include in API requests. By default, fields with
4923	// empty values are omitted from API requests. However, any non-pointer,
4924	// non-interface field appearing in ForceSendFields will be sent to the
4925	// server regardless of whether the field is empty or not. This may be
4926	// used to include empty fields in Patch requests.
4927	ForceSendFields []string `json:"-"`
4928
4929	// NullFields is a list of field names (e.g. "DefaultAssetId") to
4930	// include in API requests with the JSON null value. By default, fields
4931	// with empty values are omitted from API requests. However, any field
4932	// with an empty value appearing in NullFields will be sent to the
4933	// server as null. It is an error if a field in this list has a
4934	// non-empty value. This may be used to include null fields in Patch
4935	// requests.
4936	NullFields []string `json:"-"`
4937}
4938
4939func (s *CreativeAssetSelection) MarshalJSON() ([]byte, error) {
4940	type NoMethod CreativeAssetSelection
4941	raw := NoMethod(*s)
4942	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4943}
4944
4945// CreativeAssignment: Creative Assignment.
4946type CreativeAssignment struct {
4947	// Active: Whether this creative assignment is active. When true, the
4948	// creative will be included in the ad's rotation.
4949	Active bool `json:"active,omitempty"`
4950
4951	// ApplyEventTags: Whether applicable event tags should fire when this
4952	// creative assignment is rendered. If this value is unset when the ad
4953	// is inserted or updated, it will default to true for all creative
4954	// types EXCEPT for INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT,
4955	// and INSTREAM_VIDEO.
4956	ApplyEventTags bool `json:"applyEventTags,omitempty"`
4957
4958	// ClickThroughUrl: Click-through URL of the creative assignment.
4959	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
4960
4961	// CompanionCreativeOverrides: Companion creative overrides for this
4962	// creative assignment. Applicable to video ads.
4963	CompanionCreativeOverrides []*CompanionClickThroughOverride `json:"companionCreativeOverrides,omitempty"`
4964
4965	// CreativeGroupAssignments: Creative group assignments for this
4966	// creative assignment. Only one assignment per creative group number is
4967	// allowed for a maximum of two assignments.
4968	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
4969
4970	// CreativeId: ID of the creative to be assigned. This is a required
4971	// field.
4972	CreativeId int64 `json:"creativeId,omitempty,string"`
4973
4974	// CreativeIdDimensionValue: Dimension value for the ID of the creative.
4975	// This is a read-only, auto-generated field.
4976	CreativeIdDimensionValue *DimensionValue `json:"creativeIdDimensionValue,omitempty"`
4977
4978	// EndTime: Date and time that the assigned creative should stop
4979	// serving. Must be later than the start time.
4980	EndTime string `json:"endTime,omitempty"`
4981
4982	// RichMediaExitOverrides: Rich media exit overrides for this creative
4983	// assignment.
4984	// Applicable when the creative type is any of the following:
4985	// - DISPLAY
4986	// - RICH_MEDIA_INPAGE
4987	// - RICH_MEDIA_INPAGE_FLOATING
4988	// - RICH_MEDIA_IM_EXPAND
4989	// - RICH_MEDIA_EXPANDING
4990	// - RICH_MEDIA_INTERSTITIAL_FLOAT
4991	// - RICH_MEDIA_MOBILE_IN_APP
4992	// - RICH_MEDIA_MULTI_FLOATING
4993	// - RICH_MEDIA_PEEL_DOWN
4994	// - VPAID_LINEAR
4995	// - VPAID_NON_LINEAR
4996	RichMediaExitOverrides []*RichMediaExitOverride `json:"richMediaExitOverrides,omitempty"`
4997
4998	// Sequence: Sequence number of the creative assignment, applicable when
4999	// the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable
5000	// values are 1 to 65535, inclusive.
5001	Sequence int64 `json:"sequence,omitempty"`
5002
5003	// SslCompliant: Whether the creative to be assigned is SSL-compliant.
5004	// This is a read-only field that is auto-generated when the ad is
5005	// inserted or updated.
5006	SslCompliant bool `json:"sslCompliant,omitempty"`
5007
5008	// StartTime: Date and time that the assigned creative should start
5009	// serving.
5010	StartTime string `json:"startTime,omitempty"`
5011
5012	// Weight: Weight of the creative assignment, applicable when the
5013	// rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater
5014	// than or equal to 1.
5015	Weight int64 `json:"weight,omitempty"`
5016
5017	// ForceSendFields is a list of field names (e.g. "Active") to
5018	// unconditionally include in API requests. By default, fields with
5019	// empty values are omitted from API requests. However, any non-pointer,
5020	// non-interface field appearing in ForceSendFields will be sent to the
5021	// server regardless of whether the field is empty or not. This may be
5022	// used to include empty fields in Patch requests.
5023	ForceSendFields []string `json:"-"`
5024
5025	// NullFields is a list of field names (e.g. "Active") to include in API
5026	// requests with the JSON null value. By default, fields with empty
5027	// values are omitted from API requests. However, any field with an
5028	// empty value appearing in NullFields will be sent to the server as
5029	// null. It is an error if a field in this list has a non-empty value.
5030	// This may be used to include null fields in Patch requests.
5031	NullFields []string `json:"-"`
5032}
5033
5034func (s *CreativeAssignment) MarshalJSON() ([]byte, error) {
5035	type NoMethod CreativeAssignment
5036	raw := NoMethod(*s)
5037	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5038}
5039
5040// CreativeClickThroughUrl: Click-through URL
5041type CreativeClickThroughUrl struct {
5042	// ComputedClickThroughUrl: Read-only convenience field representing the
5043	// actual URL that will be used for this click-through. The URL is
5044	// computed as follows:
5045	// - If landingPageId is specified then that landing page's URL is
5046	// assigned to this field.
5047	// - Otherwise, the customClickThroughUrl is assigned to this field.
5048	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
5049
5050	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
5051	// landingPageId field is left unset.
5052	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
5053
5054	// LandingPageId: ID of the landing page for the click-through URL.
5055	LandingPageId int64 `json:"landingPageId,omitempty,string"`
5056
5057	// ForceSendFields is a list of field names (e.g.
5058	// "ComputedClickThroughUrl") to unconditionally include in API
5059	// requests. By default, fields with empty values are omitted from API
5060	// requests. However, any non-pointer, non-interface field appearing in
5061	// ForceSendFields will be sent to the server regardless of whether the
5062	// field is empty or not. This may be used to include empty fields in
5063	// Patch requests.
5064	ForceSendFields []string `json:"-"`
5065
5066	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
5067	// to include in API requests with the JSON null value. By default,
5068	// fields with empty values are omitted from API requests. However, any
5069	// field with an empty value appearing in NullFields will be sent to the
5070	// server as null. It is an error if a field in this list has a
5071	// non-empty value. This may be used to include null fields in Patch
5072	// requests.
5073	NullFields []string `json:"-"`
5074}
5075
5076func (s *CreativeClickThroughUrl) MarshalJSON() ([]byte, error) {
5077	type NoMethod CreativeClickThroughUrl
5078	raw := NoMethod(*s)
5079	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5080}
5081
5082// CreativeCustomEvent: Creative Custom Event.
5083type CreativeCustomEvent struct {
5084	// AdvertiserCustomEventId: Unique ID of this event used by Reporting
5085	// and Data Transfer. This is a read-only field.
5086	AdvertiserCustomEventId int64 `json:"advertiserCustomEventId,omitempty,string"`
5087
5088	// AdvertiserCustomEventName: User-entered name for the event.
5089	AdvertiserCustomEventName string `json:"advertiserCustomEventName,omitempty"`
5090
5091	// AdvertiserCustomEventType: Type of the event. This is a read-only
5092	// field.
5093	//
5094	// Possible values:
5095	//   "ADVERTISER_EVENT_COUNTER"
5096	//   "ADVERTISER_EVENT_EXIT"
5097	//   "ADVERTISER_EVENT_TIMER"
5098	AdvertiserCustomEventType string `json:"advertiserCustomEventType,omitempty"`
5099
5100	// ArtworkLabel: Artwork label column, used to link events in Campaign
5101	// Manager back to events in Studio. This is a required field and should
5102	// not be modified after insertion.
5103	ArtworkLabel string `json:"artworkLabel,omitempty"`
5104
5105	// ArtworkType: Artwork type used by the creative.This is a read-only
5106	// field.
5107	//
5108	// Possible values:
5109	//   "ARTWORK_TYPE_FLASH"
5110	//   "ARTWORK_TYPE_HTML5"
5111	//   "ARTWORK_TYPE_IMAGE"
5112	//   "ARTWORK_TYPE_MIXED"
5113	ArtworkType string `json:"artworkType,omitempty"`
5114
5115	// ExitClickThroughUrl: Exit click-through URL for the event. This field
5116	// is used only for exit events.
5117	ExitClickThroughUrl *CreativeClickThroughUrl `json:"exitClickThroughUrl,omitempty"`
5118
5119	// Id: ID of this event. This is a required field and should not be
5120	// modified after insertion.
5121	Id int64 `json:"id,omitempty,string"`
5122
5123	// PopupWindowProperties: Properties for rich media popup windows. This
5124	// field is used only for exit events.
5125	PopupWindowProperties *PopupWindowProperties `json:"popupWindowProperties,omitempty"`
5126
5127	// TargetType: Target type used by the event.
5128	//
5129	// Possible values:
5130	//   "TARGET_BLANK"
5131	//   "TARGET_PARENT"
5132	//   "TARGET_POPUP"
5133	//   "TARGET_SELF"
5134	//   "TARGET_TOP"
5135	TargetType string `json:"targetType,omitempty"`
5136
5137	// VideoReportingId: Video reporting ID, used to differentiate multiple
5138	// videos in a single creative. This is a read-only field.
5139	VideoReportingId string `json:"videoReportingId,omitempty"`
5140
5141	// ForceSendFields is a list of field names (e.g.
5142	// "AdvertiserCustomEventId") to unconditionally include in API
5143	// requests. By default, fields with empty values are omitted from API
5144	// requests. However, any non-pointer, non-interface field appearing in
5145	// ForceSendFields will be sent to the server regardless of whether the
5146	// field is empty or not. This may be used to include empty fields in
5147	// Patch requests.
5148	ForceSendFields []string `json:"-"`
5149
5150	// NullFields is a list of field names (e.g. "AdvertiserCustomEventId")
5151	// to include in API requests with the JSON null value. By default,
5152	// fields with empty values are omitted from API requests. However, any
5153	// field with an empty value appearing in NullFields will be sent to the
5154	// server as null. It is an error if a field in this list has a
5155	// non-empty value. This may be used to include null fields in Patch
5156	// requests.
5157	NullFields []string `json:"-"`
5158}
5159
5160func (s *CreativeCustomEvent) MarshalJSON() ([]byte, error) {
5161	type NoMethod CreativeCustomEvent
5162	raw := NoMethod(*s)
5163	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5164}
5165
5166// CreativeField: Contains properties of a creative field.
5167type CreativeField struct {
5168	// AccountId: Account ID of this creative field. This is a read-only
5169	// field that can be left blank.
5170	AccountId int64 `json:"accountId,omitempty,string"`
5171
5172	// AdvertiserId: Advertiser ID of this creative field. This is a
5173	// required field on insertion.
5174	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5175
5176	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5177	// advertiser. This is a read-only, auto-generated field.
5178	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5179
5180	// Id: ID of this creative field. This is a read-only, auto-generated
5181	// field.
5182	Id int64 `json:"id,omitempty,string"`
5183
5184	// Kind: Identifies what kind of resource this is. Value: the fixed
5185	// string "dfareporting#creativeField".
5186	Kind string `json:"kind,omitempty"`
5187
5188	// Name: Name of this creative field. This is a required field and must
5189	// be less than 256 characters long and unique among creative fields of
5190	// the same advertiser.
5191	Name string `json:"name,omitempty"`
5192
5193	// SubaccountId: Subaccount ID of this creative field. This is a
5194	// read-only field that can be left blank.
5195	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5196
5197	// ServerResponse contains the HTTP response code and headers from the
5198	// server.
5199	googleapi.ServerResponse `json:"-"`
5200
5201	// ForceSendFields is a list of field names (e.g. "AccountId") to
5202	// unconditionally include in API requests. By default, fields with
5203	// empty values are omitted from API requests. However, any non-pointer,
5204	// non-interface field appearing in ForceSendFields will be sent to the
5205	// server regardless of whether the field is empty or not. This may be
5206	// used to include empty fields in Patch requests.
5207	ForceSendFields []string `json:"-"`
5208
5209	// NullFields is a list of field names (e.g. "AccountId") to include in
5210	// API requests with the JSON null value. By default, fields with empty
5211	// values are omitted from API requests. However, any field with an
5212	// empty value appearing in NullFields will be sent to the server as
5213	// null. It is an error if a field in this list has a non-empty value.
5214	// This may be used to include null fields in Patch requests.
5215	NullFields []string `json:"-"`
5216}
5217
5218func (s *CreativeField) MarshalJSON() ([]byte, error) {
5219	type NoMethod CreativeField
5220	raw := NoMethod(*s)
5221	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5222}
5223
5224// CreativeFieldAssignment: Creative Field Assignment.
5225type CreativeFieldAssignment struct {
5226	// CreativeFieldId: ID of the creative field.
5227	CreativeFieldId int64 `json:"creativeFieldId,omitempty,string"`
5228
5229	// CreativeFieldValueId: ID of the creative field value.
5230	CreativeFieldValueId int64 `json:"creativeFieldValueId,omitempty,string"`
5231
5232	// ForceSendFields is a list of field names (e.g. "CreativeFieldId") to
5233	// unconditionally include in API requests. By default, fields with
5234	// empty values are omitted from API requests. However, any non-pointer,
5235	// non-interface field appearing in ForceSendFields will be sent to the
5236	// server regardless of whether the field is empty or not. This may be
5237	// used to include empty fields in Patch requests.
5238	ForceSendFields []string `json:"-"`
5239
5240	// NullFields is a list of field names (e.g. "CreativeFieldId") to
5241	// include in API requests with the JSON null value. By default, fields
5242	// with empty values are omitted from API requests. However, any field
5243	// with an empty value appearing in NullFields will be sent to the
5244	// server as null. It is an error if a field in this list has a
5245	// non-empty value. This may be used to include null fields in Patch
5246	// requests.
5247	NullFields []string `json:"-"`
5248}
5249
5250func (s *CreativeFieldAssignment) MarshalJSON() ([]byte, error) {
5251	type NoMethod CreativeFieldAssignment
5252	raw := NoMethod(*s)
5253	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5254}
5255
5256// CreativeFieldValue: Contains properties of a creative field value.
5257type CreativeFieldValue struct {
5258	// Id: ID of this creative field value. This is a read-only,
5259	// auto-generated field.
5260	Id int64 `json:"id,omitempty,string"`
5261
5262	// Kind: Identifies what kind of resource this is. Value: the fixed
5263	// string "dfareporting#creativeFieldValue".
5264	Kind string `json:"kind,omitempty"`
5265
5266	// Value: Value of this creative field value. It needs to be less than
5267	// 256 characters in length and unique per creative field.
5268	Value string `json:"value,omitempty"`
5269
5270	// ServerResponse contains the HTTP response code and headers from the
5271	// server.
5272	googleapi.ServerResponse `json:"-"`
5273
5274	// ForceSendFields is a list of field names (e.g. "Id") to
5275	// unconditionally include in API requests. By default, fields with
5276	// empty values are omitted from API requests. However, any non-pointer,
5277	// non-interface field appearing in ForceSendFields will be sent to the
5278	// server regardless of whether the field is empty or not. This may be
5279	// used to include empty fields in Patch requests.
5280	ForceSendFields []string `json:"-"`
5281
5282	// NullFields is a list of field names (e.g. "Id") to include in API
5283	// requests with the JSON null value. By default, fields with empty
5284	// values are omitted from API requests. However, any field with an
5285	// empty value appearing in NullFields will be sent to the server as
5286	// null. It is an error if a field in this list has a non-empty value.
5287	// This may be used to include null fields in Patch requests.
5288	NullFields []string `json:"-"`
5289}
5290
5291func (s *CreativeFieldValue) MarshalJSON() ([]byte, error) {
5292	type NoMethod CreativeFieldValue
5293	raw := NoMethod(*s)
5294	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5295}
5296
5297// CreativeFieldValuesListResponse: Creative Field Value List Response
5298type CreativeFieldValuesListResponse struct {
5299	// CreativeFieldValues: Creative field value collection.
5300	CreativeFieldValues []*CreativeFieldValue `json:"creativeFieldValues,omitempty"`
5301
5302	// Kind: Identifies what kind of resource this is. Value: the fixed
5303	// string "dfareporting#creativeFieldValuesListResponse".
5304	Kind string `json:"kind,omitempty"`
5305
5306	// NextPageToken: Pagination token to be used for the next list
5307	// operation.
5308	NextPageToken string `json:"nextPageToken,omitempty"`
5309
5310	// ServerResponse contains the HTTP response code and headers from the
5311	// server.
5312	googleapi.ServerResponse `json:"-"`
5313
5314	// ForceSendFields is a list of field names (e.g. "CreativeFieldValues")
5315	// to unconditionally include in API requests. By default, fields with
5316	// empty values are omitted from API requests. However, any non-pointer,
5317	// non-interface field appearing in ForceSendFields will be sent to the
5318	// server regardless of whether the field is empty or not. This may be
5319	// used to include empty fields in Patch requests.
5320	ForceSendFields []string `json:"-"`
5321
5322	// NullFields is a list of field names (e.g. "CreativeFieldValues") to
5323	// include in API requests with the JSON null value. By default, fields
5324	// with empty values are omitted from API requests. However, any field
5325	// with an empty value appearing in NullFields will be sent to the
5326	// server as null. It is an error if a field in this list has a
5327	// non-empty value. This may be used to include null fields in Patch
5328	// requests.
5329	NullFields []string `json:"-"`
5330}
5331
5332func (s *CreativeFieldValuesListResponse) MarshalJSON() ([]byte, error) {
5333	type NoMethod CreativeFieldValuesListResponse
5334	raw := NoMethod(*s)
5335	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5336}
5337
5338// CreativeFieldsListResponse: Creative Field List Response
5339type CreativeFieldsListResponse struct {
5340	// CreativeFields: Creative field collection.
5341	CreativeFields []*CreativeField `json:"creativeFields,omitempty"`
5342
5343	// Kind: Identifies what kind of resource this is. Value: the fixed
5344	// string "dfareporting#creativeFieldsListResponse".
5345	Kind string `json:"kind,omitempty"`
5346
5347	// NextPageToken: Pagination token to be used for the next list
5348	// operation.
5349	NextPageToken string `json:"nextPageToken,omitempty"`
5350
5351	// ServerResponse contains the HTTP response code and headers from the
5352	// server.
5353	googleapi.ServerResponse `json:"-"`
5354
5355	// ForceSendFields is a list of field names (e.g. "CreativeFields") to
5356	// unconditionally include in API requests. By default, fields with
5357	// empty values are omitted from API requests. However, any non-pointer,
5358	// non-interface field appearing in ForceSendFields will be sent to the
5359	// server regardless of whether the field is empty or not. This may be
5360	// used to include empty fields in Patch requests.
5361	ForceSendFields []string `json:"-"`
5362
5363	// NullFields is a list of field names (e.g. "CreativeFields") to
5364	// include in API requests with the JSON null value. By default, fields
5365	// with empty values are omitted from API requests. However, any field
5366	// with an empty value appearing in NullFields will be sent to the
5367	// server as null. It is an error if a field in this list has a
5368	// non-empty value. This may be used to include null fields in Patch
5369	// requests.
5370	NullFields []string `json:"-"`
5371}
5372
5373func (s *CreativeFieldsListResponse) MarshalJSON() ([]byte, error) {
5374	type NoMethod CreativeFieldsListResponse
5375	raw := NoMethod(*s)
5376	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5377}
5378
5379// CreativeGroup: Contains properties of a creative group.
5380type CreativeGroup struct {
5381	// AccountId: Account ID of this creative group. This is a read-only
5382	// field that can be left blank.
5383	AccountId int64 `json:"accountId,omitempty,string"`
5384
5385	// AdvertiserId: Advertiser ID of this creative group. This is a
5386	// required field on insertion.
5387	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5388
5389	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5390	// advertiser. This is a read-only, auto-generated field.
5391	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5392
5393	// GroupNumber: Subgroup of the creative group. Assign your creative
5394	// groups to a subgroup in order to filter or manage them more easily.
5395	// This field is required on insertion and is read-only after insertion.
5396	// Acceptable values are 1 to 2, inclusive.
5397	GroupNumber int64 `json:"groupNumber,omitempty"`
5398
5399	// Id: ID of this creative group. This is a read-only, auto-generated
5400	// field.
5401	Id int64 `json:"id,omitempty,string"`
5402
5403	// Kind: Identifies what kind of resource this is. Value: the fixed
5404	// string "dfareporting#creativeGroup".
5405	Kind string `json:"kind,omitempty"`
5406
5407	// Name: Name of this creative group. This is a required field and must
5408	// be less than 256 characters long and unique among creative groups of
5409	// the same advertiser.
5410	Name string `json:"name,omitempty"`
5411
5412	// SubaccountId: Subaccount ID of this creative group. This is a
5413	// read-only field that can be left blank.
5414	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5415
5416	// ServerResponse contains the HTTP response code and headers from the
5417	// server.
5418	googleapi.ServerResponse `json:"-"`
5419
5420	// ForceSendFields is a list of field names (e.g. "AccountId") to
5421	// unconditionally include in API requests. By default, fields with
5422	// empty values are omitted from API requests. However, any non-pointer,
5423	// non-interface field appearing in ForceSendFields will be sent to the
5424	// server regardless of whether the field is empty or not. This may be
5425	// used to include empty fields in Patch requests.
5426	ForceSendFields []string `json:"-"`
5427
5428	// NullFields is a list of field names (e.g. "AccountId") to include in
5429	// API requests with the JSON null value. By default, fields with empty
5430	// values are omitted from API requests. However, any field with an
5431	// empty value appearing in NullFields will be sent to the server as
5432	// null. It is an error if a field in this list has a non-empty value.
5433	// This may be used to include null fields in Patch requests.
5434	NullFields []string `json:"-"`
5435}
5436
5437func (s *CreativeGroup) MarshalJSON() ([]byte, error) {
5438	type NoMethod CreativeGroup
5439	raw := NoMethod(*s)
5440	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5441}
5442
5443// CreativeGroupAssignment: Creative Group Assignment.
5444type CreativeGroupAssignment struct {
5445	// CreativeGroupId: ID of the creative group to be assigned.
5446	CreativeGroupId int64 `json:"creativeGroupId,omitempty,string"`
5447
5448	// CreativeGroupNumber: Creative group number of the creative group
5449	// assignment.
5450	//
5451	// Possible values:
5452	//   "CREATIVE_GROUP_ONE"
5453	//   "CREATIVE_GROUP_TWO"
5454	CreativeGroupNumber string `json:"creativeGroupNumber,omitempty"`
5455
5456	// ForceSendFields is a list of field names (e.g. "CreativeGroupId") to
5457	// unconditionally include in API requests. By default, fields with
5458	// empty values are omitted from API requests. However, any non-pointer,
5459	// non-interface field appearing in ForceSendFields will be sent to the
5460	// server regardless of whether the field is empty or not. This may be
5461	// used to include empty fields in Patch requests.
5462	ForceSendFields []string `json:"-"`
5463
5464	// NullFields is a list of field names (e.g. "CreativeGroupId") to
5465	// include in API requests with the JSON null value. By default, fields
5466	// with empty values are omitted from API requests. However, any field
5467	// with an empty value appearing in NullFields will be sent to the
5468	// server as null. It is an error if a field in this list has a
5469	// non-empty value. This may be used to include null fields in Patch
5470	// requests.
5471	NullFields []string `json:"-"`
5472}
5473
5474func (s *CreativeGroupAssignment) MarshalJSON() ([]byte, error) {
5475	type NoMethod CreativeGroupAssignment
5476	raw := NoMethod(*s)
5477	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5478}
5479
5480// CreativeGroupsListResponse: Creative Group List Response
5481type CreativeGroupsListResponse struct {
5482	// CreativeGroups: Creative group collection.
5483	CreativeGroups []*CreativeGroup `json:"creativeGroups,omitempty"`
5484
5485	// Kind: Identifies what kind of resource this is. Value: the fixed
5486	// string "dfareporting#creativeGroupsListResponse".
5487	Kind string `json:"kind,omitempty"`
5488
5489	// NextPageToken: Pagination token to be used for the next list
5490	// operation.
5491	NextPageToken string `json:"nextPageToken,omitempty"`
5492
5493	// ServerResponse contains the HTTP response code and headers from the
5494	// server.
5495	googleapi.ServerResponse `json:"-"`
5496
5497	// ForceSendFields is a list of field names (e.g. "CreativeGroups") to
5498	// unconditionally include in API requests. By default, fields with
5499	// empty values are omitted from API requests. However, any non-pointer,
5500	// non-interface field appearing in ForceSendFields will be sent to the
5501	// server regardless of whether the field is empty or not. This may be
5502	// used to include empty fields in Patch requests.
5503	ForceSendFields []string `json:"-"`
5504
5505	// NullFields is a list of field names (e.g. "CreativeGroups") to
5506	// include in API requests with the JSON null value. By default, fields
5507	// with empty values are omitted from API requests. However, any field
5508	// with an empty value appearing in NullFields will be sent to the
5509	// server as null. It is an error if a field in this list has a
5510	// non-empty value. This may be used to include null fields in Patch
5511	// requests.
5512	NullFields []string `json:"-"`
5513}
5514
5515func (s *CreativeGroupsListResponse) MarshalJSON() ([]byte, error) {
5516	type NoMethod CreativeGroupsListResponse
5517	raw := NoMethod(*s)
5518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5519}
5520
5521// CreativeOptimizationConfiguration: Creative optimization settings.
5522type CreativeOptimizationConfiguration struct {
5523	// Id: ID of this creative optimization config. This field is
5524	// auto-generated when the campaign is inserted or updated. It can be
5525	// null for existing campaigns.
5526	Id int64 `json:"id,omitempty,string"`
5527
5528	// Name: Name of this creative optimization config. This is a required
5529	// field and must be less than 129 characters long.
5530	Name string `json:"name,omitempty"`
5531
5532	// OptimizationActivitys: List of optimization activities associated
5533	// with this configuration.
5534	OptimizationActivitys []*OptimizationActivity `json:"optimizationActivitys,omitempty"`
5535
5536	// OptimizationModel: Optimization model for this configuration.
5537	//
5538	// Possible values:
5539	//   "CLICK"
5540	//   "POST_CLICK"
5541	//   "POST_CLICK_AND_IMPRESSION"
5542	//   "POST_IMPRESSION"
5543	//   "VIDEO_COMPLETION"
5544	OptimizationModel string `json:"optimizationModel,omitempty"`
5545
5546	// ForceSendFields is a list of field names (e.g. "Id") to
5547	// unconditionally include in API requests. By default, fields with
5548	// empty values are omitted from API requests. However, any non-pointer,
5549	// non-interface field appearing in ForceSendFields will be sent to the
5550	// server regardless of whether the field is empty or not. This may be
5551	// used to include empty fields in Patch requests.
5552	ForceSendFields []string `json:"-"`
5553
5554	// NullFields is a list of field names (e.g. "Id") to include in API
5555	// requests with the JSON null value. By default, fields with empty
5556	// values are omitted from API requests. However, any field with an
5557	// empty value appearing in NullFields will be sent to the server as
5558	// null. It is an error if a field in this list has a non-empty value.
5559	// This may be used to include null fields in Patch requests.
5560	NullFields []string `json:"-"`
5561}
5562
5563func (s *CreativeOptimizationConfiguration) MarshalJSON() ([]byte, error) {
5564	type NoMethod CreativeOptimizationConfiguration
5565	raw := NoMethod(*s)
5566	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5567}
5568
5569// CreativeRotation: Creative Rotation.
5570type CreativeRotation struct {
5571	// CreativeAssignments: Creative assignments in this creative rotation.
5572	CreativeAssignments []*CreativeAssignment `json:"creativeAssignments,omitempty"`
5573
5574	// CreativeOptimizationConfigurationId: Creative optimization
5575	// configuration that is used by this ad. It should refer to one of the
5576	// existing optimization configurations in the ad's campaign. If it is
5577	// unset or set to 0, then the campaign's default optimization
5578	// configuration will be used for this ad.
5579	CreativeOptimizationConfigurationId int64 `json:"creativeOptimizationConfigurationId,omitempty,string"`
5580
5581	// Type: Type of creative rotation. Can be used to specify whether to
5582	// use sequential or random rotation.
5583	//
5584	// Possible values:
5585	//   "CREATIVE_ROTATION_TYPE_RANDOM"
5586	//   "CREATIVE_ROTATION_TYPE_SEQUENTIAL"
5587	Type string `json:"type,omitempty"`
5588
5589	// WeightCalculationStrategy: Strategy for calculating weights. Used
5590	// with CREATIVE_ROTATION_TYPE_RANDOM.
5591	//
5592	// Possible values:
5593	//   "WEIGHT_STRATEGY_CUSTOM"
5594	//   "WEIGHT_STRATEGY_EQUAL"
5595	//   "WEIGHT_STRATEGY_HIGHEST_CTR"
5596	//   "WEIGHT_STRATEGY_OPTIMIZED"
5597	WeightCalculationStrategy string `json:"weightCalculationStrategy,omitempty"`
5598
5599	// ForceSendFields is a list of field names (e.g. "CreativeAssignments")
5600	// to unconditionally include in API requests. By default, fields with
5601	// empty values are omitted from API requests. However, any non-pointer,
5602	// non-interface field appearing in ForceSendFields will be sent to the
5603	// server regardless of whether the field is empty or not. This may be
5604	// used to include empty fields in Patch requests.
5605	ForceSendFields []string `json:"-"`
5606
5607	// NullFields is a list of field names (e.g. "CreativeAssignments") to
5608	// include in API requests with the JSON null value. By default, fields
5609	// with empty values are omitted from API requests. However, any field
5610	// with an empty value appearing in NullFields will be sent to the
5611	// server as null. It is an error if a field in this list has a
5612	// non-empty value. This may be used to include null fields in Patch
5613	// requests.
5614	NullFields []string `json:"-"`
5615}
5616
5617func (s *CreativeRotation) MarshalJSON() ([]byte, error) {
5618	type NoMethod CreativeRotation
5619	raw := NoMethod(*s)
5620	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5621}
5622
5623// CreativeSettings: Creative Settings
5624type CreativeSettings struct {
5625	// IFrameFooter: Header text for iFrames for this site. Must be less
5626	// than or equal to 2000 characters long.
5627	IFrameFooter string `json:"iFrameFooter,omitempty"`
5628
5629	// IFrameHeader: Header text for iFrames for this site. Must be less
5630	// than or equal to 2000 characters long.
5631	IFrameHeader string `json:"iFrameHeader,omitempty"`
5632
5633	// ForceSendFields is a list of field names (e.g. "IFrameFooter") to
5634	// unconditionally include in API requests. By default, fields with
5635	// empty values are omitted from API requests. However, any non-pointer,
5636	// non-interface field appearing in ForceSendFields will be sent to the
5637	// server regardless of whether the field is empty or not. This may be
5638	// used to include empty fields in Patch requests.
5639	ForceSendFields []string `json:"-"`
5640
5641	// NullFields is a list of field names (e.g. "IFrameFooter") to include
5642	// in API requests with the JSON null value. By default, fields with
5643	// empty values are omitted from API requests. However, any field with
5644	// an empty value appearing in NullFields will be sent to the server as
5645	// null. It is an error if a field in this list has a non-empty value.
5646	// This may be used to include null fields in Patch requests.
5647	NullFields []string `json:"-"`
5648}
5649
5650func (s *CreativeSettings) MarshalJSON() ([]byte, error) {
5651	type NoMethod CreativeSettings
5652	raw := NoMethod(*s)
5653	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5654}
5655
5656// CreativesListResponse: Creative List Response
5657type CreativesListResponse struct {
5658	// Creatives: Creative collection.
5659	Creatives []*Creative `json:"creatives,omitempty"`
5660
5661	// Kind: Identifies what kind of resource this is. Value: the fixed
5662	// string "dfareporting#creativesListResponse".
5663	Kind string `json:"kind,omitempty"`
5664
5665	// NextPageToken: Pagination token to be used for the next list
5666	// operation.
5667	NextPageToken string `json:"nextPageToken,omitempty"`
5668
5669	// ServerResponse contains the HTTP response code and headers from the
5670	// server.
5671	googleapi.ServerResponse `json:"-"`
5672
5673	// ForceSendFields is a list of field names (e.g. "Creatives") to
5674	// unconditionally include in API requests. By default, fields with
5675	// empty values are omitted from API requests. However, any non-pointer,
5676	// non-interface field appearing in ForceSendFields will be sent to the
5677	// server regardless of whether the field is empty or not. This may be
5678	// used to include empty fields in Patch requests.
5679	ForceSendFields []string `json:"-"`
5680
5681	// NullFields is a list of field names (e.g. "Creatives") to include in
5682	// API requests with the JSON null value. By default, fields with empty
5683	// values are omitted from API requests. However, any field with an
5684	// empty value appearing in NullFields will be sent to the server as
5685	// null. It is an error if a field in this list has a non-empty value.
5686	// This may be used to include null fields in Patch requests.
5687	NullFields []string `json:"-"`
5688}
5689
5690func (s *CreativesListResponse) MarshalJSON() ([]byte, error) {
5691	type NoMethod CreativesListResponse
5692	raw := NoMethod(*s)
5693	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5694}
5695
5696// CrossDimensionReachReportCompatibleFields: Represents fields that are
5697// compatible to be selected for a report of type
5698// "CROSS_DIMENSION_REACH".
5699type CrossDimensionReachReportCompatibleFields struct {
5700	// Breakdown: Dimensions which are compatible to be selected in the
5701	// "breakdown" section of the report.
5702	Breakdown []*Dimension `json:"breakdown,omitempty"`
5703
5704	// DimensionFilters: Dimensions which are compatible to be selected in
5705	// the "dimensionFilters" section of the report.
5706	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
5707
5708	// Kind: The kind of resource this is, in this case
5709	// dfareporting#crossDimensionReachReportCompatibleFields.
5710	Kind string `json:"kind,omitempty"`
5711
5712	// Metrics: Metrics which are compatible to be selected in the
5713	// "metricNames" section of the report.
5714	Metrics []*Metric `json:"metrics,omitempty"`
5715
5716	// OverlapMetrics: Metrics which are compatible to be selected in the
5717	// "overlapMetricNames" section of the report.
5718	OverlapMetrics []*Metric `json:"overlapMetrics,omitempty"`
5719
5720	// ForceSendFields is a list of field names (e.g. "Breakdown") to
5721	// unconditionally include in API requests. By default, fields with
5722	// empty values are omitted from API requests. However, any non-pointer,
5723	// non-interface field appearing in ForceSendFields will be sent to the
5724	// server regardless of whether the field is empty or not. This may be
5725	// used to include empty fields in Patch requests.
5726	ForceSendFields []string `json:"-"`
5727
5728	// NullFields is a list of field names (e.g. "Breakdown") to include in
5729	// API requests with the JSON null value. By default, fields with empty
5730	// values are omitted from API requests. However, any field with an
5731	// empty value appearing in NullFields will be sent to the server as
5732	// null. It is an error if a field in this list has a non-empty value.
5733	// This may be used to include null fields in Patch requests.
5734	NullFields []string `json:"-"`
5735}
5736
5737func (s *CrossDimensionReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
5738	type NoMethod CrossDimensionReachReportCompatibleFields
5739	raw := NoMethod(*s)
5740	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5741}
5742
5743// CustomFloodlightVariable: A custom floodlight variable.
5744type CustomFloodlightVariable struct {
5745	// Kind: Identifies what kind of resource this is. Value: the fixed
5746	// string "dfareporting#customFloodlightVariable".
5747	Kind string `json:"kind,omitempty"`
5748
5749	// Type: The type of custom floodlight variable to supply a value for.
5750	// These map to the "u[1-20]=" in the tags.
5751	//
5752	// Possible values:
5753	//   "U1"
5754	//   "U10"
5755	//   "U100"
5756	//   "U11"
5757	//   "U12"
5758	//   "U13"
5759	//   "U14"
5760	//   "U15"
5761	//   "U16"
5762	//   "U17"
5763	//   "U18"
5764	//   "U19"
5765	//   "U2"
5766	//   "U20"
5767	//   "U21"
5768	//   "U22"
5769	//   "U23"
5770	//   "U24"
5771	//   "U25"
5772	//   "U26"
5773	//   "U27"
5774	//   "U28"
5775	//   "U29"
5776	//   "U3"
5777	//   "U30"
5778	//   "U31"
5779	//   "U32"
5780	//   "U33"
5781	//   "U34"
5782	//   "U35"
5783	//   "U36"
5784	//   "U37"
5785	//   "U38"
5786	//   "U39"
5787	//   "U4"
5788	//   "U40"
5789	//   "U41"
5790	//   "U42"
5791	//   "U43"
5792	//   "U44"
5793	//   "U45"
5794	//   "U46"
5795	//   "U47"
5796	//   "U48"
5797	//   "U49"
5798	//   "U5"
5799	//   "U50"
5800	//   "U51"
5801	//   "U52"
5802	//   "U53"
5803	//   "U54"
5804	//   "U55"
5805	//   "U56"
5806	//   "U57"
5807	//   "U58"
5808	//   "U59"
5809	//   "U6"
5810	//   "U60"
5811	//   "U61"
5812	//   "U62"
5813	//   "U63"
5814	//   "U64"
5815	//   "U65"
5816	//   "U66"
5817	//   "U67"
5818	//   "U68"
5819	//   "U69"
5820	//   "U7"
5821	//   "U70"
5822	//   "U71"
5823	//   "U72"
5824	//   "U73"
5825	//   "U74"
5826	//   "U75"
5827	//   "U76"
5828	//   "U77"
5829	//   "U78"
5830	//   "U79"
5831	//   "U8"
5832	//   "U80"
5833	//   "U81"
5834	//   "U82"
5835	//   "U83"
5836	//   "U84"
5837	//   "U85"
5838	//   "U86"
5839	//   "U87"
5840	//   "U88"
5841	//   "U89"
5842	//   "U9"
5843	//   "U90"
5844	//   "U91"
5845	//   "U92"
5846	//   "U93"
5847	//   "U94"
5848	//   "U95"
5849	//   "U96"
5850	//   "U97"
5851	//   "U98"
5852	//   "U99"
5853	Type string `json:"type,omitempty"`
5854
5855	// Value: The value of the custom floodlight variable. The length of
5856	// string must not exceed 50 characters.
5857	Value string `json:"value,omitempty"`
5858
5859	// ForceSendFields is a list of field names (e.g. "Kind") to
5860	// unconditionally include in API requests. By default, fields with
5861	// empty values are omitted from API requests. However, any non-pointer,
5862	// non-interface field appearing in ForceSendFields will be sent to the
5863	// server regardless of whether the field is empty or not. This may be
5864	// used to include empty fields in Patch requests.
5865	ForceSendFields []string `json:"-"`
5866
5867	// NullFields is a list of field names (e.g. "Kind") to include in API
5868	// requests with the JSON null value. By default, fields with empty
5869	// values are omitted from API requests. However, any field with an
5870	// empty value appearing in NullFields will be sent to the server as
5871	// null. It is an error if a field in this list has a non-empty value.
5872	// This may be used to include null fields in Patch requests.
5873	NullFields []string `json:"-"`
5874}
5875
5876func (s *CustomFloodlightVariable) MarshalJSON() ([]byte, error) {
5877	type NoMethod CustomFloodlightVariable
5878	raw := NoMethod(*s)
5879	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5880}
5881
5882// CustomRichMediaEvents: Represents a Custom Rich Media Events group.
5883type CustomRichMediaEvents struct {
5884	// FilteredEventIds: List of custom rich media event IDs. Dimension
5885	// values must be all of type dfa:richMediaEventTypeIdAndName.
5886	FilteredEventIds []*DimensionValue `json:"filteredEventIds,omitempty"`
5887
5888	// Kind: The kind of resource this is, in this case
5889	// dfareporting#customRichMediaEvents.
5890	Kind string `json:"kind,omitempty"`
5891
5892	// ForceSendFields is a list of field names (e.g. "FilteredEventIds") to
5893	// unconditionally include in API requests. By default, fields with
5894	// empty values are omitted from API requests. However, any non-pointer,
5895	// non-interface field appearing in ForceSendFields will be sent to the
5896	// server regardless of whether the field is empty or not. This may be
5897	// used to include empty fields in Patch requests.
5898	ForceSendFields []string `json:"-"`
5899
5900	// NullFields is a list of field names (e.g. "FilteredEventIds") to
5901	// include in API requests with the JSON null value. By default, fields
5902	// with empty values are omitted from API requests. However, any field
5903	// with an empty value appearing in NullFields will be sent to the
5904	// server as null. It is an error if a field in this list has a
5905	// non-empty value. This may be used to include null fields in Patch
5906	// requests.
5907	NullFields []string `json:"-"`
5908}
5909
5910func (s *CustomRichMediaEvents) MarshalJSON() ([]byte, error) {
5911	type NoMethod CustomRichMediaEvents
5912	raw := NoMethod(*s)
5913	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5914}
5915
5916// DateRange: Represents a date range.
5917type DateRange struct {
5918	// EndDate: The end date of the date range, inclusive. A string of the
5919	// format: "yyyy-MM-dd".
5920	EndDate string `json:"endDate,omitempty"`
5921
5922	// Kind: The kind of resource this is, in this case
5923	// dfareporting#dateRange.
5924	Kind string `json:"kind,omitempty"`
5925
5926	// RelativeDateRange: The date range relative to the date of when the
5927	// report is run.
5928	//
5929	// Possible values:
5930	//   "LAST_14_DAYS"
5931	//   "LAST_24_MONTHS"
5932	//   "LAST_30_DAYS"
5933	//   "LAST_365_DAYS"
5934	//   "LAST_60_DAYS"
5935	//   "LAST_7_DAYS"
5936	//   "LAST_90_DAYS"
5937	//   "MONTH_TO_DATE"
5938	//   "PREVIOUS_MONTH"
5939	//   "PREVIOUS_QUARTER"
5940	//   "PREVIOUS_WEEK"
5941	//   "PREVIOUS_YEAR"
5942	//   "QUARTER_TO_DATE"
5943	//   "TODAY"
5944	//   "WEEK_TO_DATE"
5945	//   "YEAR_TO_DATE"
5946	//   "YESTERDAY"
5947	RelativeDateRange string `json:"relativeDateRange,omitempty"`
5948
5949	// StartDate: The start date of the date range, inclusive. A string of
5950	// the format: "yyyy-MM-dd".
5951	StartDate string `json:"startDate,omitempty"`
5952
5953	// ForceSendFields is a list of field names (e.g. "EndDate") to
5954	// unconditionally include in API requests. By default, fields with
5955	// empty values are omitted from API requests. However, any non-pointer,
5956	// non-interface field appearing in ForceSendFields will be sent to the
5957	// server regardless of whether the field is empty or not. This may be
5958	// used to include empty fields in Patch requests.
5959	ForceSendFields []string `json:"-"`
5960
5961	// NullFields is a list of field names (e.g. "EndDate") to include in
5962	// API requests with the JSON null value. By default, fields with empty
5963	// values are omitted from API requests. However, any field with an
5964	// empty value appearing in NullFields will be sent to the server as
5965	// null. It is an error if a field in this list has a non-empty value.
5966	// This may be used to include null fields in Patch requests.
5967	NullFields []string `json:"-"`
5968}
5969
5970func (s *DateRange) MarshalJSON() ([]byte, error) {
5971	type NoMethod DateRange
5972	raw := NoMethod(*s)
5973	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5974}
5975
5976// DayPartTargeting: Day Part Targeting.
5977type DayPartTargeting struct {
5978	// DaysOfWeek: Days of the week when the ad will serve.
5979	//
5980	// Acceptable values are:
5981	// - "SUNDAY"
5982	// - "MONDAY"
5983	// - "TUESDAY"
5984	// - "WEDNESDAY"
5985	// - "THURSDAY"
5986	// - "FRIDAY"
5987	// - "SATURDAY"
5988	//
5989	// Possible values:
5990	//   "FRIDAY"
5991	//   "MONDAY"
5992	//   "SATURDAY"
5993	//   "SUNDAY"
5994	//   "THURSDAY"
5995	//   "TUESDAY"
5996	//   "WEDNESDAY"
5997	DaysOfWeek []string `json:"daysOfWeek,omitempty"`
5998
5999	// HoursOfDay: Hours of the day when the ad will serve, where 0 is
6000	// midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with
6001	// days of week, in which case the ad would serve during these hours on
6002	// the specified days. For example if Monday, Wednesday, Friday are the
6003	// days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is
6004	// specified, the ad would serve Monday, Wednesdays, and Fridays at
6005	// 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive.
6006	HoursOfDay []int64 `json:"hoursOfDay,omitempty"`
6007
6008	// UserLocalTime: Whether or not to use the user's local time. If false,
6009	// the America/New York time zone applies.
6010	UserLocalTime bool `json:"userLocalTime,omitempty"`
6011
6012	// ForceSendFields is a list of field names (e.g. "DaysOfWeek") to
6013	// unconditionally include in API requests. By default, fields with
6014	// empty values are omitted from API requests. However, any non-pointer,
6015	// non-interface field appearing in ForceSendFields will be sent to the
6016	// server regardless of whether the field is empty or not. This may be
6017	// used to include empty fields in Patch requests.
6018	ForceSendFields []string `json:"-"`
6019
6020	// NullFields is a list of field names (e.g. "DaysOfWeek") to include in
6021	// API requests with the JSON null value. By default, fields with empty
6022	// values are omitted from API requests. However, any field with an
6023	// empty value appearing in NullFields will be sent to the server as
6024	// null. It is an error if a field in this list has a non-empty value.
6025	// This may be used to include null fields in Patch requests.
6026	NullFields []string `json:"-"`
6027}
6028
6029func (s *DayPartTargeting) MarshalJSON() ([]byte, error) {
6030	type NoMethod DayPartTargeting
6031	raw := NoMethod(*s)
6032	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6033}
6034
6035// DefaultClickThroughEventTagProperties: Properties of inheriting and
6036// overriding the default click-through event tag. A campaign may
6037// override the event tag defined at the advertiser level, and an ad may
6038// also override the campaign's setting further.
6039type DefaultClickThroughEventTagProperties struct {
6040	// DefaultClickThroughEventTagId: ID of the click-through event tag to
6041	// apply to all ads in this entity's scope.
6042	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
6043
6044	// OverrideInheritedEventTag: Whether this entity should override the
6045	// inherited default click-through event tag with its own defined value.
6046	OverrideInheritedEventTag bool `json:"overrideInheritedEventTag,omitempty"`
6047
6048	// ForceSendFields is a list of field names (e.g.
6049	// "DefaultClickThroughEventTagId") to unconditionally include in API
6050	// requests. By default, fields with empty values are omitted from API
6051	// requests. However, any non-pointer, non-interface field appearing in
6052	// ForceSendFields will be sent to the server regardless of whether the
6053	// field is empty or not. This may be used to include empty fields in
6054	// Patch requests.
6055	ForceSendFields []string `json:"-"`
6056
6057	// NullFields is a list of field names (e.g.
6058	// "DefaultClickThroughEventTagId") to include in API requests with the
6059	// JSON null value. By default, fields with empty values are omitted
6060	// from API requests. However, any field with an empty value appearing
6061	// in NullFields will be sent to the server as null. It is an error if a
6062	// field in this list has a non-empty value. This may be used to include
6063	// null fields in Patch requests.
6064	NullFields []string `json:"-"`
6065}
6066
6067func (s *DefaultClickThroughEventTagProperties) MarshalJSON() ([]byte, error) {
6068	type NoMethod DefaultClickThroughEventTagProperties
6069	raw := NoMethod(*s)
6070	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6071}
6072
6073// DeliverySchedule: Delivery Schedule.
6074type DeliverySchedule struct {
6075	// FrequencyCap: Limit on the number of times an individual user can be
6076	// served the ad within a specified period of time.
6077	FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
6078
6079	// HardCutoff: Whether or not hard cutoff is enabled. If true, the ad
6080	// will not serve after the end date and time. Otherwise the ad will
6081	// continue to be served until it has reached its delivery goals.
6082	HardCutoff bool `json:"hardCutoff,omitempty"`
6083
6084	// ImpressionRatio: Impression ratio for this ad. This ratio determines
6085	// how often each ad is served relative to the others. For example, if
6086	// ad A has an impression ratio of 1 and ad B has an impression ratio of
6087	// 3, then Campaign Manager will serve ad B three times as often as ad
6088	// A. Acceptable values are 1 to 10, inclusive.
6089	ImpressionRatio int64 `json:"impressionRatio,omitempty,string"`
6090
6091	// Priority: Serving priority of an ad, with respect to other ads. The
6092	// lower the priority number, the greater the priority with which it is
6093	// served.
6094	//
6095	// Possible values:
6096	//   "AD_PRIORITY_01"
6097	//   "AD_PRIORITY_02"
6098	//   "AD_PRIORITY_03"
6099	//   "AD_PRIORITY_04"
6100	//   "AD_PRIORITY_05"
6101	//   "AD_PRIORITY_06"
6102	//   "AD_PRIORITY_07"
6103	//   "AD_PRIORITY_08"
6104	//   "AD_PRIORITY_09"
6105	//   "AD_PRIORITY_10"
6106	//   "AD_PRIORITY_11"
6107	//   "AD_PRIORITY_12"
6108	//   "AD_PRIORITY_13"
6109	//   "AD_PRIORITY_14"
6110	//   "AD_PRIORITY_15"
6111	//   "AD_PRIORITY_16"
6112	Priority string `json:"priority,omitempty"`
6113
6114	// ForceSendFields is a list of field names (e.g. "FrequencyCap") to
6115	// unconditionally include in API requests. By default, fields with
6116	// empty values are omitted from API requests. However, any non-pointer,
6117	// non-interface field appearing in ForceSendFields will be sent to the
6118	// server regardless of whether the field is empty or not. This may be
6119	// used to include empty fields in Patch requests.
6120	ForceSendFields []string `json:"-"`
6121
6122	// NullFields is a list of field names (e.g. "FrequencyCap") to include
6123	// in API requests with the JSON null value. By default, fields with
6124	// empty values are omitted from API requests. However, any field with
6125	// an empty value appearing in NullFields will be sent to the server as
6126	// null. It is an error if a field in this list has a non-empty value.
6127	// This may be used to include null fields in Patch requests.
6128	NullFields []string `json:"-"`
6129}
6130
6131func (s *DeliverySchedule) MarshalJSON() ([]byte, error) {
6132	type NoMethod DeliverySchedule
6133	raw := NoMethod(*s)
6134	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6135}
6136
6137// DfpSettings: Google Ad Manager Settings
6138type DfpSettings struct {
6139	// DfpNetworkCode: Ad Manager network code for this directory site.
6140	DfpNetworkCode string `json:"dfpNetworkCode,omitempty"`
6141
6142	// DfpNetworkName: Ad Manager network name for this directory site.
6143	DfpNetworkName string `json:"dfpNetworkName,omitempty"`
6144
6145	// ProgrammaticPlacementAccepted: Whether this directory site accepts
6146	// programmatic placements.
6147	ProgrammaticPlacementAccepted bool `json:"programmaticPlacementAccepted,omitempty"`
6148
6149	// PubPaidPlacementAccepted: Whether this directory site accepts
6150	// publisher-paid tags.
6151	PubPaidPlacementAccepted bool `json:"pubPaidPlacementAccepted,omitempty"`
6152
6153	// PublisherPortalOnly: Whether this directory site is available only
6154	// via Publisher Portal.
6155	PublisherPortalOnly bool `json:"publisherPortalOnly,omitempty"`
6156
6157	// ForceSendFields is a list of field names (e.g. "DfpNetworkCode") to
6158	// unconditionally include in API requests. By default, fields with
6159	// empty values are omitted from API requests. However, any non-pointer,
6160	// non-interface field appearing in ForceSendFields will be sent to the
6161	// server regardless of whether the field is empty or not. This may be
6162	// used to include empty fields in Patch requests.
6163	ForceSendFields []string `json:"-"`
6164
6165	// NullFields is a list of field names (e.g. "DfpNetworkCode") to
6166	// include in API requests with the JSON null value. By default, fields
6167	// with empty values are omitted from API requests. However, any field
6168	// with an empty value appearing in NullFields will be sent to the
6169	// server as null. It is an error if a field in this list has a
6170	// non-empty value. This may be used to include null fields in Patch
6171	// requests.
6172	NullFields []string `json:"-"`
6173}
6174
6175func (s *DfpSettings) MarshalJSON() ([]byte, error) {
6176	type NoMethod DfpSettings
6177	raw := NoMethod(*s)
6178	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6179}
6180
6181// Dimension: Represents a dimension.
6182type Dimension struct {
6183	// Kind: The kind of resource this is, in this case
6184	// dfareporting#dimension.
6185	Kind string `json:"kind,omitempty"`
6186
6187	// Name: The dimension name, e.g. dfa:advertiser
6188	Name string `json:"name,omitempty"`
6189
6190	// ForceSendFields is a list of field names (e.g. "Kind") to
6191	// unconditionally include in API requests. By default, fields with
6192	// empty values are omitted from API requests. However, any non-pointer,
6193	// non-interface field appearing in ForceSendFields will be sent to the
6194	// server regardless of whether the field is empty or not. This may be
6195	// used to include empty fields in Patch requests.
6196	ForceSendFields []string `json:"-"`
6197
6198	// NullFields is a list of field names (e.g. "Kind") to include in API
6199	// requests with the JSON null value. By default, fields with empty
6200	// values are omitted from API requests. However, any field with an
6201	// empty value appearing in NullFields will be sent to the server as
6202	// null. It is an error if a field in this list has a non-empty value.
6203	// This may be used to include null fields in Patch requests.
6204	NullFields []string `json:"-"`
6205}
6206
6207func (s *Dimension) MarshalJSON() ([]byte, error) {
6208	type NoMethod Dimension
6209	raw := NoMethod(*s)
6210	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6211}
6212
6213// DimensionFilter: Represents a dimension filter.
6214type DimensionFilter struct {
6215	// DimensionName: The name of the dimension to filter.
6216	DimensionName string `json:"dimensionName,omitempty"`
6217
6218	// Kind: The kind of resource this is, in this case
6219	// dfareporting#dimensionFilter.
6220	Kind string `json:"kind,omitempty"`
6221
6222	// Value: The value of the dimension to filter.
6223	Value string `json:"value,omitempty"`
6224
6225	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6226	// unconditionally include in API requests. By default, fields with
6227	// empty values are omitted from API requests. However, any non-pointer,
6228	// non-interface field appearing in ForceSendFields will be sent to the
6229	// server regardless of whether the field is empty or not. This may be
6230	// used to include empty fields in Patch requests.
6231	ForceSendFields []string `json:"-"`
6232
6233	// NullFields is a list of field names (e.g. "DimensionName") to include
6234	// in API requests with the JSON null value. By default, fields with
6235	// empty values are omitted from API requests. However, any field with
6236	// an empty value appearing in NullFields will be sent to the server as
6237	// null. It is an error if a field in this list has a non-empty value.
6238	// This may be used to include null fields in Patch requests.
6239	NullFields []string `json:"-"`
6240}
6241
6242func (s *DimensionFilter) MarshalJSON() ([]byte, error) {
6243	type NoMethod DimensionFilter
6244	raw := NoMethod(*s)
6245	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6246}
6247
6248// DimensionValue: Represents a DimensionValue resource.
6249type DimensionValue struct {
6250	// DimensionName: The name of the dimension.
6251	DimensionName string `json:"dimensionName,omitempty"`
6252
6253	// Etag: The eTag of this response for caching purposes.
6254	Etag string `json:"etag,omitempty"`
6255
6256	// Id: The ID associated with the value if available.
6257	Id string `json:"id,omitempty"`
6258
6259	// Kind: The kind of resource this is, in this case
6260	// dfareporting#dimensionValue.
6261	Kind string `json:"kind,omitempty"`
6262
6263	// MatchType: Determines how the 'value' field is matched when
6264	// filtering. If not specified, defaults to EXACT. If set to
6265	// WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable
6266	// length character sequences, and it can be escaped with a backslash.
6267	// Note, only paid search dimensions ('dfa:paidSearch*') allow a
6268	// matchType other than EXACT.
6269	//
6270	// Possible values:
6271	//   "BEGINS_WITH"
6272	//   "CONTAINS"
6273	//   "EXACT"
6274	//   "WILDCARD_EXPRESSION"
6275	MatchType string `json:"matchType,omitempty"`
6276
6277	// Value: The value of the dimension.
6278	Value string `json:"value,omitempty"`
6279
6280	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6281	// unconditionally include in API requests. By default, fields with
6282	// empty values are omitted from API requests. However, any non-pointer,
6283	// non-interface field appearing in ForceSendFields will be sent to the
6284	// server regardless of whether the field is empty or not. This may be
6285	// used to include empty fields in Patch requests.
6286	ForceSendFields []string `json:"-"`
6287
6288	// NullFields is a list of field names (e.g. "DimensionName") to include
6289	// in API requests with the JSON null value. By default, fields with
6290	// empty values are omitted from API requests. However, any field with
6291	// an empty value appearing in NullFields will be sent to the server as
6292	// null. It is an error if a field in this list has a non-empty value.
6293	// This may be used to include null fields in Patch requests.
6294	NullFields []string `json:"-"`
6295}
6296
6297func (s *DimensionValue) MarshalJSON() ([]byte, error) {
6298	type NoMethod DimensionValue
6299	raw := NoMethod(*s)
6300	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6301}
6302
6303// DimensionValueList: Represents the list of DimensionValue resources.
6304type DimensionValueList struct {
6305	// Etag: The eTag of this response for caching purposes.
6306	Etag string `json:"etag,omitempty"`
6307
6308	// Items: The dimension values returned in this response.
6309	Items []*DimensionValue `json:"items,omitempty"`
6310
6311	// Kind: The kind of list this is, in this case
6312	// dfareporting#dimensionValueList.
6313	Kind string `json:"kind,omitempty"`
6314
6315	// NextPageToken: Continuation token used to page through dimension
6316	// values. To retrieve the next page of results, set the next request's
6317	// "pageToken" to the value of this field. The page token is only valid
6318	// for a limited amount of time and should not be persisted.
6319	NextPageToken string `json:"nextPageToken,omitempty"`
6320
6321	// ServerResponse contains the HTTP response code and headers from the
6322	// server.
6323	googleapi.ServerResponse `json:"-"`
6324
6325	// ForceSendFields is a list of field names (e.g. "Etag") to
6326	// unconditionally include in API requests. By default, fields with
6327	// empty values are omitted from API requests. However, any non-pointer,
6328	// non-interface field appearing in ForceSendFields will be sent to the
6329	// server regardless of whether the field is empty or not. This may be
6330	// used to include empty fields in Patch requests.
6331	ForceSendFields []string `json:"-"`
6332
6333	// NullFields is a list of field names (e.g. "Etag") to include in API
6334	// requests with the JSON null value. By default, fields with empty
6335	// values are omitted from API requests. However, any field with an
6336	// empty value appearing in NullFields will be sent to the server as
6337	// null. It is an error if a field in this list has a non-empty value.
6338	// This may be used to include null fields in Patch requests.
6339	NullFields []string `json:"-"`
6340}
6341
6342func (s *DimensionValueList) MarshalJSON() ([]byte, error) {
6343	type NoMethod DimensionValueList
6344	raw := NoMethod(*s)
6345	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6346}
6347
6348// DimensionValueRequest: Represents a DimensionValuesRequest.
6349type DimensionValueRequest struct {
6350	// DimensionName: The name of the dimension for which values should be
6351	// requested.
6352	DimensionName string `json:"dimensionName,omitempty"`
6353
6354	// EndDate: The end date of the date range for which to retrieve
6355	// dimension values. A string of the format "yyyy-MM-dd".
6356	EndDate string `json:"endDate,omitempty"`
6357
6358	// Filters: The list of filters by which to filter values. The filters
6359	// are ANDed.
6360	Filters []*DimensionFilter `json:"filters,omitempty"`
6361
6362	// Kind: The kind of request this is, in this case
6363	// dfareporting#dimensionValueRequest.
6364	Kind string `json:"kind,omitempty"`
6365
6366	// StartDate: The start date of the date range for which to retrieve
6367	// dimension values. A string of the format "yyyy-MM-dd".
6368	StartDate string `json:"startDate,omitempty"`
6369
6370	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6371	// unconditionally include in API requests. By default, fields with
6372	// empty values are omitted from API requests. However, any non-pointer,
6373	// non-interface field appearing in ForceSendFields will be sent to the
6374	// server regardless of whether the field is empty or not. This may be
6375	// used to include empty fields in Patch requests.
6376	ForceSendFields []string `json:"-"`
6377
6378	// NullFields is a list of field names (e.g. "DimensionName") to include
6379	// in API requests with the JSON null value. By default, fields with
6380	// empty values are omitted from API requests. However, any field with
6381	// an empty value appearing in NullFields will be sent to the server as
6382	// null. It is an error if a field in this list has a non-empty value.
6383	// This may be used to include null fields in Patch requests.
6384	NullFields []string `json:"-"`
6385}
6386
6387func (s *DimensionValueRequest) MarshalJSON() ([]byte, error) {
6388	type NoMethod DimensionValueRequest
6389	raw := NoMethod(*s)
6390	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6391}
6392
6393// DirectorySite: DirectorySites contains properties of a website from
6394// the Site Directory. Sites need to be added to an account via the
6395// Sites resource before they can be assigned to a placement.
6396type DirectorySite struct {
6397	// Active: Whether this directory site is active.
6398	Active bool `json:"active,omitempty"`
6399
6400	// ContactAssignments: Directory site contacts.
6401	ContactAssignments []*DirectorySiteContactAssignment `json:"contactAssignments,omitempty"`
6402
6403	// CountryId: Country ID of this directory site. This is a read-only
6404	// field.
6405	CountryId int64 `json:"countryId,omitempty,string"`
6406
6407	// CurrencyId: Currency ID of this directory site. This is a read-only
6408	// field.
6409	// Possible values are:
6410	// - "1" for USD
6411	// - "2" for GBP
6412	// - "3" for ESP
6413	// - "4" for SEK
6414	// - "5" for CAD
6415	// - "6" for JPY
6416	// - "7" for DEM
6417	// - "8" for AUD
6418	// - "9" for FRF
6419	// - "10" for ITL
6420	// - "11" for DKK
6421	// - "12" for NOK
6422	// - "13" for FIM
6423	// - "14" for ZAR
6424	// - "15" for IEP
6425	// - "16" for NLG
6426	// - "17" for EUR
6427	// - "18" for KRW
6428	// - "19" for TWD
6429	// - "20" for SGD
6430	// - "21" for CNY
6431	// - "22" for HKD
6432	// - "23" for NZD
6433	// - "24" for MYR
6434	// - "25" for BRL
6435	// - "26" for PTE
6436	// - "27" for MXP
6437	// - "28" for CLP
6438	// - "29" for TRY
6439	// - "30" for ARS
6440	// - "31" for PEN
6441	// - "32" for ILS
6442	// - "33" for CHF
6443	// - "34" for VEF
6444	// - "35" for COP
6445	// - "36" for GTQ
6446	// - "37" for PLN
6447	// - "39" for INR
6448	// - "40" for THB
6449	// - "41" for IDR
6450	// - "42" for CZK
6451	// - "43" for RON
6452	// - "44" for HUF
6453	// - "45" for RUB
6454	// - "46" for AED
6455	// - "47" for BGN
6456	// - "48" for HRK
6457	// - "49" for MXN
6458	// - "50" for NGN
6459	CurrencyId int64 `json:"currencyId,omitempty,string"`
6460
6461	// Description: Description of this directory site. This is a read-only
6462	// field.
6463	Description string `json:"description,omitempty"`
6464
6465	// Id: ID of this directory site. This is a read-only, auto-generated
6466	// field.
6467	Id int64 `json:"id,omitempty,string"`
6468
6469	// IdDimensionValue: Dimension value for the ID of this directory site.
6470	// This is a read-only, auto-generated field.
6471	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
6472
6473	// InpageTagFormats: Tag types for regular placements.
6474	//
6475	// Acceptable values are:
6476	// - "STANDARD"
6477	// - "IFRAME_JAVASCRIPT_INPAGE"
6478	// - "INTERNAL_REDIRECT_INPAGE"
6479	// - "JAVASCRIPT_INPAGE"
6480	//
6481	// Possible values:
6482	//   "IFRAME_JAVASCRIPT_INPAGE"
6483	//   "INTERNAL_REDIRECT_INPAGE"
6484	//   "JAVASCRIPT_INPAGE"
6485	//   "STANDARD"
6486	InpageTagFormats []string `json:"inpageTagFormats,omitempty"`
6487
6488	// InterstitialTagFormats: Tag types for interstitial
6489	// placements.
6490	//
6491	// Acceptable values are:
6492	// - "IFRAME_JAVASCRIPT_INTERSTITIAL"
6493	// - "INTERNAL_REDIRECT_INTERSTITIAL"
6494	// - "JAVASCRIPT_INTERSTITIAL"
6495	//
6496	// Possible values:
6497	//   "IFRAME_JAVASCRIPT_INTERSTITIAL"
6498	//   "INTERNAL_REDIRECT_INTERSTITIAL"
6499	//   "JAVASCRIPT_INTERSTITIAL"
6500	InterstitialTagFormats []string `json:"interstitialTagFormats,omitempty"`
6501
6502	// Kind: Identifies what kind of resource this is. Value: the fixed
6503	// string "dfareporting#directorySite".
6504	Kind string `json:"kind,omitempty"`
6505
6506	// Name: Name of this directory site.
6507	Name string `json:"name,omitempty"`
6508
6509	// ParentId: Parent directory site ID.
6510	ParentId int64 `json:"parentId,omitempty,string"`
6511
6512	// Settings: Directory site settings.
6513	Settings *DirectorySiteSettings `json:"settings,omitempty"`
6514
6515	// Url: URL of this directory site.
6516	Url string `json:"url,omitempty"`
6517
6518	// ServerResponse contains the HTTP response code and headers from the
6519	// server.
6520	googleapi.ServerResponse `json:"-"`
6521
6522	// ForceSendFields is a list of field names (e.g. "Active") to
6523	// unconditionally include in API requests. By default, fields with
6524	// empty values are omitted from API requests. However, any non-pointer,
6525	// non-interface field appearing in ForceSendFields will be sent to the
6526	// server regardless of whether the field is empty or not. This may be
6527	// used to include empty fields in Patch requests.
6528	ForceSendFields []string `json:"-"`
6529
6530	// NullFields is a list of field names (e.g. "Active") to include in API
6531	// requests with the JSON null value. By default, fields with empty
6532	// values are omitted from API requests. However, any field with an
6533	// empty value appearing in NullFields will be sent to the server as
6534	// null. It is an error if a field in this list has a non-empty value.
6535	// This may be used to include null fields in Patch requests.
6536	NullFields []string `json:"-"`
6537}
6538
6539func (s *DirectorySite) MarshalJSON() ([]byte, error) {
6540	type NoMethod DirectorySite
6541	raw := NoMethod(*s)
6542	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6543}
6544
6545// DirectorySiteContact: Contains properties of a Site Directory
6546// contact.
6547type DirectorySiteContact struct {
6548	// Address: Address of this directory site contact.
6549	Address string `json:"address,omitempty"`
6550
6551	// Email: Email address of this directory site contact.
6552	Email string `json:"email,omitempty"`
6553
6554	// FirstName: First name of this directory site contact.
6555	FirstName string `json:"firstName,omitempty"`
6556
6557	// Id: ID of this directory site contact. This is a read-only,
6558	// auto-generated field.
6559	Id int64 `json:"id,omitempty,string"`
6560
6561	// Kind: Identifies what kind of resource this is. Value: the fixed
6562	// string "dfareporting#directorySiteContact".
6563	Kind string `json:"kind,omitempty"`
6564
6565	// LastName: Last name of this directory site contact.
6566	LastName string `json:"lastName,omitempty"`
6567
6568	// Phone: Phone number of this directory site contact.
6569	Phone string `json:"phone,omitempty"`
6570
6571	// Role: Directory site contact role.
6572	//
6573	// Possible values:
6574	//   "ADMIN"
6575	//   "EDIT"
6576	//   "VIEW"
6577	Role string `json:"role,omitempty"`
6578
6579	// Title: Title or designation of this directory site contact.
6580	Title string `json:"title,omitempty"`
6581
6582	// Type: Directory site contact type.
6583	//
6584	// Possible values:
6585	//   "BILLING"
6586	//   "OTHER"
6587	//   "SALES"
6588	//   "TECHNICAL"
6589	Type string `json:"type,omitempty"`
6590
6591	// ServerResponse contains the HTTP response code and headers from the
6592	// server.
6593	googleapi.ServerResponse `json:"-"`
6594
6595	// ForceSendFields is a list of field names (e.g. "Address") to
6596	// unconditionally include in API requests. By default, fields with
6597	// empty values are omitted from API requests. However, any non-pointer,
6598	// non-interface field appearing in ForceSendFields will be sent to the
6599	// server regardless of whether the field is empty or not. This may be
6600	// used to include empty fields in Patch requests.
6601	ForceSendFields []string `json:"-"`
6602
6603	// NullFields is a list of field names (e.g. "Address") to include in
6604	// API requests with the JSON null value. By default, fields with empty
6605	// values are omitted from API requests. However, any field with an
6606	// empty value appearing in NullFields will be sent to the server as
6607	// null. It is an error if a field in this list has a non-empty value.
6608	// This may be used to include null fields in Patch requests.
6609	NullFields []string `json:"-"`
6610}
6611
6612func (s *DirectorySiteContact) MarshalJSON() ([]byte, error) {
6613	type NoMethod DirectorySiteContact
6614	raw := NoMethod(*s)
6615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6616}
6617
6618// DirectorySiteContactAssignment: Directory Site Contact Assignment
6619type DirectorySiteContactAssignment struct {
6620	// ContactId: ID of this directory site contact. This is a read-only,
6621	// auto-generated field.
6622	ContactId int64 `json:"contactId,omitempty,string"`
6623
6624	// Visibility: Visibility of this directory site contact assignment.
6625	// When set to PUBLIC this contact assignment is visible to all account
6626	// and agency users; when set to PRIVATE it is visible only to the site.
6627	//
6628	// Possible values:
6629	//   "PRIVATE"
6630	//   "PUBLIC"
6631	Visibility string `json:"visibility,omitempty"`
6632
6633	// ForceSendFields is a list of field names (e.g. "ContactId") to
6634	// unconditionally include in API requests. By default, fields with
6635	// empty values are omitted from API requests. However, any non-pointer,
6636	// non-interface field appearing in ForceSendFields will be sent to the
6637	// server regardless of whether the field is empty or not. This may be
6638	// used to include empty fields in Patch requests.
6639	ForceSendFields []string `json:"-"`
6640
6641	// NullFields is a list of field names (e.g. "ContactId") to include in
6642	// API requests with the JSON null value. By default, fields with empty
6643	// values are omitted from API requests. However, any field with an
6644	// empty value appearing in NullFields will be sent to the server as
6645	// null. It is an error if a field in this list has a non-empty value.
6646	// This may be used to include null fields in Patch requests.
6647	NullFields []string `json:"-"`
6648}
6649
6650func (s *DirectorySiteContactAssignment) MarshalJSON() ([]byte, error) {
6651	type NoMethod DirectorySiteContactAssignment
6652	raw := NoMethod(*s)
6653	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6654}
6655
6656// DirectorySiteContactsListResponse: Directory Site Contact List
6657// Response
6658type DirectorySiteContactsListResponse struct {
6659	// DirectorySiteContacts: Directory site contact collection
6660	DirectorySiteContacts []*DirectorySiteContact `json:"directorySiteContacts,omitempty"`
6661
6662	// Kind: Identifies what kind of resource this is. Value: the fixed
6663	// string "dfareporting#directorySiteContactsListResponse".
6664	Kind string `json:"kind,omitempty"`
6665
6666	// NextPageToken: Pagination token to be used for the next list
6667	// operation.
6668	NextPageToken string `json:"nextPageToken,omitempty"`
6669
6670	// ServerResponse contains the HTTP response code and headers from the
6671	// server.
6672	googleapi.ServerResponse `json:"-"`
6673
6674	// ForceSendFields is a list of field names (e.g.
6675	// "DirectorySiteContacts") to unconditionally include in API requests.
6676	// By default, fields with empty values are omitted from API requests.
6677	// However, any non-pointer, non-interface field appearing in
6678	// ForceSendFields will be sent to the server regardless of whether the
6679	// field is empty or not. This may be used to include empty fields in
6680	// Patch requests.
6681	ForceSendFields []string `json:"-"`
6682
6683	// NullFields is a list of field names (e.g. "DirectorySiteContacts") to
6684	// include in API requests with the JSON null value. By default, fields
6685	// with empty values are omitted from API requests. However, any field
6686	// with an empty value appearing in NullFields will be sent to the
6687	// server as null. It is an error if a field in this list has a
6688	// non-empty value. This may be used to include null fields in Patch
6689	// requests.
6690	NullFields []string `json:"-"`
6691}
6692
6693func (s *DirectorySiteContactsListResponse) MarshalJSON() ([]byte, error) {
6694	type NoMethod DirectorySiteContactsListResponse
6695	raw := NoMethod(*s)
6696	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6697}
6698
6699// DirectorySiteSettings: Directory Site Settings
6700type DirectorySiteSettings struct {
6701	// ActiveViewOptOut: Whether this directory site has disabled active
6702	// view creatives.
6703	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
6704
6705	// DfpSettings: Directory site Ad Manager settings.
6706	DfpSettings *DfpSettings `json:"dfpSettings,omitempty"`
6707
6708	// InstreamVideoPlacementAccepted: Whether this site accepts in-stream
6709	// video ads.
6710	InstreamVideoPlacementAccepted bool `json:"instreamVideoPlacementAccepted,omitempty"`
6711
6712	// InterstitialPlacementAccepted: Whether this site accepts interstitial
6713	// ads.
6714	InterstitialPlacementAccepted bool `json:"interstitialPlacementAccepted,omitempty"`
6715
6716	// NielsenOcrOptOut: Whether this directory site has disabled Nielsen
6717	// OCR reach ratings.
6718	NielsenOcrOptOut bool `json:"nielsenOcrOptOut,omitempty"`
6719
6720	// VerificationTagOptOut: Whether this directory site has disabled
6721	// generation of Verification ins tags.
6722	VerificationTagOptOut bool `json:"verificationTagOptOut,omitempty"`
6723
6724	// VideoActiveViewOptOut: Whether this directory site has disabled
6725	// active view for in-stream video creatives. This is a read-only field.
6726	VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"`
6727
6728	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
6729	// unconditionally include in API requests. By default, fields with
6730	// empty values are omitted from API requests. However, any non-pointer,
6731	// non-interface field appearing in ForceSendFields will be sent to the
6732	// server regardless of whether the field is empty or not. This may be
6733	// used to include empty fields in Patch requests.
6734	ForceSendFields []string `json:"-"`
6735
6736	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
6737	// include in API requests with the JSON null value. By default, fields
6738	// with empty values are omitted from API requests. However, any field
6739	// with an empty value appearing in NullFields will be sent to the
6740	// server as null. It is an error if a field in this list has a
6741	// non-empty value. This may be used to include null fields in Patch
6742	// requests.
6743	NullFields []string `json:"-"`
6744}
6745
6746func (s *DirectorySiteSettings) MarshalJSON() ([]byte, error) {
6747	type NoMethod DirectorySiteSettings
6748	raw := NoMethod(*s)
6749	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6750}
6751
6752// DirectorySitesListResponse: Directory Site List Response
6753type DirectorySitesListResponse struct {
6754	// DirectorySites: Directory site collection.
6755	DirectorySites []*DirectorySite `json:"directorySites,omitempty"`
6756
6757	// Kind: Identifies what kind of resource this is. Value: the fixed
6758	// string "dfareporting#directorySitesListResponse".
6759	Kind string `json:"kind,omitempty"`
6760
6761	// NextPageToken: Pagination token to be used for the next list
6762	// operation.
6763	NextPageToken string `json:"nextPageToken,omitempty"`
6764
6765	// ServerResponse contains the HTTP response code and headers from the
6766	// server.
6767	googleapi.ServerResponse `json:"-"`
6768
6769	// ForceSendFields is a list of field names (e.g. "DirectorySites") to
6770	// unconditionally include in API requests. By default, fields with
6771	// empty values are omitted from API requests. However, any non-pointer,
6772	// non-interface field appearing in ForceSendFields will be sent to the
6773	// server regardless of whether the field is empty or not. This may be
6774	// used to include empty fields in Patch requests.
6775	ForceSendFields []string `json:"-"`
6776
6777	// NullFields is a list of field names (e.g. "DirectorySites") to
6778	// include in API requests with the JSON null value. By default, fields
6779	// with empty values are omitted from API requests. However, any field
6780	// with an empty value appearing in NullFields will be sent to the
6781	// server as null. It is an error if a field in this list has a
6782	// non-empty value. This may be used to include null fields in Patch
6783	// requests.
6784	NullFields []string `json:"-"`
6785}
6786
6787func (s *DirectorySitesListResponse) MarshalJSON() ([]byte, error) {
6788	type NoMethod DirectorySitesListResponse
6789	raw := NoMethod(*s)
6790	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6791}
6792
6793// DynamicTargetingKey: Contains properties of a dynamic targeting key.
6794// Dynamic targeting keys are unique, user-friendly labels, created at
6795// the advertiser level in DCM, that can be assigned to ads, creatives,
6796// and placements and used for targeting with Studio dynamic creatives.
6797// Use these labels instead of numeric Campaign Manager IDs (such as
6798// placement IDs) to save time and avoid errors in your dynamic feeds.
6799type DynamicTargetingKey struct {
6800	// Kind: Identifies what kind of resource this is. Value: the fixed
6801	// string "dfareporting#dynamicTargetingKey".
6802	Kind string `json:"kind,omitempty"`
6803
6804	// Name: Name of this dynamic targeting key. This is a required field.
6805	// Must be less than 256 characters long and cannot contain commas. All
6806	// characters are converted to lowercase.
6807	Name string `json:"name,omitempty"`
6808
6809	// ObjectId: ID of the object of this dynamic targeting key. This is a
6810	// required field.
6811	ObjectId int64 `json:"objectId,omitempty,string"`
6812
6813	// ObjectType: Type of the object of this dynamic targeting key. This is
6814	// a required field.
6815	//
6816	// Possible values:
6817	//   "OBJECT_AD"
6818	//   "OBJECT_ADVERTISER"
6819	//   "OBJECT_CREATIVE"
6820	//   "OBJECT_PLACEMENT"
6821	ObjectType string `json:"objectType,omitempty"`
6822
6823	// ServerResponse contains the HTTP response code and headers from the
6824	// server.
6825	googleapi.ServerResponse `json:"-"`
6826
6827	// ForceSendFields is a list of field names (e.g. "Kind") to
6828	// unconditionally include in API requests. By default, fields with
6829	// empty values are omitted from API requests. However, any non-pointer,
6830	// non-interface field appearing in ForceSendFields will be sent to the
6831	// server regardless of whether the field is empty or not. This may be
6832	// used to include empty fields in Patch requests.
6833	ForceSendFields []string `json:"-"`
6834
6835	// NullFields is a list of field names (e.g. "Kind") to include in API
6836	// requests with the JSON null value. By default, fields with empty
6837	// values are omitted from API requests. However, any field with an
6838	// empty value appearing in NullFields will be sent to the server as
6839	// null. It is an error if a field in this list has a non-empty value.
6840	// This may be used to include null fields in Patch requests.
6841	NullFields []string `json:"-"`
6842}
6843
6844func (s *DynamicTargetingKey) MarshalJSON() ([]byte, error) {
6845	type NoMethod DynamicTargetingKey
6846	raw := NoMethod(*s)
6847	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6848}
6849
6850// DynamicTargetingKeysListResponse: Dynamic Targeting Key List Response
6851type DynamicTargetingKeysListResponse struct {
6852	// DynamicTargetingKeys: Dynamic targeting key collection.
6853	DynamicTargetingKeys []*DynamicTargetingKey `json:"dynamicTargetingKeys,omitempty"`
6854
6855	// Kind: Identifies what kind of resource this is. Value: the fixed
6856	// string "dfareporting#dynamicTargetingKeysListResponse".
6857	Kind string `json:"kind,omitempty"`
6858
6859	// ServerResponse contains the HTTP response code and headers from the
6860	// server.
6861	googleapi.ServerResponse `json:"-"`
6862
6863	// ForceSendFields is a list of field names (e.g.
6864	// "DynamicTargetingKeys") to unconditionally include in API requests.
6865	// By default, fields with empty values are omitted from API requests.
6866	// However, any non-pointer, non-interface field appearing in
6867	// ForceSendFields will be sent to the server regardless of whether the
6868	// field is empty or not. This may be used to include empty fields in
6869	// Patch requests.
6870	ForceSendFields []string `json:"-"`
6871
6872	// NullFields is a list of field names (e.g. "DynamicTargetingKeys") to
6873	// include in API requests with the JSON null value. By default, fields
6874	// with empty values are omitted from API requests. However, any field
6875	// with an empty value appearing in NullFields will be sent to the
6876	// server as null. It is an error if a field in this list has a
6877	// non-empty value. This may be used to include null fields in Patch
6878	// requests.
6879	NullFields []string `json:"-"`
6880}
6881
6882func (s *DynamicTargetingKeysListResponse) MarshalJSON() ([]byte, error) {
6883	type NoMethod DynamicTargetingKeysListResponse
6884	raw := NoMethod(*s)
6885	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6886}
6887
6888// EncryptionInfo: A description of how user IDs are encrypted.
6889type EncryptionInfo struct {
6890	// EncryptionEntityId: The encryption entity ID. This should match the
6891	// encryption configuration for ad serving or Data Transfer.
6892	EncryptionEntityId int64 `json:"encryptionEntityId,omitempty,string"`
6893
6894	// EncryptionEntityType: The encryption entity type. This should match
6895	// the encryption configuration for ad serving or Data Transfer.
6896	//
6897	// Possible values:
6898	//   "ADWORDS_CUSTOMER"
6899	//   "DBM_ADVERTISER"
6900	//   "DBM_PARTNER"
6901	//   "DCM_ACCOUNT"
6902	//   "DCM_ADVERTISER"
6903	//   "DFP_NETWORK_CODE"
6904	//   "ENCRYPTION_ENTITY_TYPE_UNKNOWN"
6905	EncryptionEntityType string `json:"encryptionEntityType,omitempty"`
6906
6907	// EncryptionSource: Describes whether the encrypted cookie was received
6908	// from ad serving (the %m macro) or from Data Transfer.
6909	//
6910	// Possible values:
6911	//   "AD_SERVING"
6912	//   "DATA_TRANSFER"
6913	//   "ENCRYPTION_SCOPE_UNKNOWN"
6914	EncryptionSource string `json:"encryptionSource,omitempty"`
6915
6916	// Kind: Identifies what kind of resource this is. Value: the fixed
6917	// string "dfareporting#encryptionInfo".
6918	Kind string `json:"kind,omitempty"`
6919
6920	// ForceSendFields is a list of field names (e.g. "EncryptionEntityId")
6921	// to unconditionally include in API requests. By default, fields with
6922	// empty values are omitted from API requests. However, any non-pointer,
6923	// non-interface field appearing in ForceSendFields will be sent to the
6924	// server regardless of whether the field is empty or not. This may be
6925	// used to include empty fields in Patch requests.
6926	ForceSendFields []string `json:"-"`
6927
6928	// NullFields is a list of field names (e.g. "EncryptionEntityId") to
6929	// include in API requests with the JSON null value. By default, fields
6930	// with empty values are omitted from API requests. However, any field
6931	// with an empty value appearing in NullFields will be sent to the
6932	// server as null. It is an error if a field in this list has a
6933	// non-empty value. This may be used to include null fields in Patch
6934	// requests.
6935	NullFields []string `json:"-"`
6936}
6937
6938func (s *EncryptionInfo) MarshalJSON() ([]byte, error) {
6939	type NoMethod EncryptionInfo
6940	raw := NoMethod(*s)
6941	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6942}
6943
6944// EventTag: Contains properties of an event tag.
6945type EventTag struct {
6946	// AccountId: Account ID of this event tag. This is a read-only field
6947	// that can be left blank.
6948	AccountId int64 `json:"accountId,omitempty,string"`
6949
6950	// AdvertiserId: Advertiser ID of this event tag. This field or the
6951	// campaignId field is required on insertion.
6952	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6953
6954	// AdvertiserIdDimensionValue: Dimension value for the ID of the
6955	// advertiser. This is a read-only, auto-generated field.
6956	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
6957
6958	// CampaignId: Campaign ID of this event tag. This field or the
6959	// advertiserId field is required on insertion.
6960	CampaignId int64 `json:"campaignId,omitempty,string"`
6961
6962	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
6963	// This is a read-only, auto-generated field.
6964	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
6965
6966	// EnabledByDefault: Whether this event tag should be automatically
6967	// enabled for all of the advertiser's campaigns and ads.
6968	EnabledByDefault bool `json:"enabledByDefault,omitempty"`
6969
6970	// ExcludeFromAdxRequests: Whether to remove this event tag from ads
6971	// that are trafficked through Display & Video 360 to Ad Exchange. This
6972	// may be useful if the event tag uses a pixel that is unapproved for Ad
6973	// Exchange bids on one or more networks, such as the Google Display
6974	// Network.
6975	ExcludeFromAdxRequests bool `json:"excludeFromAdxRequests,omitempty"`
6976
6977	// Id: ID of this event tag. This is a read-only, auto-generated field.
6978	Id int64 `json:"id,omitempty,string"`
6979
6980	// Kind: Identifies what kind of resource this is. Value: the fixed
6981	// string "dfareporting#eventTag".
6982	Kind string `json:"kind,omitempty"`
6983
6984	// Name: Name of this event tag. This is a required field and must be
6985	// less than 256 characters long.
6986	Name string `json:"name,omitempty"`
6987
6988	// SiteFilterType: Site filter type for this event tag. If no type is
6989	// specified then the event tag will be applied to all sites.
6990	//
6991	// Possible values:
6992	//   "BLACKLIST"
6993	//   "WHITELIST"
6994	SiteFilterType string `json:"siteFilterType,omitempty"`
6995
6996	// SiteIds: Filter list of site IDs associated with this event tag. The
6997	// siteFilterType determines whether this is a whitelist or blacklist
6998	// filter.
6999	SiteIds googleapi.Int64s `json:"siteIds,omitempty"`
7000
7001	// SslCompliant: Whether this tag is SSL-compliant or not. This is a
7002	// read-only field.
7003	SslCompliant bool `json:"sslCompliant,omitempty"`
7004
7005	// Status: Status of this event tag. Must be ENABLED for this event tag
7006	// to fire. This is a required field.
7007	//
7008	// Possible values:
7009	//   "DISABLED"
7010	//   "ENABLED"
7011	Status string `json:"status,omitempty"`
7012
7013	// SubaccountId: Subaccount ID of this event tag. This is a read-only
7014	// field that can be left blank.
7015	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7016
7017	// Type: Event tag type. Can be used to specify whether to use a
7018	// third-party pixel, a third-party JavaScript URL, or a third-party
7019	// click-through URL for either impression or click tracking. This is a
7020	// required field.
7021	//
7022	// Possible values:
7023	//   "CLICK_THROUGH_EVENT_TAG"
7024	//   "IMPRESSION_IMAGE_EVENT_TAG"
7025	//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
7026	Type string `json:"type,omitempty"`
7027
7028	// Url: Payload URL for this event tag. The URL on a click-through event
7029	// tag should have a landing page URL appended to the end of it. This
7030	// field is required on insertion.
7031	Url string `json:"url,omitempty"`
7032
7033	// UrlEscapeLevels: Number of times the landing page URL should be
7034	// URL-escaped before being appended to the click-through event tag URL.
7035	// Only applies to click-through event tags as specified by the event
7036	// tag type.
7037	UrlEscapeLevels int64 `json:"urlEscapeLevels,omitempty"`
7038
7039	// ServerResponse contains the HTTP response code and headers from the
7040	// server.
7041	googleapi.ServerResponse `json:"-"`
7042
7043	// ForceSendFields is a list of field names (e.g. "AccountId") to
7044	// unconditionally include in API requests. By default, fields with
7045	// empty values are omitted from API requests. However, any non-pointer,
7046	// non-interface field appearing in ForceSendFields will be sent to the
7047	// server regardless of whether the field is empty or not. This may be
7048	// used to include empty fields in Patch requests.
7049	ForceSendFields []string `json:"-"`
7050
7051	// NullFields is a list of field names (e.g. "AccountId") to include in
7052	// API requests with the JSON null value. By default, fields with empty
7053	// values are omitted from API requests. However, any field with an
7054	// empty value appearing in NullFields will be sent to the server as
7055	// null. It is an error if a field in this list has a non-empty value.
7056	// This may be used to include null fields in Patch requests.
7057	NullFields []string `json:"-"`
7058}
7059
7060func (s *EventTag) MarshalJSON() ([]byte, error) {
7061	type NoMethod EventTag
7062	raw := NoMethod(*s)
7063	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7064}
7065
7066// EventTagOverride: Event tag override information.
7067type EventTagOverride struct {
7068	// Enabled: Whether this override is enabled.
7069	Enabled bool `json:"enabled,omitempty"`
7070
7071	// Id: ID of this event tag override. This is a read-only,
7072	// auto-generated field.
7073	Id int64 `json:"id,omitempty,string"`
7074
7075	// ForceSendFields is a list of field names (e.g. "Enabled") to
7076	// unconditionally include in API requests. By default, fields with
7077	// empty values are omitted from API requests. However, any non-pointer,
7078	// non-interface field appearing in ForceSendFields will be sent to the
7079	// server regardless of whether the field is empty or not. This may be
7080	// used to include empty fields in Patch requests.
7081	ForceSendFields []string `json:"-"`
7082
7083	// NullFields is a list of field names (e.g. "Enabled") to include in
7084	// API requests with the JSON null value. By default, fields with empty
7085	// values are omitted from API requests. However, any field with an
7086	// empty value appearing in NullFields will be sent to the server as
7087	// null. It is an error if a field in this list has a non-empty value.
7088	// This may be used to include null fields in Patch requests.
7089	NullFields []string `json:"-"`
7090}
7091
7092func (s *EventTagOverride) MarshalJSON() ([]byte, error) {
7093	type NoMethod EventTagOverride
7094	raw := NoMethod(*s)
7095	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7096}
7097
7098// EventTagsListResponse: Event Tag List Response
7099type EventTagsListResponse struct {
7100	// EventTags: Event tag collection.
7101	EventTags []*EventTag `json:"eventTags,omitempty"`
7102
7103	// Kind: Identifies what kind of resource this is. Value: the fixed
7104	// string "dfareporting#eventTagsListResponse".
7105	Kind string `json:"kind,omitempty"`
7106
7107	// ServerResponse contains the HTTP response code and headers from the
7108	// server.
7109	googleapi.ServerResponse `json:"-"`
7110
7111	// ForceSendFields is a list of field names (e.g. "EventTags") to
7112	// unconditionally include in API requests. By default, fields with
7113	// empty values are omitted from API requests. However, any non-pointer,
7114	// non-interface field appearing in ForceSendFields will be sent to the
7115	// server regardless of whether the field is empty or not. This may be
7116	// used to include empty fields in Patch requests.
7117	ForceSendFields []string `json:"-"`
7118
7119	// NullFields is a list of field names (e.g. "EventTags") to include in
7120	// API requests with the JSON null value. By default, fields with empty
7121	// values are omitted from API requests. However, any field with an
7122	// empty value appearing in NullFields will be sent to the server as
7123	// null. It is an error if a field in this list has a non-empty value.
7124	// This may be used to include null fields in Patch requests.
7125	NullFields []string `json:"-"`
7126}
7127
7128func (s *EventTagsListResponse) MarshalJSON() ([]byte, error) {
7129	type NoMethod EventTagsListResponse
7130	raw := NoMethod(*s)
7131	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7132}
7133
7134// File: Represents a File resource. A file contains the metadata for a
7135// report run. It shows the status of the run and holds the URLs to the
7136// generated report data if the run is finished and the status is
7137// "REPORT_AVAILABLE".
7138type File struct {
7139	// DateRange: The date range for which the file has report data. The
7140	// date range will always be the absolute date range for which the
7141	// report is run.
7142	DateRange *DateRange `json:"dateRange,omitempty"`
7143
7144	// Etag: The eTag of this response for caching purposes.
7145	Etag string `json:"etag,omitempty"`
7146
7147	// FileName: The filename of the file.
7148	FileName string `json:"fileName,omitempty"`
7149
7150	// Format: The output format of the report. Only available once the file
7151	// is available.
7152	//
7153	// Possible values:
7154	//   "CSV"
7155	//   "EXCEL"
7156	Format string `json:"format,omitempty"`
7157
7158	// Id: The unique ID of this report file.
7159	Id int64 `json:"id,omitempty,string"`
7160
7161	// Kind: The kind of resource this is, in this case dfareporting#file.
7162	Kind string `json:"kind,omitempty"`
7163
7164	// LastModifiedTime: The timestamp in milliseconds since epoch when this
7165	// file was last modified.
7166	LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"`
7167
7168	// ReportId: The ID of the report this file was generated from.
7169	ReportId int64 `json:"reportId,omitempty,string"`
7170
7171	// Status: The status of the report file.
7172	//
7173	// Possible values:
7174	//   "CANCELLED"
7175	//   "FAILED"
7176	//   "PROCESSING"
7177	//   "REPORT_AVAILABLE"
7178	Status string `json:"status,omitempty"`
7179
7180	// Urls: The URLs where the completed report file can be downloaded.
7181	Urls *FileUrls `json:"urls,omitempty"`
7182
7183	// ServerResponse contains the HTTP response code and headers from the
7184	// server.
7185	googleapi.ServerResponse `json:"-"`
7186
7187	// ForceSendFields is a list of field names (e.g. "DateRange") to
7188	// unconditionally include in API requests. By default, fields with
7189	// empty values are omitted from API requests. However, any non-pointer,
7190	// non-interface field appearing in ForceSendFields will be sent to the
7191	// server regardless of whether the field is empty or not. This may be
7192	// used to include empty fields in Patch requests.
7193	ForceSendFields []string `json:"-"`
7194
7195	// NullFields is a list of field names (e.g. "DateRange") to include in
7196	// API requests with the JSON null value. By default, fields with empty
7197	// values are omitted from API requests. However, any field with an
7198	// empty value appearing in NullFields will be sent to the server as
7199	// null. It is an error if a field in this list has a non-empty value.
7200	// This may be used to include null fields in Patch requests.
7201	NullFields []string `json:"-"`
7202}
7203
7204func (s *File) MarshalJSON() ([]byte, error) {
7205	type NoMethod File
7206	raw := NoMethod(*s)
7207	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7208}
7209
7210// FileUrls: The URLs where the completed report file can be downloaded.
7211type FileUrls struct {
7212	// ApiUrl: The URL for downloading the report data through the API.
7213	ApiUrl string `json:"apiUrl,omitempty"`
7214
7215	// BrowserUrl: The URL for downloading the report data through a
7216	// browser.
7217	BrowserUrl string `json:"browserUrl,omitempty"`
7218
7219	// ForceSendFields is a list of field names (e.g. "ApiUrl") to
7220	// unconditionally include in API requests. By default, fields with
7221	// empty values are omitted from API requests. However, any non-pointer,
7222	// non-interface field appearing in ForceSendFields will be sent to the
7223	// server regardless of whether the field is empty or not. This may be
7224	// used to include empty fields in Patch requests.
7225	ForceSendFields []string `json:"-"`
7226
7227	// NullFields is a list of field names (e.g. "ApiUrl") to include in API
7228	// requests with the JSON null value. By default, fields with empty
7229	// values are omitted from API requests. However, any field with an
7230	// empty value appearing in NullFields will be sent to the server as
7231	// null. It is an error if a field in this list has a non-empty value.
7232	// This may be used to include null fields in Patch requests.
7233	NullFields []string `json:"-"`
7234}
7235
7236func (s *FileUrls) MarshalJSON() ([]byte, error) {
7237	type NoMethod FileUrls
7238	raw := NoMethod(*s)
7239	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7240}
7241
7242// FileList: Represents the list of File resources.
7243type FileList struct {
7244	// Etag: The eTag of this response for caching purposes.
7245	Etag string `json:"etag,omitempty"`
7246
7247	// Items: The files returned in this response.
7248	Items []*File `json:"items,omitempty"`
7249
7250	// Kind: The kind of list this is, in this case dfareporting#fileList.
7251	Kind string `json:"kind,omitempty"`
7252
7253	// NextPageToken: Continuation token used to page through files. To
7254	// retrieve the next page of results, set the next request's "pageToken"
7255	// to the value of this field. The page token is only valid for a
7256	// limited amount of time and should not be persisted.
7257	NextPageToken string `json:"nextPageToken,omitempty"`
7258
7259	// ServerResponse contains the HTTP response code and headers from the
7260	// server.
7261	googleapi.ServerResponse `json:"-"`
7262
7263	// ForceSendFields is a list of field names (e.g. "Etag") to
7264	// unconditionally include in API requests. By default, fields with
7265	// empty values are omitted from API requests. However, any non-pointer,
7266	// non-interface field appearing in ForceSendFields will be sent to the
7267	// server regardless of whether the field is empty or not. This may be
7268	// used to include empty fields in Patch requests.
7269	ForceSendFields []string `json:"-"`
7270
7271	// NullFields is a list of field names (e.g. "Etag") to include in API
7272	// requests with the JSON null value. By default, fields with empty
7273	// values are omitted from API requests. However, any field with an
7274	// empty value appearing in NullFields will be sent to the server as
7275	// null. It is an error if a field in this list has a non-empty value.
7276	// This may be used to include null fields in Patch requests.
7277	NullFields []string `json:"-"`
7278}
7279
7280func (s *FileList) MarshalJSON() ([]byte, error) {
7281	type NoMethod FileList
7282	raw := NoMethod(*s)
7283	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7284}
7285
7286// Flight: Flight
7287type Flight struct {
7288	// EndDate: Inventory item flight end date.
7289	EndDate string `json:"endDate,omitempty"`
7290
7291	// RateOrCost: Rate or cost of this flight.
7292	RateOrCost int64 `json:"rateOrCost,omitempty,string"`
7293
7294	// StartDate: Inventory item flight start date.
7295	StartDate string `json:"startDate,omitempty"`
7296
7297	// Units: Units of this flight.
7298	Units int64 `json:"units,omitempty,string"`
7299
7300	// ForceSendFields is a list of field names (e.g. "EndDate") to
7301	// unconditionally include in API requests. By default, fields with
7302	// empty values are omitted from API requests. However, any non-pointer,
7303	// non-interface field appearing in ForceSendFields will be sent to the
7304	// server regardless of whether the field is empty or not. This may be
7305	// used to include empty fields in Patch requests.
7306	ForceSendFields []string `json:"-"`
7307
7308	// NullFields is a list of field names (e.g. "EndDate") to include in
7309	// API requests with the JSON null value. By default, fields with empty
7310	// values are omitted from API requests. However, any field with an
7311	// empty value appearing in NullFields will be sent to the server as
7312	// null. It is an error if a field in this list has a non-empty value.
7313	// This may be used to include null fields in Patch requests.
7314	NullFields []string `json:"-"`
7315}
7316
7317func (s *Flight) MarshalJSON() ([]byte, error) {
7318	type NoMethod Flight
7319	raw := NoMethod(*s)
7320	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7321}
7322
7323// FloodlightActivitiesGenerateTagResponse: Floodlight Activity
7324// GenerateTag Response
7325type FloodlightActivitiesGenerateTagResponse struct {
7326	// FloodlightActivityTag: Generated tag for this Floodlight activity.
7327	// For global site tags, this is the event snippet.
7328	FloodlightActivityTag string `json:"floodlightActivityTag,omitempty"`
7329
7330	// GlobalSiteTagGlobalSnippet: The global snippet section of a global
7331	// site tag. The global site tag sets new cookies on your domain, which
7332	// will store a unique identifier for a user or the ad click that
7333	// brought the user to your site. Learn more.
7334	GlobalSiteTagGlobalSnippet string `json:"globalSiteTagGlobalSnippet,omitempty"`
7335
7336	// Kind: Identifies what kind of resource this is. Value: the fixed
7337	// string "dfareporting#floodlightActivitiesGenerateTagResponse".
7338	Kind string `json:"kind,omitempty"`
7339
7340	// ServerResponse contains the HTTP response code and headers from the
7341	// server.
7342	googleapi.ServerResponse `json:"-"`
7343
7344	// ForceSendFields is a list of field names (e.g.
7345	// "FloodlightActivityTag") to unconditionally include in API requests.
7346	// By default, fields with empty values are omitted from API requests.
7347	// However, any non-pointer, non-interface field appearing in
7348	// ForceSendFields will be sent to the server regardless of whether the
7349	// field is empty or not. This may be used to include empty fields in
7350	// Patch requests.
7351	ForceSendFields []string `json:"-"`
7352
7353	// NullFields is a list of field names (e.g. "FloodlightActivityTag") to
7354	// include in API requests with the JSON null value. By default, fields
7355	// with empty values are omitted from API requests. However, any field
7356	// with an empty value appearing in NullFields will be sent to the
7357	// server as null. It is an error if a field in this list has a
7358	// non-empty value. This may be used to include null fields in Patch
7359	// requests.
7360	NullFields []string `json:"-"`
7361}
7362
7363func (s *FloodlightActivitiesGenerateTagResponse) MarshalJSON() ([]byte, error) {
7364	type NoMethod FloodlightActivitiesGenerateTagResponse
7365	raw := NoMethod(*s)
7366	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7367}
7368
7369// FloodlightActivitiesListResponse: Floodlight Activity List Response
7370type FloodlightActivitiesListResponse struct {
7371	// FloodlightActivities: Floodlight activity collection.
7372	FloodlightActivities []*FloodlightActivity `json:"floodlightActivities,omitempty"`
7373
7374	// Kind: Identifies what kind of resource this is. Value: the fixed
7375	// string "dfareporting#floodlightActivitiesListResponse".
7376	Kind string `json:"kind,omitempty"`
7377
7378	// NextPageToken: Pagination token to be used for the next list
7379	// operation.
7380	NextPageToken string `json:"nextPageToken,omitempty"`
7381
7382	// ServerResponse contains the HTTP response code and headers from the
7383	// server.
7384	googleapi.ServerResponse `json:"-"`
7385
7386	// ForceSendFields is a list of field names (e.g.
7387	// "FloodlightActivities") to unconditionally include in API requests.
7388	// By default, fields with empty values are omitted from API requests.
7389	// However, any non-pointer, non-interface field appearing in
7390	// ForceSendFields will be sent to the server regardless of whether the
7391	// field is empty or not. This may be used to include empty fields in
7392	// Patch requests.
7393	ForceSendFields []string `json:"-"`
7394
7395	// NullFields is a list of field names (e.g. "FloodlightActivities") to
7396	// include in API requests with the JSON null value. By default, fields
7397	// with empty values are omitted from API requests. However, any field
7398	// with an empty value appearing in NullFields will be sent to the
7399	// server as null. It is an error if a field in this list has a
7400	// non-empty value. This may be used to include null fields in Patch
7401	// requests.
7402	NullFields []string `json:"-"`
7403}
7404
7405func (s *FloodlightActivitiesListResponse) MarshalJSON() ([]byte, error) {
7406	type NoMethod FloodlightActivitiesListResponse
7407	raw := NoMethod(*s)
7408	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7409}
7410
7411// FloodlightActivity: Contains properties of a Floodlight activity.
7412type FloodlightActivity struct {
7413	// AccountId: Account ID of this floodlight activity. This is a
7414	// read-only field that can be left blank.
7415	AccountId int64 `json:"accountId,omitempty,string"`
7416
7417	// AdvertiserId: Advertiser ID of this floodlight activity. If this
7418	// field is left blank, the value will be copied over either from the
7419	// activity group's advertiser or the existing activity's advertiser.
7420	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7421
7422	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7423	// advertiser. This is a read-only, auto-generated field.
7424	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7425
7426	// CacheBustingType: Code type used for cache busting in the generated
7427	// tag. Applicable only when floodlightActivityGroupType is COUNTER and
7428	// countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING.
7429	//
7430	// Possible values:
7431	//   "ACTIVE_SERVER_PAGE"
7432	//   "COLD_FUSION"
7433	//   "JAVASCRIPT"
7434	//   "JSP"
7435	//   "PHP"
7436	CacheBustingType string `json:"cacheBustingType,omitempty"`
7437
7438	// CountingMethod: Counting method for conversions for this floodlight
7439	// activity. This is a required field.
7440	//
7441	// Possible values:
7442	//   "ITEMS_SOLD_COUNTING"
7443	//   "SESSION_COUNTING"
7444	//   "STANDARD_COUNTING"
7445	//   "TRANSACTIONS_COUNTING"
7446	//   "UNIQUE_COUNTING"
7447	CountingMethod string `json:"countingMethod,omitempty"`
7448
7449	// DefaultTags: Dynamic floodlight tags.
7450	DefaultTags []*FloodlightActivityDynamicTag `json:"defaultTags,omitempty"`
7451
7452	// ExpectedUrl: URL where this tag will be deployed. If specified, must
7453	// be less than 256 characters long.
7454	ExpectedUrl string `json:"expectedUrl,omitempty"`
7455
7456	// FloodlightActivityGroupId: Floodlight activity group ID of this
7457	// floodlight activity. This is a required field.
7458	FloodlightActivityGroupId int64 `json:"floodlightActivityGroupId,omitempty,string"`
7459
7460	// FloodlightActivityGroupName: Name of the associated floodlight
7461	// activity group. This is a read-only field.
7462	FloodlightActivityGroupName string `json:"floodlightActivityGroupName,omitempty"`
7463
7464	// FloodlightActivityGroupTagString: Tag string of the associated
7465	// floodlight activity group. This is a read-only field.
7466	FloodlightActivityGroupTagString string `json:"floodlightActivityGroupTagString,omitempty"`
7467
7468	// FloodlightActivityGroupType: Type of the associated floodlight
7469	// activity group. This is a read-only field.
7470	//
7471	// Possible values:
7472	//   "COUNTER"
7473	//   "SALE"
7474	FloodlightActivityGroupType string `json:"floodlightActivityGroupType,omitempty"`
7475
7476	// FloodlightConfigurationId: Floodlight configuration ID of this
7477	// floodlight activity. If this field is left blank, the value will be
7478	// copied over either from the activity group's floodlight configuration
7479	// or from the existing activity's floodlight configuration.
7480	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7481
7482	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7483	// of the floodlight configuration. This is a read-only, auto-generated
7484	// field.
7485	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7486
7487	// FloodlightTagType: The type of Floodlight tag this activity will
7488	// generate. This is a required field.
7489	//
7490	// Possible values:
7491	//   "GLOBAL_SITE_TAG"
7492	//   "IFRAME"
7493	//   "IMAGE"
7494	FloodlightTagType string `json:"floodlightTagType,omitempty"`
7495
7496	// Hidden: Whether this activity is archived.
7497	Hidden bool `json:"hidden,omitempty"`
7498
7499	// Id: ID of this floodlight activity. This is a read-only,
7500	// auto-generated field.
7501	Id int64 `json:"id,omitempty,string"`
7502
7503	// IdDimensionValue: Dimension value for the ID of this floodlight
7504	// activity. This is a read-only, auto-generated field.
7505	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7506
7507	// Kind: Identifies what kind of resource this is. Value: the fixed
7508	// string "dfareporting#floodlightActivity".
7509	Kind string `json:"kind,omitempty"`
7510
7511	// Name: Name of this floodlight activity. This is a required field.
7512	// Must be less than 129 characters long and cannot contain quotes.
7513	Name string `json:"name,omitempty"`
7514
7515	// Notes: General notes or implementation instructions for the tag.
7516	Notes string `json:"notes,omitempty"`
7517
7518	// PublisherTags: Publisher dynamic floodlight tags.
7519	PublisherTags []*FloodlightActivityPublisherDynamicTag `json:"publisherTags,omitempty"`
7520
7521	// Secure: Whether this tag should use SSL.
7522	Secure bool `json:"secure,omitempty"`
7523
7524	// SslCompliant: Whether the floodlight activity is SSL-compliant. This
7525	// is a read-only field, its value detected by the system from the
7526	// floodlight tags.
7527	SslCompliant bool `json:"sslCompliant,omitempty"`
7528
7529	// SslRequired: Whether this floodlight activity must be SSL-compliant.
7530	SslRequired bool `json:"sslRequired,omitempty"`
7531
7532	// SubaccountId: Subaccount ID of this floodlight activity. This is a
7533	// read-only field that can be left blank.
7534	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7535
7536	// TagFormat: Tag format type for the floodlight activity. If left
7537	// blank, the tag format will default to HTML.
7538	//
7539	// Possible values:
7540	//   "HTML"
7541	//   "XHTML"
7542	TagFormat string `json:"tagFormat,omitempty"`
7543
7544	// TagString: Value of the cat= parameter in the floodlight tag, which
7545	// the ad servers use to identify the activity. This is optional: if
7546	// empty, a new tag string will be generated for you. This string must
7547	// be 1 to 8 characters long, with valid characters being
7548	// [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among
7549	// activities of the same activity group. This field is read-only after
7550	// insertion.
7551	TagString string `json:"tagString,omitempty"`
7552
7553	// UserDefinedVariableTypes: List of the user-defined variables used by
7554	// this conversion tag. These map to the "u[1-100]=" in the tags. Each
7555	// of these can have a user defined type.
7556	// Acceptable values are U1 to U100, inclusive.
7557	//
7558	// Possible values:
7559	//   "U1"
7560	//   "U10"
7561	//   "U100"
7562	//   "U11"
7563	//   "U12"
7564	//   "U13"
7565	//   "U14"
7566	//   "U15"
7567	//   "U16"
7568	//   "U17"
7569	//   "U18"
7570	//   "U19"
7571	//   "U2"
7572	//   "U20"
7573	//   "U21"
7574	//   "U22"
7575	//   "U23"
7576	//   "U24"
7577	//   "U25"
7578	//   "U26"
7579	//   "U27"
7580	//   "U28"
7581	//   "U29"
7582	//   "U3"
7583	//   "U30"
7584	//   "U31"
7585	//   "U32"
7586	//   "U33"
7587	//   "U34"
7588	//   "U35"
7589	//   "U36"
7590	//   "U37"
7591	//   "U38"
7592	//   "U39"
7593	//   "U4"
7594	//   "U40"
7595	//   "U41"
7596	//   "U42"
7597	//   "U43"
7598	//   "U44"
7599	//   "U45"
7600	//   "U46"
7601	//   "U47"
7602	//   "U48"
7603	//   "U49"
7604	//   "U5"
7605	//   "U50"
7606	//   "U51"
7607	//   "U52"
7608	//   "U53"
7609	//   "U54"
7610	//   "U55"
7611	//   "U56"
7612	//   "U57"
7613	//   "U58"
7614	//   "U59"
7615	//   "U6"
7616	//   "U60"
7617	//   "U61"
7618	//   "U62"
7619	//   "U63"
7620	//   "U64"
7621	//   "U65"
7622	//   "U66"
7623	//   "U67"
7624	//   "U68"
7625	//   "U69"
7626	//   "U7"
7627	//   "U70"
7628	//   "U71"
7629	//   "U72"
7630	//   "U73"
7631	//   "U74"
7632	//   "U75"
7633	//   "U76"
7634	//   "U77"
7635	//   "U78"
7636	//   "U79"
7637	//   "U8"
7638	//   "U80"
7639	//   "U81"
7640	//   "U82"
7641	//   "U83"
7642	//   "U84"
7643	//   "U85"
7644	//   "U86"
7645	//   "U87"
7646	//   "U88"
7647	//   "U89"
7648	//   "U9"
7649	//   "U90"
7650	//   "U91"
7651	//   "U92"
7652	//   "U93"
7653	//   "U94"
7654	//   "U95"
7655	//   "U96"
7656	//   "U97"
7657	//   "U98"
7658	//   "U99"
7659	UserDefinedVariableTypes []string `json:"userDefinedVariableTypes,omitempty"`
7660
7661	// ServerResponse contains the HTTP response code and headers from the
7662	// server.
7663	googleapi.ServerResponse `json:"-"`
7664
7665	// ForceSendFields is a list of field names (e.g. "AccountId") to
7666	// unconditionally include in API requests. By default, fields with
7667	// empty values are omitted from API requests. However, any non-pointer,
7668	// non-interface field appearing in ForceSendFields will be sent to the
7669	// server regardless of whether the field is empty or not. This may be
7670	// used to include empty fields in Patch requests.
7671	ForceSendFields []string `json:"-"`
7672
7673	// NullFields is a list of field names (e.g. "AccountId") to include in
7674	// API requests with the JSON null value. By default, fields with empty
7675	// values are omitted from API requests. However, any field with an
7676	// empty value appearing in NullFields will be sent to the server as
7677	// null. It is an error if a field in this list has a non-empty value.
7678	// This may be used to include null fields in Patch requests.
7679	NullFields []string `json:"-"`
7680}
7681
7682func (s *FloodlightActivity) MarshalJSON() ([]byte, error) {
7683	type NoMethod FloodlightActivity
7684	raw := NoMethod(*s)
7685	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7686}
7687
7688// FloodlightActivityDynamicTag: Dynamic Tag
7689type FloodlightActivityDynamicTag struct {
7690	// Id: ID of this dynamic tag. This is a read-only, auto-generated
7691	// field.
7692	Id int64 `json:"id,omitempty,string"`
7693
7694	// Name: Name of this tag.
7695	Name string `json:"name,omitempty"`
7696
7697	// Tag: Tag code.
7698	Tag string `json:"tag,omitempty"`
7699
7700	// ForceSendFields is a list of field names (e.g. "Id") to
7701	// unconditionally include in API requests. By default, fields with
7702	// empty values are omitted from API requests. However, any non-pointer,
7703	// non-interface field appearing in ForceSendFields will be sent to the
7704	// server regardless of whether the field is empty or not. This may be
7705	// used to include empty fields in Patch requests.
7706	ForceSendFields []string `json:"-"`
7707
7708	// NullFields is a list of field names (e.g. "Id") to include in API
7709	// requests with the JSON null value. By default, fields with empty
7710	// values are omitted from API requests. However, any field with an
7711	// empty value appearing in NullFields will be sent to the server as
7712	// null. It is an error if a field in this list has a non-empty value.
7713	// This may be used to include null fields in Patch requests.
7714	NullFields []string `json:"-"`
7715}
7716
7717func (s *FloodlightActivityDynamicTag) MarshalJSON() ([]byte, error) {
7718	type NoMethod FloodlightActivityDynamicTag
7719	raw := NoMethod(*s)
7720	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7721}
7722
7723// FloodlightActivityGroup: Contains properties of a Floodlight activity
7724// group.
7725type FloodlightActivityGroup struct {
7726	// AccountId: Account ID of this floodlight activity group. This is a
7727	// read-only field that can be left blank.
7728	AccountId int64 `json:"accountId,omitempty,string"`
7729
7730	// AdvertiserId: Advertiser ID of this floodlight activity group. If
7731	// this field is left blank, the value will be copied over either from
7732	// the floodlight configuration's advertiser or from the existing
7733	// activity group's advertiser.
7734	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7735
7736	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7737	// advertiser. This is a read-only, auto-generated field.
7738	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7739
7740	// FloodlightConfigurationId: Floodlight configuration ID of this
7741	// floodlight activity group. This is a required field.
7742	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7743
7744	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7745	// of the floodlight configuration. This is a read-only, auto-generated
7746	// field.
7747	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7748
7749	// Id: ID of this floodlight activity group. This is a read-only,
7750	// auto-generated field.
7751	Id int64 `json:"id,omitempty,string"`
7752
7753	// IdDimensionValue: Dimension value for the ID of this floodlight
7754	// activity group. This is a read-only, auto-generated field.
7755	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7756
7757	// Kind: Identifies what kind of resource this is. Value: the fixed
7758	// string "dfareporting#floodlightActivityGroup".
7759	Kind string `json:"kind,omitempty"`
7760
7761	// Name: Name of this floodlight activity group. This is a required
7762	// field. Must be less than 65 characters long and cannot contain
7763	// quotes.
7764	Name string `json:"name,omitempty"`
7765
7766	// SubaccountId: Subaccount ID of this floodlight activity group. This
7767	// is a read-only field that can be left blank.
7768	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7769
7770	// TagString: Value of the type= parameter in the floodlight tag, which
7771	// the ad servers use to identify the activity group that the activity
7772	// belongs to. This is optional: if empty, a new tag string will be
7773	// generated for you. This string must be 1 to 8 characters long, with
7774	// valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must
7775	// also be unique among activity groups of the same floodlight
7776	// configuration. This field is read-only after insertion.
7777	TagString string `json:"tagString,omitempty"`
7778
7779	// Type: Type of the floodlight activity group. This is a required field
7780	// that is read-only after insertion.
7781	//
7782	// Possible values:
7783	//   "COUNTER"
7784	//   "SALE"
7785	Type string `json:"type,omitempty"`
7786
7787	// ServerResponse contains the HTTP response code and headers from the
7788	// server.
7789	googleapi.ServerResponse `json:"-"`
7790
7791	// ForceSendFields is a list of field names (e.g. "AccountId") to
7792	// unconditionally include in API requests. By default, fields with
7793	// empty values are omitted from API requests. However, any non-pointer,
7794	// non-interface field appearing in ForceSendFields will be sent to the
7795	// server regardless of whether the field is empty or not. This may be
7796	// used to include empty fields in Patch requests.
7797	ForceSendFields []string `json:"-"`
7798
7799	// NullFields is a list of field names (e.g. "AccountId") to include in
7800	// API requests with the JSON null value. By default, fields with empty
7801	// values are omitted from API requests. However, any field with an
7802	// empty value appearing in NullFields will be sent to the server as
7803	// null. It is an error if a field in this list has a non-empty value.
7804	// This may be used to include null fields in Patch requests.
7805	NullFields []string `json:"-"`
7806}
7807
7808func (s *FloodlightActivityGroup) MarshalJSON() ([]byte, error) {
7809	type NoMethod FloodlightActivityGroup
7810	raw := NoMethod(*s)
7811	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7812}
7813
7814// FloodlightActivityGroupsListResponse: Floodlight Activity Group List
7815// Response
7816type FloodlightActivityGroupsListResponse struct {
7817	// FloodlightActivityGroups: Floodlight activity group collection.
7818	FloodlightActivityGroups []*FloodlightActivityGroup `json:"floodlightActivityGroups,omitempty"`
7819
7820	// Kind: Identifies what kind of resource this is. Value: the fixed
7821	// string "dfareporting#floodlightActivityGroupsListResponse".
7822	Kind string `json:"kind,omitempty"`
7823
7824	// NextPageToken: Pagination token to be used for the next list
7825	// operation.
7826	NextPageToken string `json:"nextPageToken,omitempty"`
7827
7828	// ServerResponse contains the HTTP response code and headers from the
7829	// server.
7830	googleapi.ServerResponse `json:"-"`
7831
7832	// ForceSendFields is a list of field names (e.g.
7833	// "FloodlightActivityGroups") to unconditionally include in API
7834	// requests. By default, fields with empty values are omitted from API
7835	// requests. However, any non-pointer, non-interface field appearing in
7836	// ForceSendFields will be sent to the server regardless of whether the
7837	// field is empty or not. This may be used to include empty fields in
7838	// Patch requests.
7839	ForceSendFields []string `json:"-"`
7840
7841	// NullFields is a list of field names (e.g. "FloodlightActivityGroups")
7842	// to include in API requests with the JSON null value. By default,
7843	// fields with empty values are omitted from API requests. However, any
7844	// field with an empty value appearing in NullFields will be sent to the
7845	// server as null. It is an error if a field in this list has a
7846	// non-empty value. This may be used to include null fields in Patch
7847	// requests.
7848	NullFields []string `json:"-"`
7849}
7850
7851func (s *FloodlightActivityGroupsListResponse) MarshalJSON() ([]byte, error) {
7852	type NoMethod FloodlightActivityGroupsListResponse
7853	raw := NoMethod(*s)
7854	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7855}
7856
7857// FloodlightActivityPublisherDynamicTag: Publisher Dynamic Tag
7858type FloodlightActivityPublisherDynamicTag struct {
7859	// ClickThrough: Whether this tag is applicable only for click-throughs.
7860	ClickThrough bool `json:"clickThrough,omitempty"`
7861
7862	// DirectorySiteId: Directory site ID of this dynamic tag. This is a
7863	// write-only field that can be used as an alternative to the siteId
7864	// field. When this resource is retrieved, only the siteId field will be
7865	// populated.
7866	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
7867
7868	// DynamicTag: Dynamic floodlight tag.
7869	DynamicTag *FloodlightActivityDynamicTag `json:"dynamicTag,omitempty"`
7870
7871	// SiteId: Site ID of this dynamic tag.
7872	SiteId int64 `json:"siteId,omitempty,string"`
7873
7874	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
7875	// a read-only, auto-generated field.
7876	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
7877
7878	// ViewThrough: Whether this tag is applicable only for view-throughs.
7879	ViewThrough bool `json:"viewThrough,omitempty"`
7880
7881	// ForceSendFields is a list of field names (e.g. "ClickThrough") to
7882	// unconditionally include in API requests. By default, fields with
7883	// empty values are omitted from API requests. However, any non-pointer,
7884	// non-interface field appearing in ForceSendFields will be sent to the
7885	// server regardless of whether the field is empty or not. This may be
7886	// used to include empty fields in Patch requests.
7887	ForceSendFields []string `json:"-"`
7888
7889	// NullFields is a list of field names (e.g. "ClickThrough") to include
7890	// in API requests with the JSON null value. By default, fields with
7891	// empty values are omitted from API requests. However, any field with
7892	// an empty value appearing in NullFields will be sent to the server as
7893	// null. It is an error if a field in this list has a non-empty value.
7894	// This may be used to include null fields in Patch requests.
7895	NullFields []string `json:"-"`
7896}
7897
7898func (s *FloodlightActivityPublisherDynamicTag) MarshalJSON() ([]byte, error) {
7899	type NoMethod FloodlightActivityPublisherDynamicTag
7900	raw := NoMethod(*s)
7901	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7902}
7903
7904// FloodlightConfiguration: Contains properties of a Floodlight
7905// configuration.
7906type FloodlightConfiguration struct {
7907	// AccountId: Account ID of this floodlight configuration. This is a
7908	// read-only field that can be left blank.
7909	AccountId int64 `json:"accountId,omitempty,string"`
7910
7911	// AdvertiserId: Advertiser ID of the parent advertiser of this
7912	// floodlight configuration.
7913	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7914
7915	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7916	// advertiser. This is a read-only, auto-generated field.
7917	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7918
7919	// AnalyticsDataSharingEnabled: Whether advertiser data is shared with
7920	// Google Analytics.
7921	AnalyticsDataSharingEnabled bool `json:"analyticsDataSharingEnabled,omitempty"`
7922
7923	// ExposureToConversionEnabled: Whether the exposure-to-conversion
7924	// report is enabled. This report shows detailed pathway information on
7925	// up to 10 of the most recent ad exposures seen by a user before
7926	// converting.
7927	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
7928
7929	// FirstDayOfWeek: Day that will be counted as the first day of the week
7930	// in reports. This is a required field.
7931	//
7932	// Possible values:
7933	//   "MONDAY"
7934	//   "SUNDAY"
7935	FirstDayOfWeek string `json:"firstDayOfWeek,omitempty"`
7936
7937	// Id: ID of this floodlight configuration. This is a read-only,
7938	// auto-generated field.
7939	Id int64 `json:"id,omitempty,string"`
7940
7941	// IdDimensionValue: Dimension value for the ID of this floodlight
7942	// configuration. This is a read-only, auto-generated field.
7943	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7944
7945	// InAppAttributionTrackingEnabled: Whether in-app attribution tracking
7946	// is enabled.
7947	InAppAttributionTrackingEnabled bool `json:"inAppAttributionTrackingEnabled,omitempty"`
7948
7949	// Kind: Identifies what kind of resource this is. Value: the fixed
7950	// string "dfareporting#floodlightConfiguration".
7951	Kind string `json:"kind,omitempty"`
7952
7953	// LookbackConfiguration: Lookback window settings for this floodlight
7954	// configuration.
7955	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
7956
7957	// NaturalSearchConversionAttributionOption: Types of attribution
7958	// options for natural search conversions.
7959	//
7960	// Possible values:
7961	//   "EXCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
7962	//   "INCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
7963	//   "INCLUDE_NATURAL_SEARCH_TIERED_CONVERSION_ATTRIBUTION"
7964	NaturalSearchConversionAttributionOption string `json:"naturalSearchConversionAttributionOption,omitempty"`
7965
7966	// OmnitureSettings: Settings for Campaign Manager Omniture integration.
7967	OmnitureSettings *OmnitureSettings `json:"omnitureSettings,omitempty"`
7968
7969	// SubaccountId: Subaccount ID of this floodlight configuration. This is
7970	// a read-only field that can be left blank.
7971	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7972
7973	// TagSettings: Configuration settings for dynamic and image floodlight
7974	// tags.
7975	TagSettings *TagSettings `json:"tagSettings,omitempty"`
7976
7977	// ThirdPartyAuthenticationTokens: List of third-party authentication
7978	// tokens enabled for this configuration.
7979	ThirdPartyAuthenticationTokens []*ThirdPartyAuthenticationToken `json:"thirdPartyAuthenticationTokens,omitempty"`
7980
7981	// UserDefinedVariableConfigurations: List of user defined variables
7982	// enabled for this configuration.
7983	UserDefinedVariableConfigurations []*UserDefinedVariableConfiguration `json:"userDefinedVariableConfigurations,omitempty"`
7984
7985	// ServerResponse contains the HTTP response code and headers from the
7986	// server.
7987	googleapi.ServerResponse `json:"-"`
7988
7989	// ForceSendFields is a list of field names (e.g. "AccountId") 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. "AccountId") to include in
7998	// API requests with the JSON null value. By default, fields with empty
7999	// values are omitted from API requests. However, any field with an
8000	// empty value appearing in NullFields will be sent to the server as
8001	// null. It is an error if a field in this list has a non-empty value.
8002	// This may be used to include null fields in Patch requests.
8003	NullFields []string `json:"-"`
8004}
8005
8006func (s *FloodlightConfiguration) MarshalJSON() ([]byte, error) {
8007	type NoMethod FloodlightConfiguration
8008	raw := NoMethod(*s)
8009	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8010}
8011
8012// FloodlightConfigurationsListResponse: Floodlight Configuration List
8013// Response
8014type FloodlightConfigurationsListResponse struct {
8015	// FloodlightConfigurations: Floodlight configuration collection.
8016	FloodlightConfigurations []*FloodlightConfiguration `json:"floodlightConfigurations,omitempty"`
8017
8018	// Kind: Identifies what kind of resource this is. Value: the fixed
8019	// string "dfareporting#floodlightConfigurationsListResponse".
8020	Kind string `json:"kind,omitempty"`
8021
8022	// ServerResponse contains the HTTP response code and headers from the
8023	// server.
8024	googleapi.ServerResponse `json:"-"`
8025
8026	// ForceSendFields is a list of field names (e.g.
8027	// "FloodlightConfigurations") to unconditionally include in API
8028	// requests. By default, fields with empty values are omitted from API
8029	// requests. However, any non-pointer, non-interface field appearing in
8030	// ForceSendFields will be sent to the server regardless of whether the
8031	// field is empty or not. This may be used to include empty fields in
8032	// Patch requests.
8033	ForceSendFields []string `json:"-"`
8034
8035	// NullFields is a list of field names (e.g. "FloodlightConfigurations")
8036	// to include in API requests with the JSON null value. By default,
8037	// fields with empty values are omitted from API requests. However, any
8038	// field with an empty value appearing in NullFields will be sent to the
8039	// server as null. It is an error if a field in this list has a
8040	// non-empty value. This may be used to include null fields in Patch
8041	// requests.
8042	NullFields []string `json:"-"`
8043}
8044
8045func (s *FloodlightConfigurationsListResponse) MarshalJSON() ([]byte, error) {
8046	type NoMethod FloodlightConfigurationsListResponse
8047	raw := NoMethod(*s)
8048	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8049}
8050
8051// FloodlightReportCompatibleFields: Represents fields that are
8052// compatible to be selected for a report of type "FlOODLIGHT".
8053type FloodlightReportCompatibleFields struct {
8054	// DimensionFilters: Dimensions which are compatible to be selected in
8055	// the "dimensionFilters" section of the report.
8056	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
8057
8058	// Dimensions: Dimensions which are compatible to be selected in the
8059	// "dimensions" section of the report.
8060	Dimensions []*Dimension `json:"dimensions,omitempty"`
8061
8062	// Kind: The kind of resource this is, in this case
8063	// dfareporting#floodlightReportCompatibleFields.
8064	Kind string `json:"kind,omitempty"`
8065
8066	// Metrics: Metrics which are compatible to be selected in the
8067	// "metricNames" section of the report.
8068	Metrics []*Metric `json:"metrics,omitempty"`
8069
8070	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
8071	// unconditionally include in API requests. By default, fields with
8072	// empty values are omitted from API requests. However, any non-pointer,
8073	// non-interface field appearing in ForceSendFields will be sent to the
8074	// server regardless of whether the field is empty or not. This may be
8075	// used to include empty fields in Patch requests.
8076	ForceSendFields []string `json:"-"`
8077
8078	// NullFields is a list of field names (e.g. "DimensionFilters") to
8079	// include in API requests with the JSON null value. By default, fields
8080	// with empty values are omitted from API requests. However, any field
8081	// with an empty value appearing in NullFields will be sent to the
8082	// server as null. It is an error if a field in this list has a
8083	// non-empty value. This may be used to include null fields in Patch
8084	// requests.
8085	NullFields []string `json:"-"`
8086}
8087
8088func (s *FloodlightReportCompatibleFields) MarshalJSON() ([]byte, error) {
8089	type NoMethod FloodlightReportCompatibleFields
8090	raw := NoMethod(*s)
8091	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8092}
8093
8094// FrequencyCap: Frequency Cap.
8095type FrequencyCap struct {
8096	// Duration: Duration of time, in seconds, for this frequency cap. The
8097	// maximum duration is 90 days. Acceptable values are 1 to 7776000,
8098	// inclusive.
8099	Duration int64 `json:"duration,omitempty,string"`
8100
8101	// Impressions: Number of times an individual user can be served the ad
8102	// within the specified duration. Acceptable values are 1 to 15,
8103	// inclusive.
8104	Impressions int64 `json:"impressions,omitempty,string"`
8105
8106	// ForceSendFields is a list of field names (e.g. "Duration") to
8107	// unconditionally include in API requests. By default, fields with
8108	// empty values are omitted from API requests. However, any non-pointer,
8109	// non-interface field appearing in ForceSendFields will be sent to the
8110	// server regardless of whether the field is empty or not. This may be
8111	// used to include empty fields in Patch requests.
8112	ForceSendFields []string `json:"-"`
8113
8114	// NullFields is a list of field names (e.g. "Duration") to include in
8115	// API requests with the JSON null value. By default, fields with empty
8116	// values are omitted from API requests. However, any field with an
8117	// empty value appearing in NullFields will be sent to the server as
8118	// null. It is an error if a field in this list has a non-empty value.
8119	// This may be used to include null fields in Patch requests.
8120	NullFields []string `json:"-"`
8121}
8122
8123func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
8124	type NoMethod FrequencyCap
8125	raw := NoMethod(*s)
8126	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8127}
8128
8129// FsCommand: FsCommand.
8130type FsCommand struct {
8131	// Left: Distance from the left of the browser.Applicable when
8132	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
8133	Left int64 `json:"left,omitempty"`
8134
8135	// PositionOption: Position in the browser where the window will open.
8136	//
8137	// Possible values:
8138	//   "CENTERED"
8139	//   "DISTANCE_FROM_TOP_LEFT_CORNER"
8140	PositionOption string `json:"positionOption,omitempty"`
8141
8142	// Top: Distance from the top of the browser. Applicable when
8143	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
8144	Top int64 `json:"top,omitempty"`
8145
8146	// WindowHeight: Height of the window.
8147	WindowHeight int64 `json:"windowHeight,omitempty"`
8148
8149	// WindowWidth: Width of the window.
8150	WindowWidth int64 `json:"windowWidth,omitempty"`
8151
8152	// ForceSendFields is a list of field names (e.g. "Left") to
8153	// unconditionally include in API requests. By default, fields with
8154	// empty values are omitted from API requests. However, any non-pointer,
8155	// non-interface field appearing in ForceSendFields will be sent to the
8156	// server regardless of whether the field is empty or not. This may be
8157	// used to include empty fields in Patch requests.
8158	ForceSendFields []string `json:"-"`
8159
8160	// NullFields is a list of field names (e.g. "Left") to include in API
8161	// requests with the JSON null value. By default, fields with empty
8162	// values are omitted from API requests. However, any field with an
8163	// empty value appearing in NullFields will be sent to the server as
8164	// null. It is an error if a field in this list has a non-empty value.
8165	// This may be used to include null fields in Patch requests.
8166	NullFields []string `json:"-"`
8167}
8168
8169func (s *FsCommand) MarshalJSON() ([]byte, error) {
8170	type NoMethod FsCommand
8171	raw := NoMethod(*s)
8172	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8173}
8174
8175// GeoTargeting: Geographical Targeting.
8176type GeoTargeting struct {
8177	// Cities: Cities to be targeted. For each city only dartId is required.
8178	// The other fields are populated automatically when the ad is inserted
8179	// or updated. If targeting a city, do not target or exclude the country
8180	// of the city, and do not target the metro or region of the city.
8181	Cities []*City `json:"cities,omitempty"`
8182
8183	// Countries: Countries to be targeted or excluded from targeting,
8184	// depending on the setting of the excludeCountries field. For each
8185	// country only dartId is required. The other fields are populated
8186	// automatically when the ad is inserted or updated. If targeting or
8187	// excluding a country, do not target regions, cities, metros, or postal
8188	// codes in the same country.
8189	Countries []*Country `json:"countries,omitempty"`
8190
8191	// ExcludeCountries: Whether or not to exclude the countries in the
8192	// countries field from targeting. If false, the countries field refers
8193	// to countries which will be targeted by the ad.
8194	ExcludeCountries bool `json:"excludeCountries,omitempty"`
8195
8196	// Metros: Metros to be targeted. For each metro only dmaId is required.
8197	// The other fields are populated automatically when the ad is inserted
8198	// or updated. If targeting a metro, do not target or exclude the
8199	// country of the metro.
8200	Metros []*Metro `json:"metros,omitempty"`
8201
8202	// PostalCodes: Postal codes to be targeted. For each postal code only
8203	// id is required. The other fields are populated automatically when the
8204	// ad is inserted or updated. If targeting a postal code, do not target
8205	// or exclude the country of the postal code.
8206	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
8207
8208	// Regions: Regions to be targeted. For each region only dartId is
8209	// required. The other fields are populated automatically when the ad is
8210	// inserted or updated. If targeting a region, do not target or exclude
8211	// the country of the region.
8212	Regions []*Region `json:"regions,omitempty"`
8213
8214	// ForceSendFields is a list of field names (e.g. "Cities") to
8215	// unconditionally include in API requests. By default, fields with
8216	// empty values are omitted from API requests. However, any non-pointer,
8217	// non-interface field appearing in ForceSendFields will be sent to the
8218	// server regardless of whether the field is empty or not. This may be
8219	// used to include empty fields in Patch requests.
8220	ForceSendFields []string `json:"-"`
8221
8222	// NullFields is a list of field names (e.g. "Cities") to include in API
8223	// requests with the JSON null value. By default, fields with empty
8224	// values are omitted from API requests. However, any field with an
8225	// empty value appearing in NullFields will be sent to the server as
8226	// null. It is an error if a field in this list has a non-empty value.
8227	// This may be used to include null fields in Patch requests.
8228	NullFields []string `json:"-"`
8229}
8230
8231func (s *GeoTargeting) MarshalJSON() ([]byte, error) {
8232	type NoMethod GeoTargeting
8233	raw := NoMethod(*s)
8234	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8235}
8236
8237// InventoryItem: Represents a buy from the Planning inventory store.
8238type InventoryItem struct {
8239	// AccountId: Account ID of this inventory item.
8240	AccountId int64 `json:"accountId,omitempty,string"`
8241
8242	// AdSlots: Ad slots of this inventory item. If this inventory item
8243	// represents a standalone placement, there will be exactly one ad slot.
8244	// If this inventory item represents a placement group, there will be
8245	// more than one ad slot, each representing one child placement in that
8246	// placement group.
8247	AdSlots []*AdSlot `json:"adSlots,omitempty"`
8248
8249	// AdvertiserId: Advertiser ID of this inventory item.
8250	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8251
8252	// ContentCategoryId: Content category ID of this inventory item.
8253	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
8254
8255	// EstimatedClickThroughRate: Estimated click-through rate of this
8256	// inventory item.
8257	EstimatedClickThroughRate int64 `json:"estimatedClickThroughRate,omitempty,string"`
8258
8259	// EstimatedConversionRate: Estimated conversion rate of this inventory
8260	// item.
8261	EstimatedConversionRate int64 `json:"estimatedConversionRate,omitempty,string"`
8262
8263	// Id: ID of this inventory item.
8264	Id int64 `json:"id,omitempty,string"`
8265
8266	// InPlan: Whether this inventory item is in plan.
8267	InPlan bool `json:"inPlan,omitempty"`
8268
8269	// Kind: Identifies what kind of resource this is. Value: the fixed
8270	// string "dfareporting#inventoryItem".
8271	Kind string `json:"kind,omitempty"`
8272
8273	// LastModifiedInfo: Information about the most recent modification of
8274	// this inventory item.
8275	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
8276
8277	// Name: Name of this inventory item. For standalone inventory items,
8278	// this is the same name as that of its only ad slot. For group
8279	// inventory items, this can differ from the name of any of its ad
8280	// slots.
8281	Name string `json:"name,omitempty"`
8282
8283	// NegotiationChannelId: Negotiation channel ID of this inventory item.
8284	NegotiationChannelId int64 `json:"negotiationChannelId,omitempty,string"`
8285
8286	// OrderId: Order ID of this inventory item.
8287	OrderId int64 `json:"orderId,omitempty,string"`
8288
8289	// PlacementStrategyId: Placement strategy ID of this inventory item.
8290	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
8291
8292	// Pricing: Pricing of this inventory item.
8293	Pricing *Pricing `json:"pricing,omitempty"`
8294
8295	// ProjectId: Project ID of this inventory item.
8296	ProjectId int64 `json:"projectId,omitempty,string"`
8297
8298	// RfpId: RFP ID of this inventory item.
8299	RfpId int64 `json:"rfpId,omitempty,string"`
8300
8301	// SiteId: ID of the site this inventory item is associated with.
8302	SiteId int64 `json:"siteId,omitempty,string"`
8303
8304	// SubaccountId: Subaccount ID of this inventory item.
8305	SubaccountId int64 `json:"subaccountId,omitempty,string"`
8306
8307	// Type: Type of inventory item.
8308	//
8309	// Possible values:
8310	//   "PLANNING_PLACEMENT_TYPE_CREDIT"
8311	//   "PLANNING_PLACEMENT_TYPE_REGULAR"
8312	Type string `json:"type,omitempty"`
8313
8314	// ServerResponse contains the HTTP response code and headers from the
8315	// server.
8316	googleapi.ServerResponse `json:"-"`
8317
8318	// ForceSendFields is a list of field names (e.g. "AccountId") to
8319	// unconditionally include in API requests. By default, fields with
8320	// empty values are omitted from API requests. However, any non-pointer,
8321	// non-interface field appearing in ForceSendFields will be sent to the
8322	// server regardless of whether the field is empty or not. This may be
8323	// used to include empty fields in Patch requests.
8324	ForceSendFields []string `json:"-"`
8325
8326	// NullFields is a list of field names (e.g. "AccountId") to include in
8327	// API requests with the JSON null value. By default, fields with empty
8328	// values are omitted from API requests. However, any field with an
8329	// empty value appearing in NullFields will be sent to the server as
8330	// null. It is an error if a field in this list has a non-empty value.
8331	// This may be used to include null fields in Patch requests.
8332	NullFields []string `json:"-"`
8333}
8334
8335func (s *InventoryItem) MarshalJSON() ([]byte, error) {
8336	type NoMethod InventoryItem
8337	raw := NoMethod(*s)
8338	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8339}
8340
8341// InventoryItemsListResponse: Inventory item List Response
8342type InventoryItemsListResponse struct {
8343	// InventoryItems: Inventory item collection
8344	InventoryItems []*InventoryItem `json:"inventoryItems,omitempty"`
8345
8346	// Kind: Identifies what kind of resource this is. Value: the fixed
8347	// string "dfareporting#inventoryItemsListResponse".
8348	Kind string `json:"kind,omitempty"`
8349
8350	// NextPageToken: Pagination token to be used for the next list
8351	// operation.
8352	NextPageToken string `json:"nextPageToken,omitempty"`
8353
8354	// ServerResponse contains the HTTP response code and headers from the
8355	// server.
8356	googleapi.ServerResponse `json:"-"`
8357
8358	// ForceSendFields is a list of field names (e.g. "InventoryItems") to
8359	// unconditionally include in API requests. By default, fields with
8360	// empty values are omitted from API requests. However, any non-pointer,
8361	// non-interface field appearing in ForceSendFields will be sent to the
8362	// server regardless of whether the field is empty or not. This may be
8363	// used to include empty fields in Patch requests.
8364	ForceSendFields []string `json:"-"`
8365
8366	// NullFields is a list of field names (e.g. "InventoryItems") to
8367	// include in API requests with the JSON null value. By default, fields
8368	// with empty values are omitted from API requests. However, any field
8369	// with an empty value appearing in NullFields will be sent to the
8370	// server as null. It is an error if a field in this list has a
8371	// non-empty value. This may be used to include null fields in Patch
8372	// requests.
8373	NullFields []string `json:"-"`
8374}
8375
8376func (s *InventoryItemsListResponse) MarshalJSON() ([]byte, error) {
8377	type NoMethod InventoryItemsListResponse
8378	raw := NoMethod(*s)
8379	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8380}
8381
8382// KeyValueTargetingExpression: Key Value Targeting Expression.
8383type KeyValueTargetingExpression struct {
8384	// Expression: Keyword expression being targeted by the ad.
8385	Expression string `json:"expression,omitempty"`
8386
8387	// ForceSendFields is a list of field names (e.g. "Expression") to
8388	// unconditionally include in API requests. By default, fields with
8389	// empty values are omitted from API requests. However, any non-pointer,
8390	// non-interface field appearing in ForceSendFields will be sent to the
8391	// server regardless of whether the field is empty or not. This may be
8392	// used to include empty fields in Patch requests.
8393	ForceSendFields []string `json:"-"`
8394
8395	// NullFields is a list of field names (e.g. "Expression") to include in
8396	// API requests with the JSON null value. By default, fields with empty
8397	// values are omitted from API requests. However, any field with an
8398	// empty value appearing in NullFields will be sent to the server as
8399	// null. It is an error if a field in this list has a non-empty value.
8400	// This may be used to include null fields in Patch requests.
8401	NullFields []string `json:"-"`
8402}
8403
8404func (s *KeyValueTargetingExpression) MarshalJSON() ([]byte, error) {
8405	type NoMethod KeyValueTargetingExpression
8406	raw := NoMethod(*s)
8407	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8408}
8409
8410// LandingPage: Contains information about where a user's browser is
8411// taken after the user clicks an ad.
8412type LandingPage struct {
8413	// AdvertiserId: Advertiser ID of this landing page. This is a required
8414	// field.
8415	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8416
8417	// Archived: Whether this landing page has been archived.
8418	Archived bool `json:"archived,omitempty"`
8419
8420	// Id: ID of this landing page. This is a read-only, auto-generated
8421	// field.
8422	Id int64 `json:"id,omitempty,string"`
8423
8424	// Kind: Identifies what kind of resource this is. Value: the fixed
8425	// string "dfareporting#landingPage".
8426	Kind string `json:"kind,omitempty"`
8427
8428	// Name: Name of this landing page. This is a required field. It must be
8429	// less than 256 characters long.
8430	Name string `json:"name,omitempty"`
8431
8432	// Url: URL of this landing page. This is a required field.
8433	Url string `json:"url,omitempty"`
8434
8435	// ServerResponse contains the HTTP response code and headers from the
8436	// server.
8437	googleapi.ServerResponse `json:"-"`
8438
8439	// ForceSendFields is a list of field names (e.g. "AdvertiserId") to
8440	// unconditionally include in API requests. By default, fields with
8441	// empty values are omitted from API requests. However, any non-pointer,
8442	// non-interface field appearing in ForceSendFields will be sent to the
8443	// server regardless of whether the field is empty or not. This may be
8444	// used to include empty fields in Patch requests.
8445	ForceSendFields []string `json:"-"`
8446
8447	// NullFields is a list of field names (e.g. "AdvertiserId") to include
8448	// in API requests with the JSON null value. By default, fields with
8449	// empty values are omitted from API requests. However, any field with
8450	// an empty value appearing in NullFields will be sent to the server as
8451	// null. It is an error if a field in this list has a non-empty value.
8452	// This may be used to include null fields in Patch requests.
8453	NullFields []string `json:"-"`
8454}
8455
8456func (s *LandingPage) MarshalJSON() ([]byte, error) {
8457	type NoMethod LandingPage
8458	raw := NoMethod(*s)
8459	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8460}
8461
8462// Language: Contains information about a language that can be targeted
8463// by ads.
8464type Language struct {
8465	// Id: Language ID of this language. This is the ID used for targeting
8466	// and generating reports.
8467	Id int64 `json:"id,omitempty,string"`
8468
8469	// Kind: Identifies what kind of resource this is. Value: the fixed
8470	// string "dfareporting#language".
8471	Kind string `json:"kind,omitempty"`
8472
8473	// LanguageCode: Format of language code is an ISO 639 two-letter
8474	// language code optionally followed by an underscore followed by an ISO
8475	// 3166 code. Examples are "en" for English or "zh_CN" for Simplified
8476	// Chinese.
8477	LanguageCode string `json:"languageCode,omitempty"`
8478
8479	// Name: Name of this language.
8480	Name string `json:"name,omitempty"`
8481
8482	// ForceSendFields is a list of field names (e.g. "Id") to
8483	// unconditionally include in API requests. By default, fields with
8484	// empty values are omitted from API requests. However, any non-pointer,
8485	// non-interface field appearing in ForceSendFields will be sent to the
8486	// server regardless of whether the field is empty or not. This may be
8487	// used to include empty fields in Patch requests.
8488	ForceSendFields []string `json:"-"`
8489
8490	// NullFields is a list of field names (e.g. "Id") to include in API
8491	// requests with the JSON null value. By default, fields with empty
8492	// values are omitted from API requests. However, any field with an
8493	// empty value appearing in NullFields will be sent to the server as
8494	// null. It is an error if a field in this list has a non-empty value.
8495	// This may be used to include null fields in Patch requests.
8496	NullFields []string `json:"-"`
8497}
8498
8499func (s *Language) MarshalJSON() ([]byte, error) {
8500	type NoMethod Language
8501	raw := NoMethod(*s)
8502	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8503}
8504
8505// LanguageTargeting: Language Targeting.
8506type LanguageTargeting struct {
8507	// Languages: Languages that this ad targets. For each language only
8508	// languageId is required. The other fields are populated automatically
8509	// when the ad is inserted or updated.
8510	Languages []*Language `json:"languages,omitempty"`
8511
8512	// ForceSendFields is a list of field names (e.g. "Languages") to
8513	// unconditionally include in API requests. By default, fields with
8514	// empty values are omitted from API requests. However, any non-pointer,
8515	// non-interface field appearing in ForceSendFields will be sent to the
8516	// server regardless of whether the field is empty or not. This may be
8517	// used to include empty fields in Patch requests.
8518	ForceSendFields []string `json:"-"`
8519
8520	// NullFields is a list of field names (e.g. "Languages") to include in
8521	// API requests with the JSON null value. By default, fields with empty
8522	// values are omitted from API requests. However, any field with an
8523	// empty value appearing in NullFields will be sent to the server as
8524	// null. It is an error if a field in this list has a non-empty value.
8525	// This may be used to include null fields in Patch requests.
8526	NullFields []string `json:"-"`
8527}
8528
8529func (s *LanguageTargeting) MarshalJSON() ([]byte, error) {
8530	type NoMethod LanguageTargeting
8531	raw := NoMethod(*s)
8532	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8533}
8534
8535// LanguagesListResponse: Language List Response
8536type LanguagesListResponse struct {
8537	// Kind: Identifies what kind of resource this is. Value: the fixed
8538	// string "dfareporting#languagesListResponse".
8539	Kind string `json:"kind,omitempty"`
8540
8541	// Languages: Language collection.
8542	Languages []*Language `json:"languages,omitempty"`
8543
8544	// ServerResponse contains the HTTP response code and headers from the
8545	// server.
8546	googleapi.ServerResponse `json:"-"`
8547
8548	// ForceSendFields is a list of field names (e.g. "Kind") to
8549	// unconditionally include in API requests. By default, fields with
8550	// empty values are omitted from API requests. However, any non-pointer,
8551	// non-interface field appearing in ForceSendFields will be sent to the
8552	// server regardless of whether the field is empty or not. This may be
8553	// used to include empty fields in Patch requests.
8554	ForceSendFields []string `json:"-"`
8555
8556	// NullFields is a list of field names (e.g. "Kind") to include in API
8557	// requests with the JSON null value. By default, fields with empty
8558	// values are omitted from API requests. However, any field with an
8559	// empty value appearing in NullFields will be sent to the server as
8560	// null. It is an error if a field in this list has a non-empty value.
8561	// This may be used to include null fields in Patch requests.
8562	NullFields []string `json:"-"`
8563}
8564
8565func (s *LanguagesListResponse) MarshalJSON() ([]byte, error) {
8566	type NoMethod LanguagesListResponse
8567	raw := NoMethod(*s)
8568	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8569}
8570
8571// LastModifiedInfo: Modification timestamp.
8572type LastModifiedInfo struct {
8573	// Time: Timestamp of the last change in milliseconds since epoch.
8574	Time int64 `json:"time,omitempty,string"`
8575
8576	// ForceSendFields is a list of field names (e.g. "Time") to
8577	// unconditionally include in API requests. By default, fields with
8578	// empty values are omitted from API requests. However, any non-pointer,
8579	// non-interface field appearing in ForceSendFields will be sent to the
8580	// server regardless of whether the field is empty or not. This may be
8581	// used to include empty fields in Patch requests.
8582	ForceSendFields []string `json:"-"`
8583
8584	// NullFields is a list of field names (e.g. "Time") to include in API
8585	// requests with the JSON null value. By default, fields with empty
8586	// values are omitted from API requests. However, any field with an
8587	// empty value appearing in NullFields will be sent to the server as
8588	// null. It is an error if a field in this list has a non-empty value.
8589	// This may be used to include null fields in Patch requests.
8590	NullFields []string `json:"-"`
8591}
8592
8593func (s *LastModifiedInfo) MarshalJSON() ([]byte, error) {
8594	type NoMethod LastModifiedInfo
8595	raw := NoMethod(*s)
8596	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8597}
8598
8599// ListPopulationClause: A group clause made up of list population terms
8600// representing constraints joined by ORs.
8601type ListPopulationClause struct {
8602	// Terms: Terms of this list population clause. Each clause is made up
8603	// of list population terms representing constraints and are joined by
8604	// ORs.
8605	Terms []*ListPopulationTerm `json:"terms,omitempty"`
8606
8607	// ForceSendFields is a list of field names (e.g. "Terms") to
8608	// unconditionally include in API requests. By default, fields with
8609	// empty values are omitted from API requests. However, any non-pointer,
8610	// non-interface field appearing in ForceSendFields will be sent to the
8611	// server regardless of whether the field is empty or not. This may be
8612	// used to include empty fields in Patch requests.
8613	ForceSendFields []string `json:"-"`
8614
8615	// NullFields is a list of field names (e.g. "Terms") to include in API
8616	// requests with the JSON null value. By default, fields with empty
8617	// values are omitted from API requests. However, any field with an
8618	// empty value appearing in NullFields will be sent to the server as
8619	// null. It is an error if a field in this list has a non-empty value.
8620	// This may be used to include null fields in Patch requests.
8621	NullFields []string `json:"-"`
8622}
8623
8624func (s *ListPopulationClause) MarshalJSON() ([]byte, error) {
8625	type NoMethod ListPopulationClause
8626	raw := NoMethod(*s)
8627	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8628}
8629
8630// ListPopulationRule: Remarketing List Population Rule.
8631type ListPopulationRule struct {
8632	// FloodlightActivityId: Floodlight activity ID associated with this
8633	// rule. This field can be left blank.
8634	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
8635
8636	// FloodlightActivityName: Name of floodlight activity associated with
8637	// this rule. This is a read-only, auto-generated field.
8638	FloodlightActivityName string `json:"floodlightActivityName,omitempty"`
8639
8640	// ListPopulationClauses: Clauses that make up this list population
8641	// rule. Clauses are joined by ANDs, and the clauses themselves are made
8642	// up of list population terms which are joined by ORs.
8643	ListPopulationClauses []*ListPopulationClause `json:"listPopulationClauses,omitempty"`
8644
8645	// ForceSendFields is a list of field names (e.g.
8646	// "FloodlightActivityId") to unconditionally include in API requests.
8647	// By default, fields with empty values are omitted from API requests.
8648	// However, any non-pointer, non-interface field appearing in
8649	// ForceSendFields will be sent to the server regardless of whether the
8650	// field is empty or not. This may be used to include empty fields in
8651	// Patch requests.
8652	ForceSendFields []string `json:"-"`
8653
8654	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
8655	// include in API requests with the JSON null value. By default, fields
8656	// with empty values are omitted from API requests. However, any field
8657	// with an empty value appearing in NullFields will be sent to the
8658	// server as null. It is an error if a field in this list has a
8659	// non-empty value. This may be used to include null fields in Patch
8660	// requests.
8661	NullFields []string `json:"-"`
8662}
8663
8664func (s *ListPopulationRule) MarshalJSON() ([]byte, error) {
8665	type NoMethod ListPopulationRule
8666	raw := NoMethod(*s)
8667	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8668}
8669
8670// ListPopulationTerm: Remarketing List Population Rule Term.
8671type ListPopulationTerm struct {
8672	// Contains: Will be true if the term should check if the user is in the
8673	// list and false if the term should check if the user is not in the
8674	// list. This field is only relevant when type is set to
8675	// LIST_MEMBERSHIP_TERM. False by default.
8676	Contains bool `json:"contains,omitempty"`
8677
8678	// Negation: Whether to negate the comparison result of this term during
8679	// rule evaluation. This field is only relevant when type is left unset
8680	// or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM.
8681	Negation bool `json:"negation,omitempty"`
8682
8683	// Operator: Comparison operator of this term. This field is only
8684	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
8685	// REFERRER_TERM.
8686	//
8687	// Possible values:
8688	//   "NUM_EQUALS"
8689	//   "NUM_GREATER_THAN"
8690	//   "NUM_GREATER_THAN_EQUAL"
8691	//   "NUM_LESS_THAN"
8692	//   "NUM_LESS_THAN_EQUAL"
8693	//   "STRING_CONTAINS"
8694	//   "STRING_EQUALS"
8695	Operator string `json:"operator,omitempty"`
8696
8697	// RemarketingListId: ID of the list in question. This field is only
8698	// relevant when type is set to LIST_MEMBERSHIP_TERM.
8699	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
8700
8701	// Type: List population term type determines the applicable fields in
8702	// this object. If left unset or set to CUSTOM_VARIABLE_TERM, then
8703	// variableName, variableFriendlyName, operator, value, and negation are
8704	// applicable. If set to LIST_MEMBERSHIP_TERM then remarketingListId and
8705	// contains are applicable. If set to REFERRER_TERM then operator,
8706	// value, and negation are applicable.
8707	//
8708	// Possible values:
8709	//   "CUSTOM_VARIABLE_TERM"
8710	//   "LIST_MEMBERSHIP_TERM"
8711	//   "REFERRER_TERM"
8712	Type string `json:"type,omitempty"`
8713
8714	// Value: Literal to compare the variable to. This field is only
8715	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
8716	// REFERRER_TERM.
8717	Value string `json:"value,omitempty"`
8718
8719	// VariableFriendlyName: Friendly name of this term's variable. This is
8720	// a read-only, auto-generated field. This field is only relevant when
8721	// type is left unset or set to CUSTOM_VARIABLE_TERM.
8722	VariableFriendlyName string `json:"variableFriendlyName,omitempty"`
8723
8724	// VariableName: Name of the variable (U1, U2, etc.) being compared in
8725	// this term. This field is only relevant when type is set to null,
8726	// CUSTOM_VARIABLE_TERM or REFERRER_TERM.
8727	VariableName string `json:"variableName,omitempty"`
8728
8729	// ForceSendFields is a list of field names (e.g. "Contains") to
8730	// unconditionally include in API requests. By default, fields with
8731	// empty values are omitted from API requests. However, any non-pointer,
8732	// non-interface field appearing in ForceSendFields will be sent to the
8733	// server regardless of whether the field is empty or not. This may be
8734	// used to include empty fields in Patch requests.
8735	ForceSendFields []string `json:"-"`
8736
8737	// NullFields is a list of field names (e.g. "Contains") to include in
8738	// API requests with the JSON null value. By default, fields with empty
8739	// values are omitted from API requests. However, any field with an
8740	// empty value appearing in NullFields will be sent to the server as
8741	// null. It is an error if a field in this list has a non-empty value.
8742	// This may be used to include null fields in Patch requests.
8743	NullFields []string `json:"-"`
8744}
8745
8746func (s *ListPopulationTerm) MarshalJSON() ([]byte, error) {
8747	type NoMethod ListPopulationTerm
8748	raw := NoMethod(*s)
8749	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8750}
8751
8752// ListTargetingExpression: Remarketing List Targeting Expression.
8753type ListTargetingExpression struct {
8754	// Expression: Expression describing which lists are being targeted by
8755	// the ad.
8756	Expression string `json:"expression,omitempty"`
8757
8758	// ForceSendFields is a list of field names (e.g. "Expression") to
8759	// unconditionally include in API requests. By default, fields with
8760	// empty values are omitted from API requests. However, any non-pointer,
8761	// non-interface field appearing in ForceSendFields will be sent to the
8762	// server regardless of whether the field is empty or not. This may be
8763	// used to include empty fields in Patch requests.
8764	ForceSendFields []string `json:"-"`
8765
8766	// NullFields is a list of field names (e.g. "Expression") to include in
8767	// API requests with the JSON null value. By default, fields with empty
8768	// values are omitted from API requests. However, any field with an
8769	// empty value appearing in NullFields will be sent to the server as
8770	// null. It is an error if a field in this list has a non-empty value.
8771	// This may be used to include null fields in Patch requests.
8772	NullFields []string `json:"-"`
8773}
8774
8775func (s *ListTargetingExpression) MarshalJSON() ([]byte, error) {
8776	type NoMethod ListTargetingExpression
8777	raw := NoMethod(*s)
8778	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8779}
8780
8781// LookbackConfiguration: Lookback configuration settings.
8782type LookbackConfiguration struct {
8783	// ClickDuration: Lookback window, in days, from the last time a given
8784	// user clicked on one of your ads. If you enter 0, clicks will not be
8785	// considered as triggering events for floodlight tracking. If you leave
8786	// this field blank, the default value for your account will be used.
8787	// Acceptable values are 0 to 90, inclusive.
8788	ClickDuration int64 `json:"clickDuration,omitempty"`
8789
8790	// PostImpressionActivitiesDuration: Lookback window, in days, from the
8791	// last time a given user viewed one of your ads. If you enter 0,
8792	// impressions will not be considered as triggering events for
8793	// floodlight tracking. If you leave this field blank, the default value
8794	// for your account will be used. Acceptable values are 0 to 90,
8795	// inclusive.
8796	PostImpressionActivitiesDuration int64 `json:"postImpressionActivitiesDuration,omitempty"`
8797
8798	// ForceSendFields is a list of field names (e.g. "ClickDuration") to
8799	// unconditionally include in API requests. By default, fields with
8800	// empty values are omitted from API requests. However, any non-pointer,
8801	// non-interface field appearing in ForceSendFields will be sent to the
8802	// server regardless of whether the field is empty or not. This may be
8803	// used to include empty fields in Patch requests.
8804	ForceSendFields []string `json:"-"`
8805
8806	// NullFields is a list of field names (e.g. "ClickDuration") to include
8807	// in API requests with the JSON null value. By default, fields with
8808	// empty values are omitted from API requests. However, any field with
8809	// an empty value appearing in NullFields will be sent to the server as
8810	// null. It is an error if a field in this list has a non-empty value.
8811	// This may be used to include null fields in Patch requests.
8812	NullFields []string `json:"-"`
8813}
8814
8815func (s *LookbackConfiguration) MarshalJSON() ([]byte, error) {
8816	type NoMethod LookbackConfiguration
8817	raw := NoMethod(*s)
8818	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8819}
8820
8821// Metric: Represents a metric.
8822type Metric struct {
8823	// Kind: The kind of resource this is, in this case dfareporting#metric.
8824	Kind string `json:"kind,omitempty"`
8825
8826	// Name: The metric name, e.g. dfa:impressions
8827	Name string `json:"name,omitempty"`
8828
8829	// ForceSendFields is a list of field names (e.g. "Kind") to
8830	// unconditionally include in API requests. By default, fields with
8831	// empty values are omitted from API requests. However, any non-pointer,
8832	// non-interface field appearing in ForceSendFields will be sent to the
8833	// server regardless of whether the field is empty or not. This may be
8834	// used to include empty fields in Patch requests.
8835	ForceSendFields []string `json:"-"`
8836
8837	// NullFields is a list of field names (e.g. "Kind") to include in API
8838	// requests with the JSON null value. By default, fields with empty
8839	// values are omitted from API requests. However, any field with an
8840	// empty value appearing in NullFields will be sent to the server as
8841	// null. It is an error if a field in this list has a non-empty value.
8842	// This may be used to include null fields in Patch requests.
8843	NullFields []string `json:"-"`
8844}
8845
8846func (s *Metric) MarshalJSON() ([]byte, error) {
8847	type NoMethod Metric
8848	raw := NoMethod(*s)
8849	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8850}
8851
8852// Metro: Contains information about a metro region that can be targeted
8853// by ads.
8854type Metro struct {
8855	// CountryCode: Country code of the country to which this metro region
8856	// belongs.
8857	CountryCode string `json:"countryCode,omitempty"`
8858
8859	// CountryDartId: DART ID of the country to which this metro region
8860	// belongs.
8861	CountryDartId int64 `json:"countryDartId,omitempty,string"`
8862
8863	// DartId: DART ID of this metro region.
8864	DartId int64 `json:"dartId,omitempty,string"`
8865
8866	// DmaId: DMA ID of this metro region. This is the ID used for targeting
8867	// and generating reports, and is equivalent to metro_code.
8868	DmaId int64 `json:"dmaId,omitempty,string"`
8869
8870	// Kind: Identifies what kind of resource this is. Value: the fixed
8871	// string "dfareporting#metro".
8872	Kind string `json:"kind,omitempty"`
8873
8874	// MetroCode: Metro code of this metro region. This is equivalent to
8875	// dma_id.
8876	MetroCode string `json:"metroCode,omitempty"`
8877
8878	// Name: Name of this metro region.
8879	Name string `json:"name,omitempty"`
8880
8881	// ForceSendFields is a list of field names (e.g. "CountryCode") to
8882	// unconditionally include in API requests. By default, fields with
8883	// empty values are omitted from API requests. However, any non-pointer,
8884	// non-interface field appearing in ForceSendFields will be sent to the
8885	// server regardless of whether the field is empty or not. This may be
8886	// used to include empty fields in Patch requests.
8887	ForceSendFields []string `json:"-"`
8888
8889	// NullFields is a list of field names (e.g. "CountryCode") to include
8890	// in API requests with the JSON null value. By default, fields with
8891	// empty values are omitted from API requests. However, any field with
8892	// an empty value appearing in NullFields will be sent to the server as
8893	// null. It is an error if a field in this list has a non-empty value.
8894	// This may be used to include null fields in Patch requests.
8895	NullFields []string `json:"-"`
8896}
8897
8898func (s *Metro) MarshalJSON() ([]byte, error) {
8899	type NoMethod Metro
8900	raw := NoMethod(*s)
8901	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8902}
8903
8904// MetrosListResponse: Metro List Response
8905type MetrosListResponse struct {
8906	// Kind: Identifies what kind of resource this is. Value: the fixed
8907	// string "dfareporting#metrosListResponse".
8908	Kind string `json:"kind,omitempty"`
8909
8910	// Metros: Metro collection.
8911	Metros []*Metro `json:"metros,omitempty"`
8912
8913	// ServerResponse contains the HTTP response code and headers from the
8914	// server.
8915	googleapi.ServerResponse `json:"-"`
8916
8917	// ForceSendFields is a list of field names (e.g. "Kind") to
8918	// unconditionally include in API requests. By default, fields with
8919	// empty values are omitted from API requests. However, any non-pointer,
8920	// non-interface field appearing in ForceSendFields will be sent to the
8921	// server regardless of whether the field is empty or not. This may be
8922	// used to include empty fields in Patch requests.
8923	ForceSendFields []string `json:"-"`
8924
8925	// NullFields is a list of field names (e.g. "Kind") to include in API
8926	// requests with the JSON null value. By default, fields with empty
8927	// values are omitted from API requests. However, any field with an
8928	// empty value appearing in NullFields will be sent to the server as
8929	// null. It is an error if a field in this list has a non-empty value.
8930	// This may be used to include null fields in Patch requests.
8931	NullFields []string `json:"-"`
8932}
8933
8934func (s *MetrosListResponse) MarshalJSON() ([]byte, error) {
8935	type NoMethod MetrosListResponse
8936	raw := NoMethod(*s)
8937	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8938}
8939
8940// MobileCarrier: Contains information about a mobile carrier that can
8941// be targeted by ads.
8942type MobileCarrier struct {
8943	// CountryCode: Country code of the country to which this mobile carrier
8944	// belongs.
8945	CountryCode string `json:"countryCode,omitempty"`
8946
8947	// CountryDartId: DART ID of the country to which this mobile carrier
8948	// belongs.
8949	CountryDartId int64 `json:"countryDartId,omitempty,string"`
8950
8951	// Id: ID of this mobile carrier.
8952	Id int64 `json:"id,omitempty,string"`
8953
8954	// Kind: Identifies what kind of resource this is. Value: the fixed
8955	// string "dfareporting#mobileCarrier".
8956	Kind string `json:"kind,omitempty"`
8957
8958	// Name: Name of this mobile carrier.
8959	Name string `json:"name,omitempty"`
8960
8961	// ServerResponse contains the HTTP response code and headers from the
8962	// server.
8963	googleapi.ServerResponse `json:"-"`
8964
8965	// ForceSendFields is a list of field names (e.g. "CountryCode") to
8966	// unconditionally include in API requests. By default, fields with
8967	// empty values are omitted from API requests. However, any non-pointer,
8968	// non-interface field appearing in ForceSendFields will be sent to the
8969	// server regardless of whether the field is empty or not. This may be
8970	// used to include empty fields in Patch requests.
8971	ForceSendFields []string `json:"-"`
8972
8973	// NullFields is a list of field names (e.g. "CountryCode") to include
8974	// in API requests with the JSON null value. By default, fields with
8975	// empty values are omitted from API requests. However, any field with
8976	// an empty value appearing in NullFields will be sent to the server as
8977	// null. It is an error if a field in this list has a non-empty value.
8978	// This may be used to include null fields in Patch requests.
8979	NullFields []string `json:"-"`
8980}
8981
8982func (s *MobileCarrier) MarshalJSON() ([]byte, error) {
8983	type NoMethod MobileCarrier
8984	raw := NoMethod(*s)
8985	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8986}
8987
8988// MobileCarriersListResponse: Mobile Carrier List Response
8989type MobileCarriersListResponse struct {
8990	// Kind: Identifies what kind of resource this is. Value: the fixed
8991	// string "dfareporting#mobileCarriersListResponse".
8992	Kind string `json:"kind,omitempty"`
8993
8994	// MobileCarriers: Mobile carrier collection.
8995	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
8996
8997	// ServerResponse contains the HTTP response code and headers from the
8998	// server.
8999	googleapi.ServerResponse `json:"-"`
9000
9001	// ForceSendFields is a list of field names (e.g. "Kind") to
9002	// unconditionally include in API requests. By default, fields with
9003	// empty values are omitted from API requests. However, any non-pointer,
9004	// non-interface field appearing in ForceSendFields will be sent to the
9005	// server regardless of whether the field is empty or not. This may be
9006	// used to include empty fields in Patch requests.
9007	ForceSendFields []string `json:"-"`
9008
9009	// NullFields is a list of field names (e.g. "Kind") to include in API
9010	// requests with the JSON null value. By default, fields with empty
9011	// values are omitted from API requests. However, any field with an
9012	// empty value appearing in NullFields will be sent to the server as
9013	// null. It is an error if a field in this list has a non-empty value.
9014	// This may be used to include null fields in Patch requests.
9015	NullFields []string `json:"-"`
9016}
9017
9018func (s *MobileCarriersListResponse) MarshalJSON() ([]byte, error) {
9019	type NoMethod MobileCarriersListResponse
9020	raw := NoMethod(*s)
9021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9022}
9023
9024// ObjectFilter: Object Filter.
9025type ObjectFilter struct {
9026	// Kind: Identifies what kind of resource this is. Value: the fixed
9027	// string "dfareporting#objectFilter".
9028	Kind string `json:"kind,omitempty"`
9029
9030	// ObjectIds: Applicable when status is ASSIGNED. The user has access to
9031	// objects with these object IDs.
9032	ObjectIds googleapi.Int64s `json:"objectIds,omitempty"`
9033
9034	// Status: Status of the filter. NONE means the user has access to none
9035	// of the objects. ALL means the user has access to all objects.
9036	// ASSIGNED means the user has access to the objects with IDs in the
9037	// objectIds list.
9038	//
9039	// Possible values:
9040	//   "ALL"
9041	//   "ASSIGNED"
9042	//   "NONE"
9043	Status string `json:"status,omitempty"`
9044
9045	// ForceSendFields is a list of field names (e.g. "Kind") to
9046	// unconditionally include in API requests. By default, fields with
9047	// empty values are omitted from API requests. However, any non-pointer,
9048	// non-interface field appearing in ForceSendFields will be sent to the
9049	// server regardless of whether the field is empty or not. This may be
9050	// used to include empty fields in Patch requests.
9051	ForceSendFields []string `json:"-"`
9052
9053	// NullFields is a list of field names (e.g. "Kind") to include in API
9054	// requests with the JSON null value. By default, fields with empty
9055	// values are omitted from API requests. However, any field with an
9056	// empty value appearing in NullFields will be sent to the server as
9057	// null. It is an error if a field in this list has a non-empty value.
9058	// This may be used to include null fields in Patch requests.
9059	NullFields []string `json:"-"`
9060}
9061
9062func (s *ObjectFilter) MarshalJSON() ([]byte, error) {
9063	type NoMethod ObjectFilter
9064	raw := NoMethod(*s)
9065	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9066}
9067
9068// OffsetPosition: Offset Position.
9069type OffsetPosition struct {
9070	// Left: Offset distance from left side of an asset or a window.
9071	Left int64 `json:"left,omitempty"`
9072
9073	// Top: Offset distance from top side of an asset or a window.
9074	Top int64 `json:"top,omitempty"`
9075
9076	// ForceSendFields is a list of field names (e.g. "Left") to
9077	// unconditionally include in API requests. By default, fields with
9078	// empty values are omitted from API requests. However, any non-pointer,
9079	// non-interface field appearing in ForceSendFields will be sent to the
9080	// server regardless of whether the field is empty or not. This may be
9081	// used to include empty fields in Patch requests.
9082	ForceSendFields []string `json:"-"`
9083
9084	// NullFields is a list of field names (e.g. "Left") to include in API
9085	// requests with the JSON null value. By default, fields with empty
9086	// values are omitted from API requests. However, any field with an
9087	// empty value appearing in NullFields will be sent to the server as
9088	// null. It is an error if a field in this list has a non-empty value.
9089	// This may be used to include null fields in Patch requests.
9090	NullFields []string `json:"-"`
9091}
9092
9093func (s *OffsetPosition) MarshalJSON() ([]byte, error) {
9094	type NoMethod OffsetPosition
9095	raw := NoMethod(*s)
9096	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9097}
9098
9099// OmnitureSettings: Omniture Integration Settings.
9100type OmnitureSettings struct {
9101	// OmnitureCostDataEnabled: Whether placement cost data will be sent to
9102	// Omniture. This property can be enabled only if
9103	// omnitureIntegrationEnabled is true.
9104	OmnitureCostDataEnabled bool `json:"omnitureCostDataEnabled,omitempty"`
9105
9106	// OmnitureIntegrationEnabled: Whether Omniture integration is enabled.
9107	// This property can be enabled only when the "Advanced Ad Serving"
9108	// account setting is enabled.
9109	OmnitureIntegrationEnabled bool `json:"omnitureIntegrationEnabled,omitempty"`
9110
9111	// ForceSendFields is a list of field names (e.g.
9112	// "OmnitureCostDataEnabled") to unconditionally include in API
9113	// requests. By default, fields with empty values are omitted from API
9114	// requests. However, any non-pointer, non-interface field appearing in
9115	// ForceSendFields will be sent to the server regardless of whether the
9116	// field is empty or not. This may be used to include empty fields in
9117	// Patch requests.
9118	ForceSendFields []string `json:"-"`
9119
9120	// NullFields is a list of field names (e.g. "OmnitureCostDataEnabled")
9121	// to include in API requests with the JSON null value. By default,
9122	// fields with empty values are omitted from API requests. However, any
9123	// field with an empty value appearing in NullFields will be sent to the
9124	// server as null. It is an error if a field in this list has a
9125	// non-empty value. This may be used to include null fields in Patch
9126	// requests.
9127	NullFields []string `json:"-"`
9128}
9129
9130func (s *OmnitureSettings) MarshalJSON() ([]byte, error) {
9131	type NoMethod OmnitureSettings
9132	raw := NoMethod(*s)
9133	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9134}
9135
9136// OperatingSystem: Contains information about an operating system that
9137// can be targeted by ads.
9138type OperatingSystem struct {
9139	// DartId: DART ID of this operating system. This is the ID used for
9140	// targeting.
9141	DartId int64 `json:"dartId,omitempty,string"`
9142
9143	// Desktop: Whether this operating system is for desktop.
9144	Desktop bool `json:"desktop,omitempty"`
9145
9146	// Kind: Identifies what kind of resource this is. Value: the fixed
9147	// string "dfareporting#operatingSystem".
9148	Kind string `json:"kind,omitempty"`
9149
9150	// Mobile: Whether this operating system is for mobile.
9151	Mobile bool `json:"mobile,omitempty"`
9152
9153	// Name: Name of this operating system.
9154	Name string `json:"name,omitempty"`
9155
9156	// ServerResponse contains the HTTP response code and headers from the
9157	// server.
9158	googleapi.ServerResponse `json:"-"`
9159
9160	// ForceSendFields is a list of field names (e.g. "DartId") to
9161	// unconditionally include in API requests. By default, fields with
9162	// empty values are omitted from API requests. However, any non-pointer,
9163	// non-interface field appearing in ForceSendFields will be sent to the
9164	// server regardless of whether the field is empty or not. This may be
9165	// used to include empty fields in Patch requests.
9166	ForceSendFields []string `json:"-"`
9167
9168	// NullFields is a list of field names (e.g. "DartId") to include in API
9169	// requests with the JSON null value. By default, fields with empty
9170	// values are omitted from API requests. However, any field with an
9171	// empty value appearing in NullFields will be sent to the server as
9172	// null. It is an error if a field in this list has a non-empty value.
9173	// This may be used to include null fields in Patch requests.
9174	NullFields []string `json:"-"`
9175}
9176
9177func (s *OperatingSystem) MarshalJSON() ([]byte, error) {
9178	type NoMethod OperatingSystem
9179	raw := NoMethod(*s)
9180	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9181}
9182
9183// OperatingSystemVersion: Contains information about a particular
9184// version of an operating system that can be targeted by ads.
9185type OperatingSystemVersion struct {
9186	// Id: ID of this operating system version.
9187	Id int64 `json:"id,omitempty,string"`
9188
9189	// Kind: Identifies what kind of resource this is. Value: the fixed
9190	// string "dfareporting#operatingSystemVersion".
9191	Kind string `json:"kind,omitempty"`
9192
9193	// MajorVersion: Major version (leftmost number) of this operating
9194	// system version.
9195	MajorVersion string `json:"majorVersion,omitempty"`
9196
9197	// MinorVersion: Minor version (number after the first dot) of this
9198	// operating system version.
9199	MinorVersion string `json:"minorVersion,omitempty"`
9200
9201	// Name: Name of this operating system version.
9202	Name string `json:"name,omitempty"`
9203
9204	// OperatingSystem: Operating system of this operating system version.
9205	OperatingSystem *OperatingSystem `json:"operatingSystem,omitempty"`
9206
9207	// ServerResponse contains the HTTP response code and headers from the
9208	// server.
9209	googleapi.ServerResponse `json:"-"`
9210
9211	// ForceSendFields is a list of field names (e.g. "Id") to
9212	// unconditionally include in API requests. By default, fields with
9213	// empty values are omitted from API requests. However, any non-pointer,
9214	// non-interface field appearing in ForceSendFields will be sent to the
9215	// server regardless of whether the field is empty or not. This may be
9216	// used to include empty fields in Patch requests.
9217	ForceSendFields []string `json:"-"`
9218
9219	// NullFields is a list of field names (e.g. "Id") to include in API
9220	// requests with the JSON null value. By default, fields with empty
9221	// values are omitted from API requests. However, any field with an
9222	// empty value appearing in NullFields will be sent to the server as
9223	// null. It is an error if a field in this list has a non-empty value.
9224	// This may be used to include null fields in Patch requests.
9225	NullFields []string `json:"-"`
9226}
9227
9228func (s *OperatingSystemVersion) MarshalJSON() ([]byte, error) {
9229	type NoMethod OperatingSystemVersion
9230	raw := NoMethod(*s)
9231	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9232}
9233
9234// OperatingSystemVersionsListResponse: Operating System Version List
9235// Response
9236type OperatingSystemVersionsListResponse struct {
9237	// Kind: Identifies what kind of resource this is. Value: the fixed
9238	// string "dfareporting#operatingSystemVersionsListResponse".
9239	Kind string `json:"kind,omitempty"`
9240
9241	// OperatingSystemVersions: Operating system version collection.
9242	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
9243
9244	// ServerResponse contains the HTTP response code and headers from the
9245	// server.
9246	googleapi.ServerResponse `json:"-"`
9247
9248	// ForceSendFields is a list of field names (e.g. "Kind") to
9249	// unconditionally include in API requests. By default, fields with
9250	// empty values are omitted from API requests. However, any non-pointer,
9251	// non-interface field appearing in ForceSendFields will be sent to the
9252	// server regardless of whether the field is empty or not. This may be
9253	// used to include empty fields in Patch requests.
9254	ForceSendFields []string `json:"-"`
9255
9256	// NullFields is a list of field names (e.g. "Kind") to include in API
9257	// requests with the JSON null value. By default, fields with empty
9258	// values are omitted from API requests. However, any field with an
9259	// empty value appearing in NullFields will be sent to the server as
9260	// null. It is an error if a field in this list has a non-empty value.
9261	// This may be used to include null fields in Patch requests.
9262	NullFields []string `json:"-"`
9263}
9264
9265func (s *OperatingSystemVersionsListResponse) MarshalJSON() ([]byte, error) {
9266	type NoMethod OperatingSystemVersionsListResponse
9267	raw := NoMethod(*s)
9268	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9269}
9270
9271// OperatingSystemsListResponse: Operating System List Response
9272type OperatingSystemsListResponse struct {
9273	// Kind: Identifies what kind of resource this is. Value: the fixed
9274	// string "dfareporting#operatingSystemsListResponse".
9275	Kind string `json:"kind,omitempty"`
9276
9277	// OperatingSystems: Operating system collection.
9278	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
9279
9280	// ServerResponse contains the HTTP response code and headers from the
9281	// server.
9282	googleapi.ServerResponse `json:"-"`
9283
9284	// ForceSendFields is a list of field names (e.g. "Kind") to
9285	// unconditionally include in API requests. By default, fields with
9286	// empty values are omitted from API requests. However, any non-pointer,
9287	// non-interface field appearing in ForceSendFields will be sent to the
9288	// server regardless of whether the field is empty or not. This may be
9289	// used to include empty fields in Patch requests.
9290	ForceSendFields []string `json:"-"`
9291
9292	// NullFields is a list of field names (e.g. "Kind") to include in API
9293	// requests with the JSON null value. By default, fields with empty
9294	// values are omitted from API requests. However, any field with an
9295	// empty value appearing in NullFields will be sent to the server as
9296	// null. It is an error if a field in this list has a non-empty value.
9297	// This may be used to include null fields in Patch requests.
9298	NullFields []string `json:"-"`
9299}
9300
9301func (s *OperatingSystemsListResponse) MarshalJSON() ([]byte, error) {
9302	type NoMethod OperatingSystemsListResponse
9303	raw := NoMethod(*s)
9304	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9305}
9306
9307// OptimizationActivity: Creative optimization activity.
9308type OptimizationActivity struct {
9309	// FloodlightActivityId: Floodlight activity ID of this optimization
9310	// activity. This is a required field.
9311	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
9312
9313	// FloodlightActivityIdDimensionValue: Dimension value for the ID of the
9314	// floodlight activity. This is a read-only, auto-generated field.
9315	FloodlightActivityIdDimensionValue *DimensionValue `json:"floodlightActivityIdDimensionValue,omitempty"`
9316
9317	// Weight: Weight associated with this optimization. The weight assigned
9318	// will be understood in proportion to the weights assigned to the other
9319	// optimization activities. Value must be greater than or equal to 1.
9320	Weight int64 `json:"weight,omitempty"`
9321
9322	// ForceSendFields is a list of field names (e.g.
9323	// "FloodlightActivityId") to unconditionally include in API requests.
9324	// By default, fields with empty values are omitted from API requests.
9325	// However, any non-pointer, non-interface field appearing in
9326	// ForceSendFields will be sent to the server regardless of whether the
9327	// field is empty or not. This may be used to include empty fields in
9328	// Patch requests.
9329	ForceSendFields []string `json:"-"`
9330
9331	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
9332	// include in API requests with the JSON null value. By default, fields
9333	// with empty values are omitted from API requests. However, any field
9334	// with an empty value appearing in NullFields will be sent to the
9335	// server as null. It is an error if a field in this list has a
9336	// non-empty value. This may be used to include null fields in Patch
9337	// requests.
9338	NullFields []string `json:"-"`
9339}
9340
9341func (s *OptimizationActivity) MarshalJSON() ([]byte, error) {
9342	type NoMethod OptimizationActivity
9343	raw := NoMethod(*s)
9344	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9345}
9346
9347// Order: Describes properties of a Planning order.
9348type Order struct {
9349	// AccountId: Account ID of this order.
9350	AccountId int64 `json:"accountId,omitempty,string"`
9351
9352	// AdvertiserId: Advertiser ID of this order.
9353	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9354
9355	// ApproverUserProfileIds: IDs for users that have to approve documents
9356	// created for this order.
9357	ApproverUserProfileIds googleapi.Int64s `json:"approverUserProfileIds,omitempty"`
9358
9359	// BuyerInvoiceId: Buyer invoice ID associated with this order.
9360	BuyerInvoiceId string `json:"buyerInvoiceId,omitempty"`
9361
9362	// BuyerOrganizationName: Name of the buyer organization.
9363	BuyerOrganizationName string `json:"buyerOrganizationName,omitempty"`
9364
9365	// Comments: Comments in this order.
9366	Comments string `json:"comments,omitempty"`
9367
9368	// Contacts: Contacts for this order.
9369	Contacts []*OrderContact `json:"contacts,omitempty"`
9370
9371	// Id: ID of this order. This is a read-only, auto-generated field.
9372	Id int64 `json:"id,omitempty,string"`
9373
9374	// Kind: Identifies what kind of resource this is. Value: the fixed
9375	// string "dfareporting#order".
9376	Kind string `json:"kind,omitempty"`
9377
9378	// LastModifiedInfo: Information about the most recent modification of
9379	// this order.
9380	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9381
9382	// Name: Name of this order.
9383	Name string `json:"name,omitempty"`
9384
9385	// Notes: Notes of this order.
9386	Notes string `json:"notes,omitempty"`
9387
9388	// PlanningTermId: ID of the terms and conditions template used in this
9389	// order.
9390	PlanningTermId int64 `json:"planningTermId,omitempty,string"`
9391
9392	// ProjectId: Project ID of this order.
9393	ProjectId int64 `json:"projectId,omitempty,string"`
9394
9395	// SellerOrderId: Seller order ID associated with this order.
9396	SellerOrderId string `json:"sellerOrderId,omitempty"`
9397
9398	// SellerOrganizationName: Name of the seller organization.
9399	SellerOrganizationName string `json:"sellerOrganizationName,omitempty"`
9400
9401	// SiteId: Site IDs this order is associated with.
9402	SiteId googleapi.Int64s `json:"siteId,omitempty"`
9403
9404	// SiteNames: Free-form site names this order is associated with.
9405	SiteNames []string `json:"siteNames,omitempty"`
9406
9407	// SubaccountId: Subaccount ID of this order.
9408	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9409
9410	// TermsAndConditions: Terms and conditions of this order.
9411	TermsAndConditions string `json:"termsAndConditions,omitempty"`
9412
9413	// ServerResponse contains the HTTP response code and headers from the
9414	// server.
9415	googleapi.ServerResponse `json:"-"`
9416
9417	// ForceSendFields is a list of field names (e.g. "AccountId") to
9418	// unconditionally include in API requests. By default, fields with
9419	// empty values are omitted from API requests. However, any non-pointer,
9420	// non-interface field appearing in ForceSendFields will be sent to the
9421	// server regardless of whether the field is empty or not. This may be
9422	// used to include empty fields in Patch requests.
9423	ForceSendFields []string `json:"-"`
9424
9425	// NullFields is a list of field names (e.g. "AccountId") to include in
9426	// API requests with the JSON null value. By default, fields with empty
9427	// values are omitted from API requests. However, any field with an
9428	// empty value appearing in NullFields will be sent to the server as
9429	// null. It is an error if a field in this list has a non-empty value.
9430	// This may be used to include null fields in Patch requests.
9431	NullFields []string `json:"-"`
9432}
9433
9434func (s *Order) MarshalJSON() ([]byte, error) {
9435	type NoMethod Order
9436	raw := NoMethod(*s)
9437	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9438}
9439
9440// OrderContact: Contact of an order.
9441type OrderContact struct {
9442	// ContactInfo: Free-form information about this contact. It could be
9443	// any information related to this contact in addition to type, title,
9444	// name, and signature user profile ID.
9445	ContactInfo string `json:"contactInfo,omitempty"`
9446
9447	// ContactName: Name of this contact.
9448	ContactName string `json:"contactName,omitempty"`
9449
9450	// ContactTitle: Title of this contact.
9451	ContactTitle string `json:"contactTitle,omitempty"`
9452
9453	// ContactType: Type of this contact.
9454	//
9455	// Possible values:
9456	//   "PLANNING_ORDER_CONTACT_BUYER_BILLING_CONTACT"
9457	//   "PLANNING_ORDER_CONTACT_BUYER_CONTACT"
9458	//   "PLANNING_ORDER_CONTACT_SELLER_CONTACT"
9459	ContactType string `json:"contactType,omitempty"`
9460
9461	// SignatureUserProfileId: ID of the user profile containing the
9462	// signature that will be embedded into order documents.
9463	SignatureUserProfileId int64 `json:"signatureUserProfileId,omitempty,string"`
9464
9465	// ForceSendFields is a list of field names (e.g. "ContactInfo") to
9466	// unconditionally include in API requests. By default, fields with
9467	// empty values are omitted from API requests. However, any non-pointer,
9468	// non-interface field appearing in ForceSendFields will be sent to the
9469	// server regardless of whether the field is empty or not. This may be
9470	// used to include empty fields in Patch requests.
9471	ForceSendFields []string `json:"-"`
9472
9473	// NullFields is a list of field names (e.g. "ContactInfo") to include
9474	// in API requests with the JSON null value. By default, fields with
9475	// empty values are omitted from API requests. However, any field with
9476	// an empty value appearing in NullFields will be sent to the server as
9477	// null. It is an error if a field in this list has a non-empty value.
9478	// This may be used to include null fields in Patch requests.
9479	NullFields []string `json:"-"`
9480}
9481
9482func (s *OrderContact) MarshalJSON() ([]byte, error) {
9483	type NoMethod OrderContact
9484	raw := NoMethod(*s)
9485	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9486}
9487
9488// OrderDocument: Contains properties of a Planning order document.
9489type OrderDocument struct {
9490	// AccountId: Account ID of this order document.
9491	AccountId int64 `json:"accountId,omitempty,string"`
9492
9493	// AdvertiserId: Advertiser ID of this order document.
9494	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9495
9496	// AmendedOrderDocumentId: The amended order document ID of this order
9497	// document. An order document can be created by optionally amending
9498	// another order document so that the change history can be preserved.
9499	AmendedOrderDocumentId int64 `json:"amendedOrderDocumentId,omitempty,string"`
9500
9501	// ApprovedByUserProfileIds: IDs of users who have approved this order
9502	// document.
9503	ApprovedByUserProfileIds googleapi.Int64s `json:"approvedByUserProfileIds,omitempty"`
9504
9505	// Cancelled: Whether this order document is cancelled.
9506	Cancelled bool `json:"cancelled,omitempty"`
9507
9508	// CreatedInfo: Information about the creation of this order document.
9509	CreatedInfo *LastModifiedInfo `json:"createdInfo,omitempty"`
9510
9511	// EffectiveDate: Effective date of this order document.
9512	EffectiveDate string `json:"effectiveDate,omitempty"`
9513
9514	// Id: ID of this order document.
9515	Id int64 `json:"id,omitempty,string"`
9516
9517	// Kind: Identifies what kind of resource this is. Value: the fixed
9518	// string "dfareporting#orderDocument".
9519	Kind string `json:"kind,omitempty"`
9520
9521	// LastSentRecipients: List of email addresses that received the last
9522	// sent document.
9523	LastSentRecipients []string `json:"lastSentRecipients,omitempty"`
9524
9525	// LastSentTime: Timestamp of the last email sent with this order
9526	// document.
9527	LastSentTime string `json:"lastSentTime,omitempty"`
9528
9529	// OrderId: ID of the order from which this order document is created.
9530	OrderId int64 `json:"orderId,omitempty,string"`
9531
9532	// ProjectId: Project ID of this order document.
9533	ProjectId int64 `json:"projectId,omitempty,string"`
9534
9535	// Signed: Whether this order document has been signed.
9536	Signed bool `json:"signed,omitempty"`
9537
9538	// SubaccountId: Subaccount ID of this order document.
9539	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9540
9541	// Title: Title of this order document.
9542	Title string `json:"title,omitempty"`
9543
9544	// Type: Type of this order document
9545	//
9546	// Possible values:
9547	//   "PLANNING_ORDER_TYPE_CHANGE_ORDER"
9548	//   "PLANNING_ORDER_TYPE_INSERTION_ORDER"
9549	Type string `json:"type,omitempty"`
9550
9551	// ServerResponse contains the HTTP response code and headers from the
9552	// server.
9553	googleapi.ServerResponse `json:"-"`
9554
9555	// ForceSendFields is a list of field names (e.g. "AccountId") to
9556	// unconditionally include in API requests. By default, fields with
9557	// empty values are omitted from API requests. However, any non-pointer,
9558	// non-interface field appearing in ForceSendFields will be sent to the
9559	// server regardless of whether the field is empty or not. This may be
9560	// used to include empty fields in Patch requests.
9561	ForceSendFields []string `json:"-"`
9562
9563	// NullFields is a list of field names (e.g. "AccountId") to include in
9564	// API requests with the JSON null value. By default, fields with empty
9565	// values are omitted from API requests. However, any field with an
9566	// empty value appearing in NullFields will be sent to the server as
9567	// null. It is an error if a field in this list has a non-empty value.
9568	// This may be used to include null fields in Patch requests.
9569	NullFields []string `json:"-"`
9570}
9571
9572func (s *OrderDocument) MarshalJSON() ([]byte, error) {
9573	type NoMethod OrderDocument
9574	raw := NoMethod(*s)
9575	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9576}
9577
9578// OrderDocumentsListResponse: Order document List Response
9579type OrderDocumentsListResponse struct {
9580	// Kind: Identifies what kind of resource this is. Value: the fixed
9581	// string "dfareporting#orderDocumentsListResponse".
9582	Kind string `json:"kind,omitempty"`
9583
9584	// NextPageToken: Pagination token to be used for the next list
9585	// operation.
9586	NextPageToken string `json:"nextPageToken,omitempty"`
9587
9588	// OrderDocuments: Order document collection
9589	OrderDocuments []*OrderDocument `json:"orderDocuments,omitempty"`
9590
9591	// ServerResponse contains the HTTP response code and headers from the
9592	// server.
9593	googleapi.ServerResponse `json:"-"`
9594
9595	// ForceSendFields is a list of field names (e.g. "Kind") to
9596	// unconditionally include in API requests. By default, fields with
9597	// empty values are omitted from API requests. However, any non-pointer,
9598	// non-interface field appearing in ForceSendFields will be sent to the
9599	// server regardless of whether the field is empty or not. This may be
9600	// used to include empty fields in Patch requests.
9601	ForceSendFields []string `json:"-"`
9602
9603	// NullFields is a list of field names (e.g. "Kind") to include in API
9604	// requests with the JSON null value. By default, fields with empty
9605	// values are omitted from API requests. However, any field with an
9606	// empty value appearing in NullFields will be sent to the server as
9607	// null. It is an error if a field in this list has a non-empty value.
9608	// This may be used to include null fields in Patch requests.
9609	NullFields []string `json:"-"`
9610}
9611
9612func (s *OrderDocumentsListResponse) MarshalJSON() ([]byte, error) {
9613	type NoMethod OrderDocumentsListResponse
9614	raw := NoMethod(*s)
9615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9616}
9617
9618// OrdersListResponse: Order List Response
9619type OrdersListResponse struct {
9620	// Kind: Identifies what kind of resource this is. Value: the fixed
9621	// string "dfareporting#ordersListResponse".
9622	Kind string `json:"kind,omitempty"`
9623
9624	// NextPageToken: Pagination token to be used for the next list
9625	// operation.
9626	NextPageToken string `json:"nextPageToken,omitempty"`
9627
9628	// Orders: Order collection.
9629	Orders []*Order `json:"orders,omitempty"`
9630
9631	// ServerResponse contains the HTTP response code and headers from the
9632	// server.
9633	googleapi.ServerResponse `json:"-"`
9634
9635	// ForceSendFields is a list of field names (e.g. "Kind") to
9636	// unconditionally include in API requests. By default, fields with
9637	// empty values are omitted from API requests. However, any non-pointer,
9638	// non-interface field appearing in ForceSendFields will be sent to the
9639	// server regardless of whether the field is empty or not. This may be
9640	// used to include empty fields in Patch requests.
9641	ForceSendFields []string `json:"-"`
9642
9643	// NullFields is a list of field names (e.g. "Kind") to include in API
9644	// requests with the JSON null value. By default, fields with empty
9645	// values are omitted from API requests. However, any field with an
9646	// empty value appearing in NullFields will be sent to the server as
9647	// null. It is an error if a field in this list has a non-empty value.
9648	// This may be used to include null fields in Patch requests.
9649	NullFields []string `json:"-"`
9650}
9651
9652func (s *OrdersListResponse) MarshalJSON() ([]byte, error) {
9653	type NoMethod OrdersListResponse
9654	raw := NoMethod(*s)
9655	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9656}
9657
9658// PathToConversionReportCompatibleFields: Represents fields that are
9659// compatible to be selected for a report of type "PATH_TO_CONVERSION".
9660type PathToConversionReportCompatibleFields struct {
9661	// ConversionDimensions: Conversion dimensions which are compatible to
9662	// be selected in the "conversionDimensions" section of the report.
9663	ConversionDimensions []*Dimension `json:"conversionDimensions,omitempty"`
9664
9665	// CustomFloodlightVariables: Custom floodlight variables which are
9666	// compatible to be selected in the "customFloodlightVariables" section
9667	// of the report.
9668	CustomFloodlightVariables []*Dimension `json:"customFloodlightVariables,omitempty"`
9669
9670	// Kind: The kind of resource this is, in this case
9671	// dfareporting#pathToConversionReportCompatibleFields.
9672	Kind string `json:"kind,omitempty"`
9673
9674	// Metrics: Metrics which are compatible to be selected in the
9675	// "metricNames" section of the report.
9676	Metrics []*Metric `json:"metrics,omitempty"`
9677
9678	// PerInteractionDimensions: Per-interaction dimensions which are
9679	// compatible to be selected in the "perInteractionDimensions" section
9680	// of the report.
9681	PerInteractionDimensions []*Dimension `json:"perInteractionDimensions,omitempty"`
9682
9683	// ForceSendFields is a list of field names (e.g.
9684	// "ConversionDimensions") to unconditionally include in API requests.
9685	// By default, fields with empty values are omitted from API requests.
9686	// However, any non-pointer, non-interface field appearing in
9687	// ForceSendFields will be sent to the server regardless of whether the
9688	// field is empty or not. This may be used to include empty fields in
9689	// Patch requests.
9690	ForceSendFields []string `json:"-"`
9691
9692	// NullFields is a list of field names (e.g. "ConversionDimensions") to
9693	// include in API requests with the JSON null value. By default, fields
9694	// with empty values are omitted from API requests. However, any field
9695	// with an empty value appearing in NullFields will be sent to the
9696	// server as null. It is an error if a field in this list has a
9697	// non-empty value. This may be used to include null fields in Patch
9698	// requests.
9699	NullFields []string `json:"-"`
9700}
9701
9702func (s *PathToConversionReportCompatibleFields) MarshalJSON() ([]byte, error) {
9703	type NoMethod PathToConversionReportCompatibleFields
9704	raw := NoMethod(*s)
9705	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9706}
9707
9708// Placement: Contains properties of a placement.
9709type Placement struct {
9710	// AccountId: Account ID of this placement. This field can be left
9711	// blank.
9712	AccountId int64 `json:"accountId,omitempty,string"`
9713
9714	// AdBlockingOptOut: Whether this placement opts out of ad blocking.
9715	// When true, ad blocking is disabled for this placement. When false,
9716	// the campaign and site settings take effect.
9717	AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
9718
9719	// AdvertiserId: Advertiser ID of this placement. This field can be left
9720	// blank.
9721	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9722
9723	// AdvertiserIdDimensionValue: Dimension value for the ID of the
9724	// advertiser. This is a read-only, auto-generated field.
9725	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
9726
9727	// Archived: Whether this placement is archived.
9728	Archived bool `json:"archived,omitempty"`
9729
9730	// CampaignId: Campaign ID of this placement. This field is a required
9731	// field on insertion.
9732	CampaignId int64 `json:"campaignId,omitempty,string"`
9733
9734	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
9735	// This is a read-only, auto-generated field.
9736	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
9737
9738	// Comment: Comments for this placement.
9739	Comment string `json:"comment,omitempty"`
9740
9741	// Compatibility: Placement compatibility. DISPLAY and
9742	// DISPLAY_INTERSTITIAL refer to rendering on desktop, on mobile devices
9743	// or in mobile apps for regular or interstitial ads respectively. APP
9744	// and APP_INTERSTITIAL are no longer allowed for new placement
9745	// insertions. Instead, use DISPLAY or DISPLAY_INTERSTITIAL.
9746	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
9747	// with the VAST standard. This field is required on insertion.
9748	//
9749	// Possible values:
9750	//   "APP"
9751	//   "APP_INTERSTITIAL"
9752	//   "DISPLAY"
9753	//   "DISPLAY_INTERSTITIAL"
9754	//   "IN_STREAM_AUDIO"
9755	//   "IN_STREAM_VIDEO"
9756	Compatibility string `json:"compatibility,omitempty"`
9757
9758	// ContentCategoryId: ID of the content category assigned to this
9759	// placement.
9760	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
9761
9762	// CreateInfo: Information about the creation of this placement. This is
9763	// a read-only field.
9764	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
9765
9766	// DirectorySiteId: Directory site ID of this placement. On insert, you
9767	// must set either this field or the siteId field to specify the site
9768	// associated with this placement. This is a required field that is
9769	// read-only after insertion.
9770	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
9771
9772	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
9773	// directory site. This is a read-only, auto-generated field.
9774	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
9775
9776	// ExternalId: External ID for this placement.
9777	ExternalId string `json:"externalId,omitempty"`
9778
9779	// Id: ID of this placement. This is a read-only, auto-generated field.
9780	Id int64 `json:"id,omitempty,string"`
9781
9782	// IdDimensionValue: Dimension value for the ID of this placement. This
9783	// is a read-only, auto-generated field.
9784	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
9785
9786	// KeyName: Key name of this placement. This is a read-only,
9787	// auto-generated field.
9788	KeyName string `json:"keyName,omitempty"`
9789
9790	// Kind: Identifies what kind of resource this is. Value: the fixed
9791	// string "dfareporting#placement".
9792	Kind string `json:"kind,omitempty"`
9793
9794	// LastModifiedInfo: Information about the most recent modification of
9795	// this placement. This is a read-only field.
9796	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9797
9798	// LookbackConfiguration: Lookback window settings for this placement.
9799	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
9800
9801	// Name: Name of this placement.This is a required field and must be
9802	// less than 256 characters long.
9803	Name string `json:"name,omitempty"`
9804
9805	// PaymentApproved: Whether payment was approved for this placement.
9806	// This is a read-only field relevant only to publisher-paid placements.
9807	PaymentApproved bool `json:"paymentApproved,omitempty"`
9808
9809	// PaymentSource: Payment source for this placement. This is a required
9810	// field that is read-only after insertion.
9811	//
9812	// Possible values:
9813	//   "PLACEMENT_AGENCY_PAID"
9814	//   "PLACEMENT_PUBLISHER_PAID"
9815	PaymentSource string `json:"paymentSource,omitempty"`
9816
9817	// PlacementGroupId: ID of this placement's group, if applicable.
9818	PlacementGroupId int64 `json:"placementGroupId,omitempty,string"`
9819
9820	// PlacementGroupIdDimensionValue: Dimension value for the ID of the
9821	// placement group. This is a read-only, auto-generated field.
9822	PlacementGroupIdDimensionValue *DimensionValue `json:"placementGroupIdDimensionValue,omitempty"`
9823
9824	// PlacementStrategyId: ID of the placement strategy assigned to this
9825	// placement.
9826	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
9827
9828	// PricingSchedule: Pricing schedule of this placement. This field is
9829	// required on insertion, specifically subfields startDate, endDate and
9830	// pricingType.
9831	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
9832
9833	// Primary: Whether this placement is the primary placement of a
9834	// roadblock (placement group). You cannot change this field from true
9835	// to false. Setting this field to true will automatically set the
9836	// primary field on the original primary placement of the roadblock to
9837	// false, and it will automatically set the roadblock's
9838	// primaryPlacementId field to the ID of this placement.
9839	Primary bool `json:"primary,omitempty"`
9840
9841	// PublisherUpdateInfo: Information about the last publisher update.
9842	// This is a read-only field.
9843	PublisherUpdateInfo *LastModifiedInfo `json:"publisherUpdateInfo,omitempty"`
9844
9845	// SiteId: Site ID associated with this placement. On insert, you must
9846	// set either this field or the directorySiteId field to specify the
9847	// site associated with this placement. This is a required field that is
9848	// read-only after insertion.
9849	SiteId int64 `json:"siteId,omitempty,string"`
9850
9851	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
9852	// a read-only, auto-generated field.
9853	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
9854
9855	// Size: Size associated with this placement. When inserting or updating
9856	// a placement, only the size ID field is used. This field is required
9857	// on insertion.
9858	Size *Size `json:"size,omitempty"`
9859
9860	// SslRequired: Whether creatives assigned to this placement must be
9861	// SSL-compliant.
9862	SslRequired bool `json:"sslRequired,omitempty"`
9863
9864	// Status: Third-party placement status.
9865	//
9866	// Possible values:
9867	//   "ACKNOWLEDGE_ACCEPTANCE"
9868	//   "ACKNOWLEDGE_REJECTION"
9869	//   "DRAFT"
9870	//   "PAYMENT_ACCEPTED"
9871	//   "PAYMENT_REJECTED"
9872	//   "PENDING_REVIEW"
9873	Status string `json:"status,omitempty"`
9874
9875	// SubaccountId: Subaccount ID of this placement. This field can be left
9876	// blank.
9877	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9878
9879	// TagFormats: Tag formats to generate for this placement. This field is
9880	// required on insertion.
9881	// Acceptable values are:
9882	// - "PLACEMENT_TAG_STANDARD"
9883	// - "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
9884	// - "PLACEMENT_TAG_IFRAME_ILAYER"
9885	// - "PLACEMENT_TAG_INTERNAL_REDIRECT"
9886	// - "PLACEMENT_TAG_JAVASCRIPT"
9887	// - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
9888	// - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
9889	// - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
9890	// - "PLACEMENT_TAG_CLICK_COMMANDS"
9891	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
9892	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
9893	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
9894	// - "PLACEMENT_TAG_TRACKING"
9895	// - "PLACEMENT_TAG_TRACKING_IFRAME"
9896	// - "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
9897	//
9898	// Possible values:
9899	//   "PLACEMENT_TAG_CLICK_COMMANDS"
9900	//   "PLACEMENT_TAG_IFRAME_ILAYER"
9901	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
9902	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
9903	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
9904	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
9905	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
9906	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
9907	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
9908	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
9909	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
9910	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
9911	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
9912	//   "PLACEMENT_TAG_JAVASCRIPT"
9913	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
9914	//   "PLACEMENT_TAG_STANDARD"
9915	//   "PLACEMENT_TAG_TRACKING"
9916	//   "PLACEMENT_TAG_TRACKING_IFRAME"
9917	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
9918	TagFormats []string `json:"tagFormats,omitempty"`
9919
9920	// TagSetting: Tag settings for this placement.
9921	TagSetting *TagSetting `json:"tagSetting,omitempty"`
9922
9923	// VideoActiveViewOptOut: Whether Verification and ActiveView are
9924	// disabled for in-stream video creatives for this placement. The same
9925	// setting videoActiveViewOptOut exists on the site level -- the opt out
9926	// occurs if either of these settings are true. These settings are
9927	// distinct from DirectorySites.settings.activeViewOptOut or
9928	// Sites.siteSettings.activeViewOptOut which only apply to display ads.
9929	// However, Accounts.activeViewOptOut opts out both video traffic, as
9930	// well as display ads, from Verification and ActiveView.
9931	VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"`
9932
9933	// VideoSettings: A collection of settings which affect video creatives
9934	// served through this placement. Applicable to placements with
9935	// IN_STREAM_VIDEO compatibility.
9936	VideoSettings *VideoSettings `json:"videoSettings,omitempty"`
9937
9938	// VpaidAdapterChoice: VPAID adapter setting for this placement.
9939	// Controls which VPAID format the measurement adapter will use for
9940	// in-stream video creatives assigned to this placement.
9941	//
9942	// Note: Flash is no longer supported. This field now defaults to HTML5
9943	// when the following values are provided: FLASH, BOTH.
9944	//
9945	// Possible values:
9946	//   "BOTH"
9947	//   "DEFAULT"
9948	//   "FLASH"
9949	//   "HTML5"
9950	VpaidAdapterChoice string `json:"vpaidAdapterChoice,omitempty"`
9951
9952	// ServerResponse contains the HTTP response code and headers from the
9953	// server.
9954	googleapi.ServerResponse `json:"-"`
9955
9956	// ForceSendFields is a list of field names (e.g. "AccountId") to
9957	// unconditionally include in API requests. By default, fields with
9958	// empty values are omitted from API requests. However, any non-pointer,
9959	// non-interface field appearing in ForceSendFields will be sent to the
9960	// server regardless of whether the field is empty or not. This may be
9961	// used to include empty fields in Patch requests.
9962	ForceSendFields []string `json:"-"`
9963
9964	// NullFields is a list of field names (e.g. "AccountId") to include in
9965	// API requests with the JSON null value. By default, fields with empty
9966	// values are omitted from API requests. However, any field with an
9967	// empty value appearing in NullFields will be sent to the server as
9968	// null. It is an error if a field in this list has a non-empty value.
9969	// This may be used to include null fields in Patch requests.
9970	NullFields []string `json:"-"`
9971}
9972
9973func (s *Placement) MarshalJSON() ([]byte, error) {
9974	type NoMethod Placement
9975	raw := NoMethod(*s)
9976	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9977}
9978
9979// PlacementAssignment: Placement Assignment.
9980type PlacementAssignment struct {
9981	// Active: Whether this placement assignment is active. When true, the
9982	// placement will be included in the ad's rotation.
9983	Active bool `json:"active,omitempty"`
9984
9985	// PlacementId: ID of the placement to be assigned. This is a required
9986	// field.
9987	PlacementId int64 `json:"placementId,omitempty,string"`
9988
9989	// PlacementIdDimensionValue: Dimension value for the ID of the
9990	// placement. This is a read-only, auto-generated field.
9991	PlacementIdDimensionValue *DimensionValue `json:"placementIdDimensionValue,omitempty"`
9992
9993	// SslRequired: Whether the placement to be assigned requires SSL. This
9994	// is a read-only field that is auto-generated when the ad is inserted
9995	// or updated.
9996	SslRequired bool `json:"sslRequired,omitempty"`
9997
9998	// ForceSendFields is a list of field names (e.g. "Active") to
9999	// unconditionally include in API requests. By default, fields with
10000	// empty values are omitted from API requests. However, any non-pointer,
10001	// non-interface field appearing in ForceSendFields will be sent to the
10002	// server regardless of whether the field is empty or not. This may be
10003	// used to include empty fields in Patch requests.
10004	ForceSendFields []string `json:"-"`
10005
10006	// NullFields is a list of field names (e.g. "Active") to include in API
10007	// requests with the JSON null value. By default, fields with empty
10008	// values are omitted from API requests. However, any field with an
10009	// empty value appearing in NullFields will be sent to the server as
10010	// null. It is an error if a field in this list has a non-empty value.
10011	// This may be used to include null fields in Patch requests.
10012	NullFields []string `json:"-"`
10013}
10014
10015func (s *PlacementAssignment) MarshalJSON() ([]byte, error) {
10016	type NoMethod PlacementAssignment
10017	raw := NoMethod(*s)
10018	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10019}
10020
10021// PlacementGroup: Contains properties of a package or roadblock.
10022type PlacementGroup struct {
10023	// AccountId: Account ID of this placement group. This is a read-only
10024	// field that can be left blank.
10025	AccountId int64 `json:"accountId,omitempty,string"`
10026
10027	// AdvertiserId: Advertiser ID of this placement group. This is a
10028	// required field on insertion.
10029	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10030
10031	// AdvertiserIdDimensionValue: Dimension value for the ID of the
10032	// advertiser. This is a read-only, auto-generated field.
10033	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
10034
10035	// Archived: Whether this placement group is archived.
10036	Archived bool `json:"archived,omitempty"`
10037
10038	// CampaignId: Campaign ID of this placement group. This field is
10039	// required on insertion.
10040	CampaignId int64 `json:"campaignId,omitempty,string"`
10041
10042	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
10043	// This is a read-only, auto-generated field.
10044	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
10045
10046	// ChildPlacementIds: IDs of placements which are assigned to this
10047	// placement group. This is a read-only, auto-generated field.
10048	ChildPlacementIds googleapi.Int64s `json:"childPlacementIds,omitempty"`
10049
10050	// Comment: Comments for this placement group.
10051	Comment string `json:"comment,omitempty"`
10052
10053	// ContentCategoryId: ID of the content category assigned to this
10054	// placement group.
10055	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
10056
10057	// CreateInfo: Information about the creation of this placement group.
10058	// This is a read-only field.
10059	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
10060
10061	// DirectorySiteId: Directory site ID associated with this placement
10062	// group. On insert, you must set either this field or the site_id field
10063	// to specify the site associated with this placement group. This is a
10064	// required field that is read-only after insertion.
10065	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
10066
10067	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
10068	// directory site. This is a read-only, auto-generated field.
10069	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
10070
10071	// ExternalId: External ID for this placement.
10072	ExternalId string `json:"externalId,omitempty"`
10073
10074	// Id: ID of this placement group. This is a read-only, auto-generated
10075	// field.
10076	Id int64 `json:"id,omitempty,string"`
10077
10078	// IdDimensionValue: Dimension value for the ID of this placement group.
10079	// This is a read-only, auto-generated field.
10080	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
10081
10082	// Kind: Identifies what kind of resource this is. Value: the fixed
10083	// string "dfareporting#placementGroup".
10084	Kind string `json:"kind,omitempty"`
10085
10086	// LastModifiedInfo: Information about the most recent modification of
10087	// this placement group. This is a read-only field.
10088	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10089
10090	// Name: Name of this placement group. This is a required field and must
10091	// be less than 256 characters long.
10092	Name string `json:"name,omitempty"`
10093
10094	// PlacementGroupType: Type of this placement group. A package is a
10095	// simple group of placements that acts as a single pricing point for a
10096	// group of tags. A roadblock is a group of placements that not only
10097	// acts as a single pricing point, but also assumes that all the tags in
10098	// it will be served at the same time. A roadblock requires one of its
10099	// assigned placements to be marked as primary for reporting. This field
10100	// is required on insertion.
10101	//
10102	// Possible values:
10103	//   "PLACEMENT_PACKAGE"
10104	//   "PLACEMENT_ROADBLOCK"
10105	PlacementGroupType string `json:"placementGroupType,omitempty"`
10106
10107	// PlacementStrategyId: ID of the placement strategy assigned to this
10108	// placement group.
10109	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
10110
10111	// PricingSchedule: Pricing schedule of this placement group. This field
10112	// is required on insertion.
10113	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
10114
10115	// PrimaryPlacementId: ID of the primary placement, used to calculate
10116	// the media cost of a roadblock (placement group). Modifying this field
10117	// will automatically modify the primary field on all affected roadblock
10118	// child placements.
10119	PrimaryPlacementId int64 `json:"primaryPlacementId,omitempty,string"`
10120
10121	// PrimaryPlacementIdDimensionValue: Dimension value for the ID of the
10122	// primary placement. This is a read-only, auto-generated field.
10123	PrimaryPlacementIdDimensionValue *DimensionValue `json:"primaryPlacementIdDimensionValue,omitempty"`
10124
10125	// SiteId: Site ID associated with this placement group. On insert, you
10126	// must set either this field or the directorySiteId field to specify
10127	// the site associated with this placement group. This is a required
10128	// field that is read-only after insertion.
10129	SiteId int64 `json:"siteId,omitempty,string"`
10130
10131	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
10132	// a read-only, auto-generated field.
10133	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
10134
10135	// SubaccountId: Subaccount ID of this placement group. This is a
10136	// read-only field that can be left blank.
10137	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10138
10139	// ServerResponse contains the HTTP response code and headers from the
10140	// server.
10141	googleapi.ServerResponse `json:"-"`
10142
10143	// ForceSendFields is a list of field names (e.g. "AccountId") to
10144	// unconditionally include in API requests. By default, fields with
10145	// empty values are omitted from API requests. However, any non-pointer,
10146	// non-interface field appearing in ForceSendFields will be sent to the
10147	// server regardless of whether the field is empty or not. This may be
10148	// used to include empty fields in Patch requests.
10149	ForceSendFields []string `json:"-"`
10150
10151	// NullFields is a list of field names (e.g. "AccountId") to include in
10152	// API requests with the JSON null value. By default, fields with empty
10153	// values are omitted from API requests. However, any field with an
10154	// empty value appearing in NullFields will be sent to the server as
10155	// null. It is an error if a field in this list has a non-empty value.
10156	// This may be used to include null fields in Patch requests.
10157	NullFields []string `json:"-"`
10158}
10159
10160func (s *PlacementGroup) MarshalJSON() ([]byte, error) {
10161	type NoMethod PlacementGroup
10162	raw := NoMethod(*s)
10163	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10164}
10165
10166// PlacementGroupsListResponse: Placement Group List Response
10167type PlacementGroupsListResponse struct {
10168	// Kind: Identifies what kind of resource this is. Value: the fixed
10169	// string "dfareporting#placementGroupsListResponse".
10170	Kind string `json:"kind,omitempty"`
10171
10172	// NextPageToken: Pagination token to be used for the next list
10173	// operation.
10174	NextPageToken string `json:"nextPageToken,omitempty"`
10175
10176	// PlacementGroups: Placement group collection.
10177	PlacementGroups []*PlacementGroup `json:"placementGroups,omitempty"`
10178
10179	// ServerResponse contains the HTTP response code and headers from the
10180	// server.
10181	googleapi.ServerResponse `json:"-"`
10182
10183	// ForceSendFields is a list of field names (e.g. "Kind") to
10184	// unconditionally include in API requests. By default, fields with
10185	// empty values are omitted from API requests. However, any non-pointer,
10186	// non-interface field appearing in ForceSendFields will be sent to the
10187	// server regardless of whether the field is empty or not. This may be
10188	// used to include empty fields in Patch requests.
10189	ForceSendFields []string `json:"-"`
10190
10191	// NullFields is a list of field names (e.g. "Kind") to include in API
10192	// requests with the JSON null value. By default, fields with empty
10193	// values are omitted from API requests. However, any field with an
10194	// empty value appearing in NullFields will be sent to the server as
10195	// null. It is an error if a field in this list has a non-empty value.
10196	// This may be used to include null fields in Patch requests.
10197	NullFields []string `json:"-"`
10198}
10199
10200func (s *PlacementGroupsListResponse) MarshalJSON() ([]byte, error) {
10201	type NoMethod PlacementGroupsListResponse
10202	raw := NoMethod(*s)
10203	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10204}
10205
10206// PlacementStrategiesListResponse: Placement Strategy List Response
10207type PlacementStrategiesListResponse struct {
10208	// Kind: Identifies what kind of resource this is. Value: the fixed
10209	// string "dfareporting#placementStrategiesListResponse".
10210	Kind string `json:"kind,omitempty"`
10211
10212	// NextPageToken: Pagination token to be used for the next list
10213	// operation.
10214	NextPageToken string `json:"nextPageToken,omitempty"`
10215
10216	// PlacementStrategies: Placement strategy collection.
10217	PlacementStrategies []*PlacementStrategy `json:"placementStrategies,omitempty"`
10218
10219	// ServerResponse contains the HTTP response code and headers from the
10220	// server.
10221	googleapi.ServerResponse `json:"-"`
10222
10223	// ForceSendFields is a list of field names (e.g. "Kind") to
10224	// unconditionally include in API requests. By default, fields with
10225	// empty values are omitted from API requests. However, any non-pointer,
10226	// non-interface field appearing in ForceSendFields will be sent to the
10227	// server regardless of whether the field is empty or not. This may be
10228	// used to include empty fields in Patch requests.
10229	ForceSendFields []string `json:"-"`
10230
10231	// NullFields is a list of field names (e.g. "Kind") to include in API
10232	// requests with the JSON null value. By default, fields with empty
10233	// values are omitted from API requests. However, any field with an
10234	// empty value appearing in NullFields will be sent to the server as
10235	// null. It is an error if a field in this list has a non-empty value.
10236	// This may be used to include null fields in Patch requests.
10237	NullFields []string `json:"-"`
10238}
10239
10240func (s *PlacementStrategiesListResponse) MarshalJSON() ([]byte, error) {
10241	type NoMethod PlacementStrategiesListResponse
10242	raw := NoMethod(*s)
10243	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10244}
10245
10246// PlacementStrategy: Contains properties of a placement strategy.
10247type PlacementStrategy struct {
10248	// AccountId: Account ID of this placement strategy.This is a read-only
10249	// field that can be left blank.
10250	AccountId int64 `json:"accountId,omitempty,string"`
10251
10252	// Id: ID of this placement strategy. This is a read-only,
10253	// auto-generated field.
10254	Id int64 `json:"id,omitempty,string"`
10255
10256	// Kind: Identifies what kind of resource this is. Value: the fixed
10257	// string "dfareporting#placementStrategy".
10258	Kind string `json:"kind,omitempty"`
10259
10260	// Name: Name of this placement strategy. This is a required field. It
10261	// must be less than 256 characters long and unique among placement
10262	// strategies of the same account.
10263	Name string `json:"name,omitempty"`
10264
10265	// ServerResponse contains the HTTP response code and headers from the
10266	// server.
10267	googleapi.ServerResponse `json:"-"`
10268
10269	// ForceSendFields is a list of field names (e.g. "AccountId") to
10270	// unconditionally include in API requests. By default, fields with
10271	// empty values are omitted from API requests. However, any non-pointer,
10272	// non-interface field appearing in ForceSendFields will be sent to the
10273	// server regardless of whether the field is empty or not. This may be
10274	// used to include empty fields in Patch requests.
10275	ForceSendFields []string `json:"-"`
10276
10277	// NullFields is a list of field names (e.g. "AccountId") to include in
10278	// API requests with the JSON null value. By default, fields with empty
10279	// values are omitted from API requests. However, any field with an
10280	// empty value appearing in NullFields will be sent to the server as
10281	// null. It is an error if a field in this list has a non-empty value.
10282	// This may be used to include null fields in Patch requests.
10283	NullFields []string `json:"-"`
10284}
10285
10286func (s *PlacementStrategy) MarshalJSON() ([]byte, error) {
10287	type NoMethod PlacementStrategy
10288	raw := NoMethod(*s)
10289	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10290}
10291
10292// PlacementTag: Placement Tag
10293type PlacementTag struct {
10294	// PlacementId: Placement ID
10295	PlacementId int64 `json:"placementId,omitempty,string"`
10296
10297	// TagDatas: Tags generated for this placement.
10298	TagDatas []*TagData `json:"tagDatas,omitempty"`
10299
10300	// ForceSendFields is a list of field names (e.g. "PlacementId") to
10301	// unconditionally include in API requests. By default, fields with
10302	// empty values are omitted from API requests. However, any non-pointer,
10303	// non-interface field appearing in ForceSendFields will be sent to the
10304	// server regardless of whether the field is empty or not. This may be
10305	// used to include empty fields in Patch requests.
10306	ForceSendFields []string `json:"-"`
10307
10308	// NullFields is a list of field names (e.g. "PlacementId") to include
10309	// in API requests with the JSON null value. By default, fields with
10310	// empty values are omitted from API requests. However, any field with
10311	// an empty value appearing in NullFields will be sent to the server as
10312	// null. It is an error if a field in this list has a non-empty value.
10313	// This may be used to include null fields in Patch requests.
10314	NullFields []string `json:"-"`
10315}
10316
10317func (s *PlacementTag) MarshalJSON() ([]byte, error) {
10318	type NoMethod PlacementTag
10319	raw := NoMethod(*s)
10320	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10321}
10322
10323// PlacementsGenerateTagsResponse: Placement GenerateTags Response
10324type PlacementsGenerateTagsResponse struct {
10325	// Kind: Identifies what kind of resource this is. Value: the fixed
10326	// string "dfareporting#placementsGenerateTagsResponse".
10327	Kind string `json:"kind,omitempty"`
10328
10329	// PlacementTags: Set of generated tags for the specified placements.
10330	PlacementTags []*PlacementTag `json:"placementTags,omitempty"`
10331
10332	// ServerResponse contains the HTTP response code and headers from the
10333	// server.
10334	googleapi.ServerResponse `json:"-"`
10335
10336	// ForceSendFields is a list of field names (e.g. "Kind") to
10337	// unconditionally include in API requests. By default, fields with
10338	// empty values are omitted from API requests. However, any non-pointer,
10339	// non-interface field appearing in ForceSendFields will be sent to the
10340	// server regardless of whether the field is empty or not. This may be
10341	// used to include empty fields in Patch requests.
10342	ForceSendFields []string `json:"-"`
10343
10344	// NullFields is a list of field names (e.g. "Kind") to include in API
10345	// requests with the JSON null value. By default, fields with empty
10346	// values are omitted from API requests. However, any field with an
10347	// empty value appearing in NullFields will be sent to the server as
10348	// null. It is an error if a field in this list has a non-empty value.
10349	// This may be used to include null fields in Patch requests.
10350	NullFields []string `json:"-"`
10351}
10352
10353func (s *PlacementsGenerateTagsResponse) MarshalJSON() ([]byte, error) {
10354	type NoMethod PlacementsGenerateTagsResponse
10355	raw := NoMethod(*s)
10356	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10357}
10358
10359// PlacementsListResponse: Placement List Response
10360type PlacementsListResponse struct {
10361	// Kind: Identifies what kind of resource this is. Value: the fixed
10362	// string "dfareporting#placementsListResponse".
10363	Kind string `json:"kind,omitempty"`
10364
10365	// NextPageToken: Pagination token to be used for the next list
10366	// operation.
10367	NextPageToken string `json:"nextPageToken,omitempty"`
10368
10369	// Placements: Placement collection.
10370	Placements []*Placement `json:"placements,omitempty"`
10371
10372	// ServerResponse contains the HTTP response code and headers from the
10373	// server.
10374	googleapi.ServerResponse `json:"-"`
10375
10376	// ForceSendFields is a list of field names (e.g. "Kind") to
10377	// unconditionally include in API requests. By default, fields with
10378	// empty values are omitted from API requests. However, any non-pointer,
10379	// non-interface field appearing in ForceSendFields will be sent to the
10380	// server regardless of whether the field is empty or not. This may be
10381	// used to include empty fields in Patch requests.
10382	ForceSendFields []string `json:"-"`
10383
10384	// NullFields is a list of field names (e.g. "Kind") to include in API
10385	// requests with the JSON null value. By default, fields with empty
10386	// values are omitted from API requests. However, any field with an
10387	// empty value appearing in NullFields will be sent to the server as
10388	// null. It is an error if a field in this list has a non-empty value.
10389	// This may be used to include null fields in Patch requests.
10390	NullFields []string `json:"-"`
10391}
10392
10393func (s *PlacementsListResponse) MarshalJSON() ([]byte, error) {
10394	type NoMethod PlacementsListResponse
10395	raw := NoMethod(*s)
10396	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10397}
10398
10399// PlatformType: Contains information about a platform type that can be
10400// targeted by ads.
10401type PlatformType struct {
10402	// Id: ID of this platform type.
10403	Id int64 `json:"id,omitempty,string"`
10404
10405	// Kind: Identifies what kind of resource this is. Value: the fixed
10406	// string "dfareporting#platformType".
10407	Kind string `json:"kind,omitempty"`
10408
10409	// Name: Name of this platform type.
10410	Name string `json:"name,omitempty"`
10411
10412	// ServerResponse contains the HTTP response code and headers from the
10413	// server.
10414	googleapi.ServerResponse `json:"-"`
10415
10416	// ForceSendFields is a list of field names (e.g. "Id") to
10417	// unconditionally include in API requests. By default, fields with
10418	// empty values are omitted from API requests. However, any non-pointer,
10419	// non-interface field appearing in ForceSendFields will be sent to the
10420	// server regardless of whether the field is empty or not. This may be
10421	// used to include empty fields in Patch requests.
10422	ForceSendFields []string `json:"-"`
10423
10424	// NullFields is a list of field names (e.g. "Id") to include in API
10425	// requests with the JSON null value. By default, fields with empty
10426	// values are omitted from API requests. However, any field with an
10427	// empty value appearing in NullFields will be sent to the server as
10428	// null. It is an error if a field in this list has a non-empty value.
10429	// This may be used to include null fields in Patch requests.
10430	NullFields []string `json:"-"`
10431}
10432
10433func (s *PlatformType) MarshalJSON() ([]byte, error) {
10434	type NoMethod PlatformType
10435	raw := NoMethod(*s)
10436	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10437}
10438
10439// PlatformTypesListResponse: Platform Type List Response
10440type PlatformTypesListResponse struct {
10441	// Kind: Identifies what kind of resource this is. Value: the fixed
10442	// string "dfareporting#platformTypesListResponse".
10443	Kind string `json:"kind,omitempty"`
10444
10445	// PlatformTypes: Platform type collection.
10446	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
10447
10448	// ServerResponse contains the HTTP response code and headers from the
10449	// server.
10450	googleapi.ServerResponse `json:"-"`
10451
10452	// ForceSendFields is a list of field names (e.g. "Kind") to
10453	// unconditionally include in API requests. By default, fields with
10454	// empty values are omitted from API requests. However, any non-pointer,
10455	// non-interface field appearing in ForceSendFields will be sent to the
10456	// server regardless of whether the field is empty or not. This may be
10457	// used to include empty fields in Patch requests.
10458	ForceSendFields []string `json:"-"`
10459
10460	// NullFields is a list of field names (e.g. "Kind") to include in API
10461	// requests with the JSON null value. By default, fields with empty
10462	// values are omitted from API requests. However, any field with an
10463	// empty value appearing in NullFields will be sent to the server as
10464	// null. It is an error if a field in this list has a non-empty value.
10465	// This may be used to include null fields in Patch requests.
10466	NullFields []string `json:"-"`
10467}
10468
10469func (s *PlatformTypesListResponse) MarshalJSON() ([]byte, error) {
10470	type NoMethod PlatformTypesListResponse
10471	raw := NoMethod(*s)
10472	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10473}
10474
10475// PopupWindowProperties: Popup Window Properties.
10476type PopupWindowProperties struct {
10477	// Dimension: Popup dimension for a creative. This is a read-only field.
10478	// Applicable to the following creative types: all RICH_MEDIA and all
10479	// VPAID
10480	Dimension *Size `json:"dimension,omitempty"`
10481
10482	// Offset: Upper-left corner coordinates of the popup window. Applicable
10483	// if positionType is COORDINATES.
10484	Offset *OffsetPosition `json:"offset,omitempty"`
10485
10486	// PositionType: Popup window position either centered or at specific
10487	// coordinate.
10488	//
10489	// Possible values:
10490	//   "CENTER"
10491	//   "COORDINATES"
10492	PositionType string `json:"positionType,omitempty"`
10493
10494	// ShowAddressBar: Whether to display the browser address bar.
10495	ShowAddressBar bool `json:"showAddressBar,omitempty"`
10496
10497	// ShowMenuBar: Whether to display the browser menu bar.
10498	ShowMenuBar bool `json:"showMenuBar,omitempty"`
10499
10500	// ShowScrollBar: Whether to display the browser scroll bar.
10501	ShowScrollBar bool `json:"showScrollBar,omitempty"`
10502
10503	// ShowStatusBar: Whether to display the browser status bar.
10504	ShowStatusBar bool `json:"showStatusBar,omitempty"`
10505
10506	// ShowToolBar: Whether to display the browser tool bar.
10507	ShowToolBar bool `json:"showToolBar,omitempty"`
10508
10509	// Title: Title of popup window.
10510	Title string `json:"title,omitempty"`
10511
10512	// ForceSendFields is a list of field names (e.g. "Dimension") to
10513	// unconditionally include in API requests. By default, fields with
10514	// empty values are omitted from API requests. However, any non-pointer,
10515	// non-interface field appearing in ForceSendFields will be sent to the
10516	// server regardless of whether the field is empty or not. This may be
10517	// used to include empty fields in Patch requests.
10518	ForceSendFields []string `json:"-"`
10519
10520	// NullFields is a list of field names (e.g. "Dimension") to include in
10521	// API requests with the JSON null value. By default, fields with empty
10522	// values are omitted from API requests. However, any field with an
10523	// empty value appearing in NullFields will be sent to the server as
10524	// null. It is an error if a field in this list has a non-empty value.
10525	// This may be used to include null fields in Patch requests.
10526	NullFields []string `json:"-"`
10527}
10528
10529func (s *PopupWindowProperties) MarshalJSON() ([]byte, error) {
10530	type NoMethod PopupWindowProperties
10531	raw := NoMethod(*s)
10532	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10533}
10534
10535// PostalCode: Contains information about a postal code that can be
10536// targeted by ads.
10537type PostalCode struct {
10538	// Code: Postal code. This is equivalent to the id field.
10539	Code string `json:"code,omitempty"`
10540
10541	// CountryCode: Country code of the country to which this postal code
10542	// belongs.
10543	CountryCode string `json:"countryCode,omitempty"`
10544
10545	// CountryDartId: DART ID of the country to which this postal code
10546	// belongs.
10547	CountryDartId int64 `json:"countryDartId,omitempty,string"`
10548
10549	// Id: ID of this postal code.
10550	Id string `json:"id,omitempty"`
10551
10552	// Kind: Identifies what kind of resource this is. Value: the fixed
10553	// string "dfareporting#postalCode".
10554	Kind string `json:"kind,omitempty"`
10555
10556	// ServerResponse contains the HTTP response code and headers from the
10557	// server.
10558	googleapi.ServerResponse `json:"-"`
10559
10560	// ForceSendFields is a list of field names (e.g. "Code") to
10561	// unconditionally include in API requests. By default, fields with
10562	// empty values are omitted from API requests. However, any non-pointer,
10563	// non-interface field appearing in ForceSendFields will be sent to the
10564	// server regardless of whether the field is empty or not. This may be
10565	// used to include empty fields in Patch requests.
10566	ForceSendFields []string `json:"-"`
10567
10568	// NullFields is a list of field names (e.g. "Code") to include in API
10569	// requests with the JSON null value. By default, fields with empty
10570	// values are omitted from API requests. However, any field with an
10571	// empty value appearing in NullFields will be sent to the server as
10572	// null. It is an error if a field in this list has a non-empty value.
10573	// This may be used to include null fields in Patch requests.
10574	NullFields []string `json:"-"`
10575}
10576
10577func (s *PostalCode) MarshalJSON() ([]byte, error) {
10578	type NoMethod PostalCode
10579	raw := NoMethod(*s)
10580	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10581}
10582
10583// PostalCodesListResponse: Postal Code List Response
10584type PostalCodesListResponse struct {
10585	// Kind: Identifies what kind of resource this is. Value: the fixed
10586	// string "dfareporting#postalCodesListResponse".
10587	Kind string `json:"kind,omitempty"`
10588
10589	// PostalCodes: Postal code collection.
10590	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
10591
10592	// ServerResponse contains the HTTP response code and headers from the
10593	// server.
10594	googleapi.ServerResponse `json:"-"`
10595
10596	// ForceSendFields is a list of field names (e.g. "Kind") to
10597	// unconditionally include in API requests. By default, fields with
10598	// empty values are omitted from API requests. However, any non-pointer,
10599	// non-interface field appearing in ForceSendFields will be sent to the
10600	// server regardless of whether the field is empty or not. This may be
10601	// used to include empty fields in Patch requests.
10602	ForceSendFields []string `json:"-"`
10603
10604	// NullFields is a list of field names (e.g. "Kind") to include in API
10605	// requests with the JSON null value. By default, fields with empty
10606	// values are omitted from API requests. However, any field with an
10607	// empty value appearing in NullFields will be sent to the server as
10608	// null. It is an error if a field in this list has a non-empty value.
10609	// This may be used to include null fields in Patch requests.
10610	NullFields []string `json:"-"`
10611}
10612
10613func (s *PostalCodesListResponse) MarshalJSON() ([]byte, error) {
10614	type NoMethod PostalCodesListResponse
10615	raw := NoMethod(*s)
10616	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10617}
10618
10619// Pricing: Pricing Information
10620type Pricing struct {
10621	// CapCostType: Cap cost type of this inventory item.
10622	//
10623	// Possible values:
10624	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_CUMULATIVE"
10625	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_MONTHLY"
10626	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_NONE"
10627	CapCostType string `json:"capCostType,omitempty"`
10628
10629	// EndDate: End date of this inventory item.
10630	EndDate string `json:"endDate,omitempty"`
10631
10632	// Flights: Flights of this inventory item. A flight (a.k.a. pricing
10633	// period) represents the inventory item pricing information for a
10634	// specific period of time.
10635	Flights []*Flight `json:"flights,omitempty"`
10636
10637	// GroupType: Group type of this inventory item if it represents a
10638	// placement group. Is null otherwise. There are two type of placement
10639	// groups: PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE is a simple group of
10640	// inventory items that acts as a single pricing point for a group of
10641	// tags. PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK is a group of inventory
10642	// items that not only acts as a single pricing point, but also assumes
10643	// that all the tags in it will be served at the same time. A roadblock
10644	// requires one of its assigned inventory items to be marked as primary.
10645	//
10646	// Possible values:
10647	//   "PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE"
10648	//   "PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK"
10649	GroupType string `json:"groupType,omitempty"`
10650
10651	// PricingType: Pricing type of this inventory item.
10652	//
10653	// Possible values:
10654	//   "PLANNING_PLACEMENT_PRICING_TYPE_CLICKS"
10655	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPA"
10656	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPC"
10657	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM"
10658	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM_ACTIVEVIEW"
10659	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_CLICKS"
10660	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
10661	//   "PLANNING_PLACEMENT_PRICING_TYPE_IMPRESSIONS"
10662	PricingType string `json:"pricingType,omitempty"`
10663
10664	// StartDate: Start date of this inventory item.
10665	StartDate string `json:"startDate,omitempty"`
10666
10667	// ForceSendFields is a list of field names (e.g. "CapCostType") to
10668	// unconditionally include in API requests. By default, fields with
10669	// empty values are omitted from API requests. However, any non-pointer,
10670	// non-interface field appearing in ForceSendFields will be sent to the
10671	// server regardless of whether the field is empty or not. This may be
10672	// used to include empty fields in Patch requests.
10673	ForceSendFields []string `json:"-"`
10674
10675	// NullFields is a list of field names (e.g. "CapCostType") to include
10676	// in API requests with the JSON null value. By default, fields with
10677	// empty values are omitted from API requests. However, any field with
10678	// an empty value appearing in NullFields will be sent to the server as
10679	// null. It is an error if a field in this list has a non-empty value.
10680	// This may be used to include null fields in Patch requests.
10681	NullFields []string `json:"-"`
10682}
10683
10684func (s *Pricing) MarshalJSON() ([]byte, error) {
10685	type NoMethod Pricing
10686	raw := NoMethod(*s)
10687	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10688}
10689
10690// PricingSchedule: Pricing Schedule
10691type PricingSchedule struct {
10692	// CapCostOption: Placement cap cost option.
10693	//
10694	// Possible values:
10695	//   "CAP_COST_CUMULATIVE"
10696	//   "CAP_COST_MONTHLY"
10697	//   "CAP_COST_NONE"
10698	CapCostOption string `json:"capCostOption,omitempty"`
10699
10700	// DisregardOverdelivery: Whether cap costs are ignored by ad serving.
10701	DisregardOverdelivery bool `json:"disregardOverdelivery,omitempty"`
10702
10703	// EndDate: Placement end date. This date must be later than, or the
10704	// same day as, the placement start date, but not later than the
10705	// campaign end date. If, for example, you set 6/25/2015 as both the
10706	// start and end dates, the effective placement date is just that day
10707	// only, 6/25/2015. The hours, minutes, and seconds of the end date
10708	// should not be set, as doing so will result in an error. This field is
10709	// required on insertion.
10710	EndDate string `json:"endDate,omitempty"`
10711
10712	// Flighted: Whether this placement is flighted. If true, pricing
10713	// periods will be computed automatically.
10714	Flighted bool `json:"flighted,omitempty"`
10715
10716	// FloodlightActivityId: Floodlight activity ID associated with this
10717	// placement. This field should be set when placement pricing type is
10718	// set to PRICING_TYPE_CPA.
10719	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
10720
10721	// PricingPeriods: Pricing periods for this placement.
10722	PricingPeriods []*PricingSchedulePricingPeriod `json:"pricingPeriods,omitempty"`
10723
10724	// PricingType: Placement pricing type. This field is required on
10725	// insertion.
10726	//
10727	// Possible values:
10728	//   "PRICING_TYPE_CPA"
10729	//   "PRICING_TYPE_CPC"
10730	//   "PRICING_TYPE_CPM"
10731	//   "PRICING_TYPE_CPM_ACTIVEVIEW"
10732	//   "PRICING_TYPE_FLAT_RATE_CLICKS"
10733	//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
10734	PricingType string `json:"pricingType,omitempty"`
10735
10736	// StartDate: Placement start date. This date must be later than, or the
10737	// same day as, the campaign start date. The hours, minutes, and seconds
10738	// of the start date should not be set, as doing so will result in an
10739	// error. This field is required on insertion.
10740	StartDate string `json:"startDate,omitempty"`
10741
10742	// TestingStartDate: Testing start date of this placement. The hours,
10743	// minutes, and seconds of the start date should not be set, as doing so
10744	// will result in an error.
10745	TestingStartDate string `json:"testingStartDate,omitempty"`
10746
10747	// ForceSendFields is a list of field names (e.g. "CapCostOption") to
10748	// unconditionally include in API requests. By default, fields with
10749	// empty values are omitted from API requests. However, any non-pointer,
10750	// non-interface field appearing in ForceSendFields will be sent to the
10751	// server regardless of whether the field is empty or not. This may be
10752	// used to include empty fields in Patch requests.
10753	ForceSendFields []string `json:"-"`
10754
10755	// NullFields is a list of field names (e.g. "CapCostOption") to include
10756	// in API requests with the JSON null value. By default, fields with
10757	// empty values are omitted from API requests. However, any field with
10758	// an empty value appearing in NullFields will be sent to the server as
10759	// null. It is an error if a field in this list has a non-empty value.
10760	// This may be used to include null fields in Patch requests.
10761	NullFields []string `json:"-"`
10762}
10763
10764func (s *PricingSchedule) MarshalJSON() ([]byte, error) {
10765	type NoMethod PricingSchedule
10766	raw := NoMethod(*s)
10767	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10768}
10769
10770// PricingSchedulePricingPeriod: Pricing Period
10771type PricingSchedulePricingPeriod struct {
10772	// EndDate: Pricing period end date. This date must be later than, or
10773	// the same day as, the pricing period start date, but not later than
10774	// the placement end date. The period end date can be the same date as
10775	// the period start date. If, for example, you set 6/25/2015 as both the
10776	// start and end dates, the effective pricing period date is just that
10777	// day only, 6/25/2015. The hours, minutes, and seconds of the end date
10778	// should not be set, as doing so will result in an error.
10779	EndDate string `json:"endDate,omitempty"`
10780
10781	// PricingComment: Comments for this pricing period.
10782	PricingComment string `json:"pricingComment,omitempty"`
10783
10784	// RateOrCostNanos: Rate or cost of this pricing period in nanos (i.e.,
10785	// multipled by 1000000000). Acceptable values are 0 to
10786	// 1000000000000000000, inclusive.
10787	RateOrCostNanos int64 `json:"rateOrCostNanos,omitempty,string"`
10788
10789	// StartDate: Pricing period start date. This date must be later than,
10790	// or the same day as, the placement start date. The hours, minutes, and
10791	// seconds of the start date should not be set, as doing so will result
10792	// in an error.
10793	StartDate string `json:"startDate,omitempty"`
10794
10795	// Units: Units of this pricing period. Acceptable values are 0 to
10796	// 10000000000, inclusive.
10797	Units int64 `json:"units,omitempty,string"`
10798
10799	// ForceSendFields is a list of field names (e.g. "EndDate") to
10800	// unconditionally include in API requests. By default, fields with
10801	// empty values are omitted from API requests. However, any non-pointer,
10802	// non-interface field appearing in ForceSendFields will be sent to the
10803	// server regardless of whether the field is empty or not. This may be
10804	// used to include empty fields in Patch requests.
10805	ForceSendFields []string `json:"-"`
10806
10807	// NullFields is a list of field names (e.g. "EndDate") to include in
10808	// API requests with the JSON null value. By default, fields with empty
10809	// values are omitted from API requests. However, any field with an
10810	// empty value appearing in NullFields will be sent to the server as
10811	// null. It is an error if a field in this list has a non-empty value.
10812	// This may be used to include null fields in Patch requests.
10813	NullFields []string `json:"-"`
10814}
10815
10816func (s *PricingSchedulePricingPeriod) MarshalJSON() ([]byte, error) {
10817	type NoMethod PricingSchedulePricingPeriod
10818	raw := NoMethod(*s)
10819	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10820}
10821
10822// Project: Contains properties of a Planning project.
10823type Project struct {
10824	// AccountId: Account ID of this project.
10825	AccountId int64 `json:"accountId,omitempty,string"`
10826
10827	// AdvertiserId: Advertiser ID of this project.
10828	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10829
10830	// AudienceAgeGroup: Audience age group of this project.
10831	//
10832	// Possible values:
10833	//   "PLANNING_AUDIENCE_AGE_18_24"
10834	//   "PLANNING_AUDIENCE_AGE_25_34"
10835	//   "PLANNING_AUDIENCE_AGE_35_44"
10836	//   "PLANNING_AUDIENCE_AGE_45_54"
10837	//   "PLANNING_AUDIENCE_AGE_55_64"
10838	//   "PLANNING_AUDIENCE_AGE_65_OR_MORE"
10839	//   "PLANNING_AUDIENCE_AGE_UNKNOWN"
10840	AudienceAgeGroup string `json:"audienceAgeGroup,omitempty"`
10841
10842	// AudienceGender: Audience gender of this project.
10843	//
10844	// Possible values:
10845	//   "PLANNING_AUDIENCE_GENDER_FEMALE"
10846	//   "PLANNING_AUDIENCE_GENDER_MALE"
10847	AudienceGender string `json:"audienceGender,omitempty"`
10848
10849	// Budget: Budget of this project in the currency specified by the
10850	// current account. The value stored in this field represents only the
10851	// non-fractional amount. For example, for USD, the smallest value that
10852	// can be represented by this field is 1 US dollar.
10853	Budget int64 `json:"budget,omitempty,string"`
10854
10855	// ClientBillingCode: Client billing code of this project.
10856	ClientBillingCode string `json:"clientBillingCode,omitempty"`
10857
10858	// ClientName: Name of the project client.
10859	ClientName string `json:"clientName,omitempty"`
10860
10861	// EndDate: End date of the project.
10862	EndDate string `json:"endDate,omitempty"`
10863
10864	// Id: ID of this project. This is a read-only, auto-generated field.
10865	Id int64 `json:"id,omitempty,string"`
10866
10867	// Kind: Identifies what kind of resource this is. Value: the fixed
10868	// string "dfareporting#project".
10869	Kind string `json:"kind,omitempty"`
10870
10871	// LastModifiedInfo: Information about the most recent modification of
10872	// this project.
10873	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10874
10875	// Name: Name of this project.
10876	Name string `json:"name,omitempty"`
10877
10878	// Overview: Overview of this project.
10879	Overview string `json:"overview,omitempty"`
10880
10881	// StartDate: Start date of the project.
10882	StartDate string `json:"startDate,omitempty"`
10883
10884	// SubaccountId: Subaccount ID of this project.
10885	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10886
10887	// TargetClicks: Number of clicks that the advertiser is targeting.
10888	TargetClicks int64 `json:"targetClicks,omitempty,string"`
10889
10890	// TargetConversions: Number of conversions that the advertiser is
10891	// targeting.
10892	TargetConversions int64 `json:"targetConversions,omitempty,string"`
10893
10894	// TargetCpaNanos: CPA that the advertiser is targeting.
10895	TargetCpaNanos int64 `json:"targetCpaNanos,omitempty,string"`
10896
10897	// TargetCpcNanos: CPC that the advertiser is targeting.
10898	TargetCpcNanos int64 `json:"targetCpcNanos,omitempty,string"`
10899
10900	// TargetCpmActiveViewNanos: vCPM from Active View that the advertiser
10901	// is targeting.
10902	TargetCpmActiveViewNanos int64 `json:"targetCpmActiveViewNanos,omitempty,string"`
10903
10904	// TargetCpmNanos: CPM that the advertiser is targeting.
10905	TargetCpmNanos int64 `json:"targetCpmNanos,omitempty,string"`
10906
10907	// TargetImpressions: Number of impressions that the advertiser is
10908	// targeting.
10909	TargetImpressions int64 `json:"targetImpressions,omitempty,string"`
10910
10911	// ServerResponse contains the HTTP response code and headers from the
10912	// server.
10913	googleapi.ServerResponse `json:"-"`
10914
10915	// ForceSendFields is a list of field names (e.g. "AccountId") to
10916	// unconditionally include in API requests. By default, fields with
10917	// empty values are omitted from API requests. However, any non-pointer,
10918	// non-interface field appearing in ForceSendFields will be sent to the
10919	// server regardless of whether the field is empty or not. This may be
10920	// used to include empty fields in Patch requests.
10921	ForceSendFields []string `json:"-"`
10922
10923	// NullFields is a list of field names (e.g. "AccountId") to include in
10924	// API requests with the JSON null value. By default, fields with empty
10925	// values are omitted from API requests. However, any field with an
10926	// empty value appearing in NullFields will be sent to the server as
10927	// null. It is an error if a field in this list has a non-empty value.
10928	// This may be used to include null fields in Patch requests.
10929	NullFields []string `json:"-"`
10930}
10931
10932func (s *Project) MarshalJSON() ([]byte, error) {
10933	type NoMethod Project
10934	raw := NoMethod(*s)
10935	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10936}
10937
10938// ProjectsListResponse: Project List Response
10939type ProjectsListResponse struct {
10940	// Kind: Identifies what kind of resource this is. Value: the fixed
10941	// string "dfareporting#projectsListResponse".
10942	Kind string `json:"kind,omitempty"`
10943
10944	// NextPageToken: Pagination token to be used for the next list
10945	// operation.
10946	NextPageToken string `json:"nextPageToken,omitempty"`
10947
10948	// Projects: Project collection.
10949	Projects []*Project `json:"projects,omitempty"`
10950
10951	// ServerResponse contains the HTTP response code and headers from the
10952	// server.
10953	googleapi.ServerResponse `json:"-"`
10954
10955	// ForceSendFields is a list of field names (e.g. "Kind") to
10956	// unconditionally include in API requests. By default, fields with
10957	// empty values are omitted from API requests. However, any non-pointer,
10958	// non-interface field appearing in ForceSendFields will be sent to the
10959	// server regardless of whether the field is empty or not. This may be
10960	// used to include empty fields in Patch requests.
10961	ForceSendFields []string `json:"-"`
10962
10963	// NullFields is a list of field names (e.g. "Kind") to include in API
10964	// requests with the JSON null value. By default, fields with empty
10965	// values are omitted from API requests. However, any field with an
10966	// empty value appearing in NullFields will be sent to the server as
10967	// null. It is an error if a field in this list has a non-empty value.
10968	// This may be used to include null fields in Patch requests.
10969	NullFields []string `json:"-"`
10970}
10971
10972func (s *ProjectsListResponse) MarshalJSON() ([]byte, error) {
10973	type NoMethod ProjectsListResponse
10974	raw := NoMethod(*s)
10975	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10976}
10977
10978// ReachReportCompatibleFields: Represents fields that are compatible to
10979// be selected for a report of type "REACH".
10980type ReachReportCompatibleFields struct {
10981	// DimensionFilters: Dimensions which are compatible to be selected in
10982	// the "dimensionFilters" section of the report.
10983	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
10984
10985	// Dimensions: Dimensions which are compatible to be selected in the
10986	// "dimensions" section of the report.
10987	Dimensions []*Dimension `json:"dimensions,omitempty"`
10988
10989	// Kind: The kind of resource this is, in this case
10990	// dfareporting#reachReportCompatibleFields.
10991	Kind string `json:"kind,omitempty"`
10992
10993	// Metrics: Metrics which are compatible to be selected in the
10994	// "metricNames" section of the report.
10995	Metrics []*Metric `json:"metrics,omitempty"`
10996
10997	// PivotedActivityMetrics: Metrics which are compatible to be selected
10998	// as activity metrics to pivot on in the "activities" section of the
10999	// report.
11000	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
11001
11002	// ReachByFrequencyMetrics: Metrics which are compatible to be selected
11003	// in the "reachByFrequencyMetricNames" section of the report.
11004	ReachByFrequencyMetrics []*Metric `json:"reachByFrequencyMetrics,omitempty"`
11005
11006	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
11007	// unconditionally include in API requests. By default, fields with
11008	// empty values are omitted from API requests. However, any non-pointer,
11009	// non-interface field appearing in ForceSendFields will be sent to the
11010	// server regardless of whether the field is empty or not. This may be
11011	// used to include empty fields in Patch requests.
11012	ForceSendFields []string `json:"-"`
11013
11014	// NullFields is a list of field names (e.g. "DimensionFilters") to
11015	// include in API requests with the JSON null value. By default, fields
11016	// with empty values are omitted from API requests. However, any field
11017	// with an empty value appearing in NullFields will be sent to the
11018	// server as null. It is an error if a field in this list has a
11019	// non-empty value. This may be used to include null fields in Patch
11020	// requests.
11021	NullFields []string `json:"-"`
11022}
11023
11024func (s *ReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
11025	type NoMethod ReachReportCompatibleFields
11026	raw := NoMethod(*s)
11027	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11028}
11029
11030// Recipient: Represents a recipient.
11031type Recipient struct {
11032	// DeliveryType: The delivery type for the recipient.
11033	//
11034	// Possible values:
11035	//   "ATTACHMENT"
11036	//   "LINK"
11037	DeliveryType string `json:"deliveryType,omitempty"`
11038
11039	// Email: The email address of the recipient.
11040	Email string `json:"email,omitempty"`
11041
11042	// Kind: The kind of resource this is, in this case
11043	// dfareporting#recipient.
11044	Kind string `json:"kind,omitempty"`
11045
11046	// ForceSendFields is a list of field names (e.g. "DeliveryType") to
11047	// unconditionally include in API requests. By default, fields with
11048	// empty values are omitted from API requests. However, any non-pointer,
11049	// non-interface field appearing in ForceSendFields will be sent to the
11050	// server regardless of whether the field is empty or not. This may be
11051	// used to include empty fields in Patch requests.
11052	ForceSendFields []string `json:"-"`
11053
11054	// NullFields is a list of field names (e.g. "DeliveryType") to include
11055	// in API requests with the JSON null value. By default, fields with
11056	// empty values are omitted from API requests. However, any field with
11057	// an empty value appearing in NullFields will be sent to the server as
11058	// null. It is an error if a field in this list has a non-empty value.
11059	// This may be used to include null fields in Patch requests.
11060	NullFields []string `json:"-"`
11061}
11062
11063func (s *Recipient) MarshalJSON() ([]byte, error) {
11064	type NoMethod Recipient
11065	raw := NoMethod(*s)
11066	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11067}
11068
11069// Region: Contains information about a region that can be targeted by
11070// ads.
11071type Region struct {
11072	// CountryCode: Country code of the country to which this region
11073	// belongs.
11074	CountryCode string `json:"countryCode,omitempty"`
11075
11076	// CountryDartId: DART ID of the country to which this region belongs.
11077	CountryDartId int64 `json:"countryDartId,omitempty,string"`
11078
11079	// DartId: DART ID of this region.
11080	DartId int64 `json:"dartId,omitempty,string"`
11081
11082	// Kind: Identifies what kind of resource this is. Value: the fixed
11083	// string "dfareporting#region".
11084	Kind string `json:"kind,omitempty"`
11085
11086	// Name: Name of this region.
11087	Name string `json:"name,omitempty"`
11088
11089	// RegionCode: Region code.
11090	RegionCode string `json:"regionCode,omitempty"`
11091
11092	// ForceSendFields is a list of field names (e.g. "CountryCode") to
11093	// unconditionally include in API requests. By default, fields with
11094	// empty values are omitted from API requests. However, any non-pointer,
11095	// non-interface field appearing in ForceSendFields will be sent to the
11096	// server regardless of whether the field is empty or not. This may be
11097	// used to include empty fields in Patch requests.
11098	ForceSendFields []string `json:"-"`
11099
11100	// NullFields is a list of field names (e.g. "CountryCode") to include
11101	// in API requests with the JSON null value. By default, fields with
11102	// empty values are omitted from API requests. However, any field with
11103	// an empty value appearing in NullFields will be sent to the server as
11104	// null. It is an error if a field in this list has a non-empty value.
11105	// This may be used to include null fields in Patch requests.
11106	NullFields []string `json:"-"`
11107}
11108
11109func (s *Region) MarshalJSON() ([]byte, error) {
11110	type NoMethod Region
11111	raw := NoMethod(*s)
11112	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11113}
11114
11115// RegionsListResponse: Region List Response
11116type RegionsListResponse struct {
11117	// Kind: Identifies what kind of resource this is. Value: the fixed
11118	// string "dfareporting#regionsListResponse".
11119	Kind string `json:"kind,omitempty"`
11120
11121	// Regions: Region collection.
11122	Regions []*Region `json:"regions,omitempty"`
11123
11124	// ServerResponse contains the HTTP response code and headers from the
11125	// server.
11126	googleapi.ServerResponse `json:"-"`
11127
11128	// ForceSendFields is a list of field names (e.g. "Kind") to
11129	// unconditionally include in API requests. By default, fields with
11130	// empty values are omitted from API requests. However, any non-pointer,
11131	// non-interface field appearing in ForceSendFields will be sent to the
11132	// server regardless of whether the field is empty or not. This may be
11133	// used to include empty fields in Patch requests.
11134	ForceSendFields []string `json:"-"`
11135
11136	// NullFields is a list of field names (e.g. "Kind") to include in API
11137	// requests with the JSON null value. By default, fields with empty
11138	// values are omitted from API requests. However, any field with an
11139	// empty value appearing in NullFields will be sent to the server as
11140	// null. It is an error if a field in this list has a non-empty value.
11141	// This may be used to include null fields in Patch requests.
11142	NullFields []string `json:"-"`
11143}
11144
11145func (s *RegionsListResponse) MarshalJSON() ([]byte, error) {
11146	type NoMethod RegionsListResponse
11147	raw := NoMethod(*s)
11148	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11149}
11150
11151// RemarketingList: Contains properties of a remarketing list.
11152// Remarketing enables you to create lists of users who have performed
11153// specific actions on a site, then target ads to members of those
11154// lists. This resource can be used to manage remarketing lists that are
11155// owned by your advertisers. To see all remarketing lists that are
11156// visible to your advertisers, including those that are shared to your
11157// advertiser or account, use the TargetableRemarketingLists resource.
11158type RemarketingList struct {
11159	// AccountId: Account ID of this remarketing list. This is a read-only,
11160	// auto-generated field that is only returned in GET requests.
11161	AccountId int64 `json:"accountId,omitempty,string"`
11162
11163	// Active: Whether this remarketing list is active.
11164	Active bool `json:"active,omitempty"`
11165
11166	// AdvertiserId: Dimension value for the advertiser ID that owns this
11167	// remarketing list. This is a required field.
11168	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11169
11170	// AdvertiserIdDimensionValue: Dimension value for the ID of the
11171	// advertiser. This is a read-only, auto-generated field.
11172	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
11173
11174	// Description: Remarketing list description.
11175	Description string `json:"description,omitempty"`
11176
11177	// Id: Remarketing list ID. This is a read-only, auto-generated field.
11178	Id int64 `json:"id,omitempty,string"`
11179
11180	// Kind: Identifies what kind of resource this is. Value: the fixed
11181	// string "dfareporting#remarketingList".
11182	Kind string `json:"kind,omitempty"`
11183
11184	// LifeSpan: Number of days that a user should remain in the remarketing
11185	// list without an impression. Acceptable values are 1 to 540,
11186	// inclusive.
11187	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
11188
11189	// ListPopulationRule: Rule used to populate the remarketing list with
11190	// users.
11191	ListPopulationRule *ListPopulationRule `json:"listPopulationRule,omitempty"`
11192
11193	// ListSize: Number of users currently in the list. This is a read-only
11194	// field.
11195	ListSize int64 `json:"listSize,omitempty,string"`
11196
11197	// ListSource: Product from which this remarketing list was originated.
11198	//
11199	// Possible values:
11200	//   "REMARKETING_LIST_SOURCE_ADX"
11201	//   "REMARKETING_LIST_SOURCE_DBM"
11202	//   "REMARKETING_LIST_SOURCE_DFA"
11203	//   "REMARKETING_LIST_SOURCE_DFP"
11204	//   "REMARKETING_LIST_SOURCE_DMP"
11205	//   "REMARKETING_LIST_SOURCE_GA"
11206	//   "REMARKETING_LIST_SOURCE_GPLUS"
11207	//   "REMARKETING_LIST_SOURCE_OTHER"
11208	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
11209	//   "REMARKETING_LIST_SOURCE_XFP"
11210	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
11211	ListSource string `json:"listSource,omitempty"`
11212
11213	// Name: Name of the remarketing list. This is a required field. Must be
11214	// no greater than 128 characters long.
11215	Name string `json:"name,omitempty"`
11216
11217	// SubaccountId: Subaccount ID of this remarketing list. This is a
11218	// read-only, auto-generated field that is only returned in GET
11219	// requests.
11220	SubaccountId int64 `json:"subaccountId,omitempty,string"`
11221
11222	// ServerResponse contains the HTTP response code and headers from the
11223	// server.
11224	googleapi.ServerResponse `json:"-"`
11225
11226	// ForceSendFields is a list of field names (e.g. "AccountId") to
11227	// unconditionally include in API requests. By default, fields with
11228	// empty values are omitted from API requests. However, any non-pointer,
11229	// non-interface field appearing in ForceSendFields will be sent to the
11230	// server regardless of whether the field is empty or not. This may be
11231	// used to include empty fields in Patch requests.
11232	ForceSendFields []string `json:"-"`
11233
11234	// NullFields is a list of field names (e.g. "AccountId") to include in
11235	// API requests with the JSON null value. By default, fields with empty
11236	// values are omitted from API requests. However, any field with an
11237	// empty value appearing in NullFields will be sent to the server as
11238	// null. It is an error if a field in this list has a non-empty value.
11239	// This may be used to include null fields in Patch requests.
11240	NullFields []string `json:"-"`
11241}
11242
11243func (s *RemarketingList) MarshalJSON() ([]byte, error) {
11244	type NoMethod RemarketingList
11245	raw := NoMethod(*s)
11246	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11247}
11248
11249// RemarketingListShare: Contains properties of a remarketing list's
11250// sharing information. Sharing allows other accounts or advertisers to
11251// target to your remarketing lists. This resource can be used to manage
11252// remarketing list sharing to other accounts and advertisers.
11253type RemarketingListShare struct {
11254	// Kind: Identifies what kind of resource this is. Value: the fixed
11255	// string "dfareporting#remarketingListShare".
11256	Kind string `json:"kind,omitempty"`
11257
11258	// RemarketingListId: Remarketing list ID. This is a read-only,
11259	// auto-generated field.
11260	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
11261
11262	// SharedAccountIds: Accounts that the remarketing list is shared with.
11263	SharedAccountIds googleapi.Int64s `json:"sharedAccountIds,omitempty"`
11264
11265	// SharedAdvertiserIds: Advertisers that the remarketing list is shared
11266	// with.
11267	SharedAdvertiserIds googleapi.Int64s `json:"sharedAdvertiserIds,omitempty"`
11268
11269	// ServerResponse contains the HTTP response code and headers from the
11270	// server.
11271	googleapi.ServerResponse `json:"-"`
11272
11273	// ForceSendFields is a list of field names (e.g. "Kind") to
11274	// unconditionally include in API requests. By default, fields with
11275	// empty values are omitted from API requests. However, any non-pointer,
11276	// non-interface field appearing in ForceSendFields will be sent to the
11277	// server regardless of whether the field is empty or not. This may be
11278	// used to include empty fields in Patch requests.
11279	ForceSendFields []string `json:"-"`
11280
11281	// NullFields is a list of field names (e.g. "Kind") to include in API
11282	// requests with the JSON null value. By default, fields with empty
11283	// values are omitted from API requests. However, any field with an
11284	// empty value appearing in NullFields will be sent to the server as
11285	// null. It is an error if a field in this list has a non-empty value.
11286	// This may be used to include null fields in Patch requests.
11287	NullFields []string `json:"-"`
11288}
11289
11290func (s *RemarketingListShare) MarshalJSON() ([]byte, error) {
11291	type NoMethod RemarketingListShare
11292	raw := NoMethod(*s)
11293	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11294}
11295
11296// RemarketingListsListResponse: Remarketing list response
11297type RemarketingListsListResponse struct {
11298	// Kind: Identifies what kind of resource this is. Value: the fixed
11299	// string "dfareporting#remarketingListsListResponse".
11300	Kind string `json:"kind,omitempty"`
11301
11302	// NextPageToken: Pagination token to be used for the next list
11303	// operation.
11304	NextPageToken string `json:"nextPageToken,omitempty"`
11305
11306	// RemarketingLists: Remarketing list collection.
11307	RemarketingLists []*RemarketingList `json:"remarketingLists,omitempty"`
11308
11309	// ServerResponse contains the HTTP response code and headers from the
11310	// server.
11311	googleapi.ServerResponse `json:"-"`
11312
11313	// ForceSendFields is a list of field names (e.g. "Kind") to
11314	// unconditionally include in API requests. By default, fields with
11315	// empty values are omitted from API requests. However, any non-pointer,
11316	// non-interface field appearing in ForceSendFields will be sent to the
11317	// server regardless of whether the field is empty or not. This may be
11318	// used to include empty fields in Patch requests.
11319	ForceSendFields []string `json:"-"`
11320
11321	// NullFields is a list of field names (e.g. "Kind") to include in API
11322	// requests with the JSON null value. By default, fields with empty
11323	// values are omitted from API requests. However, any field with an
11324	// empty value appearing in NullFields will be sent to the server as
11325	// null. It is an error if a field in this list has a non-empty value.
11326	// This may be used to include null fields in Patch requests.
11327	NullFields []string `json:"-"`
11328}
11329
11330func (s *RemarketingListsListResponse) MarshalJSON() ([]byte, error) {
11331	type NoMethod RemarketingListsListResponse
11332	raw := NoMethod(*s)
11333	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11334}
11335
11336// Report: Represents a Report resource.
11337type Report struct {
11338	// AccountId: The account ID to which this report belongs.
11339	AccountId int64 `json:"accountId,omitempty,string"`
11340
11341	// Criteria: The report criteria for a report of type "STANDARD".
11342	Criteria *ReportCriteria `json:"criteria,omitempty"`
11343
11344	// CrossDimensionReachCriteria: The report criteria for a report of type
11345	// "CROSS_DIMENSION_REACH".
11346	CrossDimensionReachCriteria *ReportCrossDimensionReachCriteria `json:"crossDimensionReachCriteria,omitempty"`
11347
11348	// Delivery: The report's email delivery settings.
11349	Delivery *ReportDelivery `json:"delivery,omitempty"`
11350
11351	// Etag: The eTag of this response for caching purposes.
11352	Etag string `json:"etag,omitempty"`
11353
11354	// FileName: The filename used when generating report files for this
11355	// report.
11356	FileName string `json:"fileName,omitempty"`
11357
11358	// FloodlightCriteria: The report criteria for a report of type
11359	// "FLOODLIGHT".
11360	FloodlightCriteria *ReportFloodlightCriteria `json:"floodlightCriteria,omitempty"`
11361
11362	// Format: The output format of the report. If not specified, default
11363	// format is "CSV". Note that the actual format in the completed report
11364	// file might differ if for instance the report's size exceeds the
11365	// format's capabilities. "CSV" will then be the fallback format.
11366	//
11367	// Possible values:
11368	//   "CSV"
11369	//   "EXCEL"
11370	Format string `json:"format,omitempty"`
11371
11372	// Id: The unique ID identifying this report resource.
11373	Id int64 `json:"id,omitempty,string"`
11374
11375	// Kind: The kind of resource this is, in this case dfareporting#report.
11376	Kind string `json:"kind,omitempty"`
11377
11378	// LastModifiedTime: The timestamp (in milliseconds since epoch) of when
11379	// this report was last modified.
11380	LastModifiedTime uint64 `json:"lastModifiedTime,omitempty,string"`
11381
11382	// Name: The name of the report.
11383	Name string `json:"name,omitempty"`
11384
11385	// OwnerProfileId: The user profile id of the owner of this report.
11386	OwnerProfileId int64 `json:"ownerProfileId,omitempty,string"`
11387
11388	// PathToConversionCriteria: The report criteria for a report of type
11389	// "PATH_TO_CONVERSION".
11390	PathToConversionCriteria *ReportPathToConversionCriteria `json:"pathToConversionCriteria,omitempty"`
11391
11392	// ReachCriteria: The report criteria for a report of type "REACH".
11393	ReachCriteria *ReportReachCriteria `json:"reachCriteria,omitempty"`
11394
11395	// Schedule: The report's schedule. Can only be set if the report's
11396	// 'dateRange' is a relative date range and the relative date range is
11397	// not "TODAY".
11398	Schedule *ReportSchedule `json:"schedule,omitempty"`
11399
11400	// SubAccountId: The subaccount ID to which this report belongs if
11401	// applicable.
11402	SubAccountId int64 `json:"subAccountId,omitempty,string"`
11403
11404	// Type: The type of the report.
11405	//
11406	// Possible values:
11407	//   "CROSS_DIMENSION_REACH"
11408	//   "FLOODLIGHT"
11409	//   "PATH_TO_CONVERSION"
11410	//   "REACH"
11411	//   "STANDARD"
11412	Type string `json:"type,omitempty"`
11413
11414	// ServerResponse contains the HTTP response code and headers from the
11415	// server.
11416	googleapi.ServerResponse `json:"-"`
11417
11418	// ForceSendFields is a list of field names (e.g. "AccountId") to
11419	// unconditionally include in API requests. By default, fields with
11420	// empty values are omitted from API requests. However, any non-pointer,
11421	// non-interface field appearing in ForceSendFields will be sent to the
11422	// server regardless of whether the field is empty or not. This may be
11423	// used to include empty fields in Patch requests.
11424	ForceSendFields []string `json:"-"`
11425
11426	// NullFields is a list of field names (e.g. "AccountId") to include in
11427	// API requests with the JSON null value. By default, fields with empty
11428	// values are omitted from API requests. However, any field with an
11429	// empty value appearing in NullFields will be sent to the server as
11430	// null. It is an error if a field in this list has a non-empty value.
11431	// This may be used to include null fields in Patch requests.
11432	NullFields []string `json:"-"`
11433}
11434
11435func (s *Report) MarshalJSON() ([]byte, error) {
11436	type NoMethod Report
11437	raw := NoMethod(*s)
11438	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11439}
11440
11441// ReportCriteria: The report criteria for a report of type "STANDARD".
11442type ReportCriteria struct {
11443	// Activities: Activity group.
11444	Activities *Activities `json:"activities,omitempty"`
11445
11446	// CustomRichMediaEvents: Custom Rich Media Events group.
11447	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11448
11449	// DateRange: The date range for which this report should be run.
11450	DateRange *DateRange `json:"dateRange,omitempty"`
11451
11452	// DimensionFilters: The list of filters on which dimensions are
11453	// filtered.
11454	// Filters for different dimensions are ANDed, filters for the same
11455	// dimension are grouped together and ORed.
11456	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11457
11458	// Dimensions: The list of standard dimensions the report should
11459	// include.
11460	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11461
11462	// MetricNames: The list of names of metrics the report should include.
11463	MetricNames []string `json:"metricNames,omitempty"`
11464
11465	// ForceSendFields is a list of field names (e.g. "Activities") to
11466	// unconditionally include in API requests. By default, fields with
11467	// empty values are omitted from API requests. However, any non-pointer,
11468	// non-interface field appearing in ForceSendFields will be sent to the
11469	// server regardless of whether the field is empty or not. This may be
11470	// used to include empty fields in Patch requests.
11471	ForceSendFields []string `json:"-"`
11472
11473	// NullFields is a list of field names (e.g. "Activities") to include in
11474	// API requests with the JSON null value. By default, fields with empty
11475	// values are omitted from API requests. However, any field with an
11476	// empty value appearing in NullFields will be sent to the server as
11477	// null. It is an error if a field in this list has a non-empty value.
11478	// This may be used to include null fields in Patch requests.
11479	NullFields []string `json:"-"`
11480}
11481
11482func (s *ReportCriteria) MarshalJSON() ([]byte, error) {
11483	type NoMethod ReportCriteria
11484	raw := NoMethod(*s)
11485	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11486}
11487
11488// ReportCrossDimensionReachCriteria: The report criteria for a report
11489// of type "CROSS_DIMENSION_REACH".
11490type ReportCrossDimensionReachCriteria struct {
11491	// Breakdown: The list of dimensions the report should include.
11492	Breakdown []*SortedDimension `json:"breakdown,omitempty"`
11493
11494	// DateRange: The date range this report should be run for.
11495	DateRange *DateRange `json:"dateRange,omitempty"`
11496
11497	// Dimension: The dimension option.
11498	//
11499	// Possible values:
11500	//   "ADVERTISER"
11501	//   "CAMPAIGN"
11502	//   "SITE_BY_ADVERTISER"
11503	//   "SITE_BY_CAMPAIGN"
11504	Dimension string `json:"dimension,omitempty"`
11505
11506	// DimensionFilters: The list of filters on which dimensions are
11507	// filtered.
11508	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11509
11510	// MetricNames: The list of names of metrics the report should include.
11511	MetricNames []string `json:"metricNames,omitempty"`
11512
11513	// OverlapMetricNames: The list of names of overlap metrics the report
11514	// should include.
11515	OverlapMetricNames []string `json:"overlapMetricNames,omitempty"`
11516
11517	// Pivoted: Whether the report is pivoted or not. Defaults to true.
11518	Pivoted bool `json:"pivoted,omitempty"`
11519
11520	// ForceSendFields is a list of field names (e.g. "Breakdown") to
11521	// unconditionally include in API requests. By default, fields with
11522	// empty values are omitted from API requests. However, any non-pointer,
11523	// non-interface field appearing in ForceSendFields will be sent to the
11524	// server regardless of whether the field is empty or not. This may be
11525	// used to include empty fields in Patch requests.
11526	ForceSendFields []string `json:"-"`
11527
11528	// NullFields is a list of field names (e.g. "Breakdown") to include in
11529	// API requests with the JSON null value. By default, fields with empty
11530	// values are omitted from API requests. However, any field with an
11531	// empty value appearing in NullFields will be sent to the server as
11532	// null. It is an error if a field in this list has a non-empty value.
11533	// This may be used to include null fields in Patch requests.
11534	NullFields []string `json:"-"`
11535}
11536
11537func (s *ReportCrossDimensionReachCriteria) MarshalJSON() ([]byte, error) {
11538	type NoMethod ReportCrossDimensionReachCriteria
11539	raw := NoMethod(*s)
11540	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11541}
11542
11543// ReportDelivery: The report's email delivery settings.
11544type ReportDelivery struct {
11545	// EmailOwner: Whether the report should be emailed to the report owner.
11546	EmailOwner bool `json:"emailOwner,omitempty"`
11547
11548	// EmailOwnerDeliveryType: The type of delivery for the owner to
11549	// receive, if enabled.
11550	//
11551	// Possible values:
11552	//   "ATTACHMENT"
11553	//   "LINK"
11554	EmailOwnerDeliveryType string `json:"emailOwnerDeliveryType,omitempty"`
11555
11556	// Message: The message to be sent with each email.
11557	Message string `json:"message,omitempty"`
11558
11559	// Recipients: The list of recipients to which to email the report.
11560	Recipients []*Recipient `json:"recipients,omitempty"`
11561
11562	// ForceSendFields is a list of field names (e.g. "EmailOwner") to
11563	// unconditionally include in API requests. By default, fields with
11564	// empty values are omitted from API requests. However, any non-pointer,
11565	// non-interface field appearing in ForceSendFields will be sent to the
11566	// server regardless of whether the field is empty or not. This may be
11567	// used to include empty fields in Patch requests.
11568	ForceSendFields []string `json:"-"`
11569
11570	// NullFields is a list of field names (e.g. "EmailOwner") to include in
11571	// API requests with the JSON null value. By default, fields with empty
11572	// values are omitted from API requests. However, any field with an
11573	// empty value appearing in NullFields will be sent to the server as
11574	// null. It is an error if a field in this list has a non-empty value.
11575	// This may be used to include null fields in Patch requests.
11576	NullFields []string `json:"-"`
11577}
11578
11579func (s *ReportDelivery) MarshalJSON() ([]byte, error) {
11580	type NoMethod ReportDelivery
11581	raw := NoMethod(*s)
11582	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11583}
11584
11585// ReportFloodlightCriteria: The report criteria for a report of type
11586// "FLOODLIGHT".
11587type ReportFloodlightCriteria struct {
11588	// CustomRichMediaEvents: The list of custom rich media events to
11589	// include.
11590	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11591
11592	// DateRange: The date range this report should be run for.
11593	DateRange *DateRange `json:"dateRange,omitempty"`
11594
11595	// DimensionFilters: The list of filters on which dimensions are
11596	// filtered.
11597	// Filters for different dimensions are ANDed, filters for the same
11598	// dimension are grouped together and ORed.
11599	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11600
11601	// Dimensions: The list of dimensions the report should include.
11602	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11603
11604	// FloodlightConfigId: The floodlight ID for which to show data in this
11605	// report. All advertisers associated with that ID will automatically be
11606	// added. The dimension of the value needs to be
11607	// 'dfa:floodlightConfigId'.
11608	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11609
11610	// MetricNames: The list of names of metrics the report should include.
11611	MetricNames []string `json:"metricNames,omitempty"`
11612
11613	// ReportProperties: The properties of the report.
11614	ReportProperties *ReportFloodlightCriteriaReportProperties `json:"reportProperties,omitempty"`
11615
11616	// ForceSendFields is a list of field names (e.g.
11617	// "CustomRichMediaEvents") to unconditionally include in API requests.
11618	// By default, fields with empty values are omitted from API requests.
11619	// However, any non-pointer, non-interface field appearing in
11620	// ForceSendFields will be sent to the server regardless of whether the
11621	// field is empty or not. This may be used to include empty fields in
11622	// Patch requests.
11623	ForceSendFields []string `json:"-"`
11624
11625	// NullFields is a list of field names (e.g. "CustomRichMediaEvents") to
11626	// include in API requests with the JSON null value. By default, fields
11627	// with empty values are omitted from API requests. However, any field
11628	// with an empty value appearing in NullFields will be sent to the
11629	// server as null. It is an error if a field in this list has a
11630	// non-empty value. This may be used to include null fields in Patch
11631	// requests.
11632	NullFields []string `json:"-"`
11633}
11634
11635func (s *ReportFloodlightCriteria) MarshalJSON() ([]byte, error) {
11636	type NoMethod ReportFloodlightCriteria
11637	raw := NoMethod(*s)
11638	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11639}
11640
11641// ReportFloodlightCriteriaReportProperties: The properties of the
11642// report.
11643type ReportFloodlightCriteriaReportProperties struct {
11644	// IncludeAttributedIPConversions: Include conversions that have no
11645	// cookie, but do have an exposure path.
11646	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11647
11648	// IncludeUnattributedCookieConversions: Include conversions of users
11649	// with a DoubleClick cookie but without an exposure. That means the
11650	// user did not click or see an ad from the advertiser within the
11651	// Floodlight group, or that the interaction happened outside the
11652	// lookback window.
11653	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11654
11655	// IncludeUnattributedIPConversions: Include conversions that have no
11656	// associated cookies and no exposures. It’s therefore impossible to
11657	// know how the user was exposed to your ads during the lookback window
11658	// prior to a conversion.
11659	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11660
11661	// ForceSendFields is a list of field names (e.g.
11662	// "IncludeAttributedIPConversions") to unconditionally include in API
11663	// requests. By default, fields with empty values are omitted from API
11664	// requests. However, any non-pointer, non-interface field appearing in
11665	// ForceSendFields will be sent to the server regardless of whether the
11666	// field is empty or not. This may be used to include empty fields in
11667	// Patch requests.
11668	ForceSendFields []string `json:"-"`
11669
11670	// NullFields is a list of field names (e.g.
11671	// "IncludeAttributedIPConversions") to include in API requests with the
11672	// JSON null value. By default, fields with empty values are omitted
11673	// from API requests. However, any field with an empty value appearing
11674	// in NullFields will be sent to the server as null. It is an error if a
11675	// field in this list has a non-empty value. This may be used to include
11676	// null fields in Patch requests.
11677	NullFields []string `json:"-"`
11678}
11679
11680func (s *ReportFloodlightCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11681	type NoMethod ReportFloodlightCriteriaReportProperties
11682	raw := NoMethod(*s)
11683	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11684}
11685
11686// ReportPathToConversionCriteria: The report criteria for a report of
11687// type "PATH_TO_CONVERSION".
11688type ReportPathToConversionCriteria struct {
11689	// ActivityFilters: The list of 'dfa:activity' values to filter on.
11690	ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
11691
11692	// ConversionDimensions: The list of conversion dimensions the report
11693	// should include.
11694	ConversionDimensions []*SortedDimension `json:"conversionDimensions,omitempty"`
11695
11696	// CustomFloodlightVariables: The list of custom floodlight variables
11697	// the report should include.
11698	CustomFloodlightVariables []*SortedDimension `json:"customFloodlightVariables,omitempty"`
11699
11700	// CustomRichMediaEvents: The list of custom rich media events to
11701	// include.
11702	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11703
11704	// DateRange: The date range this report should be run for.
11705	DateRange *DateRange `json:"dateRange,omitempty"`
11706
11707	// FloodlightConfigId: The floodlight ID for which to show data in this
11708	// report. All advertisers associated with that ID will automatically be
11709	// added. The dimension of the value needs to be
11710	// 'dfa:floodlightConfigId'.
11711	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11712
11713	// MetricNames: The list of names of metrics the report should include.
11714	MetricNames []string `json:"metricNames,omitempty"`
11715
11716	// PerInteractionDimensions: The list of per interaction dimensions the
11717	// report should include.
11718	PerInteractionDimensions []*SortedDimension `json:"perInteractionDimensions,omitempty"`
11719
11720	// ReportProperties: The properties of the report.
11721	ReportProperties *ReportPathToConversionCriteriaReportProperties `json:"reportProperties,omitempty"`
11722
11723	// ForceSendFields is a list of field names (e.g. "ActivityFilters") to
11724	// unconditionally include in API requests. By default, fields with
11725	// empty values are omitted from API requests. However, any non-pointer,
11726	// non-interface field appearing in ForceSendFields will be sent to the
11727	// server regardless of whether the field is empty or not. This may be
11728	// used to include empty fields in Patch requests.
11729	ForceSendFields []string `json:"-"`
11730
11731	// NullFields is a list of field names (e.g. "ActivityFilters") to
11732	// include in API requests with the JSON null value. By default, fields
11733	// with empty values are omitted from API requests. However, any field
11734	// with an empty value appearing in NullFields will be sent to the
11735	// server as null. It is an error if a field in this list has a
11736	// non-empty value. This may be used to include null fields in Patch
11737	// requests.
11738	NullFields []string `json:"-"`
11739}
11740
11741func (s *ReportPathToConversionCriteria) MarshalJSON() ([]byte, error) {
11742	type NoMethod ReportPathToConversionCriteria
11743	raw := NoMethod(*s)
11744	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11745}
11746
11747// ReportPathToConversionCriteriaReportProperties: The properties of the
11748// report.
11749type ReportPathToConversionCriteriaReportProperties struct {
11750	// ClicksLookbackWindow: DFA checks to see if a click interaction
11751	// occurred within the specified period of time before a conversion. By
11752	// default the value is pulled from Floodlight or you can manually enter
11753	// a custom value. Valid values: 1-90.
11754	ClicksLookbackWindow int64 `json:"clicksLookbackWindow,omitempty"`
11755
11756	// ImpressionsLookbackWindow: DFA checks to see if an impression
11757	// interaction occurred within the specified period of time before a
11758	// conversion. By default the value is pulled from Floodlight or you can
11759	// manually enter a custom value. Valid values: 1-90.
11760	ImpressionsLookbackWindow int64 `json:"impressionsLookbackWindow,omitempty"`
11761
11762	// IncludeAttributedIPConversions: Deprecated: has no effect.
11763	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11764
11765	// IncludeUnattributedCookieConversions: Include conversions of users
11766	// with a DoubleClick cookie but without an exposure. That means the
11767	// user did not click or see an ad from the advertiser within the
11768	// Floodlight group, or that the interaction happened outside the
11769	// lookback window.
11770	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11771
11772	// IncludeUnattributedIPConversions: Include conversions that have no
11773	// associated cookies and no exposures. It’s therefore impossible to
11774	// know how the user was exposed to your ads during the lookback window
11775	// prior to a conversion.
11776	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11777
11778	// MaximumClickInteractions: The maximum number of click interactions to
11779	// include in the report. Advertisers currently paying for E2C reports
11780	// get up to 200 (100 clicks, 100 impressions). If another advertiser in
11781	// your network is paying for E2C, you can have up to 5 total exposures
11782	// per report.
11783	MaximumClickInteractions int64 `json:"maximumClickInteractions,omitempty"`
11784
11785	// MaximumImpressionInteractions: The maximum number of click
11786	// interactions to include in the report. Advertisers currently paying
11787	// for E2C reports get up to 200 (100 clicks, 100 impressions). If
11788	// another advertiser in your network is paying for E2C, you can have up
11789	// to 5 total exposures per report.
11790	MaximumImpressionInteractions int64 `json:"maximumImpressionInteractions,omitempty"`
11791
11792	// MaximumInteractionGap: The maximum amount of time that can take place
11793	// between interactions (clicks or impressions) by the same user. Valid
11794	// values: 1-90.
11795	MaximumInteractionGap int64 `json:"maximumInteractionGap,omitempty"`
11796
11797	// PivotOnInteractionPath: Enable pivoting on interaction path.
11798	PivotOnInteractionPath bool `json:"pivotOnInteractionPath,omitempty"`
11799
11800	// ForceSendFields is a list of field names (e.g.
11801	// "ClicksLookbackWindow") to unconditionally include in API requests.
11802	// By default, fields with empty values are omitted from API requests.
11803	// However, any non-pointer, non-interface field appearing in
11804	// ForceSendFields will be sent to the server regardless of whether the
11805	// field is empty or not. This may be used to include empty fields in
11806	// Patch requests.
11807	ForceSendFields []string `json:"-"`
11808
11809	// NullFields is a list of field names (e.g. "ClicksLookbackWindow") to
11810	// include in API requests with the JSON null value. By default, fields
11811	// with empty values are omitted from API requests. However, any field
11812	// with an empty value appearing in NullFields will be sent to the
11813	// server as null. It is an error if a field in this list has a
11814	// non-empty value. This may be used to include null fields in Patch
11815	// requests.
11816	NullFields []string `json:"-"`
11817}
11818
11819func (s *ReportPathToConversionCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11820	type NoMethod ReportPathToConversionCriteriaReportProperties
11821	raw := NoMethod(*s)
11822	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11823}
11824
11825// ReportReachCriteria: The report criteria for a report of type
11826// "REACH".
11827type ReportReachCriteria struct {
11828	// Activities: Activity group.
11829	Activities *Activities `json:"activities,omitempty"`
11830
11831	// CustomRichMediaEvents: Custom Rich Media Events group.
11832	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11833
11834	// DateRange: The date range this report should be run for.
11835	DateRange *DateRange `json:"dateRange,omitempty"`
11836
11837	// DimensionFilters: The list of filters on which dimensions are
11838	// filtered.
11839	// Filters for different dimensions are ANDed, filters for the same
11840	// dimension are grouped together and ORed.
11841	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11842
11843	// Dimensions: The list of dimensions the report should include.
11844	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11845
11846	// EnableAllDimensionCombinations: Whether to enable all reach dimension
11847	// combinations in the report. Defaults to false. If enabled, the date
11848	// range of the report should be within the last 42 days.
11849	EnableAllDimensionCombinations bool `json:"enableAllDimensionCombinations,omitempty"`
11850
11851	// MetricNames: The list of names of metrics the report should include.
11852	MetricNames []string `json:"metricNames,omitempty"`
11853
11854	// ReachByFrequencyMetricNames: The list of names of  Reach By Frequency
11855	// metrics the report should include.
11856	ReachByFrequencyMetricNames []string `json:"reachByFrequencyMetricNames,omitempty"`
11857
11858	// ForceSendFields is a list of field names (e.g. "Activities") to
11859	// unconditionally include in API requests. By default, fields with
11860	// empty values are omitted from API requests. However, any non-pointer,
11861	// non-interface field appearing in ForceSendFields will be sent to the
11862	// server regardless of whether the field is empty or not. This may be
11863	// used to include empty fields in Patch requests.
11864	ForceSendFields []string `json:"-"`
11865
11866	// NullFields is a list of field names (e.g. "Activities") to include in
11867	// API requests with the JSON null value. By default, fields with empty
11868	// values are omitted from API requests. However, any field with an
11869	// empty value appearing in NullFields will be sent to the server as
11870	// null. It is an error if a field in this list has a non-empty value.
11871	// This may be used to include null fields in Patch requests.
11872	NullFields []string `json:"-"`
11873}
11874
11875func (s *ReportReachCriteria) MarshalJSON() ([]byte, error) {
11876	type NoMethod ReportReachCriteria
11877	raw := NoMethod(*s)
11878	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11879}
11880
11881// ReportSchedule: The report's schedule. Can only be set if the
11882// report's 'dateRange' is a relative date range and the relative date
11883// range is not "TODAY".
11884type ReportSchedule struct {
11885	// Active: Whether the schedule is active or not. Must be set to either
11886	// true or false.
11887	Active bool `json:"active,omitempty"`
11888
11889	// Every: Defines every how many days, weeks or months the report should
11890	// be run. Needs to be set when "repeats" is either "DAILY", "WEEKLY" or
11891	// "MONTHLY".
11892	Every int64 `json:"every,omitempty"`
11893
11894	// ExpirationDate: The expiration date when the scheduled report stops
11895	// running.
11896	ExpirationDate string `json:"expirationDate,omitempty"`
11897
11898	// Repeats: The interval for which the report is repeated. Note:
11899	// - "DAILY" also requires field "every" to be set.
11900	// - "WEEKLY" also requires fields "every" and "repeatsOnWeekDays" to be
11901	// set.
11902	// - "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be
11903	// set.
11904	Repeats string `json:"repeats,omitempty"`
11905
11906	// RepeatsOnWeekDays: List of week days "WEEKLY" on which scheduled
11907	// reports should run.
11908	//
11909	// Possible values:
11910	//   "FRIDAY"
11911	//   "MONDAY"
11912	//   "SATURDAY"
11913	//   "SUNDAY"
11914	//   "THURSDAY"
11915	//   "TUESDAY"
11916	//   "WEDNESDAY"
11917	RepeatsOnWeekDays []string `json:"repeatsOnWeekDays,omitempty"`
11918
11919	// RunsOnDayOfMonth: Enum to define for "MONTHLY" scheduled reports
11920	// whether reports should be repeated on the same day of the month as
11921	// "startDate" or the same day of the week of the month.
11922	// Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02),
11923	// "DAY_OF_MONTH" would run subsequent reports on the 2nd of every
11924	// Month, and "WEEK_OF_MONTH" would run subsequent reports on the first
11925	// Monday of the month.
11926	//
11927	// Possible values:
11928	//   "DAY_OF_MONTH"
11929	//   "WEEK_OF_MONTH"
11930	RunsOnDayOfMonth string `json:"runsOnDayOfMonth,omitempty"`
11931
11932	// StartDate: Start date of date range for which scheduled reports
11933	// should be run.
11934	StartDate string `json:"startDate,omitempty"`
11935
11936	// ForceSendFields is a list of field names (e.g. "Active") to
11937	// unconditionally include in API requests. By default, fields with
11938	// empty values are omitted from API requests. However, any non-pointer,
11939	// non-interface field appearing in ForceSendFields will be sent to the
11940	// server regardless of whether the field is empty or not. This may be
11941	// used to include empty fields in Patch requests.
11942	ForceSendFields []string `json:"-"`
11943
11944	// NullFields is a list of field names (e.g. "Active") to include in API
11945	// requests with the JSON null value. By default, fields with empty
11946	// values are omitted from API requests. However, any field with an
11947	// empty value appearing in NullFields will be sent to the server as
11948	// null. It is an error if a field in this list has a non-empty value.
11949	// This may be used to include null fields in Patch requests.
11950	NullFields []string `json:"-"`
11951}
11952
11953func (s *ReportSchedule) MarshalJSON() ([]byte, error) {
11954	type NoMethod ReportSchedule
11955	raw := NoMethod(*s)
11956	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11957}
11958
11959// ReportCompatibleFields: Represents fields that are compatible to be
11960// selected for a report of type "STANDARD".
11961type ReportCompatibleFields struct {
11962	// DimensionFilters: Dimensions which are compatible to be selected in
11963	// the "dimensionFilters" section of the report.
11964	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
11965
11966	// Dimensions: Dimensions which are compatible to be selected in the
11967	// "dimensions" section of the report.
11968	Dimensions []*Dimension `json:"dimensions,omitempty"`
11969
11970	// Kind: The kind of resource this is, in this case
11971	// dfareporting#reportCompatibleFields.
11972	Kind string `json:"kind,omitempty"`
11973
11974	// Metrics: Metrics which are compatible to be selected in the
11975	// "metricNames" section of the report.
11976	Metrics []*Metric `json:"metrics,omitempty"`
11977
11978	// PivotedActivityMetrics: Metrics which are compatible to be selected
11979	// as activity metrics to pivot on in the "activities" section of the
11980	// report.
11981	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
11982
11983	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
11984	// unconditionally include in API requests. By default, fields with
11985	// empty values are omitted from API requests. However, any non-pointer,
11986	// non-interface field appearing in ForceSendFields will be sent to the
11987	// server regardless of whether the field is empty or not. This may be
11988	// used to include empty fields in Patch requests.
11989	ForceSendFields []string `json:"-"`
11990
11991	// NullFields is a list of field names (e.g. "DimensionFilters") to
11992	// include in API requests with the JSON null value. By default, fields
11993	// with empty values are omitted from API requests. However, any field
11994	// with an empty value appearing in NullFields will be sent to the
11995	// server as null. It is an error if a field in this list has a
11996	// non-empty value. This may be used to include null fields in Patch
11997	// requests.
11998	NullFields []string `json:"-"`
11999}
12000
12001func (s *ReportCompatibleFields) MarshalJSON() ([]byte, error) {
12002	type NoMethod ReportCompatibleFields
12003	raw := NoMethod(*s)
12004	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12005}
12006
12007// ReportList: Represents the list of reports.
12008type ReportList struct {
12009	// Etag: The eTag of this response for caching purposes.
12010	Etag string `json:"etag,omitempty"`
12011
12012	// Items: The reports returned in this response.
12013	Items []*Report `json:"items,omitempty"`
12014
12015	// Kind: The kind of list this is, in this case dfareporting#reportList.
12016	Kind string `json:"kind,omitempty"`
12017
12018	// NextPageToken: Continuation token used to page through reports. To
12019	// retrieve the next page of results, set the next request's "pageToken"
12020	// to the value of this field. The page token is only valid for a
12021	// limited amount of time and should not be persisted.
12022	NextPageToken string `json:"nextPageToken,omitempty"`
12023
12024	// ServerResponse contains the HTTP response code and headers from the
12025	// server.
12026	googleapi.ServerResponse `json:"-"`
12027
12028	// ForceSendFields is a list of field names (e.g. "Etag") to
12029	// unconditionally include in API requests. By default, fields with
12030	// empty values are omitted from API requests. However, any non-pointer,
12031	// non-interface field appearing in ForceSendFields will be sent to the
12032	// server regardless of whether the field is empty or not. This may be
12033	// used to include empty fields in Patch requests.
12034	ForceSendFields []string `json:"-"`
12035
12036	// NullFields is a list of field names (e.g. "Etag") to include in API
12037	// requests with the JSON null value. By default, fields with empty
12038	// values are omitted from API requests. However, any field with an
12039	// empty value appearing in NullFields will be sent to the server as
12040	// null. It is an error if a field in this list has a non-empty value.
12041	// This may be used to include null fields in Patch requests.
12042	NullFields []string `json:"-"`
12043}
12044
12045func (s *ReportList) MarshalJSON() ([]byte, error) {
12046	type NoMethod ReportList
12047	raw := NoMethod(*s)
12048	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12049}
12050
12051// ReportsConfiguration: Reporting Configuration
12052type ReportsConfiguration struct {
12053	// ExposureToConversionEnabled: Whether the exposure to conversion
12054	// report is enabled. This report shows detailed pathway information on
12055	// up to 10 of the most recent ad exposures seen by a user before
12056	// converting.
12057	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
12058
12059	// LookbackConfiguration: Default lookback windows for new advertisers
12060	// in this account.
12061	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
12062
12063	// ReportGenerationTimeZoneId: Report generation time zone ID of this
12064	// account. This is a required field that can only be changed by a
12065	// superuser.
12066	// Acceptable values are:
12067	//
12068	// - "1" for "America/New_York"
12069	// - "2" for "Europe/London"
12070	// - "3" for "Europe/Paris"
12071	// - "4" for "Africa/Johannesburg"
12072	// - "5" for "Asia/Jerusalem"
12073	// - "6" for "Asia/Shanghai"
12074	// - "7" for "Asia/Hong_Kong"
12075	// - "8" for "Asia/Tokyo"
12076	// - "9" for "Australia/Sydney"
12077	// - "10" for "Asia/Dubai"
12078	// - "11" for "America/Los_Angeles"
12079	// - "12" for "Pacific/Auckland"
12080	// - "13" for "America/Sao_Paulo"
12081	ReportGenerationTimeZoneId int64 `json:"reportGenerationTimeZoneId,omitempty,string"`
12082
12083	// ForceSendFields is a list of field names (e.g.
12084	// "ExposureToConversionEnabled") to unconditionally include in API
12085	// requests. By default, fields with empty values are omitted from API
12086	// requests. However, any non-pointer, non-interface field appearing in
12087	// ForceSendFields will be sent to the server regardless of whether the
12088	// field is empty or not. This may be used to include empty fields in
12089	// Patch requests.
12090	ForceSendFields []string `json:"-"`
12091
12092	// NullFields is a list of field names (e.g.
12093	// "ExposureToConversionEnabled") to include in API requests with the
12094	// JSON null value. By default, fields with empty values are omitted
12095	// from API requests. However, any field with an empty value appearing
12096	// in NullFields will be sent to the server as null. It is an error if a
12097	// field in this list has a non-empty value. This may be used to include
12098	// null fields in Patch requests.
12099	NullFields []string `json:"-"`
12100}
12101
12102func (s *ReportsConfiguration) MarshalJSON() ([]byte, error) {
12103	type NoMethod ReportsConfiguration
12104	raw := NoMethod(*s)
12105	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12106}
12107
12108// RichMediaExitOverride: Rich Media Exit Override.
12109type RichMediaExitOverride struct {
12110	// ClickThroughUrl: Click-through URL of this rich media exit override.
12111	// Applicable if the enabled field is set to true.
12112	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
12113
12114	// Enabled: Whether to use the clickThroughUrl. If false, the
12115	// creative-level exit will be used.
12116	Enabled bool `json:"enabled,omitempty"`
12117
12118	// ExitId: ID for the override to refer to a specific exit in the
12119	// creative.
12120	ExitId int64 `json:"exitId,omitempty,string"`
12121
12122	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
12123	// unconditionally include in API requests. By default, fields with
12124	// empty values are omitted from API requests. However, any non-pointer,
12125	// non-interface field appearing in ForceSendFields will be sent to the
12126	// server regardless of whether the field is empty or not. This may be
12127	// used to include empty fields in Patch requests.
12128	ForceSendFields []string `json:"-"`
12129
12130	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
12131	// include in API requests with the JSON null value. By default, fields
12132	// with empty values are omitted from API requests. However, any field
12133	// with an empty value appearing in NullFields will be sent to the
12134	// server as null. It is an error if a field in this list has a
12135	// non-empty value. This may be used to include null fields in Patch
12136	// requests.
12137	NullFields []string `json:"-"`
12138}
12139
12140func (s *RichMediaExitOverride) MarshalJSON() ([]byte, error) {
12141	type NoMethod RichMediaExitOverride
12142	raw := NoMethod(*s)
12143	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12144}
12145
12146// Rule: A rule associates an asset with a targeting template for
12147// asset-level targeting. Applicable to INSTREAM_VIDEO creatives.
12148type Rule struct {
12149	// AssetId: A creativeAssets[].id. This should refer to one of the
12150	// parent assets in this creative. This is a required field.
12151	AssetId int64 `json:"assetId,omitempty,string"`
12152
12153	// Name: A user-friendly name for this rule. This is a required field.
12154	Name string `json:"name,omitempty"`
12155
12156	// TargetingTemplateId: A targeting template ID. The targeting from the
12157	// targeting template will be used to determine whether this asset
12158	// should be served. This is a required field.
12159	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
12160
12161	// ForceSendFields is a list of field names (e.g. "AssetId") to
12162	// unconditionally include in API requests. By default, fields with
12163	// empty values are omitted from API requests. However, any non-pointer,
12164	// non-interface field appearing in ForceSendFields will be sent to the
12165	// server regardless of whether the field is empty or not. This may be
12166	// used to include empty fields in Patch requests.
12167	ForceSendFields []string `json:"-"`
12168
12169	// NullFields is a list of field names (e.g. "AssetId") to include in
12170	// API requests with the JSON null value. By default, fields with empty
12171	// values are omitted from API requests. However, any field with an
12172	// empty value appearing in NullFields will be sent to the server as
12173	// null. It is an error if a field in this list has a non-empty value.
12174	// This may be used to include null fields in Patch requests.
12175	NullFields []string `json:"-"`
12176}
12177
12178func (s *Rule) MarshalJSON() ([]byte, error) {
12179	type NoMethod Rule
12180	raw := NoMethod(*s)
12181	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12182}
12183
12184// Site: Contains properties of a site.
12185type Site struct {
12186	// AccountId: Account ID of this site. This is a read-only field that
12187	// can be left blank.
12188	AccountId int64 `json:"accountId,omitempty,string"`
12189
12190	// Approved: Whether this site is approved.
12191	Approved bool `json:"approved,omitempty"`
12192
12193	// DirectorySiteId: Directory site associated with this site. This is a
12194	// required field that is read-only after insertion.
12195	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
12196
12197	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
12198	// directory site. This is a read-only, auto-generated field.
12199	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
12200
12201	// Id: ID of this site. This is a read-only, auto-generated field.
12202	Id int64 `json:"id,omitempty,string"`
12203
12204	// IdDimensionValue: Dimension value for the ID of this site. This is a
12205	// read-only, auto-generated field.
12206	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
12207
12208	// KeyName: Key name of this site. This is a read-only, auto-generated
12209	// field.
12210	KeyName string `json:"keyName,omitempty"`
12211
12212	// Kind: Identifies what kind of resource this is. Value: the fixed
12213	// string "dfareporting#site".
12214	Kind string `json:"kind,omitempty"`
12215
12216	// Name: Name of this site.This is a required field. Must be less than
12217	// 128 characters long. If this site is under a subaccount, the name
12218	// must be unique among sites of the same subaccount. Otherwise, this
12219	// site is a top-level site, and the name must be unique among top-level
12220	// sites of the same account.
12221	Name string `json:"name,omitempty"`
12222
12223	// SiteContacts: Site contacts.
12224	SiteContacts []*SiteContact `json:"siteContacts,omitempty"`
12225
12226	// SiteSettings: Site-wide settings.
12227	SiteSettings *SiteSettings `json:"siteSettings,omitempty"`
12228
12229	// SubaccountId: Subaccount ID of this site. This is a read-only field
12230	// that can be left blank.
12231	SubaccountId int64 `json:"subaccountId,omitempty,string"`
12232
12233	// ServerResponse contains the HTTP response code and headers from the
12234	// server.
12235	googleapi.ServerResponse `json:"-"`
12236
12237	// ForceSendFields is a list of field names (e.g. "AccountId") to
12238	// unconditionally include in API requests. By default, fields with
12239	// empty values are omitted from API requests. However, any non-pointer,
12240	// non-interface field appearing in ForceSendFields will be sent to the
12241	// server regardless of whether the field is empty or not. This may be
12242	// used to include empty fields in Patch requests.
12243	ForceSendFields []string `json:"-"`
12244
12245	// NullFields is a list of field names (e.g. "AccountId") to include in
12246	// API requests with the JSON null value. By default, fields with empty
12247	// values are omitted from API requests. However, any field with an
12248	// empty value appearing in NullFields will be sent to the server as
12249	// null. It is an error if a field in this list has a non-empty value.
12250	// This may be used to include null fields in Patch requests.
12251	NullFields []string `json:"-"`
12252}
12253
12254func (s *Site) MarshalJSON() ([]byte, error) {
12255	type NoMethod Site
12256	raw := NoMethod(*s)
12257	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12258}
12259
12260// SiteContact: Site Contact
12261type SiteContact struct {
12262	// Address: Address of this site contact.
12263	Address string `json:"address,omitempty"`
12264
12265	// ContactType: Site contact type.
12266	//
12267	// Possible values:
12268	//   "SALES_PERSON"
12269	//   "TRAFFICKER"
12270	ContactType string `json:"contactType,omitempty"`
12271
12272	// Email: Email address of this site contact. This is a required field.
12273	Email string `json:"email,omitempty"`
12274
12275	// FirstName: First name of this site contact.
12276	FirstName string `json:"firstName,omitempty"`
12277
12278	// Id: ID of this site contact. This is a read-only, auto-generated
12279	// field.
12280	Id int64 `json:"id,omitempty,string"`
12281
12282	// LastName: Last name of this site contact.
12283	LastName string `json:"lastName,omitempty"`
12284
12285	// Phone: Primary phone number of this site contact.
12286	Phone string `json:"phone,omitempty"`
12287
12288	// Title: Title or designation of this site contact.
12289	Title string `json:"title,omitempty"`
12290
12291	// ForceSendFields is a list of field names (e.g. "Address") to
12292	// unconditionally include in API requests. By default, fields with
12293	// empty values are omitted from API requests. However, any non-pointer,
12294	// non-interface field appearing in ForceSendFields will be sent to the
12295	// server regardless of whether the field is empty or not. This may be
12296	// used to include empty fields in Patch requests.
12297	ForceSendFields []string `json:"-"`
12298
12299	// NullFields is a list of field names (e.g. "Address") to include in
12300	// API requests with the JSON null value. By default, fields with empty
12301	// values are omitted from API requests. However, any field with an
12302	// empty value appearing in NullFields will be sent to the server as
12303	// null. It is an error if a field in this list has a non-empty value.
12304	// This may be used to include null fields in Patch requests.
12305	NullFields []string `json:"-"`
12306}
12307
12308func (s *SiteContact) MarshalJSON() ([]byte, error) {
12309	type NoMethod SiteContact
12310	raw := NoMethod(*s)
12311	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12312}
12313
12314// SiteSettings: Site Settings
12315type SiteSettings struct {
12316	// ActiveViewOptOut: Whether active view creatives are disabled for this
12317	// site.
12318	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
12319
12320	// AdBlockingOptOut: Whether this site opts out of ad blocking. When
12321	// true, ad blocking is disabled for all placements under the site,
12322	// regardless of the individual placement settings. When false, the
12323	// campaign and placement settings take effect.
12324	AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
12325
12326	// CreativeSettings: Site-wide creative settings.
12327	CreativeSettings *CreativeSettings `json:"creativeSettings,omitempty"`
12328
12329	// DisableNewCookie: Whether new cookies are disabled for this site.
12330	DisableNewCookie bool `json:"disableNewCookie,omitempty"`
12331
12332	// LookbackConfiguration: Lookback window settings for this site.
12333	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
12334
12335	// TagSetting: Configuration settings for dynamic and image floodlight
12336	// tags.
12337	TagSetting *TagSetting `json:"tagSetting,omitempty"`
12338
12339	// VideoActiveViewOptOutTemplate: Whether Verification and ActiveView
12340	// for in-stream video creatives are disabled by default for new
12341	// placements created under this site. This value will be used to
12342	// populate the placement.videoActiveViewOptOut field, when no value is
12343	// specified for the new placement.
12344	VideoActiveViewOptOutTemplate bool `json:"videoActiveViewOptOutTemplate,omitempty"`
12345
12346	// VpaidAdapterChoiceTemplate: Default VPAID adapter setting for new
12347	// placements created under this site. This value will be used to
12348	// populate the placements.vpaidAdapterChoice field, when no value is
12349	// specified for the new placement. Controls which VPAID format the
12350	// measurement adapter will use for in-stream video creatives assigned
12351	// to the placement. The publisher's specifications will typically
12352	// determine this setting. For VPAID creatives, the adapter format will
12353	// match the VPAID format (HTML5 VPAID creatives use the HTML5
12354	// adapter).
12355	//
12356	// Note: Flash is no longer supported. This field now defaults to HTML5
12357	// when the following values are provided: FLASH, BOTH.
12358	//
12359	// Possible values:
12360	//   "BOTH"
12361	//   "DEFAULT"
12362	//   "FLASH"
12363	//   "HTML5"
12364	VpaidAdapterChoiceTemplate string `json:"vpaidAdapterChoiceTemplate,omitempty"`
12365
12366	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
12367	// unconditionally include in API requests. By default, fields with
12368	// empty values are omitted from API requests. However, any non-pointer,
12369	// non-interface field appearing in ForceSendFields will be sent to the
12370	// server regardless of whether the field is empty or not. This may be
12371	// used to include empty fields in Patch requests.
12372	ForceSendFields []string `json:"-"`
12373
12374	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
12375	// include in API requests with the JSON null value. By default, fields
12376	// with empty values are omitted from API requests. However, any field
12377	// with an empty value appearing in NullFields will be sent to the
12378	// server as null. It is an error if a field in this list has a
12379	// non-empty value. This may be used to include null fields in Patch
12380	// requests.
12381	NullFields []string `json:"-"`
12382}
12383
12384func (s *SiteSettings) MarshalJSON() ([]byte, error) {
12385	type NoMethod SiteSettings
12386	raw := NoMethod(*s)
12387	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12388}
12389
12390// SitesListResponse: Site List Response
12391type SitesListResponse struct {
12392	// Kind: Identifies what kind of resource this is. Value: the fixed
12393	// string "dfareporting#sitesListResponse".
12394	Kind string `json:"kind,omitempty"`
12395
12396	// NextPageToken: Pagination token to be used for the next list
12397	// operation.
12398	NextPageToken string `json:"nextPageToken,omitempty"`
12399
12400	// Sites: Site collection.
12401	Sites []*Site `json:"sites,omitempty"`
12402
12403	// ServerResponse contains the HTTP response code and headers from the
12404	// server.
12405	googleapi.ServerResponse `json:"-"`
12406
12407	// ForceSendFields is a list of field names (e.g. "Kind") to
12408	// unconditionally include in API requests. By default, fields with
12409	// empty values are omitted from API requests. However, any non-pointer,
12410	// non-interface field appearing in ForceSendFields will be sent to the
12411	// server regardless of whether the field is empty or not. This may be
12412	// used to include empty fields in Patch requests.
12413	ForceSendFields []string `json:"-"`
12414
12415	// NullFields is a list of field names (e.g. "Kind") to include in API
12416	// requests with the JSON null value. By default, fields with empty
12417	// values are omitted from API requests. However, any field with an
12418	// empty value appearing in NullFields will be sent to the server as
12419	// null. It is an error if a field in this list has a non-empty value.
12420	// This may be used to include null fields in Patch requests.
12421	NullFields []string `json:"-"`
12422}
12423
12424func (s *SitesListResponse) MarshalJSON() ([]byte, error) {
12425	type NoMethod SitesListResponse
12426	raw := NoMethod(*s)
12427	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12428}
12429
12430// Size: Represents the dimensions of ads, placements, creatives, or
12431// creative assets.
12432type Size struct {
12433	// Height: Height of this size. Acceptable values are 0 to 32767,
12434	// inclusive.
12435	Height int64 `json:"height,omitempty"`
12436
12437	// Iab: IAB standard size. This is a read-only, auto-generated field.
12438	Iab bool `json:"iab,omitempty"`
12439
12440	// Id: ID of this size. This is a read-only, auto-generated field.
12441	Id int64 `json:"id,omitempty,string"`
12442
12443	// Kind: Identifies what kind of resource this is. Value: the fixed
12444	// string "dfareporting#size".
12445	Kind string `json:"kind,omitempty"`
12446
12447	// Width: Width of this size. Acceptable values are 0 to 32767,
12448	// inclusive.
12449	Width int64 `json:"width,omitempty"`
12450
12451	// ServerResponse contains the HTTP response code and headers from the
12452	// server.
12453	googleapi.ServerResponse `json:"-"`
12454
12455	// ForceSendFields is a list of field names (e.g. "Height") to
12456	// unconditionally include in API requests. By default, fields with
12457	// empty values are omitted from API requests. However, any non-pointer,
12458	// non-interface field appearing in ForceSendFields will be sent to the
12459	// server regardless of whether the field is empty or not. This may be
12460	// used to include empty fields in Patch requests.
12461	ForceSendFields []string `json:"-"`
12462
12463	// NullFields is a list of field names (e.g. "Height") to include in API
12464	// requests with the JSON null value. By default, fields with empty
12465	// values are omitted from API requests. However, any field with an
12466	// empty value appearing in NullFields will be sent to the server as
12467	// null. It is an error if a field in this list has a non-empty value.
12468	// This may be used to include null fields in Patch requests.
12469	NullFields []string `json:"-"`
12470}
12471
12472func (s *Size) MarshalJSON() ([]byte, error) {
12473	type NoMethod Size
12474	raw := NoMethod(*s)
12475	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12476}
12477
12478// SizesListResponse: Size List Response
12479type SizesListResponse struct {
12480	// Kind: Identifies what kind of resource this is. Value: the fixed
12481	// string "dfareporting#sizesListResponse".
12482	Kind string `json:"kind,omitempty"`
12483
12484	// Sizes: Size collection.
12485	Sizes []*Size `json:"sizes,omitempty"`
12486
12487	// ServerResponse contains the HTTP response code and headers from the
12488	// server.
12489	googleapi.ServerResponse `json:"-"`
12490
12491	// ForceSendFields is a list of field names (e.g. "Kind") to
12492	// unconditionally include in API requests. By default, fields with
12493	// empty values are omitted from API requests. However, any non-pointer,
12494	// non-interface field appearing in ForceSendFields will be sent to the
12495	// server regardless of whether the field is empty or not. This may be
12496	// used to include empty fields in Patch requests.
12497	ForceSendFields []string `json:"-"`
12498
12499	// NullFields is a list of field names (e.g. "Kind") to include in API
12500	// requests with the JSON null value. By default, fields with empty
12501	// values are omitted from API requests. However, any field with an
12502	// empty value appearing in NullFields will be sent to the server as
12503	// null. It is an error if a field in this list has a non-empty value.
12504	// This may be used to include null fields in Patch requests.
12505	NullFields []string `json:"-"`
12506}
12507
12508func (s *SizesListResponse) MarshalJSON() ([]byte, error) {
12509	type NoMethod SizesListResponse
12510	raw := NoMethod(*s)
12511	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12512}
12513
12514// SkippableSetting: Skippable Settings
12515type SkippableSetting struct {
12516	// Kind: Identifies what kind of resource this is. Value: the fixed
12517	// string "dfareporting#skippableSetting".
12518	Kind string `json:"kind,omitempty"`
12519
12520	// ProgressOffset: Amount of time to play videos served to this
12521	// placement before counting a view. Applicable when skippable is true.
12522	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
12523
12524	// SkipOffset: Amount of time to play videos served to this placement
12525	// before the skip button should appear. Applicable when skippable is
12526	// true.
12527	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
12528
12529	// Skippable: Whether the user can skip creatives served to this
12530	// placement.
12531	Skippable bool `json:"skippable,omitempty"`
12532
12533	// ForceSendFields is a list of field names (e.g. "Kind") to
12534	// unconditionally include in API requests. By default, fields with
12535	// empty values are omitted from API requests. However, any non-pointer,
12536	// non-interface field appearing in ForceSendFields will be sent to the
12537	// server regardless of whether the field is empty or not. This may be
12538	// used to include empty fields in Patch requests.
12539	ForceSendFields []string `json:"-"`
12540
12541	// NullFields is a list of field names (e.g. "Kind") to include in API
12542	// requests with the JSON null value. By default, fields with empty
12543	// values are omitted from API requests. However, any field with an
12544	// empty value appearing in NullFields will be sent to the server as
12545	// null. It is an error if a field in this list has a non-empty value.
12546	// This may be used to include null fields in Patch requests.
12547	NullFields []string `json:"-"`
12548}
12549
12550func (s *SkippableSetting) MarshalJSON() ([]byte, error) {
12551	type NoMethod SkippableSetting
12552	raw := NoMethod(*s)
12553	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12554}
12555
12556// SortedDimension: Represents a sorted dimension.
12557type SortedDimension struct {
12558	// Kind: The kind of resource this is, in this case
12559	// dfareporting#sortedDimension.
12560	Kind string `json:"kind,omitempty"`
12561
12562	// Name: The name of the dimension.
12563	Name string `json:"name,omitempty"`
12564
12565	// SortOrder: An optional sort order for the dimension column.
12566	//
12567	// Possible values:
12568	//   "ASCENDING"
12569	//   "DESCENDING"
12570	SortOrder string `json:"sortOrder,omitempty"`
12571
12572	// ForceSendFields is a list of field names (e.g. "Kind") to
12573	// unconditionally include in API requests. By default, fields with
12574	// empty values are omitted from API requests. However, any non-pointer,
12575	// non-interface field appearing in ForceSendFields will be sent to the
12576	// server regardless of whether the field is empty or not. This may be
12577	// used to include empty fields in Patch requests.
12578	ForceSendFields []string `json:"-"`
12579
12580	// NullFields is a list of field names (e.g. "Kind") to include in API
12581	// requests with the JSON null value. By default, fields with empty
12582	// values are omitted from API requests. However, any field with an
12583	// empty value appearing in NullFields will be sent to the server as
12584	// null. It is an error if a field in this list has a non-empty value.
12585	// This may be used to include null fields in Patch requests.
12586	NullFields []string `json:"-"`
12587}
12588
12589func (s *SortedDimension) MarshalJSON() ([]byte, error) {
12590	type NoMethod SortedDimension
12591	raw := NoMethod(*s)
12592	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12593}
12594
12595// Subaccount: Contains properties of a Campaign Manager subaccount.
12596type Subaccount struct {
12597	// AccountId: ID of the account that contains this subaccount. This is a
12598	// read-only field that can be left blank.
12599	AccountId int64 `json:"accountId,omitempty,string"`
12600
12601	// AvailablePermissionIds: IDs of the available user role permissions
12602	// for this subaccount.
12603	AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
12604
12605	// Id: ID of this subaccount. This is a read-only, auto-generated field.
12606	Id int64 `json:"id,omitempty,string"`
12607
12608	// Kind: Identifies what kind of resource this is. Value: the fixed
12609	// string "dfareporting#subaccount".
12610	Kind string `json:"kind,omitempty"`
12611
12612	// Name: Name of this subaccount. This is a required field. Must be less
12613	// than 128 characters long and be unique among subaccounts of the same
12614	// account.
12615	Name string `json:"name,omitempty"`
12616
12617	// ServerResponse contains the HTTP response code and headers from the
12618	// server.
12619	googleapi.ServerResponse `json:"-"`
12620
12621	// ForceSendFields is a list of field names (e.g. "AccountId") to
12622	// unconditionally include in API requests. By default, fields with
12623	// empty values are omitted from API requests. However, any non-pointer,
12624	// non-interface field appearing in ForceSendFields will be sent to the
12625	// server regardless of whether the field is empty or not. This may be
12626	// used to include empty fields in Patch requests.
12627	ForceSendFields []string `json:"-"`
12628
12629	// NullFields is a list of field names (e.g. "AccountId") to include in
12630	// API requests with the JSON null value. By default, fields with empty
12631	// values are omitted from API requests. However, any field with an
12632	// empty value appearing in NullFields will be sent to the server as
12633	// null. It is an error if a field in this list has a non-empty value.
12634	// This may be used to include null fields in Patch requests.
12635	NullFields []string `json:"-"`
12636}
12637
12638func (s *Subaccount) MarshalJSON() ([]byte, error) {
12639	type NoMethod Subaccount
12640	raw := NoMethod(*s)
12641	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12642}
12643
12644// SubaccountsListResponse: Subaccount List Response
12645type SubaccountsListResponse struct {
12646	// Kind: Identifies what kind of resource this is. Value: the fixed
12647	// string "dfareporting#subaccountsListResponse".
12648	Kind string `json:"kind,omitempty"`
12649
12650	// NextPageToken: Pagination token to be used for the next list
12651	// operation.
12652	NextPageToken string `json:"nextPageToken,omitempty"`
12653
12654	// Subaccounts: Subaccount collection.
12655	Subaccounts []*Subaccount `json:"subaccounts,omitempty"`
12656
12657	// ServerResponse contains the HTTP response code and headers from the
12658	// server.
12659	googleapi.ServerResponse `json:"-"`
12660
12661	// ForceSendFields is a list of field names (e.g. "Kind") to
12662	// unconditionally include in API requests. By default, fields with
12663	// empty values are omitted from API requests. However, any non-pointer,
12664	// non-interface field appearing in ForceSendFields will be sent to the
12665	// server regardless of whether the field is empty or not. This may be
12666	// used to include empty fields in Patch requests.
12667	ForceSendFields []string `json:"-"`
12668
12669	// NullFields is a list of field names (e.g. "Kind") to include in API
12670	// requests with the JSON null value. By default, fields with empty
12671	// values are omitted from API requests. However, any field with an
12672	// empty value appearing in NullFields will be sent to the server as
12673	// null. It is an error if a field in this list has a non-empty value.
12674	// This may be used to include null fields in Patch requests.
12675	NullFields []string `json:"-"`
12676}
12677
12678func (s *SubaccountsListResponse) MarshalJSON() ([]byte, error) {
12679	type NoMethod SubaccountsListResponse
12680	raw := NoMethod(*s)
12681	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12682}
12683
12684// TagData: Placement Tag Data
12685type TagData struct {
12686	// AdId: Ad associated with this placement tag. Applicable only when
12687	// format is PLACEMENT_TAG_TRACKING.
12688	AdId int64 `json:"adId,omitempty,string"`
12689
12690	// ClickTag: Tag string to record a click.
12691	ClickTag string `json:"clickTag,omitempty"`
12692
12693	// CreativeId: Creative associated with this placement tag. Applicable
12694	// only when format is PLACEMENT_TAG_TRACKING.
12695	CreativeId int64 `json:"creativeId,omitempty,string"`
12696
12697	// Format: TagData tag format of this tag.
12698	//
12699	// Possible values:
12700	//   "PLACEMENT_TAG_CLICK_COMMANDS"
12701	//   "PLACEMENT_TAG_IFRAME_ILAYER"
12702	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
12703	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
12704	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
12705	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
12706	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
12707	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
12708	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
12709	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
12710	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
12711	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
12712	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
12713	//   "PLACEMENT_TAG_JAVASCRIPT"
12714	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
12715	//   "PLACEMENT_TAG_STANDARD"
12716	//   "PLACEMENT_TAG_TRACKING"
12717	//   "PLACEMENT_TAG_TRACKING_IFRAME"
12718	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
12719	Format string `json:"format,omitempty"`
12720
12721	// ImpressionTag: Tag string for serving an ad.
12722	ImpressionTag string `json:"impressionTag,omitempty"`
12723
12724	// ForceSendFields is a list of field names (e.g. "AdId") to
12725	// unconditionally include in API requests. By default, fields with
12726	// empty values are omitted from API requests. However, any non-pointer,
12727	// non-interface field appearing in ForceSendFields will be sent to the
12728	// server regardless of whether the field is empty or not. This may be
12729	// used to include empty fields in Patch requests.
12730	ForceSendFields []string `json:"-"`
12731
12732	// NullFields is a list of field names (e.g. "AdId") to include in API
12733	// requests with the JSON null value. By default, fields with empty
12734	// values are omitted from API requests. However, any field with an
12735	// empty value appearing in NullFields will be sent to the server as
12736	// null. It is an error if a field in this list has a non-empty value.
12737	// This may be used to include null fields in Patch requests.
12738	NullFields []string `json:"-"`
12739}
12740
12741func (s *TagData) MarshalJSON() ([]byte, error) {
12742	type NoMethod TagData
12743	raw := NoMethod(*s)
12744	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12745}
12746
12747// TagSetting: Tag Settings
12748type TagSetting struct {
12749	// AdditionalKeyValues: Additional key-values to be included in tags.
12750	// Each key-value pair must be of the form key=value, and pairs must be
12751	// separated by a semicolon (;). Keys and values must not contain
12752	// commas. For example, id=2;color=red is a valid value for this field.
12753	AdditionalKeyValues string `json:"additionalKeyValues,omitempty"`
12754
12755	// IncludeClickThroughUrls: Whether static landing page URLs should be
12756	// included in the tags. This setting applies only to placements.
12757	IncludeClickThroughUrls bool `json:"includeClickThroughUrls,omitempty"`
12758
12759	// IncludeClickTracking: Whether click-tracking string should be
12760	// included in the tags.
12761	IncludeClickTracking bool `json:"includeClickTracking,omitempty"`
12762
12763	// KeywordOption: Option specifying how keywords are embedded in ad
12764	// tags. This setting can be used to specify whether keyword
12765	// placeholders are inserted in placement tags for this site. Publishers
12766	// can then add keywords to those placeholders.
12767	//
12768	// Possible values:
12769	//   "GENERATE_SEPARATE_TAG_FOR_EACH_KEYWORD"
12770	//   "IGNORE"
12771	//   "PLACEHOLDER_WITH_LIST_OF_KEYWORDS"
12772	KeywordOption string `json:"keywordOption,omitempty"`
12773
12774	// ForceSendFields is a list of field names (e.g. "AdditionalKeyValues")
12775	// to unconditionally include in API requests. By default, fields with
12776	// empty values are omitted from API requests. However, any non-pointer,
12777	// non-interface field appearing in ForceSendFields will be sent to the
12778	// server regardless of whether the field is empty or not. This may be
12779	// used to include empty fields in Patch requests.
12780	ForceSendFields []string `json:"-"`
12781
12782	// NullFields is a list of field names (e.g. "AdditionalKeyValues") to
12783	// include in API requests with the JSON null value. By default, fields
12784	// with empty values are omitted from API requests. However, any field
12785	// with an empty value appearing in NullFields will be sent to the
12786	// server as null. It is an error if a field in this list has a
12787	// non-empty value. This may be used to include null fields in Patch
12788	// requests.
12789	NullFields []string `json:"-"`
12790}
12791
12792func (s *TagSetting) MarshalJSON() ([]byte, error) {
12793	type NoMethod TagSetting
12794	raw := NoMethod(*s)
12795	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12796}
12797
12798// TagSettings: Dynamic and Image Tag Settings.
12799type TagSettings struct {
12800	// DynamicTagEnabled: Whether dynamic floodlight tags are enabled.
12801	DynamicTagEnabled bool `json:"dynamicTagEnabled,omitempty"`
12802
12803	// ImageTagEnabled: Whether image tags are enabled.
12804	ImageTagEnabled bool `json:"imageTagEnabled,omitempty"`
12805
12806	// ForceSendFields is a list of field names (e.g. "DynamicTagEnabled")
12807	// to unconditionally include in API requests. By default, fields with
12808	// empty values are omitted from API requests. However, any non-pointer,
12809	// non-interface field appearing in ForceSendFields will be sent to the
12810	// server regardless of whether the field is empty or not. This may be
12811	// used to include empty fields in Patch requests.
12812	ForceSendFields []string `json:"-"`
12813
12814	// NullFields is a list of field names (e.g. "DynamicTagEnabled") to
12815	// include in API requests with the JSON null value. By default, fields
12816	// with empty values are omitted from API requests. However, any field
12817	// with an empty value appearing in NullFields will be sent to the
12818	// server as null. It is an error if a field in this list has a
12819	// non-empty value. This may be used to include null fields in Patch
12820	// requests.
12821	NullFields []string `json:"-"`
12822}
12823
12824func (s *TagSettings) MarshalJSON() ([]byte, error) {
12825	type NoMethod TagSettings
12826	raw := NoMethod(*s)
12827	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12828}
12829
12830// TargetWindow: Target Window.
12831type TargetWindow struct {
12832	// CustomHtml: User-entered value.
12833	CustomHtml string `json:"customHtml,omitempty"`
12834
12835	// TargetWindowOption: Type of browser window for which the backup image
12836	// of the flash creative can be displayed.
12837	//
12838	// Possible values:
12839	//   "CURRENT_WINDOW"
12840	//   "CUSTOM"
12841	//   "NEW_WINDOW"
12842	TargetWindowOption string `json:"targetWindowOption,omitempty"`
12843
12844	// ForceSendFields is a list of field names (e.g. "CustomHtml") to
12845	// unconditionally include in API requests. By default, fields with
12846	// empty values are omitted from API requests. However, any non-pointer,
12847	// non-interface field appearing in ForceSendFields will be sent to the
12848	// server regardless of whether the field is empty or not. This may be
12849	// used to include empty fields in Patch requests.
12850	ForceSendFields []string `json:"-"`
12851
12852	// NullFields is a list of field names (e.g. "CustomHtml") to include in
12853	// API requests with the JSON null value. By default, fields with empty
12854	// values are omitted from API requests. However, any field with an
12855	// empty value appearing in NullFields will be sent to the server as
12856	// null. It is an error if a field in this list has a non-empty value.
12857	// This may be used to include null fields in Patch requests.
12858	NullFields []string `json:"-"`
12859}
12860
12861func (s *TargetWindow) MarshalJSON() ([]byte, error) {
12862	type NoMethod TargetWindow
12863	raw := NoMethod(*s)
12864	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12865}
12866
12867// TargetableRemarketingList: Contains properties of a targetable
12868// remarketing list. Remarketing enables you to create lists of users
12869// who have performed specific actions on a site, then target ads to
12870// members of those lists. This resource is a read-only view of a
12871// remarketing list to be used to faciliate targeting ads to specific
12872// lists. Remarketing lists that are owned by your advertisers and those
12873// that are shared to your advertisers or account are accessible via
12874// this resource. To manage remarketing lists that are owned by your
12875// advertisers, use the RemarketingLists resource.
12876type TargetableRemarketingList struct {
12877	// AccountId: Account ID of this remarketing list. This is a read-only,
12878	// auto-generated field that is only returned in GET requests.
12879	AccountId int64 `json:"accountId,omitempty,string"`
12880
12881	// Active: Whether this targetable remarketing list is active.
12882	Active bool `json:"active,omitempty"`
12883
12884	// AdvertiserId: Dimension value for the advertiser ID that owns this
12885	// targetable remarketing list.
12886	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
12887
12888	// AdvertiserIdDimensionValue: Dimension value for the ID of the
12889	// advertiser.
12890	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
12891
12892	// Description: Targetable remarketing list description.
12893	Description string `json:"description,omitempty"`
12894
12895	// Id: Targetable remarketing list ID.
12896	Id int64 `json:"id,omitempty,string"`
12897
12898	// Kind: Identifies what kind of resource this is. Value: the fixed
12899	// string "dfareporting#targetableRemarketingList".
12900	Kind string `json:"kind,omitempty"`
12901
12902	// LifeSpan: Number of days that a user should remain in the targetable
12903	// remarketing list without an impression.
12904	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
12905
12906	// ListSize: Number of users currently in the list. This is a read-only
12907	// field.
12908	ListSize int64 `json:"listSize,omitempty,string"`
12909
12910	// ListSource: Product from which this targetable remarketing list was
12911	// originated.
12912	//
12913	// Possible values:
12914	//   "REMARKETING_LIST_SOURCE_ADX"
12915	//   "REMARKETING_LIST_SOURCE_DBM"
12916	//   "REMARKETING_LIST_SOURCE_DFA"
12917	//   "REMARKETING_LIST_SOURCE_DFP"
12918	//   "REMARKETING_LIST_SOURCE_DMP"
12919	//   "REMARKETING_LIST_SOURCE_GA"
12920	//   "REMARKETING_LIST_SOURCE_GPLUS"
12921	//   "REMARKETING_LIST_SOURCE_OTHER"
12922	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
12923	//   "REMARKETING_LIST_SOURCE_XFP"
12924	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
12925	ListSource string `json:"listSource,omitempty"`
12926
12927	// Name: Name of the targetable remarketing list. Is no greater than 128
12928	// characters long.
12929	Name string `json:"name,omitempty"`
12930
12931	// SubaccountId: Subaccount ID of this remarketing list. This is a
12932	// read-only, auto-generated field that is only returned in GET
12933	// requests.
12934	SubaccountId int64 `json:"subaccountId,omitempty,string"`
12935
12936	// ServerResponse contains the HTTP response code and headers from the
12937	// server.
12938	googleapi.ServerResponse `json:"-"`
12939
12940	// ForceSendFields is a list of field names (e.g. "AccountId") to
12941	// unconditionally include in API requests. By default, fields with
12942	// empty values are omitted from API requests. However, any non-pointer,
12943	// non-interface field appearing in ForceSendFields will be sent to the
12944	// server regardless of whether the field is empty or not. This may be
12945	// used to include empty fields in Patch requests.
12946	ForceSendFields []string `json:"-"`
12947
12948	// NullFields is a list of field names (e.g. "AccountId") to include in
12949	// API requests with the JSON null value. By default, fields with empty
12950	// values are omitted from API requests. However, any field with an
12951	// empty value appearing in NullFields will be sent to the server as
12952	// null. It is an error if a field in this list has a non-empty value.
12953	// This may be used to include null fields in Patch requests.
12954	NullFields []string `json:"-"`
12955}
12956
12957func (s *TargetableRemarketingList) MarshalJSON() ([]byte, error) {
12958	type NoMethod TargetableRemarketingList
12959	raw := NoMethod(*s)
12960	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12961}
12962
12963// TargetableRemarketingListsListResponse: Targetable remarketing list
12964// response
12965type TargetableRemarketingListsListResponse struct {
12966	// Kind: Identifies what kind of resource this is. Value: the fixed
12967	// string "dfareporting#targetableRemarketingListsListResponse".
12968	Kind string `json:"kind,omitempty"`
12969
12970	// NextPageToken: Pagination token to be used for the next list
12971	// operation.
12972	NextPageToken string `json:"nextPageToken,omitempty"`
12973
12974	// TargetableRemarketingLists: Targetable remarketing list collection.
12975	TargetableRemarketingLists []*TargetableRemarketingList `json:"targetableRemarketingLists,omitempty"`
12976
12977	// ServerResponse contains the HTTP response code and headers from the
12978	// server.
12979	googleapi.ServerResponse `json:"-"`
12980
12981	// ForceSendFields is a list of field names (e.g. "Kind") to
12982	// unconditionally include in API requests. By default, fields with
12983	// empty values are omitted from API requests. However, any non-pointer,
12984	// non-interface field appearing in ForceSendFields will be sent to the
12985	// server regardless of whether the field is empty or not. This may be
12986	// used to include empty fields in Patch requests.
12987	ForceSendFields []string `json:"-"`
12988
12989	// NullFields is a list of field names (e.g. "Kind") to include in API
12990	// requests with the JSON null value. By default, fields with empty
12991	// values are omitted from API requests. However, any field with an
12992	// empty value appearing in NullFields will be sent to the server as
12993	// null. It is an error if a field in this list has a non-empty value.
12994	// This may be used to include null fields in Patch requests.
12995	NullFields []string `json:"-"`
12996}
12997
12998func (s *TargetableRemarketingListsListResponse) MarshalJSON() ([]byte, error) {
12999	type NoMethod TargetableRemarketingListsListResponse
13000	raw := NoMethod(*s)
13001	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13002}
13003
13004// TargetingTemplate: Contains properties of a targeting template. A
13005// targeting template encapsulates targeting information which can be
13006// reused across multiple ads.
13007type TargetingTemplate struct {
13008	// AccountId: Account ID of this targeting template. This field, if left
13009	// unset, will be auto-generated on insert and is read-only after
13010	// insert.
13011	AccountId int64 `json:"accountId,omitempty,string"`
13012
13013	// AdvertiserId: Advertiser ID of this targeting template. This is a
13014	// required field on insert and is read-only after insert.
13015	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13016
13017	// AdvertiserIdDimensionValue: Dimension value for the ID of the
13018	// advertiser. This is a read-only, auto-generated field.
13019	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
13020
13021	// DayPartTargeting: Time and day targeting criteria.
13022	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
13023
13024	// GeoTargeting: Geographical targeting criteria.
13025	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
13026
13027	// Id: ID of this targeting template. This is a read-only,
13028	// auto-generated field.
13029	Id int64 `json:"id,omitempty,string"`
13030
13031	// KeyValueTargetingExpression: Key-value targeting criteria.
13032	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
13033
13034	// Kind: Identifies what kind of resource this is. Value: the fixed
13035	// string "dfareporting#targetingTemplate".
13036	Kind string `json:"kind,omitempty"`
13037
13038	// LanguageTargeting: Language targeting criteria.
13039	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
13040
13041	// ListTargetingExpression: Remarketing list targeting criteria.
13042	ListTargetingExpression *ListTargetingExpression `json:"listTargetingExpression,omitempty"`
13043
13044	// Name: Name of this targeting template. This field is required. It
13045	// must be less than 256 characters long and unique within an
13046	// advertiser.
13047	Name string `json:"name,omitempty"`
13048
13049	// SubaccountId: Subaccount ID of this targeting template. This field,
13050	// if left unset, will be auto-generated on insert and is read-only
13051	// after insert.
13052	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13053
13054	// TechnologyTargeting: Technology platform targeting criteria.
13055	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
13056
13057	// ServerResponse contains the HTTP response code and headers from the
13058	// server.
13059	googleapi.ServerResponse `json:"-"`
13060
13061	// ForceSendFields is a list of field names (e.g. "AccountId") to
13062	// unconditionally include in API requests. By default, fields with
13063	// empty values are omitted from API requests. However, any non-pointer,
13064	// non-interface field appearing in ForceSendFields will be sent to the
13065	// server regardless of whether the field is empty or not. This may be
13066	// used to include empty fields in Patch requests.
13067	ForceSendFields []string `json:"-"`
13068
13069	// NullFields is a list of field names (e.g. "AccountId") to include in
13070	// API requests with the JSON null value. By default, fields with empty
13071	// values are omitted from API requests. However, any field with an
13072	// empty value appearing in NullFields will be sent to the server as
13073	// null. It is an error if a field in this list has a non-empty value.
13074	// This may be used to include null fields in Patch requests.
13075	NullFields []string `json:"-"`
13076}
13077
13078func (s *TargetingTemplate) MarshalJSON() ([]byte, error) {
13079	type NoMethod TargetingTemplate
13080	raw := NoMethod(*s)
13081	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13082}
13083
13084// TargetingTemplatesListResponse: Targeting Template List Response
13085type TargetingTemplatesListResponse struct {
13086	// Kind: Identifies what kind of resource this is. Value: the fixed
13087	// string "dfareporting#targetingTemplatesListResponse".
13088	Kind string `json:"kind,omitempty"`
13089
13090	// NextPageToken: Pagination token to be used for the next list
13091	// operation.
13092	NextPageToken string `json:"nextPageToken,omitempty"`
13093
13094	// TargetingTemplates: Targeting template collection.
13095	TargetingTemplates []*TargetingTemplate `json:"targetingTemplates,omitempty"`
13096
13097	// ServerResponse contains the HTTP response code and headers from the
13098	// server.
13099	googleapi.ServerResponse `json:"-"`
13100
13101	// ForceSendFields is a list of field names (e.g. "Kind") to
13102	// unconditionally include in API requests. By default, fields with
13103	// empty values are omitted from API requests. However, any non-pointer,
13104	// non-interface field appearing in ForceSendFields will be sent to the
13105	// server regardless of whether the field is empty or not. This may be
13106	// used to include empty fields in Patch requests.
13107	ForceSendFields []string `json:"-"`
13108
13109	// NullFields is a list of field names (e.g. "Kind") to include in API
13110	// requests with the JSON null value. By default, fields with empty
13111	// values are omitted from API requests. However, any field with an
13112	// empty value appearing in NullFields will be sent to the server as
13113	// null. It is an error if a field in this list has a non-empty value.
13114	// This may be used to include null fields in Patch requests.
13115	NullFields []string `json:"-"`
13116}
13117
13118func (s *TargetingTemplatesListResponse) MarshalJSON() ([]byte, error) {
13119	type NoMethod TargetingTemplatesListResponse
13120	raw := NoMethod(*s)
13121	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13122}
13123
13124// TechnologyTargeting: Technology Targeting.
13125type TechnologyTargeting struct {
13126	// Browsers: Browsers that this ad targets. For each browser either set
13127	// browserVersionId or dartId along with the version numbers. If both
13128	// are specified, only browserVersionId will be used. The other fields
13129	// are populated automatically when the ad is inserted or updated.
13130	Browsers []*Browser `json:"browsers,omitempty"`
13131
13132	// ConnectionTypes: Connection types that this ad targets. For each
13133	// connection type only id is required. The other fields are populated
13134	// automatically when the ad is inserted or updated.
13135	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
13136
13137	// MobileCarriers: Mobile carriers that this ad targets. For each mobile
13138	// carrier only id is required, and the other fields are populated
13139	// automatically when the ad is inserted or updated. If targeting a
13140	// mobile carrier, do not set targeting for any zip codes.
13141	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
13142
13143	// OperatingSystemVersions: Operating system versions that this ad
13144	// targets. To target all versions, use operatingSystems. For each
13145	// operating system version, only id is required. The other fields are
13146	// populated automatically when the ad is inserted or updated. If
13147	// targeting an operating system version, do not set targeting for the
13148	// corresponding operating system in operatingSystems.
13149	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
13150
13151	// OperatingSystems: Operating systems that this ad targets. To target
13152	// specific versions, use operatingSystemVersions. For each operating
13153	// system only dartId is required. The other fields are populated
13154	// automatically when the ad is inserted or updated. If targeting an
13155	// operating system, do not set targeting for operating system versions
13156	// for the same operating system.
13157	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
13158
13159	// PlatformTypes: Platform types that this ad targets. For example,
13160	// desktop, mobile, or tablet. For each platform type, only id is
13161	// required, and the other fields are populated automatically when the
13162	// ad is inserted or updated.
13163	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
13164
13165	// ForceSendFields is a list of field names (e.g. "Browsers") to
13166	// unconditionally include in API requests. By default, fields with
13167	// empty values are omitted from API requests. However, any non-pointer,
13168	// non-interface field appearing in ForceSendFields will be sent to the
13169	// server regardless of whether the field is empty or not. This may be
13170	// used to include empty fields in Patch requests.
13171	ForceSendFields []string `json:"-"`
13172
13173	// NullFields is a list of field names (e.g. "Browsers") to include in
13174	// API requests with the JSON null value. By default, fields with empty
13175	// values are omitted from API requests. However, any field with an
13176	// empty value appearing in NullFields will be sent to the server as
13177	// null. It is an error if a field in this list has a non-empty value.
13178	// This may be used to include null fields in Patch requests.
13179	NullFields []string `json:"-"`
13180}
13181
13182func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) {
13183	type NoMethod TechnologyTargeting
13184	raw := NoMethod(*s)
13185	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13186}
13187
13188// ThirdPartyAuthenticationToken: Third Party Authentication Token
13189type ThirdPartyAuthenticationToken struct {
13190	// Name: Name of the third-party authentication token.
13191	Name string `json:"name,omitempty"`
13192
13193	// Value: Value of the third-party authentication token. This is a
13194	// read-only, auto-generated field.
13195	Value string `json:"value,omitempty"`
13196
13197	// ForceSendFields is a list of field names (e.g. "Name") to
13198	// unconditionally include in API requests. By default, fields with
13199	// empty values are omitted from API requests. However, any non-pointer,
13200	// non-interface field appearing in ForceSendFields will be sent to the
13201	// server regardless of whether the field is empty or not. This may be
13202	// used to include empty fields in Patch requests.
13203	ForceSendFields []string `json:"-"`
13204
13205	// NullFields is a list of field names (e.g. "Name") to include in API
13206	// requests with the JSON null value. By default, fields with empty
13207	// values are omitted from API requests. However, any field with an
13208	// empty value appearing in NullFields will be sent to the server as
13209	// null. It is an error if a field in this list has a non-empty value.
13210	// This may be used to include null fields in Patch requests.
13211	NullFields []string `json:"-"`
13212}
13213
13214func (s *ThirdPartyAuthenticationToken) MarshalJSON() ([]byte, error) {
13215	type NoMethod ThirdPartyAuthenticationToken
13216	raw := NoMethod(*s)
13217	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13218}
13219
13220// ThirdPartyTrackingUrl: Third-party Tracking URL.
13221type ThirdPartyTrackingUrl struct {
13222	// ThirdPartyUrlType: Third-party URL type for in-stream video
13223	// creatives.
13224	//
13225	// Possible values:
13226	//   "CLICK_TRACKING"
13227	//   "IMPRESSION"
13228	//   "RICH_MEDIA_BACKUP_IMPRESSION"
13229	//   "RICH_MEDIA_IMPRESSION"
13230	//   "RICH_MEDIA_RM_IMPRESSION"
13231	//   "SURVEY"
13232	//   "VIDEO_COMPLETE"
13233	//   "VIDEO_CUSTOM"
13234	//   "VIDEO_FIRST_QUARTILE"
13235	//   "VIDEO_FULLSCREEN"
13236	//   "VIDEO_MIDPOINT"
13237	//   "VIDEO_MUTE"
13238	//   "VIDEO_PAUSE"
13239	//   "VIDEO_PROGRESS"
13240	//   "VIDEO_REWIND"
13241	//   "VIDEO_SKIP"
13242	//   "VIDEO_START"
13243	//   "VIDEO_STOP"
13244	//   "VIDEO_THIRD_QUARTILE"
13245	ThirdPartyUrlType string `json:"thirdPartyUrlType,omitempty"`
13246
13247	// Url: URL for the specified third-party URL type.
13248	Url string `json:"url,omitempty"`
13249
13250	// ForceSendFields is a list of field names (e.g. "ThirdPartyUrlType")
13251	// to unconditionally include in API requests. By default, fields with
13252	// empty values are omitted from API requests. However, any non-pointer,
13253	// non-interface field appearing in ForceSendFields will be sent to the
13254	// server regardless of whether the field is empty or not. This may be
13255	// used to include empty fields in Patch requests.
13256	ForceSendFields []string `json:"-"`
13257
13258	// NullFields is a list of field names (e.g. "ThirdPartyUrlType") to
13259	// include in API requests with the JSON null value. By default, fields
13260	// with empty values are omitted from API requests. However, any field
13261	// with an empty value appearing in NullFields will be sent to the
13262	// server as null. It is an error if a field in this list has a
13263	// non-empty value. This may be used to include null fields in Patch
13264	// requests.
13265	NullFields []string `json:"-"`
13266}
13267
13268func (s *ThirdPartyTrackingUrl) MarshalJSON() ([]byte, error) {
13269	type NoMethod ThirdPartyTrackingUrl
13270	raw := NoMethod(*s)
13271	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13272}
13273
13274// TranscodeSetting: Transcode Settings
13275type TranscodeSetting struct {
13276	// EnabledVideoFormats: Whitelist of video formats to be served to this
13277	// placement. Set this list to null or empty to serve all video formats.
13278	EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
13279
13280	// Kind: Identifies what kind of resource this is. Value: the fixed
13281	// string "dfareporting#transcodeSetting".
13282	Kind string `json:"kind,omitempty"`
13283
13284	// ForceSendFields is a list of field names (e.g. "EnabledVideoFormats")
13285	// to unconditionally include in API requests. By default, fields with
13286	// empty values are omitted from API requests. However, any non-pointer,
13287	// non-interface field appearing in ForceSendFields will be sent to the
13288	// server regardless of whether the field is empty or not. This may be
13289	// used to include empty fields in Patch requests.
13290	ForceSendFields []string `json:"-"`
13291
13292	// NullFields is a list of field names (e.g. "EnabledVideoFormats") to
13293	// include in API requests with the JSON null value. By default, fields
13294	// with empty values are omitted from API requests. However, any field
13295	// with an empty value appearing in NullFields will be sent to the
13296	// server as null. It is an error if a field in this list has a
13297	// non-empty value. This may be used to include null fields in Patch
13298	// requests.
13299	NullFields []string `json:"-"`
13300}
13301
13302func (s *TranscodeSetting) MarshalJSON() ([]byte, error) {
13303	type NoMethod TranscodeSetting
13304	raw := NoMethod(*s)
13305	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13306}
13307
13308// UniversalAdId: A Universal Ad ID as per the VAST 4.0 spec. Applicable
13309// to the following creative types: INSTREAM_VIDEO and VPAID.
13310type UniversalAdId struct {
13311	// Registry: Registry used for the Ad ID value.
13312	//
13313	// Possible values:
13314	//   "AD_ID.ORG"
13315	//   "CLEARCAST"
13316	//   "DCM"
13317	//   "OTHER"
13318	Registry string `json:"registry,omitempty"`
13319
13320	// Value: ID value for this creative. Only alphanumeric characters and
13321	// the following symbols are valid: "_/\-". Maximum length is 64
13322	// characters. Read only when registry is DCM.
13323	Value string `json:"value,omitempty"`
13324
13325	// ForceSendFields is a list of field names (e.g. "Registry") to
13326	// unconditionally include in API requests. By default, fields with
13327	// empty values are omitted from API requests. However, any non-pointer,
13328	// non-interface field appearing in ForceSendFields will be sent to the
13329	// server regardless of whether the field is empty or not. This may be
13330	// used to include empty fields in Patch requests.
13331	ForceSendFields []string `json:"-"`
13332
13333	// NullFields is a list of field names (e.g. "Registry") to include in
13334	// API requests with the JSON null value. By default, fields with empty
13335	// values are omitted from API requests. However, any field with an
13336	// empty value appearing in NullFields will be sent to the server as
13337	// null. It is an error if a field in this list has a non-empty value.
13338	// This may be used to include null fields in Patch requests.
13339	NullFields []string `json:"-"`
13340}
13341
13342func (s *UniversalAdId) MarshalJSON() ([]byte, error) {
13343	type NoMethod UniversalAdId
13344	raw := NoMethod(*s)
13345	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13346}
13347
13348// UserDefinedVariableConfiguration: User Defined Variable
13349// configuration.
13350type UserDefinedVariableConfiguration struct {
13351	// DataType: Data type for the variable. This is a required field.
13352	//
13353	// Possible values:
13354	//   "NUMBER"
13355	//   "STRING"
13356	DataType string `json:"dataType,omitempty"`
13357
13358	// ReportName: User-friendly name for the variable which will appear in
13359	// reports. This is a required field, must be less than 64 characters
13360	// long, and cannot contain the following characters: ""<>".
13361	ReportName string `json:"reportName,omitempty"`
13362
13363	// VariableType: Variable name in the tag. This is a required field.
13364	//
13365	// Possible values:
13366	//   "U1"
13367	//   "U10"
13368	//   "U100"
13369	//   "U11"
13370	//   "U12"
13371	//   "U13"
13372	//   "U14"
13373	//   "U15"
13374	//   "U16"
13375	//   "U17"
13376	//   "U18"
13377	//   "U19"
13378	//   "U2"
13379	//   "U20"
13380	//   "U21"
13381	//   "U22"
13382	//   "U23"
13383	//   "U24"
13384	//   "U25"
13385	//   "U26"
13386	//   "U27"
13387	//   "U28"
13388	//   "U29"
13389	//   "U3"
13390	//   "U30"
13391	//   "U31"
13392	//   "U32"
13393	//   "U33"
13394	//   "U34"
13395	//   "U35"
13396	//   "U36"
13397	//   "U37"
13398	//   "U38"
13399	//   "U39"
13400	//   "U4"
13401	//   "U40"
13402	//   "U41"
13403	//   "U42"
13404	//   "U43"
13405	//   "U44"
13406	//   "U45"
13407	//   "U46"
13408	//   "U47"
13409	//   "U48"
13410	//   "U49"
13411	//   "U5"
13412	//   "U50"
13413	//   "U51"
13414	//   "U52"
13415	//   "U53"
13416	//   "U54"
13417	//   "U55"
13418	//   "U56"
13419	//   "U57"
13420	//   "U58"
13421	//   "U59"
13422	//   "U6"
13423	//   "U60"
13424	//   "U61"
13425	//   "U62"
13426	//   "U63"
13427	//   "U64"
13428	//   "U65"
13429	//   "U66"
13430	//   "U67"
13431	//   "U68"
13432	//   "U69"
13433	//   "U7"
13434	//   "U70"
13435	//   "U71"
13436	//   "U72"
13437	//   "U73"
13438	//   "U74"
13439	//   "U75"
13440	//   "U76"
13441	//   "U77"
13442	//   "U78"
13443	//   "U79"
13444	//   "U8"
13445	//   "U80"
13446	//   "U81"
13447	//   "U82"
13448	//   "U83"
13449	//   "U84"
13450	//   "U85"
13451	//   "U86"
13452	//   "U87"
13453	//   "U88"
13454	//   "U89"
13455	//   "U9"
13456	//   "U90"
13457	//   "U91"
13458	//   "U92"
13459	//   "U93"
13460	//   "U94"
13461	//   "U95"
13462	//   "U96"
13463	//   "U97"
13464	//   "U98"
13465	//   "U99"
13466	VariableType string `json:"variableType,omitempty"`
13467
13468	// ForceSendFields is a list of field names (e.g. "DataType") to
13469	// unconditionally include in API requests. By default, fields with
13470	// empty values are omitted from API requests. However, any non-pointer,
13471	// non-interface field appearing in ForceSendFields will be sent to the
13472	// server regardless of whether the field is empty or not. This may be
13473	// used to include empty fields in Patch requests.
13474	ForceSendFields []string `json:"-"`
13475
13476	// NullFields is a list of field names (e.g. "DataType") to include in
13477	// API requests with the JSON null value. By default, fields with empty
13478	// values are omitted from API requests. However, any field with an
13479	// empty value appearing in NullFields will be sent to the server as
13480	// null. It is an error if a field in this list has a non-empty value.
13481	// This may be used to include null fields in Patch requests.
13482	NullFields []string `json:"-"`
13483}
13484
13485func (s *UserDefinedVariableConfiguration) MarshalJSON() ([]byte, error) {
13486	type NoMethod UserDefinedVariableConfiguration
13487	raw := NoMethod(*s)
13488	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13489}
13490
13491// UserProfile: Represents a UserProfile resource.
13492type UserProfile struct {
13493	// AccountId: The account ID to which this profile belongs.
13494	AccountId int64 `json:"accountId,omitempty,string"`
13495
13496	// AccountName: The account name this profile belongs to.
13497	AccountName string `json:"accountName,omitempty"`
13498
13499	// Etag: The eTag of this response for caching purposes.
13500	Etag string `json:"etag,omitempty"`
13501
13502	// Kind: The kind of resource this is, in this case
13503	// dfareporting#userProfile.
13504	Kind string `json:"kind,omitempty"`
13505
13506	// ProfileId: The unique ID of the user profile.
13507	ProfileId int64 `json:"profileId,omitempty,string"`
13508
13509	// SubAccountId: The sub account ID this profile belongs to if
13510	// applicable.
13511	SubAccountId int64 `json:"subAccountId,omitempty,string"`
13512
13513	// SubAccountName: The sub account name this profile belongs to if
13514	// applicable.
13515	SubAccountName string `json:"subAccountName,omitempty"`
13516
13517	// UserName: The user name.
13518	UserName string `json:"userName,omitempty"`
13519
13520	// ServerResponse contains the HTTP response code and headers from the
13521	// server.
13522	googleapi.ServerResponse `json:"-"`
13523
13524	// ForceSendFields is a list of field names (e.g. "AccountId") to
13525	// unconditionally include in API requests. By default, fields with
13526	// empty values are omitted from API requests. However, any non-pointer,
13527	// non-interface field appearing in ForceSendFields will be sent to the
13528	// server regardless of whether the field is empty or not. This may be
13529	// used to include empty fields in Patch requests.
13530	ForceSendFields []string `json:"-"`
13531
13532	// NullFields is a list of field names (e.g. "AccountId") to include in
13533	// API requests with the JSON null value. By default, fields with empty
13534	// values are omitted from API requests. However, any field with an
13535	// empty value appearing in NullFields will be sent to the server as
13536	// null. It is an error if a field in this list has a non-empty value.
13537	// This may be used to include null fields in Patch requests.
13538	NullFields []string `json:"-"`
13539}
13540
13541func (s *UserProfile) MarshalJSON() ([]byte, error) {
13542	type NoMethod UserProfile
13543	raw := NoMethod(*s)
13544	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13545}
13546
13547// UserProfileList: Represents the list of user profiles.
13548type UserProfileList struct {
13549	// Etag: The eTag of this response for caching purposes.
13550	Etag string `json:"etag,omitempty"`
13551
13552	// Items: The user profiles returned in this response.
13553	Items []*UserProfile `json:"items,omitempty"`
13554
13555	// Kind: The kind of list this is, in this case
13556	// dfareporting#userProfileList.
13557	Kind string `json:"kind,omitempty"`
13558
13559	// ServerResponse contains the HTTP response code and headers from the
13560	// server.
13561	googleapi.ServerResponse `json:"-"`
13562
13563	// ForceSendFields is a list of field names (e.g. "Etag") to
13564	// unconditionally include in API requests. By default, fields with
13565	// empty values are omitted from API requests. However, any non-pointer,
13566	// non-interface field appearing in ForceSendFields will be sent to the
13567	// server regardless of whether the field is empty or not. This may be
13568	// used to include empty fields in Patch requests.
13569	ForceSendFields []string `json:"-"`
13570
13571	// NullFields is a list of field names (e.g. "Etag") to include in API
13572	// requests with the JSON null value. By default, fields with empty
13573	// values are omitted from API requests. However, any field with an
13574	// empty value appearing in NullFields will be sent to the server as
13575	// null. It is an error if a field in this list has a non-empty value.
13576	// This may be used to include null fields in Patch requests.
13577	NullFields []string `json:"-"`
13578}
13579
13580func (s *UserProfileList) MarshalJSON() ([]byte, error) {
13581	type NoMethod UserProfileList
13582	raw := NoMethod(*s)
13583	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13584}
13585
13586// UserRole: Contains properties of auser role, which is used to manage
13587// user access.
13588type UserRole struct {
13589	// AccountId: Account ID of this user role. This is a read-only field
13590	// that can be left blank.
13591	AccountId int64 `json:"accountId,omitempty,string"`
13592
13593	// DefaultUserRole: Whether this is a default user role. Default user
13594	// roles are created by the system for the account/subaccount and cannot
13595	// be modified or deleted. Each default user role comes with a basic set
13596	// of preassigned permissions.
13597	DefaultUserRole bool `json:"defaultUserRole,omitempty"`
13598
13599	// Id: ID of this user role. This is a read-only, auto-generated field.
13600	Id int64 `json:"id,omitempty,string"`
13601
13602	// Kind: Identifies what kind of resource this is. Value: the fixed
13603	// string "dfareporting#userRole".
13604	Kind string `json:"kind,omitempty"`
13605
13606	// Name: Name of this user role. This is a required field. Must be less
13607	// than 256 characters long. If this user role is under a subaccount,
13608	// the name must be unique among sites of the same subaccount.
13609	// Otherwise, this user role is a top-level user role, and the name must
13610	// be unique among top-level user roles of the same account.
13611	Name string `json:"name,omitempty"`
13612
13613	// ParentUserRoleId: ID of the user role that this user role is based on
13614	// or copied from. This is a required field.
13615	ParentUserRoleId int64 `json:"parentUserRoleId,omitempty,string"`
13616
13617	// Permissions: List of permissions associated with this user role.
13618	Permissions []*UserRolePermission `json:"permissions,omitempty"`
13619
13620	// SubaccountId: Subaccount ID of this user role. This is a read-only
13621	// field that can be left blank.
13622	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13623
13624	// ServerResponse contains the HTTP response code and headers from the
13625	// server.
13626	googleapi.ServerResponse `json:"-"`
13627
13628	// ForceSendFields is a list of field names (e.g. "AccountId") to
13629	// unconditionally include in API requests. By default, fields with
13630	// empty values are omitted from API requests. However, any non-pointer,
13631	// non-interface field appearing in ForceSendFields will be sent to the
13632	// server regardless of whether the field is empty or not. This may be
13633	// used to include empty fields in Patch requests.
13634	ForceSendFields []string `json:"-"`
13635
13636	// NullFields is a list of field names (e.g. "AccountId") to include in
13637	// API requests with the JSON null value. By default, fields with empty
13638	// values are omitted from API requests. However, any field with an
13639	// empty value appearing in NullFields will be sent to the server as
13640	// null. It is an error if a field in this list has a non-empty value.
13641	// This may be used to include null fields in Patch requests.
13642	NullFields []string `json:"-"`
13643}
13644
13645func (s *UserRole) MarshalJSON() ([]byte, error) {
13646	type NoMethod UserRole
13647	raw := NoMethod(*s)
13648	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13649}
13650
13651// UserRolePermission: Contains properties of a user role permission.
13652type UserRolePermission struct {
13653	// Availability: Levels of availability for a user role permission.
13654	//
13655	// Possible values:
13656	//   "ACCOUNT_ALWAYS"
13657	//   "ACCOUNT_BY_DEFAULT"
13658	//   "NOT_AVAILABLE_BY_DEFAULT"
13659	//   "SUBACCOUNT_AND_ACCOUNT_ALWAYS"
13660	//   "SUBACCOUNT_AND_ACCOUNT_BY_DEFAULT"
13661	Availability string `json:"availability,omitempty"`
13662
13663	// Id: ID of this user role permission.
13664	Id int64 `json:"id,omitempty,string"`
13665
13666	// Kind: Identifies what kind of resource this is. Value: the fixed
13667	// string "dfareporting#userRolePermission".
13668	Kind string `json:"kind,omitempty"`
13669
13670	// Name: Name of this user role permission.
13671	Name string `json:"name,omitempty"`
13672
13673	// PermissionGroupId: ID of the permission group that this user role
13674	// permission belongs to.
13675	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
13676
13677	// ServerResponse contains the HTTP response code and headers from the
13678	// server.
13679	googleapi.ServerResponse `json:"-"`
13680
13681	// ForceSendFields is a list of field names (e.g. "Availability") to
13682	// unconditionally include in API requests. By default, fields with
13683	// empty values are omitted from API requests. However, any non-pointer,
13684	// non-interface field appearing in ForceSendFields will be sent to the
13685	// server regardless of whether the field is empty or not. This may be
13686	// used to include empty fields in Patch requests.
13687	ForceSendFields []string `json:"-"`
13688
13689	// NullFields is a list of field names (e.g. "Availability") to include
13690	// in API requests with the JSON null value. By default, fields with
13691	// empty values are omitted from API requests. However, any field with
13692	// an empty value appearing in NullFields will be sent to the server as
13693	// null. It is an error if a field in this list has a non-empty value.
13694	// This may be used to include null fields in Patch requests.
13695	NullFields []string `json:"-"`
13696}
13697
13698func (s *UserRolePermission) MarshalJSON() ([]byte, error) {
13699	type NoMethod UserRolePermission
13700	raw := NoMethod(*s)
13701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13702}
13703
13704// UserRolePermissionGroup: Represents a grouping of related user role
13705// permissions.
13706type UserRolePermissionGroup struct {
13707	// Id: ID of this user role permission.
13708	Id int64 `json:"id,omitempty,string"`
13709
13710	// Kind: Identifies what kind of resource this is. Value: the fixed
13711	// string "dfareporting#userRolePermissionGroup".
13712	Kind string `json:"kind,omitempty"`
13713
13714	// Name: Name of this user role permission group.
13715	Name string `json:"name,omitempty"`
13716
13717	// ServerResponse contains the HTTP response code and headers from the
13718	// server.
13719	googleapi.ServerResponse `json:"-"`
13720
13721	// ForceSendFields is a list of field names (e.g. "Id") to
13722	// unconditionally include in API requests. By default, fields with
13723	// empty values are omitted from API requests. However, any non-pointer,
13724	// non-interface field appearing in ForceSendFields will be sent to the
13725	// server regardless of whether the field is empty or not. This may be
13726	// used to include empty fields in Patch requests.
13727	ForceSendFields []string `json:"-"`
13728
13729	// NullFields is a list of field names (e.g. "Id") to include in API
13730	// requests with the JSON null value. By default, fields with empty
13731	// values are omitted from API requests. However, any field with an
13732	// empty value appearing in NullFields will be sent to the server as
13733	// null. It is an error if a field in this list has a non-empty value.
13734	// This may be used to include null fields in Patch requests.
13735	NullFields []string `json:"-"`
13736}
13737
13738func (s *UserRolePermissionGroup) MarshalJSON() ([]byte, error) {
13739	type NoMethod UserRolePermissionGroup
13740	raw := NoMethod(*s)
13741	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13742}
13743
13744// UserRolePermissionGroupsListResponse: User Role Permission Group List
13745// Response
13746type UserRolePermissionGroupsListResponse struct {
13747	// Kind: Identifies what kind of resource this is. Value: the fixed
13748	// string "dfareporting#userRolePermissionGroupsListResponse".
13749	Kind string `json:"kind,omitempty"`
13750
13751	// UserRolePermissionGroups: User role permission group collection.
13752	UserRolePermissionGroups []*UserRolePermissionGroup `json:"userRolePermissionGroups,omitempty"`
13753
13754	// ServerResponse contains the HTTP response code and headers from the
13755	// server.
13756	googleapi.ServerResponse `json:"-"`
13757
13758	// ForceSendFields is a list of field names (e.g. "Kind") to
13759	// unconditionally include in API requests. By default, fields with
13760	// empty values are omitted from API requests. However, any non-pointer,
13761	// non-interface field appearing in ForceSendFields will be sent to the
13762	// server regardless of whether the field is empty or not. This may be
13763	// used to include empty fields in Patch requests.
13764	ForceSendFields []string `json:"-"`
13765
13766	// NullFields is a list of field names (e.g. "Kind") to include in API
13767	// requests with the JSON null value. By default, fields with empty
13768	// values are omitted from API requests. However, any field with an
13769	// empty value appearing in NullFields will be sent to the server as
13770	// null. It is an error if a field in this list has a non-empty value.
13771	// This may be used to include null fields in Patch requests.
13772	NullFields []string `json:"-"`
13773}
13774
13775func (s *UserRolePermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
13776	type NoMethod UserRolePermissionGroupsListResponse
13777	raw := NoMethod(*s)
13778	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13779}
13780
13781// UserRolePermissionsListResponse: User Role Permission List Response
13782type UserRolePermissionsListResponse struct {
13783	// Kind: Identifies what kind of resource this is. Value: the fixed
13784	// string "dfareporting#userRolePermissionsListResponse".
13785	Kind string `json:"kind,omitempty"`
13786
13787	// UserRolePermissions: User role permission collection.
13788	UserRolePermissions []*UserRolePermission `json:"userRolePermissions,omitempty"`
13789
13790	// ServerResponse contains the HTTP response code and headers from the
13791	// server.
13792	googleapi.ServerResponse `json:"-"`
13793
13794	// ForceSendFields is a list of field names (e.g. "Kind") to
13795	// unconditionally include in API requests. By default, fields with
13796	// empty values are omitted from API requests. However, any non-pointer,
13797	// non-interface field appearing in ForceSendFields will be sent to the
13798	// server regardless of whether the field is empty or not. This may be
13799	// used to include empty fields in Patch requests.
13800	ForceSendFields []string `json:"-"`
13801
13802	// NullFields is a list of field names (e.g. "Kind") to include in API
13803	// requests with the JSON null value. By default, fields with empty
13804	// values are omitted from API requests. However, any field with an
13805	// empty value appearing in NullFields will be sent to the server as
13806	// null. It is an error if a field in this list has a non-empty value.
13807	// This may be used to include null fields in Patch requests.
13808	NullFields []string `json:"-"`
13809}
13810
13811func (s *UserRolePermissionsListResponse) MarshalJSON() ([]byte, error) {
13812	type NoMethod UserRolePermissionsListResponse
13813	raw := NoMethod(*s)
13814	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13815}
13816
13817// UserRolesListResponse: User Role List Response
13818type UserRolesListResponse struct {
13819	// Kind: Identifies what kind of resource this is. Value: the fixed
13820	// string "dfareporting#userRolesListResponse".
13821	Kind string `json:"kind,omitempty"`
13822
13823	// NextPageToken: Pagination token to be used for the next list
13824	// operation.
13825	NextPageToken string `json:"nextPageToken,omitempty"`
13826
13827	// UserRoles: User role collection.
13828	UserRoles []*UserRole `json:"userRoles,omitempty"`
13829
13830	// ServerResponse contains the HTTP response code and headers from the
13831	// server.
13832	googleapi.ServerResponse `json:"-"`
13833
13834	// ForceSendFields is a list of field names (e.g. "Kind") to
13835	// unconditionally include in API requests. By default, fields with
13836	// empty values are omitted from API requests. However, any non-pointer,
13837	// non-interface field appearing in ForceSendFields will be sent to the
13838	// server regardless of whether the field is empty or not. This may be
13839	// used to include empty fields in Patch requests.
13840	ForceSendFields []string `json:"-"`
13841
13842	// NullFields is a list of field names (e.g. "Kind") to include in API
13843	// requests with the JSON null value. By default, fields with empty
13844	// values are omitted from API requests. However, any field with an
13845	// empty value appearing in NullFields will be sent to the server as
13846	// null. It is an error if a field in this list has a non-empty value.
13847	// This may be used to include null fields in Patch requests.
13848	NullFields []string `json:"-"`
13849}
13850
13851func (s *UserRolesListResponse) MarshalJSON() ([]byte, error) {
13852	type NoMethod UserRolesListResponse
13853	raw := NoMethod(*s)
13854	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13855}
13856
13857// VideoFormat: Contains information about supported video formats.
13858type VideoFormat struct {
13859	// FileType: File type of the video format.
13860	//
13861	// Possible values:
13862	//   "FLV"
13863	//   "M3U8"
13864	//   "MP4"
13865	//   "THREEGPP"
13866	//   "WEBM"
13867	FileType string `json:"fileType,omitempty"`
13868
13869	// Id: ID of the video format.
13870	Id int64 `json:"id,omitempty"`
13871
13872	// Kind: Identifies what kind of resource this is. Value: the fixed
13873	// string "dfareporting#videoFormat".
13874	Kind string `json:"kind,omitempty"`
13875
13876	// Resolution: The resolution of this video format.
13877	Resolution *Size `json:"resolution,omitempty"`
13878
13879	// TargetBitRate: The target bit rate of this video format.
13880	TargetBitRate int64 `json:"targetBitRate,omitempty"`
13881
13882	// ServerResponse contains the HTTP response code and headers from the
13883	// server.
13884	googleapi.ServerResponse `json:"-"`
13885
13886	// ForceSendFields is a list of field names (e.g. "FileType") to
13887	// unconditionally include in API requests. By default, fields with
13888	// empty values are omitted from API requests. However, any non-pointer,
13889	// non-interface field appearing in ForceSendFields will be sent to the
13890	// server regardless of whether the field is empty or not. This may be
13891	// used to include empty fields in Patch requests.
13892	ForceSendFields []string `json:"-"`
13893
13894	// NullFields is a list of field names (e.g. "FileType") to include in
13895	// API requests with the JSON null value. By default, fields with empty
13896	// values are omitted from API requests. However, any field with an
13897	// empty value appearing in NullFields will be sent to the server as
13898	// null. It is an error if a field in this list has a non-empty value.
13899	// This may be used to include null fields in Patch requests.
13900	NullFields []string `json:"-"`
13901}
13902
13903func (s *VideoFormat) MarshalJSON() ([]byte, error) {
13904	type NoMethod VideoFormat
13905	raw := NoMethod(*s)
13906	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13907}
13908
13909// VideoFormatsListResponse: Video Format List Response
13910type VideoFormatsListResponse struct {
13911	// Kind: Identifies what kind of resource this is. Value: the fixed
13912	// string "dfareporting#videoFormatsListResponse".
13913	Kind string `json:"kind,omitempty"`
13914
13915	// VideoFormats: Video format collection.
13916	VideoFormats []*VideoFormat `json:"videoFormats,omitempty"`
13917
13918	// ServerResponse contains the HTTP response code and headers from the
13919	// server.
13920	googleapi.ServerResponse `json:"-"`
13921
13922	// ForceSendFields is a list of field names (e.g. "Kind") to
13923	// unconditionally include in API requests. By default, fields with
13924	// empty values are omitted from API requests. However, any non-pointer,
13925	// non-interface field appearing in ForceSendFields will be sent to the
13926	// server regardless of whether the field is empty or not. This may be
13927	// used to include empty fields in Patch requests.
13928	ForceSendFields []string `json:"-"`
13929
13930	// NullFields is a list of field names (e.g. "Kind") to include in API
13931	// requests with the JSON null value. By default, fields with empty
13932	// values are omitted from API requests. However, any field with an
13933	// empty value appearing in NullFields will be sent to the server as
13934	// null. It is an error if a field in this list has a non-empty value.
13935	// This may be used to include null fields in Patch requests.
13936	NullFields []string `json:"-"`
13937}
13938
13939func (s *VideoFormatsListResponse) MarshalJSON() ([]byte, error) {
13940	type NoMethod VideoFormatsListResponse
13941	raw := NoMethod(*s)
13942	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13943}
13944
13945// VideoOffset: Video Offset
13946type VideoOffset struct {
13947	// OffsetPercentage: Duration, as a percentage of video duration. Do not
13948	// set when offsetSeconds is set. Acceptable values are 0 to 100,
13949	// inclusive.
13950	OffsetPercentage int64 `json:"offsetPercentage,omitempty"`
13951
13952	// OffsetSeconds: Duration, in seconds. Do not set when offsetPercentage
13953	// is set. Acceptable values are 0 to 86399, inclusive.
13954	OffsetSeconds int64 `json:"offsetSeconds,omitempty"`
13955
13956	// ForceSendFields is a list of field names (e.g. "OffsetPercentage") to
13957	// unconditionally include in API requests. By default, fields with
13958	// empty values are omitted from API requests. However, any non-pointer,
13959	// non-interface field appearing in ForceSendFields will be sent to the
13960	// server regardless of whether the field is empty or not. This may be
13961	// used to include empty fields in Patch requests.
13962	ForceSendFields []string `json:"-"`
13963
13964	// NullFields is a list of field names (e.g. "OffsetPercentage") to
13965	// include in API requests with the JSON null value. By default, fields
13966	// with empty values are omitted from API requests. However, any field
13967	// with an empty value appearing in NullFields will be sent to the
13968	// server as null. It is an error if a field in this list has a
13969	// non-empty value. This may be used to include null fields in Patch
13970	// requests.
13971	NullFields []string `json:"-"`
13972}
13973
13974func (s *VideoOffset) MarshalJSON() ([]byte, error) {
13975	type NoMethod VideoOffset
13976	raw := NoMethod(*s)
13977	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13978}
13979
13980// VideoSettings: Video Settings
13981type VideoSettings struct {
13982	// CompanionSettings: Settings for the companion creatives of video
13983	// creatives served to this placement.
13984	CompanionSettings *CompanionSetting `json:"companionSettings,omitempty"`
13985
13986	// Kind: Identifies what kind of resource this is. Value: the fixed
13987	// string "dfareporting#videoSettings".
13988	Kind string `json:"kind,omitempty"`
13989
13990	// Orientation: Orientation of a video placement. If this value is set,
13991	// placement will return assets matching the specified orientation.
13992	//
13993	// Possible values:
13994	//   "ANY"
13995	//   "LANDSCAPE"
13996	//   "PORTRAIT"
13997	Orientation string `json:"orientation,omitempty"`
13998
13999	// SkippableSettings: Settings for the skippability of video creatives
14000	// served to this placement. If this object is provided, the
14001	// creative-level skippable settings will be overridden.
14002	SkippableSettings *SkippableSetting `json:"skippableSettings,omitempty"`
14003
14004	// TranscodeSettings: Settings for the transcodes of video creatives
14005	// served to this placement. If this object is provided, the
14006	// creative-level transcode settings will be overridden.
14007	TranscodeSettings *TranscodeSetting `json:"transcodeSettings,omitempty"`
14008
14009	// ForceSendFields is a list of field names (e.g. "CompanionSettings")
14010	// to unconditionally include in API requests. By default, fields with
14011	// empty values are omitted from API requests. However, any non-pointer,
14012	// non-interface field appearing in ForceSendFields will be sent to the
14013	// server regardless of whether the field is empty or not. This may be
14014	// used to include empty fields in Patch requests.
14015	ForceSendFields []string `json:"-"`
14016
14017	// NullFields is a list of field names (e.g. "CompanionSettings") to
14018	// include in API requests with the JSON null value. By default, fields
14019	// with empty values are omitted from API requests. However, any field
14020	// with an empty value appearing in NullFields will be sent to the
14021	// server as null. It is an error if a field in this list has a
14022	// non-empty value. This may be used to include null fields in Patch
14023	// requests.
14024	NullFields []string `json:"-"`
14025}
14026
14027func (s *VideoSettings) MarshalJSON() ([]byte, error) {
14028	type NoMethod VideoSettings
14029	raw := NoMethod(*s)
14030	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14031}
14032
14033// method id "dfareporting.accountActiveAdSummaries.get":
14034
14035type AccountActiveAdSummariesGetCall struct {
14036	s                *Service
14037	profileId        int64
14038	summaryAccountId int64
14039	urlParams_       gensupport.URLParams
14040	ifNoneMatch_     string
14041	ctx_             context.Context
14042	header_          http.Header
14043}
14044
14045// Get: Gets the account's active ad summary by account ID.
14046func (r *AccountActiveAdSummariesService) Get(profileId int64, summaryAccountId int64) *AccountActiveAdSummariesGetCall {
14047	c := &AccountActiveAdSummariesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14048	c.profileId = profileId
14049	c.summaryAccountId = summaryAccountId
14050	return c
14051}
14052
14053// Fields allows partial responses to be retrieved. See
14054// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14055// for more information.
14056func (c *AccountActiveAdSummariesGetCall) Fields(s ...googleapi.Field) *AccountActiveAdSummariesGetCall {
14057	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14058	return c
14059}
14060
14061// IfNoneMatch sets the optional parameter which makes the operation
14062// fail if the object's ETag matches the given value. This is useful for
14063// getting updates only after the object has changed since the last
14064// request. Use googleapi.IsNotModified to check whether the response
14065// error from Do is the result of In-None-Match.
14066func (c *AccountActiveAdSummariesGetCall) IfNoneMatch(entityTag string) *AccountActiveAdSummariesGetCall {
14067	c.ifNoneMatch_ = entityTag
14068	return c
14069}
14070
14071// Context sets the context to be used in this call's Do method. Any
14072// pending HTTP request will be aborted if the provided context is
14073// canceled.
14074func (c *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall {
14075	c.ctx_ = ctx
14076	return c
14077}
14078
14079// Header returns an http.Header that can be modified by the caller to
14080// add HTTP headers to the request.
14081func (c *AccountActiveAdSummariesGetCall) Header() http.Header {
14082	if c.header_ == nil {
14083		c.header_ = make(http.Header)
14084	}
14085	return c.header_
14086}
14087
14088func (c *AccountActiveAdSummariesGetCall) doRequest(alt string) (*http.Response, error) {
14089	reqHeaders := make(http.Header)
14090	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14091	for k, v := range c.header_ {
14092		reqHeaders[k] = v
14093	}
14094	reqHeaders.Set("User-Agent", c.s.userAgent())
14095	if c.ifNoneMatch_ != "" {
14096		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14097	}
14098	var body io.Reader = nil
14099	c.urlParams_.Set("alt", alt)
14100	c.urlParams_.Set("prettyPrint", "false")
14101	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}")
14102	urls += "?" + c.urlParams_.Encode()
14103	req, err := http.NewRequest("GET", urls, body)
14104	if err != nil {
14105		return nil, err
14106	}
14107	req.Header = reqHeaders
14108	googleapi.Expand(req.URL, map[string]string{
14109		"profileId":        strconv.FormatInt(c.profileId, 10),
14110		"summaryAccountId": strconv.FormatInt(c.summaryAccountId, 10),
14111	})
14112	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14113}
14114
14115// Do executes the "dfareporting.accountActiveAdSummaries.get" call.
14116// Exactly one of *AccountActiveAdSummary or error will be non-nil. Any
14117// non-2xx status code is an error. Response headers are in either
14118// *AccountActiveAdSummary.ServerResponse.Header or (if a response was
14119// returned at all) in error.(*googleapi.Error).Header. Use
14120// googleapi.IsNotModified to check whether the returned error was
14121// because http.StatusNotModified was returned.
14122func (c *AccountActiveAdSummariesGetCall) Do(opts ...googleapi.CallOption) (*AccountActiveAdSummary, error) {
14123	gensupport.SetOptions(c.urlParams_, opts...)
14124	res, err := c.doRequest("json")
14125	if res != nil && res.StatusCode == http.StatusNotModified {
14126		if res.Body != nil {
14127			res.Body.Close()
14128		}
14129		return nil, &googleapi.Error{
14130			Code:   res.StatusCode,
14131			Header: res.Header,
14132		}
14133	}
14134	if err != nil {
14135		return nil, err
14136	}
14137	defer googleapi.CloseBody(res)
14138	if err := googleapi.CheckResponse(res); err != nil {
14139		return nil, err
14140	}
14141	ret := &AccountActiveAdSummary{
14142		ServerResponse: googleapi.ServerResponse{
14143			Header:         res.Header,
14144			HTTPStatusCode: res.StatusCode,
14145		},
14146	}
14147	target := &ret
14148	if err := gensupport.DecodeResponse(target, res); err != nil {
14149		return nil, err
14150	}
14151	return ret, nil
14152	// {
14153	//   "description": "Gets the account's active ad summary by account ID.",
14154	//   "httpMethod": "GET",
14155	//   "id": "dfareporting.accountActiveAdSummaries.get",
14156	//   "parameterOrder": [
14157	//     "profileId",
14158	//     "summaryAccountId"
14159	//   ],
14160	//   "parameters": {
14161	//     "profileId": {
14162	//       "description": "User profile ID associated with this request.",
14163	//       "format": "int64",
14164	//       "location": "path",
14165	//       "required": true,
14166	//       "type": "string"
14167	//     },
14168	//     "summaryAccountId": {
14169	//       "description": "Account ID.",
14170	//       "format": "int64",
14171	//       "location": "path",
14172	//       "required": true,
14173	//       "type": "string"
14174	//     }
14175	//   },
14176	//   "path": "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}",
14177	//   "response": {
14178	//     "$ref": "AccountActiveAdSummary"
14179	//   },
14180	//   "scopes": [
14181	//     "https://www.googleapis.com/auth/dfatrafficking"
14182	//   ]
14183	// }
14184
14185}
14186
14187// method id "dfareporting.accountPermissionGroups.get":
14188
14189type AccountPermissionGroupsGetCall struct {
14190	s            *Service
14191	profileId    int64
14192	id           int64
14193	urlParams_   gensupport.URLParams
14194	ifNoneMatch_ string
14195	ctx_         context.Context
14196	header_      http.Header
14197}
14198
14199// Get: Gets one account permission group by ID.
14200func (r *AccountPermissionGroupsService) Get(profileId int64, id int64) *AccountPermissionGroupsGetCall {
14201	c := &AccountPermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14202	c.profileId = profileId
14203	c.id = id
14204	return c
14205}
14206
14207// Fields allows partial responses to be retrieved. See
14208// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14209// for more information.
14210func (c *AccountPermissionGroupsGetCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsGetCall {
14211	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14212	return c
14213}
14214
14215// IfNoneMatch sets the optional parameter which makes the operation
14216// fail if the object's ETag matches the given value. This is useful for
14217// getting updates only after the object has changed since the last
14218// request. Use googleapi.IsNotModified to check whether the response
14219// error from Do is the result of In-None-Match.
14220func (c *AccountPermissionGroupsGetCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsGetCall {
14221	c.ifNoneMatch_ = entityTag
14222	return c
14223}
14224
14225// Context sets the context to be used in this call's Do method. Any
14226// pending HTTP request will be aborted if the provided context is
14227// canceled.
14228func (c *AccountPermissionGroupsGetCall) Context(ctx context.Context) *AccountPermissionGroupsGetCall {
14229	c.ctx_ = ctx
14230	return c
14231}
14232
14233// Header returns an http.Header that can be modified by the caller to
14234// add HTTP headers to the request.
14235func (c *AccountPermissionGroupsGetCall) Header() http.Header {
14236	if c.header_ == nil {
14237		c.header_ = make(http.Header)
14238	}
14239	return c.header_
14240}
14241
14242func (c *AccountPermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
14243	reqHeaders := make(http.Header)
14244	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14245	for k, v := range c.header_ {
14246		reqHeaders[k] = v
14247	}
14248	reqHeaders.Set("User-Agent", c.s.userAgent())
14249	if c.ifNoneMatch_ != "" {
14250		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14251	}
14252	var body io.Reader = nil
14253	c.urlParams_.Set("alt", alt)
14254	c.urlParams_.Set("prettyPrint", "false")
14255	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups/{id}")
14256	urls += "?" + c.urlParams_.Encode()
14257	req, err := http.NewRequest("GET", urls, body)
14258	if err != nil {
14259		return nil, err
14260	}
14261	req.Header = reqHeaders
14262	googleapi.Expand(req.URL, map[string]string{
14263		"profileId": strconv.FormatInt(c.profileId, 10),
14264		"id":        strconv.FormatInt(c.id, 10),
14265	})
14266	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14267}
14268
14269// Do executes the "dfareporting.accountPermissionGroups.get" call.
14270// Exactly one of *AccountPermissionGroup or error will be non-nil. Any
14271// non-2xx status code is an error. Response headers are in either
14272// *AccountPermissionGroup.ServerResponse.Header or (if a response was
14273// returned at all) in error.(*googleapi.Error).Header. Use
14274// googleapi.IsNotModified to check whether the returned error was
14275// because http.StatusNotModified was returned.
14276func (c *AccountPermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroup, error) {
14277	gensupport.SetOptions(c.urlParams_, opts...)
14278	res, err := c.doRequest("json")
14279	if res != nil && res.StatusCode == http.StatusNotModified {
14280		if res.Body != nil {
14281			res.Body.Close()
14282		}
14283		return nil, &googleapi.Error{
14284			Code:   res.StatusCode,
14285			Header: res.Header,
14286		}
14287	}
14288	if err != nil {
14289		return nil, err
14290	}
14291	defer googleapi.CloseBody(res)
14292	if err := googleapi.CheckResponse(res); err != nil {
14293		return nil, err
14294	}
14295	ret := &AccountPermissionGroup{
14296		ServerResponse: googleapi.ServerResponse{
14297			Header:         res.Header,
14298			HTTPStatusCode: res.StatusCode,
14299		},
14300	}
14301	target := &ret
14302	if err := gensupport.DecodeResponse(target, res); err != nil {
14303		return nil, err
14304	}
14305	return ret, nil
14306	// {
14307	//   "description": "Gets one account permission group by ID.",
14308	//   "httpMethod": "GET",
14309	//   "id": "dfareporting.accountPermissionGroups.get",
14310	//   "parameterOrder": [
14311	//     "profileId",
14312	//     "id"
14313	//   ],
14314	//   "parameters": {
14315	//     "id": {
14316	//       "description": "Account permission group ID.",
14317	//       "format": "int64",
14318	//       "location": "path",
14319	//       "required": true,
14320	//       "type": "string"
14321	//     },
14322	//     "profileId": {
14323	//       "description": "User profile ID associated with this request.",
14324	//       "format": "int64",
14325	//       "location": "path",
14326	//       "required": true,
14327	//       "type": "string"
14328	//     }
14329	//   },
14330	//   "path": "userprofiles/{profileId}/accountPermissionGroups/{id}",
14331	//   "response": {
14332	//     "$ref": "AccountPermissionGroup"
14333	//   },
14334	//   "scopes": [
14335	//     "https://www.googleapis.com/auth/dfatrafficking"
14336	//   ]
14337	// }
14338
14339}
14340
14341// method id "dfareporting.accountPermissionGroups.list":
14342
14343type AccountPermissionGroupsListCall struct {
14344	s            *Service
14345	profileId    int64
14346	urlParams_   gensupport.URLParams
14347	ifNoneMatch_ string
14348	ctx_         context.Context
14349	header_      http.Header
14350}
14351
14352// List: Retrieves the list of account permission groups.
14353func (r *AccountPermissionGroupsService) List(profileId int64) *AccountPermissionGroupsListCall {
14354	c := &AccountPermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14355	c.profileId = profileId
14356	return c
14357}
14358
14359// Fields allows partial responses to be retrieved. See
14360// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14361// for more information.
14362func (c *AccountPermissionGroupsListCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsListCall {
14363	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14364	return c
14365}
14366
14367// IfNoneMatch sets the optional parameter which makes the operation
14368// fail if the object's ETag matches the given value. This is useful for
14369// getting updates only after the object has changed since the last
14370// request. Use googleapi.IsNotModified to check whether the response
14371// error from Do is the result of In-None-Match.
14372func (c *AccountPermissionGroupsListCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsListCall {
14373	c.ifNoneMatch_ = entityTag
14374	return c
14375}
14376
14377// Context sets the context to be used in this call's Do method. Any
14378// pending HTTP request will be aborted if the provided context is
14379// canceled.
14380func (c *AccountPermissionGroupsListCall) Context(ctx context.Context) *AccountPermissionGroupsListCall {
14381	c.ctx_ = ctx
14382	return c
14383}
14384
14385// Header returns an http.Header that can be modified by the caller to
14386// add HTTP headers to the request.
14387func (c *AccountPermissionGroupsListCall) Header() http.Header {
14388	if c.header_ == nil {
14389		c.header_ = make(http.Header)
14390	}
14391	return c.header_
14392}
14393
14394func (c *AccountPermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
14395	reqHeaders := make(http.Header)
14396	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14397	for k, v := range c.header_ {
14398		reqHeaders[k] = v
14399	}
14400	reqHeaders.Set("User-Agent", c.s.userAgent())
14401	if c.ifNoneMatch_ != "" {
14402		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14403	}
14404	var body io.Reader = nil
14405	c.urlParams_.Set("alt", alt)
14406	c.urlParams_.Set("prettyPrint", "false")
14407	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups")
14408	urls += "?" + c.urlParams_.Encode()
14409	req, err := http.NewRequest("GET", urls, body)
14410	if err != nil {
14411		return nil, err
14412	}
14413	req.Header = reqHeaders
14414	googleapi.Expand(req.URL, map[string]string{
14415		"profileId": strconv.FormatInt(c.profileId, 10),
14416	})
14417	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14418}
14419
14420// Do executes the "dfareporting.accountPermissionGroups.list" call.
14421// Exactly one of *AccountPermissionGroupsListResponse or error will be
14422// non-nil. Any non-2xx status code is an error. Response headers are in
14423// either *AccountPermissionGroupsListResponse.ServerResponse.Header or
14424// (if a response was returned at all) in
14425// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14426// whether the returned error was because http.StatusNotModified was
14427// returned.
14428func (c *AccountPermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroupsListResponse, error) {
14429	gensupport.SetOptions(c.urlParams_, opts...)
14430	res, err := c.doRequest("json")
14431	if res != nil && res.StatusCode == http.StatusNotModified {
14432		if res.Body != nil {
14433			res.Body.Close()
14434		}
14435		return nil, &googleapi.Error{
14436			Code:   res.StatusCode,
14437			Header: res.Header,
14438		}
14439	}
14440	if err != nil {
14441		return nil, err
14442	}
14443	defer googleapi.CloseBody(res)
14444	if err := googleapi.CheckResponse(res); err != nil {
14445		return nil, err
14446	}
14447	ret := &AccountPermissionGroupsListResponse{
14448		ServerResponse: googleapi.ServerResponse{
14449			Header:         res.Header,
14450			HTTPStatusCode: res.StatusCode,
14451		},
14452	}
14453	target := &ret
14454	if err := gensupport.DecodeResponse(target, res); err != nil {
14455		return nil, err
14456	}
14457	return ret, nil
14458	// {
14459	//   "description": "Retrieves the list of account permission groups.",
14460	//   "httpMethod": "GET",
14461	//   "id": "dfareporting.accountPermissionGroups.list",
14462	//   "parameterOrder": [
14463	//     "profileId"
14464	//   ],
14465	//   "parameters": {
14466	//     "profileId": {
14467	//       "description": "User profile ID associated with this request.",
14468	//       "format": "int64",
14469	//       "location": "path",
14470	//       "required": true,
14471	//       "type": "string"
14472	//     }
14473	//   },
14474	//   "path": "userprofiles/{profileId}/accountPermissionGroups",
14475	//   "response": {
14476	//     "$ref": "AccountPermissionGroupsListResponse"
14477	//   },
14478	//   "scopes": [
14479	//     "https://www.googleapis.com/auth/dfatrafficking"
14480	//   ]
14481	// }
14482
14483}
14484
14485// method id "dfareporting.accountPermissions.get":
14486
14487type AccountPermissionsGetCall struct {
14488	s            *Service
14489	profileId    int64
14490	id           int64
14491	urlParams_   gensupport.URLParams
14492	ifNoneMatch_ string
14493	ctx_         context.Context
14494	header_      http.Header
14495}
14496
14497// Get: Gets one account permission by ID.
14498func (r *AccountPermissionsService) Get(profileId int64, id int64) *AccountPermissionsGetCall {
14499	c := &AccountPermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14500	c.profileId = profileId
14501	c.id = id
14502	return c
14503}
14504
14505// Fields allows partial responses to be retrieved. See
14506// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14507// for more information.
14508func (c *AccountPermissionsGetCall) Fields(s ...googleapi.Field) *AccountPermissionsGetCall {
14509	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14510	return c
14511}
14512
14513// IfNoneMatch sets the optional parameter which makes the operation
14514// fail if the object's ETag matches the given value. This is useful for
14515// getting updates only after the object has changed since the last
14516// request. Use googleapi.IsNotModified to check whether the response
14517// error from Do is the result of In-None-Match.
14518func (c *AccountPermissionsGetCall) IfNoneMatch(entityTag string) *AccountPermissionsGetCall {
14519	c.ifNoneMatch_ = entityTag
14520	return c
14521}
14522
14523// Context sets the context to be used in this call's Do method. Any
14524// pending HTTP request will be aborted if the provided context is
14525// canceled.
14526func (c *AccountPermissionsGetCall) Context(ctx context.Context) *AccountPermissionsGetCall {
14527	c.ctx_ = ctx
14528	return c
14529}
14530
14531// Header returns an http.Header that can be modified by the caller to
14532// add HTTP headers to the request.
14533func (c *AccountPermissionsGetCall) Header() http.Header {
14534	if c.header_ == nil {
14535		c.header_ = make(http.Header)
14536	}
14537	return c.header_
14538}
14539
14540func (c *AccountPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
14541	reqHeaders := make(http.Header)
14542	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14543	for k, v := range c.header_ {
14544		reqHeaders[k] = v
14545	}
14546	reqHeaders.Set("User-Agent", c.s.userAgent())
14547	if c.ifNoneMatch_ != "" {
14548		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14549	}
14550	var body io.Reader = nil
14551	c.urlParams_.Set("alt", alt)
14552	c.urlParams_.Set("prettyPrint", "false")
14553	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions/{id}")
14554	urls += "?" + c.urlParams_.Encode()
14555	req, err := http.NewRequest("GET", urls, body)
14556	if err != nil {
14557		return nil, err
14558	}
14559	req.Header = reqHeaders
14560	googleapi.Expand(req.URL, map[string]string{
14561		"profileId": strconv.FormatInt(c.profileId, 10),
14562		"id":        strconv.FormatInt(c.id, 10),
14563	})
14564	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14565}
14566
14567// Do executes the "dfareporting.accountPermissions.get" call.
14568// Exactly one of *AccountPermission or error will be non-nil. Any
14569// non-2xx status code is an error. Response headers are in either
14570// *AccountPermission.ServerResponse.Header or (if a response was
14571// returned at all) in error.(*googleapi.Error).Header. Use
14572// googleapi.IsNotModified to check whether the returned error was
14573// because http.StatusNotModified was returned.
14574func (c *AccountPermissionsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermission, error) {
14575	gensupport.SetOptions(c.urlParams_, opts...)
14576	res, err := c.doRequest("json")
14577	if res != nil && res.StatusCode == http.StatusNotModified {
14578		if res.Body != nil {
14579			res.Body.Close()
14580		}
14581		return nil, &googleapi.Error{
14582			Code:   res.StatusCode,
14583			Header: res.Header,
14584		}
14585	}
14586	if err != nil {
14587		return nil, err
14588	}
14589	defer googleapi.CloseBody(res)
14590	if err := googleapi.CheckResponse(res); err != nil {
14591		return nil, err
14592	}
14593	ret := &AccountPermission{
14594		ServerResponse: googleapi.ServerResponse{
14595			Header:         res.Header,
14596			HTTPStatusCode: res.StatusCode,
14597		},
14598	}
14599	target := &ret
14600	if err := gensupport.DecodeResponse(target, res); err != nil {
14601		return nil, err
14602	}
14603	return ret, nil
14604	// {
14605	//   "description": "Gets one account permission by ID.",
14606	//   "httpMethod": "GET",
14607	//   "id": "dfareporting.accountPermissions.get",
14608	//   "parameterOrder": [
14609	//     "profileId",
14610	//     "id"
14611	//   ],
14612	//   "parameters": {
14613	//     "id": {
14614	//       "description": "Account permission ID.",
14615	//       "format": "int64",
14616	//       "location": "path",
14617	//       "required": true,
14618	//       "type": "string"
14619	//     },
14620	//     "profileId": {
14621	//       "description": "User profile ID associated with this request.",
14622	//       "format": "int64",
14623	//       "location": "path",
14624	//       "required": true,
14625	//       "type": "string"
14626	//     }
14627	//   },
14628	//   "path": "userprofiles/{profileId}/accountPermissions/{id}",
14629	//   "response": {
14630	//     "$ref": "AccountPermission"
14631	//   },
14632	//   "scopes": [
14633	//     "https://www.googleapis.com/auth/dfatrafficking"
14634	//   ]
14635	// }
14636
14637}
14638
14639// method id "dfareporting.accountPermissions.list":
14640
14641type AccountPermissionsListCall struct {
14642	s            *Service
14643	profileId    int64
14644	urlParams_   gensupport.URLParams
14645	ifNoneMatch_ string
14646	ctx_         context.Context
14647	header_      http.Header
14648}
14649
14650// List: Retrieves the list of account permissions.
14651func (r *AccountPermissionsService) List(profileId int64) *AccountPermissionsListCall {
14652	c := &AccountPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14653	c.profileId = profileId
14654	return c
14655}
14656
14657// Fields allows partial responses to be retrieved. See
14658// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14659// for more information.
14660func (c *AccountPermissionsListCall) Fields(s ...googleapi.Field) *AccountPermissionsListCall {
14661	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14662	return c
14663}
14664
14665// IfNoneMatch sets the optional parameter which makes the operation
14666// fail if the object's ETag matches the given value. This is useful for
14667// getting updates only after the object has changed since the last
14668// request. Use googleapi.IsNotModified to check whether the response
14669// error from Do is the result of In-None-Match.
14670func (c *AccountPermissionsListCall) IfNoneMatch(entityTag string) *AccountPermissionsListCall {
14671	c.ifNoneMatch_ = entityTag
14672	return c
14673}
14674
14675// Context sets the context to be used in this call's Do method. Any
14676// pending HTTP request will be aborted if the provided context is
14677// canceled.
14678func (c *AccountPermissionsListCall) Context(ctx context.Context) *AccountPermissionsListCall {
14679	c.ctx_ = ctx
14680	return c
14681}
14682
14683// Header returns an http.Header that can be modified by the caller to
14684// add HTTP headers to the request.
14685func (c *AccountPermissionsListCall) Header() http.Header {
14686	if c.header_ == nil {
14687		c.header_ = make(http.Header)
14688	}
14689	return c.header_
14690}
14691
14692func (c *AccountPermissionsListCall) doRequest(alt string) (*http.Response, error) {
14693	reqHeaders := make(http.Header)
14694	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14695	for k, v := range c.header_ {
14696		reqHeaders[k] = v
14697	}
14698	reqHeaders.Set("User-Agent", c.s.userAgent())
14699	if c.ifNoneMatch_ != "" {
14700		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14701	}
14702	var body io.Reader = nil
14703	c.urlParams_.Set("alt", alt)
14704	c.urlParams_.Set("prettyPrint", "false")
14705	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions")
14706	urls += "?" + c.urlParams_.Encode()
14707	req, err := http.NewRequest("GET", urls, body)
14708	if err != nil {
14709		return nil, err
14710	}
14711	req.Header = reqHeaders
14712	googleapi.Expand(req.URL, map[string]string{
14713		"profileId": strconv.FormatInt(c.profileId, 10),
14714	})
14715	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14716}
14717
14718// Do executes the "dfareporting.accountPermissions.list" call.
14719// Exactly one of *AccountPermissionsListResponse or error will be
14720// non-nil. Any non-2xx status code is an error. Response headers are in
14721// either *AccountPermissionsListResponse.ServerResponse.Header or (if a
14722// response was returned at all) in error.(*googleapi.Error).Header. Use
14723// googleapi.IsNotModified to check whether the returned error was
14724// because http.StatusNotModified was returned.
14725func (c *AccountPermissionsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionsListResponse, error) {
14726	gensupport.SetOptions(c.urlParams_, opts...)
14727	res, err := c.doRequest("json")
14728	if res != nil && res.StatusCode == http.StatusNotModified {
14729		if res.Body != nil {
14730			res.Body.Close()
14731		}
14732		return nil, &googleapi.Error{
14733			Code:   res.StatusCode,
14734			Header: res.Header,
14735		}
14736	}
14737	if err != nil {
14738		return nil, err
14739	}
14740	defer googleapi.CloseBody(res)
14741	if err := googleapi.CheckResponse(res); err != nil {
14742		return nil, err
14743	}
14744	ret := &AccountPermissionsListResponse{
14745		ServerResponse: googleapi.ServerResponse{
14746			Header:         res.Header,
14747			HTTPStatusCode: res.StatusCode,
14748		},
14749	}
14750	target := &ret
14751	if err := gensupport.DecodeResponse(target, res); err != nil {
14752		return nil, err
14753	}
14754	return ret, nil
14755	// {
14756	//   "description": "Retrieves the list of account permissions.",
14757	//   "httpMethod": "GET",
14758	//   "id": "dfareporting.accountPermissions.list",
14759	//   "parameterOrder": [
14760	//     "profileId"
14761	//   ],
14762	//   "parameters": {
14763	//     "profileId": {
14764	//       "description": "User profile ID associated with this request.",
14765	//       "format": "int64",
14766	//       "location": "path",
14767	//       "required": true,
14768	//       "type": "string"
14769	//     }
14770	//   },
14771	//   "path": "userprofiles/{profileId}/accountPermissions",
14772	//   "response": {
14773	//     "$ref": "AccountPermissionsListResponse"
14774	//   },
14775	//   "scopes": [
14776	//     "https://www.googleapis.com/auth/dfatrafficking"
14777	//   ]
14778	// }
14779
14780}
14781
14782// method id "dfareporting.accountUserProfiles.get":
14783
14784type AccountUserProfilesGetCall struct {
14785	s            *Service
14786	profileId    int64
14787	id           int64
14788	urlParams_   gensupport.URLParams
14789	ifNoneMatch_ string
14790	ctx_         context.Context
14791	header_      http.Header
14792}
14793
14794// Get: Gets one account user profile by ID.
14795func (r *AccountUserProfilesService) Get(profileId int64, id int64) *AccountUserProfilesGetCall {
14796	c := &AccountUserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14797	c.profileId = profileId
14798	c.id = id
14799	return c
14800}
14801
14802// Fields allows partial responses to be retrieved. See
14803// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14804// for more information.
14805func (c *AccountUserProfilesGetCall) Fields(s ...googleapi.Field) *AccountUserProfilesGetCall {
14806	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14807	return c
14808}
14809
14810// IfNoneMatch sets the optional parameter which makes the operation
14811// fail if the object's ETag matches the given value. This is useful for
14812// getting updates only after the object has changed since the last
14813// request. Use googleapi.IsNotModified to check whether the response
14814// error from Do is the result of In-None-Match.
14815func (c *AccountUserProfilesGetCall) IfNoneMatch(entityTag string) *AccountUserProfilesGetCall {
14816	c.ifNoneMatch_ = entityTag
14817	return c
14818}
14819
14820// Context sets the context to be used in this call's Do method. Any
14821// pending HTTP request will be aborted if the provided context is
14822// canceled.
14823func (c *AccountUserProfilesGetCall) Context(ctx context.Context) *AccountUserProfilesGetCall {
14824	c.ctx_ = ctx
14825	return c
14826}
14827
14828// Header returns an http.Header that can be modified by the caller to
14829// add HTTP headers to the request.
14830func (c *AccountUserProfilesGetCall) Header() http.Header {
14831	if c.header_ == nil {
14832		c.header_ = make(http.Header)
14833	}
14834	return c.header_
14835}
14836
14837func (c *AccountUserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
14838	reqHeaders := make(http.Header)
14839	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14840	for k, v := range c.header_ {
14841		reqHeaders[k] = v
14842	}
14843	reqHeaders.Set("User-Agent", c.s.userAgent())
14844	if c.ifNoneMatch_ != "" {
14845		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14846	}
14847	var body io.Reader = nil
14848	c.urlParams_.Set("alt", alt)
14849	c.urlParams_.Set("prettyPrint", "false")
14850	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles/{id}")
14851	urls += "?" + c.urlParams_.Encode()
14852	req, err := http.NewRequest("GET", urls, body)
14853	if err != nil {
14854		return nil, err
14855	}
14856	req.Header = reqHeaders
14857	googleapi.Expand(req.URL, map[string]string{
14858		"profileId": strconv.FormatInt(c.profileId, 10),
14859		"id":        strconv.FormatInt(c.id, 10),
14860	})
14861	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14862}
14863
14864// Do executes the "dfareporting.accountUserProfiles.get" call.
14865// Exactly one of *AccountUserProfile or error will be non-nil. Any
14866// non-2xx status code is an error. Response headers are in either
14867// *AccountUserProfile.ServerResponse.Header or (if a response was
14868// returned at all) in error.(*googleapi.Error).Header. Use
14869// googleapi.IsNotModified to check whether the returned error was
14870// because http.StatusNotModified was returned.
14871func (c *AccountUserProfilesGetCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
14872	gensupport.SetOptions(c.urlParams_, opts...)
14873	res, err := c.doRequest("json")
14874	if res != nil && res.StatusCode == http.StatusNotModified {
14875		if res.Body != nil {
14876			res.Body.Close()
14877		}
14878		return nil, &googleapi.Error{
14879			Code:   res.StatusCode,
14880			Header: res.Header,
14881		}
14882	}
14883	if err != nil {
14884		return nil, err
14885	}
14886	defer googleapi.CloseBody(res)
14887	if err := googleapi.CheckResponse(res); err != nil {
14888		return nil, err
14889	}
14890	ret := &AccountUserProfile{
14891		ServerResponse: googleapi.ServerResponse{
14892			Header:         res.Header,
14893			HTTPStatusCode: res.StatusCode,
14894		},
14895	}
14896	target := &ret
14897	if err := gensupport.DecodeResponse(target, res); err != nil {
14898		return nil, err
14899	}
14900	return ret, nil
14901	// {
14902	//   "description": "Gets one account user profile by ID.",
14903	//   "httpMethod": "GET",
14904	//   "id": "dfareporting.accountUserProfiles.get",
14905	//   "parameterOrder": [
14906	//     "profileId",
14907	//     "id"
14908	//   ],
14909	//   "parameters": {
14910	//     "id": {
14911	//       "description": "User profile ID.",
14912	//       "format": "int64",
14913	//       "location": "path",
14914	//       "required": true,
14915	//       "type": "string"
14916	//     },
14917	//     "profileId": {
14918	//       "description": "User profile ID associated with this request.",
14919	//       "format": "int64",
14920	//       "location": "path",
14921	//       "required": true,
14922	//       "type": "string"
14923	//     }
14924	//   },
14925	//   "path": "userprofiles/{profileId}/accountUserProfiles/{id}",
14926	//   "response": {
14927	//     "$ref": "AccountUserProfile"
14928	//   },
14929	//   "scopes": [
14930	//     "https://www.googleapis.com/auth/dfatrafficking"
14931	//   ]
14932	// }
14933
14934}
14935
14936// method id "dfareporting.accountUserProfiles.insert":
14937
14938type AccountUserProfilesInsertCall struct {
14939	s                  *Service
14940	profileId          int64
14941	accountuserprofile *AccountUserProfile
14942	urlParams_         gensupport.URLParams
14943	ctx_               context.Context
14944	header_            http.Header
14945}
14946
14947// Insert: Inserts a new account user profile.
14948func (r *AccountUserProfilesService) Insert(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesInsertCall {
14949	c := &AccountUserProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14950	c.profileId = profileId
14951	c.accountuserprofile = accountuserprofile
14952	return c
14953}
14954
14955// Fields allows partial responses to be retrieved. See
14956// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14957// for more information.
14958func (c *AccountUserProfilesInsertCall) Fields(s ...googleapi.Field) *AccountUserProfilesInsertCall {
14959	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14960	return c
14961}
14962
14963// Context sets the context to be used in this call's Do method. Any
14964// pending HTTP request will be aborted if the provided context is
14965// canceled.
14966func (c *AccountUserProfilesInsertCall) Context(ctx context.Context) *AccountUserProfilesInsertCall {
14967	c.ctx_ = ctx
14968	return c
14969}
14970
14971// Header returns an http.Header that can be modified by the caller to
14972// add HTTP headers to the request.
14973func (c *AccountUserProfilesInsertCall) Header() http.Header {
14974	if c.header_ == nil {
14975		c.header_ = make(http.Header)
14976	}
14977	return c.header_
14978}
14979
14980func (c *AccountUserProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
14981	reqHeaders := make(http.Header)
14982	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14983	for k, v := range c.header_ {
14984		reqHeaders[k] = v
14985	}
14986	reqHeaders.Set("User-Agent", c.s.userAgent())
14987	var body io.Reader = nil
14988	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
14989	if err != nil {
14990		return nil, err
14991	}
14992	reqHeaders.Set("Content-Type", "application/json")
14993	c.urlParams_.Set("alt", alt)
14994	c.urlParams_.Set("prettyPrint", "false")
14995	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
14996	urls += "?" + c.urlParams_.Encode()
14997	req, err := http.NewRequest("POST", urls, body)
14998	if err != nil {
14999		return nil, err
15000	}
15001	req.Header = reqHeaders
15002	googleapi.Expand(req.URL, map[string]string{
15003		"profileId": strconv.FormatInt(c.profileId, 10),
15004	})
15005	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15006}
15007
15008// Do executes the "dfareporting.accountUserProfiles.insert" call.
15009// Exactly one of *AccountUserProfile or error will be non-nil. Any
15010// non-2xx status code is an error. Response headers are in either
15011// *AccountUserProfile.ServerResponse.Header or (if a response was
15012// returned at all) in error.(*googleapi.Error).Header. Use
15013// googleapi.IsNotModified to check whether the returned error was
15014// because http.StatusNotModified was returned.
15015func (c *AccountUserProfilesInsertCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15016	gensupport.SetOptions(c.urlParams_, opts...)
15017	res, err := c.doRequest("json")
15018	if res != nil && res.StatusCode == http.StatusNotModified {
15019		if res.Body != nil {
15020			res.Body.Close()
15021		}
15022		return nil, &googleapi.Error{
15023			Code:   res.StatusCode,
15024			Header: res.Header,
15025		}
15026	}
15027	if err != nil {
15028		return nil, err
15029	}
15030	defer googleapi.CloseBody(res)
15031	if err := googleapi.CheckResponse(res); err != nil {
15032		return nil, err
15033	}
15034	ret := &AccountUserProfile{
15035		ServerResponse: googleapi.ServerResponse{
15036			Header:         res.Header,
15037			HTTPStatusCode: res.StatusCode,
15038		},
15039	}
15040	target := &ret
15041	if err := gensupport.DecodeResponse(target, res); err != nil {
15042		return nil, err
15043	}
15044	return ret, nil
15045	// {
15046	//   "description": "Inserts a new account user profile.",
15047	//   "httpMethod": "POST",
15048	//   "id": "dfareporting.accountUserProfiles.insert",
15049	//   "parameterOrder": [
15050	//     "profileId"
15051	//   ],
15052	//   "parameters": {
15053	//     "profileId": {
15054	//       "description": "User profile ID associated with this request.",
15055	//       "format": "int64",
15056	//       "location": "path",
15057	//       "required": true,
15058	//       "type": "string"
15059	//     }
15060	//   },
15061	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15062	//   "request": {
15063	//     "$ref": "AccountUserProfile"
15064	//   },
15065	//   "response": {
15066	//     "$ref": "AccountUserProfile"
15067	//   },
15068	//   "scopes": [
15069	//     "https://www.googleapis.com/auth/dfatrafficking"
15070	//   ]
15071	// }
15072
15073}
15074
15075// method id "dfareporting.accountUserProfiles.list":
15076
15077type AccountUserProfilesListCall struct {
15078	s            *Service
15079	profileId    int64
15080	urlParams_   gensupport.URLParams
15081	ifNoneMatch_ string
15082	ctx_         context.Context
15083	header_      http.Header
15084}
15085
15086// List: Retrieves a list of account user profiles, possibly filtered.
15087// This method supports paging.
15088func (r *AccountUserProfilesService) List(profileId int64) *AccountUserProfilesListCall {
15089	c := &AccountUserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15090	c.profileId = profileId
15091	return c
15092}
15093
15094// Active sets the optional parameter "active": Select only active user
15095// profiles.
15096func (c *AccountUserProfilesListCall) Active(active bool) *AccountUserProfilesListCall {
15097	c.urlParams_.Set("active", fmt.Sprint(active))
15098	return c
15099}
15100
15101// Ids sets the optional parameter "ids": Select only user profiles with
15102// these IDs.
15103func (c *AccountUserProfilesListCall) Ids(ids ...int64) *AccountUserProfilesListCall {
15104	var ids_ []string
15105	for _, v := range ids {
15106		ids_ = append(ids_, fmt.Sprint(v))
15107	}
15108	c.urlParams_.SetMulti("ids", ids_)
15109	return c
15110}
15111
15112// MaxResults sets the optional parameter "maxResults": Maximum number
15113// of results to return.
15114func (c *AccountUserProfilesListCall) MaxResults(maxResults int64) *AccountUserProfilesListCall {
15115	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15116	return c
15117}
15118
15119// PageToken sets the optional parameter "pageToken": Value of the
15120// nextPageToken from the previous result page.
15121func (c *AccountUserProfilesListCall) PageToken(pageToken string) *AccountUserProfilesListCall {
15122	c.urlParams_.Set("pageToken", pageToken)
15123	return c
15124}
15125
15126// SearchString sets the optional parameter "searchString": Allows
15127// searching for objects by name, ID or email. Wildcards (*) are
15128// allowed. For example, "user profile*2015" will return objects with
15129// names like "user profile June 2015", "user profile April 2015", or
15130// simply "user profile 2015". Most of the searches also add wildcards
15131// implicitly at the start and the end of the search string. For
15132// example, a search string of "user profile" will match objects with
15133// name "my user profile", "user profile 2015", or simply "user
15134// profile".
15135func (c *AccountUserProfilesListCall) SearchString(searchString string) *AccountUserProfilesListCall {
15136	c.urlParams_.Set("searchString", searchString)
15137	return c
15138}
15139
15140// SortField sets the optional parameter "sortField": Field by which to
15141// sort the list.
15142//
15143// Possible values:
15144//   "ID" (default)
15145//   "NAME"
15146func (c *AccountUserProfilesListCall) SortField(sortField string) *AccountUserProfilesListCall {
15147	c.urlParams_.Set("sortField", sortField)
15148	return c
15149}
15150
15151// SortOrder sets the optional parameter "sortOrder": Order of sorted
15152// results.
15153//
15154// Possible values:
15155//   "ASCENDING" (default)
15156//   "DESCENDING"
15157func (c *AccountUserProfilesListCall) SortOrder(sortOrder string) *AccountUserProfilesListCall {
15158	c.urlParams_.Set("sortOrder", sortOrder)
15159	return c
15160}
15161
15162// SubaccountId sets the optional parameter "subaccountId": Select only
15163// user profiles with the specified subaccount ID.
15164func (c *AccountUserProfilesListCall) SubaccountId(subaccountId int64) *AccountUserProfilesListCall {
15165	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
15166	return c
15167}
15168
15169// UserRoleId sets the optional parameter "userRoleId": Select only user
15170// profiles with the specified user role ID.
15171func (c *AccountUserProfilesListCall) UserRoleId(userRoleId int64) *AccountUserProfilesListCall {
15172	c.urlParams_.Set("userRoleId", fmt.Sprint(userRoleId))
15173	return c
15174}
15175
15176// Fields allows partial responses to be retrieved. See
15177// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15178// for more information.
15179func (c *AccountUserProfilesListCall) Fields(s ...googleapi.Field) *AccountUserProfilesListCall {
15180	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15181	return c
15182}
15183
15184// IfNoneMatch sets the optional parameter which makes the operation
15185// fail if the object's ETag matches the given value. This is useful for
15186// getting updates only after the object has changed since the last
15187// request. Use googleapi.IsNotModified to check whether the response
15188// error from Do is the result of In-None-Match.
15189func (c *AccountUserProfilesListCall) IfNoneMatch(entityTag string) *AccountUserProfilesListCall {
15190	c.ifNoneMatch_ = entityTag
15191	return c
15192}
15193
15194// Context sets the context to be used in this call's Do method. Any
15195// pending HTTP request will be aborted if the provided context is
15196// canceled.
15197func (c *AccountUserProfilesListCall) Context(ctx context.Context) *AccountUserProfilesListCall {
15198	c.ctx_ = ctx
15199	return c
15200}
15201
15202// Header returns an http.Header that can be modified by the caller to
15203// add HTTP headers to the request.
15204func (c *AccountUserProfilesListCall) Header() http.Header {
15205	if c.header_ == nil {
15206		c.header_ = make(http.Header)
15207	}
15208	return c.header_
15209}
15210
15211func (c *AccountUserProfilesListCall) doRequest(alt string) (*http.Response, error) {
15212	reqHeaders := make(http.Header)
15213	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
15214	for k, v := range c.header_ {
15215		reqHeaders[k] = v
15216	}
15217	reqHeaders.Set("User-Agent", c.s.userAgent())
15218	if c.ifNoneMatch_ != "" {
15219		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15220	}
15221	var body io.Reader = nil
15222	c.urlParams_.Set("alt", alt)
15223	c.urlParams_.Set("prettyPrint", "false")
15224	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15225	urls += "?" + c.urlParams_.Encode()
15226	req, err := http.NewRequest("GET", urls, body)
15227	if err != nil {
15228		return nil, err
15229	}
15230	req.Header = reqHeaders
15231	googleapi.Expand(req.URL, map[string]string{
15232		"profileId": strconv.FormatInt(c.profileId, 10),
15233	})
15234	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15235}
15236
15237// Do executes the "dfareporting.accountUserProfiles.list" call.
15238// Exactly one of *AccountUserProfilesListResponse or error will be
15239// non-nil. Any non-2xx status code is an error. Response headers are in
15240// either *AccountUserProfilesListResponse.ServerResponse.Header or (if
15241// a response was returned at all) in error.(*googleapi.Error).Header.
15242// Use googleapi.IsNotModified to check whether the returned error was
15243// because http.StatusNotModified was returned.
15244func (c *AccountUserProfilesListCall) Do(opts ...googleapi.CallOption) (*AccountUserProfilesListResponse, error) {
15245	gensupport.SetOptions(c.urlParams_, opts...)
15246	res, err := c.doRequest("json")
15247	if res != nil && res.StatusCode == http.StatusNotModified {
15248		if res.Body != nil {
15249			res.Body.Close()
15250		}
15251		return nil, &googleapi.Error{
15252			Code:   res.StatusCode,
15253			Header: res.Header,
15254		}
15255	}
15256	if err != nil {
15257		return nil, err
15258	}
15259	defer googleapi.CloseBody(res)
15260	if err := googleapi.CheckResponse(res); err != nil {
15261		return nil, err
15262	}
15263	ret := &AccountUserProfilesListResponse{
15264		ServerResponse: googleapi.ServerResponse{
15265			Header:         res.Header,
15266			HTTPStatusCode: res.StatusCode,
15267		},
15268	}
15269	target := &ret
15270	if err := gensupport.DecodeResponse(target, res); err != nil {
15271		return nil, err
15272	}
15273	return ret, nil
15274	// {
15275	//   "description": "Retrieves a list of account user profiles, possibly filtered. This method supports paging.",
15276	//   "httpMethod": "GET",
15277	//   "id": "dfareporting.accountUserProfiles.list",
15278	//   "parameterOrder": [
15279	//     "profileId"
15280	//   ],
15281	//   "parameters": {
15282	//     "active": {
15283	//       "description": "Select only active user profiles.",
15284	//       "location": "query",
15285	//       "type": "boolean"
15286	//     },
15287	//     "ids": {
15288	//       "description": "Select only user profiles with these IDs.",
15289	//       "format": "int64",
15290	//       "location": "query",
15291	//       "repeated": true,
15292	//       "type": "string"
15293	//     },
15294	//     "maxResults": {
15295	//       "default": "1000",
15296	//       "description": "Maximum number of results to return.",
15297	//       "format": "int32",
15298	//       "location": "query",
15299	//       "maximum": "1000",
15300	//       "minimum": "0",
15301	//       "type": "integer"
15302	//     },
15303	//     "pageToken": {
15304	//       "description": "Value of the nextPageToken from the previous result page.",
15305	//       "location": "query",
15306	//       "type": "string"
15307	//     },
15308	//     "profileId": {
15309	//       "description": "User profile ID associated with this request.",
15310	//       "format": "int64",
15311	//       "location": "path",
15312	//       "required": true,
15313	//       "type": "string"
15314	//     },
15315	//     "searchString": {
15316	//       "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\".",
15317	//       "location": "query",
15318	//       "type": "string"
15319	//     },
15320	//     "sortField": {
15321	//       "default": "ID",
15322	//       "description": "Field by which to sort the list.",
15323	//       "enum": [
15324	//         "ID",
15325	//         "NAME"
15326	//       ],
15327	//       "enumDescriptions": [
15328	//         "",
15329	//         ""
15330	//       ],
15331	//       "location": "query",
15332	//       "type": "string"
15333	//     },
15334	//     "sortOrder": {
15335	//       "default": "ASCENDING",
15336	//       "description": "Order of sorted results.",
15337	//       "enum": [
15338	//         "ASCENDING",
15339	//         "DESCENDING"
15340	//       ],
15341	//       "enumDescriptions": [
15342	//         "",
15343	//         ""
15344	//       ],
15345	//       "location": "query",
15346	//       "type": "string"
15347	//     },
15348	//     "subaccountId": {
15349	//       "description": "Select only user profiles with the specified subaccount ID.",
15350	//       "format": "int64",
15351	//       "location": "query",
15352	//       "type": "string"
15353	//     },
15354	//     "userRoleId": {
15355	//       "description": "Select only user profiles with the specified user role ID.",
15356	//       "format": "int64",
15357	//       "location": "query",
15358	//       "type": "string"
15359	//     }
15360	//   },
15361	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15362	//   "response": {
15363	//     "$ref": "AccountUserProfilesListResponse"
15364	//   },
15365	//   "scopes": [
15366	//     "https://www.googleapis.com/auth/dfatrafficking"
15367	//   ]
15368	// }
15369
15370}
15371
15372// Pages invokes f for each page of results.
15373// A non-nil error returned from f will halt the iteration.
15374// The provided context supersedes any context provided to the Context method.
15375func (c *AccountUserProfilesListCall) Pages(ctx context.Context, f func(*AccountUserProfilesListResponse) error) error {
15376	c.ctx_ = ctx
15377	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15378	for {
15379		x, err := c.Do()
15380		if err != nil {
15381			return err
15382		}
15383		if err := f(x); err != nil {
15384			return err
15385		}
15386		if x.NextPageToken == "" {
15387			return nil
15388		}
15389		c.PageToken(x.NextPageToken)
15390	}
15391}
15392
15393// method id "dfareporting.accountUserProfiles.patch":
15394
15395type AccountUserProfilesPatchCall struct {
15396	s                  *Service
15397	profileId          int64
15398	accountuserprofile *AccountUserProfile
15399	urlParams_         gensupport.URLParams
15400	ctx_               context.Context
15401	header_            http.Header
15402}
15403
15404// Patch: Updates an existing account user profile. This method supports
15405// patch semantics.
15406func (r *AccountUserProfilesService) Patch(profileId int64, id int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesPatchCall {
15407	c := &AccountUserProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15408	c.profileId = profileId
15409	c.urlParams_.Set("id", fmt.Sprint(id))
15410	c.accountuserprofile = accountuserprofile
15411	return c
15412}
15413
15414// Fields allows partial responses to be retrieved. See
15415// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15416// for more information.
15417func (c *AccountUserProfilesPatchCall) Fields(s ...googleapi.Field) *AccountUserProfilesPatchCall {
15418	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15419	return c
15420}
15421
15422// Context sets the context to be used in this call's Do method. Any
15423// pending HTTP request will be aborted if the provided context is
15424// canceled.
15425func (c *AccountUserProfilesPatchCall) Context(ctx context.Context) *AccountUserProfilesPatchCall {
15426	c.ctx_ = ctx
15427	return c
15428}
15429
15430// Header returns an http.Header that can be modified by the caller to
15431// add HTTP headers to the request.
15432func (c *AccountUserProfilesPatchCall) Header() http.Header {
15433	if c.header_ == nil {
15434		c.header_ = make(http.Header)
15435	}
15436	return c.header_
15437}
15438
15439func (c *AccountUserProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
15440	reqHeaders := make(http.Header)
15441	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
15442	for k, v := range c.header_ {
15443		reqHeaders[k] = v
15444	}
15445	reqHeaders.Set("User-Agent", c.s.userAgent())
15446	var body io.Reader = nil
15447	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15448	if err != nil {
15449		return nil, err
15450	}
15451	reqHeaders.Set("Content-Type", "application/json")
15452	c.urlParams_.Set("alt", alt)
15453	c.urlParams_.Set("prettyPrint", "false")
15454	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15455	urls += "?" + c.urlParams_.Encode()
15456	req, err := http.NewRequest("PATCH", urls, body)
15457	if err != nil {
15458		return nil, err
15459	}
15460	req.Header = reqHeaders
15461	googleapi.Expand(req.URL, map[string]string{
15462		"profileId": strconv.FormatInt(c.profileId, 10),
15463	})
15464	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15465}
15466
15467// Do executes the "dfareporting.accountUserProfiles.patch" call.
15468// Exactly one of *AccountUserProfile or error will be non-nil. Any
15469// non-2xx status code is an error. Response headers are in either
15470// *AccountUserProfile.ServerResponse.Header or (if a response was
15471// returned at all) in error.(*googleapi.Error).Header. Use
15472// googleapi.IsNotModified to check whether the returned error was
15473// because http.StatusNotModified was returned.
15474func (c *AccountUserProfilesPatchCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15475	gensupport.SetOptions(c.urlParams_, opts...)
15476	res, err := c.doRequest("json")
15477	if res != nil && res.StatusCode == http.StatusNotModified {
15478		if res.Body != nil {
15479			res.Body.Close()
15480		}
15481		return nil, &googleapi.Error{
15482			Code:   res.StatusCode,
15483			Header: res.Header,
15484		}
15485	}
15486	if err != nil {
15487		return nil, err
15488	}
15489	defer googleapi.CloseBody(res)
15490	if err := googleapi.CheckResponse(res); err != nil {
15491		return nil, err
15492	}
15493	ret := &AccountUserProfile{
15494		ServerResponse: googleapi.ServerResponse{
15495			Header:         res.Header,
15496			HTTPStatusCode: res.StatusCode,
15497		},
15498	}
15499	target := &ret
15500	if err := gensupport.DecodeResponse(target, res); err != nil {
15501		return nil, err
15502	}
15503	return ret, nil
15504	// {
15505	//   "description": "Updates an existing account user profile. This method supports patch semantics.",
15506	//   "httpMethod": "PATCH",
15507	//   "id": "dfareporting.accountUserProfiles.patch",
15508	//   "parameterOrder": [
15509	//     "profileId",
15510	//     "id"
15511	//   ],
15512	//   "parameters": {
15513	//     "id": {
15514	//       "description": "User profile ID.",
15515	//       "format": "int64",
15516	//       "location": "query",
15517	//       "required": true,
15518	//       "type": "string"
15519	//     },
15520	//     "profileId": {
15521	//       "description": "User profile ID associated with this request.",
15522	//       "format": "int64",
15523	//       "location": "path",
15524	//       "required": true,
15525	//       "type": "string"
15526	//     }
15527	//   },
15528	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15529	//   "request": {
15530	//     "$ref": "AccountUserProfile"
15531	//   },
15532	//   "response": {
15533	//     "$ref": "AccountUserProfile"
15534	//   },
15535	//   "scopes": [
15536	//     "https://www.googleapis.com/auth/dfatrafficking"
15537	//   ]
15538	// }
15539
15540}
15541
15542// method id "dfareporting.accountUserProfiles.update":
15543
15544type AccountUserProfilesUpdateCall struct {
15545	s                  *Service
15546	profileId          int64
15547	accountuserprofile *AccountUserProfile
15548	urlParams_         gensupport.URLParams
15549	ctx_               context.Context
15550	header_            http.Header
15551}
15552
15553// Update: Updates an existing account user profile.
15554func (r *AccountUserProfilesService) Update(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesUpdateCall {
15555	c := &AccountUserProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15556	c.profileId = profileId
15557	c.accountuserprofile = accountuserprofile
15558	return c
15559}
15560
15561// Fields allows partial responses to be retrieved. See
15562// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15563// for more information.
15564func (c *AccountUserProfilesUpdateCall) Fields(s ...googleapi.Field) *AccountUserProfilesUpdateCall {
15565	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15566	return c
15567}
15568
15569// Context sets the context to be used in this call's Do method. Any
15570// pending HTTP request will be aborted if the provided context is
15571// canceled.
15572func (c *AccountUserProfilesUpdateCall) Context(ctx context.Context) *AccountUserProfilesUpdateCall {
15573	c.ctx_ = ctx
15574	return c
15575}
15576
15577// Header returns an http.Header that can be modified by the caller to
15578// add HTTP headers to the request.
15579func (c *AccountUserProfilesUpdateCall) Header() http.Header {
15580	if c.header_ == nil {
15581		c.header_ = make(http.Header)
15582	}
15583	return c.header_
15584}
15585
15586func (c *AccountUserProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
15587	reqHeaders := make(http.Header)
15588	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
15589	for k, v := range c.header_ {
15590		reqHeaders[k] = v
15591	}
15592	reqHeaders.Set("User-Agent", c.s.userAgent())
15593	var body io.Reader = nil
15594	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15595	if err != nil {
15596		return nil, err
15597	}
15598	reqHeaders.Set("Content-Type", "application/json")
15599	c.urlParams_.Set("alt", alt)
15600	c.urlParams_.Set("prettyPrint", "false")
15601	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15602	urls += "?" + c.urlParams_.Encode()
15603	req, err := http.NewRequest("PUT", urls, body)
15604	if err != nil {
15605		return nil, err
15606	}
15607	req.Header = reqHeaders
15608	googleapi.Expand(req.URL, map[string]string{
15609		"profileId": strconv.FormatInt(c.profileId, 10),
15610	})
15611	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15612}
15613
15614// Do executes the "dfareporting.accountUserProfiles.update" call.
15615// Exactly one of *AccountUserProfile or error will be non-nil. Any
15616// non-2xx status code is an error. Response headers are in either
15617// *AccountUserProfile.ServerResponse.Header or (if a response was
15618// returned at all) in error.(*googleapi.Error).Header. Use
15619// googleapi.IsNotModified to check whether the returned error was
15620// because http.StatusNotModified was returned.
15621func (c *AccountUserProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15622	gensupport.SetOptions(c.urlParams_, opts...)
15623	res, err := c.doRequest("json")
15624	if res != nil && res.StatusCode == http.StatusNotModified {
15625		if res.Body != nil {
15626			res.Body.Close()
15627		}
15628		return nil, &googleapi.Error{
15629			Code:   res.StatusCode,
15630			Header: res.Header,
15631		}
15632	}
15633	if err != nil {
15634		return nil, err
15635	}
15636	defer googleapi.CloseBody(res)
15637	if err := googleapi.CheckResponse(res); err != nil {
15638		return nil, err
15639	}
15640	ret := &AccountUserProfile{
15641		ServerResponse: googleapi.ServerResponse{
15642			Header:         res.Header,
15643			HTTPStatusCode: res.StatusCode,
15644		},
15645	}
15646	target := &ret
15647	if err := gensupport.DecodeResponse(target, res); err != nil {
15648		return nil, err
15649	}
15650	return ret, nil
15651	// {
15652	//   "description": "Updates an existing account user profile.",
15653	//   "httpMethod": "PUT",
15654	//   "id": "dfareporting.accountUserProfiles.update",
15655	//   "parameterOrder": [
15656	//     "profileId"
15657	//   ],
15658	//   "parameters": {
15659	//     "profileId": {
15660	//       "description": "User profile ID associated with this request.",
15661	//       "format": "int64",
15662	//       "location": "path",
15663	//       "required": true,
15664	//       "type": "string"
15665	//     }
15666	//   },
15667	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15668	//   "request": {
15669	//     "$ref": "AccountUserProfile"
15670	//   },
15671	//   "response": {
15672	//     "$ref": "AccountUserProfile"
15673	//   },
15674	//   "scopes": [
15675	//     "https://www.googleapis.com/auth/dfatrafficking"
15676	//   ]
15677	// }
15678
15679}
15680
15681// method id "dfareporting.accounts.get":
15682
15683type AccountsGetCall struct {
15684	s            *Service
15685	profileId    int64
15686	id           int64
15687	urlParams_   gensupport.URLParams
15688	ifNoneMatch_ string
15689	ctx_         context.Context
15690	header_      http.Header
15691}
15692
15693// Get: Gets one account by ID.
15694func (r *AccountsService) Get(profileId int64, id int64) *AccountsGetCall {
15695	c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15696	c.profileId = profileId
15697	c.id = id
15698	return c
15699}
15700
15701// Fields allows partial responses to be retrieved. See
15702// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15703// for more information.
15704func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
15705	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15706	return c
15707}
15708
15709// IfNoneMatch sets the optional parameter which makes the operation
15710// fail if the object's ETag matches the given value. This is useful for
15711// getting updates only after the object has changed since the last
15712// request. Use googleapi.IsNotModified to check whether the response
15713// error from Do is the result of In-None-Match.
15714func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
15715	c.ifNoneMatch_ = entityTag
15716	return c
15717}
15718
15719// Context sets the context to be used in this call's Do method. Any
15720// pending HTTP request will be aborted if the provided context is
15721// canceled.
15722func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
15723	c.ctx_ = ctx
15724	return c
15725}
15726
15727// Header returns an http.Header that can be modified by the caller to
15728// add HTTP headers to the request.
15729func (c *AccountsGetCall) Header() http.Header {
15730	if c.header_ == nil {
15731		c.header_ = make(http.Header)
15732	}
15733	return c.header_
15734}
15735
15736func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
15737	reqHeaders := make(http.Header)
15738	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
15739	for k, v := range c.header_ {
15740		reqHeaders[k] = v
15741	}
15742	reqHeaders.Set("User-Agent", c.s.userAgent())
15743	if c.ifNoneMatch_ != "" {
15744		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15745	}
15746	var body io.Reader = nil
15747	c.urlParams_.Set("alt", alt)
15748	c.urlParams_.Set("prettyPrint", "false")
15749	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts/{id}")
15750	urls += "?" + c.urlParams_.Encode()
15751	req, err := http.NewRequest("GET", urls, body)
15752	if err != nil {
15753		return nil, err
15754	}
15755	req.Header = reqHeaders
15756	googleapi.Expand(req.URL, map[string]string{
15757		"profileId": strconv.FormatInt(c.profileId, 10),
15758		"id":        strconv.FormatInt(c.id, 10),
15759	})
15760	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15761}
15762
15763// Do executes the "dfareporting.accounts.get" call.
15764// Exactly one of *Account or error will be non-nil. Any non-2xx status
15765// code is an error. Response headers are in either
15766// *Account.ServerResponse.Header or (if a response was returned at all)
15767// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15768// check whether the returned error was because http.StatusNotModified
15769// was returned.
15770func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
15771	gensupport.SetOptions(c.urlParams_, opts...)
15772	res, err := c.doRequest("json")
15773	if res != nil && res.StatusCode == http.StatusNotModified {
15774		if res.Body != nil {
15775			res.Body.Close()
15776		}
15777		return nil, &googleapi.Error{
15778			Code:   res.StatusCode,
15779			Header: res.Header,
15780		}
15781	}
15782	if err != nil {
15783		return nil, err
15784	}
15785	defer googleapi.CloseBody(res)
15786	if err := googleapi.CheckResponse(res); err != nil {
15787		return nil, err
15788	}
15789	ret := &Account{
15790		ServerResponse: googleapi.ServerResponse{
15791			Header:         res.Header,
15792			HTTPStatusCode: res.StatusCode,
15793		},
15794	}
15795	target := &ret
15796	if err := gensupport.DecodeResponse(target, res); err != nil {
15797		return nil, err
15798	}
15799	return ret, nil
15800	// {
15801	//   "description": "Gets one account by ID.",
15802	//   "httpMethod": "GET",
15803	//   "id": "dfareporting.accounts.get",
15804	//   "parameterOrder": [
15805	//     "profileId",
15806	//     "id"
15807	//   ],
15808	//   "parameters": {
15809	//     "id": {
15810	//       "description": "Account ID.",
15811	//       "format": "int64",
15812	//       "location": "path",
15813	//       "required": true,
15814	//       "type": "string"
15815	//     },
15816	//     "profileId": {
15817	//       "description": "User profile ID associated with this request.",
15818	//       "format": "int64",
15819	//       "location": "path",
15820	//       "required": true,
15821	//       "type": "string"
15822	//     }
15823	//   },
15824	//   "path": "userprofiles/{profileId}/accounts/{id}",
15825	//   "response": {
15826	//     "$ref": "Account"
15827	//   },
15828	//   "scopes": [
15829	//     "https://www.googleapis.com/auth/dfatrafficking"
15830	//   ]
15831	// }
15832
15833}
15834
15835// method id "dfareporting.accounts.list":
15836
15837type AccountsListCall struct {
15838	s            *Service
15839	profileId    int64
15840	urlParams_   gensupport.URLParams
15841	ifNoneMatch_ string
15842	ctx_         context.Context
15843	header_      http.Header
15844}
15845
15846// List: Retrieves the list of accounts, possibly filtered. This method
15847// supports paging.
15848func (r *AccountsService) List(profileId int64) *AccountsListCall {
15849	c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15850	c.profileId = profileId
15851	return c
15852}
15853
15854// Active sets the optional parameter "active": Select only active
15855// accounts. Don't set this field to select both active and non-active
15856// accounts.
15857func (c *AccountsListCall) Active(active bool) *AccountsListCall {
15858	c.urlParams_.Set("active", fmt.Sprint(active))
15859	return c
15860}
15861
15862// Ids sets the optional parameter "ids": Select only accounts with
15863// these IDs.
15864func (c *AccountsListCall) Ids(ids ...int64) *AccountsListCall {
15865	var ids_ []string
15866	for _, v := range ids {
15867		ids_ = append(ids_, fmt.Sprint(v))
15868	}
15869	c.urlParams_.SetMulti("ids", ids_)
15870	return c
15871}
15872
15873// MaxResults sets the optional parameter "maxResults": Maximum number
15874// of results to return.
15875func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
15876	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15877	return c
15878}
15879
15880// PageToken sets the optional parameter "pageToken": Value of the
15881// nextPageToken from the previous result page.
15882func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
15883	c.urlParams_.Set("pageToken", pageToken)
15884	return c
15885}
15886
15887// SearchString sets the optional parameter "searchString": Allows
15888// searching for objects by name or ID. Wildcards (*) are allowed. For
15889// example, "account*2015" will return objects with names like "account
15890// June 2015", "account April 2015", or simply "account 2015". Most of
15891// the searches also add wildcards implicitly at the start and the end
15892// of the search string. For example, a search string of "account" will
15893// match objects with name "my account", "account 2015", or simply
15894// "account".
15895func (c *AccountsListCall) SearchString(searchString string) *AccountsListCall {
15896	c.urlParams_.Set("searchString", searchString)
15897	return c
15898}
15899
15900// SortField sets the optional parameter "sortField": Field by which to
15901// sort the list.
15902//
15903// Possible values:
15904//   "ID" (default)
15905//   "NAME"
15906func (c *AccountsListCall) SortField(sortField string) *AccountsListCall {
15907	c.urlParams_.Set("sortField", sortField)
15908	return c
15909}
15910
15911// SortOrder sets the optional parameter "sortOrder": Order of sorted
15912// results.
15913//
15914// Possible values:
15915//   "ASCENDING" (default)
15916//   "DESCENDING"
15917func (c *AccountsListCall) SortOrder(sortOrder string) *AccountsListCall {
15918	c.urlParams_.Set("sortOrder", sortOrder)
15919	return c
15920}
15921
15922// Fields allows partial responses to be retrieved. See
15923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15924// for more information.
15925func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
15926	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15927	return c
15928}
15929
15930// IfNoneMatch sets the optional parameter which makes the operation
15931// fail if the object's ETag matches the given value. This is useful for
15932// getting updates only after the object has changed since the last
15933// request. Use googleapi.IsNotModified to check whether the response
15934// error from Do is the result of In-None-Match.
15935func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
15936	c.ifNoneMatch_ = entityTag
15937	return c
15938}
15939
15940// Context sets the context to be used in this call's Do method. Any
15941// pending HTTP request will be aborted if the provided context is
15942// canceled.
15943func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
15944	c.ctx_ = ctx
15945	return c
15946}
15947
15948// Header returns an http.Header that can be modified by the caller to
15949// add HTTP headers to the request.
15950func (c *AccountsListCall) Header() http.Header {
15951	if c.header_ == nil {
15952		c.header_ = make(http.Header)
15953	}
15954	return c.header_
15955}
15956
15957func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
15958	reqHeaders := make(http.Header)
15959	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
15960	for k, v := range c.header_ {
15961		reqHeaders[k] = v
15962	}
15963	reqHeaders.Set("User-Agent", c.s.userAgent())
15964	if c.ifNoneMatch_ != "" {
15965		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15966	}
15967	var body io.Reader = nil
15968	c.urlParams_.Set("alt", alt)
15969	c.urlParams_.Set("prettyPrint", "false")
15970	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
15971	urls += "?" + c.urlParams_.Encode()
15972	req, err := http.NewRequest("GET", urls, body)
15973	if err != nil {
15974		return nil, err
15975	}
15976	req.Header = reqHeaders
15977	googleapi.Expand(req.URL, map[string]string{
15978		"profileId": strconv.FormatInt(c.profileId, 10),
15979	})
15980	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15981}
15982
15983// Do executes the "dfareporting.accounts.list" call.
15984// Exactly one of *AccountsListResponse or error will be non-nil. Any
15985// non-2xx status code is an error. Response headers are in either
15986// *AccountsListResponse.ServerResponse.Header or (if a response was
15987// returned at all) in error.(*googleapi.Error).Header. Use
15988// googleapi.IsNotModified to check whether the returned error was
15989// because http.StatusNotModified was returned.
15990func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) {
15991	gensupport.SetOptions(c.urlParams_, opts...)
15992	res, err := c.doRequest("json")
15993	if res != nil && res.StatusCode == http.StatusNotModified {
15994		if res.Body != nil {
15995			res.Body.Close()
15996		}
15997		return nil, &googleapi.Error{
15998			Code:   res.StatusCode,
15999			Header: res.Header,
16000		}
16001	}
16002	if err != nil {
16003		return nil, err
16004	}
16005	defer googleapi.CloseBody(res)
16006	if err := googleapi.CheckResponse(res); err != nil {
16007		return nil, err
16008	}
16009	ret := &AccountsListResponse{
16010		ServerResponse: googleapi.ServerResponse{
16011			Header:         res.Header,
16012			HTTPStatusCode: res.StatusCode,
16013		},
16014	}
16015	target := &ret
16016	if err := gensupport.DecodeResponse(target, res); err != nil {
16017		return nil, err
16018	}
16019	return ret, nil
16020	// {
16021	//   "description": "Retrieves the list of accounts, possibly filtered. This method supports paging.",
16022	//   "httpMethod": "GET",
16023	//   "id": "dfareporting.accounts.list",
16024	//   "parameterOrder": [
16025	//     "profileId"
16026	//   ],
16027	//   "parameters": {
16028	//     "active": {
16029	//       "description": "Select only active accounts. Don't set this field to select both active and non-active accounts.",
16030	//       "location": "query",
16031	//       "type": "boolean"
16032	//     },
16033	//     "ids": {
16034	//       "description": "Select only accounts with these IDs.",
16035	//       "format": "int64",
16036	//       "location": "query",
16037	//       "repeated": true,
16038	//       "type": "string"
16039	//     },
16040	//     "maxResults": {
16041	//       "default": "1000",
16042	//       "description": "Maximum number of results to return.",
16043	//       "format": "int32",
16044	//       "location": "query",
16045	//       "maximum": "1000",
16046	//       "minimum": "0",
16047	//       "type": "integer"
16048	//     },
16049	//     "pageToken": {
16050	//       "description": "Value of the nextPageToken from the previous result page.",
16051	//       "location": "query",
16052	//       "type": "string"
16053	//     },
16054	//     "profileId": {
16055	//       "description": "User profile ID associated with this request.",
16056	//       "format": "int64",
16057	//       "location": "path",
16058	//       "required": true,
16059	//       "type": "string"
16060	//     },
16061	//     "searchString": {
16062	//       "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\".",
16063	//       "location": "query",
16064	//       "type": "string"
16065	//     },
16066	//     "sortField": {
16067	//       "default": "ID",
16068	//       "description": "Field by which to sort the list.",
16069	//       "enum": [
16070	//         "ID",
16071	//         "NAME"
16072	//       ],
16073	//       "enumDescriptions": [
16074	//         "",
16075	//         ""
16076	//       ],
16077	//       "location": "query",
16078	//       "type": "string"
16079	//     },
16080	//     "sortOrder": {
16081	//       "default": "ASCENDING",
16082	//       "description": "Order of sorted results.",
16083	//       "enum": [
16084	//         "ASCENDING",
16085	//         "DESCENDING"
16086	//       ],
16087	//       "enumDescriptions": [
16088	//         "",
16089	//         ""
16090	//       ],
16091	//       "location": "query",
16092	//       "type": "string"
16093	//     }
16094	//   },
16095	//   "path": "userprofiles/{profileId}/accounts",
16096	//   "response": {
16097	//     "$ref": "AccountsListResponse"
16098	//   },
16099	//   "scopes": [
16100	//     "https://www.googleapis.com/auth/dfatrafficking"
16101	//   ]
16102	// }
16103
16104}
16105
16106// Pages invokes f for each page of results.
16107// A non-nil error returned from f will halt the iteration.
16108// The provided context supersedes any context provided to the Context method.
16109func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error {
16110	c.ctx_ = ctx
16111	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16112	for {
16113		x, err := c.Do()
16114		if err != nil {
16115			return err
16116		}
16117		if err := f(x); err != nil {
16118			return err
16119		}
16120		if x.NextPageToken == "" {
16121			return nil
16122		}
16123		c.PageToken(x.NextPageToken)
16124	}
16125}
16126
16127// method id "dfareporting.accounts.patch":
16128
16129type AccountsPatchCall struct {
16130	s          *Service
16131	profileId  int64
16132	account    *Account
16133	urlParams_ gensupport.URLParams
16134	ctx_       context.Context
16135	header_    http.Header
16136}
16137
16138// Patch: Updates an existing account. This method supports patch
16139// semantics.
16140func (r *AccountsService) Patch(profileId int64, id int64, account *Account) *AccountsPatchCall {
16141	c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16142	c.profileId = profileId
16143	c.urlParams_.Set("id", fmt.Sprint(id))
16144	c.account = account
16145	return c
16146}
16147
16148// Fields allows partial responses to be retrieved. See
16149// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16150// for more information.
16151func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
16152	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16153	return c
16154}
16155
16156// Context sets the context to be used in this call's Do method. Any
16157// pending HTTP request will be aborted if the provided context is
16158// canceled.
16159func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
16160	c.ctx_ = ctx
16161	return c
16162}
16163
16164// Header returns an http.Header that can be modified by the caller to
16165// add HTTP headers to the request.
16166func (c *AccountsPatchCall) Header() http.Header {
16167	if c.header_ == nil {
16168		c.header_ = make(http.Header)
16169	}
16170	return c.header_
16171}
16172
16173func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
16174	reqHeaders := make(http.Header)
16175	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
16176	for k, v := range c.header_ {
16177		reqHeaders[k] = v
16178	}
16179	reqHeaders.Set("User-Agent", c.s.userAgent())
16180	var body io.Reader = nil
16181	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16182	if err != nil {
16183		return nil, err
16184	}
16185	reqHeaders.Set("Content-Type", "application/json")
16186	c.urlParams_.Set("alt", alt)
16187	c.urlParams_.Set("prettyPrint", "false")
16188	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16189	urls += "?" + c.urlParams_.Encode()
16190	req, err := http.NewRequest("PATCH", urls, body)
16191	if err != nil {
16192		return nil, err
16193	}
16194	req.Header = reqHeaders
16195	googleapi.Expand(req.URL, map[string]string{
16196		"profileId": strconv.FormatInt(c.profileId, 10),
16197	})
16198	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16199}
16200
16201// Do executes the "dfareporting.accounts.patch" call.
16202// Exactly one of *Account or error will be non-nil. Any non-2xx status
16203// code is an error. Response headers are in either
16204// *Account.ServerResponse.Header or (if a response was returned at all)
16205// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16206// check whether the returned error was because http.StatusNotModified
16207// was returned.
16208func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16209	gensupport.SetOptions(c.urlParams_, opts...)
16210	res, err := c.doRequest("json")
16211	if res != nil && res.StatusCode == http.StatusNotModified {
16212		if res.Body != nil {
16213			res.Body.Close()
16214		}
16215		return nil, &googleapi.Error{
16216			Code:   res.StatusCode,
16217			Header: res.Header,
16218		}
16219	}
16220	if err != nil {
16221		return nil, err
16222	}
16223	defer googleapi.CloseBody(res)
16224	if err := googleapi.CheckResponse(res); err != nil {
16225		return nil, err
16226	}
16227	ret := &Account{
16228		ServerResponse: googleapi.ServerResponse{
16229			Header:         res.Header,
16230			HTTPStatusCode: res.StatusCode,
16231		},
16232	}
16233	target := &ret
16234	if err := gensupport.DecodeResponse(target, res); err != nil {
16235		return nil, err
16236	}
16237	return ret, nil
16238	// {
16239	//   "description": "Updates an existing account. This method supports patch semantics.",
16240	//   "httpMethod": "PATCH",
16241	//   "id": "dfareporting.accounts.patch",
16242	//   "parameterOrder": [
16243	//     "profileId",
16244	//     "id"
16245	//   ],
16246	//   "parameters": {
16247	//     "id": {
16248	//       "description": "Account ID.",
16249	//       "format": "int64",
16250	//       "location": "query",
16251	//       "required": true,
16252	//       "type": "string"
16253	//     },
16254	//     "profileId": {
16255	//       "description": "User profile ID associated with this request.",
16256	//       "format": "int64",
16257	//       "location": "path",
16258	//       "required": true,
16259	//       "type": "string"
16260	//     }
16261	//   },
16262	//   "path": "userprofiles/{profileId}/accounts",
16263	//   "request": {
16264	//     "$ref": "Account"
16265	//   },
16266	//   "response": {
16267	//     "$ref": "Account"
16268	//   },
16269	//   "scopes": [
16270	//     "https://www.googleapis.com/auth/dfatrafficking"
16271	//   ]
16272	// }
16273
16274}
16275
16276// method id "dfareporting.accounts.update":
16277
16278type AccountsUpdateCall struct {
16279	s          *Service
16280	profileId  int64
16281	account    *Account
16282	urlParams_ gensupport.URLParams
16283	ctx_       context.Context
16284	header_    http.Header
16285}
16286
16287// Update: Updates an existing account.
16288func (r *AccountsService) Update(profileId int64, account *Account) *AccountsUpdateCall {
16289	c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16290	c.profileId = profileId
16291	c.account = account
16292	return c
16293}
16294
16295// Fields allows partial responses to be retrieved. See
16296// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16297// for more information.
16298func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
16299	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16300	return c
16301}
16302
16303// Context sets the context to be used in this call's Do method. Any
16304// pending HTTP request will be aborted if the provided context is
16305// canceled.
16306func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
16307	c.ctx_ = ctx
16308	return c
16309}
16310
16311// Header returns an http.Header that can be modified by the caller to
16312// add HTTP headers to the request.
16313func (c *AccountsUpdateCall) Header() http.Header {
16314	if c.header_ == nil {
16315		c.header_ = make(http.Header)
16316	}
16317	return c.header_
16318}
16319
16320func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
16321	reqHeaders := make(http.Header)
16322	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
16323	for k, v := range c.header_ {
16324		reqHeaders[k] = v
16325	}
16326	reqHeaders.Set("User-Agent", c.s.userAgent())
16327	var body io.Reader = nil
16328	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16329	if err != nil {
16330		return nil, err
16331	}
16332	reqHeaders.Set("Content-Type", "application/json")
16333	c.urlParams_.Set("alt", alt)
16334	c.urlParams_.Set("prettyPrint", "false")
16335	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16336	urls += "?" + c.urlParams_.Encode()
16337	req, err := http.NewRequest("PUT", urls, body)
16338	if err != nil {
16339		return nil, err
16340	}
16341	req.Header = reqHeaders
16342	googleapi.Expand(req.URL, map[string]string{
16343		"profileId": strconv.FormatInt(c.profileId, 10),
16344	})
16345	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16346}
16347
16348// Do executes the "dfareporting.accounts.update" call.
16349// Exactly one of *Account or error will be non-nil. Any non-2xx status
16350// code is an error. Response headers are in either
16351// *Account.ServerResponse.Header or (if a response was returned at all)
16352// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16353// check whether the returned error was because http.StatusNotModified
16354// was returned.
16355func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16356	gensupport.SetOptions(c.urlParams_, opts...)
16357	res, err := c.doRequest("json")
16358	if res != nil && res.StatusCode == http.StatusNotModified {
16359		if res.Body != nil {
16360			res.Body.Close()
16361		}
16362		return nil, &googleapi.Error{
16363			Code:   res.StatusCode,
16364			Header: res.Header,
16365		}
16366	}
16367	if err != nil {
16368		return nil, err
16369	}
16370	defer googleapi.CloseBody(res)
16371	if err := googleapi.CheckResponse(res); err != nil {
16372		return nil, err
16373	}
16374	ret := &Account{
16375		ServerResponse: googleapi.ServerResponse{
16376			Header:         res.Header,
16377			HTTPStatusCode: res.StatusCode,
16378		},
16379	}
16380	target := &ret
16381	if err := gensupport.DecodeResponse(target, res); err != nil {
16382		return nil, err
16383	}
16384	return ret, nil
16385	// {
16386	//   "description": "Updates an existing account.",
16387	//   "httpMethod": "PUT",
16388	//   "id": "dfareporting.accounts.update",
16389	//   "parameterOrder": [
16390	//     "profileId"
16391	//   ],
16392	//   "parameters": {
16393	//     "profileId": {
16394	//       "description": "User profile ID associated with this request.",
16395	//       "format": "int64",
16396	//       "location": "path",
16397	//       "required": true,
16398	//       "type": "string"
16399	//     }
16400	//   },
16401	//   "path": "userprofiles/{profileId}/accounts",
16402	//   "request": {
16403	//     "$ref": "Account"
16404	//   },
16405	//   "response": {
16406	//     "$ref": "Account"
16407	//   },
16408	//   "scopes": [
16409	//     "https://www.googleapis.com/auth/dfatrafficking"
16410	//   ]
16411	// }
16412
16413}
16414
16415// method id "dfareporting.ads.get":
16416
16417type AdsGetCall struct {
16418	s            *Service
16419	profileId    int64
16420	id           int64
16421	urlParams_   gensupport.URLParams
16422	ifNoneMatch_ string
16423	ctx_         context.Context
16424	header_      http.Header
16425}
16426
16427// Get: Gets one ad by ID.
16428func (r *AdsService) Get(profileId int64, id int64) *AdsGetCall {
16429	c := &AdsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16430	c.profileId = profileId
16431	c.id = id
16432	return c
16433}
16434
16435// Fields allows partial responses to be retrieved. See
16436// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16437// for more information.
16438func (c *AdsGetCall) Fields(s ...googleapi.Field) *AdsGetCall {
16439	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16440	return c
16441}
16442
16443// IfNoneMatch sets the optional parameter which makes the operation
16444// fail if the object's ETag matches the given value. This is useful for
16445// getting updates only after the object has changed since the last
16446// request. Use googleapi.IsNotModified to check whether the response
16447// error from Do is the result of In-None-Match.
16448func (c *AdsGetCall) IfNoneMatch(entityTag string) *AdsGetCall {
16449	c.ifNoneMatch_ = entityTag
16450	return c
16451}
16452
16453// Context sets the context to be used in this call's Do method. Any
16454// pending HTTP request will be aborted if the provided context is
16455// canceled.
16456func (c *AdsGetCall) Context(ctx context.Context) *AdsGetCall {
16457	c.ctx_ = ctx
16458	return c
16459}
16460
16461// Header returns an http.Header that can be modified by the caller to
16462// add HTTP headers to the request.
16463func (c *AdsGetCall) Header() http.Header {
16464	if c.header_ == nil {
16465		c.header_ = make(http.Header)
16466	}
16467	return c.header_
16468}
16469
16470func (c *AdsGetCall) doRequest(alt string) (*http.Response, error) {
16471	reqHeaders := make(http.Header)
16472	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
16473	for k, v := range c.header_ {
16474		reqHeaders[k] = v
16475	}
16476	reqHeaders.Set("User-Agent", c.s.userAgent())
16477	if c.ifNoneMatch_ != "" {
16478		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16479	}
16480	var body io.Reader = nil
16481	c.urlParams_.Set("alt", alt)
16482	c.urlParams_.Set("prettyPrint", "false")
16483	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads/{id}")
16484	urls += "?" + c.urlParams_.Encode()
16485	req, err := http.NewRequest("GET", urls, body)
16486	if err != nil {
16487		return nil, err
16488	}
16489	req.Header = reqHeaders
16490	googleapi.Expand(req.URL, map[string]string{
16491		"profileId": strconv.FormatInt(c.profileId, 10),
16492		"id":        strconv.FormatInt(c.id, 10),
16493	})
16494	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16495}
16496
16497// Do executes the "dfareporting.ads.get" call.
16498// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
16499// is an error. Response headers are in either *Ad.ServerResponse.Header
16500// or (if a response was returned at all) in
16501// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16502// whether the returned error was because http.StatusNotModified was
16503// returned.
16504func (c *AdsGetCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16505	gensupport.SetOptions(c.urlParams_, opts...)
16506	res, err := c.doRequest("json")
16507	if res != nil && res.StatusCode == http.StatusNotModified {
16508		if res.Body != nil {
16509			res.Body.Close()
16510		}
16511		return nil, &googleapi.Error{
16512			Code:   res.StatusCode,
16513			Header: res.Header,
16514		}
16515	}
16516	if err != nil {
16517		return nil, err
16518	}
16519	defer googleapi.CloseBody(res)
16520	if err := googleapi.CheckResponse(res); err != nil {
16521		return nil, err
16522	}
16523	ret := &Ad{
16524		ServerResponse: googleapi.ServerResponse{
16525			Header:         res.Header,
16526			HTTPStatusCode: res.StatusCode,
16527		},
16528	}
16529	target := &ret
16530	if err := gensupport.DecodeResponse(target, res); err != nil {
16531		return nil, err
16532	}
16533	return ret, nil
16534	// {
16535	//   "description": "Gets one ad by ID.",
16536	//   "httpMethod": "GET",
16537	//   "id": "dfareporting.ads.get",
16538	//   "parameterOrder": [
16539	//     "profileId",
16540	//     "id"
16541	//   ],
16542	//   "parameters": {
16543	//     "id": {
16544	//       "description": "Ad ID.",
16545	//       "format": "int64",
16546	//       "location": "path",
16547	//       "required": true,
16548	//       "type": "string"
16549	//     },
16550	//     "profileId": {
16551	//       "description": "User profile ID associated with this request.",
16552	//       "format": "int64",
16553	//       "location": "path",
16554	//       "required": true,
16555	//       "type": "string"
16556	//     }
16557	//   },
16558	//   "path": "userprofiles/{profileId}/ads/{id}",
16559	//   "response": {
16560	//     "$ref": "Ad"
16561	//   },
16562	//   "scopes": [
16563	//     "https://www.googleapis.com/auth/dfatrafficking"
16564	//   ]
16565	// }
16566
16567}
16568
16569// method id "dfareporting.ads.insert":
16570
16571type AdsInsertCall struct {
16572	s          *Service
16573	profileId  int64
16574	ad         *Ad
16575	urlParams_ gensupport.URLParams
16576	ctx_       context.Context
16577	header_    http.Header
16578}
16579
16580// Insert: Inserts a new ad.
16581func (r *AdsService) Insert(profileId int64, ad *Ad) *AdsInsertCall {
16582	c := &AdsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16583	c.profileId = profileId
16584	c.ad = ad
16585	return c
16586}
16587
16588// Fields allows partial responses to be retrieved. See
16589// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16590// for more information.
16591func (c *AdsInsertCall) Fields(s ...googleapi.Field) *AdsInsertCall {
16592	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16593	return c
16594}
16595
16596// Context sets the context to be used in this call's Do method. Any
16597// pending HTTP request will be aborted if the provided context is
16598// canceled.
16599func (c *AdsInsertCall) Context(ctx context.Context) *AdsInsertCall {
16600	c.ctx_ = ctx
16601	return c
16602}
16603
16604// Header returns an http.Header that can be modified by the caller to
16605// add HTTP headers to the request.
16606func (c *AdsInsertCall) Header() http.Header {
16607	if c.header_ == nil {
16608		c.header_ = make(http.Header)
16609	}
16610	return c.header_
16611}
16612
16613func (c *AdsInsertCall) doRequest(alt string) (*http.Response, error) {
16614	reqHeaders := make(http.Header)
16615	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
16616	for k, v := range c.header_ {
16617		reqHeaders[k] = v
16618	}
16619	reqHeaders.Set("User-Agent", c.s.userAgent())
16620	var body io.Reader = nil
16621	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
16622	if err != nil {
16623		return nil, err
16624	}
16625	reqHeaders.Set("Content-Type", "application/json")
16626	c.urlParams_.Set("alt", alt)
16627	c.urlParams_.Set("prettyPrint", "false")
16628	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
16629	urls += "?" + c.urlParams_.Encode()
16630	req, err := http.NewRequest("POST", urls, body)
16631	if err != nil {
16632		return nil, err
16633	}
16634	req.Header = reqHeaders
16635	googleapi.Expand(req.URL, map[string]string{
16636		"profileId": strconv.FormatInt(c.profileId, 10),
16637	})
16638	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16639}
16640
16641// Do executes the "dfareporting.ads.insert" call.
16642// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
16643// is an error. Response headers are in either *Ad.ServerResponse.Header
16644// or (if a response was returned at all) in
16645// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16646// whether the returned error was because http.StatusNotModified was
16647// returned.
16648func (c *AdsInsertCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16649	gensupport.SetOptions(c.urlParams_, opts...)
16650	res, err := c.doRequest("json")
16651	if res != nil && res.StatusCode == http.StatusNotModified {
16652		if res.Body != nil {
16653			res.Body.Close()
16654		}
16655		return nil, &googleapi.Error{
16656			Code:   res.StatusCode,
16657			Header: res.Header,
16658		}
16659	}
16660	if err != nil {
16661		return nil, err
16662	}
16663	defer googleapi.CloseBody(res)
16664	if err := googleapi.CheckResponse(res); err != nil {
16665		return nil, err
16666	}
16667	ret := &Ad{
16668		ServerResponse: googleapi.ServerResponse{
16669			Header:         res.Header,
16670			HTTPStatusCode: res.StatusCode,
16671		},
16672	}
16673	target := &ret
16674	if err := gensupport.DecodeResponse(target, res); err != nil {
16675		return nil, err
16676	}
16677	return ret, nil
16678	// {
16679	//   "description": "Inserts a new ad.",
16680	//   "httpMethod": "POST",
16681	//   "id": "dfareporting.ads.insert",
16682	//   "parameterOrder": [
16683	//     "profileId"
16684	//   ],
16685	//   "parameters": {
16686	//     "profileId": {
16687	//       "description": "User profile ID associated with this request.",
16688	//       "format": "int64",
16689	//       "location": "path",
16690	//       "required": true,
16691	//       "type": "string"
16692	//     }
16693	//   },
16694	//   "path": "userprofiles/{profileId}/ads",
16695	//   "request": {
16696	//     "$ref": "Ad"
16697	//   },
16698	//   "response": {
16699	//     "$ref": "Ad"
16700	//   },
16701	//   "scopes": [
16702	//     "https://www.googleapis.com/auth/dfatrafficking"
16703	//   ]
16704	// }
16705
16706}
16707
16708// method id "dfareporting.ads.list":
16709
16710type AdsListCall struct {
16711	s            *Service
16712	profileId    int64
16713	urlParams_   gensupport.URLParams
16714	ifNoneMatch_ string
16715	ctx_         context.Context
16716	header_      http.Header
16717}
16718
16719// List: Retrieves a list of ads, possibly filtered. This method
16720// supports paging.
16721func (r *AdsService) List(profileId int64) *AdsListCall {
16722	c := &AdsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16723	c.profileId = profileId
16724	return c
16725}
16726
16727// Active sets the optional parameter "active": Select only active ads.
16728func (c *AdsListCall) Active(active bool) *AdsListCall {
16729	c.urlParams_.Set("active", fmt.Sprint(active))
16730	return c
16731}
16732
16733// AdvertiserId sets the optional parameter "advertiserId": Select only
16734// ads with this advertiser ID.
16735func (c *AdsListCall) AdvertiserId(advertiserId int64) *AdsListCall {
16736	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
16737	return c
16738}
16739
16740// Archived sets the optional parameter "archived": Select only archived
16741// ads.
16742func (c *AdsListCall) Archived(archived bool) *AdsListCall {
16743	c.urlParams_.Set("archived", fmt.Sprint(archived))
16744	return c
16745}
16746
16747// AudienceSegmentIds sets the optional parameter "audienceSegmentIds":
16748// Select only ads with these audience segment IDs.
16749func (c *AdsListCall) AudienceSegmentIds(audienceSegmentIds ...int64) *AdsListCall {
16750	var audienceSegmentIds_ []string
16751	for _, v := range audienceSegmentIds {
16752		audienceSegmentIds_ = append(audienceSegmentIds_, fmt.Sprint(v))
16753	}
16754	c.urlParams_.SetMulti("audienceSegmentIds", audienceSegmentIds_)
16755	return c
16756}
16757
16758// CampaignIds sets the optional parameter "campaignIds": Select only
16759// ads with these campaign IDs.
16760func (c *AdsListCall) CampaignIds(campaignIds ...int64) *AdsListCall {
16761	var campaignIds_ []string
16762	for _, v := range campaignIds {
16763		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
16764	}
16765	c.urlParams_.SetMulti("campaignIds", campaignIds_)
16766	return c
16767}
16768
16769// Compatibility sets the optional parameter "compatibility": Select
16770// default ads with the specified compatibility. Applicable when type is
16771// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
16772// rendering either on desktop or on mobile devices for regular or
16773// interstitial ads, respectively. APP and APP_INTERSTITIAL are for
16774// rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an
16775// in-stream video ads developed with the VAST standard.
16776//
16777// Possible values:
16778//   "APP"
16779//   "APP_INTERSTITIAL"
16780//   "DISPLAY"
16781//   "DISPLAY_INTERSTITIAL"
16782//   "IN_STREAM_AUDIO"
16783//   "IN_STREAM_VIDEO"
16784func (c *AdsListCall) Compatibility(compatibility string) *AdsListCall {
16785	c.urlParams_.Set("compatibility", compatibility)
16786	return c
16787}
16788
16789// CreativeIds sets the optional parameter "creativeIds": Select only
16790// ads with these creative IDs assigned.
16791func (c *AdsListCall) CreativeIds(creativeIds ...int64) *AdsListCall {
16792	var creativeIds_ []string
16793	for _, v := range creativeIds {
16794		creativeIds_ = append(creativeIds_, fmt.Sprint(v))
16795	}
16796	c.urlParams_.SetMulti("creativeIds", creativeIds_)
16797	return c
16798}
16799
16800// CreativeOptimizationConfigurationIds sets the optional parameter
16801// "creativeOptimizationConfigurationIds": Select only ads with these
16802// creative optimization configuration IDs.
16803func (c *AdsListCall) CreativeOptimizationConfigurationIds(creativeOptimizationConfigurationIds ...int64) *AdsListCall {
16804	var creativeOptimizationConfigurationIds_ []string
16805	for _, v := range creativeOptimizationConfigurationIds {
16806		creativeOptimizationConfigurationIds_ = append(creativeOptimizationConfigurationIds_, fmt.Sprint(v))
16807	}
16808	c.urlParams_.SetMulti("creativeOptimizationConfigurationIds", creativeOptimizationConfigurationIds_)
16809	return c
16810}
16811
16812// DynamicClickTracker sets the optional parameter
16813// "dynamicClickTracker": Select only dynamic click trackers. Applicable
16814// when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click
16815// trackers. If false, select static click trackers. Leave unset to
16816// select both.
16817func (c *AdsListCall) DynamicClickTracker(dynamicClickTracker bool) *AdsListCall {
16818	c.urlParams_.Set("dynamicClickTracker", fmt.Sprint(dynamicClickTracker))
16819	return c
16820}
16821
16822// Ids sets the optional parameter "ids": Select only ads with these
16823// IDs.
16824func (c *AdsListCall) Ids(ids ...int64) *AdsListCall {
16825	var ids_ []string
16826	for _, v := range ids {
16827		ids_ = append(ids_, fmt.Sprint(v))
16828	}
16829	c.urlParams_.SetMulti("ids", ids_)
16830	return c
16831}
16832
16833// LandingPageIds sets the optional parameter "landingPageIds": Select
16834// only ads with these landing page IDs.
16835func (c *AdsListCall) LandingPageIds(landingPageIds ...int64) *AdsListCall {
16836	var landingPageIds_ []string
16837	for _, v := range landingPageIds {
16838		landingPageIds_ = append(landingPageIds_, fmt.Sprint(v))
16839	}
16840	c.urlParams_.SetMulti("landingPageIds", landingPageIds_)
16841	return c
16842}
16843
16844// MaxResults sets the optional parameter "maxResults": Maximum number
16845// of results to return.
16846func (c *AdsListCall) MaxResults(maxResults int64) *AdsListCall {
16847	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16848	return c
16849}
16850
16851// OverriddenEventTagId sets the optional parameter
16852// "overriddenEventTagId": Select only ads with this event tag override
16853// ID.
16854func (c *AdsListCall) OverriddenEventTagId(overriddenEventTagId int64) *AdsListCall {
16855	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
16856	return c
16857}
16858
16859// PageToken sets the optional parameter "pageToken": Value of the
16860// nextPageToken from the previous result page.
16861func (c *AdsListCall) PageToken(pageToken string) *AdsListCall {
16862	c.urlParams_.Set("pageToken", pageToken)
16863	return c
16864}
16865
16866// PlacementIds sets the optional parameter "placementIds": Select only
16867// ads with these placement IDs assigned.
16868func (c *AdsListCall) PlacementIds(placementIds ...int64) *AdsListCall {
16869	var placementIds_ []string
16870	for _, v := range placementIds {
16871		placementIds_ = append(placementIds_, fmt.Sprint(v))
16872	}
16873	c.urlParams_.SetMulti("placementIds", placementIds_)
16874	return c
16875}
16876
16877// RemarketingListIds sets the optional parameter "remarketingListIds":
16878// Select only ads whose list targeting expression use these remarketing
16879// list IDs.
16880func (c *AdsListCall) RemarketingListIds(remarketingListIds ...int64) *AdsListCall {
16881	var remarketingListIds_ []string
16882	for _, v := range remarketingListIds {
16883		remarketingListIds_ = append(remarketingListIds_, fmt.Sprint(v))
16884	}
16885	c.urlParams_.SetMulti("remarketingListIds", remarketingListIds_)
16886	return c
16887}
16888
16889// SearchString sets the optional parameter "searchString": Allows
16890// searching for objects by name or ID. Wildcards (*) are allowed. For
16891// example, "ad*2015" will return objects with names like "ad June
16892// 2015", "ad April 2015", or simply "ad 2015". Most of the searches
16893// also add wildcards implicitly at the start and the end of the search
16894// string. For example, a search string of "ad" will match objects with
16895// name "my ad", "ad 2015", or simply "ad".
16896func (c *AdsListCall) SearchString(searchString string) *AdsListCall {
16897	c.urlParams_.Set("searchString", searchString)
16898	return c
16899}
16900
16901// SizeIds sets the optional parameter "sizeIds": Select only ads with
16902// these size IDs.
16903func (c *AdsListCall) SizeIds(sizeIds ...int64) *AdsListCall {
16904	var sizeIds_ []string
16905	for _, v := range sizeIds {
16906		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
16907	}
16908	c.urlParams_.SetMulti("sizeIds", sizeIds_)
16909	return c
16910}
16911
16912// SortField sets the optional parameter "sortField": Field by which to
16913// sort the list.
16914//
16915// Possible values:
16916//   "ID" (default)
16917//   "NAME"
16918func (c *AdsListCall) SortField(sortField string) *AdsListCall {
16919	c.urlParams_.Set("sortField", sortField)
16920	return c
16921}
16922
16923// SortOrder sets the optional parameter "sortOrder": Order of sorted
16924// results.
16925//
16926// Possible values:
16927//   "ASCENDING" (default)
16928//   "DESCENDING"
16929func (c *AdsListCall) SortOrder(sortOrder string) *AdsListCall {
16930	c.urlParams_.Set("sortOrder", sortOrder)
16931	return c
16932}
16933
16934// SslCompliant sets the optional parameter "sslCompliant": Select only
16935// ads that are SSL-compliant.
16936func (c *AdsListCall) SslCompliant(sslCompliant bool) *AdsListCall {
16937	c.urlParams_.Set("sslCompliant", fmt.Sprint(sslCompliant))
16938	return c
16939}
16940
16941// SslRequired sets the optional parameter "sslRequired": Select only
16942// ads that require SSL.
16943func (c *AdsListCall) SslRequired(sslRequired bool) *AdsListCall {
16944	c.urlParams_.Set("sslRequired", fmt.Sprint(sslRequired))
16945	return c
16946}
16947
16948// Type sets the optional parameter "type": Select only ads with these
16949// types.
16950//
16951// Possible values:
16952//   "AD_SERVING_CLICK_TRACKER"
16953//   "AD_SERVING_DEFAULT_AD"
16954//   "AD_SERVING_STANDARD_AD"
16955//   "AD_SERVING_TRACKING"
16956func (c *AdsListCall) Type(type_ ...string) *AdsListCall {
16957	c.urlParams_.SetMulti("type", append([]string{}, type_...))
16958	return c
16959}
16960
16961// Fields allows partial responses to be retrieved. See
16962// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16963// for more information.
16964func (c *AdsListCall) Fields(s ...googleapi.Field) *AdsListCall {
16965	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16966	return c
16967}
16968
16969// IfNoneMatch sets the optional parameter which makes the operation
16970// fail if the object's ETag matches the given value. This is useful for
16971// getting updates only after the object has changed since the last
16972// request. Use googleapi.IsNotModified to check whether the response
16973// error from Do is the result of In-None-Match.
16974func (c *AdsListCall) IfNoneMatch(entityTag string) *AdsListCall {
16975	c.ifNoneMatch_ = entityTag
16976	return c
16977}
16978
16979// Context sets the context to be used in this call's Do method. Any
16980// pending HTTP request will be aborted if the provided context is
16981// canceled.
16982func (c *AdsListCall) Context(ctx context.Context) *AdsListCall {
16983	c.ctx_ = ctx
16984	return c
16985}
16986
16987// Header returns an http.Header that can be modified by the caller to
16988// add HTTP headers to the request.
16989func (c *AdsListCall) Header() http.Header {
16990	if c.header_ == nil {
16991		c.header_ = make(http.Header)
16992	}
16993	return c.header_
16994}
16995
16996func (c *AdsListCall) doRequest(alt string) (*http.Response, error) {
16997	reqHeaders := make(http.Header)
16998	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
16999	for k, v := range c.header_ {
17000		reqHeaders[k] = v
17001	}
17002	reqHeaders.Set("User-Agent", c.s.userAgent())
17003	if c.ifNoneMatch_ != "" {
17004		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17005	}
17006	var body io.Reader = nil
17007	c.urlParams_.Set("alt", alt)
17008	c.urlParams_.Set("prettyPrint", "false")
17009	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17010	urls += "?" + c.urlParams_.Encode()
17011	req, err := http.NewRequest("GET", urls, body)
17012	if err != nil {
17013		return nil, err
17014	}
17015	req.Header = reqHeaders
17016	googleapi.Expand(req.URL, map[string]string{
17017		"profileId": strconv.FormatInt(c.profileId, 10),
17018	})
17019	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17020}
17021
17022// Do executes the "dfareporting.ads.list" call.
17023// Exactly one of *AdsListResponse or error will be non-nil. Any non-2xx
17024// status code is an error. Response headers are in either
17025// *AdsListResponse.ServerResponse.Header or (if a response was returned
17026// at all) in error.(*googleapi.Error).Header. Use
17027// googleapi.IsNotModified to check whether the returned error was
17028// because http.StatusNotModified was returned.
17029func (c *AdsListCall) Do(opts ...googleapi.CallOption) (*AdsListResponse, error) {
17030	gensupport.SetOptions(c.urlParams_, opts...)
17031	res, err := c.doRequest("json")
17032	if res != nil && res.StatusCode == http.StatusNotModified {
17033		if res.Body != nil {
17034			res.Body.Close()
17035		}
17036		return nil, &googleapi.Error{
17037			Code:   res.StatusCode,
17038			Header: res.Header,
17039		}
17040	}
17041	if err != nil {
17042		return nil, err
17043	}
17044	defer googleapi.CloseBody(res)
17045	if err := googleapi.CheckResponse(res); err != nil {
17046		return nil, err
17047	}
17048	ret := &AdsListResponse{
17049		ServerResponse: googleapi.ServerResponse{
17050			Header:         res.Header,
17051			HTTPStatusCode: res.StatusCode,
17052		},
17053	}
17054	target := &ret
17055	if err := gensupport.DecodeResponse(target, res); err != nil {
17056		return nil, err
17057	}
17058	return ret, nil
17059	// {
17060	//   "description": "Retrieves a list of ads, possibly filtered. This method supports paging.",
17061	//   "httpMethod": "GET",
17062	//   "id": "dfareporting.ads.list",
17063	//   "parameterOrder": [
17064	//     "profileId"
17065	//   ],
17066	//   "parameters": {
17067	//     "active": {
17068	//       "description": "Select only active ads.",
17069	//       "location": "query",
17070	//       "type": "boolean"
17071	//     },
17072	//     "advertiserId": {
17073	//       "description": "Select only ads with this advertiser ID.",
17074	//       "format": "int64",
17075	//       "location": "query",
17076	//       "type": "string"
17077	//     },
17078	//     "archived": {
17079	//       "description": "Select only archived ads.",
17080	//       "location": "query",
17081	//       "type": "boolean"
17082	//     },
17083	//     "audienceSegmentIds": {
17084	//       "description": "Select only ads with these audience segment IDs.",
17085	//       "format": "int64",
17086	//       "location": "query",
17087	//       "repeated": true,
17088	//       "type": "string"
17089	//     },
17090	//     "campaignIds": {
17091	//       "description": "Select only ads with these campaign IDs.",
17092	//       "format": "int64",
17093	//       "location": "query",
17094	//       "repeated": true,
17095	//       "type": "string"
17096	//     },
17097	//     "compatibility": {
17098	//       "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.",
17099	//       "enum": [
17100	//         "APP",
17101	//         "APP_INTERSTITIAL",
17102	//         "DISPLAY",
17103	//         "DISPLAY_INTERSTITIAL",
17104	//         "IN_STREAM_AUDIO",
17105	//         "IN_STREAM_VIDEO"
17106	//       ],
17107	//       "enumDescriptions": [
17108	//         "",
17109	//         "",
17110	//         "",
17111	//         "",
17112	//         "",
17113	//         ""
17114	//       ],
17115	//       "location": "query",
17116	//       "type": "string"
17117	//     },
17118	//     "creativeIds": {
17119	//       "description": "Select only ads with these creative IDs assigned.",
17120	//       "format": "int64",
17121	//       "location": "query",
17122	//       "repeated": true,
17123	//       "type": "string"
17124	//     },
17125	//     "creativeOptimizationConfigurationIds": {
17126	//       "description": "Select only ads with these creative optimization configuration IDs.",
17127	//       "format": "int64",
17128	//       "location": "query",
17129	//       "repeated": true,
17130	//       "type": "string"
17131	//     },
17132	//     "dynamicClickTracker": {
17133	//       "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.",
17134	//       "location": "query",
17135	//       "type": "boolean"
17136	//     },
17137	//     "ids": {
17138	//       "description": "Select only ads with these IDs.",
17139	//       "format": "int64",
17140	//       "location": "query",
17141	//       "repeated": true,
17142	//       "type": "string"
17143	//     },
17144	//     "landingPageIds": {
17145	//       "description": "Select only ads with these landing page IDs.",
17146	//       "format": "int64",
17147	//       "location": "query",
17148	//       "repeated": true,
17149	//       "type": "string"
17150	//     },
17151	//     "maxResults": {
17152	//       "default": "1000",
17153	//       "description": "Maximum number of results to return.",
17154	//       "format": "int32",
17155	//       "location": "query",
17156	//       "maximum": "1000",
17157	//       "minimum": "0",
17158	//       "type": "integer"
17159	//     },
17160	//     "overriddenEventTagId": {
17161	//       "description": "Select only ads with this event tag override ID.",
17162	//       "format": "int64",
17163	//       "location": "query",
17164	//       "type": "string"
17165	//     },
17166	//     "pageToken": {
17167	//       "description": "Value of the nextPageToken from the previous result page.",
17168	//       "location": "query",
17169	//       "type": "string"
17170	//     },
17171	//     "placementIds": {
17172	//       "description": "Select only ads with these placement IDs assigned.",
17173	//       "format": "int64",
17174	//       "location": "query",
17175	//       "repeated": true,
17176	//       "type": "string"
17177	//     },
17178	//     "profileId": {
17179	//       "description": "User profile ID associated with this request.",
17180	//       "format": "int64",
17181	//       "location": "path",
17182	//       "required": true,
17183	//       "type": "string"
17184	//     },
17185	//     "remarketingListIds": {
17186	//       "description": "Select only ads whose list targeting expression use these remarketing list IDs.",
17187	//       "format": "int64",
17188	//       "location": "query",
17189	//       "repeated": true,
17190	//       "type": "string"
17191	//     },
17192	//     "searchString": {
17193	//       "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\".",
17194	//       "location": "query",
17195	//       "type": "string"
17196	//     },
17197	//     "sizeIds": {
17198	//       "description": "Select only ads with these size IDs.",
17199	//       "format": "int64",
17200	//       "location": "query",
17201	//       "repeated": true,
17202	//       "type": "string"
17203	//     },
17204	//     "sortField": {
17205	//       "default": "ID",
17206	//       "description": "Field by which to sort the list.",
17207	//       "enum": [
17208	//         "ID",
17209	//         "NAME"
17210	//       ],
17211	//       "enumDescriptions": [
17212	//         "",
17213	//         ""
17214	//       ],
17215	//       "location": "query",
17216	//       "type": "string"
17217	//     },
17218	//     "sortOrder": {
17219	//       "default": "ASCENDING",
17220	//       "description": "Order of sorted results.",
17221	//       "enum": [
17222	//         "ASCENDING",
17223	//         "DESCENDING"
17224	//       ],
17225	//       "enumDescriptions": [
17226	//         "",
17227	//         ""
17228	//       ],
17229	//       "location": "query",
17230	//       "type": "string"
17231	//     },
17232	//     "sslCompliant": {
17233	//       "description": "Select only ads that are SSL-compliant.",
17234	//       "location": "query",
17235	//       "type": "boolean"
17236	//     },
17237	//     "sslRequired": {
17238	//       "description": "Select only ads that require SSL.",
17239	//       "location": "query",
17240	//       "type": "boolean"
17241	//     },
17242	//     "type": {
17243	//       "description": "Select only ads with these types.",
17244	//       "enum": [
17245	//         "AD_SERVING_CLICK_TRACKER",
17246	//         "AD_SERVING_DEFAULT_AD",
17247	//         "AD_SERVING_STANDARD_AD",
17248	//         "AD_SERVING_TRACKING"
17249	//       ],
17250	//       "enumDescriptions": [
17251	//         "",
17252	//         "",
17253	//         "",
17254	//         ""
17255	//       ],
17256	//       "location": "query",
17257	//       "repeated": true,
17258	//       "type": "string"
17259	//     }
17260	//   },
17261	//   "path": "userprofiles/{profileId}/ads",
17262	//   "response": {
17263	//     "$ref": "AdsListResponse"
17264	//   },
17265	//   "scopes": [
17266	//     "https://www.googleapis.com/auth/dfatrafficking"
17267	//   ]
17268	// }
17269
17270}
17271
17272// Pages invokes f for each page of results.
17273// A non-nil error returned from f will halt the iteration.
17274// The provided context supersedes any context provided to the Context method.
17275func (c *AdsListCall) Pages(ctx context.Context, f func(*AdsListResponse) error) error {
17276	c.ctx_ = ctx
17277	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17278	for {
17279		x, err := c.Do()
17280		if err != nil {
17281			return err
17282		}
17283		if err := f(x); err != nil {
17284			return err
17285		}
17286		if x.NextPageToken == "" {
17287			return nil
17288		}
17289		c.PageToken(x.NextPageToken)
17290	}
17291}
17292
17293// method id "dfareporting.ads.patch":
17294
17295type AdsPatchCall struct {
17296	s          *Service
17297	profileId  int64
17298	ad         *Ad
17299	urlParams_ gensupport.URLParams
17300	ctx_       context.Context
17301	header_    http.Header
17302}
17303
17304// Patch: Updates an existing ad. This method supports patch semantics.
17305func (r *AdsService) Patch(profileId int64, id int64, ad *Ad) *AdsPatchCall {
17306	c := &AdsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17307	c.profileId = profileId
17308	c.urlParams_.Set("id", fmt.Sprint(id))
17309	c.ad = ad
17310	return c
17311}
17312
17313// Fields allows partial responses to be retrieved. See
17314// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17315// for more information.
17316func (c *AdsPatchCall) Fields(s ...googleapi.Field) *AdsPatchCall {
17317	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17318	return c
17319}
17320
17321// Context sets the context to be used in this call's Do method. Any
17322// pending HTTP request will be aborted if the provided context is
17323// canceled.
17324func (c *AdsPatchCall) Context(ctx context.Context) *AdsPatchCall {
17325	c.ctx_ = ctx
17326	return c
17327}
17328
17329// Header returns an http.Header that can be modified by the caller to
17330// add HTTP headers to the request.
17331func (c *AdsPatchCall) Header() http.Header {
17332	if c.header_ == nil {
17333		c.header_ = make(http.Header)
17334	}
17335	return c.header_
17336}
17337
17338func (c *AdsPatchCall) doRequest(alt string) (*http.Response, error) {
17339	reqHeaders := make(http.Header)
17340	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
17341	for k, v := range c.header_ {
17342		reqHeaders[k] = v
17343	}
17344	reqHeaders.Set("User-Agent", c.s.userAgent())
17345	var body io.Reader = nil
17346	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17347	if err != nil {
17348		return nil, err
17349	}
17350	reqHeaders.Set("Content-Type", "application/json")
17351	c.urlParams_.Set("alt", alt)
17352	c.urlParams_.Set("prettyPrint", "false")
17353	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17354	urls += "?" + c.urlParams_.Encode()
17355	req, err := http.NewRequest("PATCH", urls, body)
17356	if err != nil {
17357		return nil, err
17358	}
17359	req.Header = reqHeaders
17360	googleapi.Expand(req.URL, map[string]string{
17361		"profileId": strconv.FormatInt(c.profileId, 10),
17362	})
17363	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17364}
17365
17366// Do executes the "dfareporting.ads.patch" call.
17367// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17368// is an error. Response headers are in either *Ad.ServerResponse.Header
17369// or (if a response was returned at all) in
17370// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17371// whether the returned error was because http.StatusNotModified was
17372// returned.
17373func (c *AdsPatchCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17374	gensupport.SetOptions(c.urlParams_, opts...)
17375	res, err := c.doRequest("json")
17376	if res != nil && res.StatusCode == http.StatusNotModified {
17377		if res.Body != nil {
17378			res.Body.Close()
17379		}
17380		return nil, &googleapi.Error{
17381			Code:   res.StatusCode,
17382			Header: res.Header,
17383		}
17384	}
17385	if err != nil {
17386		return nil, err
17387	}
17388	defer googleapi.CloseBody(res)
17389	if err := googleapi.CheckResponse(res); err != nil {
17390		return nil, err
17391	}
17392	ret := &Ad{
17393		ServerResponse: googleapi.ServerResponse{
17394			Header:         res.Header,
17395			HTTPStatusCode: res.StatusCode,
17396		},
17397	}
17398	target := &ret
17399	if err := gensupport.DecodeResponse(target, res); err != nil {
17400		return nil, err
17401	}
17402	return ret, nil
17403	// {
17404	//   "description": "Updates an existing ad. This method supports patch semantics.",
17405	//   "httpMethod": "PATCH",
17406	//   "id": "dfareporting.ads.patch",
17407	//   "parameterOrder": [
17408	//     "profileId",
17409	//     "id"
17410	//   ],
17411	//   "parameters": {
17412	//     "id": {
17413	//       "description": "Ad ID.",
17414	//       "format": "int64",
17415	//       "location": "query",
17416	//       "required": true,
17417	//       "type": "string"
17418	//     },
17419	//     "profileId": {
17420	//       "description": "User profile ID associated with this request.",
17421	//       "format": "int64",
17422	//       "location": "path",
17423	//       "required": true,
17424	//       "type": "string"
17425	//     }
17426	//   },
17427	//   "path": "userprofiles/{profileId}/ads",
17428	//   "request": {
17429	//     "$ref": "Ad"
17430	//   },
17431	//   "response": {
17432	//     "$ref": "Ad"
17433	//   },
17434	//   "scopes": [
17435	//     "https://www.googleapis.com/auth/dfatrafficking"
17436	//   ]
17437	// }
17438
17439}
17440
17441// method id "dfareporting.ads.update":
17442
17443type AdsUpdateCall struct {
17444	s          *Service
17445	profileId  int64
17446	ad         *Ad
17447	urlParams_ gensupport.URLParams
17448	ctx_       context.Context
17449	header_    http.Header
17450}
17451
17452// Update: Updates an existing ad.
17453func (r *AdsService) Update(profileId int64, ad *Ad) *AdsUpdateCall {
17454	c := &AdsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17455	c.profileId = profileId
17456	c.ad = ad
17457	return c
17458}
17459
17460// Fields allows partial responses to be retrieved. See
17461// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17462// for more information.
17463func (c *AdsUpdateCall) Fields(s ...googleapi.Field) *AdsUpdateCall {
17464	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17465	return c
17466}
17467
17468// Context sets the context to be used in this call's Do method. Any
17469// pending HTTP request will be aborted if the provided context is
17470// canceled.
17471func (c *AdsUpdateCall) Context(ctx context.Context) *AdsUpdateCall {
17472	c.ctx_ = ctx
17473	return c
17474}
17475
17476// Header returns an http.Header that can be modified by the caller to
17477// add HTTP headers to the request.
17478func (c *AdsUpdateCall) Header() http.Header {
17479	if c.header_ == nil {
17480		c.header_ = make(http.Header)
17481	}
17482	return c.header_
17483}
17484
17485func (c *AdsUpdateCall) doRequest(alt string) (*http.Response, error) {
17486	reqHeaders := make(http.Header)
17487	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
17488	for k, v := range c.header_ {
17489		reqHeaders[k] = v
17490	}
17491	reqHeaders.Set("User-Agent", c.s.userAgent())
17492	var body io.Reader = nil
17493	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17494	if err != nil {
17495		return nil, err
17496	}
17497	reqHeaders.Set("Content-Type", "application/json")
17498	c.urlParams_.Set("alt", alt)
17499	c.urlParams_.Set("prettyPrint", "false")
17500	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17501	urls += "?" + c.urlParams_.Encode()
17502	req, err := http.NewRequest("PUT", urls, body)
17503	if err != nil {
17504		return nil, err
17505	}
17506	req.Header = reqHeaders
17507	googleapi.Expand(req.URL, map[string]string{
17508		"profileId": strconv.FormatInt(c.profileId, 10),
17509	})
17510	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17511}
17512
17513// Do executes the "dfareporting.ads.update" call.
17514// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17515// is an error. Response headers are in either *Ad.ServerResponse.Header
17516// or (if a response was returned at all) in
17517// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17518// whether the returned error was because http.StatusNotModified was
17519// returned.
17520func (c *AdsUpdateCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17521	gensupport.SetOptions(c.urlParams_, opts...)
17522	res, err := c.doRequest("json")
17523	if res != nil && res.StatusCode == http.StatusNotModified {
17524		if res.Body != nil {
17525			res.Body.Close()
17526		}
17527		return nil, &googleapi.Error{
17528			Code:   res.StatusCode,
17529			Header: res.Header,
17530		}
17531	}
17532	if err != nil {
17533		return nil, err
17534	}
17535	defer googleapi.CloseBody(res)
17536	if err := googleapi.CheckResponse(res); err != nil {
17537		return nil, err
17538	}
17539	ret := &Ad{
17540		ServerResponse: googleapi.ServerResponse{
17541			Header:         res.Header,
17542			HTTPStatusCode: res.StatusCode,
17543		},
17544	}
17545	target := &ret
17546	if err := gensupport.DecodeResponse(target, res); err != nil {
17547		return nil, err
17548	}
17549	return ret, nil
17550	// {
17551	//   "description": "Updates an existing ad.",
17552	//   "httpMethod": "PUT",
17553	//   "id": "dfareporting.ads.update",
17554	//   "parameterOrder": [
17555	//     "profileId"
17556	//   ],
17557	//   "parameters": {
17558	//     "profileId": {
17559	//       "description": "User profile ID associated with this request.",
17560	//       "format": "int64",
17561	//       "location": "path",
17562	//       "required": true,
17563	//       "type": "string"
17564	//     }
17565	//   },
17566	//   "path": "userprofiles/{profileId}/ads",
17567	//   "request": {
17568	//     "$ref": "Ad"
17569	//   },
17570	//   "response": {
17571	//     "$ref": "Ad"
17572	//   },
17573	//   "scopes": [
17574	//     "https://www.googleapis.com/auth/dfatrafficking"
17575	//   ]
17576	// }
17577
17578}
17579
17580// method id "dfareporting.advertiserGroups.delete":
17581
17582type AdvertiserGroupsDeleteCall struct {
17583	s          *Service
17584	profileId  int64
17585	id         int64
17586	urlParams_ gensupport.URLParams
17587	ctx_       context.Context
17588	header_    http.Header
17589}
17590
17591// Delete: Deletes an existing advertiser group.
17592func (r *AdvertiserGroupsService) Delete(profileId int64, id int64) *AdvertiserGroupsDeleteCall {
17593	c := &AdvertiserGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17594	c.profileId = profileId
17595	c.id = id
17596	return c
17597}
17598
17599// Fields allows partial responses to be retrieved. See
17600// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17601// for more information.
17602func (c *AdvertiserGroupsDeleteCall) Fields(s ...googleapi.Field) *AdvertiserGroupsDeleteCall {
17603	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17604	return c
17605}
17606
17607// Context sets the context to be used in this call's Do method. Any
17608// pending HTTP request will be aborted if the provided context is
17609// canceled.
17610func (c *AdvertiserGroupsDeleteCall) Context(ctx context.Context) *AdvertiserGroupsDeleteCall {
17611	c.ctx_ = ctx
17612	return c
17613}
17614
17615// Header returns an http.Header that can be modified by the caller to
17616// add HTTP headers to the request.
17617func (c *AdvertiserGroupsDeleteCall) Header() http.Header {
17618	if c.header_ == nil {
17619		c.header_ = make(http.Header)
17620	}
17621	return c.header_
17622}
17623
17624func (c *AdvertiserGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
17625	reqHeaders := make(http.Header)
17626	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
17627	for k, v := range c.header_ {
17628		reqHeaders[k] = v
17629	}
17630	reqHeaders.Set("User-Agent", c.s.userAgent())
17631	var body io.Reader = nil
17632	c.urlParams_.Set("alt", alt)
17633	c.urlParams_.Set("prettyPrint", "false")
17634	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17635	urls += "?" + c.urlParams_.Encode()
17636	req, err := http.NewRequest("DELETE", urls, body)
17637	if err != nil {
17638		return nil, err
17639	}
17640	req.Header = reqHeaders
17641	googleapi.Expand(req.URL, map[string]string{
17642		"profileId": strconv.FormatInt(c.profileId, 10),
17643		"id":        strconv.FormatInt(c.id, 10),
17644	})
17645	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17646}
17647
17648// Do executes the "dfareporting.advertiserGroups.delete" call.
17649func (c *AdvertiserGroupsDeleteCall) Do(opts ...googleapi.CallOption) error {
17650	gensupport.SetOptions(c.urlParams_, opts...)
17651	res, err := c.doRequest("json")
17652	if err != nil {
17653		return err
17654	}
17655	defer googleapi.CloseBody(res)
17656	if err := googleapi.CheckResponse(res); err != nil {
17657		return err
17658	}
17659	return nil
17660	// {
17661	//   "description": "Deletes an existing advertiser group.",
17662	//   "httpMethod": "DELETE",
17663	//   "id": "dfareporting.advertiserGroups.delete",
17664	//   "parameterOrder": [
17665	//     "profileId",
17666	//     "id"
17667	//   ],
17668	//   "parameters": {
17669	//     "id": {
17670	//       "description": "Advertiser group ID.",
17671	//       "format": "int64",
17672	//       "location": "path",
17673	//       "required": true,
17674	//       "type": "string"
17675	//     },
17676	//     "profileId": {
17677	//       "description": "User profile ID associated with this request.",
17678	//       "format": "int64",
17679	//       "location": "path",
17680	//       "required": true,
17681	//       "type": "string"
17682	//     }
17683	//   },
17684	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
17685	//   "scopes": [
17686	//     "https://www.googleapis.com/auth/dfatrafficking"
17687	//   ]
17688	// }
17689
17690}
17691
17692// method id "dfareporting.advertiserGroups.get":
17693
17694type AdvertiserGroupsGetCall struct {
17695	s            *Service
17696	profileId    int64
17697	id           int64
17698	urlParams_   gensupport.URLParams
17699	ifNoneMatch_ string
17700	ctx_         context.Context
17701	header_      http.Header
17702}
17703
17704// Get: Gets one advertiser group by ID.
17705func (r *AdvertiserGroupsService) Get(profileId int64, id int64) *AdvertiserGroupsGetCall {
17706	c := &AdvertiserGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17707	c.profileId = profileId
17708	c.id = id
17709	return c
17710}
17711
17712// Fields allows partial responses to be retrieved. See
17713// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17714// for more information.
17715func (c *AdvertiserGroupsGetCall) Fields(s ...googleapi.Field) *AdvertiserGroupsGetCall {
17716	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17717	return c
17718}
17719
17720// IfNoneMatch sets the optional parameter which makes the operation
17721// fail if the object's ETag matches the given value. This is useful for
17722// getting updates only after the object has changed since the last
17723// request. Use googleapi.IsNotModified to check whether the response
17724// error from Do is the result of In-None-Match.
17725func (c *AdvertiserGroupsGetCall) IfNoneMatch(entityTag string) *AdvertiserGroupsGetCall {
17726	c.ifNoneMatch_ = entityTag
17727	return c
17728}
17729
17730// Context sets the context to be used in this call's Do method. Any
17731// pending HTTP request will be aborted if the provided context is
17732// canceled.
17733func (c *AdvertiserGroupsGetCall) Context(ctx context.Context) *AdvertiserGroupsGetCall {
17734	c.ctx_ = ctx
17735	return c
17736}
17737
17738// Header returns an http.Header that can be modified by the caller to
17739// add HTTP headers to the request.
17740func (c *AdvertiserGroupsGetCall) Header() http.Header {
17741	if c.header_ == nil {
17742		c.header_ = make(http.Header)
17743	}
17744	return c.header_
17745}
17746
17747func (c *AdvertiserGroupsGetCall) doRequest(alt string) (*http.Response, error) {
17748	reqHeaders := make(http.Header)
17749	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
17750	for k, v := range c.header_ {
17751		reqHeaders[k] = v
17752	}
17753	reqHeaders.Set("User-Agent", c.s.userAgent())
17754	if c.ifNoneMatch_ != "" {
17755		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17756	}
17757	var body io.Reader = nil
17758	c.urlParams_.Set("alt", alt)
17759	c.urlParams_.Set("prettyPrint", "false")
17760	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17761	urls += "?" + c.urlParams_.Encode()
17762	req, err := http.NewRequest("GET", urls, body)
17763	if err != nil {
17764		return nil, err
17765	}
17766	req.Header = reqHeaders
17767	googleapi.Expand(req.URL, map[string]string{
17768		"profileId": strconv.FormatInt(c.profileId, 10),
17769		"id":        strconv.FormatInt(c.id, 10),
17770	})
17771	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17772}
17773
17774// Do executes the "dfareporting.advertiserGroups.get" call.
17775// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
17776// status code is an error. Response headers are in either
17777// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
17778// at all) in error.(*googleapi.Error).Header. Use
17779// googleapi.IsNotModified to check whether the returned error was
17780// because http.StatusNotModified was returned.
17781func (c *AdvertiserGroupsGetCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
17782	gensupport.SetOptions(c.urlParams_, opts...)
17783	res, err := c.doRequest("json")
17784	if res != nil && res.StatusCode == http.StatusNotModified {
17785		if res.Body != nil {
17786			res.Body.Close()
17787		}
17788		return nil, &googleapi.Error{
17789			Code:   res.StatusCode,
17790			Header: res.Header,
17791		}
17792	}
17793	if err != nil {
17794		return nil, err
17795	}
17796	defer googleapi.CloseBody(res)
17797	if err := googleapi.CheckResponse(res); err != nil {
17798		return nil, err
17799	}
17800	ret := &AdvertiserGroup{
17801		ServerResponse: googleapi.ServerResponse{
17802			Header:         res.Header,
17803			HTTPStatusCode: res.StatusCode,
17804		},
17805	}
17806	target := &ret
17807	if err := gensupport.DecodeResponse(target, res); err != nil {
17808		return nil, err
17809	}
17810	return ret, nil
17811	// {
17812	//   "description": "Gets one advertiser group by ID.",
17813	//   "httpMethod": "GET",
17814	//   "id": "dfareporting.advertiserGroups.get",
17815	//   "parameterOrder": [
17816	//     "profileId",
17817	//     "id"
17818	//   ],
17819	//   "parameters": {
17820	//     "id": {
17821	//       "description": "Advertiser group ID.",
17822	//       "format": "int64",
17823	//       "location": "path",
17824	//       "required": true,
17825	//       "type": "string"
17826	//     },
17827	//     "profileId": {
17828	//       "description": "User profile ID associated with this request.",
17829	//       "format": "int64",
17830	//       "location": "path",
17831	//       "required": true,
17832	//       "type": "string"
17833	//     }
17834	//   },
17835	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
17836	//   "response": {
17837	//     "$ref": "AdvertiserGroup"
17838	//   },
17839	//   "scopes": [
17840	//     "https://www.googleapis.com/auth/dfatrafficking"
17841	//   ]
17842	// }
17843
17844}
17845
17846// method id "dfareporting.advertiserGroups.insert":
17847
17848type AdvertiserGroupsInsertCall struct {
17849	s               *Service
17850	profileId       int64
17851	advertisergroup *AdvertiserGroup
17852	urlParams_      gensupport.URLParams
17853	ctx_            context.Context
17854	header_         http.Header
17855}
17856
17857// Insert: Inserts a new advertiser group.
17858func (r *AdvertiserGroupsService) Insert(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsInsertCall {
17859	c := &AdvertiserGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17860	c.profileId = profileId
17861	c.advertisergroup = advertisergroup
17862	return c
17863}
17864
17865// Fields allows partial responses to be retrieved. See
17866// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17867// for more information.
17868func (c *AdvertiserGroupsInsertCall) Fields(s ...googleapi.Field) *AdvertiserGroupsInsertCall {
17869	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17870	return c
17871}
17872
17873// Context sets the context to be used in this call's Do method. Any
17874// pending HTTP request will be aborted if the provided context is
17875// canceled.
17876func (c *AdvertiserGroupsInsertCall) Context(ctx context.Context) *AdvertiserGroupsInsertCall {
17877	c.ctx_ = ctx
17878	return c
17879}
17880
17881// Header returns an http.Header that can be modified by the caller to
17882// add HTTP headers to the request.
17883func (c *AdvertiserGroupsInsertCall) Header() http.Header {
17884	if c.header_ == nil {
17885		c.header_ = make(http.Header)
17886	}
17887	return c.header_
17888}
17889
17890func (c *AdvertiserGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
17891	reqHeaders := make(http.Header)
17892	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
17893	for k, v := range c.header_ {
17894		reqHeaders[k] = v
17895	}
17896	reqHeaders.Set("User-Agent", c.s.userAgent())
17897	var body io.Reader = nil
17898	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
17899	if err != nil {
17900		return nil, err
17901	}
17902	reqHeaders.Set("Content-Type", "application/json")
17903	c.urlParams_.Set("alt", alt)
17904	c.urlParams_.Set("prettyPrint", "false")
17905	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
17906	urls += "?" + c.urlParams_.Encode()
17907	req, err := http.NewRequest("POST", urls, body)
17908	if err != nil {
17909		return nil, err
17910	}
17911	req.Header = reqHeaders
17912	googleapi.Expand(req.URL, map[string]string{
17913		"profileId": strconv.FormatInt(c.profileId, 10),
17914	})
17915	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17916}
17917
17918// Do executes the "dfareporting.advertiserGroups.insert" call.
17919// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
17920// status code is an error. Response headers are in either
17921// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
17922// at all) in error.(*googleapi.Error).Header. Use
17923// googleapi.IsNotModified to check whether the returned error was
17924// because http.StatusNotModified was returned.
17925func (c *AdvertiserGroupsInsertCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
17926	gensupport.SetOptions(c.urlParams_, opts...)
17927	res, err := c.doRequest("json")
17928	if res != nil && res.StatusCode == http.StatusNotModified {
17929		if res.Body != nil {
17930			res.Body.Close()
17931		}
17932		return nil, &googleapi.Error{
17933			Code:   res.StatusCode,
17934			Header: res.Header,
17935		}
17936	}
17937	if err != nil {
17938		return nil, err
17939	}
17940	defer googleapi.CloseBody(res)
17941	if err := googleapi.CheckResponse(res); err != nil {
17942		return nil, err
17943	}
17944	ret := &AdvertiserGroup{
17945		ServerResponse: googleapi.ServerResponse{
17946			Header:         res.Header,
17947			HTTPStatusCode: res.StatusCode,
17948		},
17949	}
17950	target := &ret
17951	if err := gensupport.DecodeResponse(target, res); err != nil {
17952		return nil, err
17953	}
17954	return ret, nil
17955	// {
17956	//   "description": "Inserts a new advertiser group.",
17957	//   "httpMethod": "POST",
17958	//   "id": "dfareporting.advertiserGroups.insert",
17959	//   "parameterOrder": [
17960	//     "profileId"
17961	//   ],
17962	//   "parameters": {
17963	//     "profileId": {
17964	//       "description": "User profile ID associated with this request.",
17965	//       "format": "int64",
17966	//       "location": "path",
17967	//       "required": true,
17968	//       "type": "string"
17969	//     }
17970	//   },
17971	//   "path": "userprofiles/{profileId}/advertiserGroups",
17972	//   "request": {
17973	//     "$ref": "AdvertiserGroup"
17974	//   },
17975	//   "response": {
17976	//     "$ref": "AdvertiserGroup"
17977	//   },
17978	//   "scopes": [
17979	//     "https://www.googleapis.com/auth/dfatrafficking"
17980	//   ]
17981	// }
17982
17983}
17984
17985// method id "dfareporting.advertiserGroups.list":
17986
17987type AdvertiserGroupsListCall struct {
17988	s            *Service
17989	profileId    int64
17990	urlParams_   gensupport.URLParams
17991	ifNoneMatch_ string
17992	ctx_         context.Context
17993	header_      http.Header
17994}
17995
17996// List: Retrieves a list of advertiser groups, possibly filtered. This
17997// method supports paging.
17998func (r *AdvertiserGroupsService) List(profileId int64) *AdvertiserGroupsListCall {
17999	c := &AdvertiserGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18000	c.profileId = profileId
18001	return c
18002}
18003
18004// Ids sets the optional parameter "ids": Select only advertiser groups
18005// with these IDs.
18006func (c *AdvertiserGroupsListCall) Ids(ids ...int64) *AdvertiserGroupsListCall {
18007	var ids_ []string
18008	for _, v := range ids {
18009		ids_ = append(ids_, fmt.Sprint(v))
18010	}
18011	c.urlParams_.SetMulti("ids", ids_)
18012	return c
18013}
18014
18015// MaxResults sets the optional parameter "maxResults": Maximum number
18016// of results to return.
18017func (c *AdvertiserGroupsListCall) MaxResults(maxResults int64) *AdvertiserGroupsListCall {
18018	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18019	return c
18020}
18021
18022// PageToken sets the optional parameter "pageToken": Value of the
18023// nextPageToken from the previous result page.
18024func (c *AdvertiserGroupsListCall) PageToken(pageToken string) *AdvertiserGroupsListCall {
18025	c.urlParams_.Set("pageToken", pageToken)
18026	return c
18027}
18028
18029// SearchString sets the optional parameter "searchString": Allows
18030// searching for objects by name or ID. Wildcards (*) are allowed. For
18031// example, "advertiser*2015" will return objects with names like
18032// "advertiser group June 2015", "advertiser group April 2015", or
18033// simply "advertiser group 2015". Most of the searches also add
18034// wildcards implicitly at the start and the end of the search string.
18035// For example, a search string of "advertisergroup" will match objects
18036// with name "my advertisergroup", "advertisergroup 2015", or simply
18037// "advertisergroup".
18038func (c *AdvertiserGroupsListCall) SearchString(searchString string) *AdvertiserGroupsListCall {
18039	c.urlParams_.Set("searchString", searchString)
18040	return c
18041}
18042
18043// SortField sets the optional parameter "sortField": Field by which to
18044// sort the list.
18045//
18046// Possible values:
18047//   "ID" (default)
18048//   "NAME"
18049func (c *AdvertiserGroupsListCall) SortField(sortField string) *AdvertiserGroupsListCall {
18050	c.urlParams_.Set("sortField", sortField)
18051	return c
18052}
18053
18054// SortOrder sets the optional parameter "sortOrder": Order of sorted
18055// results.
18056//
18057// Possible values:
18058//   "ASCENDING" (default)
18059//   "DESCENDING"
18060func (c *AdvertiserGroupsListCall) SortOrder(sortOrder string) *AdvertiserGroupsListCall {
18061	c.urlParams_.Set("sortOrder", sortOrder)
18062	return c
18063}
18064
18065// Fields allows partial responses to be retrieved. See
18066// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18067// for more information.
18068func (c *AdvertiserGroupsListCall) Fields(s ...googleapi.Field) *AdvertiserGroupsListCall {
18069	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18070	return c
18071}
18072
18073// IfNoneMatch sets the optional parameter which makes the operation
18074// fail if the object's ETag matches the given value. This is useful for
18075// getting updates only after the object has changed since the last
18076// request. Use googleapi.IsNotModified to check whether the response
18077// error from Do is the result of In-None-Match.
18078func (c *AdvertiserGroupsListCall) IfNoneMatch(entityTag string) *AdvertiserGroupsListCall {
18079	c.ifNoneMatch_ = entityTag
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 *AdvertiserGroupsListCall) Context(ctx context.Context) *AdvertiserGroupsListCall {
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 *AdvertiserGroupsListCall) Header() http.Header {
18094	if c.header_ == nil {
18095		c.header_ = make(http.Header)
18096	}
18097	return c.header_
18098}
18099
18100func (c *AdvertiserGroupsListCall) doRequest(alt string) (*http.Response, error) {
18101	reqHeaders := make(http.Header)
18102	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
18103	for k, v := range c.header_ {
18104		reqHeaders[k] = v
18105	}
18106	reqHeaders.Set("User-Agent", c.s.userAgent())
18107	if c.ifNoneMatch_ != "" {
18108		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18109	}
18110	var body io.Reader = nil
18111	c.urlParams_.Set("alt", alt)
18112	c.urlParams_.Set("prettyPrint", "false")
18113	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18114	urls += "?" + c.urlParams_.Encode()
18115	req, err := http.NewRequest("GET", urls, body)
18116	if err != nil {
18117		return nil, err
18118	}
18119	req.Header = reqHeaders
18120	googleapi.Expand(req.URL, map[string]string{
18121		"profileId": strconv.FormatInt(c.profileId, 10),
18122	})
18123	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18124}
18125
18126// Do executes the "dfareporting.advertiserGroups.list" call.
18127// Exactly one of *AdvertiserGroupsListResponse or error will be
18128// non-nil. Any non-2xx status code is an error. Response headers are in
18129// either *AdvertiserGroupsListResponse.ServerResponse.Header or (if a
18130// response was returned at all) in error.(*googleapi.Error).Header. Use
18131// googleapi.IsNotModified to check whether the returned error was
18132// because http.StatusNotModified was returned.
18133func (c *AdvertiserGroupsListCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroupsListResponse, error) {
18134	gensupport.SetOptions(c.urlParams_, opts...)
18135	res, err := c.doRequest("json")
18136	if res != nil && res.StatusCode == http.StatusNotModified {
18137		if res.Body != nil {
18138			res.Body.Close()
18139		}
18140		return nil, &googleapi.Error{
18141			Code:   res.StatusCode,
18142			Header: res.Header,
18143		}
18144	}
18145	if err != nil {
18146		return nil, err
18147	}
18148	defer googleapi.CloseBody(res)
18149	if err := googleapi.CheckResponse(res); err != nil {
18150		return nil, err
18151	}
18152	ret := &AdvertiserGroupsListResponse{
18153		ServerResponse: googleapi.ServerResponse{
18154			Header:         res.Header,
18155			HTTPStatusCode: res.StatusCode,
18156		},
18157	}
18158	target := &ret
18159	if err := gensupport.DecodeResponse(target, res); err != nil {
18160		return nil, err
18161	}
18162	return ret, nil
18163	// {
18164	//   "description": "Retrieves a list of advertiser groups, possibly filtered. This method supports paging.",
18165	//   "httpMethod": "GET",
18166	//   "id": "dfareporting.advertiserGroups.list",
18167	//   "parameterOrder": [
18168	//     "profileId"
18169	//   ],
18170	//   "parameters": {
18171	//     "ids": {
18172	//       "description": "Select only advertiser groups with these IDs.",
18173	//       "format": "int64",
18174	//       "location": "query",
18175	//       "repeated": true,
18176	//       "type": "string"
18177	//     },
18178	//     "maxResults": {
18179	//       "default": "1000",
18180	//       "description": "Maximum number of results to return.",
18181	//       "format": "int32",
18182	//       "location": "query",
18183	//       "maximum": "1000",
18184	//       "minimum": "0",
18185	//       "type": "integer"
18186	//     },
18187	//     "pageToken": {
18188	//       "description": "Value of the nextPageToken from the previous result page.",
18189	//       "location": "query",
18190	//       "type": "string"
18191	//     },
18192	//     "profileId": {
18193	//       "description": "User profile ID associated with this request.",
18194	//       "format": "int64",
18195	//       "location": "path",
18196	//       "required": true,
18197	//       "type": "string"
18198	//     },
18199	//     "searchString": {
18200	//       "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\".",
18201	//       "location": "query",
18202	//       "type": "string"
18203	//     },
18204	//     "sortField": {
18205	//       "default": "ID",
18206	//       "description": "Field by which to sort the list.",
18207	//       "enum": [
18208	//         "ID",
18209	//         "NAME"
18210	//       ],
18211	//       "enumDescriptions": [
18212	//         "",
18213	//         ""
18214	//       ],
18215	//       "location": "query",
18216	//       "type": "string"
18217	//     },
18218	//     "sortOrder": {
18219	//       "default": "ASCENDING",
18220	//       "description": "Order of sorted results.",
18221	//       "enum": [
18222	//         "ASCENDING",
18223	//         "DESCENDING"
18224	//       ],
18225	//       "enumDescriptions": [
18226	//         "",
18227	//         ""
18228	//       ],
18229	//       "location": "query",
18230	//       "type": "string"
18231	//     }
18232	//   },
18233	//   "path": "userprofiles/{profileId}/advertiserGroups",
18234	//   "response": {
18235	//     "$ref": "AdvertiserGroupsListResponse"
18236	//   },
18237	//   "scopes": [
18238	//     "https://www.googleapis.com/auth/dfatrafficking"
18239	//   ]
18240	// }
18241
18242}
18243
18244// Pages invokes f for each page of results.
18245// A non-nil error returned from f will halt the iteration.
18246// The provided context supersedes any context provided to the Context method.
18247func (c *AdvertiserGroupsListCall) Pages(ctx context.Context, f func(*AdvertiserGroupsListResponse) error) error {
18248	c.ctx_ = ctx
18249	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18250	for {
18251		x, err := c.Do()
18252		if err != nil {
18253			return err
18254		}
18255		if err := f(x); err != nil {
18256			return err
18257		}
18258		if x.NextPageToken == "" {
18259			return nil
18260		}
18261		c.PageToken(x.NextPageToken)
18262	}
18263}
18264
18265// method id "dfareporting.advertiserGroups.patch":
18266
18267type AdvertiserGroupsPatchCall struct {
18268	s               *Service
18269	profileId       int64
18270	advertisergroup *AdvertiserGroup
18271	urlParams_      gensupport.URLParams
18272	ctx_            context.Context
18273	header_         http.Header
18274}
18275
18276// Patch: Updates an existing advertiser group. This method supports
18277// patch semantics.
18278func (r *AdvertiserGroupsService) Patch(profileId int64, id int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsPatchCall {
18279	c := &AdvertiserGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18280	c.profileId = profileId
18281	c.urlParams_.Set("id", fmt.Sprint(id))
18282	c.advertisergroup = advertisergroup
18283	return c
18284}
18285
18286// Fields allows partial responses to be retrieved. See
18287// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18288// for more information.
18289func (c *AdvertiserGroupsPatchCall) Fields(s ...googleapi.Field) *AdvertiserGroupsPatchCall {
18290	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18291	return c
18292}
18293
18294// Context sets the context to be used in this call's Do method. Any
18295// pending HTTP request will be aborted if the provided context is
18296// canceled.
18297func (c *AdvertiserGroupsPatchCall) Context(ctx context.Context) *AdvertiserGroupsPatchCall {
18298	c.ctx_ = ctx
18299	return c
18300}
18301
18302// Header returns an http.Header that can be modified by the caller to
18303// add HTTP headers to the request.
18304func (c *AdvertiserGroupsPatchCall) Header() http.Header {
18305	if c.header_ == nil {
18306		c.header_ = make(http.Header)
18307	}
18308	return c.header_
18309}
18310
18311func (c *AdvertiserGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
18312	reqHeaders := make(http.Header)
18313	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
18314	for k, v := range c.header_ {
18315		reqHeaders[k] = v
18316	}
18317	reqHeaders.Set("User-Agent", c.s.userAgent())
18318	var body io.Reader = nil
18319	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18320	if err != nil {
18321		return nil, err
18322	}
18323	reqHeaders.Set("Content-Type", "application/json")
18324	c.urlParams_.Set("alt", alt)
18325	c.urlParams_.Set("prettyPrint", "false")
18326	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18327	urls += "?" + c.urlParams_.Encode()
18328	req, err := http.NewRequest("PATCH", urls, body)
18329	if err != nil {
18330		return nil, err
18331	}
18332	req.Header = reqHeaders
18333	googleapi.Expand(req.URL, map[string]string{
18334		"profileId": strconv.FormatInt(c.profileId, 10),
18335	})
18336	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18337}
18338
18339// Do executes the "dfareporting.advertiserGroups.patch" call.
18340// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18341// status code is an error. Response headers are in either
18342// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18343// at all) in error.(*googleapi.Error).Header. Use
18344// googleapi.IsNotModified to check whether the returned error was
18345// because http.StatusNotModified was returned.
18346func (c *AdvertiserGroupsPatchCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18347	gensupport.SetOptions(c.urlParams_, opts...)
18348	res, err := c.doRequest("json")
18349	if res != nil && res.StatusCode == http.StatusNotModified {
18350		if res.Body != nil {
18351			res.Body.Close()
18352		}
18353		return nil, &googleapi.Error{
18354			Code:   res.StatusCode,
18355			Header: res.Header,
18356		}
18357	}
18358	if err != nil {
18359		return nil, err
18360	}
18361	defer googleapi.CloseBody(res)
18362	if err := googleapi.CheckResponse(res); err != nil {
18363		return nil, err
18364	}
18365	ret := &AdvertiserGroup{
18366		ServerResponse: googleapi.ServerResponse{
18367			Header:         res.Header,
18368			HTTPStatusCode: res.StatusCode,
18369		},
18370	}
18371	target := &ret
18372	if err := gensupport.DecodeResponse(target, res); err != nil {
18373		return nil, err
18374	}
18375	return ret, nil
18376	// {
18377	//   "description": "Updates an existing advertiser group. This method supports patch semantics.",
18378	//   "httpMethod": "PATCH",
18379	//   "id": "dfareporting.advertiserGroups.patch",
18380	//   "parameterOrder": [
18381	//     "profileId",
18382	//     "id"
18383	//   ],
18384	//   "parameters": {
18385	//     "id": {
18386	//       "description": "Advertiser group ID.",
18387	//       "format": "int64",
18388	//       "location": "query",
18389	//       "required": true,
18390	//       "type": "string"
18391	//     },
18392	//     "profileId": {
18393	//       "description": "User profile ID associated with this request.",
18394	//       "format": "int64",
18395	//       "location": "path",
18396	//       "required": true,
18397	//       "type": "string"
18398	//     }
18399	//   },
18400	//   "path": "userprofiles/{profileId}/advertiserGroups",
18401	//   "request": {
18402	//     "$ref": "AdvertiserGroup"
18403	//   },
18404	//   "response": {
18405	//     "$ref": "AdvertiserGroup"
18406	//   },
18407	//   "scopes": [
18408	//     "https://www.googleapis.com/auth/dfatrafficking"
18409	//   ]
18410	// }
18411
18412}
18413
18414// method id "dfareporting.advertiserGroups.update":
18415
18416type AdvertiserGroupsUpdateCall struct {
18417	s               *Service
18418	profileId       int64
18419	advertisergroup *AdvertiserGroup
18420	urlParams_      gensupport.URLParams
18421	ctx_            context.Context
18422	header_         http.Header
18423}
18424
18425// Update: Updates an existing advertiser group.
18426func (r *AdvertiserGroupsService) Update(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsUpdateCall {
18427	c := &AdvertiserGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18428	c.profileId = profileId
18429	c.advertisergroup = advertisergroup
18430	return c
18431}
18432
18433// Fields allows partial responses to be retrieved. See
18434// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18435// for more information.
18436func (c *AdvertiserGroupsUpdateCall) Fields(s ...googleapi.Field) *AdvertiserGroupsUpdateCall {
18437	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18438	return c
18439}
18440
18441// Context sets the context to be used in this call's Do method. Any
18442// pending HTTP request will be aborted if the provided context is
18443// canceled.
18444func (c *AdvertiserGroupsUpdateCall) Context(ctx context.Context) *AdvertiserGroupsUpdateCall {
18445	c.ctx_ = ctx
18446	return c
18447}
18448
18449// Header returns an http.Header that can be modified by the caller to
18450// add HTTP headers to the request.
18451func (c *AdvertiserGroupsUpdateCall) Header() http.Header {
18452	if c.header_ == nil {
18453		c.header_ = make(http.Header)
18454	}
18455	return c.header_
18456}
18457
18458func (c *AdvertiserGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
18459	reqHeaders := make(http.Header)
18460	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
18461	for k, v := range c.header_ {
18462		reqHeaders[k] = v
18463	}
18464	reqHeaders.Set("User-Agent", c.s.userAgent())
18465	var body io.Reader = nil
18466	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18467	if err != nil {
18468		return nil, err
18469	}
18470	reqHeaders.Set("Content-Type", "application/json")
18471	c.urlParams_.Set("alt", alt)
18472	c.urlParams_.Set("prettyPrint", "false")
18473	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18474	urls += "?" + c.urlParams_.Encode()
18475	req, err := http.NewRequest("PUT", urls, body)
18476	if err != nil {
18477		return nil, err
18478	}
18479	req.Header = reqHeaders
18480	googleapi.Expand(req.URL, map[string]string{
18481		"profileId": strconv.FormatInt(c.profileId, 10),
18482	})
18483	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18484}
18485
18486// Do executes the "dfareporting.advertiserGroups.update" call.
18487// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18488// status code is an error. Response headers are in either
18489// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18490// at all) in error.(*googleapi.Error).Header. Use
18491// googleapi.IsNotModified to check whether the returned error was
18492// because http.StatusNotModified was returned.
18493func (c *AdvertiserGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18494	gensupport.SetOptions(c.urlParams_, opts...)
18495	res, err := c.doRequest("json")
18496	if res != nil && res.StatusCode == http.StatusNotModified {
18497		if res.Body != nil {
18498			res.Body.Close()
18499		}
18500		return nil, &googleapi.Error{
18501			Code:   res.StatusCode,
18502			Header: res.Header,
18503		}
18504	}
18505	if err != nil {
18506		return nil, err
18507	}
18508	defer googleapi.CloseBody(res)
18509	if err := googleapi.CheckResponse(res); err != nil {
18510		return nil, err
18511	}
18512	ret := &AdvertiserGroup{
18513		ServerResponse: googleapi.ServerResponse{
18514			Header:         res.Header,
18515			HTTPStatusCode: res.StatusCode,
18516		},
18517	}
18518	target := &ret
18519	if err := gensupport.DecodeResponse(target, res); err != nil {
18520		return nil, err
18521	}
18522	return ret, nil
18523	// {
18524	//   "description": "Updates an existing advertiser group.",
18525	//   "httpMethod": "PUT",
18526	//   "id": "dfareporting.advertiserGroups.update",
18527	//   "parameterOrder": [
18528	//     "profileId"
18529	//   ],
18530	//   "parameters": {
18531	//     "profileId": {
18532	//       "description": "User profile ID associated with this request.",
18533	//       "format": "int64",
18534	//       "location": "path",
18535	//       "required": true,
18536	//       "type": "string"
18537	//     }
18538	//   },
18539	//   "path": "userprofiles/{profileId}/advertiserGroups",
18540	//   "request": {
18541	//     "$ref": "AdvertiserGroup"
18542	//   },
18543	//   "response": {
18544	//     "$ref": "AdvertiserGroup"
18545	//   },
18546	//   "scopes": [
18547	//     "https://www.googleapis.com/auth/dfatrafficking"
18548	//   ]
18549	// }
18550
18551}
18552
18553// method id "dfareporting.advertiserLandingPages.get":
18554
18555type AdvertiserLandingPagesGetCall struct {
18556	s            *Service
18557	profileId    int64
18558	id           int64
18559	urlParams_   gensupport.URLParams
18560	ifNoneMatch_ string
18561	ctx_         context.Context
18562	header_      http.Header
18563}
18564
18565// Get: Gets one landing page by ID.
18566func (r *AdvertiserLandingPagesService) Get(profileId int64, id int64) *AdvertiserLandingPagesGetCall {
18567	c := &AdvertiserLandingPagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18568	c.profileId = profileId
18569	c.id = id
18570	return c
18571}
18572
18573// Fields allows partial responses to be retrieved. See
18574// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18575// for more information.
18576func (c *AdvertiserLandingPagesGetCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesGetCall {
18577	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18578	return c
18579}
18580
18581// IfNoneMatch sets the optional parameter which makes the operation
18582// fail if the object's ETag matches the given value. This is useful for
18583// getting updates only after the object has changed since the last
18584// request. Use googleapi.IsNotModified to check whether the response
18585// error from Do is the result of In-None-Match.
18586func (c *AdvertiserLandingPagesGetCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesGetCall {
18587	c.ifNoneMatch_ = entityTag
18588	return c
18589}
18590
18591// Context sets the context to be used in this call's Do method. Any
18592// pending HTTP request will be aborted if the provided context is
18593// canceled.
18594func (c *AdvertiserLandingPagesGetCall) Context(ctx context.Context) *AdvertiserLandingPagesGetCall {
18595	c.ctx_ = ctx
18596	return c
18597}
18598
18599// Header returns an http.Header that can be modified by the caller to
18600// add HTTP headers to the request.
18601func (c *AdvertiserLandingPagesGetCall) Header() http.Header {
18602	if c.header_ == nil {
18603		c.header_ = make(http.Header)
18604	}
18605	return c.header_
18606}
18607
18608func (c *AdvertiserLandingPagesGetCall) doRequest(alt string) (*http.Response, error) {
18609	reqHeaders := make(http.Header)
18610	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
18611	for k, v := range c.header_ {
18612		reqHeaders[k] = v
18613	}
18614	reqHeaders.Set("User-Agent", c.s.userAgent())
18615	if c.ifNoneMatch_ != "" {
18616		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18617	}
18618	var body io.Reader = nil
18619	c.urlParams_.Set("alt", alt)
18620	c.urlParams_.Set("prettyPrint", "false")
18621	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages/{id}")
18622	urls += "?" + c.urlParams_.Encode()
18623	req, err := http.NewRequest("GET", urls, body)
18624	if err != nil {
18625		return nil, err
18626	}
18627	req.Header = reqHeaders
18628	googleapi.Expand(req.URL, map[string]string{
18629		"profileId": strconv.FormatInt(c.profileId, 10),
18630		"id":        strconv.FormatInt(c.id, 10),
18631	})
18632	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18633}
18634
18635// Do executes the "dfareporting.advertiserLandingPages.get" call.
18636// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
18637// status code is an error. Response headers are in either
18638// *LandingPage.ServerResponse.Header or (if a response was returned at
18639// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18640// to check whether the returned error was because
18641// http.StatusNotModified was returned.
18642func (c *AdvertiserLandingPagesGetCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
18643	gensupport.SetOptions(c.urlParams_, opts...)
18644	res, err := c.doRequest("json")
18645	if res != nil && res.StatusCode == http.StatusNotModified {
18646		if res.Body != nil {
18647			res.Body.Close()
18648		}
18649		return nil, &googleapi.Error{
18650			Code:   res.StatusCode,
18651			Header: res.Header,
18652		}
18653	}
18654	if err != nil {
18655		return nil, err
18656	}
18657	defer googleapi.CloseBody(res)
18658	if err := googleapi.CheckResponse(res); err != nil {
18659		return nil, err
18660	}
18661	ret := &LandingPage{
18662		ServerResponse: googleapi.ServerResponse{
18663			Header:         res.Header,
18664			HTTPStatusCode: res.StatusCode,
18665		},
18666	}
18667	target := &ret
18668	if err := gensupport.DecodeResponse(target, res); err != nil {
18669		return nil, err
18670	}
18671	return ret, nil
18672	// {
18673	//   "description": "Gets one landing page by ID.",
18674	//   "httpMethod": "GET",
18675	//   "id": "dfareporting.advertiserLandingPages.get",
18676	//   "parameterOrder": [
18677	//     "profileId",
18678	//     "id"
18679	//   ],
18680	//   "parameters": {
18681	//     "id": {
18682	//       "description": "Landing page ID.",
18683	//       "format": "int64",
18684	//       "location": "path",
18685	//       "required": true,
18686	//       "type": "string"
18687	//     },
18688	//     "profileId": {
18689	//       "description": "User profile ID associated with this request.",
18690	//       "format": "int64",
18691	//       "location": "path",
18692	//       "required": true,
18693	//       "type": "string"
18694	//     }
18695	//   },
18696	//   "path": "userprofiles/{profileId}/advertiserLandingPages/{id}",
18697	//   "response": {
18698	//     "$ref": "LandingPage"
18699	//   },
18700	//   "scopes": [
18701	//     "https://www.googleapis.com/auth/dfatrafficking"
18702	//   ]
18703	// }
18704
18705}
18706
18707// method id "dfareporting.advertiserLandingPages.insert":
18708
18709type AdvertiserLandingPagesInsertCall struct {
18710	s           *Service
18711	profileId   int64
18712	landingpage *LandingPage
18713	urlParams_  gensupport.URLParams
18714	ctx_        context.Context
18715	header_     http.Header
18716}
18717
18718// Insert: Inserts a new landing page.
18719func (r *AdvertiserLandingPagesService) Insert(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesInsertCall {
18720	c := &AdvertiserLandingPagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18721	c.profileId = profileId
18722	c.landingpage = landingpage
18723	return c
18724}
18725
18726// Fields allows partial responses to be retrieved. See
18727// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18728// for more information.
18729func (c *AdvertiserLandingPagesInsertCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesInsertCall {
18730	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18731	return c
18732}
18733
18734// Context sets the context to be used in this call's Do method. Any
18735// pending HTTP request will be aborted if the provided context is
18736// canceled.
18737func (c *AdvertiserLandingPagesInsertCall) Context(ctx context.Context) *AdvertiserLandingPagesInsertCall {
18738	c.ctx_ = ctx
18739	return c
18740}
18741
18742// Header returns an http.Header that can be modified by the caller to
18743// add HTTP headers to the request.
18744func (c *AdvertiserLandingPagesInsertCall) Header() http.Header {
18745	if c.header_ == nil {
18746		c.header_ = make(http.Header)
18747	}
18748	return c.header_
18749}
18750
18751func (c *AdvertiserLandingPagesInsertCall) doRequest(alt string) (*http.Response, error) {
18752	reqHeaders := make(http.Header)
18753	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
18754	for k, v := range c.header_ {
18755		reqHeaders[k] = v
18756	}
18757	reqHeaders.Set("User-Agent", c.s.userAgent())
18758	var body io.Reader = nil
18759	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
18760	if err != nil {
18761		return nil, err
18762	}
18763	reqHeaders.Set("Content-Type", "application/json")
18764	c.urlParams_.Set("alt", alt)
18765	c.urlParams_.Set("prettyPrint", "false")
18766	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
18767	urls += "?" + c.urlParams_.Encode()
18768	req, err := http.NewRequest("POST", urls, body)
18769	if err != nil {
18770		return nil, err
18771	}
18772	req.Header = reqHeaders
18773	googleapi.Expand(req.URL, map[string]string{
18774		"profileId": strconv.FormatInt(c.profileId, 10),
18775	})
18776	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18777}
18778
18779// Do executes the "dfareporting.advertiserLandingPages.insert" call.
18780// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
18781// status code is an error. Response headers are in either
18782// *LandingPage.ServerResponse.Header or (if a response was returned at
18783// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18784// to check whether the returned error was because
18785// http.StatusNotModified was returned.
18786func (c *AdvertiserLandingPagesInsertCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
18787	gensupport.SetOptions(c.urlParams_, opts...)
18788	res, err := c.doRequest("json")
18789	if res != nil && res.StatusCode == http.StatusNotModified {
18790		if res.Body != nil {
18791			res.Body.Close()
18792		}
18793		return nil, &googleapi.Error{
18794			Code:   res.StatusCode,
18795			Header: res.Header,
18796		}
18797	}
18798	if err != nil {
18799		return nil, err
18800	}
18801	defer googleapi.CloseBody(res)
18802	if err := googleapi.CheckResponse(res); err != nil {
18803		return nil, err
18804	}
18805	ret := &LandingPage{
18806		ServerResponse: googleapi.ServerResponse{
18807			Header:         res.Header,
18808			HTTPStatusCode: res.StatusCode,
18809		},
18810	}
18811	target := &ret
18812	if err := gensupport.DecodeResponse(target, res); err != nil {
18813		return nil, err
18814	}
18815	return ret, nil
18816	// {
18817	//   "description": "Inserts a new landing page.",
18818	//   "httpMethod": "POST",
18819	//   "id": "dfareporting.advertiserLandingPages.insert",
18820	//   "parameterOrder": [
18821	//     "profileId"
18822	//   ],
18823	//   "parameters": {
18824	//     "profileId": {
18825	//       "description": "User profile ID associated with this request.",
18826	//       "format": "int64",
18827	//       "location": "path",
18828	//       "required": true,
18829	//       "type": "string"
18830	//     }
18831	//   },
18832	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
18833	//   "request": {
18834	//     "$ref": "LandingPage"
18835	//   },
18836	//   "response": {
18837	//     "$ref": "LandingPage"
18838	//   },
18839	//   "scopes": [
18840	//     "https://www.googleapis.com/auth/dfatrafficking"
18841	//   ]
18842	// }
18843
18844}
18845
18846// method id "dfareporting.advertiserLandingPages.list":
18847
18848type AdvertiserLandingPagesListCall struct {
18849	s            *Service
18850	profileId    int64
18851	urlParams_   gensupport.URLParams
18852	ifNoneMatch_ string
18853	ctx_         context.Context
18854	header_      http.Header
18855}
18856
18857// List: Retrieves a list of landing pages.
18858func (r *AdvertiserLandingPagesService) List(profileId int64) *AdvertiserLandingPagesListCall {
18859	c := &AdvertiserLandingPagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18860	c.profileId = profileId
18861	return c
18862}
18863
18864// AdvertiserIds sets the optional parameter "advertiserIds": Select
18865// only landing pages that belong to these advertisers.
18866func (c *AdvertiserLandingPagesListCall) AdvertiserIds(advertiserIds ...int64) *AdvertiserLandingPagesListCall {
18867	var advertiserIds_ []string
18868	for _, v := range advertiserIds {
18869		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
18870	}
18871	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
18872	return c
18873}
18874
18875// Archived sets the optional parameter "archived": Select only archived
18876// landing pages. Don't set this field to select both archived and
18877// non-archived landing pages.
18878func (c *AdvertiserLandingPagesListCall) Archived(archived bool) *AdvertiserLandingPagesListCall {
18879	c.urlParams_.Set("archived", fmt.Sprint(archived))
18880	return c
18881}
18882
18883// Ids sets the optional parameter "ids": Select only landing pages with
18884// these IDs.
18885func (c *AdvertiserLandingPagesListCall) Ids(ids ...int64) *AdvertiserLandingPagesListCall {
18886	var ids_ []string
18887	for _, v := range ids {
18888		ids_ = append(ids_, fmt.Sprint(v))
18889	}
18890	c.urlParams_.SetMulti("ids", ids_)
18891	return c
18892}
18893
18894// MaxResults sets the optional parameter "maxResults": Maximum number
18895// of results to return.
18896func (c *AdvertiserLandingPagesListCall) MaxResults(maxResults int64) *AdvertiserLandingPagesListCall {
18897	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18898	return c
18899}
18900
18901// PageToken sets the optional parameter "pageToken": Value of the
18902// nextPageToken from the previous result page.
18903func (c *AdvertiserLandingPagesListCall) PageToken(pageToken string) *AdvertiserLandingPagesListCall {
18904	c.urlParams_.Set("pageToken", pageToken)
18905	return c
18906}
18907
18908// SearchString sets the optional parameter "searchString": Allows
18909// searching for landing pages by name or ID. Wildcards (*) are allowed.
18910// For example, "landingpage*2017" will return landing pages with names
18911// like "landingpage July 2017", "landingpage March 2017", or simply
18912// "landingpage 2017". Most of the searches also add wildcards
18913// implicitly at the start and the end of the search string. For
18914// example, a search string of "landingpage" will match campaigns with
18915// name "my landingpage", "landingpage 2015", or simply "landingpage".
18916func (c *AdvertiserLandingPagesListCall) SearchString(searchString string) *AdvertiserLandingPagesListCall {
18917	c.urlParams_.Set("searchString", searchString)
18918	return c
18919}
18920
18921// SortField sets the optional parameter "sortField": Field by which to
18922// sort the list.
18923//
18924// Possible values:
18925//   "ID" (default)
18926//   "NAME"
18927func (c *AdvertiserLandingPagesListCall) SortField(sortField string) *AdvertiserLandingPagesListCall {
18928	c.urlParams_.Set("sortField", sortField)
18929	return c
18930}
18931
18932// SortOrder sets the optional parameter "sortOrder": Order of sorted
18933// results.
18934//
18935// Possible values:
18936//   "ASCENDING" (default)
18937//   "DESCENDING"
18938func (c *AdvertiserLandingPagesListCall) SortOrder(sortOrder string) *AdvertiserLandingPagesListCall {
18939	c.urlParams_.Set("sortOrder", sortOrder)
18940	return c
18941}
18942
18943// SubaccountId sets the optional parameter "subaccountId": Select only
18944// landing pages that belong to this subaccount.
18945func (c *AdvertiserLandingPagesListCall) SubaccountId(subaccountId int64) *AdvertiserLandingPagesListCall {
18946	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
18947	return c
18948}
18949
18950// Fields allows partial responses to be retrieved. See
18951// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18952// for more information.
18953func (c *AdvertiserLandingPagesListCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesListCall {
18954	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18955	return c
18956}
18957
18958// IfNoneMatch sets the optional parameter which makes the operation
18959// fail if the object's ETag matches the given value. This is useful for
18960// getting updates only after the object has changed since the last
18961// request. Use googleapi.IsNotModified to check whether the response
18962// error from Do is the result of In-None-Match.
18963func (c *AdvertiserLandingPagesListCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesListCall {
18964	c.ifNoneMatch_ = entityTag
18965	return c
18966}
18967
18968// Context sets the context to be used in this call's Do method. Any
18969// pending HTTP request will be aborted if the provided context is
18970// canceled.
18971func (c *AdvertiserLandingPagesListCall) Context(ctx context.Context) *AdvertiserLandingPagesListCall {
18972	c.ctx_ = ctx
18973	return c
18974}
18975
18976// Header returns an http.Header that can be modified by the caller to
18977// add HTTP headers to the request.
18978func (c *AdvertiserLandingPagesListCall) Header() http.Header {
18979	if c.header_ == nil {
18980		c.header_ = make(http.Header)
18981	}
18982	return c.header_
18983}
18984
18985func (c *AdvertiserLandingPagesListCall) doRequest(alt string) (*http.Response, error) {
18986	reqHeaders := make(http.Header)
18987	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
18988	for k, v := range c.header_ {
18989		reqHeaders[k] = v
18990	}
18991	reqHeaders.Set("User-Agent", c.s.userAgent())
18992	if c.ifNoneMatch_ != "" {
18993		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18994	}
18995	var body io.Reader = nil
18996	c.urlParams_.Set("alt", alt)
18997	c.urlParams_.Set("prettyPrint", "false")
18998	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
18999	urls += "?" + c.urlParams_.Encode()
19000	req, err := http.NewRequest("GET", urls, body)
19001	if err != nil {
19002		return nil, err
19003	}
19004	req.Header = reqHeaders
19005	googleapi.Expand(req.URL, map[string]string{
19006		"profileId": strconv.FormatInt(c.profileId, 10),
19007	})
19008	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19009}
19010
19011// Do executes the "dfareporting.advertiserLandingPages.list" call.
19012// Exactly one of *AdvertiserLandingPagesListResponse or error will be
19013// non-nil. Any non-2xx status code is an error. Response headers are in
19014// either *AdvertiserLandingPagesListResponse.ServerResponse.Header or
19015// (if a response was returned at all) in
19016// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19017// whether the returned error was because http.StatusNotModified was
19018// returned.
19019func (c *AdvertiserLandingPagesListCall) Do(opts ...googleapi.CallOption) (*AdvertiserLandingPagesListResponse, error) {
19020	gensupport.SetOptions(c.urlParams_, opts...)
19021	res, err := c.doRequest("json")
19022	if res != nil && res.StatusCode == http.StatusNotModified {
19023		if res.Body != nil {
19024			res.Body.Close()
19025		}
19026		return nil, &googleapi.Error{
19027			Code:   res.StatusCode,
19028			Header: res.Header,
19029		}
19030	}
19031	if err != nil {
19032		return nil, err
19033	}
19034	defer googleapi.CloseBody(res)
19035	if err := googleapi.CheckResponse(res); err != nil {
19036		return nil, err
19037	}
19038	ret := &AdvertiserLandingPagesListResponse{
19039		ServerResponse: googleapi.ServerResponse{
19040			Header:         res.Header,
19041			HTTPStatusCode: res.StatusCode,
19042		},
19043	}
19044	target := &ret
19045	if err := gensupport.DecodeResponse(target, res); err != nil {
19046		return nil, err
19047	}
19048	return ret, nil
19049	// {
19050	//   "description": "Retrieves a list of landing pages.",
19051	//   "httpMethod": "GET",
19052	//   "id": "dfareporting.advertiserLandingPages.list",
19053	//   "parameterOrder": [
19054	//     "profileId"
19055	//   ],
19056	//   "parameters": {
19057	//     "advertiserIds": {
19058	//       "description": "Select only landing pages that belong to these advertisers.",
19059	//       "format": "int64",
19060	//       "location": "query",
19061	//       "repeated": true,
19062	//       "type": "string"
19063	//     },
19064	//     "archived": {
19065	//       "description": "Select only archived landing pages. Don't set this field to select both archived and non-archived landing pages.",
19066	//       "location": "query",
19067	//       "type": "boolean"
19068	//     },
19069	//     "ids": {
19070	//       "description": "Select only landing pages with these IDs.",
19071	//       "format": "int64",
19072	//       "location": "query",
19073	//       "repeated": true,
19074	//       "type": "string"
19075	//     },
19076	//     "maxResults": {
19077	//       "default": "1000",
19078	//       "description": "Maximum number of results to return.",
19079	//       "format": "int32",
19080	//       "location": "query",
19081	//       "maximum": "1000",
19082	//       "minimum": "0",
19083	//       "type": "integer"
19084	//     },
19085	//     "pageToken": {
19086	//       "description": "Value of the nextPageToken from the previous result page.",
19087	//       "location": "query",
19088	//       "type": "string"
19089	//     },
19090	//     "profileId": {
19091	//       "description": "User profile ID associated with this request.",
19092	//       "format": "int64",
19093	//       "location": "path",
19094	//       "required": true,
19095	//       "type": "string"
19096	//     },
19097	//     "searchString": {
19098	//       "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\".",
19099	//       "location": "query",
19100	//       "type": "string"
19101	//     },
19102	//     "sortField": {
19103	//       "default": "ID",
19104	//       "description": "Field by which to sort the list.",
19105	//       "enum": [
19106	//         "ID",
19107	//         "NAME"
19108	//       ],
19109	//       "enumDescriptions": [
19110	//         "",
19111	//         ""
19112	//       ],
19113	//       "location": "query",
19114	//       "type": "string"
19115	//     },
19116	//     "sortOrder": {
19117	//       "default": "ASCENDING",
19118	//       "description": "Order of sorted results.",
19119	//       "enum": [
19120	//         "ASCENDING",
19121	//         "DESCENDING"
19122	//       ],
19123	//       "enumDescriptions": [
19124	//         "",
19125	//         ""
19126	//       ],
19127	//       "location": "query",
19128	//       "type": "string"
19129	//     },
19130	//     "subaccountId": {
19131	//       "description": "Select only landing pages that belong to this subaccount.",
19132	//       "format": "int64",
19133	//       "location": "query",
19134	//       "type": "string"
19135	//     }
19136	//   },
19137	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19138	//   "response": {
19139	//     "$ref": "AdvertiserLandingPagesListResponse"
19140	//   },
19141	//   "scopes": [
19142	//     "https://www.googleapis.com/auth/dfatrafficking"
19143	//   ]
19144	// }
19145
19146}
19147
19148// Pages invokes f for each page of results.
19149// A non-nil error returned from f will halt the iteration.
19150// The provided context supersedes any context provided to the Context method.
19151func (c *AdvertiserLandingPagesListCall) Pages(ctx context.Context, f func(*AdvertiserLandingPagesListResponse) error) error {
19152	c.ctx_ = ctx
19153	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19154	for {
19155		x, err := c.Do()
19156		if err != nil {
19157			return err
19158		}
19159		if err := f(x); err != nil {
19160			return err
19161		}
19162		if x.NextPageToken == "" {
19163			return nil
19164		}
19165		c.PageToken(x.NextPageToken)
19166	}
19167}
19168
19169// method id "dfareporting.advertiserLandingPages.patch":
19170
19171type AdvertiserLandingPagesPatchCall struct {
19172	s           *Service
19173	profileId   int64
19174	landingpage *LandingPage
19175	urlParams_  gensupport.URLParams
19176	ctx_        context.Context
19177	header_     http.Header
19178}
19179
19180// Patch: Updates an existing landing page. This method supports patch
19181// semantics.
19182func (r *AdvertiserLandingPagesService) Patch(profileId int64, id int64, landingpage *LandingPage) *AdvertiserLandingPagesPatchCall {
19183	c := &AdvertiserLandingPagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19184	c.profileId = profileId
19185	c.urlParams_.Set("id", fmt.Sprint(id))
19186	c.landingpage = landingpage
19187	return c
19188}
19189
19190// Fields allows partial responses to be retrieved. See
19191// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19192// for more information.
19193func (c *AdvertiserLandingPagesPatchCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesPatchCall {
19194	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19195	return c
19196}
19197
19198// Context sets the context to be used in this call's Do method. Any
19199// pending HTTP request will be aborted if the provided context is
19200// canceled.
19201func (c *AdvertiserLandingPagesPatchCall) Context(ctx context.Context) *AdvertiserLandingPagesPatchCall {
19202	c.ctx_ = ctx
19203	return c
19204}
19205
19206// Header returns an http.Header that can be modified by the caller to
19207// add HTTP headers to the request.
19208func (c *AdvertiserLandingPagesPatchCall) Header() http.Header {
19209	if c.header_ == nil {
19210		c.header_ = make(http.Header)
19211	}
19212	return c.header_
19213}
19214
19215func (c *AdvertiserLandingPagesPatchCall) doRequest(alt string) (*http.Response, error) {
19216	reqHeaders := make(http.Header)
19217	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
19218	for k, v := range c.header_ {
19219		reqHeaders[k] = v
19220	}
19221	reqHeaders.Set("User-Agent", c.s.userAgent())
19222	var body io.Reader = nil
19223	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19224	if err != nil {
19225		return nil, err
19226	}
19227	reqHeaders.Set("Content-Type", "application/json")
19228	c.urlParams_.Set("alt", alt)
19229	c.urlParams_.Set("prettyPrint", "false")
19230	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19231	urls += "?" + c.urlParams_.Encode()
19232	req, err := http.NewRequest("PATCH", urls, body)
19233	if err != nil {
19234		return nil, err
19235	}
19236	req.Header = reqHeaders
19237	googleapi.Expand(req.URL, map[string]string{
19238		"profileId": strconv.FormatInt(c.profileId, 10),
19239	})
19240	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19241}
19242
19243// Do executes the "dfareporting.advertiserLandingPages.patch" call.
19244// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
19245// status code is an error. Response headers are in either
19246// *LandingPage.ServerResponse.Header or (if a response was returned at
19247// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19248// to check whether the returned error was because
19249// http.StatusNotModified was returned.
19250func (c *AdvertiserLandingPagesPatchCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19251	gensupport.SetOptions(c.urlParams_, opts...)
19252	res, err := c.doRequest("json")
19253	if res != nil && res.StatusCode == http.StatusNotModified {
19254		if res.Body != nil {
19255			res.Body.Close()
19256		}
19257		return nil, &googleapi.Error{
19258			Code:   res.StatusCode,
19259			Header: res.Header,
19260		}
19261	}
19262	if err != nil {
19263		return nil, err
19264	}
19265	defer googleapi.CloseBody(res)
19266	if err := googleapi.CheckResponse(res); err != nil {
19267		return nil, err
19268	}
19269	ret := &LandingPage{
19270		ServerResponse: googleapi.ServerResponse{
19271			Header:         res.Header,
19272			HTTPStatusCode: res.StatusCode,
19273		},
19274	}
19275	target := &ret
19276	if err := gensupport.DecodeResponse(target, res); err != nil {
19277		return nil, err
19278	}
19279	return ret, nil
19280	// {
19281	//   "description": "Updates an existing landing page. This method supports patch semantics.",
19282	//   "httpMethod": "PATCH",
19283	//   "id": "dfareporting.advertiserLandingPages.patch",
19284	//   "parameterOrder": [
19285	//     "profileId",
19286	//     "id"
19287	//   ],
19288	//   "parameters": {
19289	//     "id": {
19290	//       "description": "Landing page ID.",
19291	//       "format": "int64",
19292	//       "location": "query",
19293	//       "required": true,
19294	//       "type": "string"
19295	//     },
19296	//     "profileId": {
19297	//       "description": "User profile ID associated with this request.",
19298	//       "format": "int64",
19299	//       "location": "path",
19300	//       "required": true,
19301	//       "type": "string"
19302	//     }
19303	//   },
19304	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19305	//   "request": {
19306	//     "$ref": "LandingPage"
19307	//   },
19308	//   "response": {
19309	//     "$ref": "LandingPage"
19310	//   },
19311	//   "scopes": [
19312	//     "https://www.googleapis.com/auth/dfatrafficking"
19313	//   ]
19314	// }
19315
19316}
19317
19318// method id "dfareporting.advertiserLandingPages.update":
19319
19320type AdvertiserLandingPagesUpdateCall struct {
19321	s           *Service
19322	profileId   int64
19323	landingpage *LandingPage
19324	urlParams_  gensupport.URLParams
19325	ctx_        context.Context
19326	header_     http.Header
19327}
19328
19329// Update: Updates an existing landing page.
19330func (r *AdvertiserLandingPagesService) Update(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesUpdateCall {
19331	c := &AdvertiserLandingPagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19332	c.profileId = profileId
19333	c.landingpage = landingpage
19334	return c
19335}
19336
19337// Fields allows partial responses to be retrieved. See
19338// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19339// for more information.
19340func (c *AdvertiserLandingPagesUpdateCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesUpdateCall {
19341	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19342	return c
19343}
19344
19345// Context sets the context to be used in this call's Do method. Any
19346// pending HTTP request will be aborted if the provided context is
19347// canceled.
19348func (c *AdvertiserLandingPagesUpdateCall) Context(ctx context.Context) *AdvertiserLandingPagesUpdateCall {
19349	c.ctx_ = ctx
19350	return c
19351}
19352
19353// Header returns an http.Header that can be modified by the caller to
19354// add HTTP headers to the request.
19355func (c *AdvertiserLandingPagesUpdateCall) Header() http.Header {
19356	if c.header_ == nil {
19357		c.header_ = make(http.Header)
19358	}
19359	return c.header_
19360}
19361
19362func (c *AdvertiserLandingPagesUpdateCall) doRequest(alt string) (*http.Response, error) {
19363	reqHeaders := make(http.Header)
19364	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
19365	for k, v := range c.header_ {
19366		reqHeaders[k] = v
19367	}
19368	reqHeaders.Set("User-Agent", c.s.userAgent())
19369	var body io.Reader = nil
19370	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19371	if err != nil {
19372		return nil, err
19373	}
19374	reqHeaders.Set("Content-Type", "application/json")
19375	c.urlParams_.Set("alt", alt)
19376	c.urlParams_.Set("prettyPrint", "false")
19377	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19378	urls += "?" + c.urlParams_.Encode()
19379	req, err := http.NewRequest("PUT", urls, body)
19380	if err != nil {
19381		return nil, err
19382	}
19383	req.Header = reqHeaders
19384	googleapi.Expand(req.URL, map[string]string{
19385		"profileId": strconv.FormatInt(c.profileId, 10),
19386	})
19387	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19388}
19389
19390// Do executes the "dfareporting.advertiserLandingPages.update" call.
19391// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
19392// status code is an error. Response headers are in either
19393// *LandingPage.ServerResponse.Header or (if a response was returned at
19394// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19395// to check whether the returned error was because
19396// http.StatusNotModified was returned.
19397func (c *AdvertiserLandingPagesUpdateCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19398	gensupport.SetOptions(c.urlParams_, opts...)
19399	res, err := c.doRequest("json")
19400	if res != nil && res.StatusCode == http.StatusNotModified {
19401		if res.Body != nil {
19402			res.Body.Close()
19403		}
19404		return nil, &googleapi.Error{
19405			Code:   res.StatusCode,
19406			Header: res.Header,
19407		}
19408	}
19409	if err != nil {
19410		return nil, err
19411	}
19412	defer googleapi.CloseBody(res)
19413	if err := googleapi.CheckResponse(res); err != nil {
19414		return nil, err
19415	}
19416	ret := &LandingPage{
19417		ServerResponse: googleapi.ServerResponse{
19418			Header:         res.Header,
19419			HTTPStatusCode: res.StatusCode,
19420		},
19421	}
19422	target := &ret
19423	if err := gensupport.DecodeResponse(target, res); err != nil {
19424		return nil, err
19425	}
19426	return ret, nil
19427	// {
19428	//   "description": "Updates an existing landing page.",
19429	//   "httpMethod": "PUT",
19430	//   "id": "dfareporting.advertiserLandingPages.update",
19431	//   "parameterOrder": [
19432	//     "profileId"
19433	//   ],
19434	//   "parameters": {
19435	//     "profileId": {
19436	//       "description": "User profile ID associated with this request.",
19437	//       "format": "int64",
19438	//       "location": "path",
19439	//       "required": true,
19440	//       "type": "string"
19441	//     }
19442	//   },
19443	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19444	//   "request": {
19445	//     "$ref": "LandingPage"
19446	//   },
19447	//   "response": {
19448	//     "$ref": "LandingPage"
19449	//   },
19450	//   "scopes": [
19451	//     "https://www.googleapis.com/auth/dfatrafficking"
19452	//   ]
19453	// }
19454
19455}
19456
19457// method id "dfareporting.advertisers.get":
19458
19459type AdvertisersGetCall struct {
19460	s            *Service
19461	profileId    int64
19462	id           int64
19463	urlParams_   gensupport.URLParams
19464	ifNoneMatch_ string
19465	ctx_         context.Context
19466	header_      http.Header
19467}
19468
19469// Get: Gets one advertiser by ID.
19470func (r *AdvertisersService) Get(profileId int64, id int64) *AdvertisersGetCall {
19471	c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19472	c.profileId = profileId
19473	c.id = id
19474	return c
19475}
19476
19477// Fields allows partial responses to be retrieved. See
19478// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19479// for more information.
19480func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall {
19481	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19482	return c
19483}
19484
19485// IfNoneMatch sets the optional parameter which makes the operation
19486// fail if the object's ETag matches the given value. This is useful for
19487// getting updates only after the object has changed since the last
19488// request. Use googleapi.IsNotModified to check whether the response
19489// error from Do is the result of In-None-Match.
19490func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall {
19491	c.ifNoneMatch_ = entityTag
19492	return c
19493}
19494
19495// Context sets the context to be used in this call's Do method. Any
19496// pending HTTP request will be aborted if the provided context is
19497// canceled.
19498func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
19499	c.ctx_ = ctx
19500	return c
19501}
19502
19503// Header returns an http.Header that can be modified by the caller to
19504// add HTTP headers to the request.
19505func (c *AdvertisersGetCall) Header() http.Header {
19506	if c.header_ == nil {
19507		c.header_ = make(http.Header)
19508	}
19509	return c.header_
19510}
19511
19512func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
19513	reqHeaders := make(http.Header)
19514	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
19515	for k, v := range c.header_ {
19516		reqHeaders[k] = v
19517	}
19518	reqHeaders.Set("User-Agent", c.s.userAgent())
19519	if c.ifNoneMatch_ != "" {
19520		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19521	}
19522	var body io.Reader = nil
19523	c.urlParams_.Set("alt", alt)
19524	c.urlParams_.Set("prettyPrint", "false")
19525	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers/{id}")
19526	urls += "?" + c.urlParams_.Encode()
19527	req, err := http.NewRequest("GET", urls, body)
19528	if err != nil {
19529		return nil, err
19530	}
19531	req.Header = reqHeaders
19532	googleapi.Expand(req.URL, map[string]string{
19533		"profileId": strconv.FormatInt(c.profileId, 10),
19534		"id":        strconv.FormatInt(c.id, 10),
19535	})
19536	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19537}
19538
19539// Do executes the "dfareporting.advertisers.get" call.
19540// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
19541// status code is an error. Response headers are in either
19542// *Advertiser.ServerResponse.Header or (if a response was returned at
19543// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19544// to check whether the returned error was because
19545// http.StatusNotModified was returned.
19546func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19547	gensupport.SetOptions(c.urlParams_, opts...)
19548	res, err := c.doRequest("json")
19549	if res != nil && res.StatusCode == http.StatusNotModified {
19550		if res.Body != nil {
19551			res.Body.Close()
19552		}
19553		return nil, &googleapi.Error{
19554			Code:   res.StatusCode,
19555			Header: res.Header,
19556		}
19557	}
19558	if err != nil {
19559		return nil, err
19560	}
19561	defer googleapi.CloseBody(res)
19562	if err := googleapi.CheckResponse(res); err != nil {
19563		return nil, err
19564	}
19565	ret := &Advertiser{
19566		ServerResponse: googleapi.ServerResponse{
19567			Header:         res.Header,
19568			HTTPStatusCode: res.StatusCode,
19569		},
19570	}
19571	target := &ret
19572	if err := gensupport.DecodeResponse(target, res); err != nil {
19573		return nil, err
19574	}
19575	return ret, nil
19576	// {
19577	//   "description": "Gets one advertiser by ID.",
19578	//   "httpMethod": "GET",
19579	//   "id": "dfareporting.advertisers.get",
19580	//   "parameterOrder": [
19581	//     "profileId",
19582	//     "id"
19583	//   ],
19584	//   "parameters": {
19585	//     "id": {
19586	//       "description": "Advertiser ID.",
19587	//       "format": "int64",
19588	//       "location": "path",
19589	//       "required": true,
19590	//       "type": "string"
19591	//     },
19592	//     "profileId": {
19593	//       "description": "User profile ID associated with this request.",
19594	//       "format": "int64",
19595	//       "location": "path",
19596	//       "required": true,
19597	//       "type": "string"
19598	//     }
19599	//   },
19600	//   "path": "userprofiles/{profileId}/advertisers/{id}",
19601	//   "response": {
19602	//     "$ref": "Advertiser"
19603	//   },
19604	//   "scopes": [
19605	//     "https://www.googleapis.com/auth/dfatrafficking"
19606	//   ]
19607	// }
19608
19609}
19610
19611// method id "dfareporting.advertisers.insert":
19612
19613type AdvertisersInsertCall struct {
19614	s          *Service
19615	profileId  int64
19616	advertiser *Advertiser
19617	urlParams_ gensupport.URLParams
19618	ctx_       context.Context
19619	header_    http.Header
19620}
19621
19622// Insert: Inserts a new advertiser.
19623func (r *AdvertisersService) Insert(profileId int64, advertiser *Advertiser) *AdvertisersInsertCall {
19624	c := &AdvertisersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19625	c.profileId = profileId
19626	c.advertiser = advertiser
19627	return c
19628}
19629
19630// Fields allows partial responses to be retrieved. See
19631// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19632// for more information.
19633func (c *AdvertisersInsertCall) Fields(s ...googleapi.Field) *AdvertisersInsertCall {
19634	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19635	return c
19636}
19637
19638// Context sets the context to be used in this call's Do method. Any
19639// pending HTTP request will be aborted if the provided context is
19640// canceled.
19641func (c *AdvertisersInsertCall) Context(ctx context.Context) *AdvertisersInsertCall {
19642	c.ctx_ = ctx
19643	return c
19644}
19645
19646// Header returns an http.Header that can be modified by the caller to
19647// add HTTP headers to the request.
19648func (c *AdvertisersInsertCall) Header() http.Header {
19649	if c.header_ == nil {
19650		c.header_ = make(http.Header)
19651	}
19652	return c.header_
19653}
19654
19655func (c *AdvertisersInsertCall) doRequest(alt string) (*http.Response, error) {
19656	reqHeaders := make(http.Header)
19657	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
19658	for k, v := range c.header_ {
19659		reqHeaders[k] = v
19660	}
19661	reqHeaders.Set("User-Agent", c.s.userAgent())
19662	var body io.Reader = nil
19663	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
19664	if err != nil {
19665		return nil, err
19666	}
19667	reqHeaders.Set("Content-Type", "application/json")
19668	c.urlParams_.Set("alt", alt)
19669	c.urlParams_.Set("prettyPrint", "false")
19670	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
19671	urls += "?" + c.urlParams_.Encode()
19672	req, err := http.NewRequest("POST", urls, body)
19673	if err != nil {
19674		return nil, err
19675	}
19676	req.Header = reqHeaders
19677	googleapi.Expand(req.URL, map[string]string{
19678		"profileId": strconv.FormatInt(c.profileId, 10),
19679	})
19680	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19681}
19682
19683// Do executes the "dfareporting.advertisers.insert" call.
19684// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
19685// status code is an error. Response headers are in either
19686// *Advertiser.ServerResponse.Header or (if a response was returned at
19687// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19688// to check whether the returned error was because
19689// http.StatusNotModified was returned.
19690func (c *AdvertisersInsertCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19691	gensupport.SetOptions(c.urlParams_, opts...)
19692	res, err := c.doRequest("json")
19693	if res != nil && res.StatusCode == http.StatusNotModified {
19694		if res.Body != nil {
19695			res.Body.Close()
19696		}
19697		return nil, &googleapi.Error{
19698			Code:   res.StatusCode,
19699			Header: res.Header,
19700		}
19701	}
19702	if err != nil {
19703		return nil, err
19704	}
19705	defer googleapi.CloseBody(res)
19706	if err := googleapi.CheckResponse(res); err != nil {
19707		return nil, err
19708	}
19709	ret := &Advertiser{
19710		ServerResponse: googleapi.ServerResponse{
19711			Header:         res.Header,
19712			HTTPStatusCode: res.StatusCode,
19713		},
19714	}
19715	target := &ret
19716	if err := gensupport.DecodeResponse(target, res); err != nil {
19717		return nil, err
19718	}
19719	return ret, nil
19720	// {
19721	//   "description": "Inserts a new advertiser.",
19722	//   "httpMethod": "POST",
19723	//   "id": "dfareporting.advertisers.insert",
19724	//   "parameterOrder": [
19725	//     "profileId"
19726	//   ],
19727	//   "parameters": {
19728	//     "profileId": {
19729	//       "description": "User profile ID associated with this request.",
19730	//       "format": "int64",
19731	//       "location": "path",
19732	//       "required": true,
19733	//       "type": "string"
19734	//     }
19735	//   },
19736	//   "path": "userprofiles/{profileId}/advertisers",
19737	//   "request": {
19738	//     "$ref": "Advertiser"
19739	//   },
19740	//   "response": {
19741	//     "$ref": "Advertiser"
19742	//   },
19743	//   "scopes": [
19744	//     "https://www.googleapis.com/auth/dfatrafficking"
19745	//   ]
19746	// }
19747
19748}
19749
19750// method id "dfareporting.advertisers.list":
19751
19752type AdvertisersListCall struct {
19753	s            *Service
19754	profileId    int64
19755	urlParams_   gensupport.URLParams
19756	ifNoneMatch_ string
19757	ctx_         context.Context
19758	header_      http.Header
19759}
19760
19761// List: Retrieves a list of advertisers, possibly filtered. This method
19762// supports paging.
19763func (r *AdvertisersService) List(profileId int64) *AdvertisersListCall {
19764	c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19765	c.profileId = profileId
19766	return c
19767}
19768
19769// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
19770// Select only advertisers with these advertiser group IDs.
19771func (c *AdvertisersListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *AdvertisersListCall {
19772	var advertiserGroupIds_ []string
19773	for _, v := range advertiserGroupIds {
19774		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
19775	}
19776	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
19777	return c
19778}
19779
19780// FloodlightConfigurationIds sets the optional parameter
19781// "floodlightConfigurationIds": Select only advertisers with these
19782// floodlight configuration IDs.
19783func (c *AdvertisersListCall) FloodlightConfigurationIds(floodlightConfigurationIds ...int64) *AdvertisersListCall {
19784	var floodlightConfigurationIds_ []string
19785	for _, v := range floodlightConfigurationIds {
19786		floodlightConfigurationIds_ = append(floodlightConfigurationIds_, fmt.Sprint(v))
19787	}
19788	c.urlParams_.SetMulti("floodlightConfigurationIds", floodlightConfigurationIds_)
19789	return c
19790}
19791
19792// Ids sets the optional parameter "ids": Select only advertisers with
19793// these IDs.
19794func (c *AdvertisersListCall) Ids(ids ...int64) *AdvertisersListCall {
19795	var ids_ []string
19796	for _, v := range ids {
19797		ids_ = append(ids_, fmt.Sprint(v))
19798	}
19799	c.urlParams_.SetMulti("ids", ids_)
19800	return c
19801}
19802
19803// IncludeAdvertisersWithoutGroupsOnly sets the optional parameter
19804// "includeAdvertisersWithoutGroupsOnly": Select only advertisers which
19805// do not belong to any advertiser group.
19806func (c *AdvertisersListCall) IncludeAdvertisersWithoutGroupsOnly(includeAdvertisersWithoutGroupsOnly bool) *AdvertisersListCall {
19807	c.urlParams_.Set("includeAdvertisersWithoutGroupsOnly", fmt.Sprint(includeAdvertisersWithoutGroupsOnly))
19808	return c
19809}
19810
19811// MaxResults sets the optional parameter "maxResults": Maximum number
19812// of results to return.
19813func (c *AdvertisersListCall) MaxResults(maxResults int64) *AdvertisersListCall {
19814	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19815	return c
19816}
19817
19818// OnlyParent sets the optional parameter "onlyParent": Select only
19819// advertisers which use another advertiser's floodlight configuration.
19820func (c *AdvertisersListCall) OnlyParent(onlyParent bool) *AdvertisersListCall {
19821	c.urlParams_.Set("onlyParent", fmt.Sprint(onlyParent))
19822	return c
19823}
19824
19825// PageToken sets the optional parameter "pageToken": Value of the
19826// nextPageToken from the previous result page.
19827func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall {
19828	c.urlParams_.Set("pageToken", pageToken)
19829	return c
19830}
19831
19832// SearchString sets the optional parameter "searchString": Allows
19833// searching for objects by name or ID. Wildcards (*) are allowed. For
19834// example, "advertiser*2015" will return objects with names like
19835// "advertiser June 2015", "advertiser April 2015", or simply
19836// "advertiser 2015". Most of the searches also add wildcards implicitly
19837// at the start and the end of the search string. For example, a search
19838// string of "advertiser" will match objects with name "my advertiser",
19839// "advertiser 2015", or simply "advertiser".
19840func (c *AdvertisersListCall) SearchString(searchString string) *AdvertisersListCall {
19841	c.urlParams_.Set("searchString", searchString)
19842	return c
19843}
19844
19845// SortField sets the optional parameter "sortField": Field by which to
19846// sort the list.
19847//
19848// Possible values:
19849//   "ID" (default)
19850//   "NAME"
19851func (c *AdvertisersListCall) SortField(sortField string) *AdvertisersListCall {
19852	c.urlParams_.Set("sortField", sortField)
19853	return c
19854}
19855
19856// SortOrder sets the optional parameter "sortOrder": Order of sorted
19857// results.
19858//
19859// Possible values:
19860//   "ASCENDING" (default)
19861//   "DESCENDING"
19862func (c *AdvertisersListCall) SortOrder(sortOrder string) *AdvertisersListCall {
19863	c.urlParams_.Set("sortOrder", sortOrder)
19864	return c
19865}
19866
19867// Status sets the optional parameter "status": Select only advertisers
19868// with the specified status.
19869//
19870// Possible values:
19871//   "APPROVED"
19872//   "ON_HOLD"
19873func (c *AdvertisersListCall) Status(status string) *AdvertisersListCall {
19874	c.urlParams_.Set("status", status)
19875	return c
19876}
19877
19878// SubaccountId sets the optional parameter "subaccountId": Select only
19879// advertisers with these subaccount IDs.
19880func (c *AdvertisersListCall) SubaccountId(subaccountId int64) *AdvertisersListCall {
19881	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
19882	return c
19883}
19884
19885// Fields allows partial responses to be retrieved. See
19886// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19887// for more information.
19888func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall {
19889	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19890	return c
19891}
19892
19893// IfNoneMatch sets the optional parameter which makes the operation
19894// fail if the object's ETag matches the given value. This is useful for
19895// getting updates only after the object has changed since the last
19896// request. Use googleapi.IsNotModified to check whether the response
19897// error from Do is the result of In-None-Match.
19898func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall {
19899	c.ifNoneMatch_ = entityTag
19900	return c
19901}
19902
19903// Context sets the context to be used in this call's Do method. Any
19904// pending HTTP request will be aborted if the provided context is
19905// canceled.
19906func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
19907	c.ctx_ = ctx
19908	return c
19909}
19910
19911// Header returns an http.Header that can be modified by the caller to
19912// add HTTP headers to the request.
19913func (c *AdvertisersListCall) Header() http.Header {
19914	if c.header_ == nil {
19915		c.header_ = make(http.Header)
19916	}
19917	return c.header_
19918}
19919
19920func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
19921	reqHeaders := make(http.Header)
19922	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
19923	for k, v := range c.header_ {
19924		reqHeaders[k] = v
19925	}
19926	reqHeaders.Set("User-Agent", c.s.userAgent())
19927	if c.ifNoneMatch_ != "" {
19928		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19929	}
19930	var body io.Reader = nil
19931	c.urlParams_.Set("alt", alt)
19932	c.urlParams_.Set("prettyPrint", "false")
19933	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
19934	urls += "?" + c.urlParams_.Encode()
19935	req, err := http.NewRequest("GET", urls, body)
19936	if err != nil {
19937		return nil, err
19938	}
19939	req.Header = reqHeaders
19940	googleapi.Expand(req.URL, map[string]string{
19941		"profileId": strconv.FormatInt(c.profileId, 10),
19942	})
19943	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19944}
19945
19946// Do executes the "dfareporting.advertisers.list" call.
19947// Exactly one of *AdvertisersListResponse or error will be non-nil. Any
19948// non-2xx status code is an error. Response headers are in either
19949// *AdvertisersListResponse.ServerResponse.Header or (if a response was
19950// returned at all) in error.(*googleapi.Error).Header. Use
19951// googleapi.IsNotModified to check whether the returned error was
19952// because http.StatusNotModified was returned.
19953func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*AdvertisersListResponse, error) {
19954	gensupport.SetOptions(c.urlParams_, opts...)
19955	res, err := c.doRequest("json")
19956	if res != nil && res.StatusCode == http.StatusNotModified {
19957		if res.Body != nil {
19958			res.Body.Close()
19959		}
19960		return nil, &googleapi.Error{
19961			Code:   res.StatusCode,
19962			Header: res.Header,
19963		}
19964	}
19965	if err != nil {
19966		return nil, err
19967	}
19968	defer googleapi.CloseBody(res)
19969	if err := googleapi.CheckResponse(res); err != nil {
19970		return nil, err
19971	}
19972	ret := &AdvertisersListResponse{
19973		ServerResponse: googleapi.ServerResponse{
19974			Header:         res.Header,
19975			HTTPStatusCode: res.StatusCode,
19976		},
19977	}
19978	target := &ret
19979	if err := gensupport.DecodeResponse(target, res); err != nil {
19980		return nil, err
19981	}
19982	return ret, nil
19983	// {
19984	//   "description": "Retrieves a list of advertisers, possibly filtered. This method supports paging.",
19985	//   "httpMethod": "GET",
19986	//   "id": "dfareporting.advertisers.list",
19987	//   "parameterOrder": [
19988	//     "profileId"
19989	//   ],
19990	//   "parameters": {
19991	//     "advertiserGroupIds": {
19992	//       "description": "Select only advertisers with these advertiser group IDs.",
19993	//       "format": "int64",
19994	//       "location": "query",
19995	//       "repeated": true,
19996	//       "type": "string"
19997	//     },
19998	//     "floodlightConfigurationIds": {
19999	//       "description": "Select only advertisers with these floodlight configuration IDs.",
20000	//       "format": "int64",
20001	//       "location": "query",
20002	//       "repeated": true,
20003	//       "type": "string"
20004	//     },
20005	//     "ids": {
20006	//       "description": "Select only advertisers with these IDs.",
20007	//       "format": "int64",
20008	//       "location": "query",
20009	//       "repeated": true,
20010	//       "type": "string"
20011	//     },
20012	//     "includeAdvertisersWithoutGroupsOnly": {
20013	//       "description": "Select only advertisers which do not belong to any advertiser group.",
20014	//       "location": "query",
20015	//       "type": "boolean"
20016	//     },
20017	//     "maxResults": {
20018	//       "default": "1000",
20019	//       "description": "Maximum number of results to return.",
20020	//       "format": "int32",
20021	//       "location": "query",
20022	//       "maximum": "1000",
20023	//       "minimum": "0",
20024	//       "type": "integer"
20025	//     },
20026	//     "onlyParent": {
20027	//       "description": "Select only advertisers which use another advertiser's floodlight configuration.",
20028	//       "location": "query",
20029	//       "type": "boolean"
20030	//     },
20031	//     "pageToken": {
20032	//       "description": "Value of the nextPageToken from the previous result page.",
20033	//       "location": "query",
20034	//       "type": "string"
20035	//     },
20036	//     "profileId": {
20037	//       "description": "User profile ID associated with this request.",
20038	//       "format": "int64",
20039	//       "location": "path",
20040	//       "required": true,
20041	//       "type": "string"
20042	//     },
20043	//     "searchString": {
20044	//       "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\".",
20045	//       "location": "query",
20046	//       "type": "string"
20047	//     },
20048	//     "sortField": {
20049	//       "default": "ID",
20050	//       "description": "Field by which to sort the list.",
20051	//       "enum": [
20052	//         "ID",
20053	//         "NAME"
20054	//       ],
20055	//       "enumDescriptions": [
20056	//         "",
20057	//         ""
20058	//       ],
20059	//       "location": "query",
20060	//       "type": "string"
20061	//     },
20062	//     "sortOrder": {
20063	//       "default": "ASCENDING",
20064	//       "description": "Order of sorted results.",
20065	//       "enum": [
20066	//         "ASCENDING",
20067	//         "DESCENDING"
20068	//       ],
20069	//       "enumDescriptions": [
20070	//         "",
20071	//         ""
20072	//       ],
20073	//       "location": "query",
20074	//       "type": "string"
20075	//     },
20076	//     "status": {
20077	//       "description": "Select only advertisers with the specified status.",
20078	//       "enum": [
20079	//         "APPROVED",
20080	//         "ON_HOLD"
20081	//       ],
20082	//       "enumDescriptions": [
20083	//         "",
20084	//         ""
20085	//       ],
20086	//       "location": "query",
20087	//       "type": "string"
20088	//     },
20089	//     "subaccountId": {
20090	//       "description": "Select only advertisers with these subaccount IDs.",
20091	//       "format": "int64",
20092	//       "location": "query",
20093	//       "type": "string"
20094	//     }
20095	//   },
20096	//   "path": "userprofiles/{profileId}/advertisers",
20097	//   "response": {
20098	//     "$ref": "AdvertisersListResponse"
20099	//   },
20100	//   "scopes": [
20101	//     "https://www.googleapis.com/auth/dfatrafficking"
20102	//   ]
20103	// }
20104
20105}
20106
20107// Pages invokes f for each page of results.
20108// A non-nil error returned from f will halt the iteration.
20109// The provided context supersedes any context provided to the Context method.
20110func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*AdvertisersListResponse) error) error {
20111	c.ctx_ = ctx
20112	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20113	for {
20114		x, err := c.Do()
20115		if err != nil {
20116			return err
20117		}
20118		if err := f(x); err != nil {
20119			return err
20120		}
20121		if x.NextPageToken == "" {
20122			return nil
20123		}
20124		c.PageToken(x.NextPageToken)
20125	}
20126}
20127
20128// method id "dfareporting.advertisers.patch":
20129
20130type AdvertisersPatchCall struct {
20131	s          *Service
20132	profileId  int64
20133	advertiser *Advertiser
20134	urlParams_ gensupport.URLParams
20135	ctx_       context.Context
20136	header_    http.Header
20137}
20138
20139// Patch: Updates an existing advertiser. This method supports patch
20140// semantics.
20141func (r *AdvertisersService) Patch(profileId int64, id int64, advertiser *Advertiser) *AdvertisersPatchCall {
20142	c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20143	c.profileId = profileId
20144	c.urlParams_.Set("id", fmt.Sprint(id))
20145	c.advertiser = advertiser
20146	return c
20147}
20148
20149// Fields allows partial responses to be retrieved. See
20150// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20151// for more information.
20152func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall {
20153	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20154	return c
20155}
20156
20157// Context sets the context to be used in this call's Do method. Any
20158// pending HTTP request will be aborted if the provided context is
20159// canceled.
20160func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
20161	c.ctx_ = ctx
20162	return c
20163}
20164
20165// Header returns an http.Header that can be modified by the caller to
20166// add HTTP headers to the request.
20167func (c *AdvertisersPatchCall) Header() http.Header {
20168	if c.header_ == nil {
20169		c.header_ = make(http.Header)
20170	}
20171	return c.header_
20172}
20173
20174func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
20175	reqHeaders := make(http.Header)
20176	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
20177	for k, v := range c.header_ {
20178		reqHeaders[k] = v
20179	}
20180	reqHeaders.Set("User-Agent", c.s.userAgent())
20181	var body io.Reader = nil
20182	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20183	if err != nil {
20184		return nil, err
20185	}
20186	reqHeaders.Set("Content-Type", "application/json")
20187	c.urlParams_.Set("alt", alt)
20188	c.urlParams_.Set("prettyPrint", "false")
20189	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20190	urls += "?" + c.urlParams_.Encode()
20191	req, err := http.NewRequest("PATCH", urls, body)
20192	if err != nil {
20193		return nil, err
20194	}
20195	req.Header = reqHeaders
20196	googleapi.Expand(req.URL, map[string]string{
20197		"profileId": strconv.FormatInt(c.profileId, 10),
20198	})
20199	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20200}
20201
20202// Do executes the "dfareporting.advertisers.patch" call.
20203// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
20204// status code is an error. Response headers are in either
20205// *Advertiser.ServerResponse.Header or (if a response was returned at
20206// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20207// to check whether the returned error was because
20208// http.StatusNotModified was returned.
20209func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20210	gensupport.SetOptions(c.urlParams_, opts...)
20211	res, err := c.doRequest("json")
20212	if res != nil && res.StatusCode == http.StatusNotModified {
20213		if res.Body != nil {
20214			res.Body.Close()
20215		}
20216		return nil, &googleapi.Error{
20217			Code:   res.StatusCode,
20218			Header: res.Header,
20219		}
20220	}
20221	if err != nil {
20222		return nil, err
20223	}
20224	defer googleapi.CloseBody(res)
20225	if err := googleapi.CheckResponse(res); err != nil {
20226		return nil, err
20227	}
20228	ret := &Advertiser{
20229		ServerResponse: googleapi.ServerResponse{
20230			Header:         res.Header,
20231			HTTPStatusCode: res.StatusCode,
20232		},
20233	}
20234	target := &ret
20235	if err := gensupport.DecodeResponse(target, res); err != nil {
20236		return nil, err
20237	}
20238	return ret, nil
20239	// {
20240	//   "description": "Updates an existing advertiser. This method supports patch semantics.",
20241	//   "httpMethod": "PATCH",
20242	//   "id": "dfareporting.advertisers.patch",
20243	//   "parameterOrder": [
20244	//     "profileId",
20245	//     "id"
20246	//   ],
20247	//   "parameters": {
20248	//     "id": {
20249	//       "description": "Advertiser ID.",
20250	//       "format": "int64",
20251	//       "location": "query",
20252	//       "required": true,
20253	//       "type": "string"
20254	//     },
20255	//     "profileId": {
20256	//       "description": "User profile ID associated with this request.",
20257	//       "format": "int64",
20258	//       "location": "path",
20259	//       "required": true,
20260	//       "type": "string"
20261	//     }
20262	//   },
20263	//   "path": "userprofiles/{profileId}/advertisers",
20264	//   "request": {
20265	//     "$ref": "Advertiser"
20266	//   },
20267	//   "response": {
20268	//     "$ref": "Advertiser"
20269	//   },
20270	//   "scopes": [
20271	//     "https://www.googleapis.com/auth/dfatrafficking"
20272	//   ]
20273	// }
20274
20275}
20276
20277// method id "dfareporting.advertisers.update":
20278
20279type AdvertisersUpdateCall struct {
20280	s          *Service
20281	profileId  int64
20282	advertiser *Advertiser
20283	urlParams_ gensupport.URLParams
20284	ctx_       context.Context
20285	header_    http.Header
20286}
20287
20288// Update: Updates an existing advertiser.
20289func (r *AdvertisersService) Update(profileId int64, advertiser *Advertiser) *AdvertisersUpdateCall {
20290	c := &AdvertisersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20291	c.profileId = profileId
20292	c.advertiser = advertiser
20293	return c
20294}
20295
20296// Fields allows partial responses to be retrieved. See
20297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20298// for more information.
20299func (c *AdvertisersUpdateCall) Fields(s ...googleapi.Field) *AdvertisersUpdateCall {
20300	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20301	return c
20302}
20303
20304// Context sets the context to be used in this call's Do method. Any
20305// pending HTTP request will be aborted if the provided context is
20306// canceled.
20307func (c *AdvertisersUpdateCall) Context(ctx context.Context) *AdvertisersUpdateCall {
20308	c.ctx_ = ctx
20309	return c
20310}
20311
20312// Header returns an http.Header that can be modified by the caller to
20313// add HTTP headers to the request.
20314func (c *AdvertisersUpdateCall) Header() http.Header {
20315	if c.header_ == nil {
20316		c.header_ = make(http.Header)
20317	}
20318	return c.header_
20319}
20320
20321func (c *AdvertisersUpdateCall) doRequest(alt string) (*http.Response, error) {
20322	reqHeaders := make(http.Header)
20323	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
20324	for k, v := range c.header_ {
20325		reqHeaders[k] = v
20326	}
20327	reqHeaders.Set("User-Agent", c.s.userAgent())
20328	var body io.Reader = nil
20329	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20330	if err != nil {
20331		return nil, err
20332	}
20333	reqHeaders.Set("Content-Type", "application/json")
20334	c.urlParams_.Set("alt", alt)
20335	c.urlParams_.Set("prettyPrint", "false")
20336	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20337	urls += "?" + c.urlParams_.Encode()
20338	req, err := http.NewRequest("PUT", urls, body)
20339	if err != nil {
20340		return nil, err
20341	}
20342	req.Header = reqHeaders
20343	googleapi.Expand(req.URL, map[string]string{
20344		"profileId": strconv.FormatInt(c.profileId, 10),
20345	})
20346	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20347}
20348
20349// Do executes the "dfareporting.advertisers.update" call.
20350// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
20351// status code is an error. Response headers are in either
20352// *Advertiser.ServerResponse.Header or (if a response was returned at
20353// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20354// to check whether the returned error was because
20355// http.StatusNotModified was returned.
20356func (c *AdvertisersUpdateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20357	gensupport.SetOptions(c.urlParams_, opts...)
20358	res, err := c.doRequest("json")
20359	if res != nil && res.StatusCode == http.StatusNotModified {
20360		if res.Body != nil {
20361			res.Body.Close()
20362		}
20363		return nil, &googleapi.Error{
20364			Code:   res.StatusCode,
20365			Header: res.Header,
20366		}
20367	}
20368	if err != nil {
20369		return nil, err
20370	}
20371	defer googleapi.CloseBody(res)
20372	if err := googleapi.CheckResponse(res); err != nil {
20373		return nil, err
20374	}
20375	ret := &Advertiser{
20376		ServerResponse: googleapi.ServerResponse{
20377			Header:         res.Header,
20378			HTTPStatusCode: res.StatusCode,
20379		},
20380	}
20381	target := &ret
20382	if err := gensupport.DecodeResponse(target, res); err != nil {
20383		return nil, err
20384	}
20385	return ret, nil
20386	// {
20387	//   "description": "Updates an existing advertiser.",
20388	//   "httpMethod": "PUT",
20389	//   "id": "dfareporting.advertisers.update",
20390	//   "parameterOrder": [
20391	//     "profileId"
20392	//   ],
20393	//   "parameters": {
20394	//     "profileId": {
20395	//       "description": "User profile ID associated with this request.",
20396	//       "format": "int64",
20397	//       "location": "path",
20398	//       "required": true,
20399	//       "type": "string"
20400	//     }
20401	//   },
20402	//   "path": "userprofiles/{profileId}/advertisers",
20403	//   "request": {
20404	//     "$ref": "Advertiser"
20405	//   },
20406	//   "response": {
20407	//     "$ref": "Advertiser"
20408	//   },
20409	//   "scopes": [
20410	//     "https://www.googleapis.com/auth/dfatrafficking"
20411	//   ]
20412	// }
20413
20414}
20415
20416// method id "dfareporting.browsers.list":
20417
20418type BrowsersListCall struct {
20419	s            *Service
20420	profileId    int64
20421	urlParams_   gensupport.URLParams
20422	ifNoneMatch_ string
20423	ctx_         context.Context
20424	header_      http.Header
20425}
20426
20427// List: Retrieves a list of browsers.
20428func (r *BrowsersService) List(profileId int64) *BrowsersListCall {
20429	c := &BrowsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20430	c.profileId = profileId
20431	return c
20432}
20433
20434// Fields allows partial responses to be retrieved. See
20435// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20436// for more information.
20437func (c *BrowsersListCall) Fields(s ...googleapi.Field) *BrowsersListCall {
20438	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20439	return c
20440}
20441
20442// IfNoneMatch sets the optional parameter which makes the operation
20443// fail if the object's ETag matches the given value. This is useful for
20444// getting updates only after the object has changed since the last
20445// request. Use googleapi.IsNotModified to check whether the response
20446// error from Do is the result of In-None-Match.
20447func (c *BrowsersListCall) IfNoneMatch(entityTag string) *BrowsersListCall {
20448	c.ifNoneMatch_ = entityTag
20449	return c
20450}
20451
20452// Context sets the context to be used in this call's Do method. Any
20453// pending HTTP request will be aborted if the provided context is
20454// canceled.
20455func (c *BrowsersListCall) Context(ctx context.Context) *BrowsersListCall {
20456	c.ctx_ = ctx
20457	return c
20458}
20459
20460// Header returns an http.Header that can be modified by the caller to
20461// add HTTP headers to the request.
20462func (c *BrowsersListCall) Header() http.Header {
20463	if c.header_ == nil {
20464		c.header_ = make(http.Header)
20465	}
20466	return c.header_
20467}
20468
20469func (c *BrowsersListCall) doRequest(alt string) (*http.Response, error) {
20470	reqHeaders := make(http.Header)
20471	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
20472	for k, v := range c.header_ {
20473		reqHeaders[k] = v
20474	}
20475	reqHeaders.Set("User-Agent", c.s.userAgent())
20476	if c.ifNoneMatch_ != "" {
20477		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20478	}
20479	var body io.Reader = nil
20480	c.urlParams_.Set("alt", alt)
20481	c.urlParams_.Set("prettyPrint", "false")
20482	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/browsers")
20483	urls += "?" + c.urlParams_.Encode()
20484	req, err := http.NewRequest("GET", urls, body)
20485	if err != nil {
20486		return nil, err
20487	}
20488	req.Header = reqHeaders
20489	googleapi.Expand(req.URL, map[string]string{
20490		"profileId": strconv.FormatInt(c.profileId, 10),
20491	})
20492	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20493}
20494
20495// Do executes the "dfareporting.browsers.list" call.
20496// Exactly one of *BrowsersListResponse or error will be non-nil. Any
20497// non-2xx status code is an error. Response headers are in either
20498// *BrowsersListResponse.ServerResponse.Header or (if a response was
20499// returned at all) in error.(*googleapi.Error).Header. Use
20500// googleapi.IsNotModified to check whether the returned error was
20501// because http.StatusNotModified was returned.
20502func (c *BrowsersListCall) Do(opts ...googleapi.CallOption) (*BrowsersListResponse, error) {
20503	gensupport.SetOptions(c.urlParams_, opts...)
20504	res, err := c.doRequest("json")
20505	if res != nil && res.StatusCode == http.StatusNotModified {
20506		if res.Body != nil {
20507			res.Body.Close()
20508		}
20509		return nil, &googleapi.Error{
20510			Code:   res.StatusCode,
20511			Header: res.Header,
20512		}
20513	}
20514	if err != nil {
20515		return nil, err
20516	}
20517	defer googleapi.CloseBody(res)
20518	if err := googleapi.CheckResponse(res); err != nil {
20519		return nil, err
20520	}
20521	ret := &BrowsersListResponse{
20522		ServerResponse: googleapi.ServerResponse{
20523			Header:         res.Header,
20524			HTTPStatusCode: res.StatusCode,
20525		},
20526	}
20527	target := &ret
20528	if err := gensupport.DecodeResponse(target, res); err != nil {
20529		return nil, err
20530	}
20531	return ret, nil
20532	// {
20533	//   "description": "Retrieves a list of browsers.",
20534	//   "httpMethod": "GET",
20535	//   "id": "dfareporting.browsers.list",
20536	//   "parameterOrder": [
20537	//     "profileId"
20538	//   ],
20539	//   "parameters": {
20540	//     "profileId": {
20541	//       "description": "User profile ID associated with this request.",
20542	//       "format": "int64",
20543	//       "location": "path",
20544	//       "required": true,
20545	//       "type": "string"
20546	//     }
20547	//   },
20548	//   "path": "userprofiles/{profileId}/browsers",
20549	//   "response": {
20550	//     "$ref": "BrowsersListResponse"
20551	//   },
20552	//   "scopes": [
20553	//     "https://www.googleapis.com/auth/dfatrafficking"
20554	//   ]
20555	// }
20556
20557}
20558
20559// method id "dfareporting.campaignCreativeAssociations.insert":
20560
20561type CampaignCreativeAssociationsInsertCall struct {
20562	s                           *Service
20563	profileId                   int64
20564	campaignId                  int64
20565	campaigncreativeassociation *CampaignCreativeAssociation
20566	urlParams_                  gensupport.URLParams
20567	ctx_                        context.Context
20568	header_                     http.Header
20569}
20570
20571// Insert: Associates a creative with the specified campaign. This
20572// method creates a default ad with dimensions matching the creative in
20573// the campaign if such a default ad does not exist already.
20574func (r *CampaignCreativeAssociationsService) Insert(profileId int64, campaignId int64, campaigncreativeassociation *CampaignCreativeAssociation) *CampaignCreativeAssociationsInsertCall {
20575	c := &CampaignCreativeAssociationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20576	c.profileId = profileId
20577	c.campaignId = campaignId
20578	c.campaigncreativeassociation = campaigncreativeassociation
20579	return c
20580}
20581
20582// Fields allows partial responses to be retrieved. See
20583// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20584// for more information.
20585func (c *CampaignCreativeAssociationsInsertCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsInsertCall {
20586	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20587	return c
20588}
20589
20590// Context sets the context to be used in this call's Do method. Any
20591// pending HTTP request will be aborted if the provided context is
20592// canceled.
20593func (c *CampaignCreativeAssociationsInsertCall) Context(ctx context.Context) *CampaignCreativeAssociationsInsertCall {
20594	c.ctx_ = ctx
20595	return c
20596}
20597
20598// Header returns an http.Header that can be modified by the caller to
20599// add HTTP headers to the request.
20600func (c *CampaignCreativeAssociationsInsertCall) Header() http.Header {
20601	if c.header_ == nil {
20602		c.header_ = make(http.Header)
20603	}
20604	return c.header_
20605}
20606
20607func (c *CampaignCreativeAssociationsInsertCall) doRequest(alt string) (*http.Response, error) {
20608	reqHeaders := make(http.Header)
20609	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
20610	for k, v := range c.header_ {
20611		reqHeaders[k] = v
20612	}
20613	reqHeaders.Set("User-Agent", c.s.userAgent())
20614	var body io.Reader = nil
20615	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaigncreativeassociation)
20616	if err != nil {
20617		return nil, err
20618	}
20619	reqHeaders.Set("Content-Type", "application/json")
20620	c.urlParams_.Set("alt", alt)
20621	c.urlParams_.Set("prettyPrint", "false")
20622	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
20623	urls += "?" + c.urlParams_.Encode()
20624	req, err := http.NewRequest("POST", urls, body)
20625	if err != nil {
20626		return nil, err
20627	}
20628	req.Header = reqHeaders
20629	googleapi.Expand(req.URL, map[string]string{
20630		"profileId":  strconv.FormatInt(c.profileId, 10),
20631		"campaignId": strconv.FormatInt(c.campaignId, 10),
20632	})
20633	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20634}
20635
20636// Do executes the "dfareporting.campaignCreativeAssociations.insert" call.
20637// Exactly one of *CampaignCreativeAssociation or error will be non-nil.
20638// Any non-2xx status code is an error. Response headers are in either
20639// *CampaignCreativeAssociation.ServerResponse.Header or (if a response
20640// was returned at all) in error.(*googleapi.Error).Header. Use
20641// googleapi.IsNotModified to check whether the returned error was
20642// because http.StatusNotModified was returned.
20643func (c *CampaignCreativeAssociationsInsertCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociation, error) {
20644	gensupport.SetOptions(c.urlParams_, opts...)
20645	res, err := c.doRequest("json")
20646	if res != nil && res.StatusCode == http.StatusNotModified {
20647		if res.Body != nil {
20648			res.Body.Close()
20649		}
20650		return nil, &googleapi.Error{
20651			Code:   res.StatusCode,
20652			Header: res.Header,
20653		}
20654	}
20655	if err != nil {
20656		return nil, err
20657	}
20658	defer googleapi.CloseBody(res)
20659	if err := googleapi.CheckResponse(res); err != nil {
20660		return nil, err
20661	}
20662	ret := &CampaignCreativeAssociation{
20663		ServerResponse: googleapi.ServerResponse{
20664			Header:         res.Header,
20665			HTTPStatusCode: res.StatusCode,
20666		},
20667	}
20668	target := &ret
20669	if err := gensupport.DecodeResponse(target, res); err != nil {
20670		return nil, err
20671	}
20672	return ret, nil
20673	// {
20674	//   "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.",
20675	//   "httpMethod": "POST",
20676	//   "id": "dfareporting.campaignCreativeAssociations.insert",
20677	//   "parameterOrder": [
20678	//     "profileId",
20679	//     "campaignId"
20680	//   ],
20681	//   "parameters": {
20682	//     "campaignId": {
20683	//       "description": "Campaign ID in this association.",
20684	//       "format": "int64",
20685	//       "location": "path",
20686	//       "required": true,
20687	//       "type": "string"
20688	//     },
20689	//     "profileId": {
20690	//       "description": "User profile ID associated with this request.",
20691	//       "format": "int64",
20692	//       "location": "path",
20693	//       "required": true,
20694	//       "type": "string"
20695	//     }
20696	//   },
20697	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
20698	//   "request": {
20699	//     "$ref": "CampaignCreativeAssociation"
20700	//   },
20701	//   "response": {
20702	//     "$ref": "CampaignCreativeAssociation"
20703	//   },
20704	//   "scopes": [
20705	//     "https://www.googleapis.com/auth/dfatrafficking"
20706	//   ]
20707	// }
20708
20709}
20710
20711// method id "dfareporting.campaignCreativeAssociations.list":
20712
20713type CampaignCreativeAssociationsListCall struct {
20714	s            *Service
20715	profileId    int64
20716	campaignId   int64
20717	urlParams_   gensupport.URLParams
20718	ifNoneMatch_ string
20719	ctx_         context.Context
20720	header_      http.Header
20721}
20722
20723// List: Retrieves the list of creative IDs associated with the
20724// specified campaign. This method supports paging.
20725func (r *CampaignCreativeAssociationsService) List(profileId int64, campaignId int64) *CampaignCreativeAssociationsListCall {
20726	c := &CampaignCreativeAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20727	c.profileId = profileId
20728	c.campaignId = campaignId
20729	return c
20730}
20731
20732// MaxResults sets the optional parameter "maxResults": Maximum number
20733// of results to return.
20734func (c *CampaignCreativeAssociationsListCall) MaxResults(maxResults int64) *CampaignCreativeAssociationsListCall {
20735	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20736	return c
20737}
20738
20739// PageToken sets the optional parameter "pageToken": Value of the
20740// nextPageToken from the previous result page.
20741func (c *CampaignCreativeAssociationsListCall) PageToken(pageToken string) *CampaignCreativeAssociationsListCall {
20742	c.urlParams_.Set("pageToken", pageToken)
20743	return c
20744}
20745
20746// SortOrder sets the optional parameter "sortOrder": Order of sorted
20747// results.
20748//
20749// Possible values:
20750//   "ASCENDING" (default)
20751//   "DESCENDING"
20752func (c *CampaignCreativeAssociationsListCall) SortOrder(sortOrder string) *CampaignCreativeAssociationsListCall {
20753	c.urlParams_.Set("sortOrder", sortOrder)
20754	return c
20755}
20756
20757// Fields allows partial responses to be retrieved. See
20758// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20759// for more information.
20760func (c *CampaignCreativeAssociationsListCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsListCall {
20761	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20762	return c
20763}
20764
20765// IfNoneMatch sets the optional parameter which makes the operation
20766// fail if the object's ETag matches the given value. This is useful for
20767// getting updates only after the object has changed since the last
20768// request. Use googleapi.IsNotModified to check whether the response
20769// error from Do is the result of In-None-Match.
20770func (c *CampaignCreativeAssociationsListCall) IfNoneMatch(entityTag string) *CampaignCreativeAssociationsListCall {
20771	c.ifNoneMatch_ = entityTag
20772	return c
20773}
20774
20775// Context sets the context to be used in this call's Do method. Any
20776// pending HTTP request will be aborted if the provided context is
20777// canceled.
20778func (c *CampaignCreativeAssociationsListCall) Context(ctx context.Context) *CampaignCreativeAssociationsListCall {
20779	c.ctx_ = ctx
20780	return c
20781}
20782
20783// Header returns an http.Header that can be modified by the caller to
20784// add HTTP headers to the request.
20785func (c *CampaignCreativeAssociationsListCall) Header() http.Header {
20786	if c.header_ == nil {
20787		c.header_ = make(http.Header)
20788	}
20789	return c.header_
20790}
20791
20792func (c *CampaignCreativeAssociationsListCall) doRequest(alt string) (*http.Response, error) {
20793	reqHeaders := make(http.Header)
20794	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
20795	for k, v := range c.header_ {
20796		reqHeaders[k] = v
20797	}
20798	reqHeaders.Set("User-Agent", c.s.userAgent())
20799	if c.ifNoneMatch_ != "" {
20800		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20801	}
20802	var body io.Reader = nil
20803	c.urlParams_.Set("alt", alt)
20804	c.urlParams_.Set("prettyPrint", "false")
20805	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
20806	urls += "?" + c.urlParams_.Encode()
20807	req, err := http.NewRequest("GET", urls, body)
20808	if err != nil {
20809		return nil, err
20810	}
20811	req.Header = reqHeaders
20812	googleapi.Expand(req.URL, map[string]string{
20813		"profileId":  strconv.FormatInt(c.profileId, 10),
20814		"campaignId": strconv.FormatInt(c.campaignId, 10),
20815	})
20816	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20817}
20818
20819// Do executes the "dfareporting.campaignCreativeAssociations.list" call.
20820// Exactly one of *CampaignCreativeAssociationsListResponse or error
20821// will be non-nil. Any non-2xx status code is an error. Response
20822// headers are in either
20823// *CampaignCreativeAssociationsListResponse.ServerResponse.Header or
20824// (if a response was returned at all) in
20825// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20826// whether the returned error was because http.StatusNotModified was
20827// returned.
20828func (c *CampaignCreativeAssociationsListCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociationsListResponse, error) {
20829	gensupport.SetOptions(c.urlParams_, opts...)
20830	res, err := c.doRequest("json")
20831	if res != nil && res.StatusCode == http.StatusNotModified {
20832		if res.Body != nil {
20833			res.Body.Close()
20834		}
20835		return nil, &googleapi.Error{
20836			Code:   res.StatusCode,
20837			Header: res.Header,
20838		}
20839	}
20840	if err != nil {
20841		return nil, err
20842	}
20843	defer googleapi.CloseBody(res)
20844	if err := googleapi.CheckResponse(res); err != nil {
20845		return nil, err
20846	}
20847	ret := &CampaignCreativeAssociationsListResponse{
20848		ServerResponse: googleapi.ServerResponse{
20849			Header:         res.Header,
20850			HTTPStatusCode: res.StatusCode,
20851		},
20852	}
20853	target := &ret
20854	if err := gensupport.DecodeResponse(target, res); err != nil {
20855		return nil, err
20856	}
20857	return ret, nil
20858	// {
20859	//   "description": "Retrieves the list of creative IDs associated with the specified campaign. This method supports paging.",
20860	//   "httpMethod": "GET",
20861	//   "id": "dfareporting.campaignCreativeAssociations.list",
20862	//   "parameterOrder": [
20863	//     "profileId",
20864	//     "campaignId"
20865	//   ],
20866	//   "parameters": {
20867	//     "campaignId": {
20868	//       "description": "Campaign ID in this association.",
20869	//       "format": "int64",
20870	//       "location": "path",
20871	//       "required": true,
20872	//       "type": "string"
20873	//     },
20874	//     "maxResults": {
20875	//       "default": "1000",
20876	//       "description": "Maximum number of results to return.",
20877	//       "format": "int32",
20878	//       "location": "query",
20879	//       "maximum": "1000",
20880	//       "minimum": "0",
20881	//       "type": "integer"
20882	//     },
20883	//     "pageToken": {
20884	//       "description": "Value of the nextPageToken from the previous result page.",
20885	//       "location": "query",
20886	//       "type": "string"
20887	//     },
20888	//     "profileId": {
20889	//       "description": "User profile ID associated with this request.",
20890	//       "format": "int64",
20891	//       "location": "path",
20892	//       "required": true,
20893	//       "type": "string"
20894	//     },
20895	//     "sortOrder": {
20896	//       "default": "ASCENDING",
20897	//       "description": "Order of sorted results.",
20898	//       "enum": [
20899	//         "ASCENDING",
20900	//         "DESCENDING"
20901	//       ],
20902	//       "enumDescriptions": [
20903	//         "",
20904	//         ""
20905	//       ],
20906	//       "location": "query",
20907	//       "type": "string"
20908	//     }
20909	//   },
20910	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
20911	//   "response": {
20912	//     "$ref": "CampaignCreativeAssociationsListResponse"
20913	//   },
20914	//   "scopes": [
20915	//     "https://www.googleapis.com/auth/dfatrafficking"
20916	//   ]
20917	// }
20918
20919}
20920
20921// Pages invokes f for each page of results.
20922// A non-nil error returned from f will halt the iteration.
20923// The provided context supersedes any context provided to the Context method.
20924func (c *CampaignCreativeAssociationsListCall) Pages(ctx context.Context, f func(*CampaignCreativeAssociationsListResponse) error) error {
20925	c.ctx_ = ctx
20926	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20927	for {
20928		x, err := c.Do()
20929		if err != nil {
20930			return err
20931		}
20932		if err := f(x); err != nil {
20933			return err
20934		}
20935		if x.NextPageToken == "" {
20936			return nil
20937		}
20938		c.PageToken(x.NextPageToken)
20939	}
20940}
20941
20942// method id "dfareporting.campaigns.get":
20943
20944type CampaignsGetCall struct {
20945	s            *Service
20946	profileId    int64
20947	id           int64
20948	urlParams_   gensupport.URLParams
20949	ifNoneMatch_ string
20950	ctx_         context.Context
20951	header_      http.Header
20952}
20953
20954// Get: Gets one campaign by ID.
20955func (r *CampaignsService) Get(profileId int64, id int64) *CampaignsGetCall {
20956	c := &CampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20957	c.profileId = profileId
20958	c.id = id
20959	return c
20960}
20961
20962// Fields allows partial responses to be retrieved. See
20963// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20964// for more information.
20965func (c *CampaignsGetCall) Fields(s ...googleapi.Field) *CampaignsGetCall {
20966	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20967	return c
20968}
20969
20970// IfNoneMatch sets the optional parameter which makes the operation
20971// fail if the object's ETag matches the given value. This is useful for
20972// getting updates only after the object has changed since the last
20973// request. Use googleapi.IsNotModified to check whether the response
20974// error from Do is the result of In-None-Match.
20975func (c *CampaignsGetCall) IfNoneMatch(entityTag string) *CampaignsGetCall {
20976	c.ifNoneMatch_ = entityTag
20977	return c
20978}
20979
20980// Context sets the context to be used in this call's Do method. Any
20981// pending HTTP request will be aborted if the provided context is
20982// canceled.
20983func (c *CampaignsGetCall) Context(ctx context.Context) *CampaignsGetCall {
20984	c.ctx_ = ctx
20985	return c
20986}
20987
20988// Header returns an http.Header that can be modified by the caller to
20989// add HTTP headers to the request.
20990func (c *CampaignsGetCall) Header() http.Header {
20991	if c.header_ == nil {
20992		c.header_ = make(http.Header)
20993	}
20994	return c.header_
20995}
20996
20997func (c *CampaignsGetCall) doRequest(alt string) (*http.Response, error) {
20998	reqHeaders := make(http.Header)
20999	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
21000	for k, v := range c.header_ {
21001		reqHeaders[k] = v
21002	}
21003	reqHeaders.Set("User-Agent", c.s.userAgent())
21004	if c.ifNoneMatch_ != "" {
21005		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21006	}
21007	var body io.Reader = nil
21008	c.urlParams_.Set("alt", alt)
21009	c.urlParams_.Set("prettyPrint", "false")
21010	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{id}")
21011	urls += "?" + c.urlParams_.Encode()
21012	req, err := http.NewRequest("GET", urls, body)
21013	if err != nil {
21014		return nil, err
21015	}
21016	req.Header = reqHeaders
21017	googleapi.Expand(req.URL, map[string]string{
21018		"profileId": strconv.FormatInt(c.profileId, 10),
21019		"id":        strconv.FormatInt(c.id, 10),
21020	})
21021	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21022}
21023
21024// Do executes the "dfareporting.campaigns.get" call.
21025// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21026// code is an error. Response headers are in either
21027// *Campaign.ServerResponse.Header or (if a response was returned at
21028// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21029// to check whether the returned error was because
21030// http.StatusNotModified was returned.
21031func (c *CampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21032	gensupport.SetOptions(c.urlParams_, opts...)
21033	res, err := c.doRequest("json")
21034	if res != nil && res.StatusCode == http.StatusNotModified {
21035		if res.Body != nil {
21036			res.Body.Close()
21037		}
21038		return nil, &googleapi.Error{
21039			Code:   res.StatusCode,
21040			Header: res.Header,
21041		}
21042	}
21043	if err != nil {
21044		return nil, err
21045	}
21046	defer googleapi.CloseBody(res)
21047	if err := googleapi.CheckResponse(res); err != nil {
21048		return nil, err
21049	}
21050	ret := &Campaign{
21051		ServerResponse: googleapi.ServerResponse{
21052			Header:         res.Header,
21053			HTTPStatusCode: res.StatusCode,
21054		},
21055	}
21056	target := &ret
21057	if err := gensupport.DecodeResponse(target, res); err != nil {
21058		return nil, err
21059	}
21060	return ret, nil
21061	// {
21062	//   "description": "Gets one campaign by ID.",
21063	//   "httpMethod": "GET",
21064	//   "id": "dfareporting.campaigns.get",
21065	//   "parameterOrder": [
21066	//     "profileId",
21067	//     "id"
21068	//   ],
21069	//   "parameters": {
21070	//     "id": {
21071	//       "description": "Campaign ID.",
21072	//       "format": "int64",
21073	//       "location": "path",
21074	//       "required": true,
21075	//       "type": "string"
21076	//     },
21077	//     "profileId": {
21078	//       "description": "User profile ID associated with this request.",
21079	//       "format": "int64",
21080	//       "location": "path",
21081	//       "required": true,
21082	//       "type": "string"
21083	//     }
21084	//   },
21085	//   "path": "userprofiles/{profileId}/campaigns/{id}",
21086	//   "response": {
21087	//     "$ref": "Campaign"
21088	//   },
21089	//   "scopes": [
21090	//     "https://www.googleapis.com/auth/dfatrafficking"
21091	//   ]
21092	// }
21093
21094}
21095
21096// method id "dfareporting.campaigns.insert":
21097
21098type CampaignsInsertCall struct {
21099	s          *Service
21100	profileId  int64
21101	campaign   *Campaign
21102	urlParams_ gensupport.URLParams
21103	ctx_       context.Context
21104	header_    http.Header
21105}
21106
21107// Insert: Inserts a new campaign.
21108func (r *CampaignsService) Insert(profileId int64, campaign *Campaign) *CampaignsInsertCall {
21109	c := &CampaignsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21110	c.profileId = profileId
21111	c.campaign = campaign
21112	return c
21113}
21114
21115// Fields allows partial responses to be retrieved. See
21116// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21117// for more information.
21118func (c *CampaignsInsertCall) Fields(s ...googleapi.Field) *CampaignsInsertCall {
21119	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21120	return c
21121}
21122
21123// Context sets the context to be used in this call's Do method. Any
21124// pending HTTP request will be aborted if the provided context is
21125// canceled.
21126func (c *CampaignsInsertCall) Context(ctx context.Context) *CampaignsInsertCall {
21127	c.ctx_ = ctx
21128	return c
21129}
21130
21131// Header returns an http.Header that can be modified by the caller to
21132// add HTTP headers to the request.
21133func (c *CampaignsInsertCall) Header() http.Header {
21134	if c.header_ == nil {
21135		c.header_ = make(http.Header)
21136	}
21137	return c.header_
21138}
21139
21140func (c *CampaignsInsertCall) doRequest(alt string) (*http.Response, error) {
21141	reqHeaders := make(http.Header)
21142	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
21143	for k, v := range c.header_ {
21144		reqHeaders[k] = v
21145	}
21146	reqHeaders.Set("User-Agent", c.s.userAgent())
21147	var body io.Reader = nil
21148	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21149	if err != nil {
21150		return nil, err
21151	}
21152	reqHeaders.Set("Content-Type", "application/json")
21153	c.urlParams_.Set("alt", alt)
21154	c.urlParams_.Set("prettyPrint", "false")
21155	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21156	urls += "?" + c.urlParams_.Encode()
21157	req, err := http.NewRequest("POST", urls, body)
21158	if err != nil {
21159		return nil, err
21160	}
21161	req.Header = reqHeaders
21162	googleapi.Expand(req.URL, map[string]string{
21163		"profileId": strconv.FormatInt(c.profileId, 10),
21164	})
21165	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21166}
21167
21168// Do executes the "dfareporting.campaigns.insert" call.
21169// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21170// code is an error. Response headers are in either
21171// *Campaign.ServerResponse.Header or (if a response was returned at
21172// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21173// to check whether the returned error was because
21174// http.StatusNotModified was returned.
21175func (c *CampaignsInsertCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21176	gensupport.SetOptions(c.urlParams_, opts...)
21177	res, err := c.doRequest("json")
21178	if res != nil && res.StatusCode == http.StatusNotModified {
21179		if res.Body != nil {
21180			res.Body.Close()
21181		}
21182		return nil, &googleapi.Error{
21183			Code:   res.StatusCode,
21184			Header: res.Header,
21185		}
21186	}
21187	if err != nil {
21188		return nil, err
21189	}
21190	defer googleapi.CloseBody(res)
21191	if err := googleapi.CheckResponse(res); err != nil {
21192		return nil, err
21193	}
21194	ret := &Campaign{
21195		ServerResponse: googleapi.ServerResponse{
21196			Header:         res.Header,
21197			HTTPStatusCode: res.StatusCode,
21198		},
21199	}
21200	target := &ret
21201	if err := gensupport.DecodeResponse(target, res); err != nil {
21202		return nil, err
21203	}
21204	return ret, nil
21205	// {
21206	//   "description": "Inserts a new campaign.",
21207	//   "httpMethod": "POST",
21208	//   "id": "dfareporting.campaigns.insert",
21209	//   "parameterOrder": [
21210	//     "profileId"
21211	//   ],
21212	//   "parameters": {
21213	//     "profileId": {
21214	//       "description": "User profile ID associated with this request.",
21215	//       "format": "int64",
21216	//       "location": "path",
21217	//       "required": true,
21218	//       "type": "string"
21219	//     }
21220	//   },
21221	//   "path": "userprofiles/{profileId}/campaigns",
21222	//   "request": {
21223	//     "$ref": "Campaign"
21224	//   },
21225	//   "response": {
21226	//     "$ref": "Campaign"
21227	//   },
21228	//   "scopes": [
21229	//     "https://www.googleapis.com/auth/dfatrafficking"
21230	//   ]
21231	// }
21232
21233}
21234
21235// method id "dfareporting.campaigns.list":
21236
21237type CampaignsListCall struct {
21238	s            *Service
21239	profileId    int64
21240	urlParams_   gensupport.URLParams
21241	ifNoneMatch_ string
21242	ctx_         context.Context
21243	header_      http.Header
21244}
21245
21246// List: Retrieves a list of campaigns, possibly filtered. This method
21247// supports paging.
21248func (r *CampaignsService) List(profileId int64) *CampaignsListCall {
21249	c := &CampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21250	c.profileId = profileId
21251	return c
21252}
21253
21254// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
21255// Select only campaigns whose advertisers belong to these advertiser
21256// groups.
21257func (c *CampaignsListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *CampaignsListCall {
21258	var advertiserGroupIds_ []string
21259	for _, v := range advertiserGroupIds {
21260		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
21261	}
21262	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
21263	return c
21264}
21265
21266// AdvertiserIds sets the optional parameter "advertiserIds": Select
21267// only campaigns that belong to these advertisers.
21268func (c *CampaignsListCall) AdvertiserIds(advertiserIds ...int64) *CampaignsListCall {
21269	var advertiserIds_ []string
21270	for _, v := range advertiserIds {
21271		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
21272	}
21273	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
21274	return c
21275}
21276
21277// Archived sets the optional parameter "archived": Select only archived
21278// campaigns. Don't set this field to select both archived and
21279// non-archived campaigns.
21280func (c *CampaignsListCall) Archived(archived bool) *CampaignsListCall {
21281	c.urlParams_.Set("archived", fmt.Sprint(archived))
21282	return c
21283}
21284
21285// AtLeastOneOptimizationActivity sets the optional parameter
21286// "atLeastOneOptimizationActivity": Select only campaigns that have at
21287// least one optimization activity.
21288func (c *CampaignsListCall) AtLeastOneOptimizationActivity(atLeastOneOptimizationActivity bool) *CampaignsListCall {
21289	c.urlParams_.Set("atLeastOneOptimizationActivity", fmt.Sprint(atLeastOneOptimizationActivity))
21290	return c
21291}
21292
21293// ExcludedIds sets the optional parameter "excludedIds": Exclude
21294// campaigns with these IDs.
21295func (c *CampaignsListCall) ExcludedIds(excludedIds ...int64) *CampaignsListCall {
21296	var excludedIds_ []string
21297	for _, v := range excludedIds {
21298		excludedIds_ = append(excludedIds_, fmt.Sprint(v))
21299	}
21300	c.urlParams_.SetMulti("excludedIds", excludedIds_)
21301	return c
21302}
21303
21304// Ids sets the optional parameter "ids": Select only campaigns with
21305// these IDs.
21306func (c *CampaignsListCall) Ids(ids ...int64) *CampaignsListCall {
21307	var ids_ []string
21308	for _, v := range ids {
21309		ids_ = append(ids_, fmt.Sprint(v))
21310	}
21311	c.urlParams_.SetMulti("ids", ids_)
21312	return c
21313}
21314
21315// MaxResults sets the optional parameter "maxResults": Maximum number
21316// of results to return.
21317func (c *CampaignsListCall) MaxResults(maxResults int64) *CampaignsListCall {
21318	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21319	return c
21320}
21321
21322// OverriddenEventTagId sets the optional parameter
21323// "overriddenEventTagId": Select only campaigns that have overridden
21324// this event tag ID.
21325func (c *CampaignsListCall) OverriddenEventTagId(overriddenEventTagId int64) *CampaignsListCall {
21326	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
21327	return c
21328}
21329
21330// PageToken sets the optional parameter "pageToken": Value of the
21331// nextPageToken from the previous result page.
21332func (c *CampaignsListCall) PageToken(pageToken string) *CampaignsListCall {
21333	c.urlParams_.Set("pageToken", pageToken)
21334	return c
21335}
21336
21337// SearchString sets the optional parameter "searchString": Allows
21338// searching for campaigns by name or ID. Wildcards (*) are allowed. For
21339// example, "campaign*2015" will return campaigns with names like
21340// "campaign June 2015", "campaign April 2015", or simply "campaign
21341// 2015". Most of the searches also add wildcards implicitly at the
21342// start and the end of the search string. For example, a search string
21343// of "campaign" will match campaigns with name "my campaign", "campaign
21344// 2015", or simply "campaign".
21345func (c *CampaignsListCall) SearchString(searchString string) *CampaignsListCall {
21346	c.urlParams_.Set("searchString", searchString)
21347	return c
21348}
21349
21350// SortField sets the optional parameter "sortField": Field by which to
21351// sort the list.
21352//
21353// Possible values:
21354//   "ID" (default)
21355//   "NAME"
21356func (c *CampaignsListCall) SortField(sortField string) *CampaignsListCall {
21357	c.urlParams_.Set("sortField", sortField)
21358	return c
21359}
21360
21361// SortOrder sets the optional parameter "sortOrder": Order of sorted
21362// results.
21363//
21364// Possible values:
21365//   "ASCENDING" (default)
21366//   "DESCENDING"
21367func (c *CampaignsListCall) SortOrder(sortOrder string) *CampaignsListCall {
21368	c.urlParams_.Set("sortOrder", sortOrder)
21369	return c
21370}
21371
21372// SubaccountId sets the optional parameter "subaccountId": Select only
21373// campaigns that belong to this subaccount.
21374func (c *CampaignsListCall) SubaccountId(subaccountId int64) *CampaignsListCall {
21375	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
21376	return c
21377}
21378
21379// Fields allows partial responses to be retrieved. See
21380// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21381// for more information.
21382func (c *CampaignsListCall) Fields(s ...googleapi.Field) *CampaignsListCall {
21383	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21384	return c
21385}
21386
21387// IfNoneMatch sets the optional parameter which makes the operation
21388// fail if the object's ETag matches the given value. This is useful for
21389// getting updates only after the object has changed since the last
21390// request. Use googleapi.IsNotModified to check whether the response
21391// error from Do is the result of In-None-Match.
21392func (c *CampaignsListCall) IfNoneMatch(entityTag string) *CampaignsListCall {
21393	c.ifNoneMatch_ = entityTag
21394	return c
21395}
21396
21397// Context sets the context to be used in this call's Do method. Any
21398// pending HTTP request will be aborted if the provided context is
21399// canceled.
21400func (c *CampaignsListCall) Context(ctx context.Context) *CampaignsListCall {
21401	c.ctx_ = ctx
21402	return c
21403}
21404
21405// Header returns an http.Header that can be modified by the caller to
21406// add HTTP headers to the request.
21407func (c *CampaignsListCall) Header() http.Header {
21408	if c.header_ == nil {
21409		c.header_ = make(http.Header)
21410	}
21411	return c.header_
21412}
21413
21414func (c *CampaignsListCall) doRequest(alt string) (*http.Response, error) {
21415	reqHeaders := make(http.Header)
21416	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
21417	for k, v := range c.header_ {
21418		reqHeaders[k] = v
21419	}
21420	reqHeaders.Set("User-Agent", c.s.userAgent())
21421	if c.ifNoneMatch_ != "" {
21422		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21423	}
21424	var body io.Reader = nil
21425	c.urlParams_.Set("alt", alt)
21426	c.urlParams_.Set("prettyPrint", "false")
21427	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21428	urls += "?" + c.urlParams_.Encode()
21429	req, err := http.NewRequest("GET", urls, body)
21430	if err != nil {
21431		return nil, err
21432	}
21433	req.Header = reqHeaders
21434	googleapi.Expand(req.URL, map[string]string{
21435		"profileId": strconv.FormatInt(c.profileId, 10),
21436	})
21437	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21438}
21439
21440// Do executes the "dfareporting.campaigns.list" call.
21441// Exactly one of *CampaignsListResponse or error will be non-nil. Any
21442// non-2xx status code is an error. Response headers are in either
21443// *CampaignsListResponse.ServerResponse.Header or (if a response was
21444// returned at all) in error.(*googleapi.Error).Header. Use
21445// googleapi.IsNotModified to check whether the returned error was
21446// because http.StatusNotModified was returned.
21447func (c *CampaignsListCall) Do(opts ...googleapi.CallOption) (*CampaignsListResponse, error) {
21448	gensupport.SetOptions(c.urlParams_, opts...)
21449	res, err := c.doRequest("json")
21450	if res != nil && res.StatusCode == http.StatusNotModified {
21451		if res.Body != nil {
21452			res.Body.Close()
21453		}
21454		return nil, &googleapi.Error{
21455			Code:   res.StatusCode,
21456			Header: res.Header,
21457		}
21458	}
21459	if err != nil {
21460		return nil, err
21461	}
21462	defer googleapi.CloseBody(res)
21463	if err := googleapi.CheckResponse(res); err != nil {
21464		return nil, err
21465	}
21466	ret := &CampaignsListResponse{
21467		ServerResponse: googleapi.ServerResponse{
21468			Header:         res.Header,
21469			HTTPStatusCode: res.StatusCode,
21470		},
21471	}
21472	target := &ret
21473	if err := gensupport.DecodeResponse(target, res); err != nil {
21474		return nil, err
21475	}
21476	return ret, nil
21477	// {
21478	//   "description": "Retrieves a list of campaigns, possibly filtered. This method supports paging.",
21479	//   "httpMethod": "GET",
21480	//   "id": "dfareporting.campaigns.list",
21481	//   "parameterOrder": [
21482	//     "profileId"
21483	//   ],
21484	//   "parameters": {
21485	//     "advertiserGroupIds": {
21486	//       "description": "Select only campaigns whose advertisers belong to these advertiser groups.",
21487	//       "format": "int64",
21488	//       "location": "query",
21489	//       "repeated": true,
21490	//       "type": "string"
21491	//     },
21492	//     "advertiserIds": {
21493	//       "description": "Select only campaigns that belong to these advertisers.",
21494	//       "format": "int64",
21495	//       "location": "query",
21496	//       "repeated": true,
21497	//       "type": "string"
21498	//     },
21499	//     "archived": {
21500	//       "description": "Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns.",
21501	//       "location": "query",
21502	//       "type": "boolean"
21503	//     },
21504	//     "atLeastOneOptimizationActivity": {
21505	//       "description": "Select only campaigns that have at least one optimization activity.",
21506	//       "location": "query",
21507	//       "type": "boolean"
21508	//     },
21509	//     "excludedIds": {
21510	//       "description": "Exclude campaigns with these IDs.",
21511	//       "format": "int64",
21512	//       "location": "query",
21513	//       "repeated": true,
21514	//       "type": "string"
21515	//     },
21516	//     "ids": {
21517	//       "description": "Select only campaigns with these IDs.",
21518	//       "format": "int64",
21519	//       "location": "query",
21520	//       "repeated": true,
21521	//       "type": "string"
21522	//     },
21523	//     "maxResults": {
21524	//       "default": "1000",
21525	//       "description": "Maximum number of results to return.",
21526	//       "format": "int32",
21527	//       "location": "query",
21528	//       "maximum": "1000",
21529	//       "minimum": "0",
21530	//       "type": "integer"
21531	//     },
21532	//     "overriddenEventTagId": {
21533	//       "description": "Select only campaigns that have overridden this event tag ID.",
21534	//       "format": "int64",
21535	//       "location": "query",
21536	//       "type": "string"
21537	//     },
21538	//     "pageToken": {
21539	//       "description": "Value of the nextPageToken from the previous result page.",
21540	//       "location": "query",
21541	//       "type": "string"
21542	//     },
21543	//     "profileId": {
21544	//       "description": "User profile ID associated with this request.",
21545	//       "format": "int64",
21546	//       "location": "path",
21547	//       "required": true,
21548	//       "type": "string"
21549	//     },
21550	//     "searchString": {
21551	//       "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\".",
21552	//       "location": "query",
21553	//       "type": "string"
21554	//     },
21555	//     "sortField": {
21556	//       "default": "ID",
21557	//       "description": "Field by which to sort the list.",
21558	//       "enum": [
21559	//         "ID",
21560	//         "NAME"
21561	//       ],
21562	//       "enumDescriptions": [
21563	//         "",
21564	//         ""
21565	//       ],
21566	//       "location": "query",
21567	//       "type": "string"
21568	//     },
21569	//     "sortOrder": {
21570	//       "default": "ASCENDING",
21571	//       "description": "Order of sorted results.",
21572	//       "enum": [
21573	//         "ASCENDING",
21574	//         "DESCENDING"
21575	//       ],
21576	//       "enumDescriptions": [
21577	//         "",
21578	//         ""
21579	//       ],
21580	//       "location": "query",
21581	//       "type": "string"
21582	//     },
21583	//     "subaccountId": {
21584	//       "description": "Select only campaigns that belong to this subaccount.",
21585	//       "format": "int64",
21586	//       "location": "query",
21587	//       "type": "string"
21588	//     }
21589	//   },
21590	//   "path": "userprofiles/{profileId}/campaigns",
21591	//   "response": {
21592	//     "$ref": "CampaignsListResponse"
21593	//   },
21594	//   "scopes": [
21595	//     "https://www.googleapis.com/auth/dfatrafficking"
21596	//   ]
21597	// }
21598
21599}
21600
21601// Pages invokes f for each page of results.
21602// A non-nil error returned from f will halt the iteration.
21603// The provided context supersedes any context provided to the Context method.
21604func (c *CampaignsListCall) Pages(ctx context.Context, f func(*CampaignsListResponse) error) error {
21605	c.ctx_ = ctx
21606	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21607	for {
21608		x, err := c.Do()
21609		if err != nil {
21610			return err
21611		}
21612		if err := f(x); err != nil {
21613			return err
21614		}
21615		if x.NextPageToken == "" {
21616			return nil
21617		}
21618		c.PageToken(x.NextPageToken)
21619	}
21620}
21621
21622// method id "dfareporting.campaigns.patch":
21623
21624type CampaignsPatchCall struct {
21625	s          *Service
21626	profileId  int64
21627	campaign   *Campaign
21628	urlParams_ gensupport.URLParams
21629	ctx_       context.Context
21630	header_    http.Header
21631}
21632
21633// Patch: Updates an existing campaign. This method supports patch
21634// semantics.
21635func (r *CampaignsService) Patch(profileId int64, id int64, campaign *Campaign) *CampaignsPatchCall {
21636	c := &CampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21637	c.profileId = profileId
21638	c.urlParams_.Set("id", fmt.Sprint(id))
21639	c.campaign = campaign
21640	return c
21641}
21642
21643// Fields allows partial responses to be retrieved. See
21644// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21645// for more information.
21646func (c *CampaignsPatchCall) Fields(s ...googleapi.Field) *CampaignsPatchCall {
21647	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21648	return c
21649}
21650
21651// Context sets the context to be used in this call's Do method. Any
21652// pending HTTP request will be aborted if the provided context is
21653// canceled.
21654func (c *CampaignsPatchCall) Context(ctx context.Context) *CampaignsPatchCall {
21655	c.ctx_ = ctx
21656	return c
21657}
21658
21659// Header returns an http.Header that can be modified by the caller to
21660// add HTTP headers to the request.
21661func (c *CampaignsPatchCall) Header() http.Header {
21662	if c.header_ == nil {
21663		c.header_ = make(http.Header)
21664	}
21665	return c.header_
21666}
21667
21668func (c *CampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
21669	reqHeaders := make(http.Header)
21670	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
21671	for k, v := range c.header_ {
21672		reqHeaders[k] = v
21673	}
21674	reqHeaders.Set("User-Agent", c.s.userAgent())
21675	var body io.Reader = nil
21676	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21677	if err != nil {
21678		return nil, err
21679	}
21680	reqHeaders.Set("Content-Type", "application/json")
21681	c.urlParams_.Set("alt", alt)
21682	c.urlParams_.Set("prettyPrint", "false")
21683	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21684	urls += "?" + c.urlParams_.Encode()
21685	req, err := http.NewRequest("PATCH", urls, body)
21686	if err != nil {
21687		return nil, err
21688	}
21689	req.Header = reqHeaders
21690	googleapi.Expand(req.URL, map[string]string{
21691		"profileId": strconv.FormatInt(c.profileId, 10),
21692	})
21693	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21694}
21695
21696// Do executes the "dfareporting.campaigns.patch" call.
21697// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21698// code is an error. Response headers are in either
21699// *Campaign.ServerResponse.Header or (if a response was returned at
21700// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21701// to check whether the returned error was because
21702// http.StatusNotModified was returned.
21703func (c *CampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21704	gensupport.SetOptions(c.urlParams_, opts...)
21705	res, err := c.doRequest("json")
21706	if res != nil && res.StatusCode == http.StatusNotModified {
21707		if res.Body != nil {
21708			res.Body.Close()
21709		}
21710		return nil, &googleapi.Error{
21711			Code:   res.StatusCode,
21712			Header: res.Header,
21713		}
21714	}
21715	if err != nil {
21716		return nil, err
21717	}
21718	defer googleapi.CloseBody(res)
21719	if err := googleapi.CheckResponse(res); err != nil {
21720		return nil, err
21721	}
21722	ret := &Campaign{
21723		ServerResponse: googleapi.ServerResponse{
21724			Header:         res.Header,
21725			HTTPStatusCode: res.StatusCode,
21726		},
21727	}
21728	target := &ret
21729	if err := gensupport.DecodeResponse(target, res); err != nil {
21730		return nil, err
21731	}
21732	return ret, nil
21733	// {
21734	//   "description": "Updates an existing campaign. This method supports patch semantics.",
21735	//   "httpMethod": "PATCH",
21736	//   "id": "dfareporting.campaigns.patch",
21737	//   "parameterOrder": [
21738	//     "profileId",
21739	//     "id"
21740	//   ],
21741	//   "parameters": {
21742	//     "id": {
21743	//       "description": "Campaign ID.",
21744	//       "format": "int64",
21745	//       "location": "query",
21746	//       "required": true,
21747	//       "type": "string"
21748	//     },
21749	//     "profileId": {
21750	//       "description": "User profile ID associated with this request.",
21751	//       "format": "int64",
21752	//       "location": "path",
21753	//       "required": true,
21754	//       "type": "string"
21755	//     }
21756	//   },
21757	//   "path": "userprofiles/{profileId}/campaigns",
21758	//   "request": {
21759	//     "$ref": "Campaign"
21760	//   },
21761	//   "response": {
21762	//     "$ref": "Campaign"
21763	//   },
21764	//   "scopes": [
21765	//     "https://www.googleapis.com/auth/dfatrafficking"
21766	//   ]
21767	// }
21768
21769}
21770
21771// method id "dfareporting.campaigns.update":
21772
21773type CampaignsUpdateCall struct {
21774	s          *Service
21775	profileId  int64
21776	campaign   *Campaign
21777	urlParams_ gensupport.URLParams
21778	ctx_       context.Context
21779	header_    http.Header
21780}
21781
21782// Update: Updates an existing campaign.
21783func (r *CampaignsService) Update(profileId int64, campaign *Campaign) *CampaignsUpdateCall {
21784	c := &CampaignsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21785	c.profileId = profileId
21786	c.campaign = campaign
21787	return c
21788}
21789
21790// Fields allows partial responses to be retrieved. See
21791// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21792// for more information.
21793func (c *CampaignsUpdateCall) Fields(s ...googleapi.Field) *CampaignsUpdateCall {
21794	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21795	return c
21796}
21797
21798// Context sets the context to be used in this call's Do method. Any
21799// pending HTTP request will be aborted if the provided context is
21800// canceled.
21801func (c *CampaignsUpdateCall) Context(ctx context.Context) *CampaignsUpdateCall {
21802	c.ctx_ = ctx
21803	return c
21804}
21805
21806// Header returns an http.Header that can be modified by the caller to
21807// add HTTP headers to the request.
21808func (c *CampaignsUpdateCall) Header() http.Header {
21809	if c.header_ == nil {
21810		c.header_ = make(http.Header)
21811	}
21812	return c.header_
21813}
21814
21815func (c *CampaignsUpdateCall) doRequest(alt string) (*http.Response, error) {
21816	reqHeaders := make(http.Header)
21817	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
21818	for k, v := range c.header_ {
21819		reqHeaders[k] = v
21820	}
21821	reqHeaders.Set("User-Agent", c.s.userAgent())
21822	var body io.Reader = nil
21823	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21824	if err != nil {
21825		return nil, err
21826	}
21827	reqHeaders.Set("Content-Type", "application/json")
21828	c.urlParams_.Set("alt", alt)
21829	c.urlParams_.Set("prettyPrint", "false")
21830	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21831	urls += "?" + c.urlParams_.Encode()
21832	req, err := http.NewRequest("PUT", urls, body)
21833	if err != nil {
21834		return nil, err
21835	}
21836	req.Header = reqHeaders
21837	googleapi.Expand(req.URL, map[string]string{
21838		"profileId": strconv.FormatInt(c.profileId, 10),
21839	})
21840	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21841}
21842
21843// Do executes the "dfareporting.campaigns.update" call.
21844// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21845// code is an error. Response headers are in either
21846// *Campaign.ServerResponse.Header or (if a response was returned at
21847// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21848// to check whether the returned error was because
21849// http.StatusNotModified was returned.
21850func (c *CampaignsUpdateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21851	gensupport.SetOptions(c.urlParams_, opts...)
21852	res, err := c.doRequest("json")
21853	if res != nil && res.StatusCode == http.StatusNotModified {
21854		if res.Body != nil {
21855			res.Body.Close()
21856		}
21857		return nil, &googleapi.Error{
21858			Code:   res.StatusCode,
21859			Header: res.Header,
21860		}
21861	}
21862	if err != nil {
21863		return nil, err
21864	}
21865	defer googleapi.CloseBody(res)
21866	if err := googleapi.CheckResponse(res); err != nil {
21867		return nil, err
21868	}
21869	ret := &Campaign{
21870		ServerResponse: googleapi.ServerResponse{
21871			Header:         res.Header,
21872			HTTPStatusCode: res.StatusCode,
21873		},
21874	}
21875	target := &ret
21876	if err := gensupport.DecodeResponse(target, res); err != nil {
21877		return nil, err
21878	}
21879	return ret, nil
21880	// {
21881	//   "description": "Updates an existing campaign.",
21882	//   "httpMethod": "PUT",
21883	//   "id": "dfareporting.campaigns.update",
21884	//   "parameterOrder": [
21885	//     "profileId"
21886	//   ],
21887	//   "parameters": {
21888	//     "profileId": {
21889	//       "description": "User profile ID associated with this request.",
21890	//       "format": "int64",
21891	//       "location": "path",
21892	//       "required": true,
21893	//       "type": "string"
21894	//     }
21895	//   },
21896	//   "path": "userprofiles/{profileId}/campaigns",
21897	//   "request": {
21898	//     "$ref": "Campaign"
21899	//   },
21900	//   "response": {
21901	//     "$ref": "Campaign"
21902	//   },
21903	//   "scopes": [
21904	//     "https://www.googleapis.com/auth/dfatrafficking"
21905	//   ]
21906	// }
21907
21908}
21909
21910// method id "dfareporting.changeLogs.get":
21911
21912type ChangeLogsGetCall struct {
21913	s            *Service
21914	profileId    int64
21915	id           int64
21916	urlParams_   gensupport.URLParams
21917	ifNoneMatch_ string
21918	ctx_         context.Context
21919	header_      http.Header
21920}
21921
21922// Get: Gets one change log by ID.
21923func (r *ChangeLogsService) Get(profileId int64, id int64) *ChangeLogsGetCall {
21924	c := &ChangeLogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21925	c.profileId = profileId
21926	c.id = id
21927	return c
21928}
21929
21930// Fields allows partial responses to be retrieved. See
21931// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21932// for more information.
21933func (c *ChangeLogsGetCall) Fields(s ...googleapi.Field) *ChangeLogsGetCall {
21934	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21935	return c
21936}
21937
21938// IfNoneMatch sets the optional parameter which makes the operation
21939// fail if the object's ETag matches the given value. This is useful for
21940// getting updates only after the object has changed since the last
21941// request. Use googleapi.IsNotModified to check whether the response
21942// error from Do is the result of In-None-Match.
21943func (c *ChangeLogsGetCall) IfNoneMatch(entityTag string) *ChangeLogsGetCall {
21944	c.ifNoneMatch_ = entityTag
21945	return c
21946}
21947
21948// Context sets the context to be used in this call's Do method. Any
21949// pending HTTP request will be aborted if the provided context is
21950// canceled.
21951func (c *ChangeLogsGetCall) Context(ctx context.Context) *ChangeLogsGetCall {
21952	c.ctx_ = ctx
21953	return c
21954}
21955
21956// Header returns an http.Header that can be modified by the caller to
21957// add HTTP headers to the request.
21958func (c *ChangeLogsGetCall) Header() http.Header {
21959	if c.header_ == nil {
21960		c.header_ = make(http.Header)
21961	}
21962	return c.header_
21963}
21964
21965func (c *ChangeLogsGetCall) doRequest(alt string) (*http.Response, error) {
21966	reqHeaders := make(http.Header)
21967	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
21968	for k, v := range c.header_ {
21969		reqHeaders[k] = v
21970	}
21971	reqHeaders.Set("User-Agent", c.s.userAgent())
21972	if c.ifNoneMatch_ != "" {
21973		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21974	}
21975	var body io.Reader = nil
21976	c.urlParams_.Set("alt", alt)
21977	c.urlParams_.Set("prettyPrint", "false")
21978	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs/{id}")
21979	urls += "?" + c.urlParams_.Encode()
21980	req, err := http.NewRequest("GET", urls, body)
21981	if err != nil {
21982		return nil, err
21983	}
21984	req.Header = reqHeaders
21985	googleapi.Expand(req.URL, map[string]string{
21986		"profileId": strconv.FormatInt(c.profileId, 10),
21987		"id":        strconv.FormatInt(c.id, 10),
21988	})
21989	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21990}
21991
21992// Do executes the "dfareporting.changeLogs.get" call.
21993// Exactly one of *ChangeLog or error will be non-nil. Any non-2xx
21994// status code is an error. Response headers are in either
21995// *ChangeLog.ServerResponse.Header or (if a response was returned at
21996// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21997// to check whether the returned error was because
21998// http.StatusNotModified was returned.
21999func (c *ChangeLogsGetCall) Do(opts ...googleapi.CallOption) (*ChangeLog, error) {
22000	gensupport.SetOptions(c.urlParams_, opts...)
22001	res, err := c.doRequest("json")
22002	if res != nil && res.StatusCode == http.StatusNotModified {
22003		if res.Body != nil {
22004			res.Body.Close()
22005		}
22006		return nil, &googleapi.Error{
22007			Code:   res.StatusCode,
22008			Header: res.Header,
22009		}
22010	}
22011	if err != nil {
22012		return nil, err
22013	}
22014	defer googleapi.CloseBody(res)
22015	if err := googleapi.CheckResponse(res); err != nil {
22016		return nil, err
22017	}
22018	ret := &ChangeLog{
22019		ServerResponse: googleapi.ServerResponse{
22020			Header:         res.Header,
22021			HTTPStatusCode: res.StatusCode,
22022		},
22023	}
22024	target := &ret
22025	if err := gensupport.DecodeResponse(target, res); err != nil {
22026		return nil, err
22027	}
22028	return ret, nil
22029	// {
22030	//   "description": "Gets one change log by ID.",
22031	//   "httpMethod": "GET",
22032	//   "id": "dfareporting.changeLogs.get",
22033	//   "parameterOrder": [
22034	//     "profileId",
22035	//     "id"
22036	//   ],
22037	//   "parameters": {
22038	//     "id": {
22039	//       "description": "Change log ID.",
22040	//       "format": "int64",
22041	//       "location": "path",
22042	//       "required": true,
22043	//       "type": "string"
22044	//     },
22045	//     "profileId": {
22046	//       "description": "User profile ID associated with this request.",
22047	//       "format": "int64",
22048	//       "location": "path",
22049	//       "required": true,
22050	//       "type": "string"
22051	//     }
22052	//   },
22053	//   "path": "userprofiles/{profileId}/changeLogs/{id}",
22054	//   "response": {
22055	//     "$ref": "ChangeLog"
22056	//   },
22057	//   "scopes": [
22058	//     "https://www.googleapis.com/auth/dfatrafficking"
22059	//   ]
22060	// }
22061
22062}
22063
22064// method id "dfareporting.changeLogs.list":
22065
22066type ChangeLogsListCall struct {
22067	s            *Service
22068	profileId    int64
22069	urlParams_   gensupport.URLParams
22070	ifNoneMatch_ string
22071	ctx_         context.Context
22072	header_      http.Header
22073}
22074
22075// List: Retrieves a list of change logs. This method supports paging.
22076func (r *ChangeLogsService) List(profileId int64) *ChangeLogsListCall {
22077	c := &ChangeLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22078	c.profileId = profileId
22079	return c
22080}
22081
22082// Action sets the optional parameter "action": Select only change logs
22083// with the specified action.
22084//
22085// Possible values:
22086//   "ACTION_ADD"
22087//   "ACTION_ASSIGN"
22088//   "ACTION_ASSOCIATE"
22089//   "ACTION_CREATE"
22090//   "ACTION_DELETE"
22091//   "ACTION_DISABLE"
22092//   "ACTION_EMAIL_TAGS"
22093//   "ACTION_ENABLE"
22094//   "ACTION_LINK"
22095//   "ACTION_MARK_AS_DEFAULT"
22096//   "ACTION_PUSH"
22097//   "ACTION_REMOVE"
22098//   "ACTION_SEND"
22099//   "ACTION_SHARE"
22100//   "ACTION_UNASSIGN"
22101//   "ACTION_UNLINK"
22102//   "ACTION_UPDATE"
22103func (c *ChangeLogsListCall) Action(action string) *ChangeLogsListCall {
22104	c.urlParams_.Set("action", action)
22105	return c
22106}
22107
22108// Ids sets the optional parameter "ids": Select only change logs with
22109// these IDs.
22110func (c *ChangeLogsListCall) Ids(ids ...int64) *ChangeLogsListCall {
22111	var ids_ []string
22112	for _, v := range ids {
22113		ids_ = append(ids_, fmt.Sprint(v))
22114	}
22115	c.urlParams_.SetMulti("ids", ids_)
22116	return c
22117}
22118
22119// MaxChangeTime sets the optional parameter "maxChangeTime": Select
22120// only change logs whose change time is before the specified
22121// maxChangeTime.The time should be formatted as an RFC3339 date/time
22122// string. For example, for 10:54 PM on July 18th, 2015, in the
22123// America/New York time zone, the format is
22124// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
22125// the letter T, the hour (24-hour clock system), minute, second, and
22126// then the time zone offset.
22127func (c *ChangeLogsListCall) MaxChangeTime(maxChangeTime string) *ChangeLogsListCall {
22128	c.urlParams_.Set("maxChangeTime", maxChangeTime)
22129	return c
22130}
22131
22132// MaxResults sets the optional parameter "maxResults": Maximum number
22133// of results to return.
22134func (c *ChangeLogsListCall) MaxResults(maxResults int64) *ChangeLogsListCall {
22135	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22136	return c
22137}
22138
22139// MinChangeTime sets the optional parameter "minChangeTime": Select
22140// only change logs whose change time is before the specified
22141// minChangeTime.The time should be formatted as an RFC3339 date/time
22142// string. For example, for 10:54 PM on July 18th, 2015, in the
22143// America/New York time zone, the format is
22144// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
22145// the letter T, the hour (24-hour clock system), minute, second, and
22146// then the time zone offset.
22147func (c *ChangeLogsListCall) MinChangeTime(minChangeTime string) *ChangeLogsListCall {
22148	c.urlParams_.Set("minChangeTime", minChangeTime)
22149	return c
22150}
22151
22152// ObjectIds sets the optional parameter "objectIds": Select only change
22153// logs with these object IDs.
22154func (c *ChangeLogsListCall) ObjectIds(objectIds ...int64) *ChangeLogsListCall {
22155	var objectIds_ []string
22156	for _, v := range objectIds {
22157		objectIds_ = append(objectIds_, fmt.Sprint(v))
22158	}
22159	c.urlParams_.SetMulti("objectIds", objectIds_)
22160	return c
22161}
22162
22163// ObjectType sets the optional parameter "objectType": Select only
22164// change logs with the specified object type.
22165//
22166// Possible values:
22167//   "OBJECT_ACCOUNT"
22168//   "OBJECT_ACCOUNT_BILLING_FEATURE"
22169//   "OBJECT_AD"
22170//   "OBJECT_ADVERTISER"
22171//   "OBJECT_ADVERTISER_GROUP"
22172//   "OBJECT_BILLING_ACCOUNT_GROUP"
22173//   "OBJECT_BILLING_FEATURE"
22174//   "OBJECT_BILLING_MINIMUM_FEE"
22175//   "OBJECT_BILLING_PROFILE"
22176//   "OBJECT_CAMPAIGN"
22177//   "OBJECT_CONTENT_CATEGORY"
22178//   "OBJECT_CREATIVE"
22179//   "OBJECT_CREATIVE_ASSET"
22180//   "OBJECT_CREATIVE_BUNDLE"
22181//   "OBJECT_CREATIVE_FIELD"
22182//   "OBJECT_CREATIVE_GROUP"
22183//   "OBJECT_DFA_SITE"
22184//   "OBJECT_EVENT_TAG"
22185//   "OBJECT_FLOODLIGHT_ACTIVITY_GROUP"
22186//   "OBJECT_FLOODLIGHT_ACTVITY"
22187//   "OBJECT_FLOODLIGHT_CONFIGURATION"
22188//   "OBJECT_INSTREAM_CREATIVE"
22189//   "OBJECT_LANDING_PAGE"
22190//   "OBJECT_MEDIA_ORDER"
22191//   "OBJECT_PLACEMENT"
22192//   "OBJECT_PLACEMENT_STRATEGY"
22193//   "OBJECT_PLAYSTORE_LINK"
22194//   "OBJECT_PROVIDED_LIST_CLIENT"
22195//   "OBJECT_RATE_CARD"
22196//   "OBJECT_REMARKETING_LIST"
22197//   "OBJECT_RICHMEDIA_CREATIVE"
22198//   "OBJECT_SD_SITE"
22199//   "OBJECT_SEARCH_LIFT_STUDY"
22200//   "OBJECT_SIZE"
22201//   "OBJECT_SUBACCOUNT"
22202//   "OBJECT_TARGETING_TEMPLATE"
22203//   "OBJECT_USER_PROFILE"
22204//   "OBJECT_USER_PROFILE_FILTER"
22205//   "OBJECT_USER_ROLE"
22206func (c *ChangeLogsListCall) ObjectType(objectType string) *ChangeLogsListCall {
22207	c.urlParams_.Set("objectType", objectType)
22208	return c
22209}
22210
22211// PageToken sets the optional parameter "pageToken": Value of the
22212// nextPageToken from the previous result page.
22213func (c *ChangeLogsListCall) PageToken(pageToken string) *ChangeLogsListCall {
22214	c.urlParams_.Set("pageToken", pageToken)
22215	return c
22216}
22217
22218// SearchString sets the optional parameter "searchString": Select only
22219// change logs whose object ID, user name, old or new values match the
22220// search string.
22221func (c *ChangeLogsListCall) SearchString(searchString string) *ChangeLogsListCall {
22222	c.urlParams_.Set("searchString", searchString)
22223	return c
22224}
22225
22226// UserProfileIds sets the optional parameter "userProfileIds": Select
22227// only change logs with these user profile IDs.
22228func (c *ChangeLogsListCall) UserProfileIds(userProfileIds ...int64) *ChangeLogsListCall {
22229	var userProfileIds_ []string
22230	for _, v := range userProfileIds {
22231		userProfileIds_ = append(userProfileIds_, fmt.Sprint(v))
22232	}
22233	c.urlParams_.SetMulti("userProfileIds", userProfileIds_)
22234	return c
22235}
22236
22237// Fields allows partial responses to be retrieved. See
22238// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22239// for more information.
22240func (c *ChangeLogsListCall) Fields(s ...googleapi.Field) *ChangeLogsListCall {
22241	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22242	return c
22243}
22244
22245// IfNoneMatch sets the optional parameter which makes the operation
22246// fail if the object's ETag matches the given value. This is useful for
22247// getting updates only after the object has changed since the last
22248// request. Use googleapi.IsNotModified to check whether the response
22249// error from Do is the result of In-None-Match.
22250func (c *ChangeLogsListCall) IfNoneMatch(entityTag string) *ChangeLogsListCall {
22251	c.ifNoneMatch_ = entityTag
22252	return c
22253}
22254
22255// Context sets the context to be used in this call's Do method. Any
22256// pending HTTP request will be aborted if the provided context is
22257// canceled.
22258func (c *ChangeLogsListCall) Context(ctx context.Context) *ChangeLogsListCall {
22259	c.ctx_ = ctx
22260	return c
22261}
22262
22263// Header returns an http.Header that can be modified by the caller to
22264// add HTTP headers to the request.
22265func (c *ChangeLogsListCall) Header() http.Header {
22266	if c.header_ == nil {
22267		c.header_ = make(http.Header)
22268	}
22269	return c.header_
22270}
22271
22272func (c *ChangeLogsListCall) doRequest(alt string) (*http.Response, error) {
22273	reqHeaders := make(http.Header)
22274	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
22275	for k, v := range c.header_ {
22276		reqHeaders[k] = v
22277	}
22278	reqHeaders.Set("User-Agent", c.s.userAgent())
22279	if c.ifNoneMatch_ != "" {
22280		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22281	}
22282	var body io.Reader = nil
22283	c.urlParams_.Set("alt", alt)
22284	c.urlParams_.Set("prettyPrint", "false")
22285	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs")
22286	urls += "?" + c.urlParams_.Encode()
22287	req, err := http.NewRequest("GET", urls, body)
22288	if err != nil {
22289		return nil, err
22290	}
22291	req.Header = reqHeaders
22292	googleapi.Expand(req.URL, map[string]string{
22293		"profileId": strconv.FormatInt(c.profileId, 10),
22294	})
22295	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22296}
22297
22298// Do executes the "dfareporting.changeLogs.list" call.
22299// Exactly one of *ChangeLogsListResponse or error will be non-nil. Any
22300// non-2xx status code is an error. Response headers are in either
22301// *ChangeLogsListResponse.ServerResponse.Header or (if a response was
22302// returned at all) in error.(*googleapi.Error).Header. Use
22303// googleapi.IsNotModified to check whether the returned error was
22304// because http.StatusNotModified was returned.
22305func (c *ChangeLogsListCall) Do(opts ...googleapi.CallOption) (*ChangeLogsListResponse, error) {
22306	gensupport.SetOptions(c.urlParams_, opts...)
22307	res, err := c.doRequest("json")
22308	if res != nil && res.StatusCode == http.StatusNotModified {
22309		if res.Body != nil {
22310			res.Body.Close()
22311		}
22312		return nil, &googleapi.Error{
22313			Code:   res.StatusCode,
22314			Header: res.Header,
22315		}
22316	}
22317	if err != nil {
22318		return nil, err
22319	}
22320	defer googleapi.CloseBody(res)
22321	if err := googleapi.CheckResponse(res); err != nil {
22322		return nil, err
22323	}
22324	ret := &ChangeLogsListResponse{
22325		ServerResponse: googleapi.ServerResponse{
22326			Header:         res.Header,
22327			HTTPStatusCode: res.StatusCode,
22328		},
22329	}
22330	target := &ret
22331	if err := gensupport.DecodeResponse(target, res); err != nil {
22332		return nil, err
22333	}
22334	return ret, nil
22335	// {
22336	//   "description": "Retrieves a list of change logs. This method supports paging.",
22337	//   "httpMethod": "GET",
22338	//   "id": "dfareporting.changeLogs.list",
22339	//   "parameterOrder": [
22340	//     "profileId"
22341	//   ],
22342	//   "parameters": {
22343	//     "action": {
22344	//       "description": "Select only change logs with the specified action.",
22345	//       "enum": [
22346	//         "ACTION_ADD",
22347	//         "ACTION_ASSIGN",
22348	//         "ACTION_ASSOCIATE",
22349	//         "ACTION_CREATE",
22350	//         "ACTION_DELETE",
22351	//         "ACTION_DISABLE",
22352	//         "ACTION_EMAIL_TAGS",
22353	//         "ACTION_ENABLE",
22354	//         "ACTION_LINK",
22355	//         "ACTION_MARK_AS_DEFAULT",
22356	//         "ACTION_PUSH",
22357	//         "ACTION_REMOVE",
22358	//         "ACTION_SEND",
22359	//         "ACTION_SHARE",
22360	//         "ACTION_UNASSIGN",
22361	//         "ACTION_UNLINK",
22362	//         "ACTION_UPDATE"
22363	//       ],
22364	//       "enumDescriptions": [
22365	//         "",
22366	//         "",
22367	//         "",
22368	//         "",
22369	//         "",
22370	//         "",
22371	//         "",
22372	//         "",
22373	//         "",
22374	//         "",
22375	//         "",
22376	//         "",
22377	//         "",
22378	//         "",
22379	//         "",
22380	//         "",
22381	//         ""
22382	//       ],
22383	//       "location": "query",
22384	//       "type": "string"
22385	//     },
22386	//     "ids": {
22387	//       "description": "Select only change logs with these IDs.",
22388	//       "format": "int64",
22389	//       "location": "query",
22390	//       "repeated": true,
22391	//       "type": "string"
22392	//     },
22393	//     "maxChangeTime": {
22394	//       "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.",
22395	//       "location": "query",
22396	//       "type": "string"
22397	//     },
22398	//     "maxResults": {
22399	//       "default": "1000",
22400	//       "description": "Maximum number of results to return.",
22401	//       "format": "int32",
22402	//       "location": "query",
22403	//       "maximum": "1000",
22404	//       "minimum": "0",
22405	//       "type": "integer"
22406	//     },
22407	//     "minChangeTime": {
22408	//       "description": "Select only change logs whose change time is before 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.",
22409	//       "location": "query",
22410	//       "type": "string"
22411	//     },
22412	//     "objectIds": {
22413	//       "description": "Select only change logs with these object IDs.",
22414	//       "format": "int64",
22415	//       "location": "query",
22416	//       "repeated": true,
22417	//       "type": "string"
22418	//     },
22419	//     "objectType": {
22420	//       "description": "Select only change logs with the specified object type.",
22421	//       "enum": [
22422	//         "OBJECT_ACCOUNT",
22423	//         "OBJECT_ACCOUNT_BILLING_FEATURE",
22424	//         "OBJECT_AD",
22425	//         "OBJECT_ADVERTISER",
22426	//         "OBJECT_ADVERTISER_GROUP",
22427	//         "OBJECT_BILLING_ACCOUNT_GROUP",
22428	//         "OBJECT_BILLING_FEATURE",
22429	//         "OBJECT_BILLING_MINIMUM_FEE",
22430	//         "OBJECT_BILLING_PROFILE",
22431	//         "OBJECT_CAMPAIGN",
22432	//         "OBJECT_CONTENT_CATEGORY",
22433	//         "OBJECT_CREATIVE",
22434	//         "OBJECT_CREATIVE_ASSET",
22435	//         "OBJECT_CREATIVE_BUNDLE",
22436	//         "OBJECT_CREATIVE_FIELD",
22437	//         "OBJECT_CREATIVE_GROUP",
22438	//         "OBJECT_DFA_SITE",
22439	//         "OBJECT_EVENT_TAG",
22440	//         "OBJECT_FLOODLIGHT_ACTIVITY_GROUP",
22441	//         "OBJECT_FLOODLIGHT_ACTVITY",
22442	//         "OBJECT_FLOODLIGHT_CONFIGURATION",
22443	//         "OBJECT_INSTREAM_CREATIVE",
22444	//         "OBJECT_LANDING_PAGE",
22445	//         "OBJECT_MEDIA_ORDER",
22446	//         "OBJECT_PLACEMENT",
22447	//         "OBJECT_PLACEMENT_STRATEGY",
22448	//         "OBJECT_PLAYSTORE_LINK",
22449	//         "OBJECT_PROVIDED_LIST_CLIENT",
22450	//         "OBJECT_RATE_CARD",
22451	//         "OBJECT_REMARKETING_LIST",
22452	//         "OBJECT_RICHMEDIA_CREATIVE",
22453	//         "OBJECT_SD_SITE",
22454	//         "OBJECT_SEARCH_LIFT_STUDY",
22455	//         "OBJECT_SIZE",
22456	//         "OBJECT_SUBACCOUNT",
22457	//         "OBJECT_TARGETING_TEMPLATE",
22458	//         "OBJECT_USER_PROFILE",
22459	//         "OBJECT_USER_PROFILE_FILTER",
22460	//         "OBJECT_USER_ROLE"
22461	//       ],
22462	//       "enumDescriptions": [
22463	//         "",
22464	//         "",
22465	//         "",
22466	//         "",
22467	//         "",
22468	//         "",
22469	//         "",
22470	//         "",
22471	//         "",
22472	//         "",
22473	//         "",
22474	//         "",
22475	//         "",
22476	//         "",
22477	//         "",
22478	//         "",
22479	//         "",
22480	//         "",
22481	//         "",
22482	//         "",
22483	//         "",
22484	//         "",
22485	//         "",
22486	//         "",
22487	//         "",
22488	//         "",
22489	//         "",
22490	//         "",
22491	//         "",
22492	//         "",
22493	//         "",
22494	//         "",
22495	//         "",
22496	//         "",
22497	//         "",
22498	//         "",
22499	//         "",
22500	//         "",
22501	//         ""
22502	//       ],
22503	//       "location": "query",
22504	//       "type": "string"
22505	//     },
22506	//     "pageToken": {
22507	//       "description": "Value of the nextPageToken from the previous result page.",
22508	//       "location": "query",
22509	//       "type": "string"
22510	//     },
22511	//     "profileId": {
22512	//       "description": "User profile ID associated with this request.",
22513	//       "format": "int64",
22514	//       "location": "path",
22515	//       "required": true,
22516	//       "type": "string"
22517	//     },
22518	//     "searchString": {
22519	//       "description": "Select only change logs whose object ID, user name, old or new values match the search string.",
22520	//       "location": "query",
22521	//       "type": "string"
22522	//     },
22523	//     "userProfileIds": {
22524	//       "description": "Select only change logs with these user profile IDs.",
22525	//       "format": "int64",
22526	//       "location": "query",
22527	//       "repeated": true,
22528	//       "type": "string"
22529	//     }
22530	//   },
22531	//   "path": "userprofiles/{profileId}/changeLogs",
22532	//   "response": {
22533	//     "$ref": "ChangeLogsListResponse"
22534	//   },
22535	//   "scopes": [
22536	//     "https://www.googleapis.com/auth/dfatrafficking"
22537	//   ]
22538	// }
22539
22540}
22541
22542// Pages invokes f for each page of results.
22543// A non-nil error returned from f will halt the iteration.
22544// The provided context supersedes any context provided to the Context method.
22545func (c *ChangeLogsListCall) Pages(ctx context.Context, f func(*ChangeLogsListResponse) error) error {
22546	c.ctx_ = ctx
22547	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22548	for {
22549		x, err := c.Do()
22550		if err != nil {
22551			return err
22552		}
22553		if err := f(x); err != nil {
22554			return err
22555		}
22556		if x.NextPageToken == "" {
22557			return nil
22558		}
22559		c.PageToken(x.NextPageToken)
22560	}
22561}
22562
22563// method id "dfareporting.cities.list":
22564
22565type CitiesListCall struct {
22566	s            *Service
22567	profileId    int64
22568	urlParams_   gensupport.URLParams
22569	ifNoneMatch_ string
22570	ctx_         context.Context
22571	header_      http.Header
22572}
22573
22574// List: Retrieves a list of cities, possibly filtered.
22575func (r *CitiesService) List(profileId int64) *CitiesListCall {
22576	c := &CitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22577	c.profileId = profileId
22578	return c
22579}
22580
22581// CountryDartIds sets the optional parameter "countryDartIds": Select
22582// only cities from these countries.
22583func (c *CitiesListCall) CountryDartIds(countryDartIds ...int64) *CitiesListCall {
22584	var countryDartIds_ []string
22585	for _, v := range countryDartIds {
22586		countryDartIds_ = append(countryDartIds_, fmt.Sprint(v))
22587	}
22588	c.urlParams_.SetMulti("countryDartIds", countryDartIds_)
22589	return c
22590}
22591
22592// DartIds sets the optional parameter "dartIds": Select only cities
22593// with these DART IDs.
22594func (c *CitiesListCall) DartIds(dartIds ...int64) *CitiesListCall {
22595	var dartIds_ []string
22596	for _, v := range dartIds {
22597		dartIds_ = append(dartIds_, fmt.Sprint(v))
22598	}
22599	c.urlParams_.SetMulti("dartIds", dartIds_)
22600	return c
22601}
22602
22603// NamePrefix sets the optional parameter "namePrefix": Select only
22604// cities with names starting with this prefix.
22605func (c *CitiesListCall) NamePrefix(namePrefix string) *CitiesListCall {
22606	c.urlParams_.Set("namePrefix", namePrefix)
22607	return c
22608}
22609
22610// RegionDartIds sets the optional parameter "regionDartIds": Select
22611// only cities from these regions.
22612func (c *CitiesListCall) RegionDartIds(regionDartIds ...int64) *CitiesListCall {
22613	var regionDartIds_ []string
22614	for _, v := range regionDartIds {
22615		regionDartIds_ = append(regionDartIds_, fmt.Sprint(v))
22616	}
22617	c.urlParams_.SetMulti("regionDartIds", regionDartIds_)
22618	return c
22619}
22620
22621// Fields allows partial responses to be retrieved. See
22622// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22623// for more information.
22624func (c *CitiesListCall) Fields(s ...googleapi.Field) *CitiesListCall {
22625	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22626	return c
22627}
22628
22629// IfNoneMatch sets the optional parameter which makes the operation
22630// fail if the object's ETag matches the given value. This is useful for
22631// getting updates only after the object has changed since the last
22632// request. Use googleapi.IsNotModified to check whether the response
22633// error from Do is the result of In-None-Match.
22634func (c *CitiesListCall) IfNoneMatch(entityTag string) *CitiesListCall {
22635	c.ifNoneMatch_ = entityTag
22636	return c
22637}
22638
22639// Context sets the context to be used in this call's Do method. Any
22640// pending HTTP request will be aborted if the provided context is
22641// canceled.
22642func (c *CitiesListCall) Context(ctx context.Context) *CitiesListCall {
22643	c.ctx_ = ctx
22644	return c
22645}
22646
22647// Header returns an http.Header that can be modified by the caller to
22648// add HTTP headers to the request.
22649func (c *CitiesListCall) Header() http.Header {
22650	if c.header_ == nil {
22651		c.header_ = make(http.Header)
22652	}
22653	return c.header_
22654}
22655
22656func (c *CitiesListCall) doRequest(alt string) (*http.Response, error) {
22657	reqHeaders := make(http.Header)
22658	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
22659	for k, v := range c.header_ {
22660		reqHeaders[k] = v
22661	}
22662	reqHeaders.Set("User-Agent", c.s.userAgent())
22663	if c.ifNoneMatch_ != "" {
22664		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22665	}
22666	var body io.Reader = nil
22667	c.urlParams_.Set("alt", alt)
22668	c.urlParams_.Set("prettyPrint", "false")
22669	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/cities")
22670	urls += "?" + c.urlParams_.Encode()
22671	req, err := http.NewRequest("GET", urls, body)
22672	if err != nil {
22673		return nil, err
22674	}
22675	req.Header = reqHeaders
22676	googleapi.Expand(req.URL, map[string]string{
22677		"profileId": strconv.FormatInt(c.profileId, 10),
22678	})
22679	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22680}
22681
22682// Do executes the "dfareporting.cities.list" call.
22683// Exactly one of *CitiesListResponse or error will be non-nil. Any
22684// non-2xx status code is an error. Response headers are in either
22685// *CitiesListResponse.ServerResponse.Header or (if a response was
22686// returned at all) in error.(*googleapi.Error).Header. Use
22687// googleapi.IsNotModified to check whether the returned error was
22688// because http.StatusNotModified was returned.
22689func (c *CitiesListCall) Do(opts ...googleapi.CallOption) (*CitiesListResponse, error) {
22690	gensupport.SetOptions(c.urlParams_, opts...)
22691	res, err := c.doRequest("json")
22692	if res != nil && res.StatusCode == http.StatusNotModified {
22693		if res.Body != nil {
22694			res.Body.Close()
22695		}
22696		return nil, &googleapi.Error{
22697			Code:   res.StatusCode,
22698			Header: res.Header,
22699		}
22700	}
22701	if err != nil {
22702		return nil, err
22703	}
22704	defer googleapi.CloseBody(res)
22705	if err := googleapi.CheckResponse(res); err != nil {
22706		return nil, err
22707	}
22708	ret := &CitiesListResponse{
22709		ServerResponse: googleapi.ServerResponse{
22710			Header:         res.Header,
22711			HTTPStatusCode: res.StatusCode,
22712		},
22713	}
22714	target := &ret
22715	if err := gensupport.DecodeResponse(target, res); err != nil {
22716		return nil, err
22717	}
22718	return ret, nil
22719	// {
22720	//   "description": "Retrieves a list of cities, possibly filtered.",
22721	//   "httpMethod": "GET",
22722	//   "id": "dfareporting.cities.list",
22723	//   "parameterOrder": [
22724	//     "profileId"
22725	//   ],
22726	//   "parameters": {
22727	//     "countryDartIds": {
22728	//       "description": "Select only cities from these countries.",
22729	//       "format": "int64",
22730	//       "location": "query",
22731	//       "repeated": true,
22732	//       "type": "string"
22733	//     },
22734	//     "dartIds": {
22735	//       "description": "Select only cities with these DART IDs.",
22736	//       "format": "int64",
22737	//       "location": "query",
22738	//       "repeated": true,
22739	//       "type": "string"
22740	//     },
22741	//     "namePrefix": {
22742	//       "description": "Select only cities with names starting with this prefix.",
22743	//       "location": "query",
22744	//       "type": "string"
22745	//     },
22746	//     "profileId": {
22747	//       "description": "User profile ID associated with this request.",
22748	//       "format": "int64",
22749	//       "location": "path",
22750	//       "required": true,
22751	//       "type": "string"
22752	//     },
22753	//     "regionDartIds": {
22754	//       "description": "Select only cities from these regions.",
22755	//       "format": "int64",
22756	//       "location": "query",
22757	//       "repeated": true,
22758	//       "type": "string"
22759	//     }
22760	//   },
22761	//   "path": "userprofiles/{profileId}/cities",
22762	//   "response": {
22763	//     "$ref": "CitiesListResponse"
22764	//   },
22765	//   "scopes": [
22766	//     "https://www.googleapis.com/auth/dfatrafficking"
22767	//   ]
22768	// }
22769
22770}
22771
22772// method id "dfareporting.connectionTypes.get":
22773
22774type ConnectionTypesGetCall struct {
22775	s            *Service
22776	profileId    int64
22777	id           int64
22778	urlParams_   gensupport.URLParams
22779	ifNoneMatch_ string
22780	ctx_         context.Context
22781	header_      http.Header
22782}
22783
22784// Get: Gets one connection type by ID.
22785func (r *ConnectionTypesService) Get(profileId int64, id int64) *ConnectionTypesGetCall {
22786	c := &ConnectionTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22787	c.profileId = profileId
22788	c.id = id
22789	return c
22790}
22791
22792// Fields allows partial responses to be retrieved. See
22793// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22794// for more information.
22795func (c *ConnectionTypesGetCall) Fields(s ...googleapi.Field) *ConnectionTypesGetCall {
22796	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22797	return c
22798}
22799
22800// IfNoneMatch sets the optional parameter which makes the operation
22801// fail if the object's ETag matches the given value. This is useful for
22802// getting updates only after the object has changed since the last
22803// request. Use googleapi.IsNotModified to check whether the response
22804// error from Do is the result of In-None-Match.
22805func (c *ConnectionTypesGetCall) IfNoneMatch(entityTag string) *ConnectionTypesGetCall {
22806	c.ifNoneMatch_ = entityTag
22807	return c
22808}
22809
22810// Context sets the context to be used in this call's Do method. Any
22811// pending HTTP request will be aborted if the provided context is
22812// canceled.
22813func (c *ConnectionTypesGetCall) Context(ctx context.Context) *ConnectionTypesGetCall {
22814	c.ctx_ = ctx
22815	return c
22816}
22817
22818// Header returns an http.Header that can be modified by the caller to
22819// add HTTP headers to the request.
22820func (c *ConnectionTypesGetCall) Header() http.Header {
22821	if c.header_ == nil {
22822		c.header_ = make(http.Header)
22823	}
22824	return c.header_
22825}
22826
22827func (c *ConnectionTypesGetCall) doRequest(alt string) (*http.Response, error) {
22828	reqHeaders := make(http.Header)
22829	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
22830	for k, v := range c.header_ {
22831		reqHeaders[k] = v
22832	}
22833	reqHeaders.Set("User-Agent", c.s.userAgent())
22834	if c.ifNoneMatch_ != "" {
22835		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22836	}
22837	var body io.Reader = nil
22838	c.urlParams_.Set("alt", alt)
22839	c.urlParams_.Set("prettyPrint", "false")
22840	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes/{id}")
22841	urls += "?" + c.urlParams_.Encode()
22842	req, err := http.NewRequest("GET", urls, body)
22843	if err != nil {
22844		return nil, err
22845	}
22846	req.Header = reqHeaders
22847	googleapi.Expand(req.URL, map[string]string{
22848		"profileId": strconv.FormatInt(c.profileId, 10),
22849		"id":        strconv.FormatInt(c.id, 10),
22850	})
22851	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22852}
22853
22854// Do executes the "dfareporting.connectionTypes.get" call.
22855// Exactly one of *ConnectionType or error will be non-nil. Any non-2xx
22856// status code is an error. Response headers are in either
22857// *ConnectionType.ServerResponse.Header or (if a response was returned
22858// at all) in error.(*googleapi.Error).Header. Use
22859// googleapi.IsNotModified to check whether the returned error was
22860// because http.StatusNotModified was returned.
22861func (c *ConnectionTypesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionType, error) {
22862	gensupport.SetOptions(c.urlParams_, opts...)
22863	res, err := c.doRequest("json")
22864	if res != nil && res.StatusCode == http.StatusNotModified {
22865		if res.Body != nil {
22866			res.Body.Close()
22867		}
22868		return nil, &googleapi.Error{
22869			Code:   res.StatusCode,
22870			Header: res.Header,
22871		}
22872	}
22873	if err != nil {
22874		return nil, err
22875	}
22876	defer googleapi.CloseBody(res)
22877	if err := googleapi.CheckResponse(res); err != nil {
22878		return nil, err
22879	}
22880	ret := &ConnectionType{
22881		ServerResponse: googleapi.ServerResponse{
22882			Header:         res.Header,
22883			HTTPStatusCode: res.StatusCode,
22884		},
22885	}
22886	target := &ret
22887	if err := gensupport.DecodeResponse(target, res); err != nil {
22888		return nil, err
22889	}
22890	return ret, nil
22891	// {
22892	//   "description": "Gets one connection type by ID.",
22893	//   "httpMethod": "GET",
22894	//   "id": "dfareporting.connectionTypes.get",
22895	//   "parameterOrder": [
22896	//     "profileId",
22897	//     "id"
22898	//   ],
22899	//   "parameters": {
22900	//     "id": {
22901	//       "description": "Connection type ID.",
22902	//       "format": "int64",
22903	//       "location": "path",
22904	//       "required": true,
22905	//       "type": "string"
22906	//     },
22907	//     "profileId": {
22908	//       "description": "User profile ID associated with this request.",
22909	//       "format": "int64",
22910	//       "location": "path",
22911	//       "required": true,
22912	//       "type": "string"
22913	//     }
22914	//   },
22915	//   "path": "userprofiles/{profileId}/connectionTypes/{id}",
22916	//   "response": {
22917	//     "$ref": "ConnectionType"
22918	//   },
22919	//   "scopes": [
22920	//     "https://www.googleapis.com/auth/dfatrafficking"
22921	//   ]
22922	// }
22923
22924}
22925
22926// method id "dfareporting.connectionTypes.list":
22927
22928type ConnectionTypesListCall struct {
22929	s            *Service
22930	profileId    int64
22931	urlParams_   gensupport.URLParams
22932	ifNoneMatch_ string
22933	ctx_         context.Context
22934	header_      http.Header
22935}
22936
22937// List: Retrieves a list of connection types.
22938func (r *ConnectionTypesService) List(profileId int64) *ConnectionTypesListCall {
22939	c := &ConnectionTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22940	c.profileId = profileId
22941	return c
22942}
22943
22944// Fields allows partial responses to be retrieved. See
22945// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22946// for more information.
22947func (c *ConnectionTypesListCall) Fields(s ...googleapi.Field) *ConnectionTypesListCall {
22948	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22949	return c
22950}
22951
22952// IfNoneMatch sets the optional parameter which makes the operation
22953// fail if the object's ETag matches the given value. This is useful for
22954// getting updates only after the object has changed since the last
22955// request. Use googleapi.IsNotModified to check whether the response
22956// error from Do is the result of In-None-Match.
22957func (c *ConnectionTypesListCall) IfNoneMatch(entityTag string) *ConnectionTypesListCall {
22958	c.ifNoneMatch_ = entityTag
22959	return c
22960}
22961
22962// Context sets the context to be used in this call's Do method. Any
22963// pending HTTP request will be aborted if the provided context is
22964// canceled.
22965func (c *ConnectionTypesListCall) Context(ctx context.Context) *ConnectionTypesListCall {
22966	c.ctx_ = ctx
22967	return c
22968}
22969
22970// Header returns an http.Header that can be modified by the caller to
22971// add HTTP headers to the request.
22972func (c *ConnectionTypesListCall) Header() http.Header {
22973	if c.header_ == nil {
22974		c.header_ = make(http.Header)
22975	}
22976	return c.header_
22977}
22978
22979func (c *ConnectionTypesListCall) doRequest(alt string) (*http.Response, error) {
22980	reqHeaders := make(http.Header)
22981	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
22982	for k, v := range c.header_ {
22983		reqHeaders[k] = v
22984	}
22985	reqHeaders.Set("User-Agent", c.s.userAgent())
22986	if c.ifNoneMatch_ != "" {
22987		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22988	}
22989	var body io.Reader = nil
22990	c.urlParams_.Set("alt", alt)
22991	c.urlParams_.Set("prettyPrint", "false")
22992	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes")
22993	urls += "?" + c.urlParams_.Encode()
22994	req, err := http.NewRequest("GET", urls, body)
22995	if err != nil {
22996		return nil, err
22997	}
22998	req.Header = reqHeaders
22999	googleapi.Expand(req.URL, map[string]string{
23000		"profileId": strconv.FormatInt(c.profileId, 10),
23001	})
23002	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23003}
23004
23005// Do executes the "dfareporting.connectionTypes.list" call.
23006// Exactly one of *ConnectionTypesListResponse or error will be non-nil.
23007// Any non-2xx status code is an error. Response headers are in either
23008// *ConnectionTypesListResponse.ServerResponse.Header or (if a response
23009// was returned at all) in error.(*googleapi.Error).Header. Use
23010// googleapi.IsNotModified to check whether the returned error was
23011// because http.StatusNotModified was returned.
23012func (c *ConnectionTypesListCall) Do(opts ...googleapi.CallOption) (*ConnectionTypesListResponse, error) {
23013	gensupport.SetOptions(c.urlParams_, opts...)
23014	res, err := c.doRequest("json")
23015	if res != nil && res.StatusCode == http.StatusNotModified {
23016		if res.Body != nil {
23017			res.Body.Close()
23018		}
23019		return nil, &googleapi.Error{
23020			Code:   res.StatusCode,
23021			Header: res.Header,
23022		}
23023	}
23024	if err != nil {
23025		return nil, err
23026	}
23027	defer googleapi.CloseBody(res)
23028	if err := googleapi.CheckResponse(res); err != nil {
23029		return nil, err
23030	}
23031	ret := &ConnectionTypesListResponse{
23032		ServerResponse: googleapi.ServerResponse{
23033			Header:         res.Header,
23034			HTTPStatusCode: res.StatusCode,
23035		},
23036	}
23037	target := &ret
23038	if err := gensupport.DecodeResponse(target, res); err != nil {
23039		return nil, err
23040	}
23041	return ret, nil
23042	// {
23043	//   "description": "Retrieves a list of connection types.",
23044	//   "httpMethod": "GET",
23045	//   "id": "dfareporting.connectionTypes.list",
23046	//   "parameterOrder": [
23047	//     "profileId"
23048	//   ],
23049	//   "parameters": {
23050	//     "profileId": {
23051	//       "description": "User profile ID associated with this request.",
23052	//       "format": "int64",
23053	//       "location": "path",
23054	//       "required": true,
23055	//       "type": "string"
23056	//     }
23057	//   },
23058	//   "path": "userprofiles/{profileId}/connectionTypes",
23059	//   "response": {
23060	//     "$ref": "ConnectionTypesListResponse"
23061	//   },
23062	//   "scopes": [
23063	//     "https://www.googleapis.com/auth/dfatrafficking"
23064	//   ]
23065	// }
23066
23067}
23068
23069// method id "dfareporting.contentCategories.delete":
23070
23071type ContentCategoriesDeleteCall struct {
23072	s          *Service
23073	profileId  int64
23074	id         int64
23075	urlParams_ gensupport.URLParams
23076	ctx_       context.Context
23077	header_    http.Header
23078}
23079
23080// Delete: Deletes an existing content category.
23081func (r *ContentCategoriesService) Delete(profileId int64, id int64) *ContentCategoriesDeleteCall {
23082	c := &ContentCategoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23083	c.profileId = profileId
23084	c.id = id
23085	return c
23086}
23087
23088// Fields allows partial responses to be retrieved. See
23089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23090// for more information.
23091func (c *ContentCategoriesDeleteCall) Fields(s ...googleapi.Field) *ContentCategoriesDeleteCall {
23092	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23093	return c
23094}
23095
23096// Context sets the context to be used in this call's Do method. Any
23097// pending HTTP request will be aborted if the provided context is
23098// canceled.
23099func (c *ContentCategoriesDeleteCall) Context(ctx context.Context) *ContentCategoriesDeleteCall {
23100	c.ctx_ = ctx
23101	return c
23102}
23103
23104// Header returns an http.Header that can be modified by the caller to
23105// add HTTP headers to the request.
23106func (c *ContentCategoriesDeleteCall) Header() http.Header {
23107	if c.header_ == nil {
23108		c.header_ = make(http.Header)
23109	}
23110	return c.header_
23111}
23112
23113func (c *ContentCategoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
23114	reqHeaders := make(http.Header)
23115	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
23116	for k, v := range c.header_ {
23117		reqHeaders[k] = v
23118	}
23119	reqHeaders.Set("User-Agent", c.s.userAgent())
23120	var body io.Reader = nil
23121	c.urlParams_.Set("alt", alt)
23122	c.urlParams_.Set("prettyPrint", "false")
23123	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
23124	urls += "?" + c.urlParams_.Encode()
23125	req, err := http.NewRequest("DELETE", urls, body)
23126	if err != nil {
23127		return nil, err
23128	}
23129	req.Header = reqHeaders
23130	googleapi.Expand(req.URL, map[string]string{
23131		"profileId": strconv.FormatInt(c.profileId, 10),
23132		"id":        strconv.FormatInt(c.id, 10),
23133	})
23134	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23135}
23136
23137// Do executes the "dfareporting.contentCategories.delete" call.
23138func (c *ContentCategoriesDeleteCall) Do(opts ...googleapi.CallOption) error {
23139	gensupport.SetOptions(c.urlParams_, opts...)
23140	res, err := c.doRequest("json")
23141	if err != nil {
23142		return err
23143	}
23144	defer googleapi.CloseBody(res)
23145	if err := googleapi.CheckResponse(res); err != nil {
23146		return err
23147	}
23148	return nil
23149	// {
23150	//   "description": "Deletes an existing content category.",
23151	//   "httpMethod": "DELETE",
23152	//   "id": "dfareporting.contentCategories.delete",
23153	//   "parameterOrder": [
23154	//     "profileId",
23155	//     "id"
23156	//   ],
23157	//   "parameters": {
23158	//     "id": {
23159	//       "description": "Content category ID.",
23160	//       "format": "int64",
23161	//       "location": "path",
23162	//       "required": true,
23163	//       "type": "string"
23164	//     },
23165	//     "profileId": {
23166	//       "description": "User profile ID associated with this request.",
23167	//       "format": "int64",
23168	//       "location": "path",
23169	//       "required": true,
23170	//       "type": "string"
23171	//     }
23172	//   },
23173	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
23174	//   "scopes": [
23175	//     "https://www.googleapis.com/auth/dfatrafficking"
23176	//   ]
23177	// }
23178
23179}
23180
23181// method id "dfareporting.contentCategories.get":
23182
23183type ContentCategoriesGetCall struct {
23184	s            *Service
23185	profileId    int64
23186	id           int64
23187	urlParams_   gensupport.URLParams
23188	ifNoneMatch_ string
23189	ctx_         context.Context
23190	header_      http.Header
23191}
23192
23193// Get: Gets one content category by ID.
23194func (r *ContentCategoriesService) Get(profileId int64, id int64) *ContentCategoriesGetCall {
23195	c := &ContentCategoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23196	c.profileId = profileId
23197	c.id = id
23198	return c
23199}
23200
23201// Fields allows partial responses to be retrieved. See
23202// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23203// for more information.
23204func (c *ContentCategoriesGetCall) Fields(s ...googleapi.Field) *ContentCategoriesGetCall {
23205	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23206	return c
23207}
23208
23209// IfNoneMatch sets the optional parameter which makes the operation
23210// fail if the object's ETag matches the given value. This is useful for
23211// getting updates only after the object has changed since the last
23212// request. Use googleapi.IsNotModified to check whether the response
23213// error from Do is the result of In-None-Match.
23214func (c *ContentCategoriesGetCall) IfNoneMatch(entityTag string) *ContentCategoriesGetCall {
23215	c.ifNoneMatch_ = entityTag
23216	return c
23217}
23218
23219// Context sets the context to be used in this call's Do method. Any
23220// pending HTTP request will be aborted if the provided context is
23221// canceled.
23222func (c *ContentCategoriesGetCall) Context(ctx context.Context) *ContentCategoriesGetCall {
23223	c.ctx_ = ctx
23224	return c
23225}
23226
23227// Header returns an http.Header that can be modified by the caller to
23228// add HTTP headers to the request.
23229func (c *ContentCategoriesGetCall) Header() http.Header {
23230	if c.header_ == nil {
23231		c.header_ = make(http.Header)
23232	}
23233	return c.header_
23234}
23235
23236func (c *ContentCategoriesGetCall) doRequest(alt string) (*http.Response, error) {
23237	reqHeaders := make(http.Header)
23238	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
23239	for k, v := range c.header_ {
23240		reqHeaders[k] = v
23241	}
23242	reqHeaders.Set("User-Agent", c.s.userAgent())
23243	if c.ifNoneMatch_ != "" {
23244		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23245	}
23246	var body io.Reader = nil
23247	c.urlParams_.Set("alt", alt)
23248	c.urlParams_.Set("prettyPrint", "false")
23249	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
23250	urls += "?" + c.urlParams_.Encode()
23251	req, err := http.NewRequest("GET", urls, body)
23252	if err != nil {
23253		return nil, err
23254	}
23255	req.Header = reqHeaders
23256	googleapi.Expand(req.URL, map[string]string{
23257		"profileId": strconv.FormatInt(c.profileId, 10),
23258		"id":        strconv.FormatInt(c.id, 10),
23259	})
23260	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23261}
23262
23263// Do executes the "dfareporting.contentCategories.get" call.
23264// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23265// status code is an error. Response headers are in either
23266// *ContentCategory.ServerResponse.Header or (if a response was returned
23267// at all) in error.(*googleapi.Error).Header. Use
23268// googleapi.IsNotModified to check whether the returned error was
23269// because http.StatusNotModified was returned.
23270func (c *ContentCategoriesGetCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23271	gensupport.SetOptions(c.urlParams_, opts...)
23272	res, err := c.doRequest("json")
23273	if res != nil && res.StatusCode == http.StatusNotModified {
23274		if res.Body != nil {
23275			res.Body.Close()
23276		}
23277		return nil, &googleapi.Error{
23278			Code:   res.StatusCode,
23279			Header: res.Header,
23280		}
23281	}
23282	if err != nil {
23283		return nil, err
23284	}
23285	defer googleapi.CloseBody(res)
23286	if err := googleapi.CheckResponse(res); err != nil {
23287		return nil, err
23288	}
23289	ret := &ContentCategory{
23290		ServerResponse: googleapi.ServerResponse{
23291			Header:         res.Header,
23292			HTTPStatusCode: res.StatusCode,
23293		},
23294	}
23295	target := &ret
23296	if err := gensupport.DecodeResponse(target, res); err != nil {
23297		return nil, err
23298	}
23299	return ret, nil
23300	// {
23301	//   "description": "Gets one content category by ID.",
23302	//   "httpMethod": "GET",
23303	//   "id": "dfareporting.contentCategories.get",
23304	//   "parameterOrder": [
23305	//     "profileId",
23306	//     "id"
23307	//   ],
23308	//   "parameters": {
23309	//     "id": {
23310	//       "description": "Content category ID.",
23311	//       "format": "int64",
23312	//       "location": "path",
23313	//       "required": true,
23314	//       "type": "string"
23315	//     },
23316	//     "profileId": {
23317	//       "description": "User profile ID associated with this request.",
23318	//       "format": "int64",
23319	//       "location": "path",
23320	//       "required": true,
23321	//       "type": "string"
23322	//     }
23323	//   },
23324	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
23325	//   "response": {
23326	//     "$ref": "ContentCategory"
23327	//   },
23328	//   "scopes": [
23329	//     "https://www.googleapis.com/auth/dfatrafficking"
23330	//   ]
23331	// }
23332
23333}
23334
23335// method id "dfareporting.contentCategories.insert":
23336
23337type ContentCategoriesInsertCall struct {
23338	s               *Service
23339	profileId       int64
23340	contentcategory *ContentCategory
23341	urlParams_      gensupport.URLParams
23342	ctx_            context.Context
23343	header_         http.Header
23344}
23345
23346// Insert: Inserts a new content category.
23347func (r *ContentCategoriesService) Insert(profileId int64, contentcategory *ContentCategory) *ContentCategoriesInsertCall {
23348	c := &ContentCategoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23349	c.profileId = profileId
23350	c.contentcategory = contentcategory
23351	return c
23352}
23353
23354// Fields allows partial responses to be retrieved. See
23355// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23356// for more information.
23357func (c *ContentCategoriesInsertCall) Fields(s ...googleapi.Field) *ContentCategoriesInsertCall {
23358	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23359	return c
23360}
23361
23362// Context sets the context to be used in this call's Do method. Any
23363// pending HTTP request will be aborted if the provided context is
23364// canceled.
23365func (c *ContentCategoriesInsertCall) Context(ctx context.Context) *ContentCategoriesInsertCall {
23366	c.ctx_ = ctx
23367	return c
23368}
23369
23370// Header returns an http.Header that can be modified by the caller to
23371// add HTTP headers to the request.
23372func (c *ContentCategoriesInsertCall) Header() http.Header {
23373	if c.header_ == nil {
23374		c.header_ = make(http.Header)
23375	}
23376	return c.header_
23377}
23378
23379func (c *ContentCategoriesInsertCall) doRequest(alt string) (*http.Response, error) {
23380	reqHeaders := make(http.Header)
23381	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
23382	for k, v := range c.header_ {
23383		reqHeaders[k] = v
23384	}
23385	reqHeaders.Set("User-Agent", c.s.userAgent())
23386	var body io.Reader = nil
23387	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
23388	if err != nil {
23389		return nil, err
23390	}
23391	reqHeaders.Set("Content-Type", "application/json")
23392	c.urlParams_.Set("alt", alt)
23393	c.urlParams_.Set("prettyPrint", "false")
23394	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23395	urls += "?" + c.urlParams_.Encode()
23396	req, err := http.NewRequest("POST", urls, body)
23397	if err != nil {
23398		return nil, err
23399	}
23400	req.Header = reqHeaders
23401	googleapi.Expand(req.URL, map[string]string{
23402		"profileId": strconv.FormatInt(c.profileId, 10),
23403	})
23404	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23405}
23406
23407// Do executes the "dfareporting.contentCategories.insert" call.
23408// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23409// status code is an error. Response headers are in either
23410// *ContentCategory.ServerResponse.Header or (if a response was returned
23411// at all) in error.(*googleapi.Error).Header. Use
23412// googleapi.IsNotModified to check whether the returned error was
23413// because http.StatusNotModified was returned.
23414func (c *ContentCategoriesInsertCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23415	gensupport.SetOptions(c.urlParams_, opts...)
23416	res, err := c.doRequest("json")
23417	if res != nil && res.StatusCode == http.StatusNotModified {
23418		if res.Body != nil {
23419			res.Body.Close()
23420		}
23421		return nil, &googleapi.Error{
23422			Code:   res.StatusCode,
23423			Header: res.Header,
23424		}
23425	}
23426	if err != nil {
23427		return nil, err
23428	}
23429	defer googleapi.CloseBody(res)
23430	if err := googleapi.CheckResponse(res); err != nil {
23431		return nil, err
23432	}
23433	ret := &ContentCategory{
23434		ServerResponse: googleapi.ServerResponse{
23435			Header:         res.Header,
23436			HTTPStatusCode: res.StatusCode,
23437		},
23438	}
23439	target := &ret
23440	if err := gensupport.DecodeResponse(target, res); err != nil {
23441		return nil, err
23442	}
23443	return ret, nil
23444	// {
23445	//   "description": "Inserts a new content category.",
23446	//   "httpMethod": "POST",
23447	//   "id": "dfareporting.contentCategories.insert",
23448	//   "parameterOrder": [
23449	//     "profileId"
23450	//   ],
23451	//   "parameters": {
23452	//     "profileId": {
23453	//       "description": "User profile ID associated with this request.",
23454	//       "format": "int64",
23455	//       "location": "path",
23456	//       "required": true,
23457	//       "type": "string"
23458	//     }
23459	//   },
23460	//   "path": "userprofiles/{profileId}/contentCategories",
23461	//   "request": {
23462	//     "$ref": "ContentCategory"
23463	//   },
23464	//   "response": {
23465	//     "$ref": "ContentCategory"
23466	//   },
23467	//   "scopes": [
23468	//     "https://www.googleapis.com/auth/dfatrafficking"
23469	//   ]
23470	// }
23471
23472}
23473
23474// method id "dfareporting.contentCategories.list":
23475
23476type ContentCategoriesListCall struct {
23477	s            *Service
23478	profileId    int64
23479	urlParams_   gensupport.URLParams
23480	ifNoneMatch_ string
23481	ctx_         context.Context
23482	header_      http.Header
23483}
23484
23485// List: Retrieves a list of content categories, possibly filtered. This
23486// method supports paging.
23487func (r *ContentCategoriesService) List(profileId int64) *ContentCategoriesListCall {
23488	c := &ContentCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23489	c.profileId = profileId
23490	return c
23491}
23492
23493// Ids sets the optional parameter "ids": Select only content categories
23494// with these IDs.
23495func (c *ContentCategoriesListCall) Ids(ids ...int64) *ContentCategoriesListCall {
23496	var ids_ []string
23497	for _, v := range ids {
23498		ids_ = append(ids_, fmt.Sprint(v))
23499	}
23500	c.urlParams_.SetMulti("ids", ids_)
23501	return c
23502}
23503
23504// MaxResults sets the optional parameter "maxResults": Maximum number
23505// of results to return.
23506func (c *ContentCategoriesListCall) MaxResults(maxResults int64) *ContentCategoriesListCall {
23507	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23508	return c
23509}
23510
23511// PageToken sets the optional parameter "pageToken": Value of the
23512// nextPageToken from the previous result page.
23513func (c *ContentCategoriesListCall) PageToken(pageToken string) *ContentCategoriesListCall {
23514	c.urlParams_.Set("pageToken", pageToken)
23515	return c
23516}
23517
23518// SearchString sets the optional parameter "searchString": Allows
23519// searching for objects by name or ID. Wildcards (*) are allowed. For
23520// example, "contentcategory*2015" will return objects with names like
23521// "contentcategory June 2015", "contentcategory April 2015", or simply
23522// "contentcategory 2015". Most of the searches also add wildcards
23523// implicitly at the start and the end of the search string. For
23524// example, a search string of "contentcategory" will match objects with
23525// name "my contentcategory", "contentcategory 2015", or simply
23526// "contentcategory".
23527func (c *ContentCategoriesListCall) SearchString(searchString string) *ContentCategoriesListCall {
23528	c.urlParams_.Set("searchString", searchString)
23529	return c
23530}
23531
23532// SortField sets the optional parameter "sortField": Field by which to
23533// sort the list.
23534//
23535// Possible values:
23536//   "ID" (default)
23537//   "NAME"
23538func (c *ContentCategoriesListCall) SortField(sortField string) *ContentCategoriesListCall {
23539	c.urlParams_.Set("sortField", sortField)
23540	return c
23541}
23542
23543// SortOrder sets the optional parameter "sortOrder": Order of sorted
23544// results.
23545//
23546// Possible values:
23547//   "ASCENDING" (default)
23548//   "DESCENDING"
23549func (c *ContentCategoriesListCall) SortOrder(sortOrder string) *ContentCategoriesListCall {
23550	c.urlParams_.Set("sortOrder", sortOrder)
23551	return c
23552}
23553
23554// Fields allows partial responses to be retrieved. See
23555// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23556// for more information.
23557func (c *ContentCategoriesListCall) Fields(s ...googleapi.Field) *ContentCategoriesListCall {
23558	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23559	return c
23560}
23561
23562// IfNoneMatch sets the optional parameter which makes the operation
23563// fail if the object's ETag matches the given value. This is useful for
23564// getting updates only after the object has changed since the last
23565// request. Use googleapi.IsNotModified to check whether the response
23566// error from Do is the result of In-None-Match.
23567func (c *ContentCategoriesListCall) IfNoneMatch(entityTag string) *ContentCategoriesListCall {
23568	c.ifNoneMatch_ = entityTag
23569	return c
23570}
23571
23572// Context sets the context to be used in this call's Do method. Any
23573// pending HTTP request will be aborted if the provided context is
23574// canceled.
23575func (c *ContentCategoriesListCall) Context(ctx context.Context) *ContentCategoriesListCall {
23576	c.ctx_ = ctx
23577	return c
23578}
23579
23580// Header returns an http.Header that can be modified by the caller to
23581// add HTTP headers to the request.
23582func (c *ContentCategoriesListCall) Header() http.Header {
23583	if c.header_ == nil {
23584		c.header_ = make(http.Header)
23585	}
23586	return c.header_
23587}
23588
23589func (c *ContentCategoriesListCall) doRequest(alt string) (*http.Response, error) {
23590	reqHeaders := make(http.Header)
23591	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
23592	for k, v := range c.header_ {
23593		reqHeaders[k] = v
23594	}
23595	reqHeaders.Set("User-Agent", c.s.userAgent())
23596	if c.ifNoneMatch_ != "" {
23597		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23598	}
23599	var body io.Reader = nil
23600	c.urlParams_.Set("alt", alt)
23601	c.urlParams_.Set("prettyPrint", "false")
23602	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23603	urls += "?" + c.urlParams_.Encode()
23604	req, err := http.NewRequest("GET", urls, body)
23605	if err != nil {
23606		return nil, err
23607	}
23608	req.Header = reqHeaders
23609	googleapi.Expand(req.URL, map[string]string{
23610		"profileId": strconv.FormatInt(c.profileId, 10),
23611	})
23612	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23613}
23614
23615// Do executes the "dfareporting.contentCategories.list" call.
23616// Exactly one of *ContentCategoriesListResponse or error will be
23617// non-nil. Any non-2xx status code is an error. Response headers are in
23618// either *ContentCategoriesListResponse.ServerResponse.Header or (if a
23619// response was returned at all) in error.(*googleapi.Error).Header. Use
23620// googleapi.IsNotModified to check whether the returned error was
23621// because http.StatusNotModified was returned.
23622func (c *ContentCategoriesListCall) Do(opts ...googleapi.CallOption) (*ContentCategoriesListResponse, error) {
23623	gensupport.SetOptions(c.urlParams_, opts...)
23624	res, err := c.doRequest("json")
23625	if res != nil && res.StatusCode == http.StatusNotModified {
23626		if res.Body != nil {
23627			res.Body.Close()
23628		}
23629		return nil, &googleapi.Error{
23630			Code:   res.StatusCode,
23631			Header: res.Header,
23632		}
23633	}
23634	if err != nil {
23635		return nil, err
23636	}
23637	defer googleapi.CloseBody(res)
23638	if err := googleapi.CheckResponse(res); err != nil {
23639		return nil, err
23640	}
23641	ret := &ContentCategoriesListResponse{
23642		ServerResponse: googleapi.ServerResponse{
23643			Header:         res.Header,
23644			HTTPStatusCode: res.StatusCode,
23645		},
23646	}
23647	target := &ret
23648	if err := gensupport.DecodeResponse(target, res); err != nil {
23649		return nil, err
23650	}
23651	return ret, nil
23652	// {
23653	//   "description": "Retrieves a list of content categories, possibly filtered. This method supports paging.",
23654	//   "httpMethod": "GET",
23655	//   "id": "dfareporting.contentCategories.list",
23656	//   "parameterOrder": [
23657	//     "profileId"
23658	//   ],
23659	//   "parameters": {
23660	//     "ids": {
23661	//       "description": "Select only content categories with these IDs.",
23662	//       "format": "int64",
23663	//       "location": "query",
23664	//       "repeated": true,
23665	//       "type": "string"
23666	//     },
23667	//     "maxResults": {
23668	//       "default": "1000",
23669	//       "description": "Maximum number of results to return.",
23670	//       "format": "int32",
23671	//       "location": "query",
23672	//       "maximum": "1000",
23673	//       "minimum": "0",
23674	//       "type": "integer"
23675	//     },
23676	//     "pageToken": {
23677	//       "description": "Value of the nextPageToken from the previous result page.",
23678	//       "location": "query",
23679	//       "type": "string"
23680	//     },
23681	//     "profileId": {
23682	//       "description": "User profile ID associated with this request.",
23683	//       "format": "int64",
23684	//       "location": "path",
23685	//       "required": true,
23686	//       "type": "string"
23687	//     },
23688	//     "searchString": {
23689	//       "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\".",
23690	//       "location": "query",
23691	//       "type": "string"
23692	//     },
23693	//     "sortField": {
23694	//       "default": "ID",
23695	//       "description": "Field by which to sort the list.",
23696	//       "enum": [
23697	//         "ID",
23698	//         "NAME"
23699	//       ],
23700	//       "enumDescriptions": [
23701	//         "",
23702	//         ""
23703	//       ],
23704	//       "location": "query",
23705	//       "type": "string"
23706	//     },
23707	//     "sortOrder": {
23708	//       "default": "ASCENDING",
23709	//       "description": "Order of sorted results.",
23710	//       "enum": [
23711	//         "ASCENDING",
23712	//         "DESCENDING"
23713	//       ],
23714	//       "enumDescriptions": [
23715	//         "",
23716	//         ""
23717	//       ],
23718	//       "location": "query",
23719	//       "type": "string"
23720	//     }
23721	//   },
23722	//   "path": "userprofiles/{profileId}/contentCategories",
23723	//   "response": {
23724	//     "$ref": "ContentCategoriesListResponse"
23725	//   },
23726	//   "scopes": [
23727	//     "https://www.googleapis.com/auth/dfatrafficking"
23728	//   ]
23729	// }
23730
23731}
23732
23733// Pages invokes f for each page of results.
23734// A non-nil error returned from f will halt the iteration.
23735// The provided context supersedes any context provided to the Context method.
23736func (c *ContentCategoriesListCall) Pages(ctx context.Context, f func(*ContentCategoriesListResponse) error) error {
23737	c.ctx_ = ctx
23738	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23739	for {
23740		x, err := c.Do()
23741		if err != nil {
23742			return err
23743		}
23744		if err := f(x); err != nil {
23745			return err
23746		}
23747		if x.NextPageToken == "" {
23748			return nil
23749		}
23750		c.PageToken(x.NextPageToken)
23751	}
23752}
23753
23754// method id "dfareporting.contentCategories.patch":
23755
23756type ContentCategoriesPatchCall struct {
23757	s               *Service
23758	profileId       int64
23759	contentcategory *ContentCategory
23760	urlParams_      gensupport.URLParams
23761	ctx_            context.Context
23762	header_         http.Header
23763}
23764
23765// Patch: Updates an existing content category. This method supports
23766// patch semantics.
23767func (r *ContentCategoriesService) Patch(profileId int64, id int64, contentcategory *ContentCategory) *ContentCategoriesPatchCall {
23768	c := &ContentCategoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23769	c.profileId = profileId
23770	c.urlParams_.Set("id", fmt.Sprint(id))
23771	c.contentcategory = contentcategory
23772	return c
23773}
23774
23775// Fields allows partial responses to be retrieved. See
23776// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23777// for more information.
23778func (c *ContentCategoriesPatchCall) Fields(s ...googleapi.Field) *ContentCategoriesPatchCall {
23779	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23780	return c
23781}
23782
23783// Context sets the context to be used in this call's Do method. Any
23784// pending HTTP request will be aborted if the provided context is
23785// canceled.
23786func (c *ContentCategoriesPatchCall) Context(ctx context.Context) *ContentCategoriesPatchCall {
23787	c.ctx_ = ctx
23788	return c
23789}
23790
23791// Header returns an http.Header that can be modified by the caller to
23792// add HTTP headers to the request.
23793func (c *ContentCategoriesPatchCall) Header() http.Header {
23794	if c.header_ == nil {
23795		c.header_ = make(http.Header)
23796	}
23797	return c.header_
23798}
23799
23800func (c *ContentCategoriesPatchCall) doRequest(alt string) (*http.Response, error) {
23801	reqHeaders := make(http.Header)
23802	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
23803	for k, v := range c.header_ {
23804		reqHeaders[k] = v
23805	}
23806	reqHeaders.Set("User-Agent", c.s.userAgent())
23807	var body io.Reader = nil
23808	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
23809	if err != nil {
23810		return nil, err
23811	}
23812	reqHeaders.Set("Content-Type", "application/json")
23813	c.urlParams_.Set("alt", alt)
23814	c.urlParams_.Set("prettyPrint", "false")
23815	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23816	urls += "?" + c.urlParams_.Encode()
23817	req, err := http.NewRequest("PATCH", urls, body)
23818	if err != nil {
23819		return nil, err
23820	}
23821	req.Header = reqHeaders
23822	googleapi.Expand(req.URL, map[string]string{
23823		"profileId": strconv.FormatInt(c.profileId, 10),
23824	})
23825	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23826}
23827
23828// Do executes the "dfareporting.contentCategories.patch" call.
23829// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23830// status code is an error. Response headers are in either
23831// *ContentCategory.ServerResponse.Header or (if a response was returned
23832// at all) in error.(*googleapi.Error).Header. Use
23833// googleapi.IsNotModified to check whether the returned error was
23834// because http.StatusNotModified was returned.
23835func (c *ContentCategoriesPatchCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23836	gensupport.SetOptions(c.urlParams_, opts...)
23837	res, err := c.doRequest("json")
23838	if res != nil && res.StatusCode == http.StatusNotModified {
23839		if res.Body != nil {
23840			res.Body.Close()
23841		}
23842		return nil, &googleapi.Error{
23843			Code:   res.StatusCode,
23844			Header: res.Header,
23845		}
23846	}
23847	if err != nil {
23848		return nil, err
23849	}
23850	defer googleapi.CloseBody(res)
23851	if err := googleapi.CheckResponse(res); err != nil {
23852		return nil, err
23853	}
23854	ret := &ContentCategory{
23855		ServerResponse: googleapi.ServerResponse{
23856			Header:         res.Header,
23857			HTTPStatusCode: res.StatusCode,
23858		},
23859	}
23860	target := &ret
23861	if err := gensupport.DecodeResponse(target, res); err != nil {
23862		return nil, err
23863	}
23864	return ret, nil
23865	// {
23866	//   "description": "Updates an existing content category. This method supports patch semantics.",
23867	//   "httpMethod": "PATCH",
23868	//   "id": "dfareporting.contentCategories.patch",
23869	//   "parameterOrder": [
23870	//     "profileId",
23871	//     "id"
23872	//   ],
23873	//   "parameters": {
23874	//     "id": {
23875	//       "description": "Content category ID.",
23876	//       "format": "int64",
23877	//       "location": "query",
23878	//       "required": true,
23879	//       "type": "string"
23880	//     },
23881	//     "profileId": {
23882	//       "description": "User profile ID associated with this request.",
23883	//       "format": "int64",
23884	//       "location": "path",
23885	//       "required": true,
23886	//       "type": "string"
23887	//     }
23888	//   },
23889	//   "path": "userprofiles/{profileId}/contentCategories",
23890	//   "request": {
23891	//     "$ref": "ContentCategory"
23892	//   },
23893	//   "response": {
23894	//     "$ref": "ContentCategory"
23895	//   },
23896	//   "scopes": [
23897	//     "https://www.googleapis.com/auth/dfatrafficking"
23898	//   ]
23899	// }
23900
23901}
23902
23903// method id "dfareporting.contentCategories.update":
23904
23905type ContentCategoriesUpdateCall struct {
23906	s               *Service
23907	profileId       int64
23908	contentcategory *ContentCategory
23909	urlParams_      gensupport.URLParams
23910	ctx_            context.Context
23911	header_         http.Header
23912}
23913
23914// Update: Updates an existing content category.
23915func (r *ContentCategoriesService) Update(profileId int64, contentcategory *ContentCategory) *ContentCategoriesUpdateCall {
23916	c := &ContentCategoriesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23917	c.profileId = profileId
23918	c.contentcategory = contentcategory
23919	return c
23920}
23921
23922// Fields allows partial responses to be retrieved. See
23923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23924// for more information.
23925func (c *ContentCategoriesUpdateCall) Fields(s ...googleapi.Field) *ContentCategoriesUpdateCall {
23926	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23927	return c
23928}
23929
23930// Context sets the context to be used in this call's Do method. Any
23931// pending HTTP request will be aborted if the provided context is
23932// canceled.
23933func (c *ContentCategoriesUpdateCall) Context(ctx context.Context) *ContentCategoriesUpdateCall {
23934	c.ctx_ = ctx
23935	return c
23936}
23937
23938// Header returns an http.Header that can be modified by the caller to
23939// add HTTP headers to the request.
23940func (c *ContentCategoriesUpdateCall) Header() http.Header {
23941	if c.header_ == nil {
23942		c.header_ = make(http.Header)
23943	}
23944	return c.header_
23945}
23946
23947func (c *ContentCategoriesUpdateCall) doRequest(alt string) (*http.Response, error) {
23948	reqHeaders := make(http.Header)
23949	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
23950	for k, v := range c.header_ {
23951		reqHeaders[k] = v
23952	}
23953	reqHeaders.Set("User-Agent", c.s.userAgent())
23954	var body io.Reader = nil
23955	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
23956	if err != nil {
23957		return nil, err
23958	}
23959	reqHeaders.Set("Content-Type", "application/json")
23960	c.urlParams_.Set("alt", alt)
23961	c.urlParams_.Set("prettyPrint", "false")
23962	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23963	urls += "?" + c.urlParams_.Encode()
23964	req, err := http.NewRequest("PUT", urls, body)
23965	if err != nil {
23966		return nil, err
23967	}
23968	req.Header = reqHeaders
23969	googleapi.Expand(req.URL, map[string]string{
23970		"profileId": strconv.FormatInt(c.profileId, 10),
23971	})
23972	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23973}
23974
23975// Do executes the "dfareporting.contentCategories.update" call.
23976// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23977// status code is an error. Response headers are in either
23978// *ContentCategory.ServerResponse.Header or (if a response was returned
23979// at all) in error.(*googleapi.Error).Header. Use
23980// googleapi.IsNotModified to check whether the returned error was
23981// because http.StatusNotModified was returned.
23982func (c *ContentCategoriesUpdateCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23983	gensupport.SetOptions(c.urlParams_, opts...)
23984	res, err := c.doRequest("json")
23985	if res != nil && res.StatusCode == http.StatusNotModified {
23986		if res.Body != nil {
23987			res.Body.Close()
23988		}
23989		return nil, &googleapi.Error{
23990			Code:   res.StatusCode,
23991			Header: res.Header,
23992		}
23993	}
23994	if err != nil {
23995		return nil, err
23996	}
23997	defer googleapi.CloseBody(res)
23998	if err := googleapi.CheckResponse(res); err != nil {
23999		return nil, err
24000	}
24001	ret := &ContentCategory{
24002		ServerResponse: googleapi.ServerResponse{
24003			Header:         res.Header,
24004			HTTPStatusCode: res.StatusCode,
24005		},
24006	}
24007	target := &ret
24008	if err := gensupport.DecodeResponse(target, res); err != nil {
24009		return nil, err
24010	}
24011	return ret, nil
24012	// {
24013	//   "description": "Updates an existing content category.",
24014	//   "httpMethod": "PUT",
24015	//   "id": "dfareporting.contentCategories.update",
24016	//   "parameterOrder": [
24017	//     "profileId"
24018	//   ],
24019	//   "parameters": {
24020	//     "profileId": {
24021	//       "description": "User profile ID associated with this request.",
24022	//       "format": "int64",
24023	//       "location": "path",
24024	//       "required": true,
24025	//       "type": "string"
24026	//     }
24027	//   },
24028	//   "path": "userprofiles/{profileId}/contentCategories",
24029	//   "request": {
24030	//     "$ref": "ContentCategory"
24031	//   },
24032	//   "response": {
24033	//     "$ref": "ContentCategory"
24034	//   },
24035	//   "scopes": [
24036	//     "https://www.googleapis.com/auth/dfatrafficking"
24037	//   ]
24038	// }
24039
24040}
24041
24042// method id "dfareporting.conversions.batchinsert":
24043
24044type ConversionsBatchinsertCall struct {
24045	s                             *Service
24046	profileId                     int64
24047	conversionsbatchinsertrequest *ConversionsBatchInsertRequest
24048	urlParams_                    gensupport.URLParams
24049	ctx_                          context.Context
24050	header_                       http.Header
24051}
24052
24053// Batchinsert: Inserts conversions.
24054func (r *ConversionsService) Batchinsert(profileId int64, conversionsbatchinsertrequest *ConversionsBatchInsertRequest) *ConversionsBatchinsertCall {
24055	c := &ConversionsBatchinsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24056	c.profileId = profileId
24057	c.conversionsbatchinsertrequest = conversionsbatchinsertrequest
24058	return c
24059}
24060
24061// Fields allows partial responses to be retrieved. See
24062// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24063// for more information.
24064func (c *ConversionsBatchinsertCall) Fields(s ...googleapi.Field) *ConversionsBatchinsertCall {
24065	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24066	return c
24067}
24068
24069// Context sets the context to be used in this call's Do method. Any
24070// pending HTTP request will be aborted if the provided context is
24071// canceled.
24072func (c *ConversionsBatchinsertCall) Context(ctx context.Context) *ConversionsBatchinsertCall {
24073	c.ctx_ = ctx
24074	return c
24075}
24076
24077// Header returns an http.Header that can be modified by the caller to
24078// add HTTP headers to the request.
24079func (c *ConversionsBatchinsertCall) Header() http.Header {
24080	if c.header_ == nil {
24081		c.header_ = make(http.Header)
24082	}
24083	return c.header_
24084}
24085
24086func (c *ConversionsBatchinsertCall) doRequest(alt string) (*http.Response, error) {
24087	reqHeaders := make(http.Header)
24088	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24089	for k, v := range c.header_ {
24090		reqHeaders[k] = v
24091	}
24092	reqHeaders.Set("User-Agent", c.s.userAgent())
24093	var body io.Reader = nil
24094	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchinsertrequest)
24095	if err != nil {
24096		return nil, err
24097	}
24098	reqHeaders.Set("Content-Type", "application/json")
24099	c.urlParams_.Set("alt", alt)
24100	c.urlParams_.Set("prettyPrint", "false")
24101	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchinsert")
24102	urls += "?" + c.urlParams_.Encode()
24103	req, err := http.NewRequest("POST", urls, body)
24104	if err != nil {
24105		return nil, err
24106	}
24107	req.Header = reqHeaders
24108	googleapi.Expand(req.URL, map[string]string{
24109		"profileId": strconv.FormatInt(c.profileId, 10),
24110	})
24111	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24112}
24113
24114// Do executes the "dfareporting.conversions.batchinsert" call.
24115// Exactly one of *ConversionsBatchInsertResponse or error will be
24116// non-nil. Any non-2xx status code is an error. Response headers are in
24117// either *ConversionsBatchInsertResponse.ServerResponse.Header or (if a
24118// response was returned at all) in error.(*googleapi.Error).Header. Use
24119// googleapi.IsNotModified to check whether the returned error was
24120// because http.StatusNotModified was returned.
24121func (c *ConversionsBatchinsertCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchInsertResponse, error) {
24122	gensupport.SetOptions(c.urlParams_, opts...)
24123	res, err := c.doRequest("json")
24124	if res != nil && res.StatusCode == http.StatusNotModified {
24125		if res.Body != nil {
24126			res.Body.Close()
24127		}
24128		return nil, &googleapi.Error{
24129			Code:   res.StatusCode,
24130			Header: res.Header,
24131		}
24132	}
24133	if err != nil {
24134		return nil, err
24135	}
24136	defer googleapi.CloseBody(res)
24137	if err := googleapi.CheckResponse(res); err != nil {
24138		return nil, err
24139	}
24140	ret := &ConversionsBatchInsertResponse{
24141		ServerResponse: googleapi.ServerResponse{
24142			Header:         res.Header,
24143			HTTPStatusCode: res.StatusCode,
24144		},
24145	}
24146	target := &ret
24147	if err := gensupport.DecodeResponse(target, res); err != nil {
24148		return nil, err
24149	}
24150	return ret, nil
24151	// {
24152	//   "description": "Inserts conversions.",
24153	//   "httpMethod": "POST",
24154	//   "id": "dfareporting.conversions.batchinsert",
24155	//   "parameterOrder": [
24156	//     "profileId"
24157	//   ],
24158	//   "parameters": {
24159	//     "profileId": {
24160	//       "description": "User profile ID associated with this request.",
24161	//       "format": "int64",
24162	//       "location": "path",
24163	//       "required": true,
24164	//       "type": "string"
24165	//     }
24166	//   },
24167	//   "path": "userprofiles/{profileId}/conversions/batchinsert",
24168	//   "request": {
24169	//     "$ref": "ConversionsBatchInsertRequest"
24170	//   },
24171	//   "response": {
24172	//     "$ref": "ConversionsBatchInsertResponse"
24173	//   },
24174	//   "scopes": [
24175	//     "https://www.googleapis.com/auth/ddmconversions"
24176	//   ]
24177	// }
24178
24179}
24180
24181// method id "dfareporting.conversions.batchupdate":
24182
24183type ConversionsBatchupdateCall struct {
24184	s                             *Service
24185	profileId                     int64
24186	conversionsbatchupdaterequest *ConversionsBatchUpdateRequest
24187	urlParams_                    gensupport.URLParams
24188	ctx_                          context.Context
24189	header_                       http.Header
24190}
24191
24192// Batchupdate: Updates existing conversions.
24193func (r *ConversionsService) Batchupdate(profileId int64, conversionsbatchupdaterequest *ConversionsBatchUpdateRequest) *ConversionsBatchupdateCall {
24194	c := &ConversionsBatchupdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24195	c.profileId = profileId
24196	c.conversionsbatchupdaterequest = conversionsbatchupdaterequest
24197	return c
24198}
24199
24200// Fields allows partial responses to be retrieved. See
24201// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24202// for more information.
24203func (c *ConversionsBatchupdateCall) Fields(s ...googleapi.Field) *ConversionsBatchupdateCall {
24204	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24205	return c
24206}
24207
24208// Context sets the context to be used in this call's Do method. Any
24209// pending HTTP request will be aborted if the provided context is
24210// canceled.
24211func (c *ConversionsBatchupdateCall) Context(ctx context.Context) *ConversionsBatchupdateCall {
24212	c.ctx_ = ctx
24213	return c
24214}
24215
24216// Header returns an http.Header that can be modified by the caller to
24217// add HTTP headers to the request.
24218func (c *ConversionsBatchupdateCall) Header() http.Header {
24219	if c.header_ == nil {
24220		c.header_ = make(http.Header)
24221	}
24222	return c.header_
24223}
24224
24225func (c *ConversionsBatchupdateCall) doRequest(alt string) (*http.Response, error) {
24226	reqHeaders := make(http.Header)
24227	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24228	for k, v := range c.header_ {
24229		reqHeaders[k] = v
24230	}
24231	reqHeaders.Set("User-Agent", c.s.userAgent())
24232	var body io.Reader = nil
24233	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchupdaterequest)
24234	if err != nil {
24235		return nil, err
24236	}
24237	reqHeaders.Set("Content-Type", "application/json")
24238	c.urlParams_.Set("alt", alt)
24239	c.urlParams_.Set("prettyPrint", "false")
24240	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchupdate")
24241	urls += "?" + c.urlParams_.Encode()
24242	req, err := http.NewRequest("POST", urls, body)
24243	if err != nil {
24244		return nil, err
24245	}
24246	req.Header = reqHeaders
24247	googleapi.Expand(req.URL, map[string]string{
24248		"profileId": strconv.FormatInt(c.profileId, 10),
24249	})
24250	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24251}
24252
24253// Do executes the "dfareporting.conversions.batchupdate" call.
24254// Exactly one of *ConversionsBatchUpdateResponse or error will be
24255// non-nil. Any non-2xx status code is an error. Response headers are in
24256// either *ConversionsBatchUpdateResponse.ServerResponse.Header or (if a
24257// response was returned at all) in error.(*googleapi.Error).Header. Use
24258// googleapi.IsNotModified to check whether the returned error was
24259// because http.StatusNotModified was returned.
24260func (c *ConversionsBatchupdateCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchUpdateResponse, error) {
24261	gensupport.SetOptions(c.urlParams_, opts...)
24262	res, err := c.doRequest("json")
24263	if res != nil && res.StatusCode == http.StatusNotModified {
24264		if res.Body != nil {
24265			res.Body.Close()
24266		}
24267		return nil, &googleapi.Error{
24268			Code:   res.StatusCode,
24269			Header: res.Header,
24270		}
24271	}
24272	if err != nil {
24273		return nil, err
24274	}
24275	defer googleapi.CloseBody(res)
24276	if err := googleapi.CheckResponse(res); err != nil {
24277		return nil, err
24278	}
24279	ret := &ConversionsBatchUpdateResponse{
24280		ServerResponse: googleapi.ServerResponse{
24281			Header:         res.Header,
24282			HTTPStatusCode: res.StatusCode,
24283		},
24284	}
24285	target := &ret
24286	if err := gensupport.DecodeResponse(target, res); err != nil {
24287		return nil, err
24288	}
24289	return ret, nil
24290	// {
24291	//   "description": "Updates existing conversions.",
24292	//   "httpMethod": "POST",
24293	//   "id": "dfareporting.conversions.batchupdate",
24294	//   "parameterOrder": [
24295	//     "profileId"
24296	//   ],
24297	//   "parameters": {
24298	//     "profileId": {
24299	//       "description": "User profile ID associated with this request.",
24300	//       "format": "int64",
24301	//       "location": "path",
24302	//       "required": true,
24303	//       "type": "string"
24304	//     }
24305	//   },
24306	//   "path": "userprofiles/{profileId}/conversions/batchupdate",
24307	//   "request": {
24308	//     "$ref": "ConversionsBatchUpdateRequest"
24309	//   },
24310	//   "response": {
24311	//     "$ref": "ConversionsBatchUpdateResponse"
24312	//   },
24313	//   "scopes": [
24314	//     "https://www.googleapis.com/auth/ddmconversions"
24315	//   ]
24316	// }
24317
24318}
24319
24320// method id "dfareporting.countries.get":
24321
24322type CountriesGetCall struct {
24323	s            *Service
24324	profileId    int64
24325	dartId       int64
24326	urlParams_   gensupport.URLParams
24327	ifNoneMatch_ string
24328	ctx_         context.Context
24329	header_      http.Header
24330}
24331
24332// Get: Gets one country by ID.
24333func (r *CountriesService) Get(profileId int64, dartId int64) *CountriesGetCall {
24334	c := &CountriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24335	c.profileId = profileId
24336	c.dartId = dartId
24337	return c
24338}
24339
24340// Fields allows partial responses to be retrieved. See
24341// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24342// for more information.
24343func (c *CountriesGetCall) Fields(s ...googleapi.Field) *CountriesGetCall {
24344	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24345	return c
24346}
24347
24348// IfNoneMatch sets the optional parameter which makes the operation
24349// fail if the object's ETag matches the given value. This is useful for
24350// getting updates only after the object has changed since the last
24351// request. Use googleapi.IsNotModified to check whether the response
24352// error from Do is the result of In-None-Match.
24353func (c *CountriesGetCall) IfNoneMatch(entityTag string) *CountriesGetCall {
24354	c.ifNoneMatch_ = entityTag
24355	return c
24356}
24357
24358// Context sets the context to be used in this call's Do method. Any
24359// pending HTTP request will be aborted if the provided context is
24360// canceled.
24361func (c *CountriesGetCall) Context(ctx context.Context) *CountriesGetCall {
24362	c.ctx_ = ctx
24363	return c
24364}
24365
24366// Header returns an http.Header that can be modified by the caller to
24367// add HTTP headers to the request.
24368func (c *CountriesGetCall) Header() http.Header {
24369	if c.header_ == nil {
24370		c.header_ = make(http.Header)
24371	}
24372	return c.header_
24373}
24374
24375func (c *CountriesGetCall) doRequest(alt string) (*http.Response, error) {
24376	reqHeaders := make(http.Header)
24377	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24378	for k, v := range c.header_ {
24379		reqHeaders[k] = v
24380	}
24381	reqHeaders.Set("User-Agent", c.s.userAgent())
24382	if c.ifNoneMatch_ != "" {
24383		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24384	}
24385	var body io.Reader = nil
24386	c.urlParams_.Set("alt", alt)
24387	c.urlParams_.Set("prettyPrint", "false")
24388	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries/{dartId}")
24389	urls += "?" + c.urlParams_.Encode()
24390	req, err := http.NewRequest("GET", urls, body)
24391	if err != nil {
24392		return nil, err
24393	}
24394	req.Header = reqHeaders
24395	googleapi.Expand(req.URL, map[string]string{
24396		"profileId": strconv.FormatInt(c.profileId, 10),
24397		"dartId":    strconv.FormatInt(c.dartId, 10),
24398	})
24399	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24400}
24401
24402// Do executes the "dfareporting.countries.get" call.
24403// Exactly one of *Country or error will be non-nil. Any non-2xx status
24404// code is an error. Response headers are in either
24405// *Country.ServerResponse.Header or (if a response was returned at all)
24406// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
24407// check whether the returned error was because http.StatusNotModified
24408// was returned.
24409func (c *CountriesGetCall) Do(opts ...googleapi.CallOption) (*Country, error) {
24410	gensupport.SetOptions(c.urlParams_, opts...)
24411	res, err := c.doRequest("json")
24412	if res != nil && res.StatusCode == http.StatusNotModified {
24413		if res.Body != nil {
24414			res.Body.Close()
24415		}
24416		return nil, &googleapi.Error{
24417			Code:   res.StatusCode,
24418			Header: res.Header,
24419		}
24420	}
24421	if err != nil {
24422		return nil, err
24423	}
24424	defer googleapi.CloseBody(res)
24425	if err := googleapi.CheckResponse(res); err != nil {
24426		return nil, err
24427	}
24428	ret := &Country{
24429		ServerResponse: googleapi.ServerResponse{
24430			Header:         res.Header,
24431			HTTPStatusCode: res.StatusCode,
24432		},
24433	}
24434	target := &ret
24435	if err := gensupport.DecodeResponse(target, res); err != nil {
24436		return nil, err
24437	}
24438	return ret, nil
24439	// {
24440	//   "description": "Gets one country by ID.",
24441	//   "httpMethod": "GET",
24442	//   "id": "dfareporting.countries.get",
24443	//   "parameterOrder": [
24444	//     "profileId",
24445	//     "dartId"
24446	//   ],
24447	//   "parameters": {
24448	//     "dartId": {
24449	//       "description": "Country DART ID.",
24450	//       "format": "int64",
24451	//       "location": "path",
24452	//       "required": true,
24453	//       "type": "string"
24454	//     },
24455	//     "profileId": {
24456	//       "description": "User profile ID associated with this request.",
24457	//       "format": "int64",
24458	//       "location": "path",
24459	//       "required": true,
24460	//       "type": "string"
24461	//     }
24462	//   },
24463	//   "path": "userprofiles/{profileId}/countries/{dartId}",
24464	//   "response": {
24465	//     "$ref": "Country"
24466	//   },
24467	//   "scopes": [
24468	//     "https://www.googleapis.com/auth/dfatrafficking"
24469	//   ]
24470	// }
24471
24472}
24473
24474// method id "dfareporting.countries.list":
24475
24476type CountriesListCall struct {
24477	s            *Service
24478	profileId    int64
24479	urlParams_   gensupport.URLParams
24480	ifNoneMatch_ string
24481	ctx_         context.Context
24482	header_      http.Header
24483}
24484
24485// List: Retrieves a list of countries.
24486func (r *CountriesService) List(profileId int64) *CountriesListCall {
24487	c := &CountriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24488	c.profileId = profileId
24489	return c
24490}
24491
24492// Fields allows partial responses to be retrieved. See
24493// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24494// for more information.
24495func (c *CountriesListCall) Fields(s ...googleapi.Field) *CountriesListCall {
24496	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24497	return c
24498}
24499
24500// IfNoneMatch sets the optional parameter which makes the operation
24501// fail if the object's ETag matches the given value. This is useful for
24502// getting updates only after the object has changed since the last
24503// request. Use googleapi.IsNotModified to check whether the response
24504// error from Do is the result of In-None-Match.
24505func (c *CountriesListCall) IfNoneMatch(entityTag string) *CountriesListCall {
24506	c.ifNoneMatch_ = entityTag
24507	return c
24508}
24509
24510// Context sets the context to be used in this call's Do method. Any
24511// pending HTTP request will be aborted if the provided context is
24512// canceled.
24513func (c *CountriesListCall) Context(ctx context.Context) *CountriesListCall {
24514	c.ctx_ = ctx
24515	return c
24516}
24517
24518// Header returns an http.Header that can be modified by the caller to
24519// add HTTP headers to the request.
24520func (c *CountriesListCall) Header() http.Header {
24521	if c.header_ == nil {
24522		c.header_ = make(http.Header)
24523	}
24524	return c.header_
24525}
24526
24527func (c *CountriesListCall) doRequest(alt string) (*http.Response, error) {
24528	reqHeaders := make(http.Header)
24529	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24530	for k, v := range c.header_ {
24531		reqHeaders[k] = v
24532	}
24533	reqHeaders.Set("User-Agent", c.s.userAgent())
24534	if c.ifNoneMatch_ != "" {
24535		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24536	}
24537	var body io.Reader = nil
24538	c.urlParams_.Set("alt", alt)
24539	c.urlParams_.Set("prettyPrint", "false")
24540	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries")
24541	urls += "?" + c.urlParams_.Encode()
24542	req, err := http.NewRequest("GET", urls, body)
24543	if err != nil {
24544		return nil, err
24545	}
24546	req.Header = reqHeaders
24547	googleapi.Expand(req.URL, map[string]string{
24548		"profileId": strconv.FormatInt(c.profileId, 10),
24549	})
24550	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24551}
24552
24553// Do executes the "dfareporting.countries.list" call.
24554// Exactly one of *CountriesListResponse or error will be non-nil. Any
24555// non-2xx status code is an error. Response headers are in either
24556// *CountriesListResponse.ServerResponse.Header or (if a response was
24557// returned at all) in error.(*googleapi.Error).Header. Use
24558// googleapi.IsNotModified to check whether the returned error was
24559// because http.StatusNotModified was returned.
24560func (c *CountriesListCall) Do(opts ...googleapi.CallOption) (*CountriesListResponse, error) {
24561	gensupport.SetOptions(c.urlParams_, opts...)
24562	res, err := c.doRequest("json")
24563	if res != nil && res.StatusCode == http.StatusNotModified {
24564		if res.Body != nil {
24565			res.Body.Close()
24566		}
24567		return nil, &googleapi.Error{
24568			Code:   res.StatusCode,
24569			Header: res.Header,
24570		}
24571	}
24572	if err != nil {
24573		return nil, err
24574	}
24575	defer googleapi.CloseBody(res)
24576	if err := googleapi.CheckResponse(res); err != nil {
24577		return nil, err
24578	}
24579	ret := &CountriesListResponse{
24580		ServerResponse: googleapi.ServerResponse{
24581			Header:         res.Header,
24582			HTTPStatusCode: res.StatusCode,
24583		},
24584	}
24585	target := &ret
24586	if err := gensupport.DecodeResponse(target, res); err != nil {
24587		return nil, err
24588	}
24589	return ret, nil
24590	// {
24591	//   "description": "Retrieves a list of countries.",
24592	//   "httpMethod": "GET",
24593	//   "id": "dfareporting.countries.list",
24594	//   "parameterOrder": [
24595	//     "profileId"
24596	//   ],
24597	//   "parameters": {
24598	//     "profileId": {
24599	//       "description": "User profile ID associated with this request.",
24600	//       "format": "int64",
24601	//       "location": "path",
24602	//       "required": true,
24603	//       "type": "string"
24604	//     }
24605	//   },
24606	//   "path": "userprofiles/{profileId}/countries",
24607	//   "response": {
24608	//     "$ref": "CountriesListResponse"
24609	//   },
24610	//   "scopes": [
24611	//     "https://www.googleapis.com/auth/dfatrafficking"
24612	//   ]
24613	// }
24614
24615}
24616
24617// method id "dfareporting.creativeAssets.insert":
24618
24619type CreativeAssetsInsertCall struct {
24620	s                     *Service
24621	profileId             int64
24622	advertiserId          int64
24623	creativeassetmetadata *CreativeAssetMetadata
24624	urlParams_            gensupport.URLParams
24625	mediaInfo_            *gensupport.MediaInfo
24626	ctx_                  context.Context
24627	header_               http.Header
24628}
24629
24630// Insert: Inserts a new creative asset.
24631func (r *CreativeAssetsService) Insert(profileId int64, advertiserId int64, creativeassetmetadata *CreativeAssetMetadata) *CreativeAssetsInsertCall {
24632	c := &CreativeAssetsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24633	c.profileId = profileId
24634	c.advertiserId = advertiserId
24635	c.creativeassetmetadata = creativeassetmetadata
24636	return c
24637}
24638
24639// Media specifies the media to upload in one or more chunks. The chunk
24640// size may be controlled by supplying a MediaOption generated by
24641// googleapi.ChunkSize. The chunk size defaults to
24642// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
24643// upload request will be determined by sniffing the contents of r,
24644// unless a MediaOption generated by googleapi.ContentType is
24645// supplied.
24646// At most one of Media and ResumableMedia may be set.
24647func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CreativeAssetsInsertCall {
24648	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
24649	return c
24650}
24651
24652// ResumableMedia specifies the media to upload in chunks and can be
24653// canceled with ctx.
24654//
24655// Deprecated: use Media instead.
24656//
24657// At most one of Media and ResumableMedia may be set. mediaType
24658// identifies the MIME media type of the upload, such as "image/png". If
24659// mediaType is "", it will be auto-detected. The provided ctx will
24660// supersede any context previously provided to the Context method.
24661func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall {
24662	c.ctx_ = ctx
24663	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
24664	return c
24665}
24666
24667// ProgressUpdater provides a callback function that will be called
24668// after every chunk. It should be a low-latency function in order to
24669// not slow down the upload operation. This should only be called when
24670// using ResumableMedia (as opposed to Media).
24671func (c *CreativeAssetsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CreativeAssetsInsertCall {
24672	c.mediaInfo_.SetProgressUpdater(pu)
24673	return c
24674}
24675
24676// Fields allows partial responses to be retrieved. See
24677// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24678// for more information.
24679func (c *CreativeAssetsInsertCall) Fields(s ...googleapi.Field) *CreativeAssetsInsertCall {
24680	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24681	return c
24682}
24683
24684// Context sets the context to be used in this call's Do method. Any
24685// pending HTTP request will be aborted if the provided context is
24686// canceled.
24687// This context will supersede any context previously provided to the
24688// ResumableMedia method.
24689func (c *CreativeAssetsInsertCall) Context(ctx context.Context) *CreativeAssetsInsertCall {
24690	c.ctx_ = ctx
24691	return c
24692}
24693
24694// Header returns an http.Header that can be modified by the caller to
24695// add HTTP headers to the request.
24696func (c *CreativeAssetsInsertCall) Header() http.Header {
24697	if c.header_ == nil {
24698		c.header_ = make(http.Header)
24699	}
24700	return c.header_
24701}
24702
24703func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) {
24704	reqHeaders := make(http.Header)
24705	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24706	for k, v := range c.header_ {
24707		reqHeaders[k] = v
24708	}
24709	reqHeaders.Set("User-Agent", c.s.userAgent())
24710	var body io.Reader = nil
24711	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativeassetmetadata)
24712	if err != nil {
24713		return nil, err
24714	}
24715	reqHeaders.Set("Content-Type", "application/json")
24716	c.urlParams_.Set("alt", alt)
24717	c.urlParams_.Set("prettyPrint", "false")
24718	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
24719	if c.mediaInfo_ != nil {
24720		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/dfareporting/v3.0/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
24721		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
24722	}
24723	if body == nil {
24724		body = new(bytes.Buffer)
24725		reqHeaders.Set("Content-Type", "application/json")
24726	}
24727	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
24728	defer cleanup()
24729	urls += "?" + c.urlParams_.Encode()
24730	req, err := http.NewRequest("POST", urls, body)
24731	if err != nil {
24732		return nil, err
24733	}
24734	req.Header = reqHeaders
24735	req.GetBody = getBody
24736	googleapi.Expand(req.URL, map[string]string{
24737		"profileId":    strconv.FormatInt(c.profileId, 10),
24738		"advertiserId": strconv.FormatInt(c.advertiserId, 10),
24739	})
24740	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24741}
24742
24743// Do executes the "dfareporting.creativeAssets.insert" call.
24744// Exactly one of *CreativeAssetMetadata or error will be non-nil. Any
24745// non-2xx status code is an error. Response headers are in either
24746// *CreativeAssetMetadata.ServerResponse.Header or (if a response was
24747// returned at all) in error.(*googleapi.Error).Header. Use
24748// googleapi.IsNotModified to check whether the returned error was
24749// because http.StatusNotModified was returned.
24750func (c *CreativeAssetsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeAssetMetadata, error) {
24751	gensupport.SetOptions(c.urlParams_, opts...)
24752	res, err := c.doRequest("json")
24753	if res != nil && res.StatusCode == http.StatusNotModified {
24754		if res.Body != nil {
24755			res.Body.Close()
24756		}
24757		return nil, &googleapi.Error{
24758			Code:   res.StatusCode,
24759			Header: res.Header,
24760		}
24761	}
24762	if err != nil {
24763		return nil, err
24764	}
24765	defer googleapi.CloseBody(res)
24766	if err := googleapi.CheckResponse(res); err != nil {
24767		return nil, err
24768	}
24769	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
24770	if rx != nil {
24771		rx.Client = c.s.client
24772		rx.UserAgent = c.s.userAgent()
24773		ctx := c.ctx_
24774		if ctx == nil {
24775			ctx = context.TODO()
24776		}
24777		res, err = rx.Upload(ctx)
24778		if err != nil {
24779			return nil, err
24780		}
24781		defer res.Body.Close()
24782		if err := googleapi.CheckResponse(res); err != nil {
24783			return nil, err
24784		}
24785	}
24786	ret := &CreativeAssetMetadata{
24787		ServerResponse: googleapi.ServerResponse{
24788			Header:         res.Header,
24789			HTTPStatusCode: res.StatusCode,
24790		},
24791	}
24792	target := &ret
24793	if err := gensupport.DecodeResponse(target, res); err != nil {
24794		return nil, err
24795	}
24796	return ret, nil
24797	// {
24798	//   "description": "Inserts a new creative asset.",
24799	//   "httpMethod": "POST",
24800	//   "id": "dfareporting.creativeAssets.insert",
24801	//   "mediaUpload": {
24802	//     "accept": [
24803	//       "*/*"
24804	//     ],
24805	//     "maxSize": "1024MB",
24806	//     "protocols": {
24807	//       "resumable": {
24808	//         "multipart": true,
24809	//         "path": "/resumable/upload/dfareporting/v3.0/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
24810	//       },
24811	//       "simple": {
24812	//         "multipart": true,
24813	//         "path": "/upload/dfareporting/v3.0/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
24814	//       }
24815	//     }
24816	//   },
24817	//   "parameterOrder": [
24818	//     "profileId",
24819	//     "advertiserId"
24820	//   ],
24821	//   "parameters": {
24822	//     "advertiserId": {
24823	//       "description": "Advertiser ID of this creative. This is a required field.",
24824	//       "format": "int64",
24825	//       "location": "path",
24826	//       "required": true,
24827	//       "type": "string"
24828	//     },
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}/creativeAssets/{advertiserId}/creativeAssets",
24838	//   "request": {
24839	//     "$ref": "CreativeAssetMetadata"
24840	//   },
24841	//   "response": {
24842	//     "$ref": "CreativeAssetMetadata"
24843	//   },
24844	//   "scopes": [
24845	//     "https://www.googleapis.com/auth/dfatrafficking"
24846	//   ],
24847	//   "supportsMediaUpload": true
24848	// }
24849
24850}
24851
24852// method id "dfareporting.creativeFieldValues.delete":
24853
24854type CreativeFieldValuesDeleteCall struct {
24855	s               *Service
24856	profileId       int64
24857	creativeFieldId int64
24858	id              int64
24859	urlParams_      gensupport.URLParams
24860	ctx_            context.Context
24861	header_         http.Header
24862}
24863
24864// Delete: Deletes an existing creative field value.
24865func (r *CreativeFieldValuesService) Delete(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesDeleteCall {
24866	c := &CreativeFieldValuesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24867	c.profileId = profileId
24868	c.creativeFieldId = creativeFieldId
24869	c.id = id
24870	return c
24871}
24872
24873// Fields allows partial responses to be retrieved. See
24874// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24875// for more information.
24876func (c *CreativeFieldValuesDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldValuesDeleteCall {
24877	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24878	return c
24879}
24880
24881// Context sets the context to be used in this call's Do method. Any
24882// pending HTTP request will be aborted if the provided context is
24883// canceled.
24884func (c *CreativeFieldValuesDeleteCall) Context(ctx context.Context) *CreativeFieldValuesDeleteCall {
24885	c.ctx_ = ctx
24886	return c
24887}
24888
24889// Header returns an http.Header that can be modified by the caller to
24890// add HTTP headers to the request.
24891func (c *CreativeFieldValuesDeleteCall) Header() http.Header {
24892	if c.header_ == nil {
24893		c.header_ = make(http.Header)
24894	}
24895	return c.header_
24896}
24897
24898func (c *CreativeFieldValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
24899	reqHeaders := make(http.Header)
24900	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24901	for k, v := range c.header_ {
24902		reqHeaders[k] = v
24903	}
24904	reqHeaders.Set("User-Agent", c.s.userAgent())
24905	var body io.Reader = nil
24906	c.urlParams_.Set("alt", alt)
24907	c.urlParams_.Set("prettyPrint", "false")
24908	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
24909	urls += "?" + c.urlParams_.Encode()
24910	req, err := http.NewRequest("DELETE", urls, body)
24911	if err != nil {
24912		return nil, err
24913	}
24914	req.Header = reqHeaders
24915	googleapi.Expand(req.URL, map[string]string{
24916		"profileId":       strconv.FormatInt(c.profileId, 10),
24917		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
24918		"id":              strconv.FormatInt(c.id, 10),
24919	})
24920	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24921}
24922
24923// Do executes the "dfareporting.creativeFieldValues.delete" call.
24924func (c *CreativeFieldValuesDeleteCall) Do(opts ...googleapi.CallOption) error {
24925	gensupport.SetOptions(c.urlParams_, opts...)
24926	res, err := c.doRequest("json")
24927	if err != nil {
24928		return err
24929	}
24930	defer googleapi.CloseBody(res)
24931	if err := googleapi.CheckResponse(res); err != nil {
24932		return err
24933	}
24934	return nil
24935	// {
24936	//   "description": "Deletes an existing creative field value.",
24937	//   "httpMethod": "DELETE",
24938	//   "id": "dfareporting.creativeFieldValues.delete",
24939	//   "parameterOrder": [
24940	//     "profileId",
24941	//     "creativeFieldId",
24942	//     "id"
24943	//   ],
24944	//   "parameters": {
24945	//     "creativeFieldId": {
24946	//       "description": "Creative field ID for this creative field value.",
24947	//       "format": "int64",
24948	//       "location": "path",
24949	//       "required": true,
24950	//       "type": "string"
24951	//     },
24952	//     "id": {
24953	//       "description": "Creative Field Value ID",
24954	//       "format": "int64",
24955	//       "location": "path",
24956	//       "required": true,
24957	//       "type": "string"
24958	//     },
24959	//     "profileId": {
24960	//       "description": "User profile ID associated with this request.",
24961	//       "format": "int64",
24962	//       "location": "path",
24963	//       "required": true,
24964	//       "type": "string"
24965	//     }
24966	//   },
24967	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
24968	//   "scopes": [
24969	//     "https://www.googleapis.com/auth/dfatrafficking"
24970	//   ]
24971	// }
24972
24973}
24974
24975// method id "dfareporting.creativeFieldValues.get":
24976
24977type CreativeFieldValuesGetCall struct {
24978	s               *Service
24979	profileId       int64
24980	creativeFieldId int64
24981	id              int64
24982	urlParams_      gensupport.URLParams
24983	ifNoneMatch_    string
24984	ctx_            context.Context
24985	header_         http.Header
24986}
24987
24988// Get: Gets one creative field value by ID.
24989func (r *CreativeFieldValuesService) Get(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesGetCall {
24990	c := &CreativeFieldValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24991	c.profileId = profileId
24992	c.creativeFieldId = creativeFieldId
24993	c.id = id
24994	return c
24995}
24996
24997// Fields allows partial responses to be retrieved. See
24998// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24999// for more information.
25000func (c *CreativeFieldValuesGetCall) Fields(s ...googleapi.Field) *CreativeFieldValuesGetCall {
25001	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25002	return c
25003}
25004
25005// IfNoneMatch sets the optional parameter which makes the operation
25006// fail if the object's ETag matches the given value. This is useful for
25007// getting updates only after the object has changed since the last
25008// request. Use googleapi.IsNotModified to check whether the response
25009// error from Do is the result of In-None-Match.
25010func (c *CreativeFieldValuesGetCall) IfNoneMatch(entityTag string) *CreativeFieldValuesGetCall {
25011	c.ifNoneMatch_ = entityTag
25012	return c
25013}
25014
25015// Context sets the context to be used in this call's Do method. Any
25016// pending HTTP request will be aborted if the provided context is
25017// canceled.
25018func (c *CreativeFieldValuesGetCall) Context(ctx context.Context) *CreativeFieldValuesGetCall {
25019	c.ctx_ = ctx
25020	return c
25021}
25022
25023// Header returns an http.Header that can be modified by the caller to
25024// add HTTP headers to the request.
25025func (c *CreativeFieldValuesGetCall) Header() http.Header {
25026	if c.header_ == nil {
25027		c.header_ = make(http.Header)
25028	}
25029	return c.header_
25030}
25031
25032func (c *CreativeFieldValuesGetCall) doRequest(alt string) (*http.Response, error) {
25033	reqHeaders := make(http.Header)
25034	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
25035	for k, v := range c.header_ {
25036		reqHeaders[k] = v
25037	}
25038	reqHeaders.Set("User-Agent", c.s.userAgent())
25039	if c.ifNoneMatch_ != "" {
25040		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25041	}
25042	var body io.Reader = nil
25043	c.urlParams_.Set("alt", alt)
25044	c.urlParams_.Set("prettyPrint", "false")
25045	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
25046	urls += "?" + c.urlParams_.Encode()
25047	req, err := http.NewRequest("GET", urls, body)
25048	if err != nil {
25049		return nil, err
25050	}
25051	req.Header = reqHeaders
25052	googleapi.Expand(req.URL, map[string]string{
25053		"profileId":       strconv.FormatInt(c.profileId, 10),
25054		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25055		"id":              strconv.FormatInt(c.id, 10),
25056	})
25057	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25058}
25059
25060// Do executes the "dfareporting.creativeFieldValues.get" call.
25061// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25062// non-2xx status code is an error. Response headers are in either
25063// *CreativeFieldValue.ServerResponse.Header or (if a response was
25064// returned at all) in error.(*googleapi.Error).Header. Use
25065// googleapi.IsNotModified to check whether the returned error was
25066// because http.StatusNotModified was returned.
25067func (c *CreativeFieldValuesGetCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25068	gensupport.SetOptions(c.urlParams_, opts...)
25069	res, err := c.doRequest("json")
25070	if res != nil && res.StatusCode == http.StatusNotModified {
25071		if res.Body != nil {
25072			res.Body.Close()
25073		}
25074		return nil, &googleapi.Error{
25075			Code:   res.StatusCode,
25076			Header: res.Header,
25077		}
25078	}
25079	if err != nil {
25080		return nil, err
25081	}
25082	defer googleapi.CloseBody(res)
25083	if err := googleapi.CheckResponse(res); err != nil {
25084		return nil, err
25085	}
25086	ret := &CreativeFieldValue{
25087		ServerResponse: googleapi.ServerResponse{
25088			Header:         res.Header,
25089			HTTPStatusCode: res.StatusCode,
25090		},
25091	}
25092	target := &ret
25093	if err := gensupport.DecodeResponse(target, res); err != nil {
25094		return nil, err
25095	}
25096	return ret, nil
25097	// {
25098	//   "description": "Gets one creative field value by ID.",
25099	//   "httpMethod": "GET",
25100	//   "id": "dfareporting.creativeFieldValues.get",
25101	//   "parameterOrder": [
25102	//     "profileId",
25103	//     "creativeFieldId",
25104	//     "id"
25105	//   ],
25106	//   "parameters": {
25107	//     "creativeFieldId": {
25108	//       "description": "Creative field ID for this creative field value.",
25109	//       "format": "int64",
25110	//       "location": "path",
25111	//       "required": true,
25112	//       "type": "string"
25113	//     },
25114	//     "id": {
25115	//       "description": "Creative Field Value ID",
25116	//       "format": "int64",
25117	//       "location": "path",
25118	//       "required": true,
25119	//       "type": "string"
25120	//     },
25121	//     "profileId": {
25122	//       "description": "User profile ID associated with this request.",
25123	//       "format": "int64",
25124	//       "location": "path",
25125	//       "required": true,
25126	//       "type": "string"
25127	//     }
25128	//   },
25129	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
25130	//   "response": {
25131	//     "$ref": "CreativeFieldValue"
25132	//   },
25133	//   "scopes": [
25134	//     "https://www.googleapis.com/auth/dfatrafficking"
25135	//   ]
25136	// }
25137
25138}
25139
25140// method id "dfareporting.creativeFieldValues.insert":
25141
25142type CreativeFieldValuesInsertCall struct {
25143	s                  *Service
25144	profileId          int64
25145	creativeFieldId    int64
25146	creativefieldvalue *CreativeFieldValue
25147	urlParams_         gensupport.URLParams
25148	ctx_               context.Context
25149	header_            http.Header
25150}
25151
25152// Insert: Inserts a new creative field value.
25153func (r *CreativeFieldValuesService) Insert(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesInsertCall {
25154	c := &CreativeFieldValuesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25155	c.profileId = profileId
25156	c.creativeFieldId = creativeFieldId
25157	c.creativefieldvalue = creativefieldvalue
25158	return c
25159}
25160
25161// Fields allows partial responses to be retrieved. See
25162// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25163// for more information.
25164func (c *CreativeFieldValuesInsertCall) Fields(s ...googleapi.Field) *CreativeFieldValuesInsertCall {
25165	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25166	return c
25167}
25168
25169// Context sets the context to be used in this call's Do method. Any
25170// pending HTTP request will be aborted if the provided context is
25171// canceled.
25172func (c *CreativeFieldValuesInsertCall) Context(ctx context.Context) *CreativeFieldValuesInsertCall {
25173	c.ctx_ = ctx
25174	return c
25175}
25176
25177// Header returns an http.Header that can be modified by the caller to
25178// add HTTP headers to the request.
25179func (c *CreativeFieldValuesInsertCall) Header() http.Header {
25180	if c.header_ == nil {
25181		c.header_ = make(http.Header)
25182	}
25183	return c.header_
25184}
25185
25186func (c *CreativeFieldValuesInsertCall) doRequest(alt string) (*http.Response, error) {
25187	reqHeaders := make(http.Header)
25188	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
25189	for k, v := range c.header_ {
25190		reqHeaders[k] = v
25191	}
25192	reqHeaders.Set("User-Agent", c.s.userAgent())
25193	var body io.Reader = nil
25194	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25195	if err != nil {
25196		return nil, err
25197	}
25198	reqHeaders.Set("Content-Type", "application/json")
25199	c.urlParams_.Set("alt", alt)
25200	c.urlParams_.Set("prettyPrint", "false")
25201	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25202	urls += "?" + c.urlParams_.Encode()
25203	req, err := http.NewRequest("POST", urls, body)
25204	if err != nil {
25205		return nil, err
25206	}
25207	req.Header = reqHeaders
25208	googleapi.Expand(req.URL, map[string]string{
25209		"profileId":       strconv.FormatInt(c.profileId, 10),
25210		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25211	})
25212	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25213}
25214
25215// Do executes the "dfareporting.creativeFieldValues.insert" call.
25216// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25217// non-2xx status code is an error. Response headers are in either
25218// *CreativeFieldValue.ServerResponse.Header or (if a response was
25219// returned at all) in error.(*googleapi.Error).Header. Use
25220// googleapi.IsNotModified to check whether the returned error was
25221// because http.StatusNotModified was returned.
25222func (c *CreativeFieldValuesInsertCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25223	gensupport.SetOptions(c.urlParams_, opts...)
25224	res, err := c.doRequest("json")
25225	if res != nil && res.StatusCode == http.StatusNotModified {
25226		if res.Body != nil {
25227			res.Body.Close()
25228		}
25229		return nil, &googleapi.Error{
25230			Code:   res.StatusCode,
25231			Header: res.Header,
25232		}
25233	}
25234	if err != nil {
25235		return nil, err
25236	}
25237	defer googleapi.CloseBody(res)
25238	if err := googleapi.CheckResponse(res); err != nil {
25239		return nil, err
25240	}
25241	ret := &CreativeFieldValue{
25242		ServerResponse: googleapi.ServerResponse{
25243			Header:         res.Header,
25244			HTTPStatusCode: res.StatusCode,
25245		},
25246	}
25247	target := &ret
25248	if err := gensupport.DecodeResponse(target, res); err != nil {
25249		return nil, err
25250	}
25251	return ret, nil
25252	// {
25253	//   "description": "Inserts a new creative field value.",
25254	//   "httpMethod": "POST",
25255	//   "id": "dfareporting.creativeFieldValues.insert",
25256	//   "parameterOrder": [
25257	//     "profileId",
25258	//     "creativeFieldId"
25259	//   ],
25260	//   "parameters": {
25261	//     "creativeFieldId": {
25262	//       "description": "Creative field ID for this creative field value.",
25263	//       "format": "int64",
25264	//       "location": "path",
25265	//       "required": true,
25266	//       "type": "string"
25267	//     },
25268	//     "profileId": {
25269	//       "description": "User profile ID associated with this request.",
25270	//       "format": "int64",
25271	//       "location": "path",
25272	//       "required": true,
25273	//       "type": "string"
25274	//     }
25275	//   },
25276	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25277	//   "request": {
25278	//     "$ref": "CreativeFieldValue"
25279	//   },
25280	//   "response": {
25281	//     "$ref": "CreativeFieldValue"
25282	//   },
25283	//   "scopes": [
25284	//     "https://www.googleapis.com/auth/dfatrafficking"
25285	//   ]
25286	// }
25287
25288}
25289
25290// method id "dfareporting.creativeFieldValues.list":
25291
25292type CreativeFieldValuesListCall struct {
25293	s               *Service
25294	profileId       int64
25295	creativeFieldId int64
25296	urlParams_      gensupport.URLParams
25297	ifNoneMatch_    string
25298	ctx_            context.Context
25299	header_         http.Header
25300}
25301
25302// List: Retrieves a list of creative field values, possibly filtered.
25303// This method supports paging.
25304func (r *CreativeFieldValuesService) List(profileId int64, creativeFieldId int64) *CreativeFieldValuesListCall {
25305	c := &CreativeFieldValuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25306	c.profileId = profileId
25307	c.creativeFieldId = creativeFieldId
25308	return c
25309}
25310
25311// Ids sets the optional parameter "ids": Select only creative field
25312// values with these IDs.
25313func (c *CreativeFieldValuesListCall) Ids(ids ...int64) *CreativeFieldValuesListCall {
25314	var ids_ []string
25315	for _, v := range ids {
25316		ids_ = append(ids_, fmt.Sprint(v))
25317	}
25318	c.urlParams_.SetMulti("ids", ids_)
25319	return c
25320}
25321
25322// MaxResults sets the optional parameter "maxResults": Maximum number
25323// of results to return.
25324func (c *CreativeFieldValuesListCall) MaxResults(maxResults int64) *CreativeFieldValuesListCall {
25325	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25326	return c
25327}
25328
25329// PageToken sets the optional parameter "pageToken": Value of the
25330// nextPageToken from the previous result page.
25331func (c *CreativeFieldValuesListCall) PageToken(pageToken string) *CreativeFieldValuesListCall {
25332	c.urlParams_.Set("pageToken", pageToken)
25333	return c
25334}
25335
25336// SearchString sets the optional parameter "searchString": Allows
25337// searching for creative field values by their values. Wildcards (e.g.
25338// *) are not allowed.
25339func (c *CreativeFieldValuesListCall) SearchString(searchString string) *CreativeFieldValuesListCall {
25340	c.urlParams_.Set("searchString", searchString)
25341	return c
25342}
25343
25344// SortField sets the optional parameter "sortField": Field by which to
25345// sort the list.
25346//
25347// Possible values:
25348//   "ID" (default)
25349//   "VALUE"
25350func (c *CreativeFieldValuesListCall) SortField(sortField string) *CreativeFieldValuesListCall {
25351	c.urlParams_.Set("sortField", sortField)
25352	return c
25353}
25354
25355// SortOrder sets the optional parameter "sortOrder": Order of sorted
25356// results.
25357//
25358// Possible values:
25359//   "ASCENDING" (default)
25360//   "DESCENDING"
25361func (c *CreativeFieldValuesListCall) SortOrder(sortOrder string) *CreativeFieldValuesListCall {
25362	c.urlParams_.Set("sortOrder", sortOrder)
25363	return c
25364}
25365
25366// Fields allows partial responses to be retrieved. See
25367// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25368// for more information.
25369func (c *CreativeFieldValuesListCall) Fields(s ...googleapi.Field) *CreativeFieldValuesListCall {
25370	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25371	return c
25372}
25373
25374// IfNoneMatch sets the optional parameter which makes the operation
25375// fail if the object's ETag matches the given value. This is useful for
25376// getting updates only after the object has changed since the last
25377// request. Use googleapi.IsNotModified to check whether the response
25378// error from Do is the result of In-None-Match.
25379func (c *CreativeFieldValuesListCall) IfNoneMatch(entityTag string) *CreativeFieldValuesListCall {
25380	c.ifNoneMatch_ = entityTag
25381	return c
25382}
25383
25384// Context sets the context to be used in this call's Do method. Any
25385// pending HTTP request will be aborted if the provided context is
25386// canceled.
25387func (c *CreativeFieldValuesListCall) Context(ctx context.Context) *CreativeFieldValuesListCall {
25388	c.ctx_ = ctx
25389	return c
25390}
25391
25392// Header returns an http.Header that can be modified by the caller to
25393// add HTTP headers to the request.
25394func (c *CreativeFieldValuesListCall) Header() http.Header {
25395	if c.header_ == nil {
25396		c.header_ = make(http.Header)
25397	}
25398	return c.header_
25399}
25400
25401func (c *CreativeFieldValuesListCall) doRequest(alt string) (*http.Response, error) {
25402	reqHeaders := make(http.Header)
25403	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
25404	for k, v := range c.header_ {
25405		reqHeaders[k] = v
25406	}
25407	reqHeaders.Set("User-Agent", c.s.userAgent())
25408	if c.ifNoneMatch_ != "" {
25409		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25410	}
25411	var body io.Reader = nil
25412	c.urlParams_.Set("alt", alt)
25413	c.urlParams_.Set("prettyPrint", "false")
25414	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25415	urls += "?" + c.urlParams_.Encode()
25416	req, err := http.NewRequest("GET", urls, body)
25417	if err != nil {
25418		return nil, err
25419	}
25420	req.Header = reqHeaders
25421	googleapi.Expand(req.URL, map[string]string{
25422		"profileId":       strconv.FormatInt(c.profileId, 10),
25423		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25424	})
25425	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25426}
25427
25428// Do executes the "dfareporting.creativeFieldValues.list" call.
25429// Exactly one of *CreativeFieldValuesListResponse or error will be
25430// non-nil. Any non-2xx status code is an error. Response headers are in
25431// either *CreativeFieldValuesListResponse.ServerResponse.Header or (if
25432// a response was returned at all) in error.(*googleapi.Error).Header.
25433// Use googleapi.IsNotModified to check whether the returned error was
25434// because http.StatusNotModified was returned.
25435func (c *CreativeFieldValuesListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValuesListResponse, error) {
25436	gensupport.SetOptions(c.urlParams_, opts...)
25437	res, err := c.doRequest("json")
25438	if res != nil && res.StatusCode == http.StatusNotModified {
25439		if res.Body != nil {
25440			res.Body.Close()
25441		}
25442		return nil, &googleapi.Error{
25443			Code:   res.StatusCode,
25444			Header: res.Header,
25445		}
25446	}
25447	if err != nil {
25448		return nil, err
25449	}
25450	defer googleapi.CloseBody(res)
25451	if err := googleapi.CheckResponse(res); err != nil {
25452		return nil, err
25453	}
25454	ret := &CreativeFieldValuesListResponse{
25455		ServerResponse: googleapi.ServerResponse{
25456			Header:         res.Header,
25457			HTTPStatusCode: res.StatusCode,
25458		},
25459	}
25460	target := &ret
25461	if err := gensupport.DecodeResponse(target, res); err != nil {
25462		return nil, err
25463	}
25464	return ret, nil
25465	// {
25466	//   "description": "Retrieves a list of creative field values, possibly filtered. This method supports paging.",
25467	//   "httpMethod": "GET",
25468	//   "id": "dfareporting.creativeFieldValues.list",
25469	//   "parameterOrder": [
25470	//     "profileId",
25471	//     "creativeFieldId"
25472	//   ],
25473	//   "parameters": {
25474	//     "creativeFieldId": {
25475	//       "description": "Creative field ID for this creative field value.",
25476	//       "format": "int64",
25477	//       "location": "path",
25478	//       "required": true,
25479	//       "type": "string"
25480	//     },
25481	//     "ids": {
25482	//       "description": "Select only creative field values with these IDs.",
25483	//       "format": "int64",
25484	//       "location": "query",
25485	//       "repeated": true,
25486	//       "type": "string"
25487	//     },
25488	//     "maxResults": {
25489	//       "default": "1000",
25490	//       "description": "Maximum number of results to return.",
25491	//       "format": "int32",
25492	//       "location": "query",
25493	//       "maximum": "1000",
25494	//       "minimum": "0",
25495	//       "type": "integer"
25496	//     },
25497	//     "pageToken": {
25498	//       "description": "Value of the nextPageToken from the previous result page.",
25499	//       "location": "query",
25500	//       "type": "string"
25501	//     },
25502	//     "profileId": {
25503	//       "description": "User profile ID associated with this request.",
25504	//       "format": "int64",
25505	//       "location": "path",
25506	//       "required": true,
25507	//       "type": "string"
25508	//     },
25509	//     "searchString": {
25510	//       "description": "Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed.",
25511	//       "location": "query",
25512	//       "type": "string"
25513	//     },
25514	//     "sortField": {
25515	//       "default": "ID",
25516	//       "description": "Field by which to sort the list.",
25517	//       "enum": [
25518	//         "ID",
25519	//         "VALUE"
25520	//       ],
25521	//       "enumDescriptions": [
25522	//         "",
25523	//         ""
25524	//       ],
25525	//       "location": "query",
25526	//       "type": "string"
25527	//     },
25528	//     "sortOrder": {
25529	//       "default": "ASCENDING",
25530	//       "description": "Order of sorted results.",
25531	//       "enum": [
25532	//         "ASCENDING",
25533	//         "DESCENDING"
25534	//       ],
25535	//       "enumDescriptions": [
25536	//         "",
25537	//         ""
25538	//       ],
25539	//       "location": "query",
25540	//       "type": "string"
25541	//     }
25542	//   },
25543	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25544	//   "response": {
25545	//     "$ref": "CreativeFieldValuesListResponse"
25546	//   },
25547	//   "scopes": [
25548	//     "https://www.googleapis.com/auth/dfatrafficking"
25549	//   ]
25550	// }
25551
25552}
25553
25554// Pages invokes f for each page of results.
25555// A non-nil error returned from f will halt the iteration.
25556// The provided context supersedes any context provided to the Context method.
25557func (c *CreativeFieldValuesListCall) Pages(ctx context.Context, f func(*CreativeFieldValuesListResponse) error) error {
25558	c.ctx_ = ctx
25559	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25560	for {
25561		x, err := c.Do()
25562		if err != nil {
25563			return err
25564		}
25565		if err := f(x); err != nil {
25566			return err
25567		}
25568		if x.NextPageToken == "" {
25569			return nil
25570		}
25571		c.PageToken(x.NextPageToken)
25572	}
25573}
25574
25575// method id "dfareporting.creativeFieldValues.patch":
25576
25577type CreativeFieldValuesPatchCall struct {
25578	s                  *Service
25579	profileId          int64
25580	creativeFieldId    int64
25581	creativefieldvalue *CreativeFieldValue
25582	urlParams_         gensupport.URLParams
25583	ctx_               context.Context
25584	header_            http.Header
25585}
25586
25587// Patch: Updates an existing creative field value. This method supports
25588// patch semantics.
25589func (r *CreativeFieldValuesService) Patch(profileId int64, creativeFieldId int64, id int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesPatchCall {
25590	c := &CreativeFieldValuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25591	c.profileId = profileId
25592	c.creativeFieldId = creativeFieldId
25593	c.urlParams_.Set("id", fmt.Sprint(id))
25594	c.creativefieldvalue = creativefieldvalue
25595	return c
25596}
25597
25598// Fields allows partial responses to be retrieved. See
25599// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25600// for more information.
25601func (c *CreativeFieldValuesPatchCall) Fields(s ...googleapi.Field) *CreativeFieldValuesPatchCall {
25602	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25603	return c
25604}
25605
25606// Context sets the context to be used in this call's Do method. Any
25607// pending HTTP request will be aborted if the provided context is
25608// canceled.
25609func (c *CreativeFieldValuesPatchCall) Context(ctx context.Context) *CreativeFieldValuesPatchCall {
25610	c.ctx_ = ctx
25611	return c
25612}
25613
25614// Header returns an http.Header that can be modified by the caller to
25615// add HTTP headers to the request.
25616func (c *CreativeFieldValuesPatchCall) Header() http.Header {
25617	if c.header_ == nil {
25618		c.header_ = make(http.Header)
25619	}
25620	return c.header_
25621}
25622
25623func (c *CreativeFieldValuesPatchCall) doRequest(alt string) (*http.Response, error) {
25624	reqHeaders := make(http.Header)
25625	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
25626	for k, v := range c.header_ {
25627		reqHeaders[k] = v
25628	}
25629	reqHeaders.Set("User-Agent", c.s.userAgent())
25630	var body io.Reader = nil
25631	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25632	if err != nil {
25633		return nil, err
25634	}
25635	reqHeaders.Set("Content-Type", "application/json")
25636	c.urlParams_.Set("alt", alt)
25637	c.urlParams_.Set("prettyPrint", "false")
25638	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25639	urls += "?" + c.urlParams_.Encode()
25640	req, err := http.NewRequest("PATCH", urls, body)
25641	if err != nil {
25642		return nil, err
25643	}
25644	req.Header = reqHeaders
25645	googleapi.Expand(req.URL, map[string]string{
25646		"profileId":       strconv.FormatInt(c.profileId, 10),
25647		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25648	})
25649	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25650}
25651
25652// Do executes the "dfareporting.creativeFieldValues.patch" call.
25653// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25654// non-2xx status code is an error. Response headers are in either
25655// *CreativeFieldValue.ServerResponse.Header or (if a response was
25656// returned at all) in error.(*googleapi.Error).Header. Use
25657// googleapi.IsNotModified to check whether the returned error was
25658// because http.StatusNotModified was returned.
25659func (c *CreativeFieldValuesPatchCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25660	gensupport.SetOptions(c.urlParams_, opts...)
25661	res, err := c.doRequest("json")
25662	if res != nil && res.StatusCode == http.StatusNotModified {
25663		if res.Body != nil {
25664			res.Body.Close()
25665		}
25666		return nil, &googleapi.Error{
25667			Code:   res.StatusCode,
25668			Header: res.Header,
25669		}
25670	}
25671	if err != nil {
25672		return nil, err
25673	}
25674	defer googleapi.CloseBody(res)
25675	if err := googleapi.CheckResponse(res); err != nil {
25676		return nil, err
25677	}
25678	ret := &CreativeFieldValue{
25679		ServerResponse: googleapi.ServerResponse{
25680			Header:         res.Header,
25681			HTTPStatusCode: res.StatusCode,
25682		},
25683	}
25684	target := &ret
25685	if err := gensupport.DecodeResponse(target, res); err != nil {
25686		return nil, err
25687	}
25688	return ret, nil
25689	// {
25690	//   "description": "Updates an existing creative field value. This method supports patch semantics.",
25691	//   "httpMethod": "PATCH",
25692	//   "id": "dfareporting.creativeFieldValues.patch",
25693	//   "parameterOrder": [
25694	//     "profileId",
25695	//     "creativeFieldId",
25696	//     "id"
25697	//   ],
25698	//   "parameters": {
25699	//     "creativeFieldId": {
25700	//       "description": "Creative field ID for this creative field value.",
25701	//       "format": "int64",
25702	//       "location": "path",
25703	//       "required": true,
25704	//       "type": "string"
25705	//     },
25706	//     "id": {
25707	//       "description": "Creative Field Value ID",
25708	//       "format": "int64",
25709	//       "location": "query",
25710	//       "required": true,
25711	//       "type": "string"
25712	//     },
25713	//     "profileId": {
25714	//       "description": "User profile ID associated with this request.",
25715	//       "format": "int64",
25716	//       "location": "path",
25717	//       "required": true,
25718	//       "type": "string"
25719	//     }
25720	//   },
25721	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25722	//   "request": {
25723	//     "$ref": "CreativeFieldValue"
25724	//   },
25725	//   "response": {
25726	//     "$ref": "CreativeFieldValue"
25727	//   },
25728	//   "scopes": [
25729	//     "https://www.googleapis.com/auth/dfatrafficking"
25730	//   ]
25731	// }
25732
25733}
25734
25735// method id "dfareporting.creativeFieldValues.update":
25736
25737type CreativeFieldValuesUpdateCall struct {
25738	s                  *Service
25739	profileId          int64
25740	creativeFieldId    int64
25741	creativefieldvalue *CreativeFieldValue
25742	urlParams_         gensupport.URLParams
25743	ctx_               context.Context
25744	header_            http.Header
25745}
25746
25747// Update: Updates an existing creative field value.
25748func (r *CreativeFieldValuesService) Update(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesUpdateCall {
25749	c := &CreativeFieldValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25750	c.profileId = profileId
25751	c.creativeFieldId = creativeFieldId
25752	c.creativefieldvalue = creativefieldvalue
25753	return c
25754}
25755
25756// Fields allows partial responses to be retrieved. See
25757// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25758// for more information.
25759func (c *CreativeFieldValuesUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldValuesUpdateCall {
25760	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25761	return c
25762}
25763
25764// Context sets the context to be used in this call's Do method. Any
25765// pending HTTP request will be aborted if the provided context is
25766// canceled.
25767func (c *CreativeFieldValuesUpdateCall) Context(ctx context.Context) *CreativeFieldValuesUpdateCall {
25768	c.ctx_ = ctx
25769	return c
25770}
25771
25772// Header returns an http.Header that can be modified by the caller to
25773// add HTTP headers to the request.
25774func (c *CreativeFieldValuesUpdateCall) Header() http.Header {
25775	if c.header_ == nil {
25776		c.header_ = make(http.Header)
25777	}
25778	return c.header_
25779}
25780
25781func (c *CreativeFieldValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
25782	reqHeaders := make(http.Header)
25783	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
25784	for k, v := range c.header_ {
25785		reqHeaders[k] = v
25786	}
25787	reqHeaders.Set("User-Agent", c.s.userAgent())
25788	var body io.Reader = nil
25789	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25790	if err != nil {
25791		return nil, err
25792	}
25793	reqHeaders.Set("Content-Type", "application/json")
25794	c.urlParams_.Set("alt", alt)
25795	c.urlParams_.Set("prettyPrint", "false")
25796	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25797	urls += "?" + c.urlParams_.Encode()
25798	req, err := http.NewRequest("PUT", urls, body)
25799	if err != nil {
25800		return nil, err
25801	}
25802	req.Header = reqHeaders
25803	googleapi.Expand(req.URL, map[string]string{
25804		"profileId":       strconv.FormatInt(c.profileId, 10),
25805		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25806	})
25807	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25808}
25809
25810// Do executes the "dfareporting.creativeFieldValues.update" call.
25811// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25812// non-2xx status code is an error. Response headers are in either
25813// *CreativeFieldValue.ServerResponse.Header or (if a response was
25814// returned at all) in error.(*googleapi.Error).Header. Use
25815// googleapi.IsNotModified to check whether the returned error was
25816// because http.StatusNotModified was returned.
25817func (c *CreativeFieldValuesUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25818	gensupport.SetOptions(c.urlParams_, opts...)
25819	res, err := c.doRequest("json")
25820	if res != nil && res.StatusCode == http.StatusNotModified {
25821		if res.Body != nil {
25822			res.Body.Close()
25823		}
25824		return nil, &googleapi.Error{
25825			Code:   res.StatusCode,
25826			Header: res.Header,
25827		}
25828	}
25829	if err != nil {
25830		return nil, err
25831	}
25832	defer googleapi.CloseBody(res)
25833	if err := googleapi.CheckResponse(res); err != nil {
25834		return nil, err
25835	}
25836	ret := &CreativeFieldValue{
25837		ServerResponse: googleapi.ServerResponse{
25838			Header:         res.Header,
25839			HTTPStatusCode: res.StatusCode,
25840		},
25841	}
25842	target := &ret
25843	if err := gensupport.DecodeResponse(target, res); err != nil {
25844		return nil, err
25845	}
25846	return ret, nil
25847	// {
25848	//   "description": "Updates an existing creative field value.",
25849	//   "httpMethod": "PUT",
25850	//   "id": "dfareporting.creativeFieldValues.update",
25851	//   "parameterOrder": [
25852	//     "profileId",
25853	//     "creativeFieldId"
25854	//   ],
25855	//   "parameters": {
25856	//     "creativeFieldId": {
25857	//       "description": "Creative field ID for this creative field value.",
25858	//       "format": "int64",
25859	//       "location": "path",
25860	//       "required": true,
25861	//       "type": "string"
25862	//     },
25863	//     "profileId": {
25864	//       "description": "User profile ID associated with this request.",
25865	//       "format": "int64",
25866	//       "location": "path",
25867	//       "required": true,
25868	//       "type": "string"
25869	//     }
25870	//   },
25871	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25872	//   "request": {
25873	//     "$ref": "CreativeFieldValue"
25874	//   },
25875	//   "response": {
25876	//     "$ref": "CreativeFieldValue"
25877	//   },
25878	//   "scopes": [
25879	//     "https://www.googleapis.com/auth/dfatrafficking"
25880	//   ]
25881	// }
25882
25883}
25884
25885// method id "dfareporting.creativeFields.delete":
25886
25887type CreativeFieldsDeleteCall struct {
25888	s          *Service
25889	profileId  int64
25890	id         int64
25891	urlParams_ gensupport.URLParams
25892	ctx_       context.Context
25893	header_    http.Header
25894}
25895
25896// Delete: Deletes an existing creative field.
25897func (r *CreativeFieldsService) Delete(profileId int64, id int64) *CreativeFieldsDeleteCall {
25898	c := &CreativeFieldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25899	c.profileId = profileId
25900	c.id = id
25901	return c
25902}
25903
25904// Fields allows partial responses to be retrieved. See
25905// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25906// for more information.
25907func (c *CreativeFieldsDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldsDeleteCall {
25908	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25909	return c
25910}
25911
25912// Context sets the context to be used in this call's Do method. Any
25913// pending HTTP request will be aborted if the provided context is
25914// canceled.
25915func (c *CreativeFieldsDeleteCall) Context(ctx context.Context) *CreativeFieldsDeleteCall {
25916	c.ctx_ = ctx
25917	return c
25918}
25919
25920// Header returns an http.Header that can be modified by the caller to
25921// add HTTP headers to the request.
25922func (c *CreativeFieldsDeleteCall) Header() http.Header {
25923	if c.header_ == nil {
25924		c.header_ = make(http.Header)
25925	}
25926	return c.header_
25927}
25928
25929func (c *CreativeFieldsDeleteCall) doRequest(alt string) (*http.Response, error) {
25930	reqHeaders := make(http.Header)
25931	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
25932	for k, v := range c.header_ {
25933		reqHeaders[k] = v
25934	}
25935	reqHeaders.Set("User-Agent", c.s.userAgent())
25936	var body io.Reader = nil
25937	c.urlParams_.Set("alt", alt)
25938	c.urlParams_.Set("prettyPrint", "false")
25939	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
25940	urls += "?" + c.urlParams_.Encode()
25941	req, err := http.NewRequest("DELETE", urls, body)
25942	if err != nil {
25943		return nil, err
25944	}
25945	req.Header = reqHeaders
25946	googleapi.Expand(req.URL, map[string]string{
25947		"profileId": strconv.FormatInt(c.profileId, 10),
25948		"id":        strconv.FormatInt(c.id, 10),
25949	})
25950	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25951}
25952
25953// Do executes the "dfareporting.creativeFields.delete" call.
25954func (c *CreativeFieldsDeleteCall) Do(opts ...googleapi.CallOption) error {
25955	gensupport.SetOptions(c.urlParams_, opts...)
25956	res, err := c.doRequest("json")
25957	if err != nil {
25958		return err
25959	}
25960	defer googleapi.CloseBody(res)
25961	if err := googleapi.CheckResponse(res); err != nil {
25962		return err
25963	}
25964	return nil
25965	// {
25966	//   "description": "Deletes an existing creative field.",
25967	//   "httpMethod": "DELETE",
25968	//   "id": "dfareporting.creativeFields.delete",
25969	//   "parameterOrder": [
25970	//     "profileId",
25971	//     "id"
25972	//   ],
25973	//   "parameters": {
25974	//     "id": {
25975	//       "description": "Creative Field ID",
25976	//       "format": "int64",
25977	//       "location": "path",
25978	//       "required": true,
25979	//       "type": "string"
25980	//     },
25981	//     "profileId": {
25982	//       "description": "User profile ID associated with this request.",
25983	//       "format": "int64",
25984	//       "location": "path",
25985	//       "required": true,
25986	//       "type": "string"
25987	//     }
25988	//   },
25989	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
25990	//   "scopes": [
25991	//     "https://www.googleapis.com/auth/dfatrafficking"
25992	//   ]
25993	// }
25994
25995}
25996
25997// method id "dfareporting.creativeFields.get":
25998
25999type CreativeFieldsGetCall struct {
26000	s            *Service
26001	profileId    int64
26002	id           int64
26003	urlParams_   gensupport.URLParams
26004	ifNoneMatch_ string
26005	ctx_         context.Context
26006	header_      http.Header
26007}
26008
26009// Get: Gets one creative field by ID.
26010func (r *CreativeFieldsService) Get(profileId int64, id int64) *CreativeFieldsGetCall {
26011	c := &CreativeFieldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26012	c.profileId = profileId
26013	c.id = id
26014	return c
26015}
26016
26017// Fields allows partial responses to be retrieved. See
26018// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26019// for more information.
26020func (c *CreativeFieldsGetCall) Fields(s ...googleapi.Field) *CreativeFieldsGetCall {
26021	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26022	return c
26023}
26024
26025// IfNoneMatch sets the optional parameter which makes the operation
26026// fail if the object's ETag matches the given value. This is useful for
26027// getting updates only after the object has changed since the last
26028// request. Use googleapi.IsNotModified to check whether the response
26029// error from Do is the result of In-None-Match.
26030func (c *CreativeFieldsGetCall) IfNoneMatch(entityTag string) *CreativeFieldsGetCall {
26031	c.ifNoneMatch_ = entityTag
26032	return c
26033}
26034
26035// Context sets the context to be used in this call's Do method. Any
26036// pending HTTP request will be aborted if the provided context is
26037// canceled.
26038func (c *CreativeFieldsGetCall) Context(ctx context.Context) *CreativeFieldsGetCall {
26039	c.ctx_ = ctx
26040	return c
26041}
26042
26043// Header returns an http.Header that can be modified by the caller to
26044// add HTTP headers to the request.
26045func (c *CreativeFieldsGetCall) Header() http.Header {
26046	if c.header_ == nil {
26047		c.header_ = make(http.Header)
26048	}
26049	return c.header_
26050}
26051
26052func (c *CreativeFieldsGetCall) doRequest(alt string) (*http.Response, error) {
26053	reqHeaders := make(http.Header)
26054	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
26055	for k, v := range c.header_ {
26056		reqHeaders[k] = v
26057	}
26058	reqHeaders.Set("User-Agent", c.s.userAgent())
26059	if c.ifNoneMatch_ != "" {
26060		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26061	}
26062	var body io.Reader = nil
26063	c.urlParams_.Set("alt", alt)
26064	c.urlParams_.Set("prettyPrint", "false")
26065	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
26066	urls += "?" + c.urlParams_.Encode()
26067	req, err := http.NewRequest("GET", urls, body)
26068	if err != nil {
26069		return nil, err
26070	}
26071	req.Header = reqHeaders
26072	googleapi.Expand(req.URL, map[string]string{
26073		"profileId": strconv.FormatInt(c.profileId, 10),
26074		"id":        strconv.FormatInt(c.id, 10),
26075	})
26076	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26077}
26078
26079// Do executes the "dfareporting.creativeFields.get" call.
26080// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26081// status code is an error. Response headers are in either
26082// *CreativeField.ServerResponse.Header or (if a response was returned
26083// at all) in error.(*googleapi.Error).Header. Use
26084// googleapi.IsNotModified to check whether the returned error was
26085// because http.StatusNotModified was returned.
26086func (c *CreativeFieldsGetCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26087	gensupport.SetOptions(c.urlParams_, opts...)
26088	res, err := c.doRequest("json")
26089	if res != nil && res.StatusCode == http.StatusNotModified {
26090		if res.Body != nil {
26091			res.Body.Close()
26092		}
26093		return nil, &googleapi.Error{
26094			Code:   res.StatusCode,
26095			Header: res.Header,
26096		}
26097	}
26098	if err != nil {
26099		return nil, err
26100	}
26101	defer googleapi.CloseBody(res)
26102	if err := googleapi.CheckResponse(res); err != nil {
26103		return nil, err
26104	}
26105	ret := &CreativeField{
26106		ServerResponse: googleapi.ServerResponse{
26107			Header:         res.Header,
26108			HTTPStatusCode: res.StatusCode,
26109		},
26110	}
26111	target := &ret
26112	if err := gensupport.DecodeResponse(target, res); err != nil {
26113		return nil, err
26114	}
26115	return ret, nil
26116	// {
26117	//   "description": "Gets one creative field by ID.",
26118	//   "httpMethod": "GET",
26119	//   "id": "dfareporting.creativeFields.get",
26120	//   "parameterOrder": [
26121	//     "profileId",
26122	//     "id"
26123	//   ],
26124	//   "parameters": {
26125	//     "id": {
26126	//       "description": "Creative Field ID",
26127	//       "format": "int64",
26128	//       "location": "path",
26129	//       "required": true,
26130	//       "type": "string"
26131	//     },
26132	//     "profileId": {
26133	//       "description": "User profile ID associated with this request.",
26134	//       "format": "int64",
26135	//       "location": "path",
26136	//       "required": true,
26137	//       "type": "string"
26138	//     }
26139	//   },
26140	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
26141	//   "response": {
26142	//     "$ref": "CreativeField"
26143	//   },
26144	//   "scopes": [
26145	//     "https://www.googleapis.com/auth/dfatrafficking"
26146	//   ]
26147	// }
26148
26149}
26150
26151// method id "dfareporting.creativeFields.insert":
26152
26153type CreativeFieldsInsertCall struct {
26154	s             *Service
26155	profileId     int64
26156	creativefield *CreativeField
26157	urlParams_    gensupport.URLParams
26158	ctx_          context.Context
26159	header_       http.Header
26160}
26161
26162// Insert: Inserts a new creative field.
26163func (r *CreativeFieldsService) Insert(profileId int64, creativefield *CreativeField) *CreativeFieldsInsertCall {
26164	c := &CreativeFieldsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26165	c.profileId = profileId
26166	c.creativefield = creativefield
26167	return c
26168}
26169
26170// Fields allows partial responses to be retrieved. See
26171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26172// for more information.
26173func (c *CreativeFieldsInsertCall) Fields(s ...googleapi.Field) *CreativeFieldsInsertCall {
26174	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26175	return c
26176}
26177
26178// Context sets the context to be used in this call's Do method. Any
26179// pending HTTP request will be aborted if the provided context is
26180// canceled.
26181func (c *CreativeFieldsInsertCall) Context(ctx context.Context) *CreativeFieldsInsertCall {
26182	c.ctx_ = ctx
26183	return c
26184}
26185
26186// Header returns an http.Header that can be modified by the caller to
26187// add HTTP headers to the request.
26188func (c *CreativeFieldsInsertCall) Header() http.Header {
26189	if c.header_ == nil {
26190		c.header_ = make(http.Header)
26191	}
26192	return c.header_
26193}
26194
26195func (c *CreativeFieldsInsertCall) doRequest(alt string) (*http.Response, error) {
26196	reqHeaders := make(http.Header)
26197	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
26198	for k, v := range c.header_ {
26199		reqHeaders[k] = v
26200	}
26201	reqHeaders.Set("User-Agent", c.s.userAgent())
26202	var body io.Reader = nil
26203	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26204	if err != nil {
26205		return nil, err
26206	}
26207	reqHeaders.Set("Content-Type", "application/json")
26208	c.urlParams_.Set("alt", alt)
26209	c.urlParams_.Set("prettyPrint", "false")
26210	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26211	urls += "?" + c.urlParams_.Encode()
26212	req, err := http.NewRequest("POST", urls, body)
26213	if err != nil {
26214		return nil, err
26215	}
26216	req.Header = reqHeaders
26217	googleapi.Expand(req.URL, map[string]string{
26218		"profileId": strconv.FormatInt(c.profileId, 10),
26219	})
26220	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26221}
26222
26223// Do executes the "dfareporting.creativeFields.insert" call.
26224// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26225// status code is an error. Response headers are in either
26226// *CreativeField.ServerResponse.Header or (if a response was returned
26227// at all) in error.(*googleapi.Error).Header. Use
26228// googleapi.IsNotModified to check whether the returned error was
26229// because http.StatusNotModified was returned.
26230func (c *CreativeFieldsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26231	gensupport.SetOptions(c.urlParams_, opts...)
26232	res, err := c.doRequest("json")
26233	if res != nil && res.StatusCode == http.StatusNotModified {
26234		if res.Body != nil {
26235			res.Body.Close()
26236		}
26237		return nil, &googleapi.Error{
26238			Code:   res.StatusCode,
26239			Header: res.Header,
26240		}
26241	}
26242	if err != nil {
26243		return nil, err
26244	}
26245	defer googleapi.CloseBody(res)
26246	if err := googleapi.CheckResponse(res); err != nil {
26247		return nil, err
26248	}
26249	ret := &CreativeField{
26250		ServerResponse: googleapi.ServerResponse{
26251			Header:         res.Header,
26252			HTTPStatusCode: res.StatusCode,
26253		},
26254	}
26255	target := &ret
26256	if err := gensupport.DecodeResponse(target, res); err != nil {
26257		return nil, err
26258	}
26259	return ret, nil
26260	// {
26261	//   "description": "Inserts a new creative field.",
26262	//   "httpMethod": "POST",
26263	//   "id": "dfareporting.creativeFields.insert",
26264	//   "parameterOrder": [
26265	//     "profileId"
26266	//   ],
26267	//   "parameters": {
26268	//     "profileId": {
26269	//       "description": "User profile ID associated with this request.",
26270	//       "format": "int64",
26271	//       "location": "path",
26272	//       "required": true,
26273	//       "type": "string"
26274	//     }
26275	//   },
26276	//   "path": "userprofiles/{profileId}/creativeFields",
26277	//   "request": {
26278	//     "$ref": "CreativeField"
26279	//   },
26280	//   "response": {
26281	//     "$ref": "CreativeField"
26282	//   },
26283	//   "scopes": [
26284	//     "https://www.googleapis.com/auth/dfatrafficking"
26285	//   ]
26286	// }
26287
26288}
26289
26290// method id "dfareporting.creativeFields.list":
26291
26292type CreativeFieldsListCall struct {
26293	s            *Service
26294	profileId    int64
26295	urlParams_   gensupport.URLParams
26296	ifNoneMatch_ string
26297	ctx_         context.Context
26298	header_      http.Header
26299}
26300
26301// List: Retrieves a list of creative fields, possibly filtered. This
26302// method supports paging.
26303func (r *CreativeFieldsService) List(profileId int64) *CreativeFieldsListCall {
26304	c := &CreativeFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26305	c.profileId = profileId
26306	return c
26307}
26308
26309// AdvertiserIds sets the optional parameter "advertiserIds": Select
26310// only creative fields that belong to these advertisers.
26311func (c *CreativeFieldsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeFieldsListCall {
26312	var advertiserIds_ []string
26313	for _, v := range advertiserIds {
26314		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
26315	}
26316	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
26317	return c
26318}
26319
26320// Ids sets the optional parameter "ids": Select only creative fields
26321// with these IDs.
26322func (c *CreativeFieldsListCall) Ids(ids ...int64) *CreativeFieldsListCall {
26323	var ids_ []string
26324	for _, v := range ids {
26325		ids_ = append(ids_, fmt.Sprint(v))
26326	}
26327	c.urlParams_.SetMulti("ids", ids_)
26328	return c
26329}
26330
26331// MaxResults sets the optional parameter "maxResults": Maximum number
26332// of results to return.
26333func (c *CreativeFieldsListCall) MaxResults(maxResults int64) *CreativeFieldsListCall {
26334	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
26335	return c
26336}
26337
26338// PageToken sets the optional parameter "pageToken": Value of the
26339// nextPageToken from the previous result page.
26340func (c *CreativeFieldsListCall) PageToken(pageToken string) *CreativeFieldsListCall {
26341	c.urlParams_.Set("pageToken", pageToken)
26342	return c
26343}
26344
26345// SearchString sets the optional parameter "searchString": Allows
26346// searching for creative fields by name or ID. Wildcards (*) are
26347// allowed. For example, "creativefield*2015" will return creative
26348// fields with names like "creativefield June 2015", "creativefield
26349// April 2015", or simply "creativefield 2015". Most of the searches
26350// also add wild-cards implicitly at the start and the end of the search
26351// string. For example, a search string of "creativefield" will match
26352// creative fields with the name "my creativefield", "creativefield
26353// 2015", or simply "creativefield".
26354func (c *CreativeFieldsListCall) SearchString(searchString string) *CreativeFieldsListCall {
26355	c.urlParams_.Set("searchString", searchString)
26356	return c
26357}
26358
26359// SortField sets the optional parameter "sortField": Field by which to
26360// sort the list.
26361//
26362// Possible values:
26363//   "ID" (default)
26364//   "NAME"
26365func (c *CreativeFieldsListCall) SortField(sortField string) *CreativeFieldsListCall {
26366	c.urlParams_.Set("sortField", sortField)
26367	return c
26368}
26369
26370// SortOrder sets the optional parameter "sortOrder": Order of sorted
26371// results.
26372//
26373// Possible values:
26374//   "ASCENDING" (default)
26375//   "DESCENDING"
26376func (c *CreativeFieldsListCall) SortOrder(sortOrder string) *CreativeFieldsListCall {
26377	c.urlParams_.Set("sortOrder", sortOrder)
26378	return c
26379}
26380
26381// Fields allows partial responses to be retrieved. See
26382// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26383// for more information.
26384func (c *CreativeFieldsListCall) Fields(s ...googleapi.Field) *CreativeFieldsListCall {
26385	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26386	return c
26387}
26388
26389// IfNoneMatch sets the optional parameter which makes the operation
26390// fail if the object's ETag matches the given value. This is useful for
26391// getting updates only after the object has changed since the last
26392// request. Use googleapi.IsNotModified to check whether the response
26393// error from Do is the result of In-None-Match.
26394func (c *CreativeFieldsListCall) IfNoneMatch(entityTag string) *CreativeFieldsListCall {
26395	c.ifNoneMatch_ = entityTag
26396	return c
26397}
26398
26399// Context sets the context to be used in this call's Do method. Any
26400// pending HTTP request will be aborted if the provided context is
26401// canceled.
26402func (c *CreativeFieldsListCall) Context(ctx context.Context) *CreativeFieldsListCall {
26403	c.ctx_ = ctx
26404	return c
26405}
26406
26407// Header returns an http.Header that can be modified by the caller to
26408// add HTTP headers to the request.
26409func (c *CreativeFieldsListCall) Header() http.Header {
26410	if c.header_ == nil {
26411		c.header_ = make(http.Header)
26412	}
26413	return c.header_
26414}
26415
26416func (c *CreativeFieldsListCall) doRequest(alt string) (*http.Response, error) {
26417	reqHeaders := make(http.Header)
26418	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
26419	for k, v := range c.header_ {
26420		reqHeaders[k] = v
26421	}
26422	reqHeaders.Set("User-Agent", c.s.userAgent())
26423	if c.ifNoneMatch_ != "" {
26424		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26425	}
26426	var body io.Reader = nil
26427	c.urlParams_.Set("alt", alt)
26428	c.urlParams_.Set("prettyPrint", "false")
26429	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26430	urls += "?" + c.urlParams_.Encode()
26431	req, err := http.NewRequest("GET", urls, body)
26432	if err != nil {
26433		return nil, err
26434	}
26435	req.Header = reqHeaders
26436	googleapi.Expand(req.URL, map[string]string{
26437		"profileId": strconv.FormatInt(c.profileId, 10),
26438	})
26439	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26440}
26441
26442// Do executes the "dfareporting.creativeFields.list" call.
26443// Exactly one of *CreativeFieldsListResponse or error will be non-nil.
26444// Any non-2xx status code is an error. Response headers are in either
26445// *CreativeFieldsListResponse.ServerResponse.Header or (if a response
26446// was returned at all) in error.(*googleapi.Error).Header. Use
26447// googleapi.IsNotModified to check whether the returned error was
26448// because http.StatusNotModified was returned.
26449func (c *CreativeFieldsListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldsListResponse, error) {
26450	gensupport.SetOptions(c.urlParams_, opts...)
26451	res, err := c.doRequest("json")
26452	if res != nil && res.StatusCode == http.StatusNotModified {
26453		if res.Body != nil {
26454			res.Body.Close()
26455		}
26456		return nil, &googleapi.Error{
26457			Code:   res.StatusCode,
26458			Header: res.Header,
26459		}
26460	}
26461	if err != nil {
26462		return nil, err
26463	}
26464	defer googleapi.CloseBody(res)
26465	if err := googleapi.CheckResponse(res); err != nil {
26466		return nil, err
26467	}
26468	ret := &CreativeFieldsListResponse{
26469		ServerResponse: googleapi.ServerResponse{
26470			Header:         res.Header,
26471			HTTPStatusCode: res.StatusCode,
26472		},
26473	}
26474	target := &ret
26475	if err := gensupport.DecodeResponse(target, res); err != nil {
26476		return nil, err
26477	}
26478	return ret, nil
26479	// {
26480	//   "description": "Retrieves a list of creative fields, possibly filtered. This method supports paging.",
26481	//   "httpMethod": "GET",
26482	//   "id": "dfareporting.creativeFields.list",
26483	//   "parameterOrder": [
26484	//     "profileId"
26485	//   ],
26486	//   "parameters": {
26487	//     "advertiserIds": {
26488	//       "description": "Select only creative fields that belong to these advertisers.",
26489	//       "format": "int64",
26490	//       "location": "query",
26491	//       "repeated": true,
26492	//       "type": "string"
26493	//     },
26494	//     "ids": {
26495	//       "description": "Select only creative fields with these IDs.",
26496	//       "format": "int64",
26497	//       "location": "query",
26498	//       "repeated": true,
26499	//       "type": "string"
26500	//     },
26501	//     "maxResults": {
26502	//       "default": "1000",
26503	//       "description": "Maximum number of results to return.",
26504	//       "format": "int32",
26505	//       "location": "query",
26506	//       "maximum": "1000",
26507	//       "minimum": "0",
26508	//       "type": "integer"
26509	//     },
26510	//     "pageToken": {
26511	//       "description": "Value of the nextPageToken from the previous result page.",
26512	//       "location": "query",
26513	//       "type": "string"
26514	//     },
26515	//     "profileId": {
26516	//       "description": "User profile ID associated with this request.",
26517	//       "format": "int64",
26518	//       "location": "path",
26519	//       "required": true,
26520	//       "type": "string"
26521	//     },
26522	//     "searchString": {
26523	//       "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\".",
26524	//       "location": "query",
26525	//       "type": "string"
26526	//     },
26527	//     "sortField": {
26528	//       "default": "ID",
26529	//       "description": "Field by which to sort the list.",
26530	//       "enum": [
26531	//         "ID",
26532	//         "NAME"
26533	//       ],
26534	//       "enumDescriptions": [
26535	//         "",
26536	//         ""
26537	//       ],
26538	//       "location": "query",
26539	//       "type": "string"
26540	//     },
26541	//     "sortOrder": {
26542	//       "default": "ASCENDING",
26543	//       "description": "Order of sorted results.",
26544	//       "enum": [
26545	//         "ASCENDING",
26546	//         "DESCENDING"
26547	//       ],
26548	//       "enumDescriptions": [
26549	//         "",
26550	//         ""
26551	//       ],
26552	//       "location": "query",
26553	//       "type": "string"
26554	//     }
26555	//   },
26556	//   "path": "userprofiles/{profileId}/creativeFields",
26557	//   "response": {
26558	//     "$ref": "CreativeFieldsListResponse"
26559	//   },
26560	//   "scopes": [
26561	//     "https://www.googleapis.com/auth/dfatrafficking"
26562	//   ]
26563	// }
26564
26565}
26566
26567// Pages invokes f for each page of results.
26568// A non-nil error returned from f will halt the iteration.
26569// The provided context supersedes any context provided to the Context method.
26570func (c *CreativeFieldsListCall) Pages(ctx context.Context, f func(*CreativeFieldsListResponse) error) error {
26571	c.ctx_ = ctx
26572	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26573	for {
26574		x, err := c.Do()
26575		if err != nil {
26576			return err
26577		}
26578		if err := f(x); err != nil {
26579			return err
26580		}
26581		if x.NextPageToken == "" {
26582			return nil
26583		}
26584		c.PageToken(x.NextPageToken)
26585	}
26586}
26587
26588// method id "dfareporting.creativeFields.patch":
26589
26590type CreativeFieldsPatchCall struct {
26591	s             *Service
26592	profileId     int64
26593	creativefield *CreativeField
26594	urlParams_    gensupport.URLParams
26595	ctx_          context.Context
26596	header_       http.Header
26597}
26598
26599// Patch: Updates an existing creative field. This method supports patch
26600// semantics.
26601func (r *CreativeFieldsService) Patch(profileId int64, id int64, creativefield *CreativeField) *CreativeFieldsPatchCall {
26602	c := &CreativeFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26603	c.profileId = profileId
26604	c.urlParams_.Set("id", fmt.Sprint(id))
26605	c.creativefield = creativefield
26606	return c
26607}
26608
26609// Fields allows partial responses to be retrieved. See
26610// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26611// for more information.
26612func (c *CreativeFieldsPatchCall) Fields(s ...googleapi.Field) *CreativeFieldsPatchCall {
26613	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26614	return c
26615}
26616
26617// Context sets the context to be used in this call's Do method. Any
26618// pending HTTP request will be aborted if the provided context is
26619// canceled.
26620func (c *CreativeFieldsPatchCall) Context(ctx context.Context) *CreativeFieldsPatchCall {
26621	c.ctx_ = ctx
26622	return c
26623}
26624
26625// Header returns an http.Header that can be modified by the caller to
26626// add HTTP headers to the request.
26627func (c *CreativeFieldsPatchCall) Header() http.Header {
26628	if c.header_ == nil {
26629		c.header_ = make(http.Header)
26630	}
26631	return c.header_
26632}
26633
26634func (c *CreativeFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
26635	reqHeaders := make(http.Header)
26636	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
26637	for k, v := range c.header_ {
26638		reqHeaders[k] = v
26639	}
26640	reqHeaders.Set("User-Agent", c.s.userAgent())
26641	var body io.Reader = nil
26642	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26643	if err != nil {
26644		return nil, err
26645	}
26646	reqHeaders.Set("Content-Type", "application/json")
26647	c.urlParams_.Set("alt", alt)
26648	c.urlParams_.Set("prettyPrint", "false")
26649	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26650	urls += "?" + c.urlParams_.Encode()
26651	req, err := http.NewRequest("PATCH", urls, body)
26652	if err != nil {
26653		return nil, err
26654	}
26655	req.Header = reqHeaders
26656	googleapi.Expand(req.URL, map[string]string{
26657		"profileId": strconv.FormatInt(c.profileId, 10),
26658	})
26659	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26660}
26661
26662// Do executes the "dfareporting.creativeFields.patch" call.
26663// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26664// status code is an error. Response headers are in either
26665// *CreativeField.ServerResponse.Header or (if a response was returned
26666// at all) in error.(*googleapi.Error).Header. Use
26667// googleapi.IsNotModified to check whether the returned error was
26668// because http.StatusNotModified was returned.
26669func (c *CreativeFieldsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26670	gensupport.SetOptions(c.urlParams_, opts...)
26671	res, err := c.doRequest("json")
26672	if res != nil && res.StatusCode == http.StatusNotModified {
26673		if res.Body != nil {
26674			res.Body.Close()
26675		}
26676		return nil, &googleapi.Error{
26677			Code:   res.StatusCode,
26678			Header: res.Header,
26679		}
26680	}
26681	if err != nil {
26682		return nil, err
26683	}
26684	defer googleapi.CloseBody(res)
26685	if err := googleapi.CheckResponse(res); err != nil {
26686		return nil, err
26687	}
26688	ret := &CreativeField{
26689		ServerResponse: googleapi.ServerResponse{
26690			Header:         res.Header,
26691			HTTPStatusCode: res.StatusCode,
26692		},
26693	}
26694	target := &ret
26695	if err := gensupport.DecodeResponse(target, res); err != nil {
26696		return nil, err
26697	}
26698	return ret, nil
26699	// {
26700	//   "description": "Updates an existing creative field. This method supports patch semantics.",
26701	//   "httpMethod": "PATCH",
26702	//   "id": "dfareporting.creativeFields.patch",
26703	//   "parameterOrder": [
26704	//     "profileId",
26705	//     "id"
26706	//   ],
26707	//   "parameters": {
26708	//     "id": {
26709	//       "description": "Creative Field ID",
26710	//       "format": "int64",
26711	//       "location": "query",
26712	//       "required": true,
26713	//       "type": "string"
26714	//     },
26715	//     "profileId": {
26716	//       "description": "User profile ID associated with this request.",
26717	//       "format": "int64",
26718	//       "location": "path",
26719	//       "required": true,
26720	//       "type": "string"
26721	//     }
26722	//   },
26723	//   "path": "userprofiles/{profileId}/creativeFields",
26724	//   "request": {
26725	//     "$ref": "CreativeField"
26726	//   },
26727	//   "response": {
26728	//     "$ref": "CreativeField"
26729	//   },
26730	//   "scopes": [
26731	//     "https://www.googleapis.com/auth/dfatrafficking"
26732	//   ]
26733	// }
26734
26735}
26736
26737// method id "dfareporting.creativeFields.update":
26738
26739type CreativeFieldsUpdateCall struct {
26740	s             *Service
26741	profileId     int64
26742	creativefield *CreativeField
26743	urlParams_    gensupport.URLParams
26744	ctx_          context.Context
26745	header_       http.Header
26746}
26747
26748// Update: Updates an existing creative field.
26749func (r *CreativeFieldsService) Update(profileId int64, creativefield *CreativeField) *CreativeFieldsUpdateCall {
26750	c := &CreativeFieldsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26751	c.profileId = profileId
26752	c.creativefield = creativefield
26753	return c
26754}
26755
26756// Fields allows partial responses to be retrieved. See
26757// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26758// for more information.
26759func (c *CreativeFieldsUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldsUpdateCall {
26760	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26761	return c
26762}
26763
26764// Context sets the context to be used in this call's Do method. Any
26765// pending HTTP request will be aborted if the provided context is
26766// canceled.
26767func (c *CreativeFieldsUpdateCall) Context(ctx context.Context) *CreativeFieldsUpdateCall {
26768	c.ctx_ = ctx
26769	return c
26770}
26771
26772// Header returns an http.Header that can be modified by the caller to
26773// add HTTP headers to the request.
26774func (c *CreativeFieldsUpdateCall) Header() http.Header {
26775	if c.header_ == nil {
26776		c.header_ = make(http.Header)
26777	}
26778	return c.header_
26779}
26780
26781func (c *CreativeFieldsUpdateCall) doRequest(alt string) (*http.Response, error) {
26782	reqHeaders := make(http.Header)
26783	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
26784	for k, v := range c.header_ {
26785		reqHeaders[k] = v
26786	}
26787	reqHeaders.Set("User-Agent", c.s.userAgent())
26788	var body io.Reader = nil
26789	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26790	if err != nil {
26791		return nil, err
26792	}
26793	reqHeaders.Set("Content-Type", "application/json")
26794	c.urlParams_.Set("alt", alt)
26795	c.urlParams_.Set("prettyPrint", "false")
26796	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26797	urls += "?" + c.urlParams_.Encode()
26798	req, err := http.NewRequest("PUT", urls, body)
26799	if err != nil {
26800		return nil, err
26801	}
26802	req.Header = reqHeaders
26803	googleapi.Expand(req.URL, map[string]string{
26804		"profileId": strconv.FormatInt(c.profileId, 10),
26805	})
26806	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26807}
26808
26809// Do executes the "dfareporting.creativeFields.update" call.
26810// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26811// status code is an error. Response headers are in either
26812// *CreativeField.ServerResponse.Header or (if a response was returned
26813// at all) in error.(*googleapi.Error).Header. Use
26814// googleapi.IsNotModified to check whether the returned error was
26815// because http.StatusNotModified was returned.
26816func (c *CreativeFieldsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26817	gensupport.SetOptions(c.urlParams_, opts...)
26818	res, err := c.doRequest("json")
26819	if res != nil && res.StatusCode == http.StatusNotModified {
26820		if res.Body != nil {
26821			res.Body.Close()
26822		}
26823		return nil, &googleapi.Error{
26824			Code:   res.StatusCode,
26825			Header: res.Header,
26826		}
26827	}
26828	if err != nil {
26829		return nil, err
26830	}
26831	defer googleapi.CloseBody(res)
26832	if err := googleapi.CheckResponse(res); err != nil {
26833		return nil, err
26834	}
26835	ret := &CreativeField{
26836		ServerResponse: googleapi.ServerResponse{
26837			Header:         res.Header,
26838			HTTPStatusCode: res.StatusCode,
26839		},
26840	}
26841	target := &ret
26842	if err := gensupport.DecodeResponse(target, res); err != nil {
26843		return nil, err
26844	}
26845	return ret, nil
26846	// {
26847	//   "description": "Updates an existing creative field.",
26848	//   "httpMethod": "PUT",
26849	//   "id": "dfareporting.creativeFields.update",
26850	//   "parameterOrder": [
26851	//     "profileId"
26852	//   ],
26853	//   "parameters": {
26854	//     "profileId": {
26855	//       "description": "User profile ID associated with this request.",
26856	//       "format": "int64",
26857	//       "location": "path",
26858	//       "required": true,
26859	//       "type": "string"
26860	//     }
26861	//   },
26862	//   "path": "userprofiles/{profileId}/creativeFields",
26863	//   "request": {
26864	//     "$ref": "CreativeField"
26865	//   },
26866	//   "response": {
26867	//     "$ref": "CreativeField"
26868	//   },
26869	//   "scopes": [
26870	//     "https://www.googleapis.com/auth/dfatrafficking"
26871	//   ]
26872	// }
26873
26874}
26875
26876// method id "dfareporting.creativeGroups.get":
26877
26878type CreativeGroupsGetCall struct {
26879	s            *Service
26880	profileId    int64
26881	id           int64
26882	urlParams_   gensupport.URLParams
26883	ifNoneMatch_ string
26884	ctx_         context.Context
26885	header_      http.Header
26886}
26887
26888// Get: Gets one creative group by ID.
26889func (r *CreativeGroupsService) Get(profileId int64, id int64) *CreativeGroupsGetCall {
26890	c := &CreativeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26891	c.profileId = profileId
26892	c.id = id
26893	return c
26894}
26895
26896// Fields allows partial responses to be retrieved. See
26897// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26898// for more information.
26899func (c *CreativeGroupsGetCall) Fields(s ...googleapi.Field) *CreativeGroupsGetCall {
26900	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26901	return c
26902}
26903
26904// IfNoneMatch sets the optional parameter which makes the operation
26905// fail if the object's ETag matches the given value. This is useful for
26906// getting updates only after the object has changed since the last
26907// request. Use googleapi.IsNotModified to check whether the response
26908// error from Do is the result of In-None-Match.
26909func (c *CreativeGroupsGetCall) IfNoneMatch(entityTag string) *CreativeGroupsGetCall {
26910	c.ifNoneMatch_ = entityTag
26911	return c
26912}
26913
26914// Context sets the context to be used in this call's Do method. Any
26915// pending HTTP request will be aborted if the provided context is
26916// canceled.
26917func (c *CreativeGroupsGetCall) Context(ctx context.Context) *CreativeGroupsGetCall {
26918	c.ctx_ = ctx
26919	return c
26920}
26921
26922// Header returns an http.Header that can be modified by the caller to
26923// add HTTP headers to the request.
26924func (c *CreativeGroupsGetCall) Header() http.Header {
26925	if c.header_ == nil {
26926		c.header_ = make(http.Header)
26927	}
26928	return c.header_
26929}
26930
26931func (c *CreativeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
26932	reqHeaders := make(http.Header)
26933	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
26934	for k, v := range c.header_ {
26935		reqHeaders[k] = v
26936	}
26937	reqHeaders.Set("User-Agent", c.s.userAgent())
26938	if c.ifNoneMatch_ != "" {
26939		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26940	}
26941	var body io.Reader = nil
26942	c.urlParams_.Set("alt", alt)
26943	c.urlParams_.Set("prettyPrint", "false")
26944	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups/{id}")
26945	urls += "?" + c.urlParams_.Encode()
26946	req, err := http.NewRequest("GET", urls, body)
26947	if err != nil {
26948		return nil, err
26949	}
26950	req.Header = reqHeaders
26951	googleapi.Expand(req.URL, map[string]string{
26952		"profileId": strconv.FormatInt(c.profileId, 10),
26953		"id":        strconv.FormatInt(c.id, 10),
26954	})
26955	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26956}
26957
26958// Do executes the "dfareporting.creativeGroups.get" call.
26959// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
26960// status code is an error. Response headers are in either
26961// *CreativeGroup.ServerResponse.Header or (if a response was returned
26962// at all) in error.(*googleapi.Error).Header. Use
26963// googleapi.IsNotModified to check whether the returned error was
26964// because http.StatusNotModified was returned.
26965func (c *CreativeGroupsGetCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
26966	gensupport.SetOptions(c.urlParams_, opts...)
26967	res, err := c.doRequest("json")
26968	if res != nil && res.StatusCode == http.StatusNotModified {
26969		if res.Body != nil {
26970			res.Body.Close()
26971		}
26972		return nil, &googleapi.Error{
26973			Code:   res.StatusCode,
26974			Header: res.Header,
26975		}
26976	}
26977	if err != nil {
26978		return nil, err
26979	}
26980	defer googleapi.CloseBody(res)
26981	if err := googleapi.CheckResponse(res); err != nil {
26982		return nil, err
26983	}
26984	ret := &CreativeGroup{
26985		ServerResponse: googleapi.ServerResponse{
26986			Header:         res.Header,
26987			HTTPStatusCode: res.StatusCode,
26988		},
26989	}
26990	target := &ret
26991	if err := gensupport.DecodeResponse(target, res); err != nil {
26992		return nil, err
26993	}
26994	return ret, nil
26995	// {
26996	//   "description": "Gets one creative group by ID.",
26997	//   "httpMethod": "GET",
26998	//   "id": "dfareporting.creativeGroups.get",
26999	//   "parameterOrder": [
27000	//     "profileId",
27001	//     "id"
27002	//   ],
27003	//   "parameters": {
27004	//     "id": {
27005	//       "description": "Creative group ID.",
27006	//       "format": "int64",
27007	//       "location": "path",
27008	//       "required": true,
27009	//       "type": "string"
27010	//     },
27011	//     "profileId": {
27012	//       "description": "User profile ID associated with this request.",
27013	//       "format": "int64",
27014	//       "location": "path",
27015	//       "required": true,
27016	//       "type": "string"
27017	//     }
27018	//   },
27019	//   "path": "userprofiles/{profileId}/creativeGroups/{id}",
27020	//   "response": {
27021	//     "$ref": "CreativeGroup"
27022	//   },
27023	//   "scopes": [
27024	//     "https://www.googleapis.com/auth/dfatrafficking"
27025	//   ]
27026	// }
27027
27028}
27029
27030// method id "dfareporting.creativeGroups.insert":
27031
27032type CreativeGroupsInsertCall struct {
27033	s             *Service
27034	profileId     int64
27035	creativegroup *CreativeGroup
27036	urlParams_    gensupport.URLParams
27037	ctx_          context.Context
27038	header_       http.Header
27039}
27040
27041// Insert: Inserts a new creative group.
27042func (r *CreativeGroupsService) Insert(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsInsertCall {
27043	c := &CreativeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27044	c.profileId = profileId
27045	c.creativegroup = creativegroup
27046	return c
27047}
27048
27049// Fields allows partial responses to be retrieved. See
27050// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27051// for more information.
27052func (c *CreativeGroupsInsertCall) Fields(s ...googleapi.Field) *CreativeGroupsInsertCall {
27053	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27054	return c
27055}
27056
27057// Context sets the context to be used in this call's Do method. Any
27058// pending HTTP request will be aborted if the provided context is
27059// canceled.
27060func (c *CreativeGroupsInsertCall) Context(ctx context.Context) *CreativeGroupsInsertCall {
27061	c.ctx_ = ctx
27062	return c
27063}
27064
27065// Header returns an http.Header that can be modified by the caller to
27066// add HTTP headers to the request.
27067func (c *CreativeGroupsInsertCall) Header() http.Header {
27068	if c.header_ == nil {
27069		c.header_ = make(http.Header)
27070	}
27071	return c.header_
27072}
27073
27074func (c *CreativeGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
27075	reqHeaders := make(http.Header)
27076	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
27077	for k, v := range c.header_ {
27078		reqHeaders[k] = v
27079	}
27080	reqHeaders.Set("User-Agent", c.s.userAgent())
27081	var body io.Reader = nil
27082	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27083	if err != nil {
27084		return nil, err
27085	}
27086	reqHeaders.Set("Content-Type", "application/json")
27087	c.urlParams_.Set("alt", alt)
27088	c.urlParams_.Set("prettyPrint", "false")
27089	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27090	urls += "?" + c.urlParams_.Encode()
27091	req, err := http.NewRequest("POST", urls, body)
27092	if err != nil {
27093		return nil, err
27094	}
27095	req.Header = reqHeaders
27096	googleapi.Expand(req.URL, map[string]string{
27097		"profileId": strconv.FormatInt(c.profileId, 10),
27098	})
27099	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27100}
27101
27102// Do executes the "dfareporting.creativeGroups.insert" call.
27103// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27104// status code is an error. Response headers are in either
27105// *CreativeGroup.ServerResponse.Header or (if a response was returned
27106// at all) in error.(*googleapi.Error).Header. Use
27107// googleapi.IsNotModified to check whether the returned error was
27108// because http.StatusNotModified was returned.
27109func (c *CreativeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27110	gensupport.SetOptions(c.urlParams_, opts...)
27111	res, err := c.doRequest("json")
27112	if res != nil && res.StatusCode == http.StatusNotModified {
27113		if res.Body != nil {
27114			res.Body.Close()
27115		}
27116		return nil, &googleapi.Error{
27117			Code:   res.StatusCode,
27118			Header: res.Header,
27119		}
27120	}
27121	if err != nil {
27122		return nil, err
27123	}
27124	defer googleapi.CloseBody(res)
27125	if err := googleapi.CheckResponse(res); err != nil {
27126		return nil, err
27127	}
27128	ret := &CreativeGroup{
27129		ServerResponse: googleapi.ServerResponse{
27130			Header:         res.Header,
27131			HTTPStatusCode: res.StatusCode,
27132		},
27133	}
27134	target := &ret
27135	if err := gensupport.DecodeResponse(target, res); err != nil {
27136		return nil, err
27137	}
27138	return ret, nil
27139	// {
27140	//   "description": "Inserts a new creative group.",
27141	//   "httpMethod": "POST",
27142	//   "id": "dfareporting.creativeGroups.insert",
27143	//   "parameterOrder": [
27144	//     "profileId"
27145	//   ],
27146	//   "parameters": {
27147	//     "profileId": {
27148	//       "description": "User profile ID associated with this request.",
27149	//       "format": "int64",
27150	//       "location": "path",
27151	//       "required": true,
27152	//       "type": "string"
27153	//     }
27154	//   },
27155	//   "path": "userprofiles/{profileId}/creativeGroups",
27156	//   "request": {
27157	//     "$ref": "CreativeGroup"
27158	//   },
27159	//   "response": {
27160	//     "$ref": "CreativeGroup"
27161	//   },
27162	//   "scopes": [
27163	//     "https://www.googleapis.com/auth/dfatrafficking"
27164	//   ]
27165	// }
27166
27167}
27168
27169// method id "dfareporting.creativeGroups.list":
27170
27171type CreativeGroupsListCall struct {
27172	s            *Service
27173	profileId    int64
27174	urlParams_   gensupport.URLParams
27175	ifNoneMatch_ string
27176	ctx_         context.Context
27177	header_      http.Header
27178}
27179
27180// List: Retrieves a list of creative groups, possibly filtered. This
27181// method supports paging.
27182func (r *CreativeGroupsService) List(profileId int64) *CreativeGroupsListCall {
27183	c := &CreativeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27184	c.profileId = profileId
27185	return c
27186}
27187
27188// AdvertiserIds sets the optional parameter "advertiserIds": Select
27189// only creative groups that belong to these advertisers.
27190func (c *CreativeGroupsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeGroupsListCall {
27191	var advertiserIds_ []string
27192	for _, v := range advertiserIds {
27193		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
27194	}
27195	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
27196	return c
27197}
27198
27199// GroupNumber sets the optional parameter "groupNumber": Select only
27200// creative groups that belong to this subgroup.
27201func (c *CreativeGroupsListCall) GroupNumber(groupNumber int64) *CreativeGroupsListCall {
27202	c.urlParams_.Set("groupNumber", fmt.Sprint(groupNumber))
27203	return c
27204}
27205
27206// Ids sets the optional parameter "ids": Select only creative groups
27207// with these IDs.
27208func (c *CreativeGroupsListCall) Ids(ids ...int64) *CreativeGroupsListCall {
27209	var ids_ []string
27210	for _, v := range ids {
27211		ids_ = append(ids_, fmt.Sprint(v))
27212	}
27213	c.urlParams_.SetMulti("ids", ids_)
27214	return c
27215}
27216
27217// MaxResults sets the optional parameter "maxResults": Maximum number
27218// of results to return.
27219func (c *CreativeGroupsListCall) MaxResults(maxResults int64) *CreativeGroupsListCall {
27220	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27221	return c
27222}
27223
27224// PageToken sets the optional parameter "pageToken": Value of the
27225// nextPageToken from the previous result page.
27226func (c *CreativeGroupsListCall) PageToken(pageToken string) *CreativeGroupsListCall {
27227	c.urlParams_.Set("pageToken", pageToken)
27228	return c
27229}
27230
27231// SearchString sets the optional parameter "searchString": Allows
27232// searching for creative groups by name or ID. Wildcards (*) are
27233// allowed. For example, "creativegroup*2015" will return creative
27234// groups with names like "creativegroup June 2015", "creativegroup
27235// April 2015", or simply "creativegroup 2015". Most of the searches
27236// also add wild-cards implicitly at the start and the end of the search
27237// string. For example, a search string of "creativegroup" will match
27238// creative groups with the name "my creativegroup", "creativegroup
27239// 2015", or simply "creativegroup".
27240func (c *CreativeGroupsListCall) SearchString(searchString string) *CreativeGroupsListCall {
27241	c.urlParams_.Set("searchString", searchString)
27242	return c
27243}
27244
27245// SortField sets the optional parameter "sortField": Field by which to
27246// sort the list.
27247//
27248// Possible values:
27249//   "ID" (default)
27250//   "NAME"
27251func (c *CreativeGroupsListCall) SortField(sortField string) *CreativeGroupsListCall {
27252	c.urlParams_.Set("sortField", sortField)
27253	return c
27254}
27255
27256// SortOrder sets the optional parameter "sortOrder": Order of sorted
27257// results.
27258//
27259// Possible values:
27260//   "ASCENDING" (default)
27261//   "DESCENDING"
27262func (c *CreativeGroupsListCall) SortOrder(sortOrder string) *CreativeGroupsListCall {
27263	c.urlParams_.Set("sortOrder", sortOrder)
27264	return c
27265}
27266
27267// Fields allows partial responses to be retrieved. See
27268// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27269// for more information.
27270func (c *CreativeGroupsListCall) Fields(s ...googleapi.Field) *CreativeGroupsListCall {
27271	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27272	return c
27273}
27274
27275// IfNoneMatch sets the optional parameter which makes the operation
27276// fail if the object's ETag matches the given value. This is useful for
27277// getting updates only after the object has changed since the last
27278// request. Use googleapi.IsNotModified to check whether the response
27279// error from Do is the result of In-None-Match.
27280func (c *CreativeGroupsListCall) IfNoneMatch(entityTag string) *CreativeGroupsListCall {
27281	c.ifNoneMatch_ = entityTag
27282	return c
27283}
27284
27285// Context sets the context to be used in this call's Do method. Any
27286// pending HTTP request will be aborted if the provided context is
27287// canceled.
27288func (c *CreativeGroupsListCall) Context(ctx context.Context) *CreativeGroupsListCall {
27289	c.ctx_ = ctx
27290	return c
27291}
27292
27293// Header returns an http.Header that can be modified by the caller to
27294// add HTTP headers to the request.
27295func (c *CreativeGroupsListCall) Header() http.Header {
27296	if c.header_ == nil {
27297		c.header_ = make(http.Header)
27298	}
27299	return c.header_
27300}
27301
27302func (c *CreativeGroupsListCall) doRequest(alt string) (*http.Response, error) {
27303	reqHeaders := make(http.Header)
27304	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
27305	for k, v := range c.header_ {
27306		reqHeaders[k] = v
27307	}
27308	reqHeaders.Set("User-Agent", c.s.userAgent())
27309	if c.ifNoneMatch_ != "" {
27310		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27311	}
27312	var body io.Reader = nil
27313	c.urlParams_.Set("alt", alt)
27314	c.urlParams_.Set("prettyPrint", "false")
27315	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27316	urls += "?" + c.urlParams_.Encode()
27317	req, err := http.NewRequest("GET", urls, body)
27318	if err != nil {
27319		return nil, err
27320	}
27321	req.Header = reqHeaders
27322	googleapi.Expand(req.URL, map[string]string{
27323		"profileId": strconv.FormatInt(c.profileId, 10),
27324	})
27325	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27326}
27327
27328// Do executes the "dfareporting.creativeGroups.list" call.
27329// Exactly one of *CreativeGroupsListResponse or error will be non-nil.
27330// Any non-2xx status code is an error. Response headers are in either
27331// *CreativeGroupsListResponse.ServerResponse.Header or (if a response
27332// was returned at all) in error.(*googleapi.Error).Header. Use
27333// googleapi.IsNotModified to check whether the returned error was
27334// because http.StatusNotModified was returned.
27335func (c *CreativeGroupsListCall) Do(opts ...googleapi.CallOption) (*CreativeGroupsListResponse, error) {
27336	gensupport.SetOptions(c.urlParams_, opts...)
27337	res, err := c.doRequest("json")
27338	if res != nil && res.StatusCode == http.StatusNotModified {
27339		if res.Body != nil {
27340			res.Body.Close()
27341		}
27342		return nil, &googleapi.Error{
27343			Code:   res.StatusCode,
27344			Header: res.Header,
27345		}
27346	}
27347	if err != nil {
27348		return nil, err
27349	}
27350	defer googleapi.CloseBody(res)
27351	if err := googleapi.CheckResponse(res); err != nil {
27352		return nil, err
27353	}
27354	ret := &CreativeGroupsListResponse{
27355		ServerResponse: googleapi.ServerResponse{
27356			Header:         res.Header,
27357			HTTPStatusCode: res.StatusCode,
27358		},
27359	}
27360	target := &ret
27361	if err := gensupport.DecodeResponse(target, res); err != nil {
27362		return nil, err
27363	}
27364	return ret, nil
27365	// {
27366	//   "description": "Retrieves a list of creative groups, possibly filtered. This method supports paging.",
27367	//   "httpMethod": "GET",
27368	//   "id": "dfareporting.creativeGroups.list",
27369	//   "parameterOrder": [
27370	//     "profileId"
27371	//   ],
27372	//   "parameters": {
27373	//     "advertiserIds": {
27374	//       "description": "Select only creative groups that belong to these advertisers.",
27375	//       "format": "int64",
27376	//       "location": "query",
27377	//       "repeated": true,
27378	//       "type": "string"
27379	//     },
27380	//     "groupNumber": {
27381	//       "description": "Select only creative groups that belong to this subgroup.",
27382	//       "format": "int32",
27383	//       "location": "query",
27384	//       "maximum": "2",
27385	//       "minimum": "1",
27386	//       "type": "integer"
27387	//     },
27388	//     "ids": {
27389	//       "description": "Select only creative groups with these IDs.",
27390	//       "format": "int64",
27391	//       "location": "query",
27392	//       "repeated": true,
27393	//       "type": "string"
27394	//     },
27395	//     "maxResults": {
27396	//       "default": "1000",
27397	//       "description": "Maximum number of results to return.",
27398	//       "format": "int32",
27399	//       "location": "query",
27400	//       "maximum": "1000",
27401	//       "minimum": "0",
27402	//       "type": "integer"
27403	//     },
27404	//     "pageToken": {
27405	//       "description": "Value of the nextPageToken from the previous result page.",
27406	//       "location": "query",
27407	//       "type": "string"
27408	//     },
27409	//     "profileId": {
27410	//       "description": "User profile ID associated with this request.",
27411	//       "format": "int64",
27412	//       "location": "path",
27413	//       "required": true,
27414	//       "type": "string"
27415	//     },
27416	//     "searchString": {
27417	//       "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\".",
27418	//       "location": "query",
27419	//       "type": "string"
27420	//     },
27421	//     "sortField": {
27422	//       "default": "ID",
27423	//       "description": "Field by which to sort the list.",
27424	//       "enum": [
27425	//         "ID",
27426	//         "NAME"
27427	//       ],
27428	//       "enumDescriptions": [
27429	//         "",
27430	//         ""
27431	//       ],
27432	//       "location": "query",
27433	//       "type": "string"
27434	//     },
27435	//     "sortOrder": {
27436	//       "default": "ASCENDING",
27437	//       "description": "Order of sorted results.",
27438	//       "enum": [
27439	//         "ASCENDING",
27440	//         "DESCENDING"
27441	//       ],
27442	//       "enumDescriptions": [
27443	//         "",
27444	//         ""
27445	//       ],
27446	//       "location": "query",
27447	//       "type": "string"
27448	//     }
27449	//   },
27450	//   "path": "userprofiles/{profileId}/creativeGroups",
27451	//   "response": {
27452	//     "$ref": "CreativeGroupsListResponse"
27453	//   },
27454	//   "scopes": [
27455	//     "https://www.googleapis.com/auth/dfatrafficking"
27456	//   ]
27457	// }
27458
27459}
27460
27461// Pages invokes f for each page of results.
27462// A non-nil error returned from f will halt the iteration.
27463// The provided context supersedes any context provided to the Context method.
27464func (c *CreativeGroupsListCall) Pages(ctx context.Context, f func(*CreativeGroupsListResponse) error) error {
27465	c.ctx_ = ctx
27466	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27467	for {
27468		x, err := c.Do()
27469		if err != nil {
27470			return err
27471		}
27472		if err := f(x); err != nil {
27473			return err
27474		}
27475		if x.NextPageToken == "" {
27476			return nil
27477		}
27478		c.PageToken(x.NextPageToken)
27479	}
27480}
27481
27482// method id "dfareporting.creativeGroups.patch":
27483
27484type CreativeGroupsPatchCall struct {
27485	s             *Service
27486	profileId     int64
27487	creativegroup *CreativeGroup
27488	urlParams_    gensupport.URLParams
27489	ctx_          context.Context
27490	header_       http.Header
27491}
27492
27493// Patch: Updates an existing creative group. This method supports patch
27494// semantics.
27495func (r *CreativeGroupsService) Patch(profileId int64, id int64, creativegroup *CreativeGroup) *CreativeGroupsPatchCall {
27496	c := &CreativeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27497	c.profileId = profileId
27498	c.urlParams_.Set("id", fmt.Sprint(id))
27499	c.creativegroup = creativegroup
27500	return c
27501}
27502
27503// Fields allows partial responses to be retrieved. See
27504// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27505// for more information.
27506func (c *CreativeGroupsPatchCall) Fields(s ...googleapi.Field) *CreativeGroupsPatchCall {
27507	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27508	return c
27509}
27510
27511// Context sets the context to be used in this call's Do method. Any
27512// pending HTTP request will be aborted if the provided context is
27513// canceled.
27514func (c *CreativeGroupsPatchCall) Context(ctx context.Context) *CreativeGroupsPatchCall {
27515	c.ctx_ = ctx
27516	return c
27517}
27518
27519// Header returns an http.Header that can be modified by the caller to
27520// add HTTP headers to the request.
27521func (c *CreativeGroupsPatchCall) Header() http.Header {
27522	if c.header_ == nil {
27523		c.header_ = make(http.Header)
27524	}
27525	return c.header_
27526}
27527
27528func (c *CreativeGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
27529	reqHeaders := make(http.Header)
27530	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
27531	for k, v := range c.header_ {
27532		reqHeaders[k] = v
27533	}
27534	reqHeaders.Set("User-Agent", c.s.userAgent())
27535	var body io.Reader = nil
27536	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27537	if err != nil {
27538		return nil, err
27539	}
27540	reqHeaders.Set("Content-Type", "application/json")
27541	c.urlParams_.Set("alt", alt)
27542	c.urlParams_.Set("prettyPrint", "false")
27543	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27544	urls += "?" + c.urlParams_.Encode()
27545	req, err := http.NewRequest("PATCH", urls, body)
27546	if err != nil {
27547		return nil, err
27548	}
27549	req.Header = reqHeaders
27550	googleapi.Expand(req.URL, map[string]string{
27551		"profileId": strconv.FormatInt(c.profileId, 10),
27552	})
27553	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27554}
27555
27556// Do executes the "dfareporting.creativeGroups.patch" call.
27557// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27558// status code is an error. Response headers are in either
27559// *CreativeGroup.ServerResponse.Header or (if a response was returned
27560// at all) in error.(*googleapi.Error).Header. Use
27561// googleapi.IsNotModified to check whether the returned error was
27562// because http.StatusNotModified was returned.
27563func (c *CreativeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27564	gensupport.SetOptions(c.urlParams_, opts...)
27565	res, err := c.doRequest("json")
27566	if res != nil && res.StatusCode == http.StatusNotModified {
27567		if res.Body != nil {
27568			res.Body.Close()
27569		}
27570		return nil, &googleapi.Error{
27571			Code:   res.StatusCode,
27572			Header: res.Header,
27573		}
27574	}
27575	if err != nil {
27576		return nil, err
27577	}
27578	defer googleapi.CloseBody(res)
27579	if err := googleapi.CheckResponse(res); err != nil {
27580		return nil, err
27581	}
27582	ret := &CreativeGroup{
27583		ServerResponse: googleapi.ServerResponse{
27584			Header:         res.Header,
27585			HTTPStatusCode: res.StatusCode,
27586		},
27587	}
27588	target := &ret
27589	if err := gensupport.DecodeResponse(target, res); err != nil {
27590		return nil, err
27591	}
27592	return ret, nil
27593	// {
27594	//   "description": "Updates an existing creative group. This method supports patch semantics.",
27595	//   "httpMethod": "PATCH",
27596	//   "id": "dfareporting.creativeGroups.patch",
27597	//   "parameterOrder": [
27598	//     "profileId",
27599	//     "id"
27600	//   ],
27601	//   "parameters": {
27602	//     "id": {
27603	//       "description": "Creative group ID.",
27604	//       "format": "int64",
27605	//       "location": "query",
27606	//       "required": true,
27607	//       "type": "string"
27608	//     },
27609	//     "profileId": {
27610	//       "description": "User profile ID associated with this request.",
27611	//       "format": "int64",
27612	//       "location": "path",
27613	//       "required": true,
27614	//       "type": "string"
27615	//     }
27616	//   },
27617	//   "path": "userprofiles/{profileId}/creativeGroups",
27618	//   "request": {
27619	//     "$ref": "CreativeGroup"
27620	//   },
27621	//   "response": {
27622	//     "$ref": "CreativeGroup"
27623	//   },
27624	//   "scopes": [
27625	//     "https://www.googleapis.com/auth/dfatrafficking"
27626	//   ]
27627	// }
27628
27629}
27630
27631// method id "dfareporting.creativeGroups.update":
27632
27633type CreativeGroupsUpdateCall struct {
27634	s             *Service
27635	profileId     int64
27636	creativegroup *CreativeGroup
27637	urlParams_    gensupport.URLParams
27638	ctx_          context.Context
27639	header_       http.Header
27640}
27641
27642// Update: Updates an existing creative group.
27643func (r *CreativeGroupsService) Update(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsUpdateCall {
27644	c := &CreativeGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27645	c.profileId = profileId
27646	c.creativegroup = creativegroup
27647	return c
27648}
27649
27650// Fields allows partial responses to be retrieved. See
27651// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27652// for more information.
27653func (c *CreativeGroupsUpdateCall) Fields(s ...googleapi.Field) *CreativeGroupsUpdateCall {
27654	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27655	return c
27656}
27657
27658// Context sets the context to be used in this call's Do method. Any
27659// pending HTTP request will be aborted if the provided context is
27660// canceled.
27661func (c *CreativeGroupsUpdateCall) Context(ctx context.Context) *CreativeGroupsUpdateCall {
27662	c.ctx_ = ctx
27663	return c
27664}
27665
27666// Header returns an http.Header that can be modified by the caller to
27667// add HTTP headers to the request.
27668func (c *CreativeGroupsUpdateCall) Header() http.Header {
27669	if c.header_ == nil {
27670		c.header_ = make(http.Header)
27671	}
27672	return c.header_
27673}
27674
27675func (c *CreativeGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
27676	reqHeaders := make(http.Header)
27677	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
27678	for k, v := range c.header_ {
27679		reqHeaders[k] = v
27680	}
27681	reqHeaders.Set("User-Agent", c.s.userAgent())
27682	var body io.Reader = nil
27683	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27684	if err != nil {
27685		return nil, err
27686	}
27687	reqHeaders.Set("Content-Type", "application/json")
27688	c.urlParams_.Set("alt", alt)
27689	c.urlParams_.Set("prettyPrint", "false")
27690	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27691	urls += "?" + c.urlParams_.Encode()
27692	req, err := http.NewRequest("PUT", urls, body)
27693	if err != nil {
27694		return nil, err
27695	}
27696	req.Header = reqHeaders
27697	googleapi.Expand(req.URL, map[string]string{
27698		"profileId": strconv.FormatInt(c.profileId, 10),
27699	})
27700	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27701}
27702
27703// Do executes the "dfareporting.creativeGroups.update" call.
27704// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27705// status code is an error. Response headers are in either
27706// *CreativeGroup.ServerResponse.Header or (if a response was returned
27707// at all) in error.(*googleapi.Error).Header. Use
27708// googleapi.IsNotModified to check whether the returned error was
27709// because http.StatusNotModified was returned.
27710func (c *CreativeGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27711	gensupport.SetOptions(c.urlParams_, opts...)
27712	res, err := c.doRequest("json")
27713	if res != nil && res.StatusCode == http.StatusNotModified {
27714		if res.Body != nil {
27715			res.Body.Close()
27716		}
27717		return nil, &googleapi.Error{
27718			Code:   res.StatusCode,
27719			Header: res.Header,
27720		}
27721	}
27722	if err != nil {
27723		return nil, err
27724	}
27725	defer googleapi.CloseBody(res)
27726	if err := googleapi.CheckResponse(res); err != nil {
27727		return nil, err
27728	}
27729	ret := &CreativeGroup{
27730		ServerResponse: googleapi.ServerResponse{
27731			Header:         res.Header,
27732			HTTPStatusCode: res.StatusCode,
27733		},
27734	}
27735	target := &ret
27736	if err := gensupport.DecodeResponse(target, res); err != nil {
27737		return nil, err
27738	}
27739	return ret, nil
27740	// {
27741	//   "description": "Updates an existing creative group.",
27742	//   "httpMethod": "PUT",
27743	//   "id": "dfareporting.creativeGroups.update",
27744	//   "parameterOrder": [
27745	//     "profileId"
27746	//   ],
27747	//   "parameters": {
27748	//     "profileId": {
27749	//       "description": "User profile ID associated with this request.",
27750	//       "format": "int64",
27751	//       "location": "path",
27752	//       "required": true,
27753	//       "type": "string"
27754	//     }
27755	//   },
27756	//   "path": "userprofiles/{profileId}/creativeGroups",
27757	//   "request": {
27758	//     "$ref": "CreativeGroup"
27759	//   },
27760	//   "response": {
27761	//     "$ref": "CreativeGroup"
27762	//   },
27763	//   "scopes": [
27764	//     "https://www.googleapis.com/auth/dfatrafficking"
27765	//   ]
27766	// }
27767
27768}
27769
27770// method id "dfareporting.creatives.get":
27771
27772type CreativesGetCall struct {
27773	s            *Service
27774	profileId    int64
27775	id           int64
27776	urlParams_   gensupport.URLParams
27777	ifNoneMatch_ string
27778	ctx_         context.Context
27779	header_      http.Header
27780}
27781
27782// Get: Gets one creative by ID.
27783func (r *CreativesService) Get(profileId int64, id int64) *CreativesGetCall {
27784	c := &CreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27785	c.profileId = profileId
27786	c.id = id
27787	return c
27788}
27789
27790// Fields allows partial responses to be retrieved. See
27791// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27792// for more information.
27793func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall {
27794	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27795	return c
27796}
27797
27798// IfNoneMatch sets the optional parameter which makes the operation
27799// fail if the object's ETag matches the given value. This is useful for
27800// getting updates only after the object has changed since the last
27801// request. Use googleapi.IsNotModified to check whether the response
27802// error from Do is the result of In-None-Match.
27803func (c *CreativesGetCall) IfNoneMatch(entityTag string) *CreativesGetCall {
27804	c.ifNoneMatch_ = entityTag
27805	return c
27806}
27807
27808// Context sets the context to be used in this call's Do method. Any
27809// pending HTTP request will be aborted if the provided context is
27810// canceled.
27811func (c *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
27812	c.ctx_ = ctx
27813	return c
27814}
27815
27816// Header returns an http.Header that can be modified by the caller to
27817// add HTTP headers to the request.
27818func (c *CreativesGetCall) Header() http.Header {
27819	if c.header_ == nil {
27820		c.header_ = make(http.Header)
27821	}
27822	return c.header_
27823}
27824
27825func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
27826	reqHeaders := make(http.Header)
27827	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
27828	for k, v := range c.header_ {
27829		reqHeaders[k] = v
27830	}
27831	reqHeaders.Set("User-Agent", c.s.userAgent())
27832	if c.ifNoneMatch_ != "" {
27833		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27834	}
27835	var body io.Reader = nil
27836	c.urlParams_.Set("alt", alt)
27837	c.urlParams_.Set("prettyPrint", "false")
27838	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives/{id}")
27839	urls += "?" + c.urlParams_.Encode()
27840	req, err := http.NewRequest("GET", urls, body)
27841	if err != nil {
27842		return nil, err
27843	}
27844	req.Header = reqHeaders
27845	googleapi.Expand(req.URL, map[string]string{
27846		"profileId": strconv.FormatInt(c.profileId, 10),
27847		"id":        strconv.FormatInt(c.id, 10),
27848	})
27849	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27850}
27851
27852// Do executes the "dfareporting.creatives.get" call.
27853// Exactly one of *Creative or error will be non-nil. Any non-2xx status
27854// code is an error. Response headers are in either
27855// *Creative.ServerResponse.Header or (if a response was returned at
27856// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27857// to check whether the returned error was because
27858// http.StatusNotModified was returned.
27859func (c *CreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
27860	gensupport.SetOptions(c.urlParams_, opts...)
27861	res, err := c.doRequest("json")
27862	if res != nil && res.StatusCode == http.StatusNotModified {
27863		if res.Body != nil {
27864			res.Body.Close()
27865		}
27866		return nil, &googleapi.Error{
27867			Code:   res.StatusCode,
27868			Header: res.Header,
27869		}
27870	}
27871	if err != nil {
27872		return nil, err
27873	}
27874	defer googleapi.CloseBody(res)
27875	if err := googleapi.CheckResponse(res); err != nil {
27876		return nil, err
27877	}
27878	ret := &Creative{
27879		ServerResponse: googleapi.ServerResponse{
27880			Header:         res.Header,
27881			HTTPStatusCode: res.StatusCode,
27882		},
27883	}
27884	target := &ret
27885	if err := gensupport.DecodeResponse(target, res); err != nil {
27886		return nil, err
27887	}
27888	return ret, nil
27889	// {
27890	//   "description": "Gets one creative by ID.",
27891	//   "httpMethod": "GET",
27892	//   "id": "dfareporting.creatives.get",
27893	//   "parameterOrder": [
27894	//     "profileId",
27895	//     "id"
27896	//   ],
27897	//   "parameters": {
27898	//     "id": {
27899	//       "description": "Creative ID.",
27900	//       "format": "int64",
27901	//       "location": "path",
27902	//       "required": true,
27903	//       "type": "string"
27904	//     },
27905	//     "profileId": {
27906	//       "description": "User profile ID associated with this request.",
27907	//       "format": "int64",
27908	//       "location": "path",
27909	//       "required": true,
27910	//       "type": "string"
27911	//     }
27912	//   },
27913	//   "path": "userprofiles/{profileId}/creatives/{id}",
27914	//   "response": {
27915	//     "$ref": "Creative"
27916	//   },
27917	//   "scopes": [
27918	//     "https://www.googleapis.com/auth/dfatrafficking"
27919	//   ]
27920	// }
27921
27922}
27923
27924// method id "dfareporting.creatives.insert":
27925
27926type CreativesInsertCall struct {
27927	s          *Service
27928	profileId  int64
27929	creative   *Creative
27930	urlParams_ gensupport.URLParams
27931	ctx_       context.Context
27932	header_    http.Header
27933}
27934
27935// Insert: Inserts a new creative.
27936func (r *CreativesService) Insert(profileId int64, creative *Creative) *CreativesInsertCall {
27937	c := &CreativesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27938	c.profileId = profileId
27939	c.creative = creative
27940	return c
27941}
27942
27943// Fields allows partial responses to be retrieved. See
27944// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27945// for more information.
27946func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall {
27947	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27948	return c
27949}
27950
27951// Context sets the context to be used in this call's Do method. Any
27952// pending HTTP request will be aborted if the provided context is
27953// canceled.
27954func (c *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
27955	c.ctx_ = ctx
27956	return c
27957}
27958
27959// Header returns an http.Header that can be modified by the caller to
27960// add HTTP headers to the request.
27961func (c *CreativesInsertCall) Header() http.Header {
27962	if c.header_ == nil {
27963		c.header_ = make(http.Header)
27964	}
27965	return c.header_
27966}
27967
27968func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
27969	reqHeaders := make(http.Header)
27970	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
27971	for k, v := range c.header_ {
27972		reqHeaders[k] = v
27973	}
27974	reqHeaders.Set("User-Agent", c.s.userAgent())
27975	var body io.Reader = nil
27976	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
27977	if err != nil {
27978		return nil, err
27979	}
27980	reqHeaders.Set("Content-Type", "application/json")
27981	c.urlParams_.Set("alt", alt)
27982	c.urlParams_.Set("prettyPrint", "false")
27983	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
27984	urls += "?" + c.urlParams_.Encode()
27985	req, err := http.NewRequest("POST", urls, body)
27986	if err != nil {
27987		return nil, err
27988	}
27989	req.Header = reqHeaders
27990	googleapi.Expand(req.URL, map[string]string{
27991		"profileId": strconv.FormatInt(c.profileId, 10),
27992	})
27993	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27994}
27995
27996// Do executes the "dfareporting.creatives.insert" call.
27997// Exactly one of *Creative or error will be non-nil. Any non-2xx status
27998// code is an error. Response headers are in either
27999// *Creative.ServerResponse.Header or (if a response was returned at
28000// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28001// to check whether the returned error was because
28002// http.StatusNotModified was returned.
28003func (c *CreativesInsertCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28004	gensupport.SetOptions(c.urlParams_, opts...)
28005	res, err := c.doRequest("json")
28006	if res != nil && res.StatusCode == http.StatusNotModified {
28007		if res.Body != nil {
28008			res.Body.Close()
28009		}
28010		return nil, &googleapi.Error{
28011			Code:   res.StatusCode,
28012			Header: res.Header,
28013		}
28014	}
28015	if err != nil {
28016		return nil, err
28017	}
28018	defer googleapi.CloseBody(res)
28019	if err := googleapi.CheckResponse(res); err != nil {
28020		return nil, err
28021	}
28022	ret := &Creative{
28023		ServerResponse: googleapi.ServerResponse{
28024			Header:         res.Header,
28025			HTTPStatusCode: res.StatusCode,
28026		},
28027	}
28028	target := &ret
28029	if err := gensupport.DecodeResponse(target, res); err != nil {
28030		return nil, err
28031	}
28032	return ret, nil
28033	// {
28034	//   "description": "Inserts a new creative.",
28035	//   "httpMethod": "POST",
28036	//   "id": "dfareporting.creatives.insert",
28037	//   "parameterOrder": [
28038	//     "profileId"
28039	//   ],
28040	//   "parameters": {
28041	//     "profileId": {
28042	//       "description": "User profile ID associated with this request.",
28043	//       "format": "int64",
28044	//       "location": "path",
28045	//       "required": true,
28046	//       "type": "string"
28047	//     }
28048	//   },
28049	//   "path": "userprofiles/{profileId}/creatives",
28050	//   "request": {
28051	//     "$ref": "Creative"
28052	//   },
28053	//   "response": {
28054	//     "$ref": "Creative"
28055	//   },
28056	//   "scopes": [
28057	//     "https://www.googleapis.com/auth/dfatrafficking"
28058	//   ]
28059	// }
28060
28061}
28062
28063// method id "dfareporting.creatives.list":
28064
28065type CreativesListCall struct {
28066	s            *Service
28067	profileId    int64
28068	urlParams_   gensupport.URLParams
28069	ifNoneMatch_ string
28070	ctx_         context.Context
28071	header_      http.Header
28072}
28073
28074// List: Retrieves a list of creatives, possibly filtered. This method
28075// supports paging.
28076func (r *CreativesService) List(profileId int64) *CreativesListCall {
28077	c := &CreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28078	c.profileId = profileId
28079	return c
28080}
28081
28082// Active sets the optional parameter "active": Select only active
28083// creatives. Leave blank to select active and inactive creatives.
28084func (c *CreativesListCall) Active(active bool) *CreativesListCall {
28085	c.urlParams_.Set("active", fmt.Sprint(active))
28086	return c
28087}
28088
28089// AdvertiserId sets the optional parameter "advertiserId": Select only
28090// creatives with this advertiser ID.
28091func (c *CreativesListCall) AdvertiserId(advertiserId int64) *CreativesListCall {
28092	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28093	return c
28094}
28095
28096// Archived sets the optional parameter "archived": Select only archived
28097// creatives. Leave blank to select archived and unarchived creatives.
28098func (c *CreativesListCall) Archived(archived bool) *CreativesListCall {
28099	c.urlParams_.Set("archived", fmt.Sprint(archived))
28100	return c
28101}
28102
28103// CampaignId sets the optional parameter "campaignId": Select only
28104// creatives with this campaign ID.
28105func (c *CreativesListCall) CampaignId(campaignId int64) *CreativesListCall {
28106	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
28107	return c
28108}
28109
28110// CompanionCreativeIds sets the optional parameter
28111// "companionCreativeIds": Select only in-stream video creatives with
28112// these companion IDs.
28113func (c *CreativesListCall) CompanionCreativeIds(companionCreativeIds ...int64) *CreativesListCall {
28114	var companionCreativeIds_ []string
28115	for _, v := range companionCreativeIds {
28116		companionCreativeIds_ = append(companionCreativeIds_, fmt.Sprint(v))
28117	}
28118	c.urlParams_.SetMulti("companionCreativeIds", companionCreativeIds_)
28119	return c
28120}
28121
28122// CreativeFieldIds sets the optional parameter "creativeFieldIds":
28123// Select only creatives with these creative field IDs.
28124func (c *CreativesListCall) CreativeFieldIds(creativeFieldIds ...int64) *CreativesListCall {
28125	var creativeFieldIds_ []string
28126	for _, v := range creativeFieldIds {
28127		creativeFieldIds_ = append(creativeFieldIds_, fmt.Sprint(v))
28128	}
28129	c.urlParams_.SetMulti("creativeFieldIds", creativeFieldIds_)
28130	return c
28131}
28132
28133// Ids sets the optional parameter "ids": Select only creatives with
28134// these IDs.
28135func (c *CreativesListCall) Ids(ids ...int64) *CreativesListCall {
28136	var ids_ []string
28137	for _, v := range ids {
28138		ids_ = append(ids_, fmt.Sprint(v))
28139	}
28140	c.urlParams_.SetMulti("ids", ids_)
28141	return c
28142}
28143
28144// MaxResults sets the optional parameter "maxResults": Maximum number
28145// of results to return.
28146func (c *CreativesListCall) MaxResults(maxResults int64) *CreativesListCall {
28147	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28148	return c
28149}
28150
28151// PageToken sets the optional parameter "pageToken": Value of the
28152// nextPageToken from the previous result page.
28153func (c *CreativesListCall) PageToken(pageToken string) *CreativesListCall {
28154	c.urlParams_.Set("pageToken", pageToken)
28155	return c
28156}
28157
28158// RenderingIds sets the optional parameter "renderingIds": Select only
28159// creatives with these rendering IDs.
28160func (c *CreativesListCall) RenderingIds(renderingIds ...int64) *CreativesListCall {
28161	var renderingIds_ []string
28162	for _, v := range renderingIds {
28163		renderingIds_ = append(renderingIds_, fmt.Sprint(v))
28164	}
28165	c.urlParams_.SetMulti("renderingIds", renderingIds_)
28166	return c
28167}
28168
28169// SearchString sets the optional parameter "searchString": Allows
28170// searching for objects by name or ID. Wildcards (*) are allowed. For
28171// example, "creative*2015" will return objects with names like
28172// "creative June 2015", "creative April 2015", or simply "creative
28173// 2015". Most of the searches also add wildcards implicitly at the
28174// start and the end of the search string. For example, a search string
28175// of "creative" will match objects with name "my creative", "creative
28176// 2015", or simply "creative".
28177func (c *CreativesListCall) SearchString(searchString string) *CreativesListCall {
28178	c.urlParams_.Set("searchString", searchString)
28179	return c
28180}
28181
28182// SizeIds sets the optional parameter "sizeIds": Select only creatives
28183// with these size IDs.
28184func (c *CreativesListCall) SizeIds(sizeIds ...int64) *CreativesListCall {
28185	var sizeIds_ []string
28186	for _, v := range sizeIds {
28187		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
28188	}
28189	c.urlParams_.SetMulti("sizeIds", sizeIds_)
28190	return c
28191}
28192
28193// SortField sets the optional parameter "sortField": Field by which to
28194// sort the list.
28195//
28196// Possible values:
28197//   "ID" (default)
28198//   "NAME"
28199func (c *CreativesListCall) SortField(sortField string) *CreativesListCall {
28200	c.urlParams_.Set("sortField", sortField)
28201	return c
28202}
28203
28204// SortOrder sets the optional parameter "sortOrder": Order of sorted
28205// results.
28206//
28207// Possible values:
28208//   "ASCENDING" (default)
28209//   "DESCENDING"
28210func (c *CreativesListCall) SortOrder(sortOrder string) *CreativesListCall {
28211	c.urlParams_.Set("sortOrder", sortOrder)
28212	return c
28213}
28214
28215// StudioCreativeId sets the optional parameter "studioCreativeId":
28216// Select only creatives corresponding to this Studio creative ID.
28217func (c *CreativesListCall) StudioCreativeId(studioCreativeId int64) *CreativesListCall {
28218	c.urlParams_.Set("studioCreativeId", fmt.Sprint(studioCreativeId))
28219	return c
28220}
28221
28222// Types sets the optional parameter "types": Select only creatives with
28223// these creative types.
28224//
28225// Possible values:
28226//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
28227//   "CUSTOM_DISPLAY"
28228//   "CUSTOM_DISPLAY_INTERSTITIAL"
28229//   "DISPLAY"
28230//   "DISPLAY_IMAGE_GALLERY"
28231//   "DISPLAY_REDIRECT"
28232//   "FLASH_INPAGE"
28233//   "HTML5_BANNER"
28234//   "IMAGE"
28235//   "INSTREAM_AUDIO"
28236//   "INSTREAM_VIDEO"
28237//   "INSTREAM_VIDEO_REDIRECT"
28238//   "INTERNAL_REDIRECT"
28239//   "INTERSTITIAL_INTERNAL_REDIRECT"
28240//   "RICH_MEDIA_DISPLAY_BANNER"
28241//   "RICH_MEDIA_DISPLAY_EXPANDING"
28242//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
28243//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
28244//   "RICH_MEDIA_IM_EXPAND"
28245//   "RICH_MEDIA_INPAGE_FLOATING"
28246//   "RICH_MEDIA_MOBILE_IN_APP"
28247//   "RICH_MEDIA_PEEL_DOWN"
28248//   "TRACKING_TEXT"
28249//   "VPAID_LINEAR_VIDEO"
28250//   "VPAID_NON_LINEAR_VIDEO"
28251func (c *CreativesListCall) Types(types ...string) *CreativesListCall {
28252	c.urlParams_.SetMulti("types", append([]string{}, types...))
28253	return c
28254}
28255
28256// Fields allows partial responses to be retrieved. See
28257// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28258// for more information.
28259func (c *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall {
28260	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28261	return c
28262}
28263
28264// IfNoneMatch sets the optional parameter which makes the operation
28265// fail if the object's ETag matches the given value. This is useful for
28266// getting updates only after the object has changed since the last
28267// request. Use googleapi.IsNotModified to check whether the response
28268// error from Do is the result of In-None-Match.
28269func (c *CreativesListCall) IfNoneMatch(entityTag string) *CreativesListCall {
28270	c.ifNoneMatch_ = entityTag
28271	return c
28272}
28273
28274// Context sets the context to be used in this call's Do method. Any
28275// pending HTTP request will be aborted if the provided context is
28276// canceled.
28277func (c *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
28278	c.ctx_ = ctx
28279	return c
28280}
28281
28282// Header returns an http.Header that can be modified by the caller to
28283// add HTTP headers to the request.
28284func (c *CreativesListCall) Header() http.Header {
28285	if c.header_ == nil {
28286		c.header_ = make(http.Header)
28287	}
28288	return c.header_
28289}
28290
28291func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
28292	reqHeaders := make(http.Header)
28293	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
28294	for k, v := range c.header_ {
28295		reqHeaders[k] = v
28296	}
28297	reqHeaders.Set("User-Agent", c.s.userAgent())
28298	if c.ifNoneMatch_ != "" {
28299		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28300	}
28301	var body io.Reader = nil
28302	c.urlParams_.Set("alt", alt)
28303	c.urlParams_.Set("prettyPrint", "false")
28304	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28305	urls += "?" + c.urlParams_.Encode()
28306	req, err := http.NewRequest("GET", urls, body)
28307	if err != nil {
28308		return nil, err
28309	}
28310	req.Header = reqHeaders
28311	googleapi.Expand(req.URL, map[string]string{
28312		"profileId": strconv.FormatInt(c.profileId, 10),
28313	})
28314	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28315}
28316
28317// Do executes the "dfareporting.creatives.list" call.
28318// Exactly one of *CreativesListResponse or error will be non-nil. Any
28319// non-2xx status code is an error. Response headers are in either
28320// *CreativesListResponse.ServerResponse.Header or (if a response was
28321// returned at all) in error.(*googleapi.Error).Header. Use
28322// googleapi.IsNotModified to check whether the returned error was
28323// because http.StatusNotModified was returned.
28324func (c *CreativesListCall) Do(opts ...googleapi.CallOption) (*CreativesListResponse, error) {
28325	gensupport.SetOptions(c.urlParams_, opts...)
28326	res, err := c.doRequest("json")
28327	if res != nil && res.StatusCode == http.StatusNotModified {
28328		if res.Body != nil {
28329			res.Body.Close()
28330		}
28331		return nil, &googleapi.Error{
28332			Code:   res.StatusCode,
28333			Header: res.Header,
28334		}
28335	}
28336	if err != nil {
28337		return nil, err
28338	}
28339	defer googleapi.CloseBody(res)
28340	if err := googleapi.CheckResponse(res); err != nil {
28341		return nil, err
28342	}
28343	ret := &CreativesListResponse{
28344		ServerResponse: googleapi.ServerResponse{
28345			Header:         res.Header,
28346			HTTPStatusCode: res.StatusCode,
28347		},
28348	}
28349	target := &ret
28350	if err := gensupport.DecodeResponse(target, res); err != nil {
28351		return nil, err
28352	}
28353	return ret, nil
28354	// {
28355	//   "description": "Retrieves a list of creatives, possibly filtered. This method supports paging.",
28356	//   "httpMethod": "GET",
28357	//   "id": "dfareporting.creatives.list",
28358	//   "parameterOrder": [
28359	//     "profileId"
28360	//   ],
28361	//   "parameters": {
28362	//     "active": {
28363	//       "description": "Select only active creatives. Leave blank to select active and inactive creatives.",
28364	//       "location": "query",
28365	//       "type": "boolean"
28366	//     },
28367	//     "advertiserId": {
28368	//       "description": "Select only creatives with this advertiser ID.",
28369	//       "format": "int64",
28370	//       "location": "query",
28371	//       "type": "string"
28372	//     },
28373	//     "archived": {
28374	//       "description": "Select only archived creatives. Leave blank to select archived and unarchived creatives.",
28375	//       "location": "query",
28376	//       "type": "boolean"
28377	//     },
28378	//     "campaignId": {
28379	//       "description": "Select only creatives with this campaign ID.",
28380	//       "format": "int64",
28381	//       "location": "query",
28382	//       "type": "string"
28383	//     },
28384	//     "companionCreativeIds": {
28385	//       "description": "Select only in-stream video creatives with these companion IDs.",
28386	//       "format": "int64",
28387	//       "location": "query",
28388	//       "repeated": true,
28389	//       "type": "string"
28390	//     },
28391	//     "creativeFieldIds": {
28392	//       "description": "Select only creatives with these creative field IDs.",
28393	//       "format": "int64",
28394	//       "location": "query",
28395	//       "repeated": true,
28396	//       "type": "string"
28397	//     },
28398	//     "ids": {
28399	//       "description": "Select only creatives with these IDs.",
28400	//       "format": "int64",
28401	//       "location": "query",
28402	//       "repeated": true,
28403	//       "type": "string"
28404	//     },
28405	//     "maxResults": {
28406	//       "default": "1000",
28407	//       "description": "Maximum number of results to return.",
28408	//       "format": "int32",
28409	//       "location": "query",
28410	//       "maximum": "1000",
28411	//       "minimum": "0",
28412	//       "type": "integer"
28413	//     },
28414	//     "pageToken": {
28415	//       "description": "Value of the nextPageToken from the previous result page.",
28416	//       "location": "query",
28417	//       "type": "string"
28418	//     },
28419	//     "profileId": {
28420	//       "description": "User profile ID associated with this request.",
28421	//       "format": "int64",
28422	//       "location": "path",
28423	//       "required": true,
28424	//       "type": "string"
28425	//     },
28426	//     "renderingIds": {
28427	//       "description": "Select only creatives with these rendering IDs.",
28428	//       "format": "int64",
28429	//       "location": "query",
28430	//       "repeated": true,
28431	//       "type": "string"
28432	//     },
28433	//     "searchString": {
28434	//       "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\".",
28435	//       "location": "query",
28436	//       "type": "string"
28437	//     },
28438	//     "sizeIds": {
28439	//       "description": "Select only creatives with these size IDs.",
28440	//       "format": "int64",
28441	//       "location": "query",
28442	//       "repeated": true,
28443	//       "type": "string"
28444	//     },
28445	//     "sortField": {
28446	//       "default": "ID",
28447	//       "description": "Field by which to sort the list.",
28448	//       "enum": [
28449	//         "ID",
28450	//         "NAME"
28451	//       ],
28452	//       "enumDescriptions": [
28453	//         "",
28454	//         ""
28455	//       ],
28456	//       "location": "query",
28457	//       "type": "string"
28458	//     },
28459	//     "sortOrder": {
28460	//       "default": "ASCENDING",
28461	//       "description": "Order of sorted results.",
28462	//       "enum": [
28463	//         "ASCENDING",
28464	//         "DESCENDING"
28465	//       ],
28466	//       "enumDescriptions": [
28467	//         "",
28468	//         ""
28469	//       ],
28470	//       "location": "query",
28471	//       "type": "string"
28472	//     },
28473	//     "studioCreativeId": {
28474	//       "description": "Select only creatives corresponding to this Studio creative ID.",
28475	//       "format": "int64",
28476	//       "location": "query",
28477	//       "type": "string"
28478	//     },
28479	//     "types": {
28480	//       "description": "Select only creatives with these creative types.",
28481	//       "enum": [
28482	//         "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO",
28483	//         "CUSTOM_DISPLAY",
28484	//         "CUSTOM_DISPLAY_INTERSTITIAL",
28485	//         "DISPLAY",
28486	//         "DISPLAY_IMAGE_GALLERY",
28487	//         "DISPLAY_REDIRECT",
28488	//         "FLASH_INPAGE",
28489	//         "HTML5_BANNER",
28490	//         "IMAGE",
28491	//         "INSTREAM_AUDIO",
28492	//         "INSTREAM_VIDEO",
28493	//         "INSTREAM_VIDEO_REDIRECT",
28494	//         "INTERNAL_REDIRECT",
28495	//         "INTERSTITIAL_INTERNAL_REDIRECT",
28496	//         "RICH_MEDIA_DISPLAY_BANNER",
28497	//         "RICH_MEDIA_DISPLAY_EXPANDING",
28498	//         "RICH_MEDIA_DISPLAY_INTERSTITIAL",
28499	//         "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL",
28500	//         "RICH_MEDIA_IM_EXPAND",
28501	//         "RICH_MEDIA_INPAGE_FLOATING",
28502	//         "RICH_MEDIA_MOBILE_IN_APP",
28503	//         "RICH_MEDIA_PEEL_DOWN",
28504	//         "TRACKING_TEXT",
28505	//         "VPAID_LINEAR_VIDEO",
28506	//         "VPAID_NON_LINEAR_VIDEO"
28507	//       ],
28508	//       "enumDescriptions": [
28509	//         "",
28510	//         "",
28511	//         "",
28512	//         "",
28513	//         "",
28514	//         "",
28515	//         "",
28516	//         "",
28517	//         "",
28518	//         "",
28519	//         "",
28520	//         "",
28521	//         "",
28522	//         "",
28523	//         "",
28524	//         "",
28525	//         "",
28526	//         "",
28527	//         "",
28528	//         "",
28529	//         "",
28530	//         "",
28531	//         "",
28532	//         "",
28533	//         ""
28534	//       ],
28535	//       "location": "query",
28536	//       "repeated": true,
28537	//       "type": "string"
28538	//     }
28539	//   },
28540	//   "path": "userprofiles/{profileId}/creatives",
28541	//   "response": {
28542	//     "$ref": "CreativesListResponse"
28543	//   },
28544	//   "scopes": [
28545	//     "https://www.googleapis.com/auth/dfatrafficking"
28546	//   ]
28547	// }
28548
28549}
28550
28551// Pages invokes f for each page of results.
28552// A non-nil error returned from f will halt the iteration.
28553// The provided context supersedes any context provided to the Context method.
28554func (c *CreativesListCall) Pages(ctx context.Context, f func(*CreativesListResponse) error) error {
28555	c.ctx_ = ctx
28556	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28557	for {
28558		x, err := c.Do()
28559		if err != nil {
28560			return err
28561		}
28562		if err := f(x); err != nil {
28563			return err
28564		}
28565		if x.NextPageToken == "" {
28566			return nil
28567		}
28568		c.PageToken(x.NextPageToken)
28569	}
28570}
28571
28572// method id "dfareporting.creatives.patch":
28573
28574type CreativesPatchCall struct {
28575	s          *Service
28576	profileId  int64
28577	creative   *Creative
28578	urlParams_ gensupport.URLParams
28579	ctx_       context.Context
28580	header_    http.Header
28581}
28582
28583// Patch: Updates an existing creative. This method supports patch
28584// semantics.
28585func (r *CreativesService) Patch(profileId int64, id int64, creative *Creative) *CreativesPatchCall {
28586	c := &CreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28587	c.profileId = profileId
28588	c.urlParams_.Set("id", fmt.Sprint(id))
28589	c.creative = creative
28590	return c
28591}
28592
28593// Fields allows partial responses to be retrieved. See
28594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28595// for more information.
28596func (c *CreativesPatchCall) Fields(s ...googleapi.Field) *CreativesPatchCall {
28597	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28598	return c
28599}
28600
28601// Context sets the context to be used in this call's Do method. Any
28602// pending HTTP request will be aborted if the provided context is
28603// canceled.
28604func (c *CreativesPatchCall) Context(ctx context.Context) *CreativesPatchCall {
28605	c.ctx_ = ctx
28606	return c
28607}
28608
28609// Header returns an http.Header that can be modified by the caller to
28610// add HTTP headers to the request.
28611func (c *CreativesPatchCall) Header() http.Header {
28612	if c.header_ == nil {
28613		c.header_ = make(http.Header)
28614	}
28615	return c.header_
28616}
28617
28618func (c *CreativesPatchCall) doRequest(alt string) (*http.Response, error) {
28619	reqHeaders := make(http.Header)
28620	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
28621	for k, v := range c.header_ {
28622		reqHeaders[k] = v
28623	}
28624	reqHeaders.Set("User-Agent", c.s.userAgent())
28625	var body io.Reader = nil
28626	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
28627	if err != nil {
28628		return nil, err
28629	}
28630	reqHeaders.Set("Content-Type", "application/json")
28631	c.urlParams_.Set("alt", alt)
28632	c.urlParams_.Set("prettyPrint", "false")
28633	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28634	urls += "?" + c.urlParams_.Encode()
28635	req, err := http.NewRequest("PATCH", urls, body)
28636	if err != nil {
28637		return nil, err
28638	}
28639	req.Header = reqHeaders
28640	googleapi.Expand(req.URL, map[string]string{
28641		"profileId": strconv.FormatInt(c.profileId, 10),
28642	})
28643	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28644}
28645
28646// Do executes the "dfareporting.creatives.patch" call.
28647// Exactly one of *Creative or error will be non-nil. Any non-2xx status
28648// code is an error. Response headers are in either
28649// *Creative.ServerResponse.Header or (if a response was returned at
28650// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28651// to check whether the returned error was because
28652// http.StatusNotModified was returned.
28653func (c *CreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28654	gensupport.SetOptions(c.urlParams_, opts...)
28655	res, err := c.doRequest("json")
28656	if res != nil && res.StatusCode == http.StatusNotModified {
28657		if res.Body != nil {
28658			res.Body.Close()
28659		}
28660		return nil, &googleapi.Error{
28661			Code:   res.StatusCode,
28662			Header: res.Header,
28663		}
28664	}
28665	if err != nil {
28666		return nil, err
28667	}
28668	defer googleapi.CloseBody(res)
28669	if err := googleapi.CheckResponse(res); err != nil {
28670		return nil, err
28671	}
28672	ret := &Creative{
28673		ServerResponse: googleapi.ServerResponse{
28674			Header:         res.Header,
28675			HTTPStatusCode: res.StatusCode,
28676		},
28677	}
28678	target := &ret
28679	if err := gensupport.DecodeResponse(target, res); err != nil {
28680		return nil, err
28681	}
28682	return ret, nil
28683	// {
28684	//   "description": "Updates an existing creative. This method supports patch semantics.",
28685	//   "httpMethod": "PATCH",
28686	//   "id": "dfareporting.creatives.patch",
28687	//   "parameterOrder": [
28688	//     "profileId",
28689	//     "id"
28690	//   ],
28691	//   "parameters": {
28692	//     "id": {
28693	//       "description": "Creative ID.",
28694	//       "format": "int64",
28695	//       "location": "query",
28696	//       "required": true,
28697	//       "type": "string"
28698	//     },
28699	//     "profileId": {
28700	//       "description": "User profile ID associated with this request.",
28701	//       "format": "int64",
28702	//       "location": "path",
28703	//       "required": true,
28704	//       "type": "string"
28705	//     }
28706	//   },
28707	//   "path": "userprofiles/{profileId}/creatives",
28708	//   "request": {
28709	//     "$ref": "Creative"
28710	//   },
28711	//   "response": {
28712	//     "$ref": "Creative"
28713	//   },
28714	//   "scopes": [
28715	//     "https://www.googleapis.com/auth/dfatrafficking"
28716	//   ]
28717	// }
28718
28719}
28720
28721// method id "dfareporting.creatives.update":
28722
28723type CreativesUpdateCall struct {
28724	s          *Service
28725	profileId  int64
28726	creative   *Creative
28727	urlParams_ gensupport.URLParams
28728	ctx_       context.Context
28729	header_    http.Header
28730}
28731
28732// Update: Updates an existing creative.
28733func (r *CreativesService) Update(profileId int64, creative *Creative) *CreativesUpdateCall {
28734	c := &CreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28735	c.profileId = profileId
28736	c.creative = creative
28737	return c
28738}
28739
28740// Fields allows partial responses to be retrieved. See
28741// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28742// for more information.
28743func (c *CreativesUpdateCall) Fields(s ...googleapi.Field) *CreativesUpdateCall {
28744	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28745	return c
28746}
28747
28748// Context sets the context to be used in this call's Do method. Any
28749// pending HTTP request will be aborted if the provided context is
28750// canceled.
28751func (c *CreativesUpdateCall) Context(ctx context.Context) *CreativesUpdateCall {
28752	c.ctx_ = ctx
28753	return c
28754}
28755
28756// Header returns an http.Header that can be modified by the caller to
28757// add HTTP headers to the request.
28758func (c *CreativesUpdateCall) Header() http.Header {
28759	if c.header_ == nil {
28760		c.header_ = make(http.Header)
28761	}
28762	return c.header_
28763}
28764
28765func (c *CreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
28766	reqHeaders := make(http.Header)
28767	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
28768	for k, v := range c.header_ {
28769		reqHeaders[k] = v
28770	}
28771	reqHeaders.Set("User-Agent", c.s.userAgent())
28772	var body io.Reader = nil
28773	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
28774	if err != nil {
28775		return nil, err
28776	}
28777	reqHeaders.Set("Content-Type", "application/json")
28778	c.urlParams_.Set("alt", alt)
28779	c.urlParams_.Set("prettyPrint", "false")
28780	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28781	urls += "?" + c.urlParams_.Encode()
28782	req, err := http.NewRequest("PUT", urls, body)
28783	if err != nil {
28784		return nil, err
28785	}
28786	req.Header = reqHeaders
28787	googleapi.Expand(req.URL, map[string]string{
28788		"profileId": strconv.FormatInt(c.profileId, 10),
28789	})
28790	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28791}
28792
28793// Do executes the "dfareporting.creatives.update" call.
28794// Exactly one of *Creative or error will be non-nil. Any non-2xx status
28795// code is an error. Response headers are in either
28796// *Creative.ServerResponse.Header or (if a response was returned at
28797// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28798// to check whether the returned error was because
28799// http.StatusNotModified was returned.
28800func (c *CreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28801	gensupport.SetOptions(c.urlParams_, opts...)
28802	res, err := c.doRequest("json")
28803	if res != nil && res.StatusCode == http.StatusNotModified {
28804		if res.Body != nil {
28805			res.Body.Close()
28806		}
28807		return nil, &googleapi.Error{
28808			Code:   res.StatusCode,
28809			Header: res.Header,
28810		}
28811	}
28812	if err != nil {
28813		return nil, err
28814	}
28815	defer googleapi.CloseBody(res)
28816	if err := googleapi.CheckResponse(res); err != nil {
28817		return nil, err
28818	}
28819	ret := &Creative{
28820		ServerResponse: googleapi.ServerResponse{
28821			Header:         res.Header,
28822			HTTPStatusCode: res.StatusCode,
28823		},
28824	}
28825	target := &ret
28826	if err := gensupport.DecodeResponse(target, res); err != nil {
28827		return nil, err
28828	}
28829	return ret, nil
28830	// {
28831	//   "description": "Updates an existing creative.",
28832	//   "httpMethod": "PUT",
28833	//   "id": "dfareporting.creatives.update",
28834	//   "parameterOrder": [
28835	//     "profileId"
28836	//   ],
28837	//   "parameters": {
28838	//     "profileId": {
28839	//       "description": "User profile ID associated with this request.",
28840	//       "format": "int64",
28841	//       "location": "path",
28842	//       "required": true,
28843	//       "type": "string"
28844	//     }
28845	//   },
28846	//   "path": "userprofiles/{profileId}/creatives",
28847	//   "request": {
28848	//     "$ref": "Creative"
28849	//   },
28850	//   "response": {
28851	//     "$ref": "Creative"
28852	//   },
28853	//   "scopes": [
28854	//     "https://www.googleapis.com/auth/dfatrafficking"
28855	//   ]
28856	// }
28857
28858}
28859
28860// method id "dfareporting.dimensionValues.query":
28861
28862type DimensionValuesQueryCall struct {
28863	s                     *Service
28864	profileId             int64
28865	dimensionvaluerequest *DimensionValueRequest
28866	urlParams_            gensupport.URLParams
28867	ctx_                  context.Context
28868	header_               http.Header
28869}
28870
28871// Query: Retrieves list of report dimension values for a list of
28872// filters.
28873func (r *DimensionValuesService) Query(profileId int64, dimensionvaluerequest *DimensionValueRequest) *DimensionValuesQueryCall {
28874	c := &DimensionValuesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28875	c.profileId = profileId
28876	c.dimensionvaluerequest = dimensionvaluerequest
28877	return c
28878}
28879
28880// MaxResults sets the optional parameter "maxResults": Maximum number
28881// of results to return.
28882func (c *DimensionValuesQueryCall) MaxResults(maxResults int64) *DimensionValuesQueryCall {
28883	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28884	return c
28885}
28886
28887// PageToken sets the optional parameter "pageToken": The value of the
28888// nextToken from the previous result page.
28889func (c *DimensionValuesQueryCall) PageToken(pageToken string) *DimensionValuesQueryCall {
28890	c.urlParams_.Set("pageToken", pageToken)
28891	return c
28892}
28893
28894// Fields allows partial responses to be retrieved. See
28895// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28896// for more information.
28897func (c *DimensionValuesQueryCall) Fields(s ...googleapi.Field) *DimensionValuesQueryCall {
28898	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28899	return c
28900}
28901
28902// Context sets the context to be used in this call's Do method. Any
28903// pending HTTP request will be aborted if the provided context is
28904// canceled.
28905func (c *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
28906	c.ctx_ = ctx
28907	return c
28908}
28909
28910// Header returns an http.Header that can be modified by the caller to
28911// add HTTP headers to the request.
28912func (c *DimensionValuesQueryCall) Header() http.Header {
28913	if c.header_ == nil {
28914		c.header_ = make(http.Header)
28915	}
28916	return c.header_
28917}
28918
28919func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
28920	reqHeaders := make(http.Header)
28921	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
28922	for k, v := range c.header_ {
28923		reqHeaders[k] = v
28924	}
28925	reqHeaders.Set("User-Agent", c.s.userAgent())
28926	var body io.Reader = nil
28927	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
28928	if err != nil {
28929		return nil, err
28930	}
28931	reqHeaders.Set("Content-Type", "application/json")
28932	c.urlParams_.Set("alt", alt)
28933	c.urlParams_.Set("prettyPrint", "false")
28934	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dimensionvalues/query")
28935	urls += "?" + c.urlParams_.Encode()
28936	req, err := http.NewRequest("POST", urls, body)
28937	if err != nil {
28938		return nil, err
28939	}
28940	req.Header = reqHeaders
28941	googleapi.Expand(req.URL, map[string]string{
28942		"profileId": strconv.FormatInt(c.profileId, 10),
28943	})
28944	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28945}
28946
28947// Do executes the "dfareporting.dimensionValues.query" call.
28948// Exactly one of *DimensionValueList or error will be non-nil. Any
28949// non-2xx status code is an error. Response headers are in either
28950// *DimensionValueList.ServerResponse.Header or (if a response was
28951// returned at all) in error.(*googleapi.Error).Header. Use
28952// googleapi.IsNotModified to check whether the returned error was
28953// because http.StatusNotModified was returned.
28954func (c *DimensionValuesQueryCall) Do(opts ...googleapi.CallOption) (*DimensionValueList, error) {
28955	gensupport.SetOptions(c.urlParams_, opts...)
28956	res, err := c.doRequest("json")
28957	if res != nil && res.StatusCode == http.StatusNotModified {
28958		if res.Body != nil {
28959			res.Body.Close()
28960		}
28961		return nil, &googleapi.Error{
28962			Code:   res.StatusCode,
28963			Header: res.Header,
28964		}
28965	}
28966	if err != nil {
28967		return nil, err
28968	}
28969	defer googleapi.CloseBody(res)
28970	if err := googleapi.CheckResponse(res); err != nil {
28971		return nil, err
28972	}
28973	ret := &DimensionValueList{
28974		ServerResponse: googleapi.ServerResponse{
28975			Header:         res.Header,
28976			HTTPStatusCode: res.StatusCode,
28977		},
28978	}
28979	target := &ret
28980	if err := gensupport.DecodeResponse(target, res); err != nil {
28981		return nil, err
28982	}
28983	return ret, nil
28984	// {
28985	//   "description": "Retrieves list of report dimension values for a list of filters.",
28986	//   "httpMethod": "POST",
28987	//   "id": "dfareporting.dimensionValues.query",
28988	//   "parameterOrder": [
28989	//     "profileId"
28990	//   ],
28991	//   "parameters": {
28992	//     "maxResults": {
28993	//       "default": "100",
28994	//       "description": "Maximum number of results to return.",
28995	//       "format": "int32",
28996	//       "location": "query",
28997	//       "maximum": "100",
28998	//       "minimum": "0",
28999	//       "type": "integer"
29000	//     },
29001	//     "pageToken": {
29002	//       "description": "The value of the nextToken from the previous result page.",
29003	//       "location": "query",
29004	//       "type": "string"
29005	//     },
29006	//     "profileId": {
29007	//       "description": "The DFA user profile ID.",
29008	//       "format": "int64",
29009	//       "location": "path",
29010	//       "required": true,
29011	//       "type": "string"
29012	//     }
29013	//   },
29014	//   "path": "userprofiles/{profileId}/dimensionvalues/query",
29015	//   "request": {
29016	//     "$ref": "DimensionValueRequest"
29017	//   },
29018	//   "response": {
29019	//     "$ref": "DimensionValueList"
29020	//   },
29021	//   "scopes": [
29022	//     "https://www.googleapis.com/auth/dfareporting"
29023	//   ]
29024	// }
29025
29026}
29027
29028// Pages invokes f for each page of results.
29029// A non-nil error returned from f will halt the iteration.
29030// The provided context supersedes any context provided to the Context method.
29031func (c *DimensionValuesQueryCall) Pages(ctx context.Context, f func(*DimensionValueList) error) error {
29032	c.ctx_ = ctx
29033	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29034	for {
29035		x, err := c.Do()
29036		if err != nil {
29037			return err
29038		}
29039		if err := f(x); err != nil {
29040			return err
29041		}
29042		if x.NextPageToken == "" {
29043			return nil
29044		}
29045		c.PageToken(x.NextPageToken)
29046	}
29047}
29048
29049// method id "dfareporting.directorySiteContacts.get":
29050
29051type DirectorySiteContactsGetCall struct {
29052	s            *Service
29053	profileId    int64
29054	id           int64
29055	urlParams_   gensupport.URLParams
29056	ifNoneMatch_ string
29057	ctx_         context.Context
29058	header_      http.Header
29059}
29060
29061// Get: Gets one directory site contact by ID.
29062func (r *DirectorySiteContactsService) Get(profileId int64, id int64) *DirectorySiteContactsGetCall {
29063	c := &DirectorySiteContactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29064	c.profileId = profileId
29065	c.id = id
29066	return c
29067}
29068
29069// Fields allows partial responses to be retrieved. See
29070// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29071// for more information.
29072func (c *DirectorySiteContactsGetCall) Fields(s ...googleapi.Field) *DirectorySiteContactsGetCall {
29073	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29074	return c
29075}
29076
29077// IfNoneMatch sets the optional parameter which makes the operation
29078// fail if the object's ETag matches the given value. This is useful for
29079// getting updates only after the object has changed since the last
29080// request. Use googleapi.IsNotModified to check whether the response
29081// error from Do is the result of In-None-Match.
29082func (c *DirectorySiteContactsGetCall) IfNoneMatch(entityTag string) *DirectorySiteContactsGetCall {
29083	c.ifNoneMatch_ = entityTag
29084	return c
29085}
29086
29087// Context sets the context to be used in this call's Do method. Any
29088// pending HTTP request will be aborted if the provided context is
29089// canceled.
29090func (c *DirectorySiteContactsGetCall) Context(ctx context.Context) *DirectorySiteContactsGetCall {
29091	c.ctx_ = ctx
29092	return c
29093}
29094
29095// Header returns an http.Header that can be modified by the caller to
29096// add HTTP headers to the request.
29097func (c *DirectorySiteContactsGetCall) Header() http.Header {
29098	if c.header_ == nil {
29099		c.header_ = make(http.Header)
29100	}
29101	return c.header_
29102}
29103
29104func (c *DirectorySiteContactsGetCall) doRequest(alt string) (*http.Response, error) {
29105	reqHeaders := make(http.Header)
29106	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
29107	for k, v := range c.header_ {
29108		reqHeaders[k] = v
29109	}
29110	reqHeaders.Set("User-Agent", c.s.userAgent())
29111	if c.ifNoneMatch_ != "" {
29112		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29113	}
29114	var body io.Reader = nil
29115	c.urlParams_.Set("alt", alt)
29116	c.urlParams_.Set("prettyPrint", "false")
29117	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySiteContacts/{id}")
29118	urls += "?" + c.urlParams_.Encode()
29119	req, err := http.NewRequest("GET", urls, body)
29120	if err != nil {
29121		return nil, err
29122	}
29123	req.Header = reqHeaders
29124	googleapi.Expand(req.URL, map[string]string{
29125		"profileId": strconv.FormatInt(c.profileId, 10),
29126		"id":        strconv.FormatInt(c.id, 10),
29127	})
29128	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29129}
29130
29131// Do executes the "dfareporting.directorySiteContacts.get" call.
29132// Exactly one of *DirectorySiteContact or error will be non-nil. Any
29133// non-2xx status code is an error. Response headers are in either
29134// *DirectorySiteContact.ServerResponse.Header or (if a response was
29135// returned at all) in error.(*googleapi.Error).Header. Use
29136// googleapi.IsNotModified to check whether the returned error was
29137// because http.StatusNotModified was returned.
29138func (c *DirectorySiteContactsGetCall) Do(opts ...googleapi.CallOption) (*DirectorySiteContact, error) {
29139	gensupport.SetOptions(c.urlParams_, opts...)
29140	res, err := c.doRequest("json")
29141	if res != nil && res.StatusCode == http.StatusNotModified {
29142		if res.Body != nil {
29143			res.Body.Close()
29144		}
29145		return nil, &googleapi.Error{
29146			Code:   res.StatusCode,
29147			Header: res.Header,
29148		}
29149	}
29150	if err != nil {
29151		return nil, err
29152	}
29153	defer googleapi.CloseBody(res)
29154	if err := googleapi.CheckResponse(res); err != nil {
29155		return nil, err
29156	}
29157	ret := &DirectorySiteContact{
29158		ServerResponse: googleapi.ServerResponse{
29159			Header:         res.Header,
29160			HTTPStatusCode: res.StatusCode,
29161		},
29162	}
29163	target := &ret
29164	if err := gensupport.DecodeResponse(target, res); err != nil {
29165		return nil, err
29166	}
29167	return ret, nil
29168	// {
29169	//   "description": "Gets one directory site contact by ID.",
29170	//   "httpMethod": "GET",
29171	//   "id": "dfareporting.directorySiteContacts.get",
29172	//   "parameterOrder": [
29173	//     "profileId",
29174	//     "id"
29175	//   ],
29176	//   "parameters": {
29177	//     "id": {
29178	//       "description": "Directory site contact ID.",
29179	//       "format": "int64",
29180	//       "location": "path",
29181	//       "required": true,
29182	//       "type": "string"
29183	//     },
29184	//     "profileId": {
29185	//       "description": "User profile ID associated with this request.",
29186	//       "format": "int64",
29187	//       "location": "path",
29188	//       "required": true,
29189	//       "type": "string"
29190	//     }
29191	//   },
29192	//   "path": "userprofiles/{profileId}/directorySiteContacts/{id}",
29193	//   "response": {
29194	//     "$ref": "DirectorySiteContact"
29195	//   },
29196	//   "scopes": [
29197	//     "https://www.googleapis.com/auth/dfatrafficking"
29198	//   ]
29199	// }
29200
29201}
29202
29203// method id "dfareporting.directorySiteContacts.list":
29204
29205type DirectorySiteContactsListCall struct {
29206	s            *Service
29207	profileId    int64
29208	urlParams_   gensupport.URLParams
29209	ifNoneMatch_ string
29210	ctx_         context.Context
29211	header_      http.Header
29212}
29213
29214// List: Retrieves a list of directory site contacts, possibly filtered.
29215// This method supports paging.
29216func (r *DirectorySiteContactsService) List(profileId int64) *DirectorySiteContactsListCall {
29217	c := &DirectorySiteContactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29218	c.profileId = profileId
29219	return c
29220}
29221
29222// DirectorySiteIds sets the optional parameter "directorySiteIds":
29223// Select only directory site contacts with these directory site IDs.
29224// This is a required field.
29225func (c *DirectorySiteContactsListCall) DirectorySiteIds(directorySiteIds ...int64) *DirectorySiteContactsListCall {
29226	var directorySiteIds_ []string
29227	for _, v := range directorySiteIds {
29228		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
29229	}
29230	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
29231	return c
29232}
29233
29234// Ids sets the optional parameter "ids": Select only directory site
29235// contacts with these IDs.
29236func (c *DirectorySiteContactsListCall) Ids(ids ...int64) *DirectorySiteContactsListCall {
29237	var ids_ []string
29238	for _, v := range ids {
29239		ids_ = append(ids_, fmt.Sprint(v))
29240	}
29241	c.urlParams_.SetMulti("ids", ids_)
29242	return c
29243}
29244
29245// MaxResults sets the optional parameter "maxResults": Maximum number
29246// of results to return.
29247func (c *DirectorySiteContactsListCall) MaxResults(maxResults int64) *DirectorySiteContactsListCall {
29248	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29249	return c
29250}
29251
29252// PageToken sets the optional parameter "pageToken": Value of the
29253// nextPageToken from the previous result page.
29254func (c *DirectorySiteContactsListCall) PageToken(pageToken string) *DirectorySiteContactsListCall {
29255	c.urlParams_.Set("pageToken", pageToken)
29256	return c
29257}
29258
29259// SearchString sets the optional parameter "searchString": Allows
29260// searching for objects by name, ID or email. Wildcards (*) are
29261// allowed. For example, "directory site contact*2015" will return
29262// objects with names like "directory site contact June 2015",
29263// "directory site contact April 2015", or simply "directory site
29264// contact 2015". Most of the searches also add wildcards implicitly at
29265// the start and the end of the search string. For example, a search
29266// string of "directory site contact" will match objects with name "my
29267// directory site contact", "directory site contact 2015", or simply
29268// "directory site contact".
29269func (c *DirectorySiteContactsListCall) SearchString(searchString string) *DirectorySiteContactsListCall {
29270	c.urlParams_.Set("searchString", searchString)
29271	return c
29272}
29273
29274// SortField sets the optional parameter "sortField": Field by which to
29275// sort the list.
29276//
29277// Possible values:
29278//   "ID" (default)
29279//   "NAME"
29280func (c *DirectorySiteContactsListCall) SortField(sortField string) *DirectorySiteContactsListCall {
29281	c.urlParams_.Set("sortField", sortField)
29282	return c
29283}
29284
29285// SortOrder sets the optional parameter "sortOrder": Order of sorted
29286// results.
29287//
29288// Possible values:
29289//   "ASCENDING" (default)
29290//   "DESCENDING"
29291func (c *DirectorySiteContactsListCall) SortOrder(sortOrder string) *DirectorySiteContactsListCall {
29292	c.urlParams_.Set("sortOrder", sortOrder)
29293	return c
29294}
29295
29296// Fields allows partial responses to be retrieved. See
29297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29298// for more information.
29299func (c *DirectorySiteContactsListCall) Fields(s ...googleapi.Field) *DirectorySiteContactsListCall {
29300	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29301	return c
29302}
29303
29304// IfNoneMatch sets the optional parameter which makes the operation
29305// fail if the object's ETag matches the given value. This is useful for
29306// getting updates only after the object has changed since the last
29307// request. Use googleapi.IsNotModified to check whether the response
29308// error from Do is the result of In-None-Match.
29309func (c *DirectorySiteContactsListCall) IfNoneMatch(entityTag string) *DirectorySiteContactsListCall {
29310	c.ifNoneMatch_ = entityTag
29311	return c
29312}
29313
29314// Context sets the context to be used in this call's Do method. Any
29315// pending HTTP request will be aborted if the provided context is
29316// canceled.
29317func (c *DirectorySiteContactsListCall) Context(ctx context.Context) *DirectorySiteContactsListCall {
29318	c.ctx_ = ctx
29319	return c
29320}
29321
29322// Header returns an http.Header that can be modified by the caller to
29323// add HTTP headers to the request.
29324func (c *DirectorySiteContactsListCall) Header() http.Header {
29325	if c.header_ == nil {
29326		c.header_ = make(http.Header)
29327	}
29328	return c.header_
29329}
29330
29331func (c *DirectorySiteContactsListCall) doRequest(alt string) (*http.Response, error) {
29332	reqHeaders := make(http.Header)
29333	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
29334	for k, v := range c.header_ {
29335		reqHeaders[k] = v
29336	}
29337	reqHeaders.Set("User-Agent", c.s.userAgent())
29338	if c.ifNoneMatch_ != "" {
29339		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29340	}
29341	var body io.Reader = nil
29342	c.urlParams_.Set("alt", alt)
29343	c.urlParams_.Set("prettyPrint", "false")
29344	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySiteContacts")
29345	urls += "?" + c.urlParams_.Encode()
29346	req, err := http.NewRequest("GET", urls, body)
29347	if err != nil {
29348		return nil, err
29349	}
29350	req.Header = reqHeaders
29351	googleapi.Expand(req.URL, map[string]string{
29352		"profileId": strconv.FormatInt(c.profileId, 10),
29353	})
29354	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29355}
29356
29357// Do executes the "dfareporting.directorySiteContacts.list" call.
29358// Exactly one of *DirectorySiteContactsListResponse or error will be
29359// non-nil. Any non-2xx status code is an error. Response headers are in
29360// either *DirectorySiteContactsListResponse.ServerResponse.Header or
29361// (if a response was returned at all) in
29362// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
29363// whether the returned error was because http.StatusNotModified was
29364// returned.
29365func (c *DirectorySiteContactsListCall) Do(opts ...googleapi.CallOption) (*DirectorySiteContactsListResponse, error) {
29366	gensupport.SetOptions(c.urlParams_, opts...)
29367	res, err := c.doRequest("json")
29368	if res != nil && res.StatusCode == http.StatusNotModified {
29369		if res.Body != nil {
29370			res.Body.Close()
29371		}
29372		return nil, &googleapi.Error{
29373			Code:   res.StatusCode,
29374			Header: res.Header,
29375		}
29376	}
29377	if err != nil {
29378		return nil, err
29379	}
29380	defer googleapi.CloseBody(res)
29381	if err := googleapi.CheckResponse(res); err != nil {
29382		return nil, err
29383	}
29384	ret := &DirectorySiteContactsListResponse{
29385		ServerResponse: googleapi.ServerResponse{
29386			Header:         res.Header,
29387			HTTPStatusCode: res.StatusCode,
29388		},
29389	}
29390	target := &ret
29391	if err := gensupport.DecodeResponse(target, res); err != nil {
29392		return nil, err
29393	}
29394	return ret, nil
29395	// {
29396	//   "description": "Retrieves a list of directory site contacts, possibly filtered. This method supports paging.",
29397	//   "httpMethod": "GET",
29398	//   "id": "dfareporting.directorySiteContacts.list",
29399	//   "parameterOrder": [
29400	//     "profileId"
29401	//   ],
29402	//   "parameters": {
29403	//     "directorySiteIds": {
29404	//       "description": "Select only directory site contacts with these directory site IDs. This is a required field.",
29405	//       "format": "int64",
29406	//       "location": "query",
29407	//       "repeated": true,
29408	//       "type": "string"
29409	//     },
29410	//     "ids": {
29411	//       "description": "Select only directory site contacts with these IDs.",
29412	//       "format": "int64",
29413	//       "location": "query",
29414	//       "repeated": true,
29415	//       "type": "string"
29416	//     },
29417	//     "maxResults": {
29418	//       "default": "1000",
29419	//       "description": "Maximum number of results to return.",
29420	//       "format": "int32",
29421	//       "location": "query",
29422	//       "maximum": "1000",
29423	//       "minimum": "0",
29424	//       "type": "integer"
29425	//     },
29426	//     "pageToken": {
29427	//       "description": "Value of the nextPageToken from the previous result page.",
29428	//       "location": "query",
29429	//       "type": "string"
29430	//     },
29431	//     "profileId": {
29432	//       "description": "User profile ID associated with this request.",
29433	//       "format": "int64",
29434	//       "location": "path",
29435	//       "required": true,
29436	//       "type": "string"
29437	//     },
29438	//     "searchString": {
29439	//       "description": "Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, \"directory site contact*2015\" will return objects with names like \"directory site contact June 2015\", \"directory site contact April 2015\", or simply \"directory site contact 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 contact\" will match objects with name \"my directory site contact\", \"directory site contact 2015\", or simply \"directory site contact\".",
29440	//       "location": "query",
29441	//       "type": "string"
29442	//     },
29443	//     "sortField": {
29444	//       "default": "ID",
29445	//       "description": "Field by which to sort the list.",
29446	//       "enum": [
29447	//         "ID",
29448	//         "NAME"
29449	//       ],
29450	//       "enumDescriptions": [
29451	//         "",
29452	//         ""
29453	//       ],
29454	//       "location": "query",
29455	//       "type": "string"
29456	//     },
29457	//     "sortOrder": {
29458	//       "default": "ASCENDING",
29459	//       "description": "Order of sorted results.",
29460	//       "enum": [
29461	//         "ASCENDING",
29462	//         "DESCENDING"
29463	//       ],
29464	//       "enumDescriptions": [
29465	//         "",
29466	//         ""
29467	//       ],
29468	//       "location": "query",
29469	//       "type": "string"
29470	//     }
29471	//   },
29472	//   "path": "userprofiles/{profileId}/directorySiteContacts",
29473	//   "response": {
29474	//     "$ref": "DirectorySiteContactsListResponse"
29475	//   },
29476	//   "scopes": [
29477	//     "https://www.googleapis.com/auth/dfatrafficking"
29478	//   ]
29479	// }
29480
29481}
29482
29483// Pages invokes f for each page of results.
29484// A non-nil error returned from f will halt the iteration.
29485// The provided context supersedes any context provided to the Context method.
29486func (c *DirectorySiteContactsListCall) Pages(ctx context.Context, f func(*DirectorySiteContactsListResponse) error) error {
29487	c.ctx_ = ctx
29488	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29489	for {
29490		x, err := c.Do()
29491		if err != nil {
29492			return err
29493		}
29494		if err := f(x); err != nil {
29495			return err
29496		}
29497		if x.NextPageToken == "" {
29498			return nil
29499		}
29500		c.PageToken(x.NextPageToken)
29501	}
29502}
29503
29504// method id "dfareporting.directorySites.get":
29505
29506type DirectorySitesGetCall struct {
29507	s            *Service
29508	profileId    int64
29509	id           int64
29510	urlParams_   gensupport.URLParams
29511	ifNoneMatch_ string
29512	ctx_         context.Context
29513	header_      http.Header
29514}
29515
29516// Get: Gets one directory site by ID.
29517func (r *DirectorySitesService) Get(profileId int64, id int64) *DirectorySitesGetCall {
29518	c := &DirectorySitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29519	c.profileId = profileId
29520	c.id = id
29521	return c
29522}
29523
29524// Fields allows partial responses to be retrieved. See
29525// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29526// for more information.
29527func (c *DirectorySitesGetCall) Fields(s ...googleapi.Field) *DirectorySitesGetCall {
29528	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29529	return c
29530}
29531
29532// IfNoneMatch sets the optional parameter which makes the operation
29533// fail if the object's ETag matches the given value. This is useful for
29534// getting updates only after the object has changed since the last
29535// request. Use googleapi.IsNotModified to check whether the response
29536// error from Do is the result of In-None-Match.
29537func (c *DirectorySitesGetCall) IfNoneMatch(entityTag string) *DirectorySitesGetCall {
29538	c.ifNoneMatch_ = entityTag
29539	return c
29540}
29541
29542// Context sets the context to be used in this call's Do method. Any
29543// pending HTTP request will be aborted if the provided context is
29544// canceled.
29545func (c *DirectorySitesGetCall) Context(ctx context.Context) *DirectorySitesGetCall {
29546	c.ctx_ = ctx
29547	return c
29548}
29549
29550// Header returns an http.Header that can be modified by the caller to
29551// add HTTP headers to the request.
29552func (c *DirectorySitesGetCall) Header() http.Header {
29553	if c.header_ == nil {
29554		c.header_ = make(http.Header)
29555	}
29556	return c.header_
29557}
29558
29559func (c *DirectorySitesGetCall) doRequest(alt string) (*http.Response, error) {
29560	reqHeaders := make(http.Header)
29561	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
29562	for k, v := range c.header_ {
29563		reqHeaders[k] = v
29564	}
29565	reqHeaders.Set("User-Agent", c.s.userAgent())
29566	if c.ifNoneMatch_ != "" {
29567		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29568	}
29569	var body io.Reader = nil
29570	c.urlParams_.Set("alt", alt)
29571	c.urlParams_.Set("prettyPrint", "false")
29572	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites/{id}")
29573	urls += "?" + c.urlParams_.Encode()
29574	req, err := http.NewRequest("GET", urls, body)
29575	if err != nil {
29576		return nil, err
29577	}
29578	req.Header = reqHeaders
29579	googleapi.Expand(req.URL, map[string]string{
29580		"profileId": strconv.FormatInt(c.profileId, 10),
29581		"id":        strconv.FormatInt(c.id, 10),
29582	})
29583	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29584}
29585
29586// Do executes the "dfareporting.directorySites.get" call.
29587// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
29588// status code is an error. Response headers are in either
29589// *DirectorySite.ServerResponse.Header or (if a response was returned
29590// at all) in error.(*googleapi.Error).Header. Use
29591// googleapi.IsNotModified to check whether the returned error was
29592// because http.StatusNotModified was returned.
29593func (c *DirectorySitesGetCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
29594	gensupport.SetOptions(c.urlParams_, opts...)
29595	res, err := c.doRequest("json")
29596	if res != nil && res.StatusCode == http.StatusNotModified {
29597		if res.Body != nil {
29598			res.Body.Close()
29599		}
29600		return nil, &googleapi.Error{
29601			Code:   res.StatusCode,
29602			Header: res.Header,
29603		}
29604	}
29605	if err != nil {
29606		return nil, err
29607	}
29608	defer googleapi.CloseBody(res)
29609	if err := googleapi.CheckResponse(res); err != nil {
29610		return nil, err
29611	}
29612	ret := &DirectorySite{
29613		ServerResponse: googleapi.ServerResponse{
29614			Header:         res.Header,
29615			HTTPStatusCode: res.StatusCode,
29616		},
29617	}
29618	target := &ret
29619	if err := gensupport.DecodeResponse(target, res); err != nil {
29620		return nil, err
29621	}
29622	return ret, nil
29623	// {
29624	//   "description": "Gets one directory site by ID.",
29625	//   "httpMethod": "GET",
29626	//   "id": "dfareporting.directorySites.get",
29627	//   "parameterOrder": [
29628	//     "profileId",
29629	//     "id"
29630	//   ],
29631	//   "parameters": {
29632	//     "id": {
29633	//       "description": "Directory site ID.",
29634	//       "format": "int64",
29635	//       "location": "path",
29636	//       "required": true,
29637	//       "type": "string"
29638	//     },
29639	//     "profileId": {
29640	//       "description": "User profile ID associated with this request.",
29641	//       "format": "int64",
29642	//       "location": "path",
29643	//       "required": true,
29644	//       "type": "string"
29645	//     }
29646	//   },
29647	//   "path": "userprofiles/{profileId}/directorySites/{id}",
29648	//   "response": {
29649	//     "$ref": "DirectorySite"
29650	//   },
29651	//   "scopes": [
29652	//     "https://www.googleapis.com/auth/dfatrafficking"
29653	//   ]
29654	// }
29655
29656}
29657
29658// method id "dfareporting.directorySites.insert":
29659
29660type DirectorySitesInsertCall struct {
29661	s             *Service
29662	profileId     int64
29663	directorysite *DirectorySite
29664	urlParams_    gensupport.URLParams
29665	ctx_          context.Context
29666	header_       http.Header
29667}
29668
29669// Insert: Inserts a new directory site.
29670func (r *DirectorySitesService) Insert(profileId int64, directorysite *DirectorySite) *DirectorySitesInsertCall {
29671	c := &DirectorySitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29672	c.profileId = profileId
29673	c.directorysite = directorysite
29674	return c
29675}
29676
29677// Fields allows partial responses to be retrieved. See
29678// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29679// for more information.
29680func (c *DirectorySitesInsertCall) Fields(s ...googleapi.Field) *DirectorySitesInsertCall {
29681	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29682	return c
29683}
29684
29685// Context sets the context to be used in this call's Do method. Any
29686// pending HTTP request will be aborted if the provided context is
29687// canceled.
29688func (c *DirectorySitesInsertCall) Context(ctx context.Context) *DirectorySitesInsertCall {
29689	c.ctx_ = ctx
29690	return c
29691}
29692
29693// Header returns an http.Header that can be modified by the caller to
29694// add HTTP headers to the request.
29695func (c *DirectorySitesInsertCall) Header() http.Header {
29696	if c.header_ == nil {
29697		c.header_ = make(http.Header)
29698	}
29699	return c.header_
29700}
29701
29702func (c *DirectorySitesInsertCall) doRequest(alt string) (*http.Response, error) {
29703	reqHeaders := make(http.Header)
29704	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
29705	for k, v := range c.header_ {
29706		reqHeaders[k] = v
29707	}
29708	reqHeaders.Set("User-Agent", c.s.userAgent())
29709	var body io.Reader = nil
29710	body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorysite)
29711	if err != nil {
29712		return nil, err
29713	}
29714	reqHeaders.Set("Content-Type", "application/json")
29715	c.urlParams_.Set("alt", alt)
29716	c.urlParams_.Set("prettyPrint", "false")
29717	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
29718	urls += "?" + c.urlParams_.Encode()
29719	req, err := http.NewRequest("POST", urls, body)
29720	if err != nil {
29721		return nil, err
29722	}
29723	req.Header = reqHeaders
29724	googleapi.Expand(req.URL, map[string]string{
29725		"profileId": strconv.FormatInt(c.profileId, 10),
29726	})
29727	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29728}
29729
29730// Do executes the "dfareporting.directorySites.insert" call.
29731// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
29732// status code is an error. Response headers are in either
29733// *DirectorySite.ServerResponse.Header or (if a response was returned
29734// at all) in error.(*googleapi.Error).Header. Use
29735// googleapi.IsNotModified to check whether the returned error was
29736// because http.StatusNotModified was returned.
29737func (c *DirectorySitesInsertCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
29738	gensupport.SetOptions(c.urlParams_, opts...)
29739	res, err := c.doRequest("json")
29740	if res != nil && res.StatusCode == http.StatusNotModified {
29741		if res.Body != nil {
29742			res.Body.Close()
29743		}
29744		return nil, &googleapi.Error{
29745			Code:   res.StatusCode,
29746			Header: res.Header,
29747		}
29748	}
29749	if err != nil {
29750		return nil, err
29751	}
29752	defer googleapi.CloseBody(res)
29753	if err := googleapi.CheckResponse(res); err != nil {
29754		return nil, err
29755	}
29756	ret := &DirectorySite{
29757		ServerResponse: googleapi.ServerResponse{
29758			Header:         res.Header,
29759			HTTPStatusCode: res.StatusCode,
29760		},
29761	}
29762	target := &ret
29763	if err := gensupport.DecodeResponse(target, res); err != nil {
29764		return nil, err
29765	}
29766	return ret, nil
29767	// {
29768	//   "description": "Inserts a new directory site.",
29769	//   "httpMethod": "POST",
29770	//   "id": "dfareporting.directorySites.insert",
29771	//   "parameterOrder": [
29772	//     "profileId"
29773	//   ],
29774	//   "parameters": {
29775	//     "profileId": {
29776	//       "description": "User profile ID associated with this request.",
29777	//       "format": "int64",
29778	//       "location": "path",
29779	//       "required": true,
29780	//       "type": "string"
29781	//     }
29782	//   },
29783	//   "path": "userprofiles/{profileId}/directorySites",
29784	//   "request": {
29785	//     "$ref": "DirectorySite"
29786	//   },
29787	//   "response": {
29788	//     "$ref": "DirectorySite"
29789	//   },
29790	//   "scopes": [
29791	//     "https://www.googleapis.com/auth/dfatrafficking"
29792	//   ]
29793	// }
29794
29795}
29796
29797// method id "dfareporting.directorySites.list":
29798
29799type DirectorySitesListCall struct {
29800	s            *Service
29801	profileId    int64
29802	urlParams_   gensupport.URLParams
29803	ifNoneMatch_ string
29804	ctx_         context.Context
29805	header_      http.Header
29806}
29807
29808// List: Retrieves a list of directory sites, possibly filtered. This
29809// method supports paging.
29810func (r *DirectorySitesService) List(profileId int64) *DirectorySitesListCall {
29811	c := &DirectorySitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29812	c.profileId = profileId
29813	return c
29814}
29815
29816// AcceptsInStreamVideoPlacements sets the optional parameter
29817// "acceptsInStreamVideoPlacements": This search filter is no longer
29818// supported and will have no effect on the results returned.
29819func (c *DirectorySitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *DirectorySitesListCall {
29820	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
29821	return c
29822}
29823
29824// AcceptsInterstitialPlacements sets the optional parameter
29825// "acceptsInterstitialPlacements": This search filter is no longer
29826// supported and will have no effect on the results returned.
29827func (c *DirectorySitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *DirectorySitesListCall {
29828	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
29829	return c
29830}
29831
29832// AcceptsPublisherPaidPlacements sets the optional parameter
29833// "acceptsPublisherPaidPlacements": Select only directory sites that
29834// accept publisher paid placements. This field can be left blank.
29835func (c *DirectorySitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *DirectorySitesListCall {
29836	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
29837	return c
29838}
29839
29840// Active sets the optional parameter "active": Select only active
29841// directory sites. Leave blank to retrieve both active and inactive
29842// directory sites.
29843func (c *DirectorySitesListCall) Active(active bool) *DirectorySitesListCall {
29844	c.urlParams_.Set("active", fmt.Sprint(active))
29845	return c
29846}
29847
29848// CountryId sets the optional parameter "countryId": Select only
29849// directory sites with this country ID.
29850func (c *DirectorySitesListCall) CountryId(countryId int64) *DirectorySitesListCall {
29851	c.urlParams_.Set("countryId", fmt.Sprint(countryId))
29852	return c
29853}
29854
29855// DfpNetworkCode sets the optional parameter "dfpNetworkCode": Select
29856// only directory sites with this Ad Manager network code.
29857func (c *DirectorySitesListCall) DfpNetworkCode(dfpNetworkCode string) *DirectorySitesListCall {
29858	c.urlParams_.Set("dfpNetworkCode", dfpNetworkCode)
29859	return c
29860}
29861
29862// Ids sets the optional parameter "ids": Select only directory sites
29863// with these IDs.
29864func (c *DirectorySitesListCall) Ids(ids ...int64) *DirectorySitesListCall {
29865	var ids_ []string
29866	for _, v := range ids {
29867		ids_ = append(ids_, fmt.Sprint(v))
29868	}
29869	c.urlParams_.SetMulti("ids", ids_)
29870	return c
29871}
29872
29873// MaxResults sets the optional parameter "maxResults": Maximum number
29874// of results to return.
29875func (c *DirectorySitesListCall) MaxResults(maxResults int64) *DirectorySitesListCall {
29876	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29877	return c
29878}
29879
29880// PageToken sets the optional parameter "pageToken": Value of the
29881// nextPageToken from the previous result page.
29882func (c *DirectorySitesListCall) PageToken(pageToken string) *DirectorySitesListCall {
29883	c.urlParams_.Set("pageToken", pageToken)
29884	return c
29885}
29886
29887// ParentId sets the optional parameter "parentId": Select only
29888// directory sites with this parent ID.
29889func (c *DirectorySitesListCall) ParentId(parentId int64) *DirectorySitesListCall {
29890	c.urlParams_.Set("parentId", fmt.Sprint(parentId))
29891	return c
29892}
29893
29894// SearchString sets the optional parameter "searchString": Allows
29895// searching for objects by name, ID or URL. Wildcards (*) are allowed.
29896// For example, "directory site*2015" will return objects with names
29897// like "directory site June 2015", "directory site April 2015", or
29898// simply "directory site 2015". Most of the searches also add wildcards
29899// implicitly at the start and the end of the search string. For
29900// example, a search string of "directory site" will match objects with
29901// name "my directory site", "directory site 2015" or simply, "directory
29902// site".
29903func (c *DirectorySitesListCall) SearchString(searchString string) *DirectorySitesListCall {
29904	c.urlParams_.Set("searchString", searchString)
29905	return c
29906}
29907
29908// SortField sets the optional parameter "sortField": Field by which to
29909// sort the list.
29910//
29911// Possible values:
29912//   "ID" (default)
29913//   "NAME"
29914func (c *DirectorySitesListCall) SortField(sortField string) *DirectorySitesListCall {
29915	c.urlParams_.Set("sortField", sortField)
29916	return c
29917}
29918
29919// SortOrder sets the optional parameter "sortOrder": Order of sorted
29920// results.
29921//
29922// Possible values:
29923//   "ASCENDING" (default)
29924//   "DESCENDING"
29925func (c *DirectorySitesListCall) SortOrder(sortOrder string) *DirectorySitesListCall {
29926	c.urlParams_.Set("sortOrder", sortOrder)
29927	return c
29928}
29929
29930// Fields allows partial responses to be retrieved. See
29931// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29932// for more information.
29933func (c *DirectorySitesListCall) Fields(s ...googleapi.Field) *DirectorySitesListCall {
29934	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29935	return c
29936}
29937
29938// IfNoneMatch sets the optional parameter which makes the operation
29939// fail if the object's ETag matches the given value. This is useful for
29940// getting updates only after the object has changed since the last
29941// request. Use googleapi.IsNotModified to check whether the response
29942// error from Do is the result of In-None-Match.
29943func (c *DirectorySitesListCall) IfNoneMatch(entityTag string) *DirectorySitesListCall {
29944	c.ifNoneMatch_ = entityTag
29945	return c
29946}
29947
29948// Context sets the context to be used in this call's Do method. Any
29949// pending HTTP request will be aborted if the provided context is
29950// canceled.
29951func (c *DirectorySitesListCall) Context(ctx context.Context) *DirectorySitesListCall {
29952	c.ctx_ = ctx
29953	return c
29954}
29955
29956// Header returns an http.Header that can be modified by the caller to
29957// add HTTP headers to the request.
29958func (c *DirectorySitesListCall) Header() http.Header {
29959	if c.header_ == nil {
29960		c.header_ = make(http.Header)
29961	}
29962	return c.header_
29963}
29964
29965func (c *DirectorySitesListCall) doRequest(alt string) (*http.Response, error) {
29966	reqHeaders := make(http.Header)
29967	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
29968	for k, v := range c.header_ {
29969		reqHeaders[k] = v
29970	}
29971	reqHeaders.Set("User-Agent", c.s.userAgent())
29972	if c.ifNoneMatch_ != "" {
29973		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29974	}
29975	var body io.Reader = nil
29976	c.urlParams_.Set("alt", alt)
29977	c.urlParams_.Set("prettyPrint", "false")
29978	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
29979	urls += "?" + c.urlParams_.Encode()
29980	req, err := http.NewRequest("GET", urls, body)
29981	if err != nil {
29982		return nil, err
29983	}
29984	req.Header = reqHeaders
29985	googleapi.Expand(req.URL, map[string]string{
29986		"profileId": strconv.FormatInt(c.profileId, 10),
29987	})
29988	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29989}
29990
29991// Do executes the "dfareporting.directorySites.list" call.
29992// Exactly one of *DirectorySitesListResponse or error will be non-nil.
29993// Any non-2xx status code is an error. Response headers are in either
29994// *DirectorySitesListResponse.ServerResponse.Header or (if a response
29995// was returned at all) in error.(*googleapi.Error).Header. Use
29996// googleapi.IsNotModified to check whether the returned error was
29997// because http.StatusNotModified was returned.
29998func (c *DirectorySitesListCall) Do(opts ...googleapi.CallOption) (*DirectorySitesListResponse, error) {
29999	gensupport.SetOptions(c.urlParams_, opts...)
30000	res, err := c.doRequest("json")
30001	if res != nil && res.StatusCode == http.StatusNotModified {
30002		if res.Body != nil {
30003			res.Body.Close()
30004		}
30005		return nil, &googleapi.Error{
30006			Code:   res.StatusCode,
30007			Header: res.Header,
30008		}
30009	}
30010	if err != nil {
30011		return nil, err
30012	}
30013	defer googleapi.CloseBody(res)
30014	if err := googleapi.CheckResponse(res); err != nil {
30015		return nil, err
30016	}
30017	ret := &DirectorySitesListResponse{
30018		ServerResponse: googleapi.ServerResponse{
30019			Header:         res.Header,
30020			HTTPStatusCode: res.StatusCode,
30021		},
30022	}
30023	target := &ret
30024	if err := gensupport.DecodeResponse(target, res); err != nil {
30025		return nil, err
30026	}
30027	return ret, nil
30028	// {
30029	//   "description": "Retrieves a list of directory sites, possibly filtered. This method supports paging.",
30030	//   "httpMethod": "GET",
30031	//   "id": "dfareporting.directorySites.list",
30032	//   "parameterOrder": [
30033	//     "profileId"
30034	//   ],
30035	//   "parameters": {
30036	//     "acceptsInStreamVideoPlacements": {
30037	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
30038	//       "location": "query",
30039	//       "type": "boolean"
30040	//     },
30041	//     "acceptsInterstitialPlacements": {
30042	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
30043	//       "location": "query",
30044	//       "type": "boolean"
30045	//     },
30046	//     "acceptsPublisherPaidPlacements": {
30047	//       "description": "Select only directory sites that accept publisher paid placements. This field can be left blank.",
30048	//       "location": "query",
30049	//       "type": "boolean"
30050	//     },
30051	//     "active": {
30052	//       "description": "Select only active directory sites. Leave blank to retrieve both active and inactive directory sites.",
30053	//       "location": "query",
30054	//       "type": "boolean"
30055	//     },
30056	//     "countryId": {
30057	//       "description": "Select only directory sites with this country ID.",
30058	//       "format": "int64",
30059	//       "location": "query",
30060	//       "type": "string"
30061	//     },
30062	//     "dfpNetworkCode": {
30063	//       "description": "Select only directory sites with this Ad Manager network code.",
30064	//       "location": "query",
30065	//       "type": "string"
30066	//     },
30067	//     "ids": {
30068	//       "description": "Select only directory sites with these IDs.",
30069	//       "format": "int64",
30070	//       "location": "query",
30071	//       "repeated": true,
30072	//       "type": "string"
30073	//     },
30074	//     "maxResults": {
30075	//       "default": "1000",
30076	//       "description": "Maximum number of results to return.",
30077	//       "format": "int32",
30078	//       "location": "query",
30079	//       "maximum": "1000",
30080	//       "minimum": "0",
30081	//       "type": "integer"
30082	//     },
30083	//     "pageToken": {
30084	//       "description": "Value of the nextPageToken from the previous result page.",
30085	//       "location": "query",
30086	//       "type": "string"
30087	//     },
30088	//     "parentId": {
30089	//       "description": "Select only directory sites with this parent ID.",
30090	//       "format": "int64",
30091	//       "location": "query",
30092	//       "type": "string"
30093	//     },
30094	//     "profileId": {
30095	//       "description": "User profile ID associated with this request.",
30096	//       "format": "int64",
30097	//       "location": "path",
30098	//       "required": true,
30099	//       "type": "string"
30100	//     },
30101	//     "searchString": {
30102	//       "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\".",
30103	//       "location": "query",
30104	//       "type": "string"
30105	//     },
30106	//     "sortField": {
30107	//       "default": "ID",
30108	//       "description": "Field by which to sort the list.",
30109	//       "enum": [
30110	//         "ID",
30111	//         "NAME"
30112	//       ],
30113	//       "enumDescriptions": [
30114	//         "",
30115	//         ""
30116	//       ],
30117	//       "location": "query",
30118	//       "type": "string"
30119	//     },
30120	//     "sortOrder": {
30121	//       "default": "ASCENDING",
30122	//       "description": "Order of sorted results.",
30123	//       "enum": [
30124	//         "ASCENDING",
30125	//         "DESCENDING"
30126	//       ],
30127	//       "enumDescriptions": [
30128	//         "",
30129	//         ""
30130	//       ],
30131	//       "location": "query",
30132	//       "type": "string"
30133	//     }
30134	//   },
30135	//   "path": "userprofiles/{profileId}/directorySites",
30136	//   "response": {
30137	//     "$ref": "DirectorySitesListResponse"
30138	//   },
30139	//   "scopes": [
30140	//     "https://www.googleapis.com/auth/dfatrafficking"
30141	//   ]
30142	// }
30143
30144}
30145
30146// Pages invokes f for each page of results.
30147// A non-nil error returned from f will halt the iteration.
30148// The provided context supersedes any context provided to the Context method.
30149func (c *DirectorySitesListCall) Pages(ctx context.Context, f func(*DirectorySitesListResponse) error) error {
30150	c.ctx_ = ctx
30151	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
30152	for {
30153		x, err := c.Do()
30154		if err != nil {
30155			return err
30156		}
30157		if err := f(x); err != nil {
30158			return err
30159		}
30160		if x.NextPageToken == "" {
30161			return nil
30162		}
30163		c.PageToken(x.NextPageToken)
30164	}
30165}
30166
30167// method id "dfareporting.dynamicTargetingKeys.delete":
30168
30169type DynamicTargetingKeysDeleteCall struct {
30170	s          *Service
30171	profileId  int64
30172	objectId   int64
30173	urlParams_ gensupport.URLParams
30174	ctx_       context.Context
30175	header_    http.Header
30176}
30177
30178// Delete: Deletes an existing dynamic targeting key.
30179func (r *DynamicTargetingKeysService) Delete(profileId int64, objectId int64, name string, objectType string) *DynamicTargetingKeysDeleteCall {
30180	c := &DynamicTargetingKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30181	c.profileId = profileId
30182	c.objectId = objectId
30183	c.urlParams_.Set("name", name)
30184	c.urlParams_.Set("objectType", objectType)
30185	return c
30186}
30187
30188// Fields allows partial responses to be retrieved. See
30189// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30190// for more information.
30191func (c *DynamicTargetingKeysDeleteCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysDeleteCall {
30192	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30193	return c
30194}
30195
30196// Context sets the context to be used in this call's Do method. Any
30197// pending HTTP request will be aborted if the provided context is
30198// canceled.
30199func (c *DynamicTargetingKeysDeleteCall) Context(ctx context.Context) *DynamicTargetingKeysDeleteCall {
30200	c.ctx_ = ctx
30201	return c
30202}
30203
30204// Header returns an http.Header that can be modified by the caller to
30205// add HTTP headers to the request.
30206func (c *DynamicTargetingKeysDeleteCall) Header() http.Header {
30207	if c.header_ == nil {
30208		c.header_ = make(http.Header)
30209	}
30210	return c.header_
30211}
30212
30213func (c *DynamicTargetingKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
30214	reqHeaders := make(http.Header)
30215	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
30216	for k, v := range c.header_ {
30217		reqHeaders[k] = v
30218	}
30219	reqHeaders.Set("User-Agent", c.s.userAgent())
30220	var body io.Reader = nil
30221	c.urlParams_.Set("alt", alt)
30222	c.urlParams_.Set("prettyPrint", "false")
30223	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}")
30224	urls += "?" + c.urlParams_.Encode()
30225	req, err := http.NewRequest("DELETE", urls, body)
30226	if err != nil {
30227		return nil, err
30228	}
30229	req.Header = reqHeaders
30230	googleapi.Expand(req.URL, map[string]string{
30231		"profileId": strconv.FormatInt(c.profileId, 10),
30232		"objectId":  strconv.FormatInt(c.objectId, 10),
30233	})
30234	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30235}
30236
30237// Do executes the "dfareporting.dynamicTargetingKeys.delete" call.
30238func (c *DynamicTargetingKeysDeleteCall) Do(opts ...googleapi.CallOption) error {
30239	gensupport.SetOptions(c.urlParams_, opts...)
30240	res, err := c.doRequest("json")
30241	if err != nil {
30242		return err
30243	}
30244	defer googleapi.CloseBody(res)
30245	if err := googleapi.CheckResponse(res); err != nil {
30246		return err
30247	}
30248	return nil
30249	// {
30250	//   "description": "Deletes an existing dynamic targeting key.",
30251	//   "httpMethod": "DELETE",
30252	//   "id": "dfareporting.dynamicTargetingKeys.delete",
30253	//   "parameterOrder": [
30254	//     "profileId",
30255	//     "objectId",
30256	//     "name",
30257	//     "objectType"
30258	//   ],
30259	//   "parameters": {
30260	//     "name": {
30261	//       "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.",
30262	//       "location": "query",
30263	//       "required": true,
30264	//       "type": "string"
30265	//     },
30266	//     "objectId": {
30267	//       "description": "ID of the object of this dynamic targeting key. This is a required field.",
30268	//       "format": "int64",
30269	//       "location": "path",
30270	//       "required": true,
30271	//       "type": "string"
30272	//     },
30273	//     "objectType": {
30274	//       "description": "Type of the object of this dynamic targeting key. This is a required field.",
30275	//       "enum": [
30276	//         "OBJECT_AD",
30277	//         "OBJECT_ADVERTISER",
30278	//         "OBJECT_CREATIVE",
30279	//         "OBJECT_PLACEMENT"
30280	//       ],
30281	//       "enumDescriptions": [
30282	//         "",
30283	//         "",
30284	//         "",
30285	//         ""
30286	//       ],
30287	//       "location": "query",
30288	//       "required": true,
30289	//       "type": "string"
30290	//     },
30291	//     "profileId": {
30292	//       "description": "User profile ID associated with this request.",
30293	//       "format": "int64",
30294	//       "location": "path",
30295	//       "required": true,
30296	//       "type": "string"
30297	//     }
30298	//   },
30299	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}",
30300	//   "scopes": [
30301	//     "https://www.googleapis.com/auth/dfatrafficking"
30302	//   ]
30303	// }
30304
30305}
30306
30307// method id "dfareporting.dynamicTargetingKeys.insert":
30308
30309type DynamicTargetingKeysInsertCall struct {
30310	s                   *Service
30311	profileId           int64
30312	dynamictargetingkey *DynamicTargetingKey
30313	urlParams_          gensupport.URLParams
30314	ctx_                context.Context
30315	header_             http.Header
30316}
30317
30318// Insert: Inserts a new dynamic targeting key. Keys must be created at
30319// the advertiser level before being assigned to the advertiser's ads,
30320// creatives, or placements. There is a maximum of 1000 keys per
30321// advertiser, out of which a maximum of 20 keys can be assigned per ad,
30322// creative, or placement.
30323func (r *DynamicTargetingKeysService) Insert(profileId int64, dynamictargetingkey *DynamicTargetingKey) *DynamicTargetingKeysInsertCall {
30324	c := &DynamicTargetingKeysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30325	c.profileId = profileId
30326	c.dynamictargetingkey = dynamictargetingkey
30327	return c
30328}
30329
30330// Fields allows partial responses to be retrieved. See
30331// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30332// for more information.
30333func (c *DynamicTargetingKeysInsertCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysInsertCall {
30334	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30335	return c
30336}
30337
30338// Context sets the context to be used in this call's Do method. Any
30339// pending HTTP request will be aborted if the provided context is
30340// canceled.
30341func (c *DynamicTargetingKeysInsertCall) Context(ctx context.Context) *DynamicTargetingKeysInsertCall {
30342	c.ctx_ = ctx
30343	return c
30344}
30345
30346// Header returns an http.Header that can be modified by the caller to
30347// add HTTP headers to the request.
30348func (c *DynamicTargetingKeysInsertCall) Header() http.Header {
30349	if c.header_ == nil {
30350		c.header_ = make(http.Header)
30351	}
30352	return c.header_
30353}
30354
30355func (c *DynamicTargetingKeysInsertCall) doRequest(alt string) (*http.Response, error) {
30356	reqHeaders := make(http.Header)
30357	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
30358	for k, v := range c.header_ {
30359		reqHeaders[k] = v
30360	}
30361	reqHeaders.Set("User-Agent", c.s.userAgent())
30362	var body io.Reader = nil
30363	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dynamictargetingkey)
30364	if err != nil {
30365		return nil, err
30366	}
30367	reqHeaders.Set("Content-Type", "application/json")
30368	c.urlParams_.Set("alt", alt)
30369	c.urlParams_.Set("prettyPrint", "false")
30370	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
30371	urls += "?" + c.urlParams_.Encode()
30372	req, err := http.NewRequest("POST", urls, body)
30373	if err != nil {
30374		return nil, err
30375	}
30376	req.Header = reqHeaders
30377	googleapi.Expand(req.URL, map[string]string{
30378		"profileId": strconv.FormatInt(c.profileId, 10),
30379	})
30380	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30381}
30382
30383// Do executes the "dfareporting.dynamicTargetingKeys.insert" call.
30384// Exactly one of *DynamicTargetingKey or error will be non-nil. Any
30385// non-2xx status code is an error. Response headers are in either
30386// *DynamicTargetingKey.ServerResponse.Header or (if a response was
30387// returned at all) in error.(*googleapi.Error).Header. Use
30388// googleapi.IsNotModified to check whether the returned error was
30389// because http.StatusNotModified was returned.
30390func (c *DynamicTargetingKeysInsertCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKey, error) {
30391	gensupport.SetOptions(c.urlParams_, opts...)
30392	res, err := c.doRequest("json")
30393	if res != nil && res.StatusCode == http.StatusNotModified {
30394		if res.Body != nil {
30395			res.Body.Close()
30396		}
30397		return nil, &googleapi.Error{
30398			Code:   res.StatusCode,
30399			Header: res.Header,
30400		}
30401	}
30402	if err != nil {
30403		return nil, err
30404	}
30405	defer googleapi.CloseBody(res)
30406	if err := googleapi.CheckResponse(res); err != nil {
30407		return nil, err
30408	}
30409	ret := &DynamicTargetingKey{
30410		ServerResponse: googleapi.ServerResponse{
30411			Header:         res.Header,
30412			HTTPStatusCode: res.StatusCode,
30413		},
30414	}
30415	target := &ret
30416	if err := gensupport.DecodeResponse(target, res); err != nil {
30417		return nil, err
30418	}
30419	return ret, nil
30420	// {
30421	//   "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.",
30422	//   "httpMethod": "POST",
30423	//   "id": "dfareporting.dynamicTargetingKeys.insert",
30424	//   "parameterOrder": [
30425	//     "profileId"
30426	//   ],
30427	//   "parameters": {
30428	//     "profileId": {
30429	//       "description": "User profile ID associated with this request.",
30430	//       "format": "int64",
30431	//       "location": "path",
30432	//       "required": true,
30433	//       "type": "string"
30434	//     }
30435	//   },
30436	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
30437	//   "request": {
30438	//     "$ref": "DynamicTargetingKey"
30439	//   },
30440	//   "response": {
30441	//     "$ref": "DynamicTargetingKey"
30442	//   },
30443	//   "scopes": [
30444	//     "https://www.googleapis.com/auth/dfatrafficking"
30445	//   ]
30446	// }
30447
30448}
30449
30450// method id "dfareporting.dynamicTargetingKeys.list":
30451
30452type DynamicTargetingKeysListCall struct {
30453	s            *Service
30454	profileId    int64
30455	urlParams_   gensupport.URLParams
30456	ifNoneMatch_ string
30457	ctx_         context.Context
30458	header_      http.Header
30459}
30460
30461// List: Retrieves a list of dynamic targeting keys.
30462func (r *DynamicTargetingKeysService) List(profileId int64) *DynamicTargetingKeysListCall {
30463	c := &DynamicTargetingKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30464	c.profileId = profileId
30465	return c
30466}
30467
30468// AdvertiserId sets the optional parameter "advertiserId": Select only
30469// dynamic targeting keys whose object has this advertiser ID.
30470func (c *DynamicTargetingKeysListCall) AdvertiserId(advertiserId int64) *DynamicTargetingKeysListCall {
30471	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30472	return c
30473}
30474
30475// Names sets the optional parameter "names": Select only dynamic
30476// targeting keys exactly matching these names.
30477func (c *DynamicTargetingKeysListCall) Names(names ...string) *DynamicTargetingKeysListCall {
30478	c.urlParams_.SetMulti("names", append([]string{}, names...))
30479	return c
30480}
30481
30482// ObjectId sets the optional parameter "objectId": Select only dynamic
30483// targeting keys with this object ID.
30484func (c *DynamicTargetingKeysListCall) ObjectId(objectId int64) *DynamicTargetingKeysListCall {
30485	c.urlParams_.Set("objectId", fmt.Sprint(objectId))
30486	return c
30487}
30488
30489// ObjectType sets the optional parameter "objectType": Select only
30490// dynamic targeting keys with this object type.
30491//
30492// Possible values:
30493//   "OBJECT_AD"
30494//   "OBJECT_ADVERTISER"
30495//   "OBJECT_CREATIVE"
30496//   "OBJECT_PLACEMENT"
30497func (c *DynamicTargetingKeysListCall) ObjectType(objectType string) *DynamicTargetingKeysListCall {
30498	c.urlParams_.Set("objectType", objectType)
30499	return c
30500}
30501
30502// Fields allows partial responses to be retrieved. See
30503// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30504// for more information.
30505func (c *DynamicTargetingKeysListCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysListCall {
30506	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30507	return c
30508}
30509
30510// IfNoneMatch sets the optional parameter which makes the operation
30511// fail if the object's ETag matches the given value. This is useful for
30512// getting updates only after the object has changed since the last
30513// request. Use googleapi.IsNotModified to check whether the response
30514// error from Do is the result of In-None-Match.
30515func (c *DynamicTargetingKeysListCall) IfNoneMatch(entityTag string) *DynamicTargetingKeysListCall {
30516	c.ifNoneMatch_ = entityTag
30517	return c
30518}
30519
30520// Context sets the context to be used in this call's Do method. Any
30521// pending HTTP request will be aborted if the provided context is
30522// canceled.
30523func (c *DynamicTargetingKeysListCall) Context(ctx context.Context) *DynamicTargetingKeysListCall {
30524	c.ctx_ = ctx
30525	return c
30526}
30527
30528// Header returns an http.Header that can be modified by the caller to
30529// add HTTP headers to the request.
30530func (c *DynamicTargetingKeysListCall) Header() http.Header {
30531	if c.header_ == nil {
30532		c.header_ = make(http.Header)
30533	}
30534	return c.header_
30535}
30536
30537func (c *DynamicTargetingKeysListCall) doRequest(alt string) (*http.Response, error) {
30538	reqHeaders := make(http.Header)
30539	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
30540	for k, v := range c.header_ {
30541		reqHeaders[k] = v
30542	}
30543	reqHeaders.Set("User-Agent", c.s.userAgent())
30544	if c.ifNoneMatch_ != "" {
30545		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30546	}
30547	var body io.Reader = nil
30548	c.urlParams_.Set("alt", alt)
30549	c.urlParams_.Set("prettyPrint", "false")
30550	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
30551	urls += "?" + c.urlParams_.Encode()
30552	req, err := http.NewRequest("GET", urls, body)
30553	if err != nil {
30554		return nil, err
30555	}
30556	req.Header = reqHeaders
30557	googleapi.Expand(req.URL, map[string]string{
30558		"profileId": strconv.FormatInt(c.profileId, 10),
30559	})
30560	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30561}
30562
30563// Do executes the "dfareporting.dynamicTargetingKeys.list" call.
30564// Exactly one of *DynamicTargetingKeysListResponse or error will be
30565// non-nil. Any non-2xx status code is an error. Response headers are in
30566// either *DynamicTargetingKeysListResponse.ServerResponse.Header or (if
30567// a response was returned at all) in error.(*googleapi.Error).Header.
30568// Use googleapi.IsNotModified to check whether the returned error was
30569// because http.StatusNotModified was returned.
30570func (c *DynamicTargetingKeysListCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKeysListResponse, error) {
30571	gensupport.SetOptions(c.urlParams_, opts...)
30572	res, err := c.doRequest("json")
30573	if res != nil && res.StatusCode == http.StatusNotModified {
30574		if res.Body != nil {
30575			res.Body.Close()
30576		}
30577		return nil, &googleapi.Error{
30578			Code:   res.StatusCode,
30579			Header: res.Header,
30580		}
30581	}
30582	if err != nil {
30583		return nil, err
30584	}
30585	defer googleapi.CloseBody(res)
30586	if err := googleapi.CheckResponse(res); err != nil {
30587		return nil, err
30588	}
30589	ret := &DynamicTargetingKeysListResponse{
30590		ServerResponse: googleapi.ServerResponse{
30591			Header:         res.Header,
30592			HTTPStatusCode: res.StatusCode,
30593		},
30594	}
30595	target := &ret
30596	if err := gensupport.DecodeResponse(target, res); err != nil {
30597		return nil, err
30598	}
30599	return ret, nil
30600	// {
30601	//   "description": "Retrieves a list of dynamic targeting keys.",
30602	//   "httpMethod": "GET",
30603	//   "id": "dfareporting.dynamicTargetingKeys.list",
30604	//   "parameterOrder": [
30605	//     "profileId"
30606	//   ],
30607	//   "parameters": {
30608	//     "advertiserId": {
30609	//       "description": "Select only dynamic targeting keys whose object has this advertiser ID.",
30610	//       "format": "int64",
30611	//       "location": "query",
30612	//       "type": "string"
30613	//     },
30614	//     "names": {
30615	//       "description": "Select only dynamic targeting keys exactly matching these names.",
30616	//       "location": "query",
30617	//       "repeated": true,
30618	//       "type": "string"
30619	//     },
30620	//     "objectId": {
30621	//       "description": "Select only dynamic targeting keys with this object ID.",
30622	//       "format": "int64",
30623	//       "location": "query",
30624	//       "type": "string"
30625	//     },
30626	//     "objectType": {
30627	//       "description": "Select only dynamic targeting keys with this object type.",
30628	//       "enum": [
30629	//         "OBJECT_AD",
30630	//         "OBJECT_ADVERTISER",
30631	//         "OBJECT_CREATIVE",
30632	//         "OBJECT_PLACEMENT"
30633	//       ],
30634	//       "enumDescriptions": [
30635	//         "",
30636	//         "",
30637	//         "",
30638	//         ""
30639	//       ],
30640	//       "location": "query",
30641	//       "type": "string"
30642	//     },
30643	//     "profileId": {
30644	//       "description": "User profile ID associated with this request.",
30645	//       "format": "int64",
30646	//       "location": "path",
30647	//       "required": true,
30648	//       "type": "string"
30649	//     }
30650	//   },
30651	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
30652	//   "response": {
30653	//     "$ref": "DynamicTargetingKeysListResponse"
30654	//   },
30655	//   "scopes": [
30656	//     "https://www.googleapis.com/auth/dfatrafficking"
30657	//   ]
30658	// }
30659
30660}
30661
30662// method id "dfareporting.eventTags.delete":
30663
30664type EventTagsDeleteCall struct {
30665	s          *Service
30666	profileId  int64
30667	id         int64
30668	urlParams_ gensupport.URLParams
30669	ctx_       context.Context
30670	header_    http.Header
30671}
30672
30673// Delete: Deletes an existing event tag.
30674func (r *EventTagsService) Delete(profileId int64, id int64) *EventTagsDeleteCall {
30675	c := &EventTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30676	c.profileId = profileId
30677	c.id = id
30678	return c
30679}
30680
30681// Fields allows partial responses to be retrieved. See
30682// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30683// for more information.
30684func (c *EventTagsDeleteCall) Fields(s ...googleapi.Field) *EventTagsDeleteCall {
30685	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30686	return c
30687}
30688
30689// Context sets the context to be used in this call's Do method. Any
30690// pending HTTP request will be aborted if the provided context is
30691// canceled.
30692func (c *EventTagsDeleteCall) Context(ctx context.Context) *EventTagsDeleteCall {
30693	c.ctx_ = ctx
30694	return c
30695}
30696
30697// Header returns an http.Header that can be modified by the caller to
30698// add HTTP headers to the request.
30699func (c *EventTagsDeleteCall) Header() http.Header {
30700	if c.header_ == nil {
30701		c.header_ = make(http.Header)
30702	}
30703	return c.header_
30704}
30705
30706func (c *EventTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
30707	reqHeaders := make(http.Header)
30708	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
30709	for k, v := range c.header_ {
30710		reqHeaders[k] = v
30711	}
30712	reqHeaders.Set("User-Agent", c.s.userAgent())
30713	var body io.Reader = nil
30714	c.urlParams_.Set("alt", alt)
30715	c.urlParams_.Set("prettyPrint", "false")
30716	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
30717	urls += "?" + c.urlParams_.Encode()
30718	req, err := http.NewRequest("DELETE", urls, body)
30719	if err != nil {
30720		return nil, err
30721	}
30722	req.Header = reqHeaders
30723	googleapi.Expand(req.URL, map[string]string{
30724		"profileId": strconv.FormatInt(c.profileId, 10),
30725		"id":        strconv.FormatInt(c.id, 10),
30726	})
30727	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30728}
30729
30730// Do executes the "dfareporting.eventTags.delete" call.
30731func (c *EventTagsDeleteCall) Do(opts ...googleapi.CallOption) error {
30732	gensupport.SetOptions(c.urlParams_, opts...)
30733	res, err := c.doRequest("json")
30734	if err != nil {
30735		return err
30736	}
30737	defer googleapi.CloseBody(res)
30738	if err := googleapi.CheckResponse(res); err != nil {
30739		return err
30740	}
30741	return nil
30742	// {
30743	//   "description": "Deletes an existing event tag.",
30744	//   "httpMethod": "DELETE",
30745	//   "id": "dfareporting.eventTags.delete",
30746	//   "parameterOrder": [
30747	//     "profileId",
30748	//     "id"
30749	//   ],
30750	//   "parameters": {
30751	//     "id": {
30752	//       "description": "Event tag ID.",
30753	//       "format": "int64",
30754	//       "location": "path",
30755	//       "required": true,
30756	//       "type": "string"
30757	//     },
30758	//     "profileId": {
30759	//       "description": "User profile ID associated with this request.",
30760	//       "format": "int64",
30761	//       "location": "path",
30762	//       "required": true,
30763	//       "type": "string"
30764	//     }
30765	//   },
30766	//   "path": "userprofiles/{profileId}/eventTags/{id}",
30767	//   "scopes": [
30768	//     "https://www.googleapis.com/auth/dfatrafficking"
30769	//   ]
30770	// }
30771
30772}
30773
30774// method id "dfareporting.eventTags.get":
30775
30776type EventTagsGetCall struct {
30777	s            *Service
30778	profileId    int64
30779	id           int64
30780	urlParams_   gensupport.URLParams
30781	ifNoneMatch_ string
30782	ctx_         context.Context
30783	header_      http.Header
30784}
30785
30786// Get: Gets one event tag by ID.
30787func (r *EventTagsService) Get(profileId int64, id int64) *EventTagsGetCall {
30788	c := &EventTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30789	c.profileId = profileId
30790	c.id = id
30791	return c
30792}
30793
30794// Fields allows partial responses to be retrieved. See
30795// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30796// for more information.
30797func (c *EventTagsGetCall) Fields(s ...googleapi.Field) *EventTagsGetCall {
30798	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30799	return c
30800}
30801
30802// IfNoneMatch sets the optional parameter which makes the operation
30803// fail if the object's ETag matches the given value. This is useful for
30804// getting updates only after the object has changed since the last
30805// request. Use googleapi.IsNotModified to check whether the response
30806// error from Do is the result of In-None-Match.
30807func (c *EventTagsGetCall) IfNoneMatch(entityTag string) *EventTagsGetCall {
30808	c.ifNoneMatch_ = entityTag
30809	return c
30810}
30811
30812// Context sets the context to be used in this call's Do method. Any
30813// pending HTTP request will be aborted if the provided context is
30814// canceled.
30815func (c *EventTagsGetCall) Context(ctx context.Context) *EventTagsGetCall {
30816	c.ctx_ = ctx
30817	return c
30818}
30819
30820// Header returns an http.Header that can be modified by the caller to
30821// add HTTP headers to the request.
30822func (c *EventTagsGetCall) Header() http.Header {
30823	if c.header_ == nil {
30824		c.header_ = make(http.Header)
30825	}
30826	return c.header_
30827}
30828
30829func (c *EventTagsGetCall) doRequest(alt string) (*http.Response, error) {
30830	reqHeaders := make(http.Header)
30831	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
30832	for k, v := range c.header_ {
30833		reqHeaders[k] = v
30834	}
30835	reqHeaders.Set("User-Agent", c.s.userAgent())
30836	if c.ifNoneMatch_ != "" {
30837		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30838	}
30839	var body io.Reader = nil
30840	c.urlParams_.Set("alt", alt)
30841	c.urlParams_.Set("prettyPrint", "false")
30842	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
30843	urls += "?" + c.urlParams_.Encode()
30844	req, err := http.NewRequest("GET", urls, body)
30845	if err != nil {
30846		return nil, err
30847	}
30848	req.Header = reqHeaders
30849	googleapi.Expand(req.URL, map[string]string{
30850		"profileId": strconv.FormatInt(c.profileId, 10),
30851		"id":        strconv.FormatInt(c.id, 10),
30852	})
30853	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30854}
30855
30856// Do executes the "dfareporting.eventTags.get" call.
30857// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
30858// code is an error. Response headers are in either
30859// *EventTag.ServerResponse.Header or (if a response was returned at
30860// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30861// to check whether the returned error was because
30862// http.StatusNotModified was returned.
30863func (c *EventTagsGetCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30864	gensupport.SetOptions(c.urlParams_, opts...)
30865	res, err := c.doRequest("json")
30866	if res != nil && res.StatusCode == http.StatusNotModified {
30867		if res.Body != nil {
30868			res.Body.Close()
30869		}
30870		return nil, &googleapi.Error{
30871			Code:   res.StatusCode,
30872			Header: res.Header,
30873		}
30874	}
30875	if err != nil {
30876		return nil, err
30877	}
30878	defer googleapi.CloseBody(res)
30879	if err := googleapi.CheckResponse(res); err != nil {
30880		return nil, err
30881	}
30882	ret := &EventTag{
30883		ServerResponse: googleapi.ServerResponse{
30884			Header:         res.Header,
30885			HTTPStatusCode: res.StatusCode,
30886		},
30887	}
30888	target := &ret
30889	if err := gensupport.DecodeResponse(target, res); err != nil {
30890		return nil, err
30891	}
30892	return ret, nil
30893	// {
30894	//   "description": "Gets one event tag by ID.",
30895	//   "httpMethod": "GET",
30896	//   "id": "dfareporting.eventTags.get",
30897	//   "parameterOrder": [
30898	//     "profileId",
30899	//     "id"
30900	//   ],
30901	//   "parameters": {
30902	//     "id": {
30903	//       "description": "Event tag ID.",
30904	//       "format": "int64",
30905	//       "location": "path",
30906	//       "required": true,
30907	//       "type": "string"
30908	//     },
30909	//     "profileId": {
30910	//       "description": "User profile ID associated with this request.",
30911	//       "format": "int64",
30912	//       "location": "path",
30913	//       "required": true,
30914	//       "type": "string"
30915	//     }
30916	//   },
30917	//   "path": "userprofiles/{profileId}/eventTags/{id}",
30918	//   "response": {
30919	//     "$ref": "EventTag"
30920	//   },
30921	//   "scopes": [
30922	//     "https://www.googleapis.com/auth/dfatrafficking"
30923	//   ]
30924	// }
30925
30926}
30927
30928// method id "dfareporting.eventTags.insert":
30929
30930type EventTagsInsertCall struct {
30931	s          *Service
30932	profileId  int64
30933	eventtag   *EventTag
30934	urlParams_ gensupport.URLParams
30935	ctx_       context.Context
30936	header_    http.Header
30937}
30938
30939// Insert: Inserts a new event tag.
30940func (r *EventTagsService) Insert(profileId int64, eventtag *EventTag) *EventTagsInsertCall {
30941	c := &EventTagsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30942	c.profileId = profileId
30943	c.eventtag = eventtag
30944	return c
30945}
30946
30947// Fields allows partial responses to be retrieved. See
30948// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30949// for more information.
30950func (c *EventTagsInsertCall) Fields(s ...googleapi.Field) *EventTagsInsertCall {
30951	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30952	return c
30953}
30954
30955// Context sets the context to be used in this call's Do method. Any
30956// pending HTTP request will be aborted if the provided context is
30957// canceled.
30958func (c *EventTagsInsertCall) Context(ctx context.Context) *EventTagsInsertCall {
30959	c.ctx_ = ctx
30960	return c
30961}
30962
30963// Header returns an http.Header that can be modified by the caller to
30964// add HTTP headers to the request.
30965func (c *EventTagsInsertCall) Header() http.Header {
30966	if c.header_ == nil {
30967		c.header_ = make(http.Header)
30968	}
30969	return c.header_
30970}
30971
30972func (c *EventTagsInsertCall) doRequest(alt string) (*http.Response, error) {
30973	reqHeaders := make(http.Header)
30974	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
30975	for k, v := range c.header_ {
30976		reqHeaders[k] = v
30977	}
30978	reqHeaders.Set("User-Agent", c.s.userAgent())
30979	var body io.Reader = nil
30980	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
30981	if err != nil {
30982		return nil, err
30983	}
30984	reqHeaders.Set("Content-Type", "application/json")
30985	c.urlParams_.Set("alt", alt)
30986	c.urlParams_.Set("prettyPrint", "false")
30987	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
30988	urls += "?" + c.urlParams_.Encode()
30989	req, err := http.NewRequest("POST", urls, body)
30990	if err != nil {
30991		return nil, err
30992	}
30993	req.Header = reqHeaders
30994	googleapi.Expand(req.URL, map[string]string{
30995		"profileId": strconv.FormatInt(c.profileId, 10),
30996	})
30997	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30998}
30999
31000// Do executes the "dfareporting.eventTags.insert" call.
31001// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
31002// code is an error. Response headers are in either
31003// *EventTag.ServerResponse.Header or (if a response was returned at
31004// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31005// to check whether the returned error was because
31006// http.StatusNotModified was returned.
31007func (c *EventTagsInsertCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31008	gensupport.SetOptions(c.urlParams_, opts...)
31009	res, err := c.doRequest("json")
31010	if res != nil && res.StatusCode == http.StatusNotModified {
31011		if res.Body != nil {
31012			res.Body.Close()
31013		}
31014		return nil, &googleapi.Error{
31015			Code:   res.StatusCode,
31016			Header: res.Header,
31017		}
31018	}
31019	if err != nil {
31020		return nil, err
31021	}
31022	defer googleapi.CloseBody(res)
31023	if err := googleapi.CheckResponse(res); err != nil {
31024		return nil, err
31025	}
31026	ret := &EventTag{
31027		ServerResponse: googleapi.ServerResponse{
31028			Header:         res.Header,
31029			HTTPStatusCode: res.StatusCode,
31030		},
31031	}
31032	target := &ret
31033	if err := gensupport.DecodeResponse(target, res); err != nil {
31034		return nil, err
31035	}
31036	return ret, nil
31037	// {
31038	//   "description": "Inserts a new event tag.",
31039	//   "httpMethod": "POST",
31040	//   "id": "dfareporting.eventTags.insert",
31041	//   "parameterOrder": [
31042	//     "profileId"
31043	//   ],
31044	//   "parameters": {
31045	//     "profileId": {
31046	//       "description": "User profile ID associated with this request.",
31047	//       "format": "int64",
31048	//       "location": "path",
31049	//       "required": true,
31050	//       "type": "string"
31051	//     }
31052	//   },
31053	//   "path": "userprofiles/{profileId}/eventTags",
31054	//   "request": {
31055	//     "$ref": "EventTag"
31056	//   },
31057	//   "response": {
31058	//     "$ref": "EventTag"
31059	//   },
31060	//   "scopes": [
31061	//     "https://www.googleapis.com/auth/dfatrafficking"
31062	//   ]
31063	// }
31064
31065}
31066
31067// method id "dfareporting.eventTags.list":
31068
31069type EventTagsListCall struct {
31070	s            *Service
31071	profileId    int64
31072	urlParams_   gensupport.URLParams
31073	ifNoneMatch_ string
31074	ctx_         context.Context
31075	header_      http.Header
31076}
31077
31078// List: Retrieves a list of event tags, possibly filtered.
31079func (r *EventTagsService) List(profileId int64) *EventTagsListCall {
31080	c := &EventTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31081	c.profileId = profileId
31082	return c
31083}
31084
31085// AdId sets the optional parameter "adId": Select only event tags that
31086// belong to this ad.
31087func (c *EventTagsListCall) AdId(adId int64) *EventTagsListCall {
31088	c.urlParams_.Set("adId", fmt.Sprint(adId))
31089	return c
31090}
31091
31092// AdvertiserId sets the optional parameter "advertiserId": Select only
31093// event tags that belong to this advertiser.
31094func (c *EventTagsListCall) AdvertiserId(advertiserId int64) *EventTagsListCall {
31095	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31096	return c
31097}
31098
31099// CampaignId sets the optional parameter "campaignId": Select only
31100// event tags that belong to this campaign.
31101func (c *EventTagsListCall) CampaignId(campaignId int64) *EventTagsListCall {
31102	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
31103	return c
31104}
31105
31106// DefinitionsOnly sets the optional parameter "definitionsOnly":
31107// Examine only the specified campaign or advertiser's event tags for
31108// matching selector criteria. When set to false, the parent advertiser
31109// and parent campaign of the specified ad or campaign is examined as
31110// well. In addition, when set to false, the status field is examined as
31111// well, along with the enabledByDefault field. This parameter can not
31112// be set to true when adId is specified as ads do not define their own
31113// even tags.
31114func (c *EventTagsListCall) DefinitionsOnly(definitionsOnly bool) *EventTagsListCall {
31115	c.urlParams_.Set("definitionsOnly", fmt.Sprint(definitionsOnly))
31116	return c
31117}
31118
31119// Enabled sets the optional parameter "enabled": Select only enabled
31120// event tags. What is considered enabled or disabled depends on the
31121// definitionsOnly parameter. When definitionsOnly is set to true, only
31122// the specified advertiser or campaign's event tags' enabledByDefault
31123// field is examined. When definitionsOnly is set to false, the
31124// specified ad or specified campaign's parent advertiser's or parent
31125// campaign's event tags' enabledByDefault and status fields are
31126// examined as well.
31127func (c *EventTagsListCall) Enabled(enabled bool) *EventTagsListCall {
31128	c.urlParams_.Set("enabled", fmt.Sprint(enabled))
31129	return c
31130}
31131
31132// EventTagTypes sets the optional parameter "eventTagTypes": Select
31133// only event tags with the specified event tag types. Event tag types
31134// can be used to specify whether to use a third-party pixel, a
31135// third-party JavaScript URL, or a third-party click-through URL for
31136// either impression or click tracking.
31137//
31138// Possible values:
31139//   "CLICK_THROUGH_EVENT_TAG"
31140//   "IMPRESSION_IMAGE_EVENT_TAG"
31141//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
31142func (c *EventTagsListCall) EventTagTypes(eventTagTypes ...string) *EventTagsListCall {
31143	c.urlParams_.SetMulti("eventTagTypes", append([]string{}, eventTagTypes...))
31144	return c
31145}
31146
31147// Ids sets the optional parameter "ids": Select only event tags with
31148// these IDs.
31149func (c *EventTagsListCall) Ids(ids ...int64) *EventTagsListCall {
31150	var ids_ []string
31151	for _, v := range ids {
31152		ids_ = append(ids_, fmt.Sprint(v))
31153	}
31154	c.urlParams_.SetMulti("ids", ids_)
31155	return c
31156}
31157
31158// SearchString sets the optional parameter "searchString": Allows
31159// searching for objects by name or ID. Wildcards (*) are allowed. For
31160// example, "eventtag*2015" will return objects with names like
31161// "eventtag June 2015", "eventtag April 2015", or simply "eventtag
31162// 2015". Most of the searches also add wildcards implicitly at the
31163// start and the end of the search string. For example, a search string
31164// of "eventtag" will match objects with name "my eventtag", "eventtag
31165// 2015", or simply "eventtag".
31166func (c *EventTagsListCall) SearchString(searchString string) *EventTagsListCall {
31167	c.urlParams_.Set("searchString", searchString)
31168	return c
31169}
31170
31171// SortField sets the optional parameter "sortField": Field by which to
31172// sort the list.
31173//
31174// Possible values:
31175//   "ID" (default)
31176//   "NAME"
31177func (c *EventTagsListCall) SortField(sortField string) *EventTagsListCall {
31178	c.urlParams_.Set("sortField", sortField)
31179	return c
31180}
31181
31182// SortOrder sets the optional parameter "sortOrder": Order of sorted
31183// results.
31184//
31185// Possible values:
31186//   "ASCENDING" (default)
31187//   "DESCENDING"
31188func (c *EventTagsListCall) SortOrder(sortOrder string) *EventTagsListCall {
31189	c.urlParams_.Set("sortOrder", sortOrder)
31190	return c
31191}
31192
31193// Fields allows partial responses to be retrieved. See
31194// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31195// for more information.
31196func (c *EventTagsListCall) Fields(s ...googleapi.Field) *EventTagsListCall {
31197	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31198	return c
31199}
31200
31201// IfNoneMatch sets the optional parameter which makes the operation
31202// fail if the object's ETag matches the given value. This is useful for
31203// getting updates only after the object has changed since the last
31204// request. Use googleapi.IsNotModified to check whether the response
31205// error from Do is the result of In-None-Match.
31206func (c *EventTagsListCall) IfNoneMatch(entityTag string) *EventTagsListCall {
31207	c.ifNoneMatch_ = entityTag
31208	return c
31209}
31210
31211// Context sets the context to be used in this call's Do method. Any
31212// pending HTTP request will be aborted if the provided context is
31213// canceled.
31214func (c *EventTagsListCall) Context(ctx context.Context) *EventTagsListCall {
31215	c.ctx_ = ctx
31216	return c
31217}
31218
31219// Header returns an http.Header that can be modified by the caller to
31220// add HTTP headers to the request.
31221func (c *EventTagsListCall) Header() http.Header {
31222	if c.header_ == nil {
31223		c.header_ = make(http.Header)
31224	}
31225	return c.header_
31226}
31227
31228func (c *EventTagsListCall) doRequest(alt string) (*http.Response, error) {
31229	reqHeaders := make(http.Header)
31230	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
31231	for k, v := range c.header_ {
31232		reqHeaders[k] = v
31233	}
31234	reqHeaders.Set("User-Agent", c.s.userAgent())
31235	if c.ifNoneMatch_ != "" {
31236		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31237	}
31238	var body io.Reader = nil
31239	c.urlParams_.Set("alt", alt)
31240	c.urlParams_.Set("prettyPrint", "false")
31241	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31242	urls += "?" + c.urlParams_.Encode()
31243	req, err := http.NewRequest("GET", urls, body)
31244	if err != nil {
31245		return nil, err
31246	}
31247	req.Header = reqHeaders
31248	googleapi.Expand(req.URL, map[string]string{
31249		"profileId": strconv.FormatInt(c.profileId, 10),
31250	})
31251	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31252}
31253
31254// Do executes the "dfareporting.eventTags.list" call.
31255// Exactly one of *EventTagsListResponse or error will be non-nil. Any
31256// non-2xx status code is an error. Response headers are in either
31257// *EventTagsListResponse.ServerResponse.Header or (if a response was
31258// returned at all) in error.(*googleapi.Error).Header. Use
31259// googleapi.IsNotModified to check whether the returned error was
31260// because http.StatusNotModified was returned.
31261func (c *EventTagsListCall) Do(opts ...googleapi.CallOption) (*EventTagsListResponse, error) {
31262	gensupport.SetOptions(c.urlParams_, opts...)
31263	res, err := c.doRequest("json")
31264	if res != nil && res.StatusCode == http.StatusNotModified {
31265		if res.Body != nil {
31266			res.Body.Close()
31267		}
31268		return nil, &googleapi.Error{
31269			Code:   res.StatusCode,
31270			Header: res.Header,
31271		}
31272	}
31273	if err != nil {
31274		return nil, err
31275	}
31276	defer googleapi.CloseBody(res)
31277	if err := googleapi.CheckResponse(res); err != nil {
31278		return nil, err
31279	}
31280	ret := &EventTagsListResponse{
31281		ServerResponse: googleapi.ServerResponse{
31282			Header:         res.Header,
31283			HTTPStatusCode: res.StatusCode,
31284		},
31285	}
31286	target := &ret
31287	if err := gensupport.DecodeResponse(target, res); err != nil {
31288		return nil, err
31289	}
31290	return ret, nil
31291	// {
31292	//   "description": "Retrieves a list of event tags, possibly filtered.",
31293	//   "httpMethod": "GET",
31294	//   "id": "dfareporting.eventTags.list",
31295	//   "parameterOrder": [
31296	//     "profileId"
31297	//   ],
31298	//   "parameters": {
31299	//     "adId": {
31300	//       "description": "Select only event tags that belong to this ad.",
31301	//       "format": "int64",
31302	//       "location": "query",
31303	//       "type": "string"
31304	//     },
31305	//     "advertiserId": {
31306	//       "description": "Select only event tags that belong to this advertiser.",
31307	//       "format": "int64",
31308	//       "location": "query",
31309	//       "type": "string"
31310	//     },
31311	//     "campaignId": {
31312	//       "description": "Select only event tags that belong to this campaign.",
31313	//       "format": "int64",
31314	//       "location": "query",
31315	//       "type": "string"
31316	//     },
31317	//     "definitionsOnly": {
31318	//       "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.",
31319	//       "location": "query",
31320	//       "type": "boolean"
31321	//     },
31322	//     "enabled": {
31323	//       "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.",
31324	//       "location": "query",
31325	//       "type": "boolean"
31326	//     },
31327	//     "eventTagTypes": {
31328	//       "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.",
31329	//       "enum": [
31330	//         "CLICK_THROUGH_EVENT_TAG",
31331	//         "IMPRESSION_IMAGE_EVENT_TAG",
31332	//         "IMPRESSION_JAVASCRIPT_EVENT_TAG"
31333	//       ],
31334	//       "enumDescriptions": [
31335	//         "",
31336	//         "",
31337	//         ""
31338	//       ],
31339	//       "location": "query",
31340	//       "repeated": true,
31341	//       "type": "string"
31342	//     },
31343	//     "ids": {
31344	//       "description": "Select only event tags with these IDs.",
31345	//       "format": "int64",
31346	//       "location": "query",
31347	//       "repeated": true,
31348	//       "type": "string"
31349	//     },
31350	//     "profileId": {
31351	//       "description": "User profile ID associated with this request.",
31352	//       "format": "int64",
31353	//       "location": "path",
31354	//       "required": true,
31355	//       "type": "string"
31356	//     },
31357	//     "searchString": {
31358	//       "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\".",
31359	//       "location": "query",
31360	//       "type": "string"
31361	//     },
31362	//     "sortField": {
31363	//       "default": "ID",
31364	//       "description": "Field by which to sort the list.",
31365	//       "enum": [
31366	//         "ID",
31367	//         "NAME"
31368	//       ],
31369	//       "enumDescriptions": [
31370	//         "",
31371	//         ""
31372	//       ],
31373	//       "location": "query",
31374	//       "type": "string"
31375	//     },
31376	//     "sortOrder": {
31377	//       "default": "ASCENDING",
31378	//       "description": "Order of sorted results.",
31379	//       "enum": [
31380	//         "ASCENDING",
31381	//         "DESCENDING"
31382	//       ],
31383	//       "enumDescriptions": [
31384	//         "",
31385	//         ""
31386	//       ],
31387	//       "location": "query",
31388	//       "type": "string"
31389	//     }
31390	//   },
31391	//   "path": "userprofiles/{profileId}/eventTags",
31392	//   "response": {
31393	//     "$ref": "EventTagsListResponse"
31394	//   },
31395	//   "scopes": [
31396	//     "https://www.googleapis.com/auth/dfatrafficking"
31397	//   ]
31398	// }
31399
31400}
31401
31402// method id "dfareporting.eventTags.patch":
31403
31404type EventTagsPatchCall struct {
31405	s          *Service
31406	profileId  int64
31407	eventtag   *EventTag
31408	urlParams_ gensupport.URLParams
31409	ctx_       context.Context
31410	header_    http.Header
31411}
31412
31413// Patch: Updates an existing event tag. This method supports patch
31414// semantics.
31415func (r *EventTagsService) Patch(profileId int64, id int64, eventtag *EventTag) *EventTagsPatchCall {
31416	c := &EventTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31417	c.profileId = profileId
31418	c.urlParams_.Set("id", fmt.Sprint(id))
31419	c.eventtag = eventtag
31420	return c
31421}
31422
31423// Fields allows partial responses to be retrieved. See
31424// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31425// for more information.
31426func (c *EventTagsPatchCall) Fields(s ...googleapi.Field) *EventTagsPatchCall {
31427	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31428	return c
31429}
31430
31431// Context sets the context to be used in this call's Do method. Any
31432// pending HTTP request will be aborted if the provided context is
31433// canceled.
31434func (c *EventTagsPatchCall) Context(ctx context.Context) *EventTagsPatchCall {
31435	c.ctx_ = ctx
31436	return c
31437}
31438
31439// Header returns an http.Header that can be modified by the caller to
31440// add HTTP headers to the request.
31441func (c *EventTagsPatchCall) Header() http.Header {
31442	if c.header_ == nil {
31443		c.header_ = make(http.Header)
31444	}
31445	return c.header_
31446}
31447
31448func (c *EventTagsPatchCall) doRequest(alt string) (*http.Response, error) {
31449	reqHeaders := make(http.Header)
31450	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
31451	for k, v := range c.header_ {
31452		reqHeaders[k] = v
31453	}
31454	reqHeaders.Set("User-Agent", c.s.userAgent())
31455	var body io.Reader = nil
31456	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
31457	if err != nil {
31458		return nil, err
31459	}
31460	reqHeaders.Set("Content-Type", "application/json")
31461	c.urlParams_.Set("alt", alt)
31462	c.urlParams_.Set("prettyPrint", "false")
31463	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31464	urls += "?" + c.urlParams_.Encode()
31465	req, err := http.NewRequest("PATCH", urls, body)
31466	if err != nil {
31467		return nil, err
31468	}
31469	req.Header = reqHeaders
31470	googleapi.Expand(req.URL, map[string]string{
31471		"profileId": strconv.FormatInt(c.profileId, 10),
31472	})
31473	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31474}
31475
31476// Do executes the "dfareporting.eventTags.patch" call.
31477// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
31478// code is an error. Response headers are in either
31479// *EventTag.ServerResponse.Header or (if a response was returned at
31480// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31481// to check whether the returned error was because
31482// http.StatusNotModified was returned.
31483func (c *EventTagsPatchCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31484	gensupport.SetOptions(c.urlParams_, opts...)
31485	res, err := c.doRequest("json")
31486	if res != nil && res.StatusCode == http.StatusNotModified {
31487		if res.Body != nil {
31488			res.Body.Close()
31489		}
31490		return nil, &googleapi.Error{
31491			Code:   res.StatusCode,
31492			Header: res.Header,
31493		}
31494	}
31495	if err != nil {
31496		return nil, err
31497	}
31498	defer googleapi.CloseBody(res)
31499	if err := googleapi.CheckResponse(res); err != nil {
31500		return nil, err
31501	}
31502	ret := &EventTag{
31503		ServerResponse: googleapi.ServerResponse{
31504			Header:         res.Header,
31505			HTTPStatusCode: res.StatusCode,
31506		},
31507	}
31508	target := &ret
31509	if err := gensupport.DecodeResponse(target, res); err != nil {
31510		return nil, err
31511	}
31512	return ret, nil
31513	// {
31514	//   "description": "Updates an existing event tag. This method supports patch semantics.",
31515	//   "httpMethod": "PATCH",
31516	//   "id": "dfareporting.eventTags.patch",
31517	//   "parameterOrder": [
31518	//     "profileId",
31519	//     "id"
31520	//   ],
31521	//   "parameters": {
31522	//     "id": {
31523	//       "description": "Event tag ID.",
31524	//       "format": "int64",
31525	//       "location": "query",
31526	//       "required": true,
31527	//       "type": "string"
31528	//     },
31529	//     "profileId": {
31530	//       "description": "User profile ID associated with this request.",
31531	//       "format": "int64",
31532	//       "location": "path",
31533	//       "required": true,
31534	//       "type": "string"
31535	//     }
31536	//   },
31537	//   "path": "userprofiles/{profileId}/eventTags",
31538	//   "request": {
31539	//     "$ref": "EventTag"
31540	//   },
31541	//   "response": {
31542	//     "$ref": "EventTag"
31543	//   },
31544	//   "scopes": [
31545	//     "https://www.googleapis.com/auth/dfatrafficking"
31546	//   ]
31547	// }
31548
31549}
31550
31551// method id "dfareporting.eventTags.update":
31552
31553type EventTagsUpdateCall struct {
31554	s          *Service
31555	profileId  int64
31556	eventtag   *EventTag
31557	urlParams_ gensupport.URLParams
31558	ctx_       context.Context
31559	header_    http.Header
31560}
31561
31562// Update: Updates an existing event tag.
31563func (r *EventTagsService) Update(profileId int64, eventtag *EventTag) *EventTagsUpdateCall {
31564	c := &EventTagsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31565	c.profileId = profileId
31566	c.eventtag = eventtag
31567	return c
31568}
31569
31570// Fields allows partial responses to be retrieved. See
31571// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31572// for more information.
31573func (c *EventTagsUpdateCall) Fields(s ...googleapi.Field) *EventTagsUpdateCall {
31574	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31575	return c
31576}
31577
31578// Context sets the context to be used in this call's Do method. Any
31579// pending HTTP request will be aborted if the provided context is
31580// canceled.
31581func (c *EventTagsUpdateCall) Context(ctx context.Context) *EventTagsUpdateCall {
31582	c.ctx_ = ctx
31583	return c
31584}
31585
31586// Header returns an http.Header that can be modified by the caller to
31587// add HTTP headers to the request.
31588func (c *EventTagsUpdateCall) Header() http.Header {
31589	if c.header_ == nil {
31590		c.header_ = make(http.Header)
31591	}
31592	return c.header_
31593}
31594
31595func (c *EventTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
31596	reqHeaders := make(http.Header)
31597	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
31598	for k, v := range c.header_ {
31599		reqHeaders[k] = v
31600	}
31601	reqHeaders.Set("User-Agent", c.s.userAgent())
31602	var body io.Reader = nil
31603	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
31604	if err != nil {
31605		return nil, err
31606	}
31607	reqHeaders.Set("Content-Type", "application/json")
31608	c.urlParams_.Set("alt", alt)
31609	c.urlParams_.Set("prettyPrint", "false")
31610	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31611	urls += "?" + c.urlParams_.Encode()
31612	req, err := http.NewRequest("PUT", urls, body)
31613	if err != nil {
31614		return nil, err
31615	}
31616	req.Header = reqHeaders
31617	googleapi.Expand(req.URL, map[string]string{
31618		"profileId": strconv.FormatInt(c.profileId, 10),
31619	})
31620	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31621}
31622
31623// Do executes the "dfareporting.eventTags.update" call.
31624// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
31625// code is an error. Response headers are in either
31626// *EventTag.ServerResponse.Header or (if a response was returned at
31627// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31628// to check whether the returned error was because
31629// http.StatusNotModified was returned.
31630func (c *EventTagsUpdateCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31631	gensupport.SetOptions(c.urlParams_, opts...)
31632	res, err := c.doRequest("json")
31633	if res != nil && res.StatusCode == http.StatusNotModified {
31634		if res.Body != nil {
31635			res.Body.Close()
31636		}
31637		return nil, &googleapi.Error{
31638			Code:   res.StatusCode,
31639			Header: res.Header,
31640		}
31641	}
31642	if err != nil {
31643		return nil, err
31644	}
31645	defer googleapi.CloseBody(res)
31646	if err := googleapi.CheckResponse(res); err != nil {
31647		return nil, err
31648	}
31649	ret := &EventTag{
31650		ServerResponse: googleapi.ServerResponse{
31651			Header:         res.Header,
31652			HTTPStatusCode: res.StatusCode,
31653		},
31654	}
31655	target := &ret
31656	if err := gensupport.DecodeResponse(target, res); err != nil {
31657		return nil, err
31658	}
31659	return ret, nil
31660	// {
31661	//   "description": "Updates an existing event tag.",
31662	//   "httpMethod": "PUT",
31663	//   "id": "dfareporting.eventTags.update",
31664	//   "parameterOrder": [
31665	//     "profileId"
31666	//   ],
31667	//   "parameters": {
31668	//     "profileId": {
31669	//       "description": "User profile ID associated with this request.",
31670	//       "format": "int64",
31671	//       "location": "path",
31672	//       "required": true,
31673	//       "type": "string"
31674	//     }
31675	//   },
31676	//   "path": "userprofiles/{profileId}/eventTags",
31677	//   "request": {
31678	//     "$ref": "EventTag"
31679	//   },
31680	//   "response": {
31681	//     "$ref": "EventTag"
31682	//   },
31683	//   "scopes": [
31684	//     "https://www.googleapis.com/auth/dfatrafficking"
31685	//   ]
31686	// }
31687
31688}
31689
31690// method id "dfareporting.files.get":
31691
31692type FilesGetCall struct {
31693	s            *Service
31694	reportId     int64
31695	fileId       int64
31696	urlParams_   gensupport.URLParams
31697	ifNoneMatch_ string
31698	ctx_         context.Context
31699	header_      http.Header
31700}
31701
31702// Get: Retrieves a report file by its report ID and file ID. This
31703// method supports media download.
31704func (r *FilesService) Get(reportId int64, fileId int64) *FilesGetCall {
31705	c := &FilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31706	c.reportId = reportId
31707	c.fileId = fileId
31708	return c
31709}
31710
31711// Fields allows partial responses to be retrieved. See
31712// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31713// for more information.
31714func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall {
31715	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31716	return c
31717}
31718
31719// IfNoneMatch sets the optional parameter which makes the operation
31720// fail if the object's ETag matches the given value. This is useful for
31721// getting updates only after the object has changed since the last
31722// request. Use googleapi.IsNotModified to check whether the response
31723// error from Do is the result of In-None-Match.
31724func (c *FilesGetCall) IfNoneMatch(entityTag string) *FilesGetCall {
31725	c.ifNoneMatch_ = entityTag
31726	return c
31727}
31728
31729// Context sets the context to be used in this call's Do and Download
31730// methods. Any pending HTTP request will be aborted if the provided
31731// context is canceled.
31732func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
31733	c.ctx_ = ctx
31734	return c
31735}
31736
31737// Header returns an http.Header that can be modified by the caller to
31738// add HTTP headers to the request.
31739func (c *FilesGetCall) Header() http.Header {
31740	if c.header_ == nil {
31741		c.header_ = make(http.Header)
31742	}
31743	return c.header_
31744}
31745
31746func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
31747	reqHeaders := make(http.Header)
31748	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
31749	for k, v := range c.header_ {
31750		reqHeaders[k] = v
31751	}
31752	reqHeaders.Set("User-Agent", c.s.userAgent())
31753	if c.ifNoneMatch_ != "" {
31754		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31755	}
31756	var body io.Reader = nil
31757	c.urlParams_.Set("alt", alt)
31758	c.urlParams_.Set("prettyPrint", "false")
31759	urls := googleapi.ResolveRelative(c.s.BasePath, "reports/{reportId}/files/{fileId}")
31760	urls += "?" + c.urlParams_.Encode()
31761	req, err := http.NewRequest("GET", urls, body)
31762	if err != nil {
31763		return nil, err
31764	}
31765	req.Header = reqHeaders
31766	googleapi.Expand(req.URL, map[string]string{
31767		"reportId": strconv.FormatInt(c.reportId, 10),
31768		"fileId":   strconv.FormatInt(c.fileId, 10),
31769	})
31770	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31771}
31772
31773// Download fetches the API endpoint's "media" value, instead of the normal
31774// API response value. If the returned error is nil, the Response is guaranteed to
31775// have a 2xx status code. Callers must close the Response.Body as usual.
31776func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
31777	gensupport.SetOptions(c.urlParams_, opts...)
31778	res, err := c.doRequest("media")
31779	if err != nil {
31780		return nil, err
31781	}
31782	if err := googleapi.CheckMediaResponse(res); err != nil {
31783		res.Body.Close()
31784		return nil, err
31785	}
31786	return res, nil
31787}
31788
31789// Do executes the "dfareporting.files.get" call.
31790// Exactly one of *File or error will be non-nil. Any non-2xx status
31791// code is an error. Response headers are in either
31792// *File.ServerResponse.Header or (if a response was returned at all) in
31793// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
31794// whether the returned error was because http.StatusNotModified was
31795// returned.
31796func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
31797	gensupport.SetOptions(c.urlParams_, opts...)
31798	res, err := c.doRequest("json")
31799	if res != nil && res.StatusCode == http.StatusNotModified {
31800		if res.Body != nil {
31801			res.Body.Close()
31802		}
31803		return nil, &googleapi.Error{
31804			Code:   res.StatusCode,
31805			Header: res.Header,
31806		}
31807	}
31808	if err != nil {
31809		return nil, err
31810	}
31811	defer googleapi.CloseBody(res)
31812	if err := googleapi.CheckResponse(res); err != nil {
31813		return nil, err
31814	}
31815	ret := &File{
31816		ServerResponse: googleapi.ServerResponse{
31817			Header:         res.Header,
31818			HTTPStatusCode: res.StatusCode,
31819		},
31820	}
31821	target := &ret
31822	if err := gensupport.DecodeResponse(target, res); err != nil {
31823		return nil, err
31824	}
31825	return ret, nil
31826	// {
31827	//   "description": "Retrieves a report file by its report ID and file ID. This method supports media download.",
31828	//   "httpMethod": "GET",
31829	//   "id": "dfareporting.files.get",
31830	//   "parameterOrder": [
31831	//     "reportId",
31832	//     "fileId"
31833	//   ],
31834	//   "parameters": {
31835	//     "fileId": {
31836	//       "description": "The ID of the report file.",
31837	//       "format": "int64",
31838	//       "location": "path",
31839	//       "required": true,
31840	//       "type": "string"
31841	//     },
31842	//     "reportId": {
31843	//       "description": "The ID of the report.",
31844	//       "format": "int64",
31845	//       "location": "path",
31846	//       "required": true,
31847	//       "type": "string"
31848	//     }
31849	//   },
31850	//   "path": "reports/{reportId}/files/{fileId}",
31851	//   "response": {
31852	//     "$ref": "File"
31853	//   },
31854	//   "scopes": [
31855	//     "https://www.googleapis.com/auth/dfareporting"
31856	//   ],
31857	//   "supportsMediaDownload": true
31858	// }
31859
31860}
31861
31862// method id "dfareporting.files.list":
31863
31864type FilesListCall struct {
31865	s            *Service
31866	profileId    int64
31867	urlParams_   gensupport.URLParams
31868	ifNoneMatch_ string
31869	ctx_         context.Context
31870	header_      http.Header
31871}
31872
31873// List: Lists files for a user profile.
31874func (r *FilesService) List(profileId int64) *FilesListCall {
31875	c := &FilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31876	c.profileId = profileId
31877	return c
31878}
31879
31880// MaxResults sets the optional parameter "maxResults": Maximum number
31881// of results to return.
31882func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall {
31883	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31884	return c
31885}
31886
31887// PageToken sets the optional parameter "pageToken": The value of the
31888// nextToken from the previous result page.
31889func (c *FilesListCall) PageToken(pageToken string) *FilesListCall {
31890	c.urlParams_.Set("pageToken", pageToken)
31891	return c
31892}
31893
31894// Scope sets the optional parameter "scope": The scope that defines
31895// which results are returned.
31896//
31897// Possible values:
31898//   "ALL" - All files in account.
31899//   "MINE" (default) - My files.
31900//   "SHARED_WITH_ME" - Files shared with me.
31901func (c *FilesListCall) Scope(scope string) *FilesListCall {
31902	c.urlParams_.Set("scope", scope)
31903	return c
31904}
31905
31906// SortField sets the optional parameter "sortField": The field by which
31907// to sort the list.
31908//
31909// Possible values:
31910//   "ID" - Sort by file ID.
31911//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
31912func (c *FilesListCall) SortField(sortField string) *FilesListCall {
31913	c.urlParams_.Set("sortField", sortField)
31914	return c
31915}
31916
31917// SortOrder sets the optional parameter "sortOrder": Order of sorted
31918// results.
31919//
31920// Possible values:
31921//   "ASCENDING" - Ascending order.
31922//   "DESCENDING" (default) - Descending order.
31923func (c *FilesListCall) SortOrder(sortOrder string) *FilesListCall {
31924	c.urlParams_.Set("sortOrder", sortOrder)
31925	return c
31926}
31927
31928// Fields allows partial responses to be retrieved. See
31929// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31930// for more information.
31931func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall {
31932	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31933	return c
31934}
31935
31936// IfNoneMatch sets the optional parameter which makes the operation
31937// fail if the object's ETag matches the given value. This is useful for
31938// getting updates only after the object has changed since the last
31939// request. Use googleapi.IsNotModified to check whether the response
31940// error from Do is the result of In-None-Match.
31941func (c *FilesListCall) IfNoneMatch(entityTag string) *FilesListCall {
31942	c.ifNoneMatch_ = entityTag
31943	return c
31944}
31945
31946// Context sets the context to be used in this call's Do method. Any
31947// pending HTTP request will be aborted if the provided context is
31948// canceled.
31949func (c *FilesListCall) Context(ctx context.Context) *FilesListCall {
31950	c.ctx_ = ctx
31951	return c
31952}
31953
31954// Header returns an http.Header that can be modified by the caller to
31955// add HTTP headers to the request.
31956func (c *FilesListCall) Header() http.Header {
31957	if c.header_ == nil {
31958		c.header_ = make(http.Header)
31959	}
31960	return c.header_
31961}
31962
31963func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
31964	reqHeaders := make(http.Header)
31965	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
31966	for k, v := range c.header_ {
31967		reqHeaders[k] = v
31968	}
31969	reqHeaders.Set("User-Agent", c.s.userAgent())
31970	if c.ifNoneMatch_ != "" {
31971		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31972	}
31973	var body io.Reader = nil
31974	c.urlParams_.Set("alt", alt)
31975	c.urlParams_.Set("prettyPrint", "false")
31976	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/files")
31977	urls += "?" + c.urlParams_.Encode()
31978	req, err := http.NewRequest("GET", urls, body)
31979	if err != nil {
31980		return nil, err
31981	}
31982	req.Header = reqHeaders
31983	googleapi.Expand(req.URL, map[string]string{
31984		"profileId": strconv.FormatInt(c.profileId, 10),
31985	})
31986	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31987}
31988
31989// Do executes the "dfareporting.files.list" call.
31990// Exactly one of *FileList or error will be non-nil. Any non-2xx status
31991// code is an error. Response headers are in either
31992// *FileList.ServerResponse.Header or (if a response was returned at
31993// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31994// to check whether the returned error was because
31995// http.StatusNotModified was returned.
31996func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
31997	gensupport.SetOptions(c.urlParams_, opts...)
31998	res, err := c.doRequest("json")
31999	if res != nil && res.StatusCode == http.StatusNotModified {
32000		if res.Body != nil {
32001			res.Body.Close()
32002		}
32003		return nil, &googleapi.Error{
32004			Code:   res.StatusCode,
32005			Header: res.Header,
32006		}
32007	}
32008	if err != nil {
32009		return nil, err
32010	}
32011	defer googleapi.CloseBody(res)
32012	if err := googleapi.CheckResponse(res); err != nil {
32013		return nil, err
32014	}
32015	ret := &FileList{
32016		ServerResponse: googleapi.ServerResponse{
32017			Header:         res.Header,
32018			HTTPStatusCode: res.StatusCode,
32019		},
32020	}
32021	target := &ret
32022	if err := gensupport.DecodeResponse(target, res); err != nil {
32023		return nil, err
32024	}
32025	return ret, nil
32026	// {
32027	//   "description": "Lists files for a user profile.",
32028	//   "httpMethod": "GET",
32029	//   "id": "dfareporting.files.list",
32030	//   "parameterOrder": [
32031	//     "profileId"
32032	//   ],
32033	//   "parameters": {
32034	//     "maxResults": {
32035	//       "default": "10",
32036	//       "description": "Maximum number of results to return.",
32037	//       "format": "int32",
32038	//       "location": "query",
32039	//       "maximum": "10",
32040	//       "minimum": "0",
32041	//       "type": "integer"
32042	//     },
32043	//     "pageToken": {
32044	//       "description": "The value of the nextToken from the previous result page.",
32045	//       "location": "query",
32046	//       "type": "string"
32047	//     },
32048	//     "profileId": {
32049	//       "description": "The DFA profile ID.",
32050	//       "format": "int64",
32051	//       "location": "path",
32052	//       "required": true,
32053	//       "type": "string"
32054	//     },
32055	//     "scope": {
32056	//       "default": "MINE",
32057	//       "description": "The scope that defines which results are returned.",
32058	//       "enum": [
32059	//         "ALL",
32060	//         "MINE",
32061	//         "SHARED_WITH_ME"
32062	//       ],
32063	//       "enumDescriptions": [
32064	//         "All files in account.",
32065	//         "My files.",
32066	//         "Files shared with me."
32067	//       ],
32068	//       "location": "query",
32069	//       "type": "string"
32070	//     },
32071	//     "sortField": {
32072	//       "default": "LAST_MODIFIED_TIME",
32073	//       "description": "The field by which to sort the list.",
32074	//       "enum": [
32075	//         "ID",
32076	//         "LAST_MODIFIED_TIME"
32077	//       ],
32078	//       "enumDescriptions": [
32079	//         "Sort by file ID.",
32080	//         "Sort by 'lastmodifiedAt' field."
32081	//       ],
32082	//       "location": "query",
32083	//       "type": "string"
32084	//     },
32085	//     "sortOrder": {
32086	//       "default": "DESCENDING",
32087	//       "description": "Order of sorted results.",
32088	//       "enum": [
32089	//         "ASCENDING",
32090	//         "DESCENDING"
32091	//       ],
32092	//       "enumDescriptions": [
32093	//         "Ascending order.",
32094	//         "Descending order."
32095	//       ],
32096	//       "location": "query",
32097	//       "type": "string"
32098	//     }
32099	//   },
32100	//   "path": "userprofiles/{profileId}/files",
32101	//   "response": {
32102	//     "$ref": "FileList"
32103	//   },
32104	//   "scopes": [
32105	//     "https://www.googleapis.com/auth/dfareporting"
32106	//   ]
32107	// }
32108
32109}
32110
32111// Pages invokes f for each page of results.
32112// A non-nil error returned from f will halt the iteration.
32113// The provided context supersedes any context provided to the Context method.
32114func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
32115	c.ctx_ = ctx
32116	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32117	for {
32118		x, err := c.Do()
32119		if err != nil {
32120			return err
32121		}
32122		if err := f(x); err != nil {
32123			return err
32124		}
32125		if x.NextPageToken == "" {
32126			return nil
32127		}
32128		c.PageToken(x.NextPageToken)
32129	}
32130}
32131
32132// method id "dfareporting.floodlightActivities.delete":
32133
32134type FloodlightActivitiesDeleteCall struct {
32135	s          *Service
32136	profileId  int64
32137	id         int64
32138	urlParams_ gensupport.URLParams
32139	ctx_       context.Context
32140	header_    http.Header
32141}
32142
32143// Delete: Deletes an existing floodlight activity.
32144func (r *FloodlightActivitiesService) Delete(profileId int64, id int64) *FloodlightActivitiesDeleteCall {
32145	c := &FloodlightActivitiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32146	c.profileId = profileId
32147	c.id = id
32148	return c
32149}
32150
32151// Fields allows partial responses to be retrieved. See
32152// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32153// for more information.
32154func (c *FloodlightActivitiesDeleteCall) Fields(s ...googleapi.Field) *FloodlightActivitiesDeleteCall {
32155	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32156	return c
32157}
32158
32159// Context sets the context to be used in this call's Do method. Any
32160// pending HTTP request will be aborted if the provided context is
32161// canceled.
32162func (c *FloodlightActivitiesDeleteCall) Context(ctx context.Context) *FloodlightActivitiesDeleteCall {
32163	c.ctx_ = ctx
32164	return c
32165}
32166
32167// Header returns an http.Header that can be modified by the caller to
32168// add HTTP headers to the request.
32169func (c *FloodlightActivitiesDeleteCall) Header() http.Header {
32170	if c.header_ == nil {
32171		c.header_ = make(http.Header)
32172	}
32173	return c.header_
32174}
32175
32176func (c *FloodlightActivitiesDeleteCall) doRequest(alt string) (*http.Response, error) {
32177	reqHeaders := make(http.Header)
32178	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
32179	for k, v := range c.header_ {
32180		reqHeaders[k] = v
32181	}
32182	reqHeaders.Set("User-Agent", c.s.userAgent())
32183	var body io.Reader = nil
32184	c.urlParams_.Set("alt", alt)
32185	c.urlParams_.Set("prettyPrint", "false")
32186	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
32187	urls += "?" + c.urlParams_.Encode()
32188	req, err := http.NewRequest("DELETE", urls, body)
32189	if err != nil {
32190		return nil, err
32191	}
32192	req.Header = reqHeaders
32193	googleapi.Expand(req.URL, map[string]string{
32194		"profileId": strconv.FormatInt(c.profileId, 10),
32195		"id":        strconv.FormatInt(c.id, 10),
32196	})
32197	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32198}
32199
32200// Do executes the "dfareporting.floodlightActivities.delete" call.
32201func (c *FloodlightActivitiesDeleteCall) Do(opts ...googleapi.CallOption) error {
32202	gensupport.SetOptions(c.urlParams_, opts...)
32203	res, err := c.doRequest("json")
32204	if err != nil {
32205		return err
32206	}
32207	defer googleapi.CloseBody(res)
32208	if err := googleapi.CheckResponse(res); err != nil {
32209		return err
32210	}
32211	return nil
32212	// {
32213	//   "description": "Deletes an existing floodlight activity.",
32214	//   "httpMethod": "DELETE",
32215	//   "id": "dfareporting.floodlightActivities.delete",
32216	//   "parameterOrder": [
32217	//     "profileId",
32218	//     "id"
32219	//   ],
32220	//   "parameters": {
32221	//     "id": {
32222	//       "description": "Floodlight activity ID.",
32223	//       "format": "int64",
32224	//       "location": "path",
32225	//       "required": true,
32226	//       "type": "string"
32227	//     },
32228	//     "profileId": {
32229	//       "description": "User profile ID associated with this request.",
32230	//       "format": "int64",
32231	//       "location": "path",
32232	//       "required": true,
32233	//       "type": "string"
32234	//     }
32235	//   },
32236	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
32237	//   "scopes": [
32238	//     "https://www.googleapis.com/auth/dfatrafficking"
32239	//   ]
32240	// }
32241
32242}
32243
32244// method id "dfareporting.floodlightActivities.generatetag":
32245
32246type FloodlightActivitiesGeneratetagCall struct {
32247	s          *Service
32248	profileId  int64
32249	urlParams_ gensupport.URLParams
32250	ctx_       context.Context
32251	header_    http.Header
32252}
32253
32254// Generatetag: Generates a tag for a floodlight activity.
32255func (r *FloodlightActivitiesService) Generatetag(profileId int64) *FloodlightActivitiesGeneratetagCall {
32256	c := &FloodlightActivitiesGeneratetagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32257	c.profileId = profileId
32258	return c
32259}
32260
32261// FloodlightActivityId sets the optional parameter
32262// "floodlightActivityId": Floodlight activity ID for which we want to
32263// generate a tag.
32264func (c *FloodlightActivitiesGeneratetagCall) FloodlightActivityId(floodlightActivityId int64) *FloodlightActivitiesGeneratetagCall {
32265	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
32266	return c
32267}
32268
32269// Fields allows partial responses to be retrieved. See
32270// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32271// for more information.
32272func (c *FloodlightActivitiesGeneratetagCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGeneratetagCall {
32273	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32274	return c
32275}
32276
32277// Context sets the context to be used in this call's Do method. Any
32278// pending HTTP request will be aborted if the provided context is
32279// canceled.
32280func (c *FloodlightActivitiesGeneratetagCall) Context(ctx context.Context) *FloodlightActivitiesGeneratetagCall {
32281	c.ctx_ = ctx
32282	return c
32283}
32284
32285// Header returns an http.Header that can be modified by the caller to
32286// add HTTP headers to the request.
32287func (c *FloodlightActivitiesGeneratetagCall) Header() http.Header {
32288	if c.header_ == nil {
32289		c.header_ = make(http.Header)
32290	}
32291	return c.header_
32292}
32293
32294func (c *FloodlightActivitiesGeneratetagCall) doRequest(alt string) (*http.Response, error) {
32295	reqHeaders := make(http.Header)
32296	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
32297	for k, v := range c.header_ {
32298		reqHeaders[k] = v
32299	}
32300	reqHeaders.Set("User-Agent", c.s.userAgent())
32301	var body io.Reader = nil
32302	c.urlParams_.Set("alt", alt)
32303	c.urlParams_.Set("prettyPrint", "false")
32304	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/generatetag")
32305	urls += "?" + c.urlParams_.Encode()
32306	req, err := http.NewRequest("POST", urls, body)
32307	if err != nil {
32308		return nil, err
32309	}
32310	req.Header = reqHeaders
32311	googleapi.Expand(req.URL, map[string]string{
32312		"profileId": strconv.FormatInt(c.profileId, 10),
32313	})
32314	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32315}
32316
32317// Do executes the "dfareporting.floodlightActivities.generatetag" call.
32318// Exactly one of *FloodlightActivitiesGenerateTagResponse or error will
32319// be non-nil. Any non-2xx status code is an error. Response headers are
32320// in either
32321// *FloodlightActivitiesGenerateTagResponse.ServerResponse.Header or (if
32322// a response was returned at all) in error.(*googleapi.Error).Header.
32323// Use googleapi.IsNotModified to check whether the returned error was
32324// because http.StatusNotModified was returned.
32325func (c *FloodlightActivitiesGeneratetagCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesGenerateTagResponse, error) {
32326	gensupport.SetOptions(c.urlParams_, opts...)
32327	res, err := c.doRequest("json")
32328	if res != nil && res.StatusCode == http.StatusNotModified {
32329		if res.Body != nil {
32330			res.Body.Close()
32331		}
32332		return nil, &googleapi.Error{
32333			Code:   res.StatusCode,
32334			Header: res.Header,
32335		}
32336	}
32337	if err != nil {
32338		return nil, err
32339	}
32340	defer googleapi.CloseBody(res)
32341	if err := googleapi.CheckResponse(res); err != nil {
32342		return nil, err
32343	}
32344	ret := &FloodlightActivitiesGenerateTagResponse{
32345		ServerResponse: googleapi.ServerResponse{
32346			Header:         res.Header,
32347			HTTPStatusCode: res.StatusCode,
32348		},
32349	}
32350	target := &ret
32351	if err := gensupport.DecodeResponse(target, res); err != nil {
32352		return nil, err
32353	}
32354	return ret, nil
32355	// {
32356	//   "description": "Generates a tag for a floodlight activity.",
32357	//   "httpMethod": "POST",
32358	//   "id": "dfareporting.floodlightActivities.generatetag",
32359	//   "parameterOrder": [
32360	//     "profileId"
32361	//   ],
32362	//   "parameters": {
32363	//     "floodlightActivityId": {
32364	//       "description": "Floodlight activity ID for which we want to generate a tag.",
32365	//       "format": "int64",
32366	//       "location": "query",
32367	//       "type": "string"
32368	//     },
32369	//     "profileId": {
32370	//       "description": "User profile ID associated with this request.",
32371	//       "format": "int64",
32372	//       "location": "path",
32373	//       "required": true,
32374	//       "type": "string"
32375	//     }
32376	//   },
32377	//   "path": "userprofiles/{profileId}/floodlightActivities/generatetag",
32378	//   "response": {
32379	//     "$ref": "FloodlightActivitiesGenerateTagResponse"
32380	//   },
32381	//   "scopes": [
32382	//     "https://www.googleapis.com/auth/dfatrafficking"
32383	//   ]
32384	// }
32385
32386}
32387
32388// method id "dfareporting.floodlightActivities.get":
32389
32390type FloodlightActivitiesGetCall struct {
32391	s            *Service
32392	profileId    int64
32393	id           int64
32394	urlParams_   gensupport.URLParams
32395	ifNoneMatch_ string
32396	ctx_         context.Context
32397	header_      http.Header
32398}
32399
32400// Get: Gets one floodlight activity by ID.
32401func (r *FloodlightActivitiesService) Get(profileId int64, id int64) *FloodlightActivitiesGetCall {
32402	c := &FloodlightActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32403	c.profileId = profileId
32404	c.id = id
32405	return c
32406}
32407
32408// Fields allows partial responses to be retrieved. See
32409// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32410// for more information.
32411func (c *FloodlightActivitiesGetCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGetCall {
32412	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32413	return c
32414}
32415
32416// IfNoneMatch sets the optional parameter which makes the operation
32417// fail if the object's ETag matches the given value. This is useful for
32418// getting updates only after the object has changed since the last
32419// request. Use googleapi.IsNotModified to check whether the response
32420// error from Do is the result of In-None-Match.
32421func (c *FloodlightActivitiesGetCall) IfNoneMatch(entityTag string) *FloodlightActivitiesGetCall {
32422	c.ifNoneMatch_ = entityTag
32423	return c
32424}
32425
32426// Context sets the context to be used in this call's Do method. Any
32427// pending HTTP request will be aborted if the provided context is
32428// canceled.
32429func (c *FloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightActivitiesGetCall {
32430	c.ctx_ = ctx
32431	return c
32432}
32433
32434// Header returns an http.Header that can be modified by the caller to
32435// add HTTP headers to the request.
32436func (c *FloodlightActivitiesGetCall) Header() http.Header {
32437	if c.header_ == nil {
32438		c.header_ = make(http.Header)
32439	}
32440	return c.header_
32441}
32442
32443func (c *FloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
32444	reqHeaders := make(http.Header)
32445	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
32446	for k, v := range c.header_ {
32447		reqHeaders[k] = v
32448	}
32449	reqHeaders.Set("User-Agent", c.s.userAgent())
32450	if c.ifNoneMatch_ != "" {
32451		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32452	}
32453	var body io.Reader = nil
32454	c.urlParams_.Set("alt", alt)
32455	c.urlParams_.Set("prettyPrint", "false")
32456	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
32457	urls += "?" + c.urlParams_.Encode()
32458	req, err := http.NewRequest("GET", urls, body)
32459	if err != nil {
32460		return nil, err
32461	}
32462	req.Header = reqHeaders
32463	googleapi.Expand(req.URL, map[string]string{
32464		"profileId": strconv.FormatInt(c.profileId, 10),
32465		"id":        strconv.FormatInt(c.id, 10),
32466	})
32467	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32468}
32469
32470// Do executes the "dfareporting.floodlightActivities.get" call.
32471// Exactly one of *FloodlightActivity or error will be non-nil. Any
32472// non-2xx status code is an error. Response headers are in either
32473// *FloodlightActivity.ServerResponse.Header or (if a response was
32474// returned at all) in error.(*googleapi.Error).Header. Use
32475// googleapi.IsNotModified to check whether the returned error was
32476// because http.StatusNotModified was returned.
32477func (c *FloodlightActivitiesGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32478	gensupport.SetOptions(c.urlParams_, opts...)
32479	res, err := c.doRequest("json")
32480	if res != nil && res.StatusCode == http.StatusNotModified {
32481		if res.Body != nil {
32482			res.Body.Close()
32483		}
32484		return nil, &googleapi.Error{
32485			Code:   res.StatusCode,
32486			Header: res.Header,
32487		}
32488	}
32489	if err != nil {
32490		return nil, err
32491	}
32492	defer googleapi.CloseBody(res)
32493	if err := googleapi.CheckResponse(res); err != nil {
32494		return nil, err
32495	}
32496	ret := &FloodlightActivity{
32497		ServerResponse: googleapi.ServerResponse{
32498			Header:         res.Header,
32499			HTTPStatusCode: res.StatusCode,
32500		},
32501	}
32502	target := &ret
32503	if err := gensupport.DecodeResponse(target, res); err != nil {
32504		return nil, err
32505	}
32506	return ret, nil
32507	// {
32508	//   "description": "Gets one floodlight activity by ID.",
32509	//   "httpMethod": "GET",
32510	//   "id": "dfareporting.floodlightActivities.get",
32511	//   "parameterOrder": [
32512	//     "profileId",
32513	//     "id"
32514	//   ],
32515	//   "parameters": {
32516	//     "id": {
32517	//       "description": "Floodlight activity ID.",
32518	//       "format": "int64",
32519	//       "location": "path",
32520	//       "required": true,
32521	//       "type": "string"
32522	//     },
32523	//     "profileId": {
32524	//       "description": "User profile ID associated with this request.",
32525	//       "format": "int64",
32526	//       "location": "path",
32527	//       "required": true,
32528	//       "type": "string"
32529	//     }
32530	//   },
32531	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
32532	//   "response": {
32533	//     "$ref": "FloodlightActivity"
32534	//   },
32535	//   "scopes": [
32536	//     "https://www.googleapis.com/auth/dfatrafficking"
32537	//   ]
32538	// }
32539
32540}
32541
32542// method id "dfareporting.floodlightActivities.insert":
32543
32544type FloodlightActivitiesInsertCall struct {
32545	s                  *Service
32546	profileId          int64
32547	floodlightactivity *FloodlightActivity
32548	urlParams_         gensupport.URLParams
32549	ctx_               context.Context
32550	header_            http.Header
32551}
32552
32553// Insert: Inserts a new floodlight activity.
32554func (r *FloodlightActivitiesService) Insert(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesInsertCall {
32555	c := &FloodlightActivitiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32556	c.profileId = profileId
32557	c.floodlightactivity = floodlightactivity
32558	return c
32559}
32560
32561// Fields allows partial responses to be retrieved. See
32562// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32563// for more information.
32564func (c *FloodlightActivitiesInsertCall) Fields(s ...googleapi.Field) *FloodlightActivitiesInsertCall {
32565	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32566	return c
32567}
32568
32569// Context sets the context to be used in this call's Do method. Any
32570// pending HTTP request will be aborted if the provided context is
32571// canceled.
32572func (c *FloodlightActivitiesInsertCall) Context(ctx context.Context) *FloodlightActivitiesInsertCall {
32573	c.ctx_ = ctx
32574	return c
32575}
32576
32577// Header returns an http.Header that can be modified by the caller to
32578// add HTTP headers to the request.
32579func (c *FloodlightActivitiesInsertCall) Header() http.Header {
32580	if c.header_ == nil {
32581		c.header_ = make(http.Header)
32582	}
32583	return c.header_
32584}
32585
32586func (c *FloodlightActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
32587	reqHeaders := make(http.Header)
32588	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
32589	for k, v := range c.header_ {
32590		reqHeaders[k] = v
32591	}
32592	reqHeaders.Set("User-Agent", c.s.userAgent())
32593	var body io.Reader = nil
32594	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
32595	if err != nil {
32596		return nil, err
32597	}
32598	reqHeaders.Set("Content-Type", "application/json")
32599	c.urlParams_.Set("alt", alt)
32600	c.urlParams_.Set("prettyPrint", "false")
32601	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32602	urls += "?" + c.urlParams_.Encode()
32603	req, err := http.NewRequest("POST", urls, body)
32604	if err != nil {
32605		return nil, err
32606	}
32607	req.Header = reqHeaders
32608	googleapi.Expand(req.URL, map[string]string{
32609		"profileId": strconv.FormatInt(c.profileId, 10),
32610	})
32611	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32612}
32613
32614// Do executes the "dfareporting.floodlightActivities.insert" call.
32615// Exactly one of *FloodlightActivity or error will be non-nil. Any
32616// non-2xx status code is an error. Response headers are in either
32617// *FloodlightActivity.ServerResponse.Header or (if a response was
32618// returned at all) in error.(*googleapi.Error).Header. Use
32619// googleapi.IsNotModified to check whether the returned error was
32620// because http.StatusNotModified was returned.
32621func (c *FloodlightActivitiesInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32622	gensupport.SetOptions(c.urlParams_, opts...)
32623	res, err := c.doRequest("json")
32624	if res != nil && res.StatusCode == http.StatusNotModified {
32625		if res.Body != nil {
32626			res.Body.Close()
32627		}
32628		return nil, &googleapi.Error{
32629			Code:   res.StatusCode,
32630			Header: res.Header,
32631		}
32632	}
32633	if err != nil {
32634		return nil, err
32635	}
32636	defer googleapi.CloseBody(res)
32637	if err := googleapi.CheckResponse(res); err != nil {
32638		return nil, err
32639	}
32640	ret := &FloodlightActivity{
32641		ServerResponse: googleapi.ServerResponse{
32642			Header:         res.Header,
32643			HTTPStatusCode: res.StatusCode,
32644		},
32645	}
32646	target := &ret
32647	if err := gensupport.DecodeResponse(target, res); err != nil {
32648		return nil, err
32649	}
32650	return ret, nil
32651	// {
32652	//   "description": "Inserts a new floodlight activity.",
32653	//   "httpMethod": "POST",
32654	//   "id": "dfareporting.floodlightActivities.insert",
32655	//   "parameterOrder": [
32656	//     "profileId"
32657	//   ],
32658	//   "parameters": {
32659	//     "profileId": {
32660	//       "description": "User profile ID associated with this request.",
32661	//       "format": "int64",
32662	//       "location": "path",
32663	//       "required": true,
32664	//       "type": "string"
32665	//     }
32666	//   },
32667	//   "path": "userprofiles/{profileId}/floodlightActivities",
32668	//   "request": {
32669	//     "$ref": "FloodlightActivity"
32670	//   },
32671	//   "response": {
32672	//     "$ref": "FloodlightActivity"
32673	//   },
32674	//   "scopes": [
32675	//     "https://www.googleapis.com/auth/dfatrafficking"
32676	//   ]
32677	// }
32678
32679}
32680
32681// method id "dfareporting.floodlightActivities.list":
32682
32683type FloodlightActivitiesListCall struct {
32684	s            *Service
32685	profileId    int64
32686	urlParams_   gensupport.URLParams
32687	ifNoneMatch_ string
32688	ctx_         context.Context
32689	header_      http.Header
32690}
32691
32692// List: Retrieves a list of floodlight activities, possibly filtered.
32693// This method supports paging.
32694func (r *FloodlightActivitiesService) List(profileId int64) *FloodlightActivitiesListCall {
32695	c := &FloodlightActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32696	c.profileId = profileId
32697	return c
32698}
32699
32700// AdvertiserId sets the optional parameter "advertiserId": Select only
32701// floodlight activities for the specified advertiser ID. Must specify
32702// either ids, advertiserId, or floodlightConfigurationId for a
32703// non-empty result.
32704func (c *FloodlightActivitiesListCall) AdvertiserId(advertiserId int64) *FloodlightActivitiesListCall {
32705	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32706	return c
32707}
32708
32709// FloodlightActivityGroupIds sets the optional parameter
32710// "floodlightActivityGroupIds": Select only floodlight activities with
32711// the specified floodlight activity group IDs.
32712func (c *FloodlightActivitiesListCall) FloodlightActivityGroupIds(floodlightActivityGroupIds ...int64) *FloodlightActivitiesListCall {
32713	var floodlightActivityGroupIds_ []string
32714	for _, v := range floodlightActivityGroupIds {
32715		floodlightActivityGroupIds_ = append(floodlightActivityGroupIds_, fmt.Sprint(v))
32716	}
32717	c.urlParams_.SetMulti("floodlightActivityGroupIds", floodlightActivityGroupIds_)
32718	return c
32719}
32720
32721// FloodlightActivityGroupName sets the optional parameter
32722// "floodlightActivityGroupName": Select only floodlight activities with
32723// the specified floodlight activity group name.
32724func (c *FloodlightActivitiesListCall) FloodlightActivityGroupName(floodlightActivityGroupName string) *FloodlightActivitiesListCall {
32725	c.urlParams_.Set("floodlightActivityGroupName", floodlightActivityGroupName)
32726	return c
32727}
32728
32729// FloodlightActivityGroupTagString sets the optional parameter
32730// "floodlightActivityGroupTagString": Select only floodlight activities
32731// with the specified floodlight activity group tag string.
32732func (c *FloodlightActivitiesListCall) FloodlightActivityGroupTagString(floodlightActivityGroupTagString string) *FloodlightActivitiesListCall {
32733	c.urlParams_.Set("floodlightActivityGroupTagString", floodlightActivityGroupTagString)
32734	return c
32735}
32736
32737// FloodlightActivityGroupType sets the optional parameter
32738// "floodlightActivityGroupType": Select only floodlight activities with
32739// the specified floodlight activity group type.
32740//
32741// Possible values:
32742//   "COUNTER"
32743//   "SALE"
32744func (c *FloodlightActivitiesListCall) FloodlightActivityGroupType(floodlightActivityGroupType string) *FloodlightActivitiesListCall {
32745	c.urlParams_.Set("floodlightActivityGroupType", floodlightActivityGroupType)
32746	return c
32747}
32748
32749// FloodlightConfigurationId sets the optional parameter
32750// "floodlightConfigurationId": Select only floodlight activities for
32751// the specified floodlight configuration ID. Must specify either ids,
32752// advertiserId, or floodlightConfigurationId for a non-empty result.
32753func (c *FloodlightActivitiesListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivitiesListCall {
32754	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
32755	return c
32756}
32757
32758// Ids sets the optional parameter "ids": Select only floodlight
32759// activities with the specified IDs. Must specify either ids,
32760// advertiserId, or floodlightConfigurationId for a non-empty result.
32761func (c *FloodlightActivitiesListCall) Ids(ids ...int64) *FloodlightActivitiesListCall {
32762	var ids_ []string
32763	for _, v := range ids {
32764		ids_ = append(ids_, fmt.Sprint(v))
32765	}
32766	c.urlParams_.SetMulti("ids", ids_)
32767	return c
32768}
32769
32770// MaxResults sets the optional parameter "maxResults": Maximum number
32771// of results to return.
32772func (c *FloodlightActivitiesListCall) MaxResults(maxResults int64) *FloodlightActivitiesListCall {
32773	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32774	return c
32775}
32776
32777// PageToken sets the optional parameter "pageToken": Value of the
32778// nextPageToken from the previous result page.
32779func (c *FloodlightActivitiesListCall) PageToken(pageToken string) *FloodlightActivitiesListCall {
32780	c.urlParams_.Set("pageToken", pageToken)
32781	return c
32782}
32783
32784// SearchString sets the optional parameter "searchString": Allows
32785// searching for objects by name or ID. Wildcards (*) are allowed. For
32786// example, "floodlightactivity*2015" will return objects with names
32787// like "floodlightactivity June 2015", "floodlightactivity April 2015",
32788// or simply "floodlightactivity 2015". Most of the searches also add
32789// wildcards implicitly at the start and the end of the search string.
32790// For example, a search string of "floodlightactivity" will match
32791// objects with name "my floodlightactivity activity",
32792// "floodlightactivity 2015", or simply "floodlightactivity".
32793func (c *FloodlightActivitiesListCall) SearchString(searchString string) *FloodlightActivitiesListCall {
32794	c.urlParams_.Set("searchString", searchString)
32795	return c
32796}
32797
32798// SortField sets the optional parameter "sortField": Field by which to
32799// sort the list.
32800//
32801// Possible values:
32802//   "ID" (default)
32803//   "NAME"
32804func (c *FloodlightActivitiesListCall) SortField(sortField string) *FloodlightActivitiesListCall {
32805	c.urlParams_.Set("sortField", sortField)
32806	return c
32807}
32808
32809// SortOrder sets the optional parameter "sortOrder": Order of sorted
32810// results.
32811//
32812// Possible values:
32813//   "ASCENDING" (default)
32814//   "DESCENDING"
32815func (c *FloodlightActivitiesListCall) SortOrder(sortOrder string) *FloodlightActivitiesListCall {
32816	c.urlParams_.Set("sortOrder", sortOrder)
32817	return c
32818}
32819
32820// TagString sets the optional parameter "tagString": Select only
32821// floodlight activities with the specified tag string.
32822func (c *FloodlightActivitiesListCall) TagString(tagString string) *FloodlightActivitiesListCall {
32823	c.urlParams_.Set("tagString", tagString)
32824	return c
32825}
32826
32827// Fields allows partial responses to be retrieved. See
32828// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32829// for more information.
32830func (c *FloodlightActivitiesListCall) Fields(s ...googleapi.Field) *FloodlightActivitiesListCall {
32831	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32832	return c
32833}
32834
32835// IfNoneMatch sets the optional parameter which makes the operation
32836// fail if the object's ETag matches the given value. This is useful for
32837// getting updates only after the object has changed since the last
32838// request. Use googleapi.IsNotModified to check whether the response
32839// error from Do is the result of In-None-Match.
32840func (c *FloodlightActivitiesListCall) IfNoneMatch(entityTag string) *FloodlightActivitiesListCall {
32841	c.ifNoneMatch_ = entityTag
32842	return c
32843}
32844
32845// Context sets the context to be used in this call's Do method. Any
32846// pending HTTP request will be aborted if the provided context is
32847// canceled.
32848func (c *FloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightActivitiesListCall {
32849	c.ctx_ = ctx
32850	return c
32851}
32852
32853// Header returns an http.Header that can be modified by the caller to
32854// add HTTP headers to the request.
32855func (c *FloodlightActivitiesListCall) Header() http.Header {
32856	if c.header_ == nil {
32857		c.header_ = make(http.Header)
32858	}
32859	return c.header_
32860}
32861
32862func (c *FloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
32863	reqHeaders := make(http.Header)
32864	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
32865	for k, v := range c.header_ {
32866		reqHeaders[k] = v
32867	}
32868	reqHeaders.Set("User-Agent", c.s.userAgent())
32869	if c.ifNoneMatch_ != "" {
32870		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32871	}
32872	var body io.Reader = nil
32873	c.urlParams_.Set("alt", alt)
32874	c.urlParams_.Set("prettyPrint", "false")
32875	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32876	urls += "?" + c.urlParams_.Encode()
32877	req, err := http.NewRequest("GET", urls, body)
32878	if err != nil {
32879		return nil, err
32880	}
32881	req.Header = reqHeaders
32882	googleapi.Expand(req.URL, map[string]string{
32883		"profileId": strconv.FormatInt(c.profileId, 10),
32884	})
32885	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32886}
32887
32888// Do executes the "dfareporting.floodlightActivities.list" call.
32889// Exactly one of *FloodlightActivitiesListResponse or error will be
32890// non-nil. Any non-2xx status code is an error. Response headers are in
32891// either *FloodlightActivitiesListResponse.ServerResponse.Header or (if
32892// a response was returned at all) in error.(*googleapi.Error).Header.
32893// Use googleapi.IsNotModified to check whether the returned error was
32894// because http.StatusNotModified was returned.
32895func (c *FloodlightActivitiesListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesListResponse, error) {
32896	gensupport.SetOptions(c.urlParams_, opts...)
32897	res, err := c.doRequest("json")
32898	if res != nil && res.StatusCode == http.StatusNotModified {
32899		if res.Body != nil {
32900			res.Body.Close()
32901		}
32902		return nil, &googleapi.Error{
32903			Code:   res.StatusCode,
32904			Header: res.Header,
32905		}
32906	}
32907	if err != nil {
32908		return nil, err
32909	}
32910	defer googleapi.CloseBody(res)
32911	if err := googleapi.CheckResponse(res); err != nil {
32912		return nil, err
32913	}
32914	ret := &FloodlightActivitiesListResponse{
32915		ServerResponse: googleapi.ServerResponse{
32916			Header:         res.Header,
32917			HTTPStatusCode: res.StatusCode,
32918		},
32919	}
32920	target := &ret
32921	if err := gensupport.DecodeResponse(target, res); err != nil {
32922		return nil, err
32923	}
32924	return ret, nil
32925	// {
32926	//   "description": "Retrieves a list of floodlight activities, possibly filtered. This method supports paging.",
32927	//   "httpMethod": "GET",
32928	//   "id": "dfareporting.floodlightActivities.list",
32929	//   "parameterOrder": [
32930	//     "profileId"
32931	//   ],
32932	//   "parameters": {
32933	//     "advertiserId": {
32934	//       "description": "Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32935	//       "format": "int64",
32936	//       "location": "query",
32937	//       "type": "string"
32938	//     },
32939	//     "floodlightActivityGroupIds": {
32940	//       "description": "Select only floodlight activities with the specified floodlight activity group IDs.",
32941	//       "format": "int64",
32942	//       "location": "query",
32943	//       "repeated": true,
32944	//       "type": "string"
32945	//     },
32946	//     "floodlightActivityGroupName": {
32947	//       "description": "Select only floodlight activities with the specified floodlight activity group name.",
32948	//       "location": "query",
32949	//       "type": "string"
32950	//     },
32951	//     "floodlightActivityGroupTagString": {
32952	//       "description": "Select only floodlight activities with the specified floodlight activity group tag string.",
32953	//       "location": "query",
32954	//       "type": "string"
32955	//     },
32956	//     "floodlightActivityGroupType": {
32957	//       "description": "Select only floodlight activities with the specified floodlight activity group type.",
32958	//       "enum": [
32959	//         "COUNTER",
32960	//         "SALE"
32961	//       ],
32962	//       "enumDescriptions": [
32963	//         "",
32964	//         ""
32965	//       ],
32966	//       "location": "query",
32967	//       "type": "string"
32968	//     },
32969	//     "floodlightConfigurationId": {
32970	//       "description": "Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32971	//       "format": "int64",
32972	//       "location": "query",
32973	//       "type": "string"
32974	//     },
32975	//     "ids": {
32976	//       "description": "Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32977	//       "format": "int64",
32978	//       "location": "query",
32979	//       "repeated": true,
32980	//       "type": "string"
32981	//     },
32982	//     "maxResults": {
32983	//       "default": "1000",
32984	//       "description": "Maximum number of results to return.",
32985	//       "format": "int32",
32986	//       "location": "query",
32987	//       "maximum": "1000",
32988	//       "minimum": "0",
32989	//       "type": "integer"
32990	//     },
32991	//     "pageToken": {
32992	//       "description": "Value of the nextPageToken from the previous result page.",
32993	//       "location": "query",
32994	//       "type": "string"
32995	//     },
32996	//     "profileId": {
32997	//       "description": "User profile ID associated with this request.",
32998	//       "format": "int64",
32999	//       "location": "path",
33000	//       "required": true,
33001	//       "type": "string"
33002	//     },
33003	//     "searchString": {
33004	//       "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\".",
33005	//       "location": "query",
33006	//       "type": "string"
33007	//     },
33008	//     "sortField": {
33009	//       "default": "ID",
33010	//       "description": "Field by which to sort the list.",
33011	//       "enum": [
33012	//         "ID",
33013	//         "NAME"
33014	//       ],
33015	//       "enumDescriptions": [
33016	//         "",
33017	//         ""
33018	//       ],
33019	//       "location": "query",
33020	//       "type": "string"
33021	//     },
33022	//     "sortOrder": {
33023	//       "default": "ASCENDING",
33024	//       "description": "Order of sorted results.",
33025	//       "enum": [
33026	//         "ASCENDING",
33027	//         "DESCENDING"
33028	//       ],
33029	//       "enumDescriptions": [
33030	//         "",
33031	//         ""
33032	//       ],
33033	//       "location": "query",
33034	//       "type": "string"
33035	//     },
33036	//     "tagString": {
33037	//       "description": "Select only floodlight activities with the specified tag string.",
33038	//       "location": "query",
33039	//       "type": "string"
33040	//     }
33041	//   },
33042	//   "path": "userprofiles/{profileId}/floodlightActivities",
33043	//   "response": {
33044	//     "$ref": "FloodlightActivitiesListResponse"
33045	//   },
33046	//   "scopes": [
33047	//     "https://www.googleapis.com/auth/dfatrafficking"
33048	//   ]
33049	// }
33050
33051}
33052
33053// Pages invokes f for each page of results.
33054// A non-nil error returned from f will halt the iteration.
33055// The provided context supersedes any context provided to the Context method.
33056func (c *FloodlightActivitiesListCall) Pages(ctx context.Context, f func(*FloodlightActivitiesListResponse) error) error {
33057	c.ctx_ = ctx
33058	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
33059	for {
33060		x, err := c.Do()
33061		if err != nil {
33062			return err
33063		}
33064		if err := f(x); err != nil {
33065			return err
33066		}
33067		if x.NextPageToken == "" {
33068			return nil
33069		}
33070		c.PageToken(x.NextPageToken)
33071	}
33072}
33073
33074// method id "dfareporting.floodlightActivities.patch":
33075
33076type FloodlightActivitiesPatchCall struct {
33077	s                  *Service
33078	profileId          int64
33079	floodlightactivity *FloodlightActivity
33080	urlParams_         gensupport.URLParams
33081	ctx_               context.Context
33082	header_            http.Header
33083}
33084
33085// Patch: Updates an existing floodlight activity. This method supports
33086// patch semantics.
33087func (r *FloodlightActivitiesService) Patch(profileId int64, id int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesPatchCall {
33088	c := &FloodlightActivitiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33089	c.profileId = profileId
33090	c.urlParams_.Set("id", fmt.Sprint(id))
33091	c.floodlightactivity = floodlightactivity
33092	return c
33093}
33094
33095// Fields allows partial responses to be retrieved. See
33096// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33097// for more information.
33098func (c *FloodlightActivitiesPatchCall) Fields(s ...googleapi.Field) *FloodlightActivitiesPatchCall {
33099	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33100	return c
33101}
33102
33103// Context sets the context to be used in this call's Do method. Any
33104// pending HTTP request will be aborted if the provided context is
33105// canceled.
33106func (c *FloodlightActivitiesPatchCall) Context(ctx context.Context) *FloodlightActivitiesPatchCall {
33107	c.ctx_ = ctx
33108	return c
33109}
33110
33111// Header returns an http.Header that can be modified by the caller to
33112// add HTTP headers to the request.
33113func (c *FloodlightActivitiesPatchCall) Header() http.Header {
33114	if c.header_ == nil {
33115		c.header_ = make(http.Header)
33116	}
33117	return c.header_
33118}
33119
33120func (c *FloodlightActivitiesPatchCall) doRequest(alt string) (*http.Response, error) {
33121	reqHeaders := make(http.Header)
33122	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
33123	for k, v := range c.header_ {
33124		reqHeaders[k] = v
33125	}
33126	reqHeaders.Set("User-Agent", c.s.userAgent())
33127	var body io.Reader = nil
33128	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
33129	if err != nil {
33130		return nil, err
33131	}
33132	reqHeaders.Set("Content-Type", "application/json")
33133	c.urlParams_.Set("alt", alt)
33134	c.urlParams_.Set("prettyPrint", "false")
33135	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
33136	urls += "?" + c.urlParams_.Encode()
33137	req, err := http.NewRequest("PATCH", urls, body)
33138	if err != nil {
33139		return nil, err
33140	}
33141	req.Header = reqHeaders
33142	googleapi.Expand(req.URL, map[string]string{
33143		"profileId": strconv.FormatInt(c.profileId, 10),
33144	})
33145	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33146}
33147
33148// Do executes the "dfareporting.floodlightActivities.patch" call.
33149// Exactly one of *FloodlightActivity or error will be non-nil. Any
33150// non-2xx status code is an error. Response headers are in either
33151// *FloodlightActivity.ServerResponse.Header or (if a response was
33152// returned at all) in error.(*googleapi.Error).Header. Use
33153// googleapi.IsNotModified to check whether the returned error was
33154// because http.StatusNotModified was returned.
33155func (c *FloodlightActivitiesPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
33156	gensupport.SetOptions(c.urlParams_, opts...)
33157	res, err := c.doRequest("json")
33158	if res != nil && res.StatusCode == http.StatusNotModified {
33159		if res.Body != nil {
33160			res.Body.Close()
33161		}
33162		return nil, &googleapi.Error{
33163			Code:   res.StatusCode,
33164			Header: res.Header,
33165		}
33166	}
33167	if err != nil {
33168		return nil, err
33169	}
33170	defer googleapi.CloseBody(res)
33171	if err := googleapi.CheckResponse(res); err != nil {
33172		return nil, err
33173	}
33174	ret := &FloodlightActivity{
33175		ServerResponse: googleapi.ServerResponse{
33176			Header:         res.Header,
33177			HTTPStatusCode: res.StatusCode,
33178		},
33179	}
33180	target := &ret
33181	if err := gensupport.DecodeResponse(target, res); err != nil {
33182		return nil, err
33183	}
33184	return ret, nil
33185	// {
33186	//   "description": "Updates an existing floodlight activity. This method supports patch semantics.",
33187	//   "httpMethod": "PATCH",
33188	//   "id": "dfareporting.floodlightActivities.patch",
33189	//   "parameterOrder": [
33190	//     "profileId",
33191	//     "id"
33192	//   ],
33193	//   "parameters": {
33194	//     "id": {
33195	//       "description": "Floodlight activity ID.",
33196	//       "format": "int64",
33197	//       "location": "query",
33198	//       "required": true,
33199	//       "type": "string"
33200	//     },
33201	//     "profileId": {
33202	//       "description": "User profile ID associated with this request.",
33203	//       "format": "int64",
33204	//       "location": "path",
33205	//       "required": true,
33206	//       "type": "string"
33207	//     }
33208	//   },
33209	//   "path": "userprofiles/{profileId}/floodlightActivities",
33210	//   "request": {
33211	//     "$ref": "FloodlightActivity"
33212	//   },
33213	//   "response": {
33214	//     "$ref": "FloodlightActivity"
33215	//   },
33216	//   "scopes": [
33217	//     "https://www.googleapis.com/auth/dfatrafficking"
33218	//   ]
33219	// }
33220
33221}
33222
33223// method id "dfareporting.floodlightActivities.update":
33224
33225type FloodlightActivitiesUpdateCall struct {
33226	s                  *Service
33227	profileId          int64
33228	floodlightactivity *FloodlightActivity
33229	urlParams_         gensupport.URLParams
33230	ctx_               context.Context
33231	header_            http.Header
33232}
33233
33234// Update: Updates an existing floodlight activity.
33235func (r *FloodlightActivitiesService) Update(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesUpdateCall {
33236	c := &FloodlightActivitiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33237	c.profileId = profileId
33238	c.floodlightactivity = floodlightactivity
33239	return c
33240}
33241
33242// Fields allows partial responses to be retrieved. See
33243// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33244// for more information.
33245func (c *FloodlightActivitiesUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivitiesUpdateCall {
33246	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33247	return c
33248}
33249
33250// Context sets the context to be used in this call's Do method. Any
33251// pending HTTP request will be aborted if the provided context is
33252// canceled.
33253func (c *FloodlightActivitiesUpdateCall) Context(ctx context.Context) *FloodlightActivitiesUpdateCall {
33254	c.ctx_ = ctx
33255	return c
33256}
33257
33258// Header returns an http.Header that can be modified by the caller to
33259// add HTTP headers to the request.
33260func (c *FloodlightActivitiesUpdateCall) Header() http.Header {
33261	if c.header_ == nil {
33262		c.header_ = make(http.Header)
33263	}
33264	return c.header_
33265}
33266
33267func (c *FloodlightActivitiesUpdateCall) doRequest(alt string) (*http.Response, error) {
33268	reqHeaders := make(http.Header)
33269	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
33270	for k, v := range c.header_ {
33271		reqHeaders[k] = v
33272	}
33273	reqHeaders.Set("User-Agent", c.s.userAgent())
33274	var body io.Reader = nil
33275	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
33276	if err != nil {
33277		return nil, err
33278	}
33279	reqHeaders.Set("Content-Type", "application/json")
33280	c.urlParams_.Set("alt", alt)
33281	c.urlParams_.Set("prettyPrint", "false")
33282	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
33283	urls += "?" + c.urlParams_.Encode()
33284	req, err := http.NewRequest("PUT", urls, body)
33285	if err != nil {
33286		return nil, err
33287	}
33288	req.Header = reqHeaders
33289	googleapi.Expand(req.URL, map[string]string{
33290		"profileId": strconv.FormatInt(c.profileId, 10),
33291	})
33292	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33293}
33294
33295// Do executes the "dfareporting.floodlightActivities.update" call.
33296// Exactly one of *FloodlightActivity or error will be non-nil. Any
33297// non-2xx status code is an error. Response headers are in either
33298// *FloodlightActivity.ServerResponse.Header or (if a response was
33299// returned at all) in error.(*googleapi.Error).Header. Use
33300// googleapi.IsNotModified to check whether the returned error was
33301// because http.StatusNotModified was returned.
33302func (c *FloodlightActivitiesUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
33303	gensupport.SetOptions(c.urlParams_, opts...)
33304	res, err := c.doRequest("json")
33305	if res != nil && res.StatusCode == http.StatusNotModified {
33306		if res.Body != nil {
33307			res.Body.Close()
33308		}
33309		return nil, &googleapi.Error{
33310			Code:   res.StatusCode,
33311			Header: res.Header,
33312		}
33313	}
33314	if err != nil {
33315		return nil, err
33316	}
33317	defer googleapi.CloseBody(res)
33318	if err := googleapi.CheckResponse(res); err != nil {
33319		return nil, err
33320	}
33321	ret := &FloodlightActivity{
33322		ServerResponse: googleapi.ServerResponse{
33323			Header:         res.Header,
33324			HTTPStatusCode: res.StatusCode,
33325		},
33326	}
33327	target := &ret
33328	if err := gensupport.DecodeResponse(target, res); err != nil {
33329		return nil, err
33330	}
33331	return ret, nil
33332	// {
33333	//   "description": "Updates an existing floodlight activity.",
33334	//   "httpMethod": "PUT",
33335	//   "id": "dfareporting.floodlightActivities.update",
33336	//   "parameterOrder": [
33337	//     "profileId"
33338	//   ],
33339	//   "parameters": {
33340	//     "profileId": {
33341	//       "description": "User profile ID associated with this request.",
33342	//       "format": "int64",
33343	//       "location": "path",
33344	//       "required": true,
33345	//       "type": "string"
33346	//     }
33347	//   },
33348	//   "path": "userprofiles/{profileId}/floodlightActivities",
33349	//   "request": {
33350	//     "$ref": "FloodlightActivity"
33351	//   },
33352	//   "response": {
33353	//     "$ref": "FloodlightActivity"
33354	//   },
33355	//   "scopes": [
33356	//     "https://www.googleapis.com/auth/dfatrafficking"
33357	//   ]
33358	// }
33359
33360}
33361
33362// method id "dfareporting.floodlightActivityGroups.get":
33363
33364type FloodlightActivityGroupsGetCall struct {
33365	s            *Service
33366	profileId    int64
33367	id           int64
33368	urlParams_   gensupport.URLParams
33369	ifNoneMatch_ string
33370	ctx_         context.Context
33371	header_      http.Header
33372}
33373
33374// Get: Gets one floodlight activity group by ID.
33375func (r *FloodlightActivityGroupsService) Get(profileId int64, id int64) *FloodlightActivityGroupsGetCall {
33376	c := &FloodlightActivityGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33377	c.profileId = profileId
33378	c.id = id
33379	return c
33380}
33381
33382// Fields allows partial responses to be retrieved. See
33383// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33384// for more information.
33385func (c *FloodlightActivityGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsGetCall {
33386	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33387	return c
33388}
33389
33390// IfNoneMatch sets the optional parameter which makes the operation
33391// fail if the object's ETag matches the given value. This is useful for
33392// getting updates only after the object has changed since the last
33393// request. Use googleapi.IsNotModified to check whether the response
33394// error from Do is the result of In-None-Match.
33395func (c *FloodlightActivityGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsGetCall {
33396	c.ifNoneMatch_ = entityTag
33397	return c
33398}
33399
33400// Context sets the context to be used in this call's Do method. Any
33401// pending HTTP request will be aborted if the provided context is
33402// canceled.
33403func (c *FloodlightActivityGroupsGetCall) Context(ctx context.Context) *FloodlightActivityGroupsGetCall {
33404	c.ctx_ = ctx
33405	return c
33406}
33407
33408// Header returns an http.Header that can be modified by the caller to
33409// add HTTP headers to the request.
33410func (c *FloodlightActivityGroupsGetCall) Header() http.Header {
33411	if c.header_ == nil {
33412		c.header_ = make(http.Header)
33413	}
33414	return c.header_
33415}
33416
33417func (c *FloodlightActivityGroupsGetCall) doRequest(alt string) (*http.Response, error) {
33418	reqHeaders := make(http.Header)
33419	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
33420	for k, v := range c.header_ {
33421		reqHeaders[k] = v
33422	}
33423	reqHeaders.Set("User-Agent", c.s.userAgent())
33424	if c.ifNoneMatch_ != "" {
33425		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33426	}
33427	var body io.Reader = nil
33428	c.urlParams_.Set("alt", alt)
33429	c.urlParams_.Set("prettyPrint", "false")
33430	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups/{id}")
33431	urls += "?" + c.urlParams_.Encode()
33432	req, err := http.NewRequest("GET", urls, body)
33433	if err != nil {
33434		return nil, err
33435	}
33436	req.Header = reqHeaders
33437	googleapi.Expand(req.URL, map[string]string{
33438		"profileId": strconv.FormatInt(c.profileId, 10),
33439		"id":        strconv.FormatInt(c.id, 10),
33440	})
33441	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33442}
33443
33444// Do executes the "dfareporting.floodlightActivityGroups.get" call.
33445// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33446// non-2xx status code is an error. Response headers are in either
33447// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33448// returned at all) in error.(*googleapi.Error).Header. Use
33449// googleapi.IsNotModified to check whether the returned error was
33450// because http.StatusNotModified was returned.
33451func (c *FloodlightActivityGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33452	gensupport.SetOptions(c.urlParams_, opts...)
33453	res, err := c.doRequest("json")
33454	if res != nil && res.StatusCode == http.StatusNotModified {
33455		if res.Body != nil {
33456			res.Body.Close()
33457		}
33458		return nil, &googleapi.Error{
33459			Code:   res.StatusCode,
33460			Header: res.Header,
33461		}
33462	}
33463	if err != nil {
33464		return nil, err
33465	}
33466	defer googleapi.CloseBody(res)
33467	if err := googleapi.CheckResponse(res); err != nil {
33468		return nil, err
33469	}
33470	ret := &FloodlightActivityGroup{
33471		ServerResponse: googleapi.ServerResponse{
33472			Header:         res.Header,
33473			HTTPStatusCode: res.StatusCode,
33474		},
33475	}
33476	target := &ret
33477	if err := gensupport.DecodeResponse(target, res); err != nil {
33478		return nil, err
33479	}
33480	return ret, nil
33481	// {
33482	//   "description": "Gets one floodlight activity group by ID.",
33483	//   "httpMethod": "GET",
33484	//   "id": "dfareporting.floodlightActivityGroups.get",
33485	//   "parameterOrder": [
33486	//     "profileId",
33487	//     "id"
33488	//   ],
33489	//   "parameters": {
33490	//     "id": {
33491	//       "description": "Floodlight activity Group ID.",
33492	//       "format": "int64",
33493	//       "location": "path",
33494	//       "required": true,
33495	//       "type": "string"
33496	//     },
33497	//     "profileId": {
33498	//       "description": "User profile ID associated with this request.",
33499	//       "format": "int64",
33500	//       "location": "path",
33501	//       "required": true,
33502	//       "type": "string"
33503	//     }
33504	//   },
33505	//   "path": "userprofiles/{profileId}/floodlightActivityGroups/{id}",
33506	//   "response": {
33507	//     "$ref": "FloodlightActivityGroup"
33508	//   },
33509	//   "scopes": [
33510	//     "https://www.googleapis.com/auth/dfatrafficking"
33511	//   ]
33512	// }
33513
33514}
33515
33516// method id "dfareporting.floodlightActivityGroups.insert":
33517
33518type FloodlightActivityGroupsInsertCall struct {
33519	s                       *Service
33520	profileId               int64
33521	floodlightactivitygroup *FloodlightActivityGroup
33522	urlParams_              gensupport.URLParams
33523	ctx_                    context.Context
33524	header_                 http.Header
33525}
33526
33527// Insert: Inserts a new floodlight activity group.
33528func (r *FloodlightActivityGroupsService) Insert(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsInsertCall {
33529	c := &FloodlightActivityGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33530	c.profileId = profileId
33531	c.floodlightactivitygroup = floodlightactivitygroup
33532	return c
33533}
33534
33535// Fields allows partial responses to be retrieved. See
33536// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33537// for more information.
33538func (c *FloodlightActivityGroupsInsertCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsInsertCall {
33539	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33540	return c
33541}
33542
33543// Context sets the context to be used in this call's Do method. Any
33544// pending HTTP request will be aborted if the provided context is
33545// canceled.
33546func (c *FloodlightActivityGroupsInsertCall) Context(ctx context.Context) *FloodlightActivityGroupsInsertCall {
33547	c.ctx_ = ctx
33548	return c
33549}
33550
33551// Header returns an http.Header that can be modified by the caller to
33552// add HTTP headers to the request.
33553func (c *FloodlightActivityGroupsInsertCall) Header() http.Header {
33554	if c.header_ == nil {
33555		c.header_ = make(http.Header)
33556	}
33557	return c.header_
33558}
33559
33560func (c *FloodlightActivityGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
33561	reqHeaders := make(http.Header)
33562	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
33563	for k, v := range c.header_ {
33564		reqHeaders[k] = v
33565	}
33566	reqHeaders.Set("User-Agent", c.s.userAgent())
33567	var body io.Reader = nil
33568	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33569	if err != nil {
33570		return nil, err
33571	}
33572	reqHeaders.Set("Content-Type", "application/json")
33573	c.urlParams_.Set("alt", alt)
33574	c.urlParams_.Set("prettyPrint", "false")
33575	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33576	urls += "?" + c.urlParams_.Encode()
33577	req, err := http.NewRequest("POST", urls, body)
33578	if err != nil {
33579		return nil, err
33580	}
33581	req.Header = reqHeaders
33582	googleapi.Expand(req.URL, map[string]string{
33583		"profileId": strconv.FormatInt(c.profileId, 10),
33584	})
33585	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33586}
33587
33588// Do executes the "dfareporting.floodlightActivityGroups.insert" call.
33589// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33590// non-2xx status code is an error. Response headers are in either
33591// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33592// returned at all) in error.(*googleapi.Error).Header. Use
33593// googleapi.IsNotModified to check whether the returned error was
33594// because http.StatusNotModified was returned.
33595func (c *FloodlightActivityGroupsInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33596	gensupport.SetOptions(c.urlParams_, opts...)
33597	res, err := c.doRequest("json")
33598	if res != nil && res.StatusCode == http.StatusNotModified {
33599		if res.Body != nil {
33600			res.Body.Close()
33601		}
33602		return nil, &googleapi.Error{
33603			Code:   res.StatusCode,
33604			Header: res.Header,
33605		}
33606	}
33607	if err != nil {
33608		return nil, err
33609	}
33610	defer googleapi.CloseBody(res)
33611	if err := googleapi.CheckResponse(res); err != nil {
33612		return nil, err
33613	}
33614	ret := &FloodlightActivityGroup{
33615		ServerResponse: googleapi.ServerResponse{
33616			Header:         res.Header,
33617			HTTPStatusCode: res.StatusCode,
33618		},
33619	}
33620	target := &ret
33621	if err := gensupport.DecodeResponse(target, res); err != nil {
33622		return nil, err
33623	}
33624	return ret, nil
33625	// {
33626	//   "description": "Inserts a new floodlight activity group.",
33627	//   "httpMethod": "POST",
33628	//   "id": "dfareporting.floodlightActivityGroups.insert",
33629	//   "parameterOrder": [
33630	//     "profileId"
33631	//   ],
33632	//   "parameters": {
33633	//     "profileId": {
33634	//       "description": "User profile ID associated with this request.",
33635	//       "format": "int64",
33636	//       "location": "path",
33637	//       "required": true,
33638	//       "type": "string"
33639	//     }
33640	//   },
33641	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33642	//   "request": {
33643	//     "$ref": "FloodlightActivityGroup"
33644	//   },
33645	//   "response": {
33646	//     "$ref": "FloodlightActivityGroup"
33647	//   },
33648	//   "scopes": [
33649	//     "https://www.googleapis.com/auth/dfatrafficking"
33650	//   ]
33651	// }
33652
33653}
33654
33655// method id "dfareporting.floodlightActivityGroups.list":
33656
33657type FloodlightActivityGroupsListCall struct {
33658	s            *Service
33659	profileId    int64
33660	urlParams_   gensupport.URLParams
33661	ifNoneMatch_ string
33662	ctx_         context.Context
33663	header_      http.Header
33664}
33665
33666// List: Retrieves a list of floodlight activity groups, possibly
33667// filtered. This method supports paging.
33668func (r *FloodlightActivityGroupsService) List(profileId int64) *FloodlightActivityGroupsListCall {
33669	c := &FloodlightActivityGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33670	c.profileId = profileId
33671	return c
33672}
33673
33674// AdvertiserId sets the optional parameter "advertiserId": Select only
33675// floodlight activity groups with the specified advertiser ID. Must
33676// specify either advertiserId or floodlightConfigurationId for a
33677// non-empty result.
33678func (c *FloodlightActivityGroupsListCall) AdvertiserId(advertiserId int64) *FloodlightActivityGroupsListCall {
33679	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33680	return c
33681}
33682
33683// FloodlightConfigurationId sets the optional parameter
33684// "floodlightConfigurationId": Select only floodlight activity groups
33685// with the specified floodlight configuration ID. Must specify either
33686// advertiserId, or floodlightConfigurationId for a non-empty result.
33687func (c *FloodlightActivityGroupsListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivityGroupsListCall {
33688	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
33689	return c
33690}
33691
33692// Ids sets the optional parameter "ids": Select only floodlight
33693// activity groups with the specified IDs. Must specify either
33694// advertiserId or floodlightConfigurationId for a non-empty result.
33695func (c *FloodlightActivityGroupsListCall) Ids(ids ...int64) *FloodlightActivityGroupsListCall {
33696	var ids_ []string
33697	for _, v := range ids {
33698		ids_ = append(ids_, fmt.Sprint(v))
33699	}
33700	c.urlParams_.SetMulti("ids", ids_)
33701	return c
33702}
33703
33704// MaxResults sets the optional parameter "maxResults": Maximum number
33705// of results to return.
33706func (c *FloodlightActivityGroupsListCall) MaxResults(maxResults int64) *FloodlightActivityGroupsListCall {
33707	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33708	return c
33709}
33710
33711// PageToken sets the optional parameter "pageToken": Value of the
33712// nextPageToken from the previous result page.
33713func (c *FloodlightActivityGroupsListCall) PageToken(pageToken string) *FloodlightActivityGroupsListCall {
33714	c.urlParams_.Set("pageToken", pageToken)
33715	return c
33716}
33717
33718// SearchString sets the optional parameter "searchString": Allows
33719// searching for objects by name or ID. Wildcards (*) are allowed. For
33720// example, "floodlightactivitygroup*2015" will return objects with
33721// names like "floodlightactivitygroup June 2015",
33722// "floodlightactivitygroup April 2015", or simply
33723// "floodlightactivitygroup 2015". Most of the searches also add
33724// wildcards implicitly at the start and the end of the search string.
33725// For example, a search string of "floodlightactivitygroup" will match
33726// objects with name "my floodlightactivitygroup activity",
33727// "floodlightactivitygroup 2015", or simply "floodlightactivitygroup".
33728func (c *FloodlightActivityGroupsListCall) SearchString(searchString string) *FloodlightActivityGroupsListCall {
33729	c.urlParams_.Set("searchString", searchString)
33730	return c
33731}
33732
33733// SortField sets the optional parameter "sortField": Field by which to
33734// sort the list.
33735//
33736// Possible values:
33737//   "ID" (default)
33738//   "NAME"
33739func (c *FloodlightActivityGroupsListCall) SortField(sortField string) *FloodlightActivityGroupsListCall {
33740	c.urlParams_.Set("sortField", sortField)
33741	return c
33742}
33743
33744// SortOrder sets the optional parameter "sortOrder": Order of sorted
33745// results.
33746//
33747// Possible values:
33748//   "ASCENDING" (default)
33749//   "DESCENDING"
33750func (c *FloodlightActivityGroupsListCall) SortOrder(sortOrder string) *FloodlightActivityGroupsListCall {
33751	c.urlParams_.Set("sortOrder", sortOrder)
33752	return c
33753}
33754
33755// Type sets the optional parameter "type": Select only floodlight
33756// activity groups with the specified floodlight activity group type.
33757//
33758// Possible values:
33759//   "COUNTER"
33760//   "SALE"
33761func (c *FloodlightActivityGroupsListCall) Type(type_ string) *FloodlightActivityGroupsListCall {
33762	c.urlParams_.Set("type", type_)
33763	return c
33764}
33765
33766// Fields allows partial responses to be retrieved. See
33767// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33768// for more information.
33769func (c *FloodlightActivityGroupsListCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsListCall {
33770	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33771	return c
33772}
33773
33774// IfNoneMatch sets the optional parameter which makes the operation
33775// fail if the object's ETag matches the given value. This is useful for
33776// getting updates only after the object has changed since the last
33777// request. Use googleapi.IsNotModified to check whether the response
33778// error from Do is the result of In-None-Match.
33779func (c *FloodlightActivityGroupsListCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsListCall {
33780	c.ifNoneMatch_ = entityTag
33781	return c
33782}
33783
33784// Context sets the context to be used in this call's Do method. Any
33785// pending HTTP request will be aborted if the provided context is
33786// canceled.
33787func (c *FloodlightActivityGroupsListCall) Context(ctx context.Context) *FloodlightActivityGroupsListCall {
33788	c.ctx_ = ctx
33789	return c
33790}
33791
33792// Header returns an http.Header that can be modified by the caller to
33793// add HTTP headers to the request.
33794func (c *FloodlightActivityGroupsListCall) Header() http.Header {
33795	if c.header_ == nil {
33796		c.header_ = make(http.Header)
33797	}
33798	return c.header_
33799}
33800
33801func (c *FloodlightActivityGroupsListCall) doRequest(alt string) (*http.Response, error) {
33802	reqHeaders := make(http.Header)
33803	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
33804	for k, v := range c.header_ {
33805		reqHeaders[k] = v
33806	}
33807	reqHeaders.Set("User-Agent", c.s.userAgent())
33808	if c.ifNoneMatch_ != "" {
33809		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33810	}
33811	var body io.Reader = nil
33812	c.urlParams_.Set("alt", alt)
33813	c.urlParams_.Set("prettyPrint", "false")
33814	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33815	urls += "?" + c.urlParams_.Encode()
33816	req, err := http.NewRequest("GET", urls, body)
33817	if err != nil {
33818		return nil, err
33819	}
33820	req.Header = reqHeaders
33821	googleapi.Expand(req.URL, map[string]string{
33822		"profileId": strconv.FormatInt(c.profileId, 10),
33823	})
33824	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33825}
33826
33827// Do executes the "dfareporting.floodlightActivityGroups.list" call.
33828// Exactly one of *FloodlightActivityGroupsListResponse or error will be
33829// non-nil. Any non-2xx status code is an error. Response headers are in
33830// either *FloodlightActivityGroupsListResponse.ServerResponse.Header or
33831// (if a response was returned at all) in
33832// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
33833// whether the returned error was because http.StatusNotModified was
33834// returned.
33835func (c *FloodlightActivityGroupsListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroupsListResponse, error) {
33836	gensupport.SetOptions(c.urlParams_, opts...)
33837	res, err := c.doRequest("json")
33838	if res != nil && res.StatusCode == http.StatusNotModified {
33839		if res.Body != nil {
33840			res.Body.Close()
33841		}
33842		return nil, &googleapi.Error{
33843			Code:   res.StatusCode,
33844			Header: res.Header,
33845		}
33846	}
33847	if err != nil {
33848		return nil, err
33849	}
33850	defer googleapi.CloseBody(res)
33851	if err := googleapi.CheckResponse(res); err != nil {
33852		return nil, err
33853	}
33854	ret := &FloodlightActivityGroupsListResponse{
33855		ServerResponse: googleapi.ServerResponse{
33856			Header:         res.Header,
33857			HTTPStatusCode: res.StatusCode,
33858		},
33859	}
33860	target := &ret
33861	if err := gensupport.DecodeResponse(target, res); err != nil {
33862		return nil, err
33863	}
33864	return ret, nil
33865	// {
33866	//   "description": "Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging.",
33867	//   "httpMethod": "GET",
33868	//   "id": "dfareporting.floodlightActivityGroups.list",
33869	//   "parameterOrder": [
33870	//     "profileId"
33871	//   ],
33872	//   "parameters": {
33873	//     "advertiserId": {
33874	//       "description": "Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
33875	//       "format": "int64",
33876	//       "location": "query",
33877	//       "type": "string"
33878	//     },
33879	//     "floodlightConfigurationId": {
33880	//       "description": "Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId for a non-empty result.",
33881	//       "format": "int64",
33882	//       "location": "query",
33883	//       "type": "string"
33884	//     },
33885	//     "ids": {
33886	//       "description": "Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
33887	//       "format": "int64",
33888	//       "location": "query",
33889	//       "repeated": true,
33890	//       "type": "string"
33891	//     },
33892	//     "maxResults": {
33893	//       "default": "1000",
33894	//       "description": "Maximum number of results to return.",
33895	//       "format": "int32",
33896	//       "location": "query",
33897	//       "maximum": "1000",
33898	//       "minimum": "0",
33899	//       "type": "integer"
33900	//     },
33901	//     "pageToken": {
33902	//       "description": "Value of the nextPageToken from the previous result page.",
33903	//       "location": "query",
33904	//       "type": "string"
33905	//     },
33906	//     "profileId": {
33907	//       "description": "User profile ID associated with this request.",
33908	//       "format": "int64",
33909	//       "location": "path",
33910	//       "required": true,
33911	//       "type": "string"
33912	//     },
33913	//     "searchString": {
33914	//       "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\".",
33915	//       "location": "query",
33916	//       "type": "string"
33917	//     },
33918	//     "sortField": {
33919	//       "default": "ID",
33920	//       "description": "Field by which to sort the list.",
33921	//       "enum": [
33922	//         "ID",
33923	//         "NAME"
33924	//       ],
33925	//       "enumDescriptions": [
33926	//         "",
33927	//         ""
33928	//       ],
33929	//       "location": "query",
33930	//       "type": "string"
33931	//     },
33932	//     "sortOrder": {
33933	//       "default": "ASCENDING",
33934	//       "description": "Order of sorted results.",
33935	//       "enum": [
33936	//         "ASCENDING",
33937	//         "DESCENDING"
33938	//       ],
33939	//       "enumDescriptions": [
33940	//         "",
33941	//         ""
33942	//       ],
33943	//       "location": "query",
33944	//       "type": "string"
33945	//     },
33946	//     "type": {
33947	//       "description": "Select only floodlight activity groups with the specified floodlight activity group type.",
33948	//       "enum": [
33949	//         "COUNTER",
33950	//         "SALE"
33951	//       ],
33952	//       "enumDescriptions": [
33953	//         "",
33954	//         ""
33955	//       ],
33956	//       "location": "query",
33957	//       "type": "string"
33958	//     }
33959	//   },
33960	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33961	//   "response": {
33962	//     "$ref": "FloodlightActivityGroupsListResponse"
33963	//   },
33964	//   "scopes": [
33965	//     "https://www.googleapis.com/auth/dfatrafficking"
33966	//   ]
33967	// }
33968
33969}
33970
33971// Pages invokes f for each page of results.
33972// A non-nil error returned from f will halt the iteration.
33973// The provided context supersedes any context provided to the Context method.
33974func (c *FloodlightActivityGroupsListCall) Pages(ctx context.Context, f func(*FloodlightActivityGroupsListResponse) error) error {
33975	c.ctx_ = ctx
33976	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
33977	for {
33978		x, err := c.Do()
33979		if err != nil {
33980			return err
33981		}
33982		if err := f(x); err != nil {
33983			return err
33984		}
33985		if x.NextPageToken == "" {
33986			return nil
33987		}
33988		c.PageToken(x.NextPageToken)
33989	}
33990}
33991
33992// method id "dfareporting.floodlightActivityGroups.patch":
33993
33994type FloodlightActivityGroupsPatchCall struct {
33995	s                       *Service
33996	profileId               int64
33997	floodlightactivitygroup *FloodlightActivityGroup
33998	urlParams_              gensupport.URLParams
33999	ctx_                    context.Context
34000	header_                 http.Header
34001}
34002
34003// Patch: Updates an existing floodlight activity group. This method
34004// supports patch semantics.
34005func (r *FloodlightActivityGroupsService) Patch(profileId int64, id int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsPatchCall {
34006	c := &FloodlightActivityGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34007	c.profileId = profileId
34008	c.urlParams_.Set("id", fmt.Sprint(id))
34009	c.floodlightactivitygroup = floodlightactivitygroup
34010	return c
34011}
34012
34013// Fields allows partial responses to be retrieved. See
34014// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34015// for more information.
34016func (c *FloodlightActivityGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsPatchCall {
34017	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34018	return c
34019}
34020
34021// Context sets the context to be used in this call's Do method. Any
34022// pending HTTP request will be aborted if the provided context is
34023// canceled.
34024func (c *FloodlightActivityGroupsPatchCall) Context(ctx context.Context) *FloodlightActivityGroupsPatchCall {
34025	c.ctx_ = ctx
34026	return c
34027}
34028
34029// Header returns an http.Header that can be modified by the caller to
34030// add HTTP headers to the request.
34031func (c *FloodlightActivityGroupsPatchCall) Header() http.Header {
34032	if c.header_ == nil {
34033		c.header_ = make(http.Header)
34034	}
34035	return c.header_
34036}
34037
34038func (c *FloodlightActivityGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
34039	reqHeaders := make(http.Header)
34040	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
34041	for k, v := range c.header_ {
34042		reqHeaders[k] = v
34043	}
34044	reqHeaders.Set("User-Agent", c.s.userAgent())
34045	var body io.Reader = nil
34046	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
34047	if err != nil {
34048		return nil, err
34049	}
34050	reqHeaders.Set("Content-Type", "application/json")
34051	c.urlParams_.Set("alt", alt)
34052	c.urlParams_.Set("prettyPrint", "false")
34053	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
34054	urls += "?" + c.urlParams_.Encode()
34055	req, err := http.NewRequest("PATCH", urls, body)
34056	if err != nil {
34057		return nil, err
34058	}
34059	req.Header = reqHeaders
34060	googleapi.Expand(req.URL, map[string]string{
34061		"profileId": strconv.FormatInt(c.profileId, 10),
34062	})
34063	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34064}
34065
34066// Do executes the "dfareporting.floodlightActivityGroups.patch" call.
34067// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
34068// non-2xx status code is an error. Response headers are in either
34069// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
34070// returned at all) in error.(*googleapi.Error).Header. Use
34071// googleapi.IsNotModified to check whether the returned error was
34072// because http.StatusNotModified was returned.
34073func (c *FloodlightActivityGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
34074	gensupport.SetOptions(c.urlParams_, opts...)
34075	res, err := c.doRequest("json")
34076	if res != nil && res.StatusCode == http.StatusNotModified {
34077		if res.Body != nil {
34078			res.Body.Close()
34079		}
34080		return nil, &googleapi.Error{
34081			Code:   res.StatusCode,
34082			Header: res.Header,
34083		}
34084	}
34085	if err != nil {
34086		return nil, err
34087	}
34088	defer googleapi.CloseBody(res)
34089	if err := googleapi.CheckResponse(res); err != nil {
34090		return nil, err
34091	}
34092	ret := &FloodlightActivityGroup{
34093		ServerResponse: googleapi.ServerResponse{
34094			Header:         res.Header,
34095			HTTPStatusCode: res.StatusCode,
34096		},
34097	}
34098	target := &ret
34099	if err := gensupport.DecodeResponse(target, res); err != nil {
34100		return nil, err
34101	}
34102	return ret, nil
34103	// {
34104	//   "description": "Updates an existing floodlight activity group. This method supports patch semantics.",
34105	//   "httpMethod": "PATCH",
34106	//   "id": "dfareporting.floodlightActivityGroups.patch",
34107	//   "parameterOrder": [
34108	//     "profileId",
34109	//     "id"
34110	//   ],
34111	//   "parameters": {
34112	//     "id": {
34113	//       "description": "Floodlight activity Group ID.",
34114	//       "format": "int64",
34115	//       "location": "query",
34116	//       "required": true,
34117	//       "type": "string"
34118	//     },
34119	//     "profileId": {
34120	//       "description": "User profile ID associated with this request.",
34121	//       "format": "int64",
34122	//       "location": "path",
34123	//       "required": true,
34124	//       "type": "string"
34125	//     }
34126	//   },
34127	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
34128	//   "request": {
34129	//     "$ref": "FloodlightActivityGroup"
34130	//   },
34131	//   "response": {
34132	//     "$ref": "FloodlightActivityGroup"
34133	//   },
34134	//   "scopes": [
34135	//     "https://www.googleapis.com/auth/dfatrafficking"
34136	//   ]
34137	// }
34138
34139}
34140
34141// method id "dfareporting.floodlightActivityGroups.update":
34142
34143type FloodlightActivityGroupsUpdateCall struct {
34144	s                       *Service
34145	profileId               int64
34146	floodlightactivitygroup *FloodlightActivityGroup
34147	urlParams_              gensupport.URLParams
34148	ctx_                    context.Context
34149	header_                 http.Header
34150}
34151
34152// Update: Updates an existing floodlight activity group.
34153func (r *FloodlightActivityGroupsService) Update(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsUpdateCall {
34154	c := &FloodlightActivityGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34155	c.profileId = profileId
34156	c.floodlightactivitygroup = floodlightactivitygroup
34157	return c
34158}
34159
34160// Fields allows partial responses to be retrieved. See
34161// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34162// for more information.
34163func (c *FloodlightActivityGroupsUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsUpdateCall {
34164	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34165	return c
34166}
34167
34168// Context sets the context to be used in this call's Do method. Any
34169// pending HTTP request will be aborted if the provided context is
34170// canceled.
34171func (c *FloodlightActivityGroupsUpdateCall) Context(ctx context.Context) *FloodlightActivityGroupsUpdateCall {
34172	c.ctx_ = ctx
34173	return c
34174}
34175
34176// Header returns an http.Header that can be modified by the caller to
34177// add HTTP headers to the request.
34178func (c *FloodlightActivityGroupsUpdateCall) Header() http.Header {
34179	if c.header_ == nil {
34180		c.header_ = make(http.Header)
34181	}
34182	return c.header_
34183}
34184
34185func (c *FloodlightActivityGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
34186	reqHeaders := make(http.Header)
34187	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
34188	for k, v := range c.header_ {
34189		reqHeaders[k] = v
34190	}
34191	reqHeaders.Set("User-Agent", c.s.userAgent())
34192	var body io.Reader = nil
34193	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
34194	if err != nil {
34195		return nil, err
34196	}
34197	reqHeaders.Set("Content-Type", "application/json")
34198	c.urlParams_.Set("alt", alt)
34199	c.urlParams_.Set("prettyPrint", "false")
34200	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
34201	urls += "?" + c.urlParams_.Encode()
34202	req, err := http.NewRequest("PUT", urls, body)
34203	if err != nil {
34204		return nil, err
34205	}
34206	req.Header = reqHeaders
34207	googleapi.Expand(req.URL, map[string]string{
34208		"profileId": strconv.FormatInt(c.profileId, 10),
34209	})
34210	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34211}
34212
34213// Do executes the "dfareporting.floodlightActivityGroups.update" call.
34214// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
34215// non-2xx status code is an error. Response headers are in either
34216// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
34217// returned at all) in error.(*googleapi.Error).Header. Use
34218// googleapi.IsNotModified to check whether the returned error was
34219// because http.StatusNotModified was returned.
34220func (c *FloodlightActivityGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
34221	gensupport.SetOptions(c.urlParams_, opts...)
34222	res, err := c.doRequest("json")
34223	if res != nil && res.StatusCode == http.StatusNotModified {
34224		if res.Body != nil {
34225			res.Body.Close()
34226		}
34227		return nil, &googleapi.Error{
34228			Code:   res.StatusCode,
34229			Header: res.Header,
34230		}
34231	}
34232	if err != nil {
34233		return nil, err
34234	}
34235	defer googleapi.CloseBody(res)
34236	if err := googleapi.CheckResponse(res); err != nil {
34237		return nil, err
34238	}
34239	ret := &FloodlightActivityGroup{
34240		ServerResponse: googleapi.ServerResponse{
34241			Header:         res.Header,
34242			HTTPStatusCode: res.StatusCode,
34243		},
34244	}
34245	target := &ret
34246	if err := gensupport.DecodeResponse(target, res); err != nil {
34247		return nil, err
34248	}
34249	return ret, nil
34250	// {
34251	//   "description": "Updates an existing floodlight activity group.",
34252	//   "httpMethod": "PUT",
34253	//   "id": "dfareporting.floodlightActivityGroups.update",
34254	//   "parameterOrder": [
34255	//     "profileId"
34256	//   ],
34257	//   "parameters": {
34258	//     "profileId": {
34259	//       "description": "User profile ID associated with this request.",
34260	//       "format": "int64",
34261	//       "location": "path",
34262	//       "required": true,
34263	//       "type": "string"
34264	//     }
34265	//   },
34266	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
34267	//   "request": {
34268	//     "$ref": "FloodlightActivityGroup"
34269	//   },
34270	//   "response": {
34271	//     "$ref": "FloodlightActivityGroup"
34272	//   },
34273	//   "scopes": [
34274	//     "https://www.googleapis.com/auth/dfatrafficking"
34275	//   ]
34276	// }
34277
34278}
34279
34280// method id "dfareporting.floodlightConfigurations.get":
34281
34282type FloodlightConfigurationsGetCall struct {
34283	s            *Service
34284	profileId    int64
34285	id           int64
34286	urlParams_   gensupport.URLParams
34287	ifNoneMatch_ string
34288	ctx_         context.Context
34289	header_      http.Header
34290}
34291
34292// Get: Gets one floodlight configuration by ID.
34293func (r *FloodlightConfigurationsService) Get(profileId int64, id int64) *FloodlightConfigurationsGetCall {
34294	c := &FloodlightConfigurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34295	c.profileId = profileId
34296	c.id = id
34297	return c
34298}
34299
34300// Fields allows partial responses to be retrieved. See
34301// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34302// for more information.
34303func (c *FloodlightConfigurationsGetCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsGetCall {
34304	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34305	return c
34306}
34307
34308// IfNoneMatch sets the optional parameter which makes the operation
34309// fail if the object's ETag matches the given value. This is useful for
34310// getting updates only after the object has changed since the last
34311// request. Use googleapi.IsNotModified to check whether the response
34312// error from Do is the result of In-None-Match.
34313func (c *FloodlightConfigurationsGetCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsGetCall {
34314	c.ifNoneMatch_ = entityTag
34315	return c
34316}
34317
34318// Context sets the context to be used in this call's Do method. Any
34319// pending HTTP request will be aborted if the provided context is
34320// canceled.
34321func (c *FloodlightConfigurationsGetCall) Context(ctx context.Context) *FloodlightConfigurationsGetCall {
34322	c.ctx_ = ctx
34323	return c
34324}
34325
34326// Header returns an http.Header that can be modified by the caller to
34327// add HTTP headers to the request.
34328func (c *FloodlightConfigurationsGetCall) Header() http.Header {
34329	if c.header_ == nil {
34330		c.header_ = make(http.Header)
34331	}
34332	return c.header_
34333}
34334
34335func (c *FloodlightConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
34336	reqHeaders := make(http.Header)
34337	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
34338	for k, v := range c.header_ {
34339		reqHeaders[k] = v
34340	}
34341	reqHeaders.Set("User-Agent", c.s.userAgent())
34342	if c.ifNoneMatch_ != "" {
34343		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34344	}
34345	var body io.Reader = nil
34346	c.urlParams_.Set("alt", alt)
34347	c.urlParams_.Set("prettyPrint", "false")
34348	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations/{id}")
34349	urls += "?" + c.urlParams_.Encode()
34350	req, err := http.NewRequest("GET", urls, body)
34351	if err != nil {
34352		return nil, err
34353	}
34354	req.Header = reqHeaders
34355	googleapi.Expand(req.URL, map[string]string{
34356		"profileId": strconv.FormatInt(c.profileId, 10),
34357		"id":        strconv.FormatInt(c.id, 10),
34358	})
34359	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34360}
34361
34362// Do executes the "dfareporting.floodlightConfigurations.get" call.
34363// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34364// non-2xx status code is an error. Response headers are in either
34365// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34366// returned at all) in error.(*googleapi.Error).Header. Use
34367// googleapi.IsNotModified to check whether the returned error was
34368// because http.StatusNotModified was returned.
34369func (c *FloodlightConfigurationsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34370	gensupport.SetOptions(c.urlParams_, opts...)
34371	res, err := c.doRequest("json")
34372	if res != nil && res.StatusCode == http.StatusNotModified {
34373		if res.Body != nil {
34374			res.Body.Close()
34375		}
34376		return nil, &googleapi.Error{
34377			Code:   res.StatusCode,
34378			Header: res.Header,
34379		}
34380	}
34381	if err != nil {
34382		return nil, err
34383	}
34384	defer googleapi.CloseBody(res)
34385	if err := googleapi.CheckResponse(res); err != nil {
34386		return nil, err
34387	}
34388	ret := &FloodlightConfiguration{
34389		ServerResponse: googleapi.ServerResponse{
34390			Header:         res.Header,
34391			HTTPStatusCode: res.StatusCode,
34392		},
34393	}
34394	target := &ret
34395	if err := gensupport.DecodeResponse(target, res); err != nil {
34396		return nil, err
34397	}
34398	return ret, nil
34399	// {
34400	//   "description": "Gets one floodlight configuration by ID.",
34401	//   "httpMethod": "GET",
34402	//   "id": "dfareporting.floodlightConfigurations.get",
34403	//   "parameterOrder": [
34404	//     "profileId",
34405	//     "id"
34406	//   ],
34407	//   "parameters": {
34408	//     "id": {
34409	//       "description": "Floodlight configuration ID.",
34410	//       "format": "int64",
34411	//       "location": "path",
34412	//       "required": true,
34413	//       "type": "string"
34414	//     },
34415	//     "profileId": {
34416	//       "description": "User profile ID associated with this request.",
34417	//       "format": "int64",
34418	//       "location": "path",
34419	//       "required": true,
34420	//       "type": "string"
34421	//     }
34422	//   },
34423	//   "path": "userprofiles/{profileId}/floodlightConfigurations/{id}",
34424	//   "response": {
34425	//     "$ref": "FloodlightConfiguration"
34426	//   },
34427	//   "scopes": [
34428	//     "https://www.googleapis.com/auth/dfatrafficking"
34429	//   ]
34430	// }
34431
34432}
34433
34434// method id "dfareporting.floodlightConfigurations.list":
34435
34436type FloodlightConfigurationsListCall struct {
34437	s            *Service
34438	profileId    int64
34439	urlParams_   gensupport.URLParams
34440	ifNoneMatch_ string
34441	ctx_         context.Context
34442	header_      http.Header
34443}
34444
34445// List: Retrieves a list of floodlight configurations, possibly
34446// filtered.
34447func (r *FloodlightConfigurationsService) List(profileId int64) *FloodlightConfigurationsListCall {
34448	c := &FloodlightConfigurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34449	c.profileId = profileId
34450	return c
34451}
34452
34453// Ids sets the optional parameter "ids": Set of IDs of floodlight
34454// configurations to retrieve. Required field; otherwise an empty list
34455// will be returned.
34456func (c *FloodlightConfigurationsListCall) Ids(ids ...int64) *FloodlightConfigurationsListCall {
34457	var ids_ []string
34458	for _, v := range ids {
34459		ids_ = append(ids_, fmt.Sprint(v))
34460	}
34461	c.urlParams_.SetMulti("ids", ids_)
34462	return c
34463}
34464
34465// Fields allows partial responses to be retrieved. See
34466// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34467// for more information.
34468func (c *FloodlightConfigurationsListCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsListCall {
34469	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34470	return c
34471}
34472
34473// IfNoneMatch sets the optional parameter which makes the operation
34474// fail if the object's ETag matches the given value. This is useful for
34475// getting updates only after the object has changed since the last
34476// request. Use googleapi.IsNotModified to check whether the response
34477// error from Do is the result of In-None-Match.
34478func (c *FloodlightConfigurationsListCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsListCall {
34479	c.ifNoneMatch_ = entityTag
34480	return c
34481}
34482
34483// Context sets the context to be used in this call's Do method. Any
34484// pending HTTP request will be aborted if the provided context is
34485// canceled.
34486func (c *FloodlightConfigurationsListCall) Context(ctx context.Context) *FloodlightConfigurationsListCall {
34487	c.ctx_ = ctx
34488	return c
34489}
34490
34491// Header returns an http.Header that can be modified by the caller to
34492// add HTTP headers to the request.
34493func (c *FloodlightConfigurationsListCall) Header() http.Header {
34494	if c.header_ == nil {
34495		c.header_ = make(http.Header)
34496	}
34497	return c.header_
34498}
34499
34500func (c *FloodlightConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
34501	reqHeaders := make(http.Header)
34502	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
34503	for k, v := range c.header_ {
34504		reqHeaders[k] = v
34505	}
34506	reqHeaders.Set("User-Agent", c.s.userAgent())
34507	if c.ifNoneMatch_ != "" {
34508		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34509	}
34510	var body io.Reader = nil
34511	c.urlParams_.Set("alt", alt)
34512	c.urlParams_.Set("prettyPrint", "false")
34513	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34514	urls += "?" + c.urlParams_.Encode()
34515	req, err := http.NewRequest("GET", urls, body)
34516	if err != nil {
34517		return nil, err
34518	}
34519	req.Header = reqHeaders
34520	googleapi.Expand(req.URL, map[string]string{
34521		"profileId": strconv.FormatInt(c.profileId, 10),
34522	})
34523	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34524}
34525
34526// Do executes the "dfareporting.floodlightConfigurations.list" call.
34527// Exactly one of *FloodlightConfigurationsListResponse or error will be
34528// non-nil. Any non-2xx status code is an error. Response headers are in
34529// either *FloodlightConfigurationsListResponse.ServerResponse.Header or
34530// (if a response was returned at all) in
34531// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
34532// whether the returned error was because http.StatusNotModified was
34533// returned.
34534func (c *FloodlightConfigurationsListCall) Do(opts ...googleapi.CallOption) (*FloodlightConfigurationsListResponse, error) {
34535	gensupport.SetOptions(c.urlParams_, opts...)
34536	res, err := c.doRequest("json")
34537	if res != nil && res.StatusCode == http.StatusNotModified {
34538		if res.Body != nil {
34539			res.Body.Close()
34540		}
34541		return nil, &googleapi.Error{
34542			Code:   res.StatusCode,
34543			Header: res.Header,
34544		}
34545	}
34546	if err != nil {
34547		return nil, err
34548	}
34549	defer googleapi.CloseBody(res)
34550	if err := googleapi.CheckResponse(res); err != nil {
34551		return nil, err
34552	}
34553	ret := &FloodlightConfigurationsListResponse{
34554		ServerResponse: googleapi.ServerResponse{
34555			Header:         res.Header,
34556			HTTPStatusCode: res.StatusCode,
34557		},
34558	}
34559	target := &ret
34560	if err := gensupport.DecodeResponse(target, res); err != nil {
34561		return nil, err
34562	}
34563	return ret, nil
34564	// {
34565	//   "description": "Retrieves a list of floodlight configurations, possibly filtered.",
34566	//   "httpMethod": "GET",
34567	//   "id": "dfareporting.floodlightConfigurations.list",
34568	//   "parameterOrder": [
34569	//     "profileId"
34570	//   ],
34571	//   "parameters": {
34572	//     "ids": {
34573	//       "description": "Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned.",
34574	//       "format": "int64",
34575	//       "location": "query",
34576	//       "repeated": true,
34577	//       "type": "string"
34578	//     },
34579	//     "profileId": {
34580	//       "description": "User profile ID associated with this request.",
34581	//       "format": "int64",
34582	//       "location": "path",
34583	//       "required": true,
34584	//       "type": "string"
34585	//     }
34586	//   },
34587	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34588	//   "response": {
34589	//     "$ref": "FloodlightConfigurationsListResponse"
34590	//   },
34591	//   "scopes": [
34592	//     "https://www.googleapis.com/auth/dfatrafficking"
34593	//   ]
34594	// }
34595
34596}
34597
34598// method id "dfareporting.floodlightConfigurations.patch":
34599
34600type FloodlightConfigurationsPatchCall struct {
34601	s                       *Service
34602	profileId               int64
34603	floodlightconfiguration *FloodlightConfiguration
34604	urlParams_              gensupport.URLParams
34605	ctx_                    context.Context
34606	header_                 http.Header
34607}
34608
34609// Patch: Updates an existing floodlight configuration. This method
34610// supports patch semantics.
34611func (r *FloodlightConfigurationsService) Patch(profileId int64, id int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsPatchCall {
34612	c := &FloodlightConfigurationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34613	c.profileId = profileId
34614	c.urlParams_.Set("id", fmt.Sprint(id))
34615	c.floodlightconfiguration = floodlightconfiguration
34616	return c
34617}
34618
34619// Fields allows partial responses to be retrieved. See
34620// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34621// for more information.
34622func (c *FloodlightConfigurationsPatchCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsPatchCall {
34623	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34624	return c
34625}
34626
34627// Context sets the context to be used in this call's Do method. Any
34628// pending HTTP request will be aborted if the provided context is
34629// canceled.
34630func (c *FloodlightConfigurationsPatchCall) Context(ctx context.Context) *FloodlightConfigurationsPatchCall {
34631	c.ctx_ = ctx
34632	return c
34633}
34634
34635// Header returns an http.Header that can be modified by the caller to
34636// add HTTP headers to the request.
34637func (c *FloodlightConfigurationsPatchCall) Header() http.Header {
34638	if c.header_ == nil {
34639		c.header_ = make(http.Header)
34640	}
34641	return c.header_
34642}
34643
34644func (c *FloodlightConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
34645	reqHeaders := make(http.Header)
34646	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
34647	for k, v := range c.header_ {
34648		reqHeaders[k] = v
34649	}
34650	reqHeaders.Set("User-Agent", c.s.userAgent())
34651	var body io.Reader = nil
34652	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
34653	if err != nil {
34654		return nil, err
34655	}
34656	reqHeaders.Set("Content-Type", "application/json")
34657	c.urlParams_.Set("alt", alt)
34658	c.urlParams_.Set("prettyPrint", "false")
34659	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34660	urls += "?" + c.urlParams_.Encode()
34661	req, err := http.NewRequest("PATCH", urls, body)
34662	if err != nil {
34663		return nil, err
34664	}
34665	req.Header = reqHeaders
34666	googleapi.Expand(req.URL, map[string]string{
34667		"profileId": strconv.FormatInt(c.profileId, 10),
34668	})
34669	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34670}
34671
34672// Do executes the "dfareporting.floodlightConfigurations.patch" call.
34673// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34674// non-2xx status code is an error. Response headers are in either
34675// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34676// returned at all) in error.(*googleapi.Error).Header. Use
34677// googleapi.IsNotModified to check whether the returned error was
34678// because http.StatusNotModified was returned.
34679func (c *FloodlightConfigurationsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34680	gensupport.SetOptions(c.urlParams_, opts...)
34681	res, err := c.doRequest("json")
34682	if res != nil && res.StatusCode == http.StatusNotModified {
34683		if res.Body != nil {
34684			res.Body.Close()
34685		}
34686		return nil, &googleapi.Error{
34687			Code:   res.StatusCode,
34688			Header: res.Header,
34689		}
34690	}
34691	if err != nil {
34692		return nil, err
34693	}
34694	defer googleapi.CloseBody(res)
34695	if err := googleapi.CheckResponse(res); err != nil {
34696		return nil, err
34697	}
34698	ret := &FloodlightConfiguration{
34699		ServerResponse: googleapi.ServerResponse{
34700			Header:         res.Header,
34701			HTTPStatusCode: res.StatusCode,
34702		},
34703	}
34704	target := &ret
34705	if err := gensupport.DecodeResponse(target, res); err != nil {
34706		return nil, err
34707	}
34708	return ret, nil
34709	// {
34710	//   "description": "Updates an existing floodlight configuration. This method supports patch semantics.",
34711	//   "httpMethod": "PATCH",
34712	//   "id": "dfareporting.floodlightConfigurations.patch",
34713	//   "parameterOrder": [
34714	//     "profileId",
34715	//     "id"
34716	//   ],
34717	//   "parameters": {
34718	//     "id": {
34719	//       "description": "Floodlight configuration ID.",
34720	//       "format": "int64",
34721	//       "location": "query",
34722	//       "required": true,
34723	//       "type": "string"
34724	//     },
34725	//     "profileId": {
34726	//       "description": "User profile ID associated with this request.",
34727	//       "format": "int64",
34728	//       "location": "path",
34729	//       "required": true,
34730	//       "type": "string"
34731	//     }
34732	//   },
34733	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34734	//   "request": {
34735	//     "$ref": "FloodlightConfiguration"
34736	//   },
34737	//   "response": {
34738	//     "$ref": "FloodlightConfiguration"
34739	//   },
34740	//   "scopes": [
34741	//     "https://www.googleapis.com/auth/dfatrafficking"
34742	//   ]
34743	// }
34744
34745}
34746
34747// method id "dfareporting.floodlightConfigurations.update":
34748
34749type FloodlightConfigurationsUpdateCall struct {
34750	s                       *Service
34751	profileId               int64
34752	floodlightconfiguration *FloodlightConfiguration
34753	urlParams_              gensupport.URLParams
34754	ctx_                    context.Context
34755	header_                 http.Header
34756}
34757
34758// Update: Updates an existing floodlight configuration.
34759func (r *FloodlightConfigurationsService) Update(profileId int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsUpdateCall {
34760	c := &FloodlightConfigurationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34761	c.profileId = profileId
34762	c.floodlightconfiguration = floodlightconfiguration
34763	return c
34764}
34765
34766// Fields allows partial responses to be retrieved. See
34767// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34768// for more information.
34769func (c *FloodlightConfigurationsUpdateCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsUpdateCall {
34770	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34771	return c
34772}
34773
34774// Context sets the context to be used in this call's Do method. Any
34775// pending HTTP request will be aborted if the provided context is
34776// canceled.
34777func (c *FloodlightConfigurationsUpdateCall) Context(ctx context.Context) *FloodlightConfigurationsUpdateCall {
34778	c.ctx_ = ctx
34779	return c
34780}
34781
34782// Header returns an http.Header that can be modified by the caller to
34783// add HTTP headers to the request.
34784func (c *FloodlightConfigurationsUpdateCall) Header() http.Header {
34785	if c.header_ == nil {
34786		c.header_ = make(http.Header)
34787	}
34788	return c.header_
34789}
34790
34791func (c *FloodlightConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
34792	reqHeaders := make(http.Header)
34793	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
34794	for k, v := range c.header_ {
34795		reqHeaders[k] = v
34796	}
34797	reqHeaders.Set("User-Agent", c.s.userAgent())
34798	var body io.Reader = nil
34799	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
34800	if err != nil {
34801		return nil, err
34802	}
34803	reqHeaders.Set("Content-Type", "application/json")
34804	c.urlParams_.Set("alt", alt)
34805	c.urlParams_.Set("prettyPrint", "false")
34806	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34807	urls += "?" + c.urlParams_.Encode()
34808	req, err := http.NewRequest("PUT", urls, body)
34809	if err != nil {
34810		return nil, err
34811	}
34812	req.Header = reqHeaders
34813	googleapi.Expand(req.URL, map[string]string{
34814		"profileId": strconv.FormatInt(c.profileId, 10),
34815	})
34816	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34817}
34818
34819// Do executes the "dfareporting.floodlightConfigurations.update" call.
34820// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34821// non-2xx status code is an error. Response headers are in either
34822// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34823// returned at all) in error.(*googleapi.Error).Header. Use
34824// googleapi.IsNotModified to check whether the returned error was
34825// because http.StatusNotModified was returned.
34826func (c *FloodlightConfigurationsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34827	gensupport.SetOptions(c.urlParams_, opts...)
34828	res, err := c.doRequest("json")
34829	if res != nil && res.StatusCode == http.StatusNotModified {
34830		if res.Body != nil {
34831			res.Body.Close()
34832		}
34833		return nil, &googleapi.Error{
34834			Code:   res.StatusCode,
34835			Header: res.Header,
34836		}
34837	}
34838	if err != nil {
34839		return nil, err
34840	}
34841	defer googleapi.CloseBody(res)
34842	if err := googleapi.CheckResponse(res); err != nil {
34843		return nil, err
34844	}
34845	ret := &FloodlightConfiguration{
34846		ServerResponse: googleapi.ServerResponse{
34847			Header:         res.Header,
34848			HTTPStatusCode: res.StatusCode,
34849		},
34850	}
34851	target := &ret
34852	if err := gensupport.DecodeResponse(target, res); err != nil {
34853		return nil, err
34854	}
34855	return ret, nil
34856	// {
34857	//   "description": "Updates an existing floodlight configuration.",
34858	//   "httpMethod": "PUT",
34859	//   "id": "dfareporting.floodlightConfigurations.update",
34860	//   "parameterOrder": [
34861	//     "profileId"
34862	//   ],
34863	//   "parameters": {
34864	//     "profileId": {
34865	//       "description": "User profile ID associated with this request.",
34866	//       "format": "int64",
34867	//       "location": "path",
34868	//       "required": true,
34869	//       "type": "string"
34870	//     }
34871	//   },
34872	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34873	//   "request": {
34874	//     "$ref": "FloodlightConfiguration"
34875	//   },
34876	//   "response": {
34877	//     "$ref": "FloodlightConfiguration"
34878	//   },
34879	//   "scopes": [
34880	//     "https://www.googleapis.com/auth/dfatrafficking"
34881	//   ]
34882	// }
34883
34884}
34885
34886// method id "dfareporting.inventoryItems.get":
34887
34888type InventoryItemsGetCall struct {
34889	s            *Service
34890	profileId    int64
34891	projectId    int64
34892	id           int64
34893	urlParams_   gensupport.URLParams
34894	ifNoneMatch_ string
34895	ctx_         context.Context
34896	header_      http.Header
34897}
34898
34899// Get: Gets one inventory item by ID.
34900func (r *InventoryItemsService) Get(profileId int64, projectId int64, id int64) *InventoryItemsGetCall {
34901	c := &InventoryItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34902	c.profileId = profileId
34903	c.projectId = projectId
34904	c.id = id
34905	return c
34906}
34907
34908// Fields allows partial responses to be retrieved. See
34909// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34910// for more information.
34911func (c *InventoryItemsGetCall) Fields(s ...googleapi.Field) *InventoryItemsGetCall {
34912	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34913	return c
34914}
34915
34916// IfNoneMatch sets the optional parameter which makes the operation
34917// fail if the object's ETag matches the given value. This is useful for
34918// getting updates only after the object has changed since the last
34919// request. Use googleapi.IsNotModified to check whether the response
34920// error from Do is the result of In-None-Match.
34921func (c *InventoryItemsGetCall) IfNoneMatch(entityTag string) *InventoryItemsGetCall {
34922	c.ifNoneMatch_ = entityTag
34923	return c
34924}
34925
34926// Context sets the context to be used in this call's Do method. Any
34927// pending HTTP request will be aborted if the provided context is
34928// canceled.
34929func (c *InventoryItemsGetCall) Context(ctx context.Context) *InventoryItemsGetCall {
34930	c.ctx_ = ctx
34931	return c
34932}
34933
34934// Header returns an http.Header that can be modified by the caller to
34935// add HTTP headers to the request.
34936func (c *InventoryItemsGetCall) Header() http.Header {
34937	if c.header_ == nil {
34938		c.header_ = make(http.Header)
34939	}
34940	return c.header_
34941}
34942
34943func (c *InventoryItemsGetCall) doRequest(alt string) (*http.Response, error) {
34944	reqHeaders := make(http.Header)
34945	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
34946	for k, v := range c.header_ {
34947		reqHeaders[k] = v
34948	}
34949	reqHeaders.Set("User-Agent", c.s.userAgent())
34950	if c.ifNoneMatch_ != "" {
34951		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34952	}
34953	var body io.Reader = nil
34954	c.urlParams_.Set("alt", alt)
34955	c.urlParams_.Set("prettyPrint", "false")
34956	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}")
34957	urls += "?" + c.urlParams_.Encode()
34958	req, err := http.NewRequest("GET", urls, body)
34959	if err != nil {
34960		return nil, err
34961	}
34962	req.Header = reqHeaders
34963	googleapi.Expand(req.URL, map[string]string{
34964		"profileId": strconv.FormatInt(c.profileId, 10),
34965		"projectId": strconv.FormatInt(c.projectId, 10),
34966		"id":        strconv.FormatInt(c.id, 10),
34967	})
34968	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34969}
34970
34971// Do executes the "dfareporting.inventoryItems.get" call.
34972// Exactly one of *InventoryItem or error will be non-nil. Any non-2xx
34973// status code is an error. Response headers are in either
34974// *InventoryItem.ServerResponse.Header or (if a response was returned
34975// 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 *InventoryItemsGetCall) Do(opts ...googleapi.CallOption) (*InventoryItem, 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 := &InventoryItem{
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": "Gets one inventory item by ID.",
35010	//   "httpMethod": "GET",
35011	//   "id": "dfareporting.inventoryItems.get",
35012	//   "parameterOrder": [
35013	//     "profileId",
35014	//     "projectId",
35015	//     "id"
35016	//   ],
35017	//   "parameters": {
35018	//     "id": {
35019	//       "description": "Inventory item ID.",
35020	//       "format": "int64",
35021	//       "location": "path",
35022	//       "required": true,
35023	//       "type": "string"
35024	//     },
35025	//     "profileId": {
35026	//       "description": "User profile ID associated with this request.",
35027	//       "format": "int64",
35028	//       "location": "path",
35029	//       "required": true,
35030	//       "type": "string"
35031	//     },
35032	//     "projectId": {
35033	//       "description": "Project ID for order documents.",
35034	//       "format": "int64",
35035	//       "location": "path",
35036	//       "required": true,
35037	//       "type": "string"
35038	//     }
35039	//   },
35040	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}",
35041	//   "response": {
35042	//     "$ref": "InventoryItem"
35043	//   },
35044	//   "scopes": [
35045	//     "https://www.googleapis.com/auth/dfatrafficking"
35046	//   ]
35047	// }
35048
35049}
35050
35051// method id "dfareporting.inventoryItems.list":
35052
35053type InventoryItemsListCall struct {
35054	s            *Service
35055	profileId    int64
35056	projectId    int64
35057	urlParams_   gensupport.URLParams
35058	ifNoneMatch_ string
35059	ctx_         context.Context
35060	header_      http.Header
35061}
35062
35063// List: Retrieves a list of inventory items, possibly filtered. This
35064// method supports paging.
35065func (r *InventoryItemsService) List(profileId int64, projectId int64) *InventoryItemsListCall {
35066	c := &InventoryItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35067	c.profileId = profileId
35068	c.projectId = projectId
35069	return c
35070}
35071
35072// Ids sets the optional parameter "ids": Select only inventory items
35073// with these IDs.
35074func (c *InventoryItemsListCall) Ids(ids ...int64) *InventoryItemsListCall {
35075	var ids_ []string
35076	for _, v := range ids {
35077		ids_ = append(ids_, fmt.Sprint(v))
35078	}
35079	c.urlParams_.SetMulti("ids", ids_)
35080	return c
35081}
35082
35083// InPlan sets the optional parameter "inPlan": Select only inventory
35084// items that are in plan.
35085func (c *InventoryItemsListCall) InPlan(inPlan bool) *InventoryItemsListCall {
35086	c.urlParams_.Set("inPlan", fmt.Sprint(inPlan))
35087	return c
35088}
35089
35090// MaxResults sets the optional parameter "maxResults": Maximum number
35091// of results to return.
35092func (c *InventoryItemsListCall) MaxResults(maxResults int64) *InventoryItemsListCall {
35093	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
35094	return c
35095}
35096
35097// OrderId sets the optional parameter "orderId": Select only inventory
35098// items that belong to specified orders.
35099func (c *InventoryItemsListCall) OrderId(orderId ...int64) *InventoryItemsListCall {
35100	var orderId_ []string
35101	for _, v := range orderId {
35102		orderId_ = append(orderId_, fmt.Sprint(v))
35103	}
35104	c.urlParams_.SetMulti("orderId", orderId_)
35105	return c
35106}
35107
35108// PageToken sets the optional parameter "pageToken": Value of the
35109// nextPageToken from the previous result page.
35110func (c *InventoryItemsListCall) PageToken(pageToken string) *InventoryItemsListCall {
35111	c.urlParams_.Set("pageToken", pageToken)
35112	return c
35113}
35114
35115// SiteId sets the optional parameter "siteId": Select only inventory
35116// items that are associated with these sites.
35117func (c *InventoryItemsListCall) SiteId(siteId ...int64) *InventoryItemsListCall {
35118	var siteId_ []string
35119	for _, v := range siteId {
35120		siteId_ = append(siteId_, fmt.Sprint(v))
35121	}
35122	c.urlParams_.SetMulti("siteId", siteId_)
35123	return c
35124}
35125
35126// SortField sets the optional parameter "sortField": Field by which to
35127// sort the list.
35128//
35129// Possible values:
35130//   "ID" (default)
35131//   "NAME"
35132func (c *InventoryItemsListCall) SortField(sortField string) *InventoryItemsListCall {
35133	c.urlParams_.Set("sortField", sortField)
35134	return c
35135}
35136
35137// SortOrder sets the optional parameter "sortOrder": Order of sorted
35138// results.
35139//
35140// Possible values:
35141//   "ASCENDING" (default)
35142//   "DESCENDING"
35143func (c *InventoryItemsListCall) SortOrder(sortOrder string) *InventoryItemsListCall {
35144	c.urlParams_.Set("sortOrder", sortOrder)
35145	return c
35146}
35147
35148// Type sets the optional parameter "type": Select only inventory items
35149// with this type.
35150//
35151// Possible values:
35152//   "PLANNING_PLACEMENT_TYPE_CREDIT"
35153//   "PLANNING_PLACEMENT_TYPE_REGULAR"
35154func (c *InventoryItemsListCall) Type(type_ string) *InventoryItemsListCall {
35155	c.urlParams_.Set("type", type_)
35156	return c
35157}
35158
35159// Fields allows partial responses to be retrieved. See
35160// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35161// for more information.
35162func (c *InventoryItemsListCall) Fields(s ...googleapi.Field) *InventoryItemsListCall {
35163	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35164	return c
35165}
35166
35167// IfNoneMatch sets the optional parameter which makes the operation
35168// fail if the object's ETag matches the given value. This is useful for
35169// getting updates only after the object has changed since the last
35170// request. Use googleapi.IsNotModified to check whether the response
35171// error from Do is the result of In-None-Match.
35172func (c *InventoryItemsListCall) IfNoneMatch(entityTag string) *InventoryItemsListCall {
35173	c.ifNoneMatch_ = entityTag
35174	return c
35175}
35176
35177// Context sets the context to be used in this call's Do method. Any
35178// pending HTTP request will be aborted if the provided context is
35179// canceled.
35180func (c *InventoryItemsListCall) Context(ctx context.Context) *InventoryItemsListCall {
35181	c.ctx_ = ctx
35182	return c
35183}
35184
35185// Header returns an http.Header that can be modified by the caller to
35186// add HTTP headers to the request.
35187func (c *InventoryItemsListCall) Header() http.Header {
35188	if c.header_ == nil {
35189		c.header_ = make(http.Header)
35190	}
35191	return c.header_
35192}
35193
35194func (c *InventoryItemsListCall) doRequest(alt string) (*http.Response, error) {
35195	reqHeaders := make(http.Header)
35196	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
35197	for k, v := range c.header_ {
35198		reqHeaders[k] = v
35199	}
35200	reqHeaders.Set("User-Agent", c.s.userAgent())
35201	if c.ifNoneMatch_ != "" {
35202		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35203	}
35204	var body io.Reader = nil
35205	c.urlParams_.Set("alt", alt)
35206	c.urlParams_.Set("prettyPrint", "false")
35207	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems")
35208	urls += "?" + c.urlParams_.Encode()
35209	req, err := http.NewRequest("GET", urls, body)
35210	if err != nil {
35211		return nil, err
35212	}
35213	req.Header = reqHeaders
35214	googleapi.Expand(req.URL, map[string]string{
35215		"profileId": strconv.FormatInt(c.profileId, 10),
35216		"projectId": strconv.FormatInt(c.projectId, 10),
35217	})
35218	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35219}
35220
35221// Do executes the "dfareporting.inventoryItems.list" call.
35222// Exactly one of *InventoryItemsListResponse or error will be non-nil.
35223// Any non-2xx status code is an error. Response headers are in either
35224// *InventoryItemsListResponse.ServerResponse.Header or (if a response
35225// was returned at all) in error.(*googleapi.Error).Header. Use
35226// googleapi.IsNotModified to check whether the returned error was
35227// because http.StatusNotModified was returned.
35228func (c *InventoryItemsListCall) Do(opts ...googleapi.CallOption) (*InventoryItemsListResponse, error) {
35229	gensupport.SetOptions(c.urlParams_, opts...)
35230	res, err := c.doRequest("json")
35231	if res != nil && res.StatusCode == http.StatusNotModified {
35232		if res.Body != nil {
35233			res.Body.Close()
35234		}
35235		return nil, &googleapi.Error{
35236			Code:   res.StatusCode,
35237			Header: res.Header,
35238		}
35239	}
35240	if err != nil {
35241		return nil, err
35242	}
35243	defer googleapi.CloseBody(res)
35244	if err := googleapi.CheckResponse(res); err != nil {
35245		return nil, err
35246	}
35247	ret := &InventoryItemsListResponse{
35248		ServerResponse: googleapi.ServerResponse{
35249			Header:         res.Header,
35250			HTTPStatusCode: res.StatusCode,
35251		},
35252	}
35253	target := &ret
35254	if err := gensupport.DecodeResponse(target, res); err != nil {
35255		return nil, err
35256	}
35257	return ret, nil
35258	// {
35259	//   "description": "Retrieves a list of inventory items, possibly filtered. This method supports paging.",
35260	//   "httpMethod": "GET",
35261	//   "id": "dfareporting.inventoryItems.list",
35262	//   "parameterOrder": [
35263	//     "profileId",
35264	//     "projectId"
35265	//   ],
35266	//   "parameters": {
35267	//     "ids": {
35268	//       "description": "Select only inventory items with these IDs.",
35269	//       "format": "int64",
35270	//       "location": "query",
35271	//       "repeated": true,
35272	//       "type": "string"
35273	//     },
35274	//     "inPlan": {
35275	//       "description": "Select only inventory items that are in plan.",
35276	//       "location": "query",
35277	//       "type": "boolean"
35278	//     },
35279	//     "maxResults": {
35280	//       "default": "1000",
35281	//       "description": "Maximum number of results to return.",
35282	//       "format": "int32",
35283	//       "location": "query",
35284	//       "maximum": "1000",
35285	//       "minimum": "0",
35286	//       "type": "integer"
35287	//     },
35288	//     "orderId": {
35289	//       "description": "Select only inventory items that belong to specified orders.",
35290	//       "format": "int64",
35291	//       "location": "query",
35292	//       "repeated": true,
35293	//       "type": "string"
35294	//     },
35295	//     "pageToken": {
35296	//       "description": "Value of the nextPageToken from the previous result page.",
35297	//       "location": "query",
35298	//       "type": "string"
35299	//     },
35300	//     "profileId": {
35301	//       "description": "User profile ID associated with this request.",
35302	//       "format": "int64",
35303	//       "location": "path",
35304	//       "required": true,
35305	//       "type": "string"
35306	//     },
35307	//     "projectId": {
35308	//       "description": "Project ID for order documents.",
35309	//       "format": "int64",
35310	//       "location": "path",
35311	//       "required": true,
35312	//       "type": "string"
35313	//     },
35314	//     "siteId": {
35315	//       "description": "Select only inventory items that are associated with these sites.",
35316	//       "format": "int64",
35317	//       "location": "query",
35318	//       "repeated": true,
35319	//       "type": "string"
35320	//     },
35321	//     "sortField": {
35322	//       "default": "ID",
35323	//       "description": "Field by which to sort the list.",
35324	//       "enum": [
35325	//         "ID",
35326	//         "NAME"
35327	//       ],
35328	//       "enumDescriptions": [
35329	//         "",
35330	//         ""
35331	//       ],
35332	//       "location": "query",
35333	//       "type": "string"
35334	//     },
35335	//     "sortOrder": {
35336	//       "default": "ASCENDING",
35337	//       "description": "Order of sorted results.",
35338	//       "enum": [
35339	//         "ASCENDING",
35340	//         "DESCENDING"
35341	//       ],
35342	//       "enumDescriptions": [
35343	//         "",
35344	//         ""
35345	//       ],
35346	//       "location": "query",
35347	//       "type": "string"
35348	//     },
35349	//     "type": {
35350	//       "description": "Select only inventory items with this type.",
35351	//       "enum": [
35352	//         "PLANNING_PLACEMENT_TYPE_CREDIT",
35353	//         "PLANNING_PLACEMENT_TYPE_REGULAR"
35354	//       ],
35355	//       "enumDescriptions": [
35356	//         "",
35357	//         ""
35358	//       ],
35359	//       "location": "query",
35360	//       "type": "string"
35361	//     }
35362	//   },
35363	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems",
35364	//   "response": {
35365	//     "$ref": "InventoryItemsListResponse"
35366	//   },
35367	//   "scopes": [
35368	//     "https://www.googleapis.com/auth/dfatrafficking"
35369	//   ]
35370	// }
35371
35372}
35373
35374// Pages invokes f for each page of results.
35375// A non-nil error returned from f will halt the iteration.
35376// The provided context supersedes any context provided to the Context method.
35377func (c *InventoryItemsListCall) Pages(ctx context.Context, f func(*InventoryItemsListResponse) error) error {
35378	c.ctx_ = ctx
35379	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
35380	for {
35381		x, err := c.Do()
35382		if err != nil {
35383			return err
35384		}
35385		if err := f(x); err != nil {
35386			return err
35387		}
35388		if x.NextPageToken == "" {
35389			return nil
35390		}
35391		c.PageToken(x.NextPageToken)
35392	}
35393}
35394
35395// method id "dfareporting.languages.list":
35396
35397type LanguagesListCall struct {
35398	s            *Service
35399	profileId    int64
35400	urlParams_   gensupport.URLParams
35401	ifNoneMatch_ string
35402	ctx_         context.Context
35403	header_      http.Header
35404}
35405
35406// List: Retrieves a list of languages.
35407func (r *LanguagesService) List(profileId int64) *LanguagesListCall {
35408	c := &LanguagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35409	c.profileId = profileId
35410	return c
35411}
35412
35413// Fields allows partial responses to be retrieved. See
35414// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35415// for more information.
35416func (c *LanguagesListCall) Fields(s ...googleapi.Field) *LanguagesListCall {
35417	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35418	return c
35419}
35420
35421// IfNoneMatch sets the optional parameter which makes the operation
35422// fail if the object's ETag matches the given value. This is useful for
35423// getting updates only after the object has changed since the last
35424// request. Use googleapi.IsNotModified to check whether the response
35425// error from Do is the result of In-None-Match.
35426func (c *LanguagesListCall) IfNoneMatch(entityTag string) *LanguagesListCall {
35427	c.ifNoneMatch_ = entityTag
35428	return c
35429}
35430
35431// Context sets the context to be used in this call's Do method. Any
35432// pending HTTP request will be aborted if the provided context is
35433// canceled.
35434func (c *LanguagesListCall) Context(ctx context.Context) *LanguagesListCall {
35435	c.ctx_ = ctx
35436	return c
35437}
35438
35439// Header returns an http.Header that can be modified by the caller to
35440// add HTTP headers to the request.
35441func (c *LanguagesListCall) Header() http.Header {
35442	if c.header_ == nil {
35443		c.header_ = make(http.Header)
35444	}
35445	return c.header_
35446}
35447
35448func (c *LanguagesListCall) doRequest(alt string) (*http.Response, error) {
35449	reqHeaders := make(http.Header)
35450	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
35451	for k, v := range c.header_ {
35452		reqHeaders[k] = v
35453	}
35454	reqHeaders.Set("User-Agent", c.s.userAgent())
35455	if c.ifNoneMatch_ != "" {
35456		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35457	}
35458	var body io.Reader = nil
35459	c.urlParams_.Set("alt", alt)
35460	c.urlParams_.Set("prettyPrint", "false")
35461	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/languages")
35462	urls += "?" + c.urlParams_.Encode()
35463	req, err := http.NewRequest("GET", urls, body)
35464	if err != nil {
35465		return nil, err
35466	}
35467	req.Header = reqHeaders
35468	googleapi.Expand(req.URL, map[string]string{
35469		"profileId": strconv.FormatInt(c.profileId, 10),
35470	})
35471	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35472}
35473
35474// Do executes the "dfareporting.languages.list" call.
35475// Exactly one of *LanguagesListResponse or error will be non-nil. Any
35476// non-2xx status code is an error. Response headers are in either
35477// *LanguagesListResponse.ServerResponse.Header or (if a response was
35478// returned at all) in error.(*googleapi.Error).Header. Use
35479// googleapi.IsNotModified to check whether the returned error was
35480// because http.StatusNotModified was returned.
35481func (c *LanguagesListCall) Do(opts ...googleapi.CallOption) (*LanguagesListResponse, error) {
35482	gensupport.SetOptions(c.urlParams_, opts...)
35483	res, err := c.doRequest("json")
35484	if res != nil && res.StatusCode == http.StatusNotModified {
35485		if res.Body != nil {
35486			res.Body.Close()
35487		}
35488		return nil, &googleapi.Error{
35489			Code:   res.StatusCode,
35490			Header: res.Header,
35491		}
35492	}
35493	if err != nil {
35494		return nil, err
35495	}
35496	defer googleapi.CloseBody(res)
35497	if err := googleapi.CheckResponse(res); err != nil {
35498		return nil, err
35499	}
35500	ret := &LanguagesListResponse{
35501		ServerResponse: googleapi.ServerResponse{
35502			Header:         res.Header,
35503			HTTPStatusCode: res.StatusCode,
35504		},
35505	}
35506	target := &ret
35507	if err := gensupport.DecodeResponse(target, res); err != nil {
35508		return nil, err
35509	}
35510	return ret, nil
35511	// {
35512	//   "description": "Retrieves a list of languages.",
35513	//   "httpMethod": "GET",
35514	//   "id": "dfareporting.languages.list",
35515	//   "parameterOrder": [
35516	//     "profileId"
35517	//   ],
35518	//   "parameters": {
35519	//     "profileId": {
35520	//       "description": "User profile ID associated with this request.",
35521	//       "format": "int64",
35522	//       "location": "path",
35523	//       "required": true,
35524	//       "type": "string"
35525	//     }
35526	//   },
35527	//   "path": "userprofiles/{profileId}/languages",
35528	//   "response": {
35529	//     "$ref": "LanguagesListResponse"
35530	//   },
35531	//   "scopes": [
35532	//     "https://www.googleapis.com/auth/dfatrafficking"
35533	//   ]
35534	// }
35535
35536}
35537
35538// method id "dfareporting.metros.list":
35539
35540type MetrosListCall struct {
35541	s            *Service
35542	profileId    int64
35543	urlParams_   gensupport.URLParams
35544	ifNoneMatch_ string
35545	ctx_         context.Context
35546	header_      http.Header
35547}
35548
35549// List: Retrieves a list of metros.
35550func (r *MetrosService) List(profileId int64) *MetrosListCall {
35551	c := &MetrosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35552	c.profileId = profileId
35553	return c
35554}
35555
35556// Fields allows partial responses to be retrieved. See
35557// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35558// for more information.
35559func (c *MetrosListCall) Fields(s ...googleapi.Field) *MetrosListCall {
35560	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35561	return c
35562}
35563
35564// IfNoneMatch sets the optional parameter which makes the operation
35565// fail if the object's ETag matches the given value. This is useful for
35566// getting updates only after the object has changed since the last
35567// request. Use googleapi.IsNotModified to check whether the response
35568// error from Do is the result of In-None-Match.
35569func (c *MetrosListCall) IfNoneMatch(entityTag string) *MetrosListCall {
35570	c.ifNoneMatch_ = entityTag
35571	return c
35572}
35573
35574// Context sets the context to be used in this call's Do method. Any
35575// pending HTTP request will be aborted if the provided context is
35576// canceled.
35577func (c *MetrosListCall) Context(ctx context.Context) *MetrosListCall {
35578	c.ctx_ = ctx
35579	return c
35580}
35581
35582// Header returns an http.Header that can be modified by the caller to
35583// add HTTP headers to the request.
35584func (c *MetrosListCall) Header() http.Header {
35585	if c.header_ == nil {
35586		c.header_ = make(http.Header)
35587	}
35588	return c.header_
35589}
35590
35591func (c *MetrosListCall) doRequest(alt string) (*http.Response, error) {
35592	reqHeaders := make(http.Header)
35593	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
35594	for k, v := range c.header_ {
35595		reqHeaders[k] = v
35596	}
35597	reqHeaders.Set("User-Agent", c.s.userAgent())
35598	if c.ifNoneMatch_ != "" {
35599		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35600	}
35601	var body io.Reader = nil
35602	c.urlParams_.Set("alt", alt)
35603	c.urlParams_.Set("prettyPrint", "false")
35604	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/metros")
35605	urls += "?" + c.urlParams_.Encode()
35606	req, err := http.NewRequest("GET", urls, body)
35607	if err != nil {
35608		return nil, err
35609	}
35610	req.Header = reqHeaders
35611	googleapi.Expand(req.URL, map[string]string{
35612		"profileId": strconv.FormatInt(c.profileId, 10),
35613	})
35614	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35615}
35616
35617// Do executes the "dfareporting.metros.list" call.
35618// Exactly one of *MetrosListResponse or error will be non-nil. Any
35619// non-2xx status code is an error. Response headers are in either
35620// *MetrosListResponse.ServerResponse.Header or (if a response was
35621// returned at all) in error.(*googleapi.Error).Header. Use
35622// googleapi.IsNotModified to check whether the returned error was
35623// because http.StatusNotModified was returned.
35624func (c *MetrosListCall) Do(opts ...googleapi.CallOption) (*MetrosListResponse, error) {
35625	gensupport.SetOptions(c.urlParams_, opts...)
35626	res, err := c.doRequest("json")
35627	if res != nil && res.StatusCode == http.StatusNotModified {
35628		if res.Body != nil {
35629			res.Body.Close()
35630		}
35631		return nil, &googleapi.Error{
35632			Code:   res.StatusCode,
35633			Header: res.Header,
35634		}
35635	}
35636	if err != nil {
35637		return nil, err
35638	}
35639	defer googleapi.CloseBody(res)
35640	if err := googleapi.CheckResponse(res); err != nil {
35641		return nil, err
35642	}
35643	ret := &MetrosListResponse{
35644		ServerResponse: googleapi.ServerResponse{
35645			Header:         res.Header,
35646			HTTPStatusCode: res.StatusCode,
35647		},
35648	}
35649	target := &ret
35650	if err := gensupport.DecodeResponse(target, res); err != nil {
35651		return nil, err
35652	}
35653	return ret, nil
35654	// {
35655	//   "description": "Retrieves a list of metros.",
35656	//   "httpMethod": "GET",
35657	//   "id": "dfareporting.metros.list",
35658	//   "parameterOrder": [
35659	//     "profileId"
35660	//   ],
35661	//   "parameters": {
35662	//     "profileId": {
35663	//       "description": "User profile ID associated with this request.",
35664	//       "format": "int64",
35665	//       "location": "path",
35666	//       "required": true,
35667	//       "type": "string"
35668	//     }
35669	//   },
35670	//   "path": "userprofiles/{profileId}/metros",
35671	//   "response": {
35672	//     "$ref": "MetrosListResponse"
35673	//   },
35674	//   "scopes": [
35675	//     "https://www.googleapis.com/auth/dfatrafficking"
35676	//   ]
35677	// }
35678
35679}
35680
35681// method id "dfareporting.mobileCarriers.get":
35682
35683type MobileCarriersGetCall struct {
35684	s            *Service
35685	profileId    int64
35686	id           int64
35687	urlParams_   gensupport.URLParams
35688	ifNoneMatch_ string
35689	ctx_         context.Context
35690	header_      http.Header
35691}
35692
35693// Get: Gets one mobile carrier by ID.
35694func (r *MobileCarriersService) Get(profileId int64, id int64) *MobileCarriersGetCall {
35695	c := &MobileCarriersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35696	c.profileId = profileId
35697	c.id = id
35698	return c
35699}
35700
35701// Fields allows partial responses to be retrieved. See
35702// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35703// for more information.
35704func (c *MobileCarriersGetCall) Fields(s ...googleapi.Field) *MobileCarriersGetCall {
35705	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35706	return c
35707}
35708
35709// IfNoneMatch sets the optional parameter which makes the operation
35710// fail if the object's ETag matches the given value. This is useful for
35711// getting updates only after the object has changed since the last
35712// request. Use googleapi.IsNotModified to check whether the response
35713// error from Do is the result of In-None-Match.
35714func (c *MobileCarriersGetCall) IfNoneMatch(entityTag string) *MobileCarriersGetCall {
35715	c.ifNoneMatch_ = entityTag
35716	return c
35717}
35718
35719// Context sets the context to be used in this call's Do method. Any
35720// pending HTTP request will be aborted if the provided context is
35721// canceled.
35722func (c *MobileCarriersGetCall) Context(ctx context.Context) *MobileCarriersGetCall {
35723	c.ctx_ = ctx
35724	return c
35725}
35726
35727// Header returns an http.Header that can be modified by the caller to
35728// add HTTP headers to the request.
35729func (c *MobileCarriersGetCall) Header() http.Header {
35730	if c.header_ == nil {
35731		c.header_ = make(http.Header)
35732	}
35733	return c.header_
35734}
35735
35736func (c *MobileCarriersGetCall) doRequest(alt string) (*http.Response, error) {
35737	reqHeaders := make(http.Header)
35738	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
35739	for k, v := range c.header_ {
35740		reqHeaders[k] = v
35741	}
35742	reqHeaders.Set("User-Agent", c.s.userAgent())
35743	if c.ifNoneMatch_ != "" {
35744		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35745	}
35746	var body io.Reader = nil
35747	c.urlParams_.Set("alt", alt)
35748	c.urlParams_.Set("prettyPrint", "false")
35749	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers/{id}")
35750	urls += "?" + c.urlParams_.Encode()
35751	req, err := http.NewRequest("GET", urls, body)
35752	if err != nil {
35753		return nil, err
35754	}
35755	req.Header = reqHeaders
35756	googleapi.Expand(req.URL, map[string]string{
35757		"profileId": strconv.FormatInt(c.profileId, 10),
35758		"id":        strconv.FormatInt(c.id, 10),
35759	})
35760	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35761}
35762
35763// Do executes the "dfareporting.mobileCarriers.get" call.
35764// Exactly one of *MobileCarrier or error will be non-nil. Any non-2xx
35765// status code is an error. Response headers are in either
35766// *MobileCarrier.ServerResponse.Header or (if a response was returned
35767// at all) in error.(*googleapi.Error).Header. Use
35768// googleapi.IsNotModified to check whether the returned error was
35769// because http.StatusNotModified was returned.
35770func (c *MobileCarriersGetCall) Do(opts ...googleapi.CallOption) (*MobileCarrier, error) {
35771	gensupport.SetOptions(c.urlParams_, opts...)
35772	res, err := c.doRequest("json")
35773	if res != nil && res.StatusCode == http.StatusNotModified {
35774		if res.Body != nil {
35775			res.Body.Close()
35776		}
35777		return nil, &googleapi.Error{
35778			Code:   res.StatusCode,
35779			Header: res.Header,
35780		}
35781	}
35782	if err != nil {
35783		return nil, err
35784	}
35785	defer googleapi.CloseBody(res)
35786	if err := googleapi.CheckResponse(res); err != nil {
35787		return nil, err
35788	}
35789	ret := &MobileCarrier{
35790		ServerResponse: googleapi.ServerResponse{
35791			Header:         res.Header,
35792			HTTPStatusCode: res.StatusCode,
35793		},
35794	}
35795	target := &ret
35796	if err := gensupport.DecodeResponse(target, res); err != nil {
35797		return nil, err
35798	}
35799	return ret, nil
35800	// {
35801	//   "description": "Gets one mobile carrier by ID.",
35802	//   "httpMethod": "GET",
35803	//   "id": "dfareporting.mobileCarriers.get",
35804	//   "parameterOrder": [
35805	//     "profileId",
35806	//     "id"
35807	//   ],
35808	//   "parameters": {
35809	//     "id": {
35810	//       "description": "Mobile carrier ID.",
35811	//       "format": "int64",
35812	//       "location": "path",
35813	//       "required": true,
35814	//       "type": "string"
35815	//     },
35816	//     "profileId": {
35817	//       "description": "User profile ID associated with this request.",
35818	//       "format": "int64",
35819	//       "location": "path",
35820	//       "required": true,
35821	//       "type": "string"
35822	//     }
35823	//   },
35824	//   "path": "userprofiles/{profileId}/mobileCarriers/{id}",
35825	//   "response": {
35826	//     "$ref": "MobileCarrier"
35827	//   },
35828	//   "scopes": [
35829	//     "https://www.googleapis.com/auth/dfatrafficking"
35830	//   ]
35831	// }
35832
35833}
35834
35835// method id "dfareporting.mobileCarriers.list":
35836
35837type MobileCarriersListCall struct {
35838	s            *Service
35839	profileId    int64
35840	urlParams_   gensupport.URLParams
35841	ifNoneMatch_ string
35842	ctx_         context.Context
35843	header_      http.Header
35844}
35845
35846// List: Retrieves a list of mobile carriers.
35847func (r *MobileCarriersService) List(profileId int64) *MobileCarriersListCall {
35848	c := &MobileCarriersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35849	c.profileId = profileId
35850	return c
35851}
35852
35853// Fields allows partial responses to be retrieved. See
35854// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35855// for more information.
35856func (c *MobileCarriersListCall) Fields(s ...googleapi.Field) *MobileCarriersListCall {
35857	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35858	return c
35859}
35860
35861// IfNoneMatch sets the optional parameter which makes the operation
35862// fail if the object's ETag matches the given value. This is useful for
35863// getting updates only after the object has changed since the last
35864// request. Use googleapi.IsNotModified to check whether the response
35865// error from Do is the result of In-None-Match.
35866func (c *MobileCarriersListCall) IfNoneMatch(entityTag string) *MobileCarriersListCall {
35867	c.ifNoneMatch_ = entityTag
35868	return c
35869}
35870
35871// Context sets the context to be used in this call's Do method. Any
35872// pending HTTP request will be aborted if the provided context is
35873// canceled.
35874func (c *MobileCarriersListCall) Context(ctx context.Context) *MobileCarriersListCall {
35875	c.ctx_ = ctx
35876	return c
35877}
35878
35879// Header returns an http.Header that can be modified by the caller to
35880// add HTTP headers to the request.
35881func (c *MobileCarriersListCall) Header() http.Header {
35882	if c.header_ == nil {
35883		c.header_ = make(http.Header)
35884	}
35885	return c.header_
35886}
35887
35888func (c *MobileCarriersListCall) doRequest(alt string) (*http.Response, error) {
35889	reqHeaders := make(http.Header)
35890	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
35891	for k, v := range c.header_ {
35892		reqHeaders[k] = v
35893	}
35894	reqHeaders.Set("User-Agent", c.s.userAgent())
35895	if c.ifNoneMatch_ != "" {
35896		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35897	}
35898	var body io.Reader = nil
35899	c.urlParams_.Set("alt", alt)
35900	c.urlParams_.Set("prettyPrint", "false")
35901	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers")
35902	urls += "?" + c.urlParams_.Encode()
35903	req, err := http.NewRequest("GET", urls, body)
35904	if err != nil {
35905		return nil, err
35906	}
35907	req.Header = reqHeaders
35908	googleapi.Expand(req.URL, map[string]string{
35909		"profileId": strconv.FormatInt(c.profileId, 10),
35910	})
35911	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35912}
35913
35914// Do executes the "dfareporting.mobileCarriers.list" call.
35915// Exactly one of *MobileCarriersListResponse or error will be non-nil.
35916// Any non-2xx status code is an error. Response headers are in either
35917// *MobileCarriersListResponse.ServerResponse.Header or (if a response
35918// was returned at all) in error.(*googleapi.Error).Header. Use
35919// googleapi.IsNotModified to check whether the returned error was
35920// because http.StatusNotModified was returned.
35921func (c *MobileCarriersListCall) Do(opts ...googleapi.CallOption) (*MobileCarriersListResponse, error) {
35922	gensupport.SetOptions(c.urlParams_, opts...)
35923	res, err := c.doRequest("json")
35924	if res != nil && res.StatusCode == http.StatusNotModified {
35925		if res.Body != nil {
35926			res.Body.Close()
35927		}
35928		return nil, &googleapi.Error{
35929			Code:   res.StatusCode,
35930			Header: res.Header,
35931		}
35932	}
35933	if err != nil {
35934		return nil, err
35935	}
35936	defer googleapi.CloseBody(res)
35937	if err := googleapi.CheckResponse(res); err != nil {
35938		return nil, err
35939	}
35940	ret := &MobileCarriersListResponse{
35941		ServerResponse: googleapi.ServerResponse{
35942			Header:         res.Header,
35943			HTTPStatusCode: res.StatusCode,
35944		},
35945	}
35946	target := &ret
35947	if err := gensupport.DecodeResponse(target, res); err != nil {
35948		return nil, err
35949	}
35950	return ret, nil
35951	// {
35952	//   "description": "Retrieves a list of mobile carriers.",
35953	//   "httpMethod": "GET",
35954	//   "id": "dfareporting.mobileCarriers.list",
35955	//   "parameterOrder": [
35956	//     "profileId"
35957	//   ],
35958	//   "parameters": {
35959	//     "profileId": {
35960	//       "description": "User profile ID associated with this request.",
35961	//       "format": "int64",
35962	//       "location": "path",
35963	//       "required": true,
35964	//       "type": "string"
35965	//     }
35966	//   },
35967	//   "path": "userprofiles/{profileId}/mobileCarriers",
35968	//   "response": {
35969	//     "$ref": "MobileCarriersListResponse"
35970	//   },
35971	//   "scopes": [
35972	//     "https://www.googleapis.com/auth/dfatrafficking"
35973	//   ]
35974	// }
35975
35976}
35977
35978// method id "dfareporting.operatingSystemVersions.get":
35979
35980type OperatingSystemVersionsGetCall struct {
35981	s            *Service
35982	profileId    int64
35983	id           int64
35984	urlParams_   gensupport.URLParams
35985	ifNoneMatch_ string
35986	ctx_         context.Context
35987	header_      http.Header
35988}
35989
35990// Get: Gets one operating system version by ID.
35991func (r *OperatingSystemVersionsService) Get(profileId int64, id int64) *OperatingSystemVersionsGetCall {
35992	c := &OperatingSystemVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35993	c.profileId = profileId
35994	c.id = id
35995	return c
35996}
35997
35998// Fields allows partial responses to be retrieved. See
35999// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36000// for more information.
36001func (c *OperatingSystemVersionsGetCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsGetCall {
36002	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36003	return c
36004}
36005
36006// IfNoneMatch sets the optional parameter which makes the operation
36007// fail if the object's ETag matches the given value. This is useful for
36008// getting updates only after the object has changed since the last
36009// request. Use googleapi.IsNotModified to check whether the response
36010// error from Do is the result of In-None-Match.
36011func (c *OperatingSystemVersionsGetCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsGetCall {
36012	c.ifNoneMatch_ = entityTag
36013	return c
36014}
36015
36016// Context sets the context to be used in this call's Do method. Any
36017// pending HTTP request will be aborted if the provided context is
36018// canceled.
36019func (c *OperatingSystemVersionsGetCall) Context(ctx context.Context) *OperatingSystemVersionsGetCall {
36020	c.ctx_ = ctx
36021	return c
36022}
36023
36024// Header returns an http.Header that can be modified by the caller to
36025// add HTTP headers to the request.
36026func (c *OperatingSystemVersionsGetCall) Header() http.Header {
36027	if c.header_ == nil {
36028		c.header_ = make(http.Header)
36029	}
36030	return c.header_
36031}
36032
36033func (c *OperatingSystemVersionsGetCall) doRequest(alt string) (*http.Response, error) {
36034	reqHeaders := make(http.Header)
36035	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
36036	for k, v := range c.header_ {
36037		reqHeaders[k] = v
36038	}
36039	reqHeaders.Set("User-Agent", c.s.userAgent())
36040	if c.ifNoneMatch_ != "" {
36041		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36042	}
36043	var body io.Reader = nil
36044	c.urlParams_.Set("alt", alt)
36045	c.urlParams_.Set("prettyPrint", "false")
36046	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions/{id}")
36047	urls += "?" + c.urlParams_.Encode()
36048	req, err := http.NewRequest("GET", urls, body)
36049	if err != nil {
36050		return nil, err
36051	}
36052	req.Header = reqHeaders
36053	googleapi.Expand(req.URL, map[string]string{
36054		"profileId": strconv.FormatInt(c.profileId, 10),
36055		"id":        strconv.FormatInt(c.id, 10),
36056	})
36057	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36058}
36059
36060// Do executes the "dfareporting.operatingSystemVersions.get" call.
36061// Exactly one of *OperatingSystemVersion or error will be non-nil. Any
36062// non-2xx status code is an error. Response headers are in either
36063// *OperatingSystemVersion.ServerResponse.Header or (if a response was
36064// returned at all) in error.(*googleapi.Error).Header. Use
36065// googleapi.IsNotModified to check whether the returned error was
36066// because http.StatusNotModified was returned.
36067func (c *OperatingSystemVersionsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersion, error) {
36068	gensupport.SetOptions(c.urlParams_, opts...)
36069	res, err := c.doRequest("json")
36070	if res != nil && res.StatusCode == http.StatusNotModified {
36071		if res.Body != nil {
36072			res.Body.Close()
36073		}
36074		return nil, &googleapi.Error{
36075			Code:   res.StatusCode,
36076			Header: res.Header,
36077		}
36078	}
36079	if err != nil {
36080		return nil, err
36081	}
36082	defer googleapi.CloseBody(res)
36083	if err := googleapi.CheckResponse(res); err != nil {
36084		return nil, err
36085	}
36086	ret := &OperatingSystemVersion{
36087		ServerResponse: googleapi.ServerResponse{
36088			Header:         res.Header,
36089			HTTPStatusCode: res.StatusCode,
36090		},
36091	}
36092	target := &ret
36093	if err := gensupport.DecodeResponse(target, res); err != nil {
36094		return nil, err
36095	}
36096	return ret, nil
36097	// {
36098	//   "description": "Gets one operating system version by ID.",
36099	//   "httpMethod": "GET",
36100	//   "id": "dfareporting.operatingSystemVersions.get",
36101	//   "parameterOrder": [
36102	//     "profileId",
36103	//     "id"
36104	//   ],
36105	//   "parameters": {
36106	//     "id": {
36107	//       "description": "Operating system version ID.",
36108	//       "format": "int64",
36109	//       "location": "path",
36110	//       "required": true,
36111	//       "type": "string"
36112	//     },
36113	//     "profileId": {
36114	//       "description": "User profile ID associated with this request.",
36115	//       "format": "int64",
36116	//       "location": "path",
36117	//       "required": true,
36118	//       "type": "string"
36119	//     }
36120	//   },
36121	//   "path": "userprofiles/{profileId}/operatingSystemVersions/{id}",
36122	//   "response": {
36123	//     "$ref": "OperatingSystemVersion"
36124	//   },
36125	//   "scopes": [
36126	//     "https://www.googleapis.com/auth/dfatrafficking"
36127	//   ]
36128	// }
36129
36130}
36131
36132// method id "dfareporting.operatingSystemVersions.list":
36133
36134type OperatingSystemVersionsListCall struct {
36135	s            *Service
36136	profileId    int64
36137	urlParams_   gensupport.URLParams
36138	ifNoneMatch_ string
36139	ctx_         context.Context
36140	header_      http.Header
36141}
36142
36143// List: Retrieves a list of operating system versions.
36144func (r *OperatingSystemVersionsService) List(profileId int64) *OperatingSystemVersionsListCall {
36145	c := &OperatingSystemVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36146	c.profileId = profileId
36147	return c
36148}
36149
36150// Fields allows partial responses to be retrieved. See
36151// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36152// for more information.
36153func (c *OperatingSystemVersionsListCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsListCall {
36154	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36155	return c
36156}
36157
36158// IfNoneMatch sets the optional parameter which makes the operation
36159// fail if the object's ETag matches the given value. This is useful for
36160// getting updates only after the object has changed since the last
36161// request. Use googleapi.IsNotModified to check whether the response
36162// error from Do is the result of In-None-Match.
36163func (c *OperatingSystemVersionsListCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsListCall {
36164	c.ifNoneMatch_ = entityTag
36165	return c
36166}
36167
36168// Context sets the context to be used in this call's Do method. Any
36169// pending HTTP request will be aborted if the provided context is
36170// canceled.
36171func (c *OperatingSystemVersionsListCall) Context(ctx context.Context) *OperatingSystemVersionsListCall {
36172	c.ctx_ = ctx
36173	return c
36174}
36175
36176// Header returns an http.Header that can be modified by the caller to
36177// add HTTP headers to the request.
36178func (c *OperatingSystemVersionsListCall) Header() http.Header {
36179	if c.header_ == nil {
36180		c.header_ = make(http.Header)
36181	}
36182	return c.header_
36183}
36184
36185func (c *OperatingSystemVersionsListCall) doRequest(alt string) (*http.Response, error) {
36186	reqHeaders := make(http.Header)
36187	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
36188	for k, v := range c.header_ {
36189		reqHeaders[k] = v
36190	}
36191	reqHeaders.Set("User-Agent", c.s.userAgent())
36192	if c.ifNoneMatch_ != "" {
36193		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36194	}
36195	var body io.Reader = nil
36196	c.urlParams_.Set("alt", alt)
36197	c.urlParams_.Set("prettyPrint", "false")
36198	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions")
36199	urls += "?" + c.urlParams_.Encode()
36200	req, err := http.NewRequest("GET", urls, body)
36201	if err != nil {
36202		return nil, err
36203	}
36204	req.Header = reqHeaders
36205	googleapi.Expand(req.URL, map[string]string{
36206		"profileId": strconv.FormatInt(c.profileId, 10),
36207	})
36208	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36209}
36210
36211// Do executes the "dfareporting.operatingSystemVersions.list" call.
36212// Exactly one of *OperatingSystemVersionsListResponse or error will be
36213// non-nil. Any non-2xx status code is an error. Response headers are in
36214// either *OperatingSystemVersionsListResponse.ServerResponse.Header or
36215// (if a response was returned at all) in
36216// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
36217// whether the returned error was because http.StatusNotModified was
36218// returned.
36219func (c *OperatingSystemVersionsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersionsListResponse, error) {
36220	gensupport.SetOptions(c.urlParams_, opts...)
36221	res, err := c.doRequest("json")
36222	if res != nil && res.StatusCode == http.StatusNotModified {
36223		if res.Body != nil {
36224			res.Body.Close()
36225		}
36226		return nil, &googleapi.Error{
36227			Code:   res.StatusCode,
36228			Header: res.Header,
36229		}
36230	}
36231	if err != nil {
36232		return nil, err
36233	}
36234	defer googleapi.CloseBody(res)
36235	if err := googleapi.CheckResponse(res); err != nil {
36236		return nil, err
36237	}
36238	ret := &OperatingSystemVersionsListResponse{
36239		ServerResponse: googleapi.ServerResponse{
36240			Header:         res.Header,
36241			HTTPStatusCode: res.StatusCode,
36242		},
36243	}
36244	target := &ret
36245	if err := gensupport.DecodeResponse(target, res); err != nil {
36246		return nil, err
36247	}
36248	return ret, nil
36249	// {
36250	//   "description": "Retrieves a list of operating system versions.",
36251	//   "httpMethod": "GET",
36252	//   "id": "dfareporting.operatingSystemVersions.list",
36253	//   "parameterOrder": [
36254	//     "profileId"
36255	//   ],
36256	//   "parameters": {
36257	//     "profileId": {
36258	//       "description": "User profile ID associated with this request.",
36259	//       "format": "int64",
36260	//       "location": "path",
36261	//       "required": true,
36262	//       "type": "string"
36263	//     }
36264	//   },
36265	//   "path": "userprofiles/{profileId}/operatingSystemVersions",
36266	//   "response": {
36267	//     "$ref": "OperatingSystemVersionsListResponse"
36268	//   },
36269	//   "scopes": [
36270	//     "https://www.googleapis.com/auth/dfatrafficking"
36271	//   ]
36272	// }
36273
36274}
36275
36276// method id "dfareporting.operatingSystems.get":
36277
36278type OperatingSystemsGetCall struct {
36279	s            *Service
36280	profileId    int64
36281	dartId       int64
36282	urlParams_   gensupport.URLParams
36283	ifNoneMatch_ string
36284	ctx_         context.Context
36285	header_      http.Header
36286}
36287
36288// Get: Gets one operating system by DART ID.
36289func (r *OperatingSystemsService) Get(profileId int64, dartId int64) *OperatingSystemsGetCall {
36290	c := &OperatingSystemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36291	c.profileId = profileId
36292	c.dartId = dartId
36293	return c
36294}
36295
36296// Fields allows partial responses to be retrieved. See
36297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36298// for more information.
36299func (c *OperatingSystemsGetCall) Fields(s ...googleapi.Field) *OperatingSystemsGetCall {
36300	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36301	return c
36302}
36303
36304// IfNoneMatch sets the optional parameter which makes the operation
36305// fail if the object's ETag matches the given value. This is useful for
36306// getting updates only after the object has changed since the last
36307// request. Use googleapi.IsNotModified to check whether the response
36308// error from Do is the result of In-None-Match.
36309func (c *OperatingSystemsGetCall) IfNoneMatch(entityTag string) *OperatingSystemsGetCall {
36310	c.ifNoneMatch_ = entityTag
36311	return c
36312}
36313
36314// Context sets the context to be used in this call's Do method. Any
36315// pending HTTP request will be aborted if the provided context is
36316// canceled.
36317func (c *OperatingSystemsGetCall) Context(ctx context.Context) *OperatingSystemsGetCall {
36318	c.ctx_ = ctx
36319	return c
36320}
36321
36322// Header returns an http.Header that can be modified by the caller to
36323// add HTTP headers to the request.
36324func (c *OperatingSystemsGetCall) Header() http.Header {
36325	if c.header_ == nil {
36326		c.header_ = make(http.Header)
36327	}
36328	return c.header_
36329}
36330
36331func (c *OperatingSystemsGetCall) doRequest(alt string) (*http.Response, error) {
36332	reqHeaders := make(http.Header)
36333	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
36334	for k, v := range c.header_ {
36335		reqHeaders[k] = v
36336	}
36337	reqHeaders.Set("User-Agent", c.s.userAgent())
36338	if c.ifNoneMatch_ != "" {
36339		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36340	}
36341	var body io.Reader = nil
36342	c.urlParams_.Set("alt", alt)
36343	c.urlParams_.Set("prettyPrint", "false")
36344	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems/{dartId}")
36345	urls += "?" + c.urlParams_.Encode()
36346	req, err := http.NewRequest("GET", urls, body)
36347	if err != nil {
36348		return nil, err
36349	}
36350	req.Header = reqHeaders
36351	googleapi.Expand(req.URL, map[string]string{
36352		"profileId": strconv.FormatInt(c.profileId, 10),
36353		"dartId":    strconv.FormatInt(c.dartId, 10),
36354	})
36355	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36356}
36357
36358// Do executes the "dfareporting.operatingSystems.get" call.
36359// Exactly one of *OperatingSystem or error will be non-nil. Any non-2xx
36360// status code is an error. Response headers are in either
36361// *OperatingSystem.ServerResponse.Header or (if a response was returned
36362// at all) in error.(*googleapi.Error).Header. Use
36363// googleapi.IsNotModified to check whether the returned error was
36364// because http.StatusNotModified was returned.
36365func (c *OperatingSystemsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystem, error) {
36366	gensupport.SetOptions(c.urlParams_, opts...)
36367	res, err := c.doRequest("json")
36368	if res != nil && res.StatusCode == http.StatusNotModified {
36369		if res.Body != nil {
36370			res.Body.Close()
36371		}
36372		return nil, &googleapi.Error{
36373			Code:   res.StatusCode,
36374			Header: res.Header,
36375		}
36376	}
36377	if err != nil {
36378		return nil, err
36379	}
36380	defer googleapi.CloseBody(res)
36381	if err := googleapi.CheckResponse(res); err != nil {
36382		return nil, err
36383	}
36384	ret := &OperatingSystem{
36385		ServerResponse: googleapi.ServerResponse{
36386			Header:         res.Header,
36387			HTTPStatusCode: res.StatusCode,
36388		},
36389	}
36390	target := &ret
36391	if err := gensupport.DecodeResponse(target, res); err != nil {
36392		return nil, err
36393	}
36394	return ret, nil
36395	// {
36396	//   "description": "Gets one operating system by DART ID.",
36397	//   "httpMethod": "GET",
36398	//   "id": "dfareporting.operatingSystems.get",
36399	//   "parameterOrder": [
36400	//     "profileId",
36401	//     "dartId"
36402	//   ],
36403	//   "parameters": {
36404	//     "dartId": {
36405	//       "description": "Operating system DART ID.",
36406	//       "format": "int64",
36407	//       "location": "path",
36408	//       "required": true,
36409	//       "type": "string"
36410	//     },
36411	//     "profileId": {
36412	//       "description": "User profile ID associated with this request.",
36413	//       "format": "int64",
36414	//       "location": "path",
36415	//       "required": true,
36416	//       "type": "string"
36417	//     }
36418	//   },
36419	//   "path": "userprofiles/{profileId}/operatingSystems/{dartId}",
36420	//   "response": {
36421	//     "$ref": "OperatingSystem"
36422	//   },
36423	//   "scopes": [
36424	//     "https://www.googleapis.com/auth/dfatrafficking"
36425	//   ]
36426	// }
36427
36428}
36429
36430// method id "dfareporting.operatingSystems.list":
36431
36432type OperatingSystemsListCall struct {
36433	s            *Service
36434	profileId    int64
36435	urlParams_   gensupport.URLParams
36436	ifNoneMatch_ string
36437	ctx_         context.Context
36438	header_      http.Header
36439}
36440
36441// List: Retrieves a list of operating systems.
36442func (r *OperatingSystemsService) List(profileId int64) *OperatingSystemsListCall {
36443	c := &OperatingSystemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36444	c.profileId = profileId
36445	return c
36446}
36447
36448// Fields allows partial responses to be retrieved. See
36449// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36450// for more information.
36451func (c *OperatingSystemsListCall) Fields(s ...googleapi.Field) *OperatingSystemsListCall {
36452	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36453	return c
36454}
36455
36456// IfNoneMatch sets the optional parameter which makes the operation
36457// fail if the object's ETag matches the given value. This is useful for
36458// getting updates only after the object has changed since the last
36459// request. Use googleapi.IsNotModified to check whether the response
36460// error from Do is the result of In-None-Match.
36461func (c *OperatingSystemsListCall) IfNoneMatch(entityTag string) *OperatingSystemsListCall {
36462	c.ifNoneMatch_ = entityTag
36463	return c
36464}
36465
36466// Context sets the context to be used in this call's Do method. Any
36467// pending HTTP request will be aborted if the provided context is
36468// canceled.
36469func (c *OperatingSystemsListCall) Context(ctx context.Context) *OperatingSystemsListCall {
36470	c.ctx_ = ctx
36471	return c
36472}
36473
36474// Header returns an http.Header that can be modified by the caller to
36475// add HTTP headers to the request.
36476func (c *OperatingSystemsListCall) Header() http.Header {
36477	if c.header_ == nil {
36478		c.header_ = make(http.Header)
36479	}
36480	return c.header_
36481}
36482
36483func (c *OperatingSystemsListCall) doRequest(alt string) (*http.Response, error) {
36484	reqHeaders := make(http.Header)
36485	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
36486	for k, v := range c.header_ {
36487		reqHeaders[k] = v
36488	}
36489	reqHeaders.Set("User-Agent", c.s.userAgent())
36490	if c.ifNoneMatch_ != "" {
36491		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36492	}
36493	var body io.Reader = nil
36494	c.urlParams_.Set("alt", alt)
36495	c.urlParams_.Set("prettyPrint", "false")
36496	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems")
36497	urls += "?" + c.urlParams_.Encode()
36498	req, err := http.NewRequest("GET", urls, body)
36499	if err != nil {
36500		return nil, err
36501	}
36502	req.Header = reqHeaders
36503	googleapi.Expand(req.URL, map[string]string{
36504		"profileId": strconv.FormatInt(c.profileId, 10),
36505	})
36506	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36507}
36508
36509// Do executes the "dfareporting.operatingSystems.list" call.
36510// Exactly one of *OperatingSystemsListResponse or error will be
36511// non-nil. Any non-2xx status code is an error. Response headers are in
36512// either *OperatingSystemsListResponse.ServerResponse.Header or (if a
36513// response was returned at all) in error.(*googleapi.Error).Header. Use
36514// googleapi.IsNotModified to check whether the returned error was
36515// because http.StatusNotModified was returned.
36516func (c *OperatingSystemsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemsListResponse, error) {
36517	gensupport.SetOptions(c.urlParams_, opts...)
36518	res, err := c.doRequest("json")
36519	if res != nil && res.StatusCode == http.StatusNotModified {
36520		if res.Body != nil {
36521			res.Body.Close()
36522		}
36523		return nil, &googleapi.Error{
36524			Code:   res.StatusCode,
36525			Header: res.Header,
36526		}
36527	}
36528	if err != nil {
36529		return nil, err
36530	}
36531	defer googleapi.CloseBody(res)
36532	if err := googleapi.CheckResponse(res); err != nil {
36533		return nil, err
36534	}
36535	ret := &OperatingSystemsListResponse{
36536		ServerResponse: googleapi.ServerResponse{
36537			Header:         res.Header,
36538			HTTPStatusCode: res.StatusCode,
36539		},
36540	}
36541	target := &ret
36542	if err := gensupport.DecodeResponse(target, res); err != nil {
36543		return nil, err
36544	}
36545	return ret, nil
36546	// {
36547	//   "description": "Retrieves a list of operating systems.",
36548	//   "httpMethod": "GET",
36549	//   "id": "dfareporting.operatingSystems.list",
36550	//   "parameterOrder": [
36551	//     "profileId"
36552	//   ],
36553	//   "parameters": {
36554	//     "profileId": {
36555	//       "description": "User profile ID associated with this request.",
36556	//       "format": "int64",
36557	//       "location": "path",
36558	//       "required": true,
36559	//       "type": "string"
36560	//     }
36561	//   },
36562	//   "path": "userprofiles/{profileId}/operatingSystems",
36563	//   "response": {
36564	//     "$ref": "OperatingSystemsListResponse"
36565	//   },
36566	//   "scopes": [
36567	//     "https://www.googleapis.com/auth/dfatrafficking"
36568	//   ]
36569	// }
36570
36571}
36572
36573// method id "dfareporting.orderDocuments.get":
36574
36575type OrderDocumentsGetCall struct {
36576	s            *Service
36577	profileId    int64
36578	projectId    int64
36579	id           int64
36580	urlParams_   gensupport.URLParams
36581	ifNoneMatch_ string
36582	ctx_         context.Context
36583	header_      http.Header
36584}
36585
36586// Get: Gets one order document by ID.
36587func (r *OrderDocumentsService) Get(profileId int64, projectId int64, id int64) *OrderDocumentsGetCall {
36588	c := &OrderDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36589	c.profileId = profileId
36590	c.projectId = projectId
36591	c.id = id
36592	return c
36593}
36594
36595// Fields allows partial responses to be retrieved. See
36596// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36597// for more information.
36598func (c *OrderDocumentsGetCall) Fields(s ...googleapi.Field) *OrderDocumentsGetCall {
36599	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36600	return c
36601}
36602
36603// IfNoneMatch sets the optional parameter which makes the operation
36604// fail if the object's ETag matches the given value. This is useful for
36605// getting updates only after the object has changed since the last
36606// request. Use googleapi.IsNotModified to check whether the response
36607// error from Do is the result of In-None-Match.
36608func (c *OrderDocumentsGetCall) IfNoneMatch(entityTag string) *OrderDocumentsGetCall {
36609	c.ifNoneMatch_ = entityTag
36610	return c
36611}
36612
36613// Context sets the context to be used in this call's Do method. Any
36614// pending HTTP request will be aborted if the provided context is
36615// canceled.
36616func (c *OrderDocumentsGetCall) Context(ctx context.Context) *OrderDocumentsGetCall {
36617	c.ctx_ = ctx
36618	return c
36619}
36620
36621// Header returns an http.Header that can be modified by the caller to
36622// add HTTP headers to the request.
36623func (c *OrderDocumentsGetCall) Header() http.Header {
36624	if c.header_ == nil {
36625		c.header_ = make(http.Header)
36626	}
36627	return c.header_
36628}
36629
36630func (c *OrderDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
36631	reqHeaders := make(http.Header)
36632	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
36633	for k, v := range c.header_ {
36634		reqHeaders[k] = v
36635	}
36636	reqHeaders.Set("User-Agent", c.s.userAgent())
36637	if c.ifNoneMatch_ != "" {
36638		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36639	}
36640	var body io.Reader = nil
36641	c.urlParams_.Set("alt", alt)
36642	c.urlParams_.Set("prettyPrint", "false")
36643	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}")
36644	urls += "?" + c.urlParams_.Encode()
36645	req, err := http.NewRequest("GET", urls, body)
36646	if err != nil {
36647		return nil, err
36648	}
36649	req.Header = reqHeaders
36650	googleapi.Expand(req.URL, map[string]string{
36651		"profileId": strconv.FormatInt(c.profileId, 10),
36652		"projectId": strconv.FormatInt(c.projectId, 10),
36653		"id":        strconv.FormatInt(c.id, 10),
36654	})
36655	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36656}
36657
36658// Do executes the "dfareporting.orderDocuments.get" call.
36659// Exactly one of *OrderDocument or error will be non-nil. Any non-2xx
36660// status code is an error. Response headers are in either
36661// *OrderDocument.ServerResponse.Header or (if a response was returned
36662// at all) in error.(*googleapi.Error).Header. Use
36663// googleapi.IsNotModified to check whether the returned error was
36664// because http.StatusNotModified was returned.
36665func (c *OrderDocumentsGetCall) Do(opts ...googleapi.CallOption) (*OrderDocument, error) {
36666	gensupport.SetOptions(c.urlParams_, opts...)
36667	res, err := c.doRequest("json")
36668	if res != nil && res.StatusCode == http.StatusNotModified {
36669		if res.Body != nil {
36670			res.Body.Close()
36671		}
36672		return nil, &googleapi.Error{
36673			Code:   res.StatusCode,
36674			Header: res.Header,
36675		}
36676	}
36677	if err != nil {
36678		return nil, err
36679	}
36680	defer googleapi.CloseBody(res)
36681	if err := googleapi.CheckResponse(res); err != nil {
36682		return nil, err
36683	}
36684	ret := &OrderDocument{
36685		ServerResponse: googleapi.ServerResponse{
36686			Header:         res.Header,
36687			HTTPStatusCode: res.StatusCode,
36688		},
36689	}
36690	target := &ret
36691	if err := gensupport.DecodeResponse(target, res); err != nil {
36692		return nil, err
36693	}
36694	return ret, nil
36695	// {
36696	//   "description": "Gets one order document by ID.",
36697	//   "httpMethod": "GET",
36698	//   "id": "dfareporting.orderDocuments.get",
36699	//   "parameterOrder": [
36700	//     "profileId",
36701	//     "projectId",
36702	//     "id"
36703	//   ],
36704	//   "parameters": {
36705	//     "id": {
36706	//       "description": "Order document ID.",
36707	//       "format": "int64",
36708	//       "location": "path",
36709	//       "required": true,
36710	//       "type": "string"
36711	//     },
36712	//     "profileId": {
36713	//       "description": "User profile ID associated with this request.",
36714	//       "format": "int64",
36715	//       "location": "path",
36716	//       "required": true,
36717	//       "type": "string"
36718	//     },
36719	//     "projectId": {
36720	//       "description": "Project ID for order documents.",
36721	//       "format": "int64",
36722	//       "location": "path",
36723	//       "required": true,
36724	//       "type": "string"
36725	//     }
36726	//   },
36727	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}",
36728	//   "response": {
36729	//     "$ref": "OrderDocument"
36730	//   },
36731	//   "scopes": [
36732	//     "https://www.googleapis.com/auth/dfatrafficking"
36733	//   ]
36734	// }
36735
36736}
36737
36738// method id "dfareporting.orderDocuments.list":
36739
36740type OrderDocumentsListCall struct {
36741	s            *Service
36742	profileId    int64
36743	projectId    int64
36744	urlParams_   gensupport.URLParams
36745	ifNoneMatch_ string
36746	ctx_         context.Context
36747	header_      http.Header
36748}
36749
36750// List: Retrieves a list of order documents, possibly filtered. This
36751// method supports paging.
36752func (r *OrderDocumentsService) List(profileId int64, projectId int64) *OrderDocumentsListCall {
36753	c := &OrderDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36754	c.profileId = profileId
36755	c.projectId = projectId
36756	return c
36757}
36758
36759// Approved sets the optional parameter "approved": Select only order
36760// documents that have been approved by at least one user.
36761func (c *OrderDocumentsListCall) Approved(approved bool) *OrderDocumentsListCall {
36762	c.urlParams_.Set("approved", fmt.Sprint(approved))
36763	return c
36764}
36765
36766// Ids sets the optional parameter "ids": Select only order documents
36767// with these IDs.
36768func (c *OrderDocumentsListCall) Ids(ids ...int64) *OrderDocumentsListCall {
36769	var ids_ []string
36770	for _, v := range ids {
36771		ids_ = append(ids_, fmt.Sprint(v))
36772	}
36773	c.urlParams_.SetMulti("ids", ids_)
36774	return c
36775}
36776
36777// MaxResults sets the optional parameter "maxResults": Maximum number
36778// of results to return.
36779func (c *OrderDocumentsListCall) MaxResults(maxResults int64) *OrderDocumentsListCall {
36780	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36781	return c
36782}
36783
36784// OrderId sets the optional parameter "orderId": Select only order
36785// documents for specified orders.
36786func (c *OrderDocumentsListCall) OrderId(orderId ...int64) *OrderDocumentsListCall {
36787	var orderId_ []string
36788	for _, v := range orderId {
36789		orderId_ = append(orderId_, fmt.Sprint(v))
36790	}
36791	c.urlParams_.SetMulti("orderId", orderId_)
36792	return c
36793}
36794
36795// PageToken sets the optional parameter "pageToken": Value of the
36796// nextPageToken from the previous result page.
36797func (c *OrderDocumentsListCall) PageToken(pageToken string) *OrderDocumentsListCall {
36798	c.urlParams_.Set("pageToken", pageToken)
36799	return c
36800}
36801
36802// SearchString sets the optional parameter "searchString": Allows
36803// searching for order documents by name or ID. Wildcards (*) are
36804// allowed. For example, "orderdocument*2015" will return order
36805// documents with names like "orderdocument June 2015", "orderdocument
36806// April 2015", or simply "orderdocument 2015". Most of the searches
36807// also add wildcards implicitly at the start and the end of the search
36808// string. For example, a search string of "orderdocument" will match
36809// order documents with name "my orderdocument", "orderdocument 2015",
36810// or simply "orderdocument".
36811func (c *OrderDocumentsListCall) SearchString(searchString string) *OrderDocumentsListCall {
36812	c.urlParams_.Set("searchString", searchString)
36813	return c
36814}
36815
36816// SiteId sets the optional parameter "siteId": Select only order
36817// documents that are associated with these sites.
36818func (c *OrderDocumentsListCall) SiteId(siteId ...int64) *OrderDocumentsListCall {
36819	var siteId_ []string
36820	for _, v := range siteId {
36821		siteId_ = append(siteId_, fmt.Sprint(v))
36822	}
36823	c.urlParams_.SetMulti("siteId", siteId_)
36824	return c
36825}
36826
36827// SortField sets the optional parameter "sortField": Field by which to
36828// sort the list.
36829//
36830// Possible values:
36831//   "ID" (default)
36832//   "NAME"
36833func (c *OrderDocumentsListCall) SortField(sortField string) *OrderDocumentsListCall {
36834	c.urlParams_.Set("sortField", sortField)
36835	return c
36836}
36837
36838// SortOrder sets the optional parameter "sortOrder": Order of sorted
36839// results.
36840//
36841// Possible values:
36842//   "ASCENDING" (default)
36843//   "DESCENDING"
36844func (c *OrderDocumentsListCall) SortOrder(sortOrder string) *OrderDocumentsListCall {
36845	c.urlParams_.Set("sortOrder", sortOrder)
36846	return c
36847}
36848
36849// Fields allows partial responses to be retrieved. See
36850// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36851// for more information.
36852func (c *OrderDocumentsListCall) Fields(s ...googleapi.Field) *OrderDocumentsListCall {
36853	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36854	return c
36855}
36856
36857// IfNoneMatch sets the optional parameter which makes the operation
36858// fail if the object's ETag matches the given value. This is useful for
36859// getting updates only after the object has changed since the last
36860// request. Use googleapi.IsNotModified to check whether the response
36861// error from Do is the result of In-None-Match.
36862func (c *OrderDocumentsListCall) IfNoneMatch(entityTag string) *OrderDocumentsListCall {
36863	c.ifNoneMatch_ = entityTag
36864	return c
36865}
36866
36867// Context sets the context to be used in this call's Do method. Any
36868// pending HTTP request will be aborted if the provided context is
36869// canceled.
36870func (c *OrderDocumentsListCall) Context(ctx context.Context) *OrderDocumentsListCall {
36871	c.ctx_ = ctx
36872	return c
36873}
36874
36875// Header returns an http.Header that can be modified by the caller to
36876// add HTTP headers to the request.
36877func (c *OrderDocumentsListCall) Header() http.Header {
36878	if c.header_ == nil {
36879		c.header_ = make(http.Header)
36880	}
36881	return c.header_
36882}
36883
36884func (c *OrderDocumentsListCall) doRequest(alt string) (*http.Response, error) {
36885	reqHeaders := make(http.Header)
36886	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
36887	for k, v := range c.header_ {
36888		reqHeaders[k] = v
36889	}
36890	reqHeaders.Set("User-Agent", c.s.userAgent())
36891	if c.ifNoneMatch_ != "" {
36892		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36893	}
36894	var body io.Reader = nil
36895	c.urlParams_.Set("alt", alt)
36896	c.urlParams_.Set("prettyPrint", "false")
36897	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments")
36898	urls += "?" + c.urlParams_.Encode()
36899	req, err := http.NewRequest("GET", urls, body)
36900	if err != nil {
36901		return nil, err
36902	}
36903	req.Header = reqHeaders
36904	googleapi.Expand(req.URL, map[string]string{
36905		"profileId": strconv.FormatInt(c.profileId, 10),
36906		"projectId": strconv.FormatInt(c.projectId, 10),
36907	})
36908	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36909}
36910
36911// Do executes the "dfareporting.orderDocuments.list" call.
36912// Exactly one of *OrderDocumentsListResponse or error will be non-nil.
36913// Any non-2xx status code is an error. Response headers are in either
36914// *OrderDocumentsListResponse.ServerResponse.Header or (if a response
36915// was returned at all) in error.(*googleapi.Error).Header. Use
36916// googleapi.IsNotModified to check whether the returned error was
36917// because http.StatusNotModified was returned.
36918func (c *OrderDocumentsListCall) Do(opts ...googleapi.CallOption) (*OrderDocumentsListResponse, error) {
36919	gensupport.SetOptions(c.urlParams_, opts...)
36920	res, err := c.doRequest("json")
36921	if res != nil && res.StatusCode == http.StatusNotModified {
36922		if res.Body != nil {
36923			res.Body.Close()
36924		}
36925		return nil, &googleapi.Error{
36926			Code:   res.StatusCode,
36927			Header: res.Header,
36928		}
36929	}
36930	if err != nil {
36931		return nil, err
36932	}
36933	defer googleapi.CloseBody(res)
36934	if err := googleapi.CheckResponse(res); err != nil {
36935		return nil, err
36936	}
36937	ret := &OrderDocumentsListResponse{
36938		ServerResponse: googleapi.ServerResponse{
36939			Header:         res.Header,
36940			HTTPStatusCode: res.StatusCode,
36941		},
36942	}
36943	target := &ret
36944	if err := gensupport.DecodeResponse(target, res); err != nil {
36945		return nil, err
36946	}
36947	return ret, nil
36948	// {
36949	//   "description": "Retrieves a list of order documents, possibly filtered. This method supports paging.",
36950	//   "httpMethod": "GET",
36951	//   "id": "dfareporting.orderDocuments.list",
36952	//   "parameterOrder": [
36953	//     "profileId",
36954	//     "projectId"
36955	//   ],
36956	//   "parameters": {
36957	//     "approved": {
36958	//       "description": "Select only order documents that have been approved by at least one user.",
36959	//       "location": "query",
36960	//       "type": "boolean"
36961	//     },
36962	//     "ids": {
36963	//       "description": "Select only order documents with these IDs.",
36964	//       "format": "int64",
36965	//       "location": "query",
36966	//       "repeated": true,
36967	//       "type": "string"
36968	//     },
36969	//     "maxResults": {
36970	//       "default": "1000",
36971	//       "description": "Maximum number of results to return.",
36972	//       "format": "int32",
36973	//       "location": "query",
36974	//       "maximum": "1000",
36975	//       "minimum": "0",
36976	//       "type": "integer"
36977	//     },
36978	//     "orderId": {
36979	//       "description": "Select only order documents for specified orders.",
36980	//       "format": "int64",
36981	//       "location": "query",
36982	//       "repeated": true,
36983	//       "type": "string"
36984	//     },
36985	//     "pageToken": {
36986	//       "description": "Value of the nextPageToken from the previous result page.",
36987	//       "location": "query",
36988	//       "type": "string"
36989	//     },
36990	//     "profileId": {
36991	//       "description": "User profile ID associated with this request.",
36992	//       "format": "int64",
36993	//       "location": "path",
36994	//       "required": true,
36995	//       "type": "string"
36996	//     },
36997	//     "projectId": {
36998	//       "description": "Project ID for order documents.",
36999	//       "format": "int64",
37000	//       "location": "path",
37001	//       "required": true,
37002	//       "type": "string"
37003	//     },
37004	//     "searchString": {
37005	//       "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\".",
37006	//       "location": "query",
37007	//       "type": "string"
37008	//     },
37009	//     "siteId": {
37010	//       "description": "Select only order documents that are associated with these sites.",
37011	//       "format": "int64",
37012	//       "location": "query",
37013	//       "repeated": true,
37014	//       "type": "string"
37015	//     },
37016	//     "sortField": {
37017	//       "default": "ID",
37018	//       "description": "Field by which to sort the list.",
37019	//       "enum": [
37020	//         "ID",
37021	//         "NAME"
37022	//       ],
37023	//       "enumDescriptions": [
37024	//         "",
37025	//         ""
37026	//       ],
37027	//       "location": "query",
37028	//       "type": "string"
37029	//     },
37030	//     "sortOrder": {
37031	//       "default": "ASCENDING",
37032	//       "description": "Order of sorted results.",
37033	//       "enum": [
37034	//         "ASCENDING",
37035	//         "DESCENDING"
37036	//       ],
37037	//       "enumDescriptions": [
37038	//         "",
37039	//         ""
37040	//       ],
37041	//       "location": "query",
37042	//       "type": "string"
37043	//     }
37044	//   },
37045	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments",
37046	//   "response": {
37047	//     "$ref": "OrderDocumentsListResponse"
37048	//   },
37049	//   "scopes": [
37050	//     "https://www.googleapis.com/auth/dfatrafficking"
37051	//   ]
37052	// }
37053
37054}
37055
37056// Pages invokes f for each page of results.
37057// A non-nil error returned from f will halt the iteration.
37058// The provided context supersedes any context provided to the Context method.
37059func (c *OrderDocumentsListCall) Pages(ctx context.Context, f func(*OrderDocumentsListResponse) error) error {
37060	c.ctx_ = ctx
37061	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37062	for {
37063		x, err := c.Do()
37064		if err != nil {
37065			return err
37066		}
37067		if err := f(x); err != nil {
37068			return err
37069		}
37070		if x.NextPageToken == "" {
37071			return nil
37072		}
37073		c.PageToken(x.NextPageToken)
37074	}
37075}
37076
37077// method id "dfareporting.orders.get":
37078
37079type OrdersGetCall struct {
37080	s            *Service
37081	profileId    int64
37082	projectId    int64
37083	id           int64
37084	urlParams_   gensupport.URLParams
37085	ifNoneMatch_ string
37086	ctx_         context.Context
37087	header_      http.Header
37088}
37089
37090// Get: Gets one order by ID.
37091func (r *OrdersService) Get(profileId int64, projectId int64, id int64) *OrdersGetCall {
37092	c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37093	c.profileId = profileId
37094	c.projectId = projectId
37095	c.id = id
37096	return c
37097}
37098
37099// Fields allows partial responses to be retrieved. See
37100// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37101// for more information.
37102func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall {
37103	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37104	return c
37105}
37106
37107// IfNoneMatch sets the optional parameter which makes the operation
37108// fail if the object's ETag matches the given value. This is useful for
37109// getting updates only after the object has changed since the last
37110// request. Use googleapi.IsNotModified to check whether the response
37111// error from Do is the result of In-None-Match.
37112func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall {
37113	c.ifNoneMatch_ = entityTag
37114	return c
37115}
37116
37117// Context sets the context to be used in this call's Do method. Any
37118// pending HTTP request will be aborted if the provided context is
37119// canceled.
37120func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
37121	c.ctx_ = ctx
37122	return c
37123}
37124
37125// Header returns an http.Header that can be modified by the caller to
37126// add HTTP headers to the request.
37127func (c *OrdersGetCall) Header() http.Header {
37128	if c.header_ == nil {
37129		c.header_ = make(http.Header)
37130	}
37131	return c.header_
37132}
37133
37134func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
37135	reqHeaders := make(http.Header)
37136	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
37137	for k, v := range c.header_ {
37138		reqHeaders[k] = v
37139	}
37140	reqHeaders.Set("User-Agent", c.s.userAgent())
37141	if c.ifNoneMatch_ != "" {
37142		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37143	}
37144	var body io.Reader = nil
37145	c.urlParams_.Set("alt", alt)
37146	c.urlParams_.Set("prettyPrint", "false")
37147	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders/{id}")
37148	urls += "?" + c.urlParams_.Encode()
37149	req, err := http.NewRequest("GET", urls, body)
37150	if err != nil {
37151		return nil, err
37152	}
37153	req.Header = reqHeaders
37154	googleapi.Expand(req.URL, map[string]string{
37155		"profileId": strconv.FormatInt(c.profileId, 10),
37156		"projectId": strconv.FormatInt(c.projectId, 10),
37157		"id":        strconv.FormatInt(c.id, 10),
37158	})
37159	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37160}
37161
37162// Do executes the "dfareporting.orders.get" call.
37163// Exactly one of *Order or error will be non-nil. Any non-2xx status
37164// code is an error. Response headers are in either
37165// *Order.ServerResponse.Header or (if a response was returned at all)
37166// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
37167// check whether the returned error was because http.StatusNotModified
37168// was returned.
37169func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
37170	gensupport.SetOptions(c.urlParams_, opts...)
37171	res, err := c.doRequest("json")
37172	if res != nil && res.StatusCode == http.StatusNotModified {
37173		if res.Body != nil {
37174			res.Body.Close()
37175		}
37176		return nil, &googleapi.Error{
37177			Code:   res.StatusCode,
37178			Header: res.Header,
37179		}
37180	}
37181	if err != nil {
37182		return nil, err
37183	}
37184	defer googleapi.CloseBody(res)
37185	if err := googleapi.CheckResponse(res); err != nil {
37186		return nil, err
37187	}
37188	ret := &Order{
37189		ServerResponse: googleapi.ServerResponse{
37190			Header:         res.Header,
37191			HTTPStatusCode: res.StatusCode,
37192		},
37193	}
37194	target := &ret
37195	if err := gensupport.DecodeResponse(target, res); err != nil {
37196		return nil, err
37197	}
37198	return ret, nil
37199	// {
37200	//   "description": "Gets one order by ID.",
37201	//   "httpMethod": "GET",
37202	//   "id": "dfareporting.orders.get",
37203	//   "parameterOrder": [
37204	//     "profileId",
37205	//     "projectId",
37206	//     "id"
37207	//   ],
37208	//   "parameters": {
37209	//     "id": {
37210	//       "description": "Order ID.",
37211	//       "format": "int64",
37212	//       "location": "path",
37213	//       "required": true,
37214	//       "type": "string"
37215	//     },
37216	//     "profileId": {
37217	//       "description": "User profile ID associated with this request.",
37218	//       "format": "int64",
37219	//       "location": "path",
37220	//       "required": true,
37221	//       "type": "string"
37222	//     },
37223	//     "projectId": {
37224	//       "description": "Project ID for orders.",
37225	//       "format": "int64",
37226	//       "location": "path",
37227	//       "required": true,
37228	//       "type": "string"
37229	//     }
37230	//   },
37231	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders/{id}",
37232	//   "response": {
37233	//     "$ref": "Order"
37234	//   },
37235	//   "scopes": [
37236	//     "https://www.googleapis.com/auth/dfatrafficking"
37237	//   ]
37238	// }
37239
37240}
37241
37242// method id "dfareporting.orders.list":
37243
37244type OrdersListCall struct {
37245	s            *Service
37246	profileId    int64
37247	projectId    int64
37248	urlParams_   gensupport.URLParams
37249	ifNoneMatch_ string
37250	ctx_         context.Context
37251	header_      http.Header
37252}
37253
37254// List: Retrieves a list of orders, possibly filtered. This method
37255// supports paging.
37256func (r *OrdersService) List(profileId int64, projectId int64) *OrdersListCall {
37257	c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37258	c.profileId = profileId
37259	c.projectId = projectId
37260	return c
37261}
37262
37263// Ids sets the optional parameter "ids": Select only orders with these
37264// IDs.
37265func (c *OrdersListCall) Ids(ids ...int64) *OrdersListCall {
37266	var ids_ []string
37267	for _, v := range ids {
37268		ids_ = append(ids_, fmt.Sprint(v))
37269	}
37270	c.urlParams_.SetMulti("ids", ids_)
37271	return c
37272}
37273
37274// MaxResults sets the optional parameter "maxResults": Maximum number
37275// of results to return.
37276func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall {
37277	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37278	return c
37279}
37280
37281// PageToken sets the optional parameter "pageToken": Value of the
37282// nextPageToken from the previous result page.
37283func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall {
37284	c.urlParams_.Set("pageToken", pageToken)
37285	return c
37286}
37287
37288// SearchString sets the optional parameter "searchString": Allows
37289// searching for orders by name or ID. Wildcards (*) are allowed. For
37290// example, "order*2015" will return orders with names like "order June
37291// 2015", "order April 2015", or simply "order 2015". Most of the
37292// searches also add wildcards implicitly at the start and the end of
37293// the search string. For example, a search string of "order" will match
37294// orders with name "my order", "order 2015", or simply "order".
37295func (c *OrdersListCall) SearchString(searchString string) *OrdersListCall {
37296	c.urlParams_.Set("searchString", searchString)
37297	return c
37298}
37299
37300// SiteId sets the optional parameter "siteId": Select only orders that
37301// are associated with these site IDs.
37302func (c *OrdersListCall) SiteId(siteId ...int64) *OrdersListCall {
37303	var siteId_ []string
37304	for _, v := range siteId {
37305		siteId_ = append(siteId_, fmt.Sprint(v))
37306	}
37307	c.urlParams_.SetMulti("siteId", siteId_)
37308	return c
37309}
37310
37311// SortField sets the optional parameter "sortField": Field by which to
37312// sort the list.
37313//
37314// Possible values:
37315//   "ID" (default)
37316//   "NAME"
37317func (c *OrdersListCall) SortField(sortField string) *OrdersListCall {
37318	c.urlParams_.Set("sortField", sortField)
37319	return c
37320}
37321
37322// SortOrder sets the optional parameter "sortOrder": Order of sorted
37323// results.
37324//
37325// Possible values:
37326//   "ASCENDING" (default)
37327//   "DESCENDING"
37328func (c *OrdersListCall) SortOrder(sortOrder string) *OrdersListCall {
37329	c.urlParams_.Set("sortOrder", sortOrder)
37330	return c
37331}
37332
37333// Fields allows partial responses to be retrieved. See
37334// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37335// for more information.
37336func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall {
37337	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37338	return c
37339}
37340
37341// IfNoneMatch sets the optional parameter which makes the operation
37342// fail if the object's ETag matches the given value. This is useful for
37343// getting updates only after the object has changed since the last
37344// request. Use googleapi.IsNotModified to check whether the response
37345// error from Do is the result of In-None-Match.
37346func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall {
37347	c.ifNoneMatch_ = entityTag
37348	return c
37349}
37350
37351// Context sets the context to be used in this call's Do method. Any
37352// pending HTTP request will be aborted if the provided context is
37353// canceled.
37354func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
37355	c.ctx_ = ctx
37356	return c
37357}
37358
37359// Header returns an http.Header that can be modified by the caller to
37360// add HTTP headers to the request.
37361func (c *OrdersListCall) Header() http.Header {
37362	if c.header_ == nil {
37363		c.header_ = make(http.Header)
37364	}
37365	return c.header_
37366}
37367
37368func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
37369	reqHeaders := make(http.Header)
37370	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
37371	for k, v := range c.header_ {
37372		reqHeaders[k] = v
37373	}
37374	reqHeaders.Set("User-Agent", c.s.userAgent())
37375	if c.ifNoneMatch_ != "" {
37376		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37377	}
37378	var body io.Reader = nil
37379	c.urlParams_.Set("alt", alt)
37380	c.urlParams_.Set("prettyPrint", "false")
37381	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders")
37382	urls += "?" + c.urlParams_.Encode()
37383	req, err := http.NewRequest("GET", urls, body)
37384	if err != nil {
37385		return nil, err
37386	}
37387	req.Header = reqHeaders
37388	googleapi.Expand(req.URL, map[string]string{
37389		"profileId": strconv.FormatInt(c.profileId, 10),
37390		"projectId": strconv.FormatInt(c.projectId, 10),
37391	})
37392	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37393}
37394
37395// Do executes the "dfareporting.orders.list" call.
37396// Exactly one of *OrdersListResponse or error will be non-nil. Any
37397// non-2xx status code is an error. Response headers are in either
37398// *OrdersListResponse.ServerResponse.Header or (if a response was
37399// returned at all) in error.(*googleapi.Error).Header. Use
37400// googleapi.IsNotModified to check whether the returned error was
37401// because http.StatusNotModified was returned.
37402func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) {
37403	gensupport.SetOptions(c.urlParams_, opts...)
37404	res, err := c.doRequest("json")
37405	if res != nil && res.StatusCode == http.StatusNotModified {
37406		if res.Body != nil {
37407			res.Body.Close()
37408		}
37409		return nil, &googleapi.Error{
37410			Code:   res.StatusCode,
37411			Header: res.Header,
37412		}
37413	}
37414	if err != nil {
37415		return nil, err
37416	}
37417	defer googleapi.CloseBody(res)
37418	if err := googleapi.CheckResponse(res); err != nil {
37419		return nil, err
37420	}
37421	ret := &OrdersListResponse{
37422		ServerResponse: googleapi.ServerResponse{
37423			Header:         res.Header,
37424			HTTPStatusCode: res.StatusCode,
37425		},
37426	}
37427	target := &ret
37428	if err := gensupport.DecodeResponse(target, res); err != nil {
37429		return nil, err
37430	}
37431	return ret, nil
37432	// {
37433	//   "description": "Retrieves a list of orders, possibly filtered. This method supports paging.",
37434	//   "httpMethod": "GET",
37435	//   "id": "dfareporting.orders.list",
37436	//   "parameterOrder": [
37437	//     "profileId",
37438	//     "projectId"
37439	//   ],
37440	//   "parameters": {
37441	//     "ids": {
37442	//       "description": "Select only orders with these IDs.",
37443	//       "format": "int64",
37444	//       "location": "query",
37445	//       "repeated": true,
37446	//       "type": "string"
37447	//     },
37448	//     "maxResults": {
37449	//       "default": "1000",
37450	//       "description": "Maximum number of results to return.",
37451	//       "format": "int32",
37452	//       "location": "query",
37453	//       "maximum": "1000",
37454	//       "minimum": "0",
37455	//       "type": "integer"
37456	//     },
37457	//     "pageToken": {
37458	//       "description": "Value of the nextPageToken from the previous result page.",
37459	//       "location": "query",
37460	//       "type": "string"
37461	//     },
37462	//     "profileId": {
37463	//       "description": "User profile ID associated with this request.",
37464	//       "format": "int64",
37465	//       "location": "path",
37466	//       "required": true,
37467	//       "type": "string"
37468	//     },
37469	//     "projectId": {
37470	//       "description": "Project ID for orders.",
37471	//       "format": "int64",
37472	//       "location": "path",
37473	//       "required": true,
37474	//       "type": "string"
37475	//     },
37476	//     "searchString": {
37477	//       "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\".",
37478	//       "location": "query",
37479	//       "type": "string"
37480	//     },
37481	//     "siteId": {
37482	//       "description": "Select only orders that are associated with these site IDs.",
37483	//       "format": "int64",
37484	//       "location": "query",
37485	//       "repeated": true,
37486	//       "type": "string"
37487	//     },
37488	//     "sortField": {
37489	//       "default": "ID",
37490	//       "description": "Field by which to sort the list.",
37491	//       "enum": [
37492	//         "ID",
37493	//         "NAME"
37494	//       ],
37495	//       "enumDescriptions": [
37496	//         "",
37497	//         ""
37498	//       ],
37499	//       "location": "query",
37500	//       "type": "string"
37501	//     },
37502	//     "sortOrder": {
37503	//       "default": "ASCENDING",
37504	//       "description": "Order of sorted results.",
37505	//       "enum": [
37506	//         "ASCENDING",
37507	//         "DESCENDING"
37508	//       ],
37509	//       "enumDescriptions": [
37510	//         "",
37511	//         ""
37512	//       ],
37513	//       "location": "query",
37514	//       "type": "string"
37515	//     }
37516	//   },
37517	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders",
37518	//   "response": {
37519	//     "$ref": "OrdersListResponse"
37520	//   },
37521	//   "scopes": [
37522	//     "https://www.googleapis.com/auth/dfatrafficking"
37523	//   ]
37524	// }
37525
37526}
37527
37528// Pages invokes f for each page of results.
37529// A non-nil error returned from f will halt the iteration.
37530// The provided context supersedes any context provided to the Context method.
37531func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error {
37532	c.ctx_ = ctx
37533	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37534	for {
37535		x, err := c.Do()
37536		if err != nil {
37537			return err
37538		}
37539		if err := f(x); err != nil {
37540			return err
37541		}
37542		if x.NextPageToken == "" {
37543			return nil
37544		}
37545		c.PageToken(x.NextPageToken)
37546	}
37547}
37548
37549// method id "dfareporting.placementGroups.get":
37550
37551type PlacementGroupsGetCall struct {
37552	s            *Service
37553	profileId    int64
37554	id           int64
37555	urlParams_   gensupport.URLParams
37556	ifNoneMatch_ string
37557	ctx_         context.Context
37558	header_      http.Header
37559}
37560
37561// Get: Gets one placement group by ID.
37562func (r *PlacementGroupsService) Get(profileId int64, id int64) *PlacementGroupsGetCall {
37563	c := &PlacementGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37564	c.profileId = profileId
37565	c.id = id
37566	return c
37567}
37568
37569// Fields allows partial responses to be retrieved. See
37570// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37571// for more information.
37572func (c *PlacementGroupsGetCall) Fields(s ...googleapi.Field) *PlacementGroupsGetCall {
37573	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37574	return c
37575}
37576
37577// IfNoneMatch sets the optional parameter which makes the operation
37578// fail if the object's ETag matches the given value. This is useful for
37579// getting updates only after the object has changed since the last
37580// request. Use googleapi.IsNotModified to check whether the response
37581// error from Do is the result of In-None-Match.
37582func (c *PlacementGroupsGetCall) IfNoneMatch(entityTag string) *PlacementGroupsGetCall {
37583	c.ifNoneMatch_ = entityTag
37584	return c
37585}
37586
37587// Context sets the context to be used in this call's Do method. Any
37588// pending HTTP request will be aborted if the provided context is
37589// canceled.
37590func (c *PlacementGroupsGetCall) Context(ctx context.Context) *PlacementGroupsGetCall {
37591	c.ctx_ = ctx
37592	return c
37593}
37594
37595// Header returns an http.Header that can be modified by the caller to
37596// add HTTP headers to the request.
37597func (c *PlacementGroupsGetCall) Header() http.Header {
37598	if c.header_ == nil {
37599		c.header_ = make(http.Header)
37600	}
37601	return c.header_
37602}
37603
37604func (c *PlacementGroupsGetCall) doRequest(alt string) (*http.Response, error) {
37605	reqHeaders := make(http.Header)
37606	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
37607	for k, v := range c.header_ {
37608		reqHeaders[k] = v
37609	}
37610	reqHeaders.Set("User-Agent", c.s.userAgent())
37611	if c.ifNoneMatch_ != "" {
37612		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37613	}
37614	var body io.Reader = nil
37615	c.urlParams_.Set("alt", alt)
37616	c.urlParams_.Set("prettyPrint", "false")
37617	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups/{id}")
37618	urls += "?" + c.urlParams_.Encode()
37619	req, err := http.NewRequest("GET", urls, body)
37620	if err != nil {
37621		return nil, err
37622	}
37623	req.Header = reqHeaders
37624	googleapi.Expand(req.URL, map[string]string{
37625		"profileId": strconv.FormatInt(c.profileId, 10),
37626		"id":        strconv.FormatInt(c.id, 10),
37627	})
37628	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37629}
37630
37631// Do executes the "dfareporting.placementGroups.get" call.
37632// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37633// status code is an error. Response headers are in either
37634// *PlacementGroup.ServerResponse.Header or (if a response was returned
37635// at all) in error.(*googleapi.Error).Header. Use
37636// googleapi.IsNotModified to check whether the returned error was
37637// because http.StatusNotModified was returned.
37638func (c *PlacementGroupsGetCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37639	gensupport.SetOptions(c.urlParams_, opts...)
37640	res, err := c.doRequest("json")
37641	if res != nil && res.StatusCode == http.StatusNotModified {
37642		if res.Body != nil {
37643			res.Body.Close()
37644		}
37645		return nil, &googleapi.Error{
37646			Code:   res.StatusCode,
37647			Header: res.Header,
37648		}
37649	}
37650	if err != nil {
37651		return nil, err
37652	}
37653	defer googleapi.CloseBody(res)
37654	if err := googleapi.CheckResponse(res); err != nil {
37655		return nil, err
37656	}
37657	ret := &PlacementGroup{
37658		ServerResponse: googleapi.ServerResponse{
37659			Header:         res.Header,
37660			HTTPStatusCode: res.StatusCode,
37661		},
37662	}
37663	target := &ret
37664	if err := gensupport.DecodeResponse(target, res); err != nil {
37665		return nil, err
37666	}
37667	return ret, nil
37668	// {
37669	//   "description": "Gets one placement group by ID.",
37670	//   "httpMethod": "GET",
37671	//   "id": "dfareporting.placementGroups.get",
37672	//   "parameterOrder": [
37673	//     "profileId",
37674	//     "id"
37675	//   ],
37676	//   "parameters": {
37677	//     "id": {
37678	//       "description": "Placement group ID.",
37679	//       "format": "int64",
37680	//       "location": "path",
37681	//       "required": true,
37682	//       "type": "string"
37683	//     },
37684	//     "profileId": {
37685	//       "description": "User profile ID associated with this request.",
37686	//       "format": "int64",
37687	//       "location": "path",
37688	//       "required": true,
37689	//       "type": "string"
37690	//     }
37691	//   },
37692	//   "path": "userprofiles/{profileId}/placementGroups/{id}",
37693	//   "response": {
37694	//     "$ref": "PlacementGroup"
37695	//   },
37696	//   "scopes": [
37697	//     "https://www.googleapis.com/auth/dfatrafficking"
37698	//   ]
37699	// }
37700
37701}
37702
37703// method id "dfareporting.placementGroups.insert":
37704
37705type PlacementGroupsInsertCall struct {
37706	s              *Service
37707	profileId      int64
37708	placementgroup *PlacementGroup
37709	urlParams_     gensupport.URLParams
37710	ctx_           context.Context
37711	header_        http.Header
37712}
37713
37714// Insert: Inserts a new placement group.
37715func (r *PlacementGroupsService) Insert(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsInsertCall {
37716	c := &PlacementGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37717	c.profileId = profileId
37718	c.placementgroup = placementgroup
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 *PlacementGroupsInsertCall) Fields(s ...googleapi.Field) *PlacementGroupsInsertCall {
37726	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37727	return c
37728}
37729
37730// Context sets the context to be used in this call's Do method. Any
37731// pending HTTP request will be aborted if the provided context is
37732// canceled.
37733func (c *PlacementGroupsInsertCall) Context(ctx context.Context) *PlacementGroupsInsertCall {
37734	c.ctx_ = ctx
37735	return c
37736}
37737
37738// Header returns an http.Header that can be modified by the caller to
37739// add HTTP headers to the request.
37740func (c *PlacementGroupsInsertCall) Header() http.Header {
37741	if c.header_ == nil {
37742		c.header_ = make(http.Header)
37743	}
37744	return c.header_
37745}
37746
37747func (c *PlacementGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
37748	reqHeaders := make(http.Header)
37749	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
37750	for k, v := range c.header_ {
37751		reqHeaders[k] = v
37752	}
37753	reqHeaders.Set("User-Agent", c.s.userAgent())
37754	var body io.Reader = nil
37755	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
37756	if err != nil {
37757		return nil, err
37758	}
37759	reqHeaders.Set("Content-Type", "application/json")
37760	c.urlParams_.Set("alt", alt)
37761	c.urlParams_.Set("prettyPrint", "false")
37762	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
37763	urls += "?" + c.urlParams_.Encode()
37764	req, err := http.NewRequest("POST", urls, body)
37765	if err != nil {
37766		return nil, err
37767	}
37768	req.Header = reqHeaders
37769	googleapi.Expand(req.URL, map[string]string{
37770		"profileId": strconv.FormatInt(c.profileId, 10),
37771	})
37772	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37773}
37774
37775// Do executes the "dfareporting.placementGroups.insert" call.
37776// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37777// status code is an error. Response headers are in either
37778// *PlacementGroup.ServerResponse.Header or (if a response was returned
37779// at all) in error.(*googleapi.Error).Header. Use
37780// googleapi.IsNotModified to check whether the returned error was
37781// because http.StatusNotModified was returned.
37782func (c *PlacementGroupsInsertCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37783	gensupport.SetOptions(c.urlParams_, opts...)
37784	res, err := c.doRequest("json")
37785	if res != nil && res.StatusCode == http.StatusNotModified {
37786		if res.Body != nil {
37787			res.Body.Close()
37788		}
37789		return nil, &googleapi.Error{
37790			Code:   res.StatusCode,
37791			Header: res.Header,
37792		}
37793	}
37794	if err != nil {
37795		return nil, err
37796	}
37797	defer googleapi.CloseBody(res)
37798	if err := googleapi.CheckResponse(res); err != nil {
37799		return nil, err
37800	}
37801	ret := &PlacementGroup{
37802		ServerResponse: googleapi.ServerResponse{
37803			Header:         res.Header,
37804			HTTPStatusCode: res.StatusCode,
37805		},
37806	}
37807	target := &ret
37808	if err := gensupport.DecodeResponse(target, res); err != nil {
37809		return nil, err
37810	}
37811	return ret, nil
37812	// {
37813	//   "description": "Inserts a new placement group.",
37814	//   "httpMethod": "POST",
37815	//   "id": "dfareporting.placementGroups.insert",
37816	//   "parameterOrder": [
37817	//     "profileId"
37818	//   ],
37819	//   "parameters": {
37820	//     "profileId": {
37821	//       "description": "User profile ID associated with this request.",
37822	//       "format": "int64",
37823	//       "location": "path",
37824	//       "required": true,
37825	//       "type": "string"
37826	//     }
37827	//   },
37828	//   "path": "userprofiles/{profileId}/placementGroups",
37829	//   "request": {
37830	//     "$ref": "PlacementGroup"
37831	//   },
37832	//   "response": {
37833	//     "$ref": "PlacementGroup"
37834	//   },
37835	//   "scopes": [
37836	//     "https://www.googleapis.com/auth/dfatrafficking"
37837	//   ]
37838	// }
37839
37840}
37841
37842// method id "dfareporting.placementGroups.list":
37843
37844type PlacementGroupsListCall struct {
37845	s            *Service
37846	profileId    int64
37847	urlParams_   gensupport.URLParams
37848	ifNoneMatch_ string
37849	ctx_         context.Context
37850	header_      http.Header
37851}
37852
37853// List: Retrieves a list of placement groups, possibly filtered. This
37854// method supports paging.
37855func (r *PlacementGroupsService) List(profileId int64) *PlacementGroupsListCall {
37856	c := &PlacementGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37857	c.profileId = profileId
37858	return c
37859}
37860
37861// AdvertiserIds sets the optional parameter "advertiserIds": Select
37862// only placement groups that belong to these advertisers.
37863func (c *PlacementGroupsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementGroupsListCall {
37864	var advertiserIds_ []string
37865	for _, v := range advertiserIds {
37866		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
37867	}
37868	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
37869	return c
37870}
37871
37872// Archived sets the optional parameter "archived": Select only archived
37873// placements. Don't set this field to select both archived and
37874// non-archived placements.
37875func (c *PlacementGroupsListCall) Archived(archived bool) *PlacementGroupsListCall {
37876	c.urlParams_.Set("archived", fmt.Sprint(archived))
37877	return c
37878}
37879
37880// CampaignIds sets the optional parameter "campaignIds": Select only
37881// placement groups that belong to these campaigns.
37882func (c *PlacementGroupsListCall) CampaignIds(campaignIds ...int64) *PlacementGroupsListCall {
37883	var campaignIds_ []string
37884	for _, v := range campaignIds {
37885		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
37886	}
37887	c.urlParams_.SetMulti("campaignIds", campaignIds_)
37888	return c
37889}
37890
37891// ContentCategoryIds sets the optional parameter "contentCategoryIds":
37892// Select only placement groups that are associated with these content
37893// categories.
37894func (c *PlacementGroupsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementGroupsListCall {
37895	var contentCategoryIds_ []string
37896	for _, v := range contentCategoryIds {
37897		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
37898	}
37899	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
37900	return c
37901}
37902
37903// DirectorySiteIds sets the optional parameter "directorySiteIds":
37904// Select only placement groups that are associated with these directory
37905// sites.
37906func (c *PlacementGroupsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementGroupsListCall {
37907	var directorySiteIds_ []string
37908	for _, v := range directorySiteIds {
37909		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
37910	}
37911	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
37912	return c
37913}
37914
37915// Ids sets the optional parameter "ids": Select only placement groups
37916// with these IDs.
37917func (c *PlacementGroupsListCall) Ids(ids ...int64) *PlacementGroupsListCall {
37918	var ids_ []string
37919	for _, v := range ids {
37920		ids_ = append(ids_, fmt.Sprint(v))
37921	}
37922	c.urlParams_.SetMulti("ids", ids_)
37923	return c
37924}
37925
37926// MaxEndDate sets the optional parameter "maxEndDate": Select only
37927// placements or placement groups whose end date is on or before the
37928// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
37929func (c *PlacementGroupsListCall) MaxEndDate(maxEndDate string) *PlacementGroupsListCall {
37930	c.urlParams_.Set("maxEndDate", maxEndDate)
37931	return c
37932}
37933
37934// MaxResults sets the optional parameter "maxResults": Maximum number
37935// of results to return.
37936func (c *PlacementGroupsListCall) MaxResults(maxResults int64) *PlacementGroupsListCall {
37937	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37938	return c
37939}
37940
37941// MaxStartDate sets the optional parameter "maxStartDate": Select only
37942// placements or placement groups whose start date is on or before the
37943// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
37944func (c *PlacementGroupsListCall) MaxStartDate(maxStartDate string) *PlacementGroupsListCall {
37945	c.urlParams_.Set("maxStartDate", maxStartDate)
37946	return c
37947}
37948
37949// MinEndDate sets the optional parameter "minEndDate": Select only
37950// placements or placement groups whose end date is on or after the
37951// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
37952func (c *PlacementGroupsListCall) MinEndDate(minEndDate string) *PlacementGroupsListCall {
37953	c.urlParams_.Set("minEndDate", minEndDate)
37954	return c
37955}
37956
37957// MinStartDate sets the optional parameter "minStartDate": Select only
37958// placements or placement groups whose start date is on or after the
37959// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
37960func (c *PlacementGroupsListCall) MinStartDate(minStartDate string) *PlacementGroupsListCall {
37961	c.urlParams_.Set("minStartDate", minStartDate)
37962	return c
37963}
37964
37965// PageToken sets the optional parameter "pageToken": Value of the
37966// nextPageToken from the previous result page.
37967func (c *PlacementGroupsListCall) PageToken(pageToken string) *PlacementGroupsListCall {
37968	c.urlParams_.Set("pageToken", pageToken)
37969	return c
37970}
37971
37972// PlacementGroupType sets the optional parameter "placementGroupType":
37973// Select only placement groups belonging with this group type. A
37974// package is a simple group of placements that acts as a single pricing
37975// point for a group of tags. A roadblock is a group of placements that
37976// not only acts as a single pricing point but also assumes that all the
37977// tags in it will be served at the same time. A roadblock requires one
37978// of its assigned placements to be marked as primary for reporting.
37979//
37980// Possible values:
37981//   "PLACEMENT_PACKAGE"
37982//   "PLACEMENT_ROADBLOCK"
37983func (c *PlacementGroupsListCall) PlacementGroupType(placementGroupType string) *PlacementGroupsListCall {
37984	c.urlParams_.Set("placementGroupType", placementGroupType)
37985	return c
37986}
37987
37988// PlacementStrategyIds sets the optional parameter
37989// "placementStrategyIds": Select only placement groups that are
37990// associated with these placement strategies.
37991func (c *PlacementGroupsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementGroupsListCall {
37992	var placementStrategyIds_ []string
37993	for _, v := range placementStrategyIds {
37994		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
37995	}
37996	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
37997	return c
37998}
37999
38000// PricingTypes sets the optional parameter "pricingTypes": Select only
38001// placement groups with these pricing types.
38002//
38003// Possible values:
38004//   "PRICING_TYPE_CPA"
38005//   "PRICING_TYPE_CPC"
38006//   "PRICING_TYPE_CPM"
38007//   "PRICING_TYPE_CPM_ACTIVEVIEW"
38008//   "PRICING_TYPE_FLAT_RATE_CLICKS"
38009//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
38010func (c *PlacementGroupsListCall) PricingTypes(pricingTypes ...string) *PlacementGroupsListCall {
38011	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
38012	return c
38013}
38014
38015// SearchString sets the optional parameter "searchString": Allows
38016// searching for placement groups by name or ID. Wildcards (*) are
38017// allowed. For example, "placement*2015" will return placement groups
38018// with names like "placement group June 2015", "placement group May
38019// 2015", or simply "placements 2015". Most of the searches also add
38020// wildcards implicitly at the start and the end of the search string.
38021// For example, a search string of "placementgroup" will match placement
38022// groups with name "my placementgroup", "placementgroup 2015", or
38023// simply "placementgroup".
38024func (c *PlacementGroupsListCall) SearchString(searchString string) *PlacementGroupsListCall {
38025	c.urlParams_.Set("searchString", searchString)
38026	return c
38027}
38028
38029// SiteIds sets the optional parameter "siteIds": Select only placement
38030// groups that are associated with these sites.
38031func (c *PlacementGroupsListCall) SiteIds(siteIds ...int64) *PlacementGroupsListCall {
38032	var siteIds_ []string
38033	for _, v := range siteIds {
38034		siteIds_ = append(siteIds_, fmt.Sprint(v))
38035	}
38036	c.urlParams_.SetMulti("siteIds", siteIds_)
38037	return c
38038}
38039
38040// SortField sets the optional parameter "sortField": Field by which to
38041// sort the list.
38042//
38043// Possible values:
38044//   "ID" (default)
38045//   "NAME"
38046func (c *PlacementGroupsListCall) SortField(sortField string) *PlacementGroupsListCall {
38047	c.urlParams_.Set("sortField", sortField)
38048	return c
38049}
38050
38051// SortOrder sets the optional parameter "sortOrder": Order of sorted
38052// results.
38053//
38054// Possible values:
38055//   "ASCENDING" (default)
38056//   "DESCENDING"
38057func (c *PlacementGroupsListCall) SortOrder(sortOrder string) *PlacementGroupsListCall {
38058	c.urlParams_.Set("sortOrder", sortOrder)
38059	return c
38060}
38061
38062// Fields allows partial responses to be retrieved. See
38063// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38064// for more information.
38065func (c *PlacementGroupsListCall) Fields(s ...googleapi.Field) *PlacementGroupsListCall {
38066	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38067	return c
38068}
38069
38070// IfNoneMatch sets the optional parameter which makes the operation
38071// fail if the object's ETag matches the given value. This is useful for
38072// getting updates only after the object has changed since the last
38073// request. Use googleapi.IsNotModified to check whether the response
38074// error from Do is the result of In-None-Match.
38075func (c *PlacementGroupsListCall) IfNoneMatch(entityTag string) *PlacementGroupsListCall {
38076	c.ifNoneMatch_ = entityTag
38077	return c
38078}
38079
38080// Context sets the context to be used in this call's Do method. Any
38081// pending HTTP request will be aborted if the provided context is
38082// canceled.
38083func (c *PlacementGroupsListCall) Context(ctx context.Context) *PlacementGroupsListCall {
38084	c.ctx_ = ctx
38085	return c
38086}
38087
38088// Header returns an http.Header that can be modified by the caller to
38089// add HTTP headers to the request.
38090func (c *PlacementGroupsListCall) Header() http.Header {
38091	if c.header_ == nil {
38092		c.header_ = make(http.Header)
38093	}
38094	return c.header_
38095}
38096
38097func (c *PlacementGroupsListCall) doRequest(alt string) (*http.Response, error) {
38098	reqHeaders := make(http.Header)
38099	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
38100	for k, v := range c.header_ {
38101		reqHeaders[k] = v
38102	}
38103	reqHeaders.Set("User-Agent", c.s.userAgent())
38104	if c.ifNoneMatch_ != "" {
38105		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38106	}
38107	var body io.Reader = nil
38108	c.urlParams_.Set("alt", alt)
38109	c.urlParams_.Set("prettyPrint", "false")
38110	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38111	urls += "?" + c.urlParams_.Encode()
38112	req, err := http.NewRequest("GET", urls, body)
38113	if err != nil {
38114		return nil, err
38115	}
38116	req.Header = reqHeaders
38117	googleapi.Expand(req.URL, map[string]string{
38118		"profileId": strconv.FormatInt(c.profileId, 10),
38119	})
38120	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38121}
38122
38123// Do executes the "dfareporting.placementGroups.list" call.
38124// Exactly one of *PlacementGroupsListResponse or error will be non-nil.
38125// Any non-2xx status code is an error. Response headers are in either
38126// *PlacementGroupsListResponse.ServerResponse.Header or (if a response
38127// was returned at all) in error.(*googleapi.Error).Header. Use
38128// googleapi.IsNotModified to check whether the returned error was
38129// because http.StatusNotModified was returned.
38130func (c *PlacementGroupsListCall) Do(opts ...googleapi.CallOption) (*PlacementGroupsListResponse, error) {
38131	gensupport.SetOptions(c.urlParams_, opts...)
38132	res, err := c.doRequest("json")
38133	if res != nil && res.StatusCode == http.StatusNotModified {
38134		if res.Body != nil {
38135			res.Body.Close()
38136		}
38137		return nil, &googleapi.Error{
38138			Code:   res.StatusCode,
38139			Header: res.Header,
38140		}
38141	}
38142	if err != nil {
38143		return nil, err
38144	}
38145	defer googleapi.CloseBody(res)
38146	if err := googleapi.CheckResponse(res); err != nil {
38147		return nil, err
38148	}
38149	ret := &PlacementGroupsListResponse{
38150		ServerResponse: googleapi.ServerResponse{
38151			Header:         res.Header,
38152			HTTPStatusCode: res.StatusCode,
38153		},
38154	}
38155	target := &ret
38156	if err := gensupport.DecodeResponse(target, res); err != nil {
38157		return nil, err
38158	}
38159	return ret, nil
38160	// {
38161	//   "description": "Retrieves a list of placement groups, possibly filtered. This method supports paging.",
38162	//   "httpMethod": "GET",
38163	//   "id": "dfareporting.placementGroups.list",
38164	//   "parameterOrder": [
38165	//     "profileId"
38166	//   ],
38167	//   "parameters": {
38168	//     "advertiserIds": {
38169	//       "description": "Select only placement groups that belong to these advertisers.",
38170	//       "format": "int64",
38171	//       "location": "query",
38172	//       "repeated": true,
38173	//       "type": "string"
38174	//     },
38175	//     "archived": {
38176	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
38177	//       "location": "query",
38178	//       "type": "boolean"
38179	//     },
38180	//     "campaignIds": {
38181	//       "description": "Select only placement groups that belong to these campaigns.",
38182	//       "format": "int64",
38183	//       "location": "query",
38184	//       "repeated": true,
38185	//       "type": "string"
38186	//     },
38187	//     "contentCategoryIds": {
38188	//       "description": "Select only placement groups that are associated with these content categories.",
38189	//       "format": "int64",
38190	//       "location": "query",
38191	//       "repeated": true,
38192	//       "type": "string"
38193	//     },
38194	//     "directorySiteIds": {
38195	//       "description": "Select only placement groups that are associated with these directory sites.",
38196	//       "format": "int64",
38197	//       "location": "query",
38198	//       "repeated": true,
38199	//       "type": "string"
38200	//     },
38201	//     "ids": {
38202	//       "description": "Select only placement groups with these IDs.",
38203	//       "format": "int64",
38204	//       "location": "query",
38205	//       "repeated": true,
38206	//       "type": "string"
38207	//     },
38208	//     "maxEndDate": {
38209	//       "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\".",
38210	//       "location": "query",
38211	//       "type": "string"
38212	//     },
38213	//     "maxResults": {
38214	//       "default": "800",
38215	//       "description": "Maximum number of results to return.",
38216	//       "format": "int32",
38217	//       "location": "query",
38218	//       "maximum": "800",
38219	//       "minimum": "0",
38220	//       "type": "integer"
38221	//     },
38222	//     "maxStartDate": {
38223	//       "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\".",
38224	//       "location": "query",
38225	//       "type": "string"
38226	//     },
38227	//     "minEndDate": {
38228	//       "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\".",
38229	//       "location": "query",
38230	//       "type": "string"
38231	//     },
38232	//     "minStartDate": {
38233	//       "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\".",
38234	//       "location": "query",
38235	//       "type": "string"
38236	//     },
38237	//     "pageToken": {
38238	//       "description": "Value of the nextPageToken from the previous result page.",
38239	//       "location": "query",
38240	//       "type": "string"
38241	//     },
38242	//     "placementGroupType": {
38243	//       "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.",
38244	//       "enum": [
38245	//         "PLACEMENT_PACKAGE",
38246	//         "PLACEMENT_ROADBLOCK"
38247	//       ],
38248	//       "enumDescriptions": [
38249	//         "",
38250	//         ""
38251	//       ],
38252	//       "location": "query",
38253	//       "type": "string"
38254	//     },
38255	//     "placementStrategyIds": {
38256	//       "description": "Select only placement groups that are associated with these placement strategies.",
38257	//       "format": "int64",
38258	//       "location": "query",
38259	//       "repeated": true,
38260	//       "type": "string"
38261	//     },
38262	//     "pricingTypes": {
38263	//       "description": "Select only placement groups with these pricing types.",
38264	//       "enum": [
38265	//         "PRICING_TYPE_CPA",
38266	//         "PRICING_TYPE_CPC",
38267	//         "PRICING_TYPE_CPM",
38268	//         "PRICING_TYPE_CPM_ACTIVEVIEW",
38269	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
38270	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
38271	//       ],
38272	//       "enumDescriptions": [
38273	//         "",
38274	//         "",
38275	//         "",
38276	//         "",
38277	//         "",
38278	//         ""
38279	//       ],
38280	//       "location": "query",
38281	//       "repeated": true,
38282	//       "type": "string"
38283	//     },
38284	//     "profileId": {
38285	//       "description": "User profile ID associated with this request.",
38286	//       "format": "int64",
38287	//       "location": "path",
38288	//       "required": true,
38289	//       "type": "string"
38290	//     },
38291	//     "searchString": {
38292	//       "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\".",
38293	//       "location": "query",
38294	//       "type": "string"
38295	//     },
38296	//     "siteIds": {
38297	//       "description": "Select only placement groups that are associated with these sites.",
38298	//       "format": "int64",
38299	//       "location": "query",
38300	//       "repeated": true,
38301	//       "type": "string"
38302	//     },
38303	//     "sortField": {
38304	//       "default": "ID",
38305	//       "description": "Field by which to sort the list.",
38306	//       "enum": [
38307	//         "ID",
38308	//         "NAME"
38309	//       ],
38310	//       "enumDescriptions": [
38311	//         "",
38312	//         ""
38313	//       ],
38314	//       "location": "query",
38315	//       "type": "string"
38316	//     },
38317	//     "sortOrder": {
38318	//       "default": "ASCENDING",
38319	//       "description": "Order of sorted results.",
38320	//       "enum": [
38321	//         "ASCENDING",
38322	//         "DESCENDING"
38323	//       ],
38324	//       "enumDescriptions": [
38325	//         "",
38326	//         ""
38327	//       ],
38328	//       "location": "query",
38329	//       "type": "string"
38330	//     }
38331	//   },
38332	//   "path": "userprofiles/{profileId}/placementGroups",
38333	//   "response": {
38334	//     "$ref": "PlacementGroupsListResponse"
38335	//   },
38336	//   "scopes": [
38337	//     "https://www.googleapis.com/auth/dfatrafficking"
38338	//   ]
38339	// }
38340
38341}
38342
38343// Pages invokes f for each page of results.
38344// A non-nil error returned from f will halt the iteration.
38345// The provided context supersedes any context provided to the Context method.
38346func (c *PlacementGroupsListCall) Pages(ctx context.Context, f func(*PlacementGroupsListResponse) error) error {
38347	c.ctx_ = ctx
38348	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38349	for {
38350		x, err := c.Do()
38351		if err != nil {
38352			return err
38353		}
38354		if err := f(x); err != nil {
38355			return err
38356		}
38357		if x.NextPageToken == "" {
38358			return nil
38359		}
38360		c.PageToken(x.NextPageToken)
38361	}
38362}
38363
38364// method id "dfareporting.placementGroups.patch":
38365
38366type PlacementGroupsPatchCall struct {
38367	s              *Service
38368	profileId      int64
38369	placementgroup *PlacementGroup
38370	urlParams_     gensupport.URLParams
38371	ctx_           context.Context
38372	header_        http.Header
38373}
38374
38375// Patch: Updates an existing placement group. This method supports
38376// patch semantics.
38377func (r *PlacementGroupsService) Patch(profileId int64, id int64, placementgroup *PlacementGroup) *PlacementGroupsPatchCall {
38378	c := &PlacementGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38379	c.profileId = profileId
38380	c.urlParams_.Set("id", fmt.Sprint(id))
38381	c.placementgroup = placementgroup
38382	return c
38383}
38384
38385// Fields allows partial responses to be retrieved. See
38386// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38387// for more information.
38388func (c *PlacementGroupsPatchCall) Fields(s ...googleapi.Field) *PlacementGroupsPatchCall {
38389	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38390	return c
38391}
38392
38393// Context sets the context to be used in this call's Do method. Any
38394// pending HTTP request will be aborted if the provided context is
38395// canceled.
38396func (c *PlacementGroupsPatchCall) Context(ctx context.Context) *PlacementGroupsPatchCall {
38397	c.ctx_ = ctx
38398	return c
38399}
38400
38401// Header returns an http.Header that can be modified by the caller to
38402// add HTTP headers to the request.
38403func (c *PlacementGroupsPatchCall) Header() http.Header {
38404	if c.header_ == nil {
38405		c.header_ = make(http.Header)
38406	}
38407	return c.header_
38408}
38409
38410func (c *PlacementGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
38411	reqHeaders := make(http.Header)
38412	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
38413	for k, v := range c.header_ {
38414		reqHeaders[k] = v
38415	}
38416	reqHeaders.Set("User-Agent", c.s.userAgent())
38417	var body io.Reader = nil
38418	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38419	if err != nil {
38420		return nil, err
38421	}
38422	reqHeaders.Set("Content-Type", "application/json")
38423	c.urlParams_.Set("alt", alt)
38424	c.urlParams_.Set("prettyPrint", "false")
38425	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38426	urls += "?" + c.urlParams_.Encode()
38427	req, err := http.NewRequest("PATCH", urls, body)
38428	if err != nil {
38429		return nil, err
38430	}
38431	req.Header = reqHeaders
38432	googleapi.Expand(req.URL, map[string]string{
38433		"profileId": strconv.FormatInt(c.profileId, 10),
38434	})
38435	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38436}
38437
38438// Do executes the "dfareporting.placementGroups.patch" call.
38439// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
38440// status code is an error. Response headers are in either
38441// *PlacementGroup.ServerResponse.Header or (if a response was returned
38442// at all) in error.(*googleapi.Error).Header. Use
38443// googleapi.IsNotModified to check whether the returned error was
38444// because http.StatusNotModified was returned.
38445func (c *PlacementGroupsPatchCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38446	gensupport.SetOptions(c.urlParams_, opts...)
38447	res, err := c.doRequest("json")
38448	if res != nil && res.StatusCode == http.StatusNotModified {
38449		if res.Body != nil {
38450			res.Body.Close()
38451		}
38452		return nil, &googleapi.Error{
38453			Code:   res.StatusCode,
38454			Header: res.Header,
38455		}
38456	}
38457	if err != nil {
38458		return nil, err
38459	}
38460	defer googleapi.CloseBody(res)
38461	if err := googleapi.CheckResponse(res); err != nil {
38462		return nil, err
38463	}
38464	ret := &PlacementGroup{
38465		ServerResponse: googleapi.ServerResponse{
38466			Header:         res.Header,
38467			HTTPStatusCode: res.StatusCode,
38468		},
38469	}
38470	target := &ret
38471	if err := gensupport.DecodeResponse(target, res); err != nil {
38472		return nil, err
38473	}
38474	return ret, nil
38475	// {
38476	//   "description": "Updates an existing placement group. This method supports patch semantics.",
38477	//   "httpMethod": "PATCH",
38478	//   "id": "dfareporting.placementGroups.patch",
38479	//   "parameterOrder": [
38480	//     "profileId",
38481	//     "id"
38482	//   ],
38483	//   "parameters": {
38484	//     "id": {
38485	//       "description": "Placement group ID.",
38486	//       "format": "int64",
38487	//       "location": "query",
38488	//       "required": true,
38489	//       "type": "string"
38490	//     },
38491	//     "profileId": {
38492	//       "description": "User profile ID associated with this request.",
38493	//       "format": "int64",
38494	//       "location": "path",
38495	//       "required": true,
38496	//       "type": "string"
38497	//     }
38498	//   },
38499	//   "path": "userprofiles/{profileId}/placementGroups",
38500	//   "request": {
38501	//     "$ref": "PlacementGroup"
38502	//   },
38503	//   "response": {
38504	//     "$ref": "PlacementGroup"
38505	//   },
38506	//   "scopes": [
38507	//     "https://www.googleapis.com/auth/dfatrafficking"
38508	//   ]
38509	// }
38510
38511}
38512
38513// method id "dfareporting.placementGroups.update":
38514
38515type PlacementGroupsUpdateCall struct {
38516	s              *Service
38517	profileId      int64
38518	placementgroup *PlacementGroup
38519	urlParams_     gensupport.URLParams
38520	ctx_           context.Context
38521	header_        http.Header
38522}
38523
38524// Update: Updates an existing placement group.
38525func (r *PlacementGroupsService) Update(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsUpdateCall {
38526	c := &PlacementGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38527	c.profileId = profileId
38528	c.placementgroup = placementgroup
38529	return c
38530}
38531
38532// Fields allows partial responses to be retrieved. See
38533// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38534// for more information.
38535func (c *PlacementGroupsUpdateCall) Fields(s ...googleapi.Field) *PlacementGroupsUpdateCall {
38536	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38537	return c
38538}
38539
38540// Context sets the context to be used in this call's Do method. Any
38541// pending HTTP request will be aborted if the provided context is
38542// canceled.
38543func (c *PlacementGroupsUpdateCall) Context(ctx context.Context) *PlacementGroupsUpdateCall {
38544	c.ctx_ = ctx
38545	return c
38546}
38547
38548// Header returns an http.Header that can be modified by the caller to
38549// add HTTP headers to the request.
38550func (c *PlacementGroupsUpdateCall) Header() http.Header {
38551	if c.header_ == nil {
38552		c.header_ = make(http.Header)
38553	}
38554	return c.header_
38555}
38556
38557func (c *PlacementGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
38558	reqHeaders := make(http.Header)
38559	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
38560	for k, v := range c.header_ {
38561		reqHeaders[k] = v
38562	}
38563	reqHeaders.Set("User-Agent", c.s.userAgent())
38564	var body io.Reader = nil
38565	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38566	if err != nil {
38567		return nil, err
38568	}
38569	reqHeaders.Set("Content-Type", "application/json")
38570	c.urlParams_.Set("alt", alt)
38571	c.urlParams_.Set("prettyPrint", "false")
38572	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38573	urls += "?" + c.urlParams_.Encode()
38574	req, err := http.NewRequest("PUT", urls, body)
38575	if err != nil {
38576		return nil, err
38577	}
38578	req.Header = reqHeaders
38579	googleapi.Expand(req.URL, map[string]string{
38580		"profileId": strconv.FormatInt(c.profileId, 10),
38581	})
38582	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38583}
38584
38585// Do executes the "dfareporting.placementGroups.update" call.
38586// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
38587// status code is an error. Response headers are in either
38588// *PlacementGroup.ServerResponse.Header or (if a response was returned
38589// at all) in error.(*googleapi.Error).Header. Use
38590// googleapi.IsNotModified to check whether the returned error was
38591// because http.StatusNotModified was returned.
38592func (c *PlacementGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38593	gensupport.SetOptions(c.urlParams_, opts...)
38594	res, err := c.doRequest("json")
38595	if res != nil && res.StatusCode == http.StatusNotModified {
38596		if res.Body != nil {
38597			res.Body.Close()
38598		}
38599		return nil, &googleapi.Error{
38600			Code:   res.StatusCode,
38601			Header: res.Header,
38602		}
38603	}
38604	if err != nil {
38605		return nil, err
38606	}
38607	defer googleapi.CloseBody(res)
38608	if err := googleapi.CheckResponse(res); err != nil {
38609		return nil, err
38610	}
38611	ret := &PlacementGroup{
38612		ServerResponse: googleapi.ServerResponse{
38613			Header:         res.Header,
38614			HTTPStatusCode: res.StatusCode,
38615		},
38616	}
38617	target := &ret
38618	if err := gensupport.DecodeResponse(target, res); err != nil {
38619		return nil, err
38620	}
38621	return ret, nil
38622	// {
38623	//   "description": "Updates an existing placement group.",
38624	//   "httpMethod": "PUT",
38625	//   "id": "dfareporting.placementGroups.update",
38626	//   "parameterOrder": [
38627	//     "profileId"
38628	//   ],
38629	//   "parameters": {
38630	//     "profileId": {
38631	//       "description": "User profile ID associated with this request.",
38632	//       "format": "int64",
38633	//       "location": "path",
38634	//       "required": true,
38635	//       "type": "string"
38636	//     }
38637	//   },
38638	//   "path": "userprofiles/{profileId}/placementGroups",
38639	//   "request": {
38640	//     "$ref": "PlacementGroup"
38641	//   },
38642	//   "response": {
38643	//     "$ref": "PlacementGroup"
38644	//   },
38645	//   "scopes": [
38646	//     "https://www.googleapis.com/auth/dfatrafficking"
38647	//   ]
38648	// }
38649
38650}
38651
38652// method id "dfareporting.placementStrategies.delete":
38653
38654type PlacementStrategiesDeleteCall struct {
38655	s          *Service
38656	profileId  int64
38657	id         int64
38658	urlParams_ gensupport.URLParams
38659	ctx_       context.Context
38660	header_    http.Header
38661}
38662
38663// Delete: Deletes an existing placement strategy.
38664func (r *PlacementStrategiesService) Delete(profileId int64, id int64) *PlacementStrategiesDeleteCall {
38665	c := &PlacementStrategiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38666	c.profileId = profileId
38667	c.id = id
38668	return c
38669}
38670
38671// Fields allows partial responses to be retrieved. See
38672// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38673// for more information.
38674func (c *PlacementStrategiesDeleteCall) Fields(s ...googleapi.Field) *PlacementStrategiesDeleteCall {
38675	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38676	return c
38677}
38678
38679// Context sets the context to be used in this call's Do method. Any
38680// pending HTTP request will be aborted if the provided context is
38681// canceled.
38682func (c *PlacementStrategiesDeleteCall) Context(ctx context.Context) *PlacementStrategiesDeleteCall {
38683	c.ctx_ = ctx
38684	return c
38685}
38686
38687// Header returns an http.Header that can be modified by the caller to
38688// add HTTP headers to the request.
38689func (c *PlacementStrategiesDeleteCall) Header() http.Header {
38690	if c.header_ == nil {
38691		c.header_ = make(http.Header)
38692	}
38693	return c.header_
38694}
38695
38696func (c *PlacementStrategiesDeleteCall) doRequest(alt string) (*http.Response, error) {
38697	reqHeaders := make(http.Header)
38698	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
38699	for k, v := range c.header_ {
38700		reqHeaders[k] = v
38701	}
38702	reqHeaders.Set("User-Agent", c.s.userAgent())
38703	var body io.Reader = nil
38704	c.urlParams_.Set("alt", alt)
38705	c.urlParams_.Set("prettyPrint", "false")
38706	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
38707	urls += "?" + c.urlParams_.Encode()
38708	req, err := http.NewRequest("DELETE", urls, body)
38709	if err != nil {
38710		return nil, err
38711	}
38712	req.Header = reqHeaders
38713	googleapi.Expand(req.URL, map[string]string{
38714		"profileId": strconv.FormatInt(c.profileId, 10),
38715		"id":        strconv.FormatInt(c.id, 10),
38716	})
38717	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38718}
38719
38720// Do executes the "dfareporting.placementStrategies.delete" call.
38721func (c *PlacementStrategiesDeleteCall) Do(opts ...googleapi.CallOption) error {
38722	gensupport.SetOptions(c.urlParams_, opts...)
38723	res, err := c.doRequest("json")
38724	if err != nil {
38725		return err
38726	}
38727	defer googleapi.CloseBody(res)
38728	if err := googleapi.CheckResponse(res); err != nil {
38729		return err
38730	}
38731	return nil
38732	// {
38733	//   "description": "Deletes an existing placement strategy.",
38734	//   "httpMethod": "DELETE",
38735	//   "id": "dfareporting.placementStrategies.delete",
38736	//   "parameterOrder": [
38737	//     "profileId",
38738	//     "id"
38739	//   ],
38740	//   "parameters": {
38741	//     "id": {
38742	//       "description": "Placement strategy ID.",
38743	//       "format": "int64",
38744	//       "location": "path",
38745	//       "required": true,
38746	//       "type": "string"
38747	//     },
38748	//     "profileId": {
38749	//       "description": "User profile ID associated with this request.",
38750	//       "format": "int64",
38751	//       "location": "path",
38752	//       "required": true,
38753	//       "type": "string"
38754	//     }
38755	//   },
38756	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
38757	//   "scopes": [
38758	//     "https://www.googleapis.com/auth/dfatrafficking"
38759	//   ]
38760	// }
38761
38762}
38763
38764// method id "dfareporting.placementStrategies.get":
38765
38766type PlacementStrategiesGetCall struct {
38767	s            *Service
38768	profileId    int64
38769	id           int64
38770	urlParams_   gensupport.URLParams
38771	ifNoneMatch_ string
38772	ctx_         context.Context
38773	header_      http.Header
38774}
38775
38776// Get: Gets one placement strategy by ID.
38777func (r *PlacementStrategiesService) Get(profileId int64, id int64) *PlacementStrategiesGetCall {
38778	c := &PlacementStrategiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38779	c.profileId = profileId
38780	c.id = id
38781	return c
38782}
38783
38784// Fields allows partial responses to be retrieved. See
38785// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38786// for more information.
38787func (c *PlacementStrategiesGetCall) Fields(s ...googleapi.Field) *PlacementStrategiesGetCall {
38788	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38789	return c
38790}
38791
38792// IfNoneMatch sets the optional parameter which makes the operation
38793// fail if the object's ETag matches the given value. This is useful for
38794// getting updates only after the object has changed since the last
38795// request. Use googleapi.IsNotModified to check whether the response
38796// error from Do is the result of In-None-Match.
38797func (c *PlacementStrategiesGetCall) IfNoneMatch(entityTag string) *PlacementStrategiesGetCall {
38798	c.ifNoneMatch_ = entityTag
38799	return c
38800}
38801
38802// Context sets the context to be used in this call's Do method. Any
38803// pending HTTP request will be aborted if the provided context is
38804// canceled.
38805func (c *PlacementStrategiesGetCall) Context(ctx context.Context) *PlacementStrategiesGetCall {
38806	c.ctx_ = ctx
38807	return c
38808}
38809
38810// Header returns an http.Header that can be modified by the caller to
38811// add HTTP headers to the request.
38812func (c *PlacementStrategiesGetCall) Header() http.Header {
38813	if c.header_ == nil {
38814		c.header_ = make(http.Header)
38815	}
38816	return c.header_
38817}
38818
38819func (c *PlacementStrategiesGetCall) doRequest(alt string) (*http.Response, error) {
38820	reqHeaders := make(http.Header)
38821	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
38822	for k, v := range c.header_ {
38823		reqHeaders[k] = v
38824	}
38825	reqHeaders.Set("User-Agent", c.s.userAgent())
38826	if c.ifNoneMatch_ != "" {
38827		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38828	}
38829	var body io.Reader = nil
38830	c.urlParams_.Set("alt", alt)
38831	c.urlParams_.Set("prettyPrint", "false")
38832	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
38833	urls += "?" + c.urlParams_.Encode()
38834	req, err := http.NewRequest("GET", urls, body)
38835	if err != nil {
38836		return nil, err
38837	}
38838	req.Header = reqHeaders
38839	googleapi.Expand(req.URL, map[string]string{
38840		"profileId": strconv.FormatInt(c.profileId, 10),
38841		"id":        strconv.FormatInt(c.id, 10),
38842	})
38843	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38844}
38845
38846// Do executes the "dfareporting.placementStrategies.get" call.
38847// Exactly one of *PlacementStrategy or error will be non-nil. Any
38848// non-2xx status code is an error. Response headers are in either
38849// *PlacementStrategy.ServerResponse.Header or (if a response was
38850// returned at all) in error.(*googleapi.Error).Header. Use
38851// googleapi.IsNotModified to check whether the returned error was
38852// because http.StatusNotModified was returned.
38853func (c *PlacementStrategiesGetCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
38854	gensupport.SetOptions(c.urlParams_, opts...)
38855	res, err := c.doRequest("json")
38856	if res != nil && res.StatusCode == http.StatusNotModified {
38857		if res.Body != nil {
38858			res.Body.Close()
38859		}
38860		return nil, &googleapi.Error{
38861			Code:   res.StatusCode,
38862			Header: res.Header,
38863		}
38864	}
38865	if err != nil {
38866		return nil, err
38867	}
38868	defer googleapi.CloseBody(res)
38869	if err := googleapi.CheckResponse(res); err != nil {
38870		return nil, err
38871	}
38872	ret := &PlacementStrategy{
38873		ServerResponse: googleapi.ServerResponse{
38874			Header:         res.Header,
38875			HTTPStatusCode: res.StatusCode,
38876		},
38877	}
38878	target := &ret
38879	if err := gensupport.DecodeResponse(target, res); err != nil {
38880		return nil, err
38881	}
38882	return ret, nil
38883	// {
38884	//   "description": "Gets one placement strategy by ID.",
38885	//   "httpMethod": "GET",
38886	//   "id": "dfareporting.placementStrategies.get",
38887	//   "parameterOrder": [
38888	//     "profileId",
38889	//     "id"
38890	//   ],
38891	//   "parameters": {
38892	//     "id": {
38893	//       "description": "Placement strategy ID.",
38894	//       "format": "int64",
38895	//       "location": "path",
38896	//       "required": true,
38897	//       "type": "string"
38898	//     },
38899	//     "profileId": {
38900	//       "description": "User profile ID associated with this request.",
38901	//       "format": "int64",
38902	//       "location": "path",
38903	//       "required": true,
38904	//       "type": "string"
38905	//     }
38906	//   },
38907	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
38908	//   "response": {
38909	//     "$ref": "PlacementStrategy"
38910	//   },
38911	//   "scopes": [
38912	//     "https://www.googleapis.com/auth/dfatrafficking"
38913	//   ]
38914	// }
38915
38916}
38917
38918// method id "dfareporting.placementStrategies.insert":
38919
38920type PlacementStrategiesInsertCall struct {
38921	s                 *Service
38922	profileId         int64
38923	placementstrategy *PlacementStrategy
38924	urlParams_        gensupport.URLParams
38925	ctx_              context.Context
38926	header_           http.Header
38927}
38928
38929// Insert: Inserts a new placement strategy.
38930func (r *PlacementStrategiesService) Insert(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesInsertCall {
38931	c := &PlacementStrategiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38932	c.profileId = profileId
38933	c.placementstrategy = placementstrategy
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 *PlacementStrategiesInsertCall) Fields(s ...googleapi.Field) *PlacementStrategiesInsertCall {
38941	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38942	return c
38943}
38944
38945// Context sets the context to be used in this call's Do method. Any
38946// pending HTTP request will be aborted if the provided context is
38947// canceled.
38948func (c *PlacementStrategiesInsertCall) Context(ctx context.Context) *PlacementStrategiesInsertCall {
38949	c.ctx_ = ctx
38950	return c
38951}
38952
38953// Header returns an http.Header that can be modified by the caller to
38954// add HTTP headers to the request.
38955func (c *PlacementStrategiesInsertCall) Header() http.Header {
38956	if c.header_ == nil {
38957		c.header_ = make(http.Header)
38958	}
38959	return c.header_
38960}
38961
38962func (c *PlacementStrategiesInsertCall) doRequest(alt string) (*http.Response, error) {
38963	reqHeaders := make(http.Header)
38964	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
38965	for k, v := range c.header_ {
38966		reqHeaders[k] = v
38967	}
38968	reqHeaders.Set("User-Agent", c.s.userAgent())
38969	var body io.Reader = nil
38970	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
38971	if err != nil {
38972		return nil, err
38973	}
38974	reqHeaders.Set("Content-Type", "application/json")
38975	c.urlParams_.Set("alt", alt)
38976	c.urlParams_.Set("prettyPrint", "false")
38977	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
38978	urls += "?" + c.urlParams_.Encode()
38979	req, err := http.NewRequest("POST", urls, body)
38980	if err != nil {
38981		return nil, err
38982	}
38983	req.Header = reqHeaders
38984	googleapi.Expand(req.URL, map[string]string{
38985		"profileId": strconv.FormatInt(c.profileId, 10),
38986	})
38987	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38988}
38989
38990// Do executes the "dfareporting.placementStrategies.insert" call.
38991// Exactly one of *PlacementStrategy or error will be non-nil. Any
38992// non-2xx status code is an error. Response headers are in either
38993// *PlacementStrategy.ServerResponse.Header or (if a response was
38994// returned at all) in error.(*googleapi.Error).Header. Use
38995// googleapi.IsNotModified to check whether the returned error was
38996// because http.StatusNotModified was returned.
38997func (c *PlacementStrategiesInsertCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
38998	gensupport.SetOptions(c.urlParams_, opts...)
38999	res, err := c.doRequest("json")
39000	if res != nil && res.StatusCode == http.StatusNotModified {
39001		if res.Body != nil {
39002			res.Body.Close()
39003		}
39004		return nil, &googleapi.Error{
39005			Code:   res.StatusCode,
39006			Header: res.Header,
39007		}
39008	}
39009	if err != nil {
39010		return nil, err
39011	}
39012	defer googleapi.CloseBody(res)
39013	if err := googleapi.CheckResponse(res); err != nil {
39014		return nil, err
39015	}
39016	ret := &PlacementStrategy{
39017		ServerResponse: googleapi.ServerResponse{
39018			Header:         res.Header,
39019			HTTPStatusCode: res.StatusCode,
39020		},
39021	}
39022	target := &ret
39023	if err := gensupport.DecodeResponse(target, res); err != nil {
39024		return nil, err
39025	}
39026	return ret, nil
39027	// {
39028	//   "description": "Inserts a new placement strategy.",
39029	//   "httpMethod": "POST",
39030	//   "id": "dfareporting.placementStrategies.insert",
39031	//   "parameterOrder": [
39032	//     "profileId"
39033	//   ],
39034	//   "parameters": {
39035	//     "profileId": {
39036	//       "description": "User profile ID associated with this request.",
39037	//       "format": "int64",
39038	//       "location": "path",
39039	//       "required": true,
39040	//       "type": "string"
39041	//     }
39042	//   },
39043	//   "path": "userprofiles/{profileId}/placementStrategies",
39044	//   "request": {
39045	//     "$ref": "PlacementStrategy"
39046	//   },
39047	//   "response": {
39048	//     "$ref": "PlacementStrategy"
39049	//   },
39050	//   "scopes": [
39051	//     "https://www.googleapis.com/auth/dfatrafficking"
39052	//   ]
39053	// }
39054
39055}
39056
39057// method id "dfareporting.placementStrategies.list":
39058
39059type PlacementStrategiesListCall struct {
39060	s            *Service
39061	profileId    int64
39062	urlParams_   gensupport.URLParams
39063	ifNoneMatch_ string
39064	ctx_         context.Context
39065	header_      http.Header
39066}
39067
39068// List: Retrieves a list of placement strategies, possibly filtered.
39069// This method supports paging.
39070func (r *PlacementStrategiesService) List(profileId int64) *PlacementStrategiesListCall {
39071	c := &PlacementStrategiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39072	c.profileId = profileId
39073	return c
39074}
39075
39076// Ids sets the optional parameter "ids": Select only placement
39077// strategies with these IDs.
39078func (c *PlacementStrategiesListCall) Ids(ids ...int64) *PlacementStrategiesListCall {
39079	var ids_ []string
39080	for _, v := range ids {
39081		ids_ = append(ids_, fmt.Sprint(v))
39082	}
39083	c.urlParams_.SetMulti("ids", ids_)
39084	return c
39085}
39086
39087// MaxResults sets the optional parameter "maxResults": Maximum number
39088// of results to return.
39089func (c *PlacementStrategiesListCall) MaxResults(maxResults int64) *PlacementStrategiesListCall {
39090	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
39091	return c
39092}
39093
39094// PageToken sets the optional parameter "pageToken": Value of the
39095// nextPageToken from the previous result page.
39096func (c *PlacementStrategiesListCall) PageToken(pageToken string) *PlacementStrategiesListCall {
39097	c.urlParams_.Set("pageToken", pageToken)
39098	return c
39099}
39100
39101// SearchString sets the optional parameter "searchString": Allows
39102// searching for objects by name or ID. Wildcards (*) are allowed. For
39103// example, "placementstrategy*2015" will return objects with names like
39104// "placementstrategy June 2015", "placementstrategy April 2015", or
39105// simply "placementstrategy 2015". Most of the searches also add
39106// wildcards implicitly at the start and the end of the search string.
39107// For example, a search string of "placementstrategy" will match
39108// objects with name "my placementstrategy", "placementstrategy 2015",
39109// or simply "placementstrategy".
39110func (c *PlacementStrategiesListCall) SearchString(searchString string) *PlacementStrategiesListCall {
39111	c.urlParams_.Set("searchString", searchString)
39112	return c
39113}
39114
39115// SortField sets the optional parameter "sortField": Field by which to
39116// sort the list.
39117//
39118// Possible values:
39119//   "ID" (default)
39120//   "NAME"
39121func (c *PlacementStrategiesListCall) SortField(sortField string) *PlacementStrategiesListCall {
39122	c.urlParams_.Set("sortField", sortField)
39123	return c
39124}
39125
39126// SortOrder sets the optional parameter "sortOrder": Order of sorted
39127// results.
39128//
39129// Possible values:
39130//   "ASCENDING" (default)
39131//   "DESCENDING"
39132func (c *PlacementStrategiesListCall) SortOrder(sortOrder string) *PlacementStrategiesListCall {
39133	c.urlParams_.Set("sortOrder", sortOrder)
39134	return c
39135}
39136
39137// Fields allows partial responses to be retrieved. See
39138// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39139// for more information.
39140func (c *PlacementStrategiesListCall) Fields(s ...googleapi.Field) *PlacementStrategiesListCall {
39141	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39142	return c
39143}
39144
39145// IfNoneMatch sets the optional parameter which makes the operation
39146// fail if the object's ETag matches the given value. This is useful for
39147// getting updates only after the object has changed since the last
39148// request. Use googleapi.IsNotModified to check whether the response
39149// error from Do is the result of In-None-Match.
39150func (c *PlacementStrategiesListCall) IfNoneMatch(entityTag string) *PlacementStrategiesListCall {
39151	c.ifNoneMatch_ = entityTag
39152	return c
39153}
39154
39155// Context sets the context to be used in this call's Do method. Any
39156// pending HTTP request will be aborted if the provided context is
39157// canceled.
39158func (c *PlacementStrategiesListCall) Context(ctx context.Context) *PlacementStrategiesListCall {
39159	c.ctx_ = ctx
39160	return c
39161}
39162
39163// Header returns an http.Header that can be modified by the caller to
39164// add HTTP headers to the request.
39165func (c *PlacementStrategiesListCall) Header() http.Header {
39166	if c.header_ == nil {
39167		c.header_ = make(http.Header)
39168	}
39169	return c.header_
39170}
39171
39172func (c *PlacementStrategiesListCall) doRequest(alt string) (*http.Response, error) {
39173	reqHeaders := make(http.Header)
39174	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
39175	for k, v := range c.header_ {
39176		reqHeaders[k] = v
39177	}
39178	reqHeaders.Set("User-Agent", c.s.userAgent())
39179	if c.ifNoneMatch_ != "" {
39180		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39181	}
39182	var body io.Reader = nil
39183	c.urlParams_.Set("alt", alt)
39184	c.urlParams_.Set("prettyPrint", "false")
39185	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39186	urls += "?" + c.urlParams_.Encode()
39187	req, err := http.NewRequest("GET", urls, body)
39188	if err != nil {
39189		return nil, err
39190	}
39191	req.Header = reqHeaders
39192	googleapi.Expand(req.URL, map[string]string{
39193		"profileId": strconv.FormatInt(c.profileId, 10),
39194	})
39195	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39196}
39197
39198// Do executes the "dfareporting.placementStrategies.list" call.
39199// Exactly one of *PlacementStrategiesListResponse or error will be
39200// non-nil. Any non-2xx status code is an error. Response headers are in
39201// either *PlacementStrategiesListResponse.ServerResponse.Header or (if
39202// a response was returned at all) in error.(*googleapi.Error).Header.
39203// Use googleapi.IsNotModified to check whether the returned error was
39204// because http.StatusNotModified was returned.
39205func (c *PlacementStrategiesListCall) Do(opts ...googleapi.CallOption) (*PlacementStrategiesListResponse, error) {
39206	gensupport.SetOptions(c.urlParams_, opts...)
39207	res, err := c.doRequest("json")
39208	if res != nil && res.StatusCode == http.StatusNotModified {
39209		if res.Body != nil {
39210			res.Body.Close()
39211		}
39212		return nil, &googleapi.Error{
39213			Code:   res.StatusCode,
39214			Header: res.Header,
39215		}
39216	}
39217	if err != nil {
39218		return nil, err
39219	}
39220	defer googleapi.CloseBody(res)
39221	if err := googleapi.CheckResponse(res); err != nil {
39222		return nil, err
39223	}
39224	ret := &PlacementStrategiesListResponse{
39225		ServerResponse: googleapi.ServerResponse{
39226			Header:         res.Header,
39227			HTTPStatusCode: res.StatusCode,
39228		},
39229	}
39230	target := &ret
39231	if err := gensupport.DecodeResponse(target, res); err != nil {
39232		return nil, err
39233	}
39234	return ret, nil
39235	// {
39236	//   "description": "Retrieves a list of placement strategies, possibly filtered. This method supports paging.",
39237	//   "httpMethod": "GET",
39238	//   "id": "dfareporting.placementStrategies.list",
39239	//   "parameterOrder": [
39240	//     "profileId"
39241	//   ],
39242	//   "parameters": {
39243	//     "ids": {
39244	//       "description": "Select only placement strategies with these IDs.",
39245	//       "format": "int64",
39246	//       "location": "query",
39247	//       "repeated": true,
39248	//       "type": "string"
39249	//     },
39250	//     "maxResults": {
39251	//       "default": "1000",
39252	//       "description": "Maximum number of results to return.",
39253	//       "format": "int32",
39254	//       "location": "query",
39255	//       "maximum": "1000",
39256	//       "minimum": "0",
39257	//       "type": "integer"
39258	//     },
39259	//     "pageToken": {
39260	//       "description": "Value of the nextPageToken from the previous result page.",
39261	//       "location": "query",
39262	//       "type": "string"
39263	//     },
39264	//     "profileId": {
39265	//       "description": "User profile ID associated with this request.",
39266	//       "format": "int64",
39267	//       "location": "path",
39268	//       "required": true,
39269	//       "type": "string"
39270	//     },
39271	//     "searchString": {
39272	//       "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\".",
39273	//       "location": "query",
39274	//       "type": "string"
39275	//     },
39276	//     "sortField": {
39277	//       "default": "ID",
39278	//       "description": "Field by which to sort the list.",
39279	//       "enum": [
39280	//         "ID",
39281	//         "NAME"
39282	//       ],
39283	//       "enumDescriptions": [
39284	//         "",
39285	//         ""
39286	//       ],
39287	//       "location": "query",
39288	//       "type": "string"
39289	//     },
39290	//     "sortOrder": {
39291	//       "default": "ASCENDING",
39292	//       "description": "Order of sorted results.",
39293	//       "enum": [
39294	//         "ASCENDING",
39295	//         "DESCENDING"
39296	//       ],
39297	//       "enumDescriptions": [
39298	//         "",
39299	//         ""
39300	//       ],
39301	//       "location": "query",
39302	//       "type": "string"
39303	//     }
39304	//   },
39305	//   "path": "userprofiles/{profileId}/placementStrategies",
39306	//   "response": {
39307	//     "$ref": "PlacementStrategiesListResponse"
39308	//   },
39309	//   "scopes": [
39310	//     "https://www.googleapis.com/auth/dfatrafficking"
39311	//   ]
39312	// }
39313
39314}
39315
39316// Pages invokes f for each page of results.
39317// A non-nil error returned from f will halt the iteration.
39318// The provided context supersedes any context provided to the Context method.
39319func (c *PlacementStrategiesListCall) Pages(ctx context.Context, f func(*PlacementStrategiesListResponse) error) error {
39320	c.ctx_ = ctx
39321	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
39322	for {
39323		x, err := c.Do()
39324		if err != nil {
39325			return err
39326		}
39327		if err := f(x); err != nil {
39328			return err
39329		}
39330		if x.NextPageToken == "" {
39331			return nil
39332		}
39333		c.PageToken(x.NextPageToken)
39334	}
39335}
39336
39337// method id "dfareporting.placementStrategies.patch":
39338
39339type PlacementStrategiesPatchCall struct {
39340	s                 *Service
39341	profileId         int64
39342	placementstrategy *PlacementStrategy
39343	urlParams_        gensupport.URLParams
39344	ctx_              context.Context
39345	header_           http.Header
39346}
39347
39348// Patch: Updates an existing placement strategy. This method supports
39349// patch semantics.
39350func (r *PlacementStrategiesService) Patch(profileId int64, id int64, placementstrategy *PlacementStrategy) *PlacementStrategiesPatchCall {
39351	c := &PlacementStrategiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39352	c.profileId = profileId
39353	c.urlParams_.Set("id", fmt.Sprint(id))
39354	c.placementstrategy = placementstrategy
39355	return c
39356}
39357
39358// Fields allows partial responses to be retrieved. See
39359// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39360// for more information.
39361func (c *PlacementStrategiesPatchCall) Fields(s ...googleapi.Field) *PlacementStrategiesPatchCall {
39362	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39363	return c
39364}
39365
39366// Context sets the context to be used in this call's Do method. Any
39367// pending HTTP request will be aborted if the provided context is
39368// canceled.
39369func (c *PlacementStrategiesPatchCall) Context(ctx context.Context) *PlacementStrategiesPatchCall {
39370	c.ctx_ = ctx
39371	return c
39372}
39373
39374// Header returns an http.Header that can be modified by the caller to
39375// add HTTP headers to the request.
39376func (c *PlacementStrategiesPatchCall) Header() http.Header {
39377	if c.header_ == nil {
39378		c.header_ = make(http.Header)
39379	}
39380	return c.header_
39381}
39382
39383func (c *PlacementStrategiesPatchCall) doRequest(alt string) (*http.Response, error) {
39384	reqHeaders := make(http.Header)
39385	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
39386	for k, v := range c.header_ {
39387		reqHeaders[k] = v
39388	}
39389	reqHeaders.Set("User-Agent", c.s.userAgent())
39390	var body io.Reader = nil
39391	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39392	if err != nil {
39393		return nil, err
39394	}
39395	reqHeaders.Set("Content-Type", "application/json")
39396	c.urlParams_.Set("alt", alt)
39397	c.urlParams_.Set("prettyPrint", "false")
39398	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39399	urls += "?" + c.urlParams_.Encode()
39400	req, err := http.NewRequest("PATCH", urls, body)
39401	if err != nil {
39402		return nil, err
39403	}
39404	req.Header = reqHeaders
39405	googleapi.Expand(req.URL, map[string]string{
39406		"profileId": strconv.FormatInt(c.profileId, 10),
39407	})
39408	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39409}
39410
39411// Do executes the "dfareporting.placementStrategies.patch" call.
39412// Exactly one of *PlacementStrategy or error will be non-nil. Any
39413// non-2xx status code is an error. Response headers are in either
39414// *PlacementStrategy.ServerResponse.Header or (if a response was
39415// returned at all) in error.(*googleapi.Error).Header. Use
39416// googleapi.IsNotModified to check whether the returned error was
39417// because http.StatusNotModified was returned.
39418func (c *PlacementStrategiesPatchCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39419	gensupport.SetOptions(c.urlParams_, opts...)
39420	res, err := c.doRequest("json")
39421	if res != nil && res.StatusCode == http.StatusNotModified {
39422		if res.Body != nil {
39423			res.Body.Close()
39424		}
39425		return nil, &googleapi.Error{
39426			Code:   res.StatusCode,
39427			Header: res.Header,
39428		}
39429	}
39430	if err != nil {
39431		return nil, err
39432	}
39433	defer googleapi.CloseBody(res)
39434	if err := googleapi.CheckResponse(res); err != nil {
39435		return nil, err
39436	}
39437	ret := &PlacementStrategy{
39438		ServerResponse: googleapi.ServerResponse{
39439			Header:         res.Header,
39440			HTTPStatusCode: res.StatusCode,
39441		},
39442	}
39443	target := &ret
39444	if err := gensupport.DecodeResponse(target, res); err != nil {
39445		return nil, err
39446	}
39447	return ret, nil
39448	// {
39449	//   "description": "Updates an existing placement strategy. This method supports patch semantics.",
39450	//   "httpMethod": "PATCH",
39451	//   "id": "dfareporting.placementStrategies.patch",
39452	//   "parameterOrder": [
39453	//     "profileId",
39454	//     "id"
39455	//   ],
39456	//   "parameters": {
39457	//     "id": {
39458	//       "description": "Placement strategy ID.",
39459	//       "format": "int64",
39460	//       "location": "query",
39461	//       "required": true,
39462	//       "type": "string"
39463	//     },
39464	//     "profileId": {
39465	//       "description": "User profile ID associated with this request.",
39466	//       "format": "int64",
39467	//       "location": "path",
39468	//       "required": true,
39469	//       "type": "string"
39470	//     }
39471	//   },
39472	//   "path": "userprofiles/{profileId}/placementStrategies",
39473	//   "request": {
39474	//     "$ref": "PlacementStrategy"
39475	//   },
39476	//   "response": {
39477	//     "$ref": "PlacementStrategy"
39478	//   },
39479	//   "scopes": [
39480	//     "https://www.googleapis.com/auth/dfatrafficking"
39481	//   ]
39482	// }
39483
39484}
39485
39486// method id "dfareporting.placementStrategies.update":
39487
39488type PlacementStrategiesUpdateCall struct {
39489	s                 *Service
39490	profileId         int64
39491	placementstrategy *PlacementStrategy
39492	urlParams_        gensupport.URLParams
39493	ctx_              context.Context
39494	header_           http.Header
39495}
39496
39497// Update: Updates an existing placement strategy.
39498func (r *PlacementStrategiesService) Update(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesUpdateCall {
39499	c := &PlacementStrategiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39500	c.profileId = profileId
39501	c.placementstrategy = placementstrategy
39502	return c
39503}
39504
39505// Fields allows partial responses to be retrieved. See
39506// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39507// for more information.
39508func (c *PlacementStrategiesUpdateCall) Fields(s ...googleapi.Field) *PlacementStrategiesUpdateCall {
39509	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39510	return c
39511}
39512
39513// Context sets the context to be used in this call's Do method. Any
39514// pending HTTP request will be aborted if the provided context is
39515// canceled.
39516func (c *PlacementStrategiesUpdateCall) Context(ctx context.Context) *PlacementStrategiesUpdateCall {
39517	c.ctx_ = ctx
39518	return c
39519}
39520
39521// Header returns an http.Header that can be modified by the caller to
39522// add HTTP headers to the request.
39523func (c *PlacementStrategiesUpdateCall) Header() http.Header {
39524	if c.header_ == nil {
39525		c.header_ = make(http.Header)
39526	}
39527	return c.header_
39528}
39529
39530func (c *PlacementStrategiesUpdateCall) doRequest(alt string) (*http.Response, error) {
39531	reqHeaders := make(http.Header)
39532	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
39533	for k, v := range c.header_ {
39534		reqHeaders[k] = v
39535	}
39536	reqHeaders.Set("User-Agent", c.s.userAgent())
39537	var body io.Reader = nil
39538	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39539	if err != nil {
39540		return nil, err
39541	}
39542	reqHeaders.Set("Content-Type", "application/json")
39543	c.urlParams_.Set("alt", alt)
39544	c.urlParams_.Set("prettyPrint", "false")
39545	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39546	urls += "?" + c.urlParams_.Encode()
39547	req, err := http.NewRequest("PUT", urls, body)
39548	if err != nil {
39549		return nil, err
39550	}
39551	req.Header = reqHeaders
39552	googleapi.Expand(req.URL, map[string]string{
39553		"profileId": strconv.FormatInt(c.profileId, 10),
39554	})
39555	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39556}
39557
39558// Do executes the "dfareporting.placementStrategies.update" call.
39559// Exactly one of *PlacementStrategy or error will be non-nil. Any
39560// non-2xx status code is an error. Response headers are in either
39561// *PlacementStrategy.ServerResponse.Header or (if a response was
39562// returned at all) in error.(*googleapi.Error).Header. Use
39563// googleapi.IsNotModified to check whether the returned error was
39564// because http.StatusNotModified was returned.
39565func (c *PlacementStrategiesUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39566	gensupport.SetOptions(c.urlParams_, opts...)
39567	res, err := c.doRequest("json")
39568	if res != nil && res.StatusCode == http.StatusNotModified {
39569		if res.Body != nil {
39570			res.Body.Close()
39571		}
39572		return nil, &googleapi.Error{
39573			Code:   res.StatusCode,
39574			Header: res.Header,
39575		}
39576	}
39577	if err != nil {
39578		return nil, err
39579	}
39580	defer googleapi.CloseBody(res)
39581	if err := googleapi.CheckResponse(res); err != nil {
39582		return nil, err
39583	}
39584	ret := &PlacementStrategy{
39585		ServerResponse: googleapi.ServerResponse{
39586			Header:         res.Header,
39587			HTTPStatusCode: res.StatusCode,
39588		},
39589	}
39590	target := &ret
39591	if err := gensupport.DecodeResponse(target, res); err != nil {
39592		return nil, err
39593	}
39594	return ret, nil
39595	// {
39596	//   "description": "Updates an existing placement strategy.",
39597	//   "httpMethod": "PUT",
39598	//   "id": "dfareporting.placementStrategies.update",
39599	//   "parameterOrder": [
39600	//     "profileId"
39601	//   ],
39602	//   "parameters": {
39603	//     "profileId": {
39604	//       "description": "User profile ID associated with this request.",
39605	//       "format": "int64",
39606	//       "location": "path",
39607	//       "required": true,
39608	//       "type": "string"
39609	//     }
39610	//   },
39611	//   "path": "userprofiles/{profileId}/placementStrategies",
39612	//   "request": {
39613	//     "$ref": "PlacementStrategy"
39614	//   },
39615	//   "response": {
39616	//     "$ref": "PlacementStrategy"
39617	//   },
39618	//   "scopes": [
39619	//     "https://www.googleapis.com/auth/dfatrafficking"
39620	//   ]
39621	// }
39622
39623}
39624
39625// method id "dfareporting.placements.generatetags":
39626
39627type PlacementsGeneratetagsCall struct {
39628	s          *Service
39629	profileId  int64
39630	urlParams_ gensupport.URLParams
39631	ctx_       context.Context
39632	header_    http.Header
39633}
39634
39635// Generatetags: Generates tags for a placement.
39636func (r *PlacementsService) Generatetags(profileId int64) *PlacementsGeneratetagsCall {
39637	c := &PlacementsGeneratetagsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39638	c.profileId = profileId
39639	return c
39640}
39641
39642// CampaignId sets the optional parameter "campaignId": Generate
39643// placements belonging to this campaign. This is a required field.
39644func (c *PlacementsGeneratetagsCall) CampaignId(campaignId int64) *PlacementsGeneratetagsCall {
39645	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
39646	return c
39647}
39648
39649// PlacementIds sets the optional parameter "placementIds": Generate
39650// tags for these placements.
39651func (c *PlacementsGeneratetagsCall) PlacementIds(placementIds ...int64) *PlacementsGeneratetagsCall {
39652	var placementIds_ []string
39653	for _, v := range placementIds {
39654		placementIds_ = append(placementIds_, fmt.Sprint(v))
39655	}
39656	c.urlParams_.SetMulti("placementIds", placementIds_)
39657	return c
39658}
39659
39660// TagFormats sets the optional parameter "tagFormats": Tag formats to
39661// generate for these placements.
39662//
39663// Note: PLACEMENT_TAG_STANDARD can only be generated for 1x1
39664// placements.
39665//
39666// Possible values:
39667//   "PLACEMENT_TAG_CLICK_COMMANDS"
39668//   "PLACEMENT_TAG_IFRAME_ILAYER"
39669//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
39670//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
39671//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
39672//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
39673//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
39674//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
39675//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
39676//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
39677//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
39678//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
39679//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
39680//   "PLACEMENT_TAG_JAVASCRIPT"
39681//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
39682//   "PLACEMENT_TAG_STANDARD"
39683//   "PLACEMENT_TAG_TRACKING"
39684//   "PLACEMENT_TAG_TRACKING_IFRAME"
39685//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
39686func (c *PlacementsGeneratetagsCall) TagFormats(tagFormats ...string) *PlacementsGeneratetagsCall {
39687	c.urlParams_.SetMulti("tagFormats", append([]string{}, tagFormats...))
39688	return c
39689}
39690
39691// Fields allows partial responses to be retrieved. See
39692// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39693// for more information.
39694func (c *PlacementsGeneratetagsCall) Fields(s ...googleapi.Field) *PlacementsGeneratetagsCall {
39695	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39696	return c
39697}
39698
39699// Context sets the context to be used in this call's Do method. Any
39700// pending HTTP request will be aborted if the provided context is
39701// canceled.
39702func (c *PlacementsGeneratetagsCall) Context(ctx context.Context) *PlacementsGeneratetagsCall {
39703	c.ctx_ = ctx
39704	return c
39705}
39706
39707// Header returns an http.Header that can be modified by the caller to
39708// add HTTP headers to the request.
39709func (c *PlacementsGeneratetagsCall) Header() http.Header {
39710	if c.header_ == nil {
39711		c.header_ = make(http.Header)
39712	}
39713	return c.header_
39714}
39715
39716func (c *PlacementsGeneratetagsCall) doRequest(alt string) (*http.Response, error) {
39717	reqHeaders := make(http.Header)
39718	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
39719	for k, v := range c.header_ {
39720		reqHeaders[k] = v
39721	}
39722	reqHeaders.Set("User-Agent", c.s.userAgent())
39723	var body io.Reader = nil
39724	c.urlParams_.Set("alt", alt)
39725	c.urlParams_.Set("prettyPrint", "false")
39726	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/generatetags")
39727	urls += "?" + c.urlParams_.Encode()
39728	req, err := http.NewRequest("POST", urls, body)
39729	if err != nil {
39730		return nil, err
39731	}
39732	req.Header = reqHeaders
39733	googleapi.Expand(req.URL, map[string]string{
39734		"profileId": strconv.FormatInt(c.profileId, 10),
39735	})
39736	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39737}
39738
39739// Do executes the "dfareporting.placements.generatetags" call.
39740// Exactly one of *PlacementsGenerateTagsResponse or error will be
39741// non-nil. Any non-2xx status code is an error. Response headers are in
39742// either *PlacementsGenerateTagsResponse.ServerResponse.Header or (if a
39743// response was returned at all) in error.(*googleapi.Error).Header. Use
39744// googleapi.IsNotModified to check whether the returned error was
39745// because http.StatusNotModified was returned.
39746func (c *PlacementsGeneratetagsCall) Do(opts ...googleapi.CallOption) (*PlacementsGenerateTagsResponse, error) {
39747	gensupport.SetOptions(c.urlParams_, opts...)
39748	res, err := c.doRequest("json")
39749	if res != nil && res.StatusCode == http.StatusNotModified {
39750		if res.Body != nil {
39751			res.Body.Close()
39752		}
39753		return nil, &googleapi.Error{
39754			Code:   res.StatusCode,
39755			Header: res.Header,
39756		}
39757	}
39758	if err != nil {
39759		return nil, err
39760	}
39761	defer googleapi.CloseBody(res)
39762	if err := googleapi.CheckResponse(res); err != nil {
39763		return nil, err
39764	}
39765	ret := &PlacementsGenerateTagsResponse{
39766		ServerResponse: googleapi.ServerResponse{
39767			Header:         res.Header,
39768			HTTPStatusCode: res.StatusCode,
39769		},
39770	}
39771	target := &ret
39772	if err := gensupport.DecodeResponse(target, res); err != nil {
39773		return nil, err
39774	}
39775	return ret, nil
39776	// {
39777	//   "description": "Generates tags for a placement.",
39778	//   "httpMethod": "POST",
39779	//   "id": "dfareporting.placements.generatetags",
39780	//   "parameterOrder": [
39781	//     "profileId"
39782	//   ],
39783	//   "parameters": {
39784	//     "campaignId": {
39785	//       "description": "Generate placements belonging to this campaign. This is a required field.",
39786	//       "format": "int64",
39787	//       "location": "query",
39788	//       "type": "string"
39789	//     },
39790	//     "placementIds": {
39791	//       "description": "Generate tags for these placements.",
39792	//       "format": "int64",
39793	//       "location": "query",
39794	//       "repeated": true,
39795	//       "type": "string"
39796	//     },
39797	//     "profileId": {
39798	//       "description": "User profile ID associated with this request.",
39799	//       "format": "int64",
39800	//       "location": "path",
39801	//       "required": true,
39802	//       "type": "string"
39803	//     },
39804	//     "tagFormats": {
39805	//       "description": "Tag formats to generate for these placements.\n\nNote: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.",
39806	//       "enum": [
39807	//         "PLACEMENT_TAG_CLICK_COMMANDS",
39808	//         "PLACEMENT_TAG_IFRAME_ILAYER",
39809	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT",
39810	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY",
39811	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH",
39812	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3",
39813	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4",
39814	//         "PLACEMENT_TAG_INTERNAL_REDIRECT",
39815	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT",
39816	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY",
39817	//         "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT",
39818	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT",
39819	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY",
39820	//         "PLACEMENT_TAG_JAVASCRIPT",
39821	//         "PLACEMENT_TAG_JAVASCRIPT_LEGACY",
39822	//         "PLACEMENT_TAG_STANDARD",
39823	//         "PLACEMENT_TAG_TRACKING",
39824	//         "PLACEMENT_TAG_TRACKING_IFRAME",
39825	//         "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
39826	//       ],
39827	//       "enumDescriptions": [
39828	//         "",
39829	//         "",
39830	//         "",
39831	//         "",
39832	//         "",
39833	//         "",
39834	//         "",
39835	//         "",
39836	//         "",
39837	//         "",
39838	//         "",
39839	//         "",
39840	//         "",
39841	//         "",
39842	//         "",
39843	//         "",
39844	//         "",
39845	//         "",
39846	//         ""
39847	//       ],
39848	//       "location": "query",
39849	//       "repeated": true,
39850	//       "type": "string"
39851	//     }
39852	//   },
39853	//   "path": "userprofiles/{profileId}/placements/generatetags",
39854	//   "response": {
39855	//     "$ref": "PlacementsGenerateTagsResponse"
39856	//   },
39857	//   "scopes": [
39858	//     "https://www.googleapis.com/auth/dfatrafficking"
39859	//   ]
39860	// }
39861
39862}
39863
39864// method id "dfareporting.placements.get":
39865
39866type PlacementsGetCall struct {
39867	s            *Service
39868	profileId    int64
39869	id           int64
39870	urlParams_   gensupport.URLParams
39871	ifNoneMatch_ string
39872	ctx_         context.Context
39873	header_      http.Header
39874}
39875
39876// Get: Gets one placement by ID.
39877func (r *PlacementsService) Get(profileId int64, id int64) *PlacementsGetCall {
39878	c := &PlacementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39879	c.profileId = profileId
39880	c.id = id
39881	return c
39882}
39883
39884// Fields allows partial responses to be retrieved. See
39885// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39886// for more information.
39887func (c *PlacementsGetCall) Fields(s ...googleapi.Field) *PlacementsGetCall {
39888	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39889	return c
39890}
39891
39892// IfNoneMatch sets the optional parameter which makes the operation
39893// fail if the object's ETag matches the given value. This is useful for
39894// getting updates only after the object has changed since the last
39895// request. Use googleapi.IsNotModified to check whether the response
39896// error from Do is the result of In-None-Match.
39897func (c *PlacementsGetCall) IfNoneMatch(entityTag string) *PlacementsGetCall {
39898	c.ifNoneMatch_ = entityTag
39899	return c
39900}
39901
39902// Context sets the context to be used in this call's Do method. Any
39903// pending HTTP request will be aborted if the provided context is
39904// canceled.
39905func (c *PlacementsGetCall) Context(ctx context.Context) *PlacementsGetCall {
39906	c.ctx_ = ctx
39907	return c
39908}
39909
39910// Header returns an http.Header that can be modified by the caller to
39911// add HTTP headers to the request.
39912func (c *PlacementsGetCall) Header() http.Header {
39913	if c.header_ == nil {
39914		c.header_ = make(http.Header)
39915	}
39916	return c.header_
39917}
39918
39919func (c *PlacementsGetCall) doRequest(alt string) (*http.Response, error) {
39920	reqHeaders := make(http.Header)
39921	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
39922	for k, v := range c.header_ {
39923		reqHeaders[k] = v
39924	}
39925	reqHeaders.Set("User-Agent", c.s.userAgent())
39926	if c.ifNoneMatch_ != "" {
39927		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39928	}
39929	var body io.Reader = nil
39930	c.urlParams_.Set("alt", alt)
39931	c.urlParams_.Set("prettyPrint", "false")
39932	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/{id}")
39933	urls += "?" + c.urlParams_.Encode()
39934	req, err := http.NewRequest("GET", urls, body)
39935	if err != nil {
39936		return nil, err
39937	}
39938	req.Header = reqHeaders
39939	googleapi.Expand(req.URL, map[string]string{
39940		"profileId": strconv.FormatInt(c.profileId, 10),
39941		"id":        strconv.FormatInt(c.id, 10),
39942	})
39943	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39944}
39945
39946// Do executes the "dfareporting.placements.get" call.
39947// Exactly one of *Placement or error will be non-nil. Any non-2xx
39948// status code is an error. Response headers are in either
39949// *Placement.ServerResponse.Header or (if a response was returned at
39950// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39951// to check whether the returned error was because
39952// http.StatusNotModified was returned.
39953func (c *PlacementsGetCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
39954	gensupport.SetOptions(c.urlParams_, opts...)
39955	res, err := c.doRequest("json")
39956	if res != nil && res.StatusCode == http.StatusNotModified {
39957		if res.Body != nil {
39958			res.Body.Close()
39959		}
39960		return nil, &googleapi.Error{
39961			Code:   res.StatusCode,
39962			Header: res.Header,
39963		}
39964	}
39965	if err != nil {
39966		return nil, err
39967	}
39968	defer googleapi.CloseBody(res)
39969	if err := googleapi.CheckResponse(res); err != nil {
39970		return nil, err
39971	}
39972	ret := &Placement{
39973		ServerResponse: googleapi.ServerResponse{
39974			Header:         res.Header,
39975			HTTPStatusCode: res.StatusCode,
39976		},
39977	}
39978	target := &ret
39979	if err := gensupport.DecodeResponse(target, res); err != nil {
39980		return nil, err
39981	}
39982	return ret, nil
39983	// {
39984	//   "description": "Gets one placement by ID.",
39985	//   "httpMethod": "GET",
39986	//   "id": "dfareporting.placements.get",
39987	//   "parameterOrder": [
39988	//     "profileId",
39989	//     "id"
39990	//   ],
39991	//   "parameters": {
39992	//     "id": {
39993	//       "description": "Placement ID.",
39994	//       "format": "int64",
39995	//       "location": "path",
39996	//       "required": true,
39997	//       "type": "string"
39998	//     },
39999	//     "profileId": {
40000	//       "description": "User profile ID associated with this request.",
40001	//       "format": "int64",
40002	//       "location": "path",
40003	//       "required": true,
40004	//       "type": "string"
40005	//     }
40006	//   },
40007	//   "path": "userprofiles/{profileId}/placements/{id}",
40008	//   "response": {
40009	//     "$ref": "Placement"
40010	//   },
40011	//   "scopes": [
40012	//     "https://www.googleapis.com/auth/dfatrafficking"
40013	//   ]
40014	// }
40015
40016}
40017
40018// method id "dfareporting.placements.insert":
40019
40020type PlacementsInsertCall struct {
40021	s          *Service
40022	profileId  int64
40023	placement  *Placement
40024	urlParams_ gensupport.URLParams
40025	ctx_       context.Context
40026	header_    http.Header
40027}
40028
40029// Insert: Inserts a new placement.
40030func (r *PlacementsService) Insert(profileId int64, placement *Placement) *PlacementsInsertCall {
40031	c := &PlacementsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40032	c.profileId = profileId
40033	c.placement = placement
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 *PlacementsInsertCall) Fields(s ...googleapi.Field) *PlacementsInsertCall {
40041	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40042	return c
40043}
40044
40045// Context sets the context to be used in this call's Do method. Any
40046// pending HTTP request will be aborted if the provided context is
40047// canceled.
40048func (c *PlacementsInsertCall) Context(ctx context.Context) *PlacementsInsertCall {
40049	c.ctx_ = ctx
40050	return c
40051}
40052
40053// Header returns an http.Header that can be modified by the caller to
40054// add HTTP headers to the request.
40055func (c *PlacementsInsertCall) Header() http.Header {
40056	if c.header_ == nil {
40057		c.header_ = make(http.Header)
40058	}
40059	return c.header_
40060}
40061
40062func (c *PlacementsInsertCall) doRequest(alt string) (*http.Response, error) {
40063	reqHeaders := make(http.Header)
40064	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
40065	for k, v := range c.header_ {
40066		reqHeaders[k] = v
40067	}
40068	reqHeaders.Set("User-Agent", c.s.userAgent())
40069	var body io.Reader = nil
40070	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40071	if err != nil {
40072		return nil, err
40073	}
40074	reqHeaders.Set("Content-Type", "application/json")
40075	c.urlParams_.Set("alt", alt)
40076	c.urlParams_.Set("prettyPrint", "false")
40077	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40078	urls += "?" + c.urlParams_.Encode()
40079	req, err := http.NewRequest("POST", urls, body)
40080	if err != nil {
40081		return nil, err
40082	}
40083	req.Header = reqHeaders
40084	googleapi.Expand(req.URL, map[string]string{
40085		"profileId": strconv.FormatInt(c.profileId, 10),
40086	})
40087	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40088}
40089
40090// Do executes the "dfareporting.placements.insert" call.
40091// Exactly one of *Placement or error will be non-nil. Any non-2xx
40092// status code is an error. Response headers are in either
40093// *Placement.ServerResponse.Header or (if a response was returned at
40094// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40095// to check whether the returned error was because
40096// http.StatusNotModified was returned.
40097func (c *PlacementsInsertCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40098	gensupport.SetOptions(c.urlParams_, opts...)
40099	res, err := c.doRequest("json")
40100	if res != nil && res.StatusCode == http.StatusNotModified {
40101		if res.Body != nil {
40102			res.Body.Close()
40103		}
40104		return nil, &googleapi.Error{
40105			Code:   res.StatusCode,
40106			Header: res.Header,
40107		}
40108	}
40109	if err != nil {
40110		return nil, err
40111	}
40112	defer googleapi.CloseBody(res)
40113	if err := googleapi.CheckResponse(res); err != nil {
40114		return nil, err
40115	}
40116	ret := &Placement{
40117		ServerResponse: googleapi.ServerResponse{
40118			Header:         res.Header,
40119			HTTPStatusCode: res.StatusCode,
40120		},
40121	}
40122	target := &ret
40123	if err := gensupport.DecodeResponse(target, res); err != nil {
40124		return nil, err
40125	}
40126	return ret, nil
40127	// {
40128	//   "description": "Inserts a new placement.",
40129	//   "httpMethod": "POST",
40130	//   "id": "dfareporting.placements.insert",
40131	//   "parameterOrder": [
40132	//     "profileId"
40133	//   ],
40134	//   "parameters": {
40135	//     "profileId": {
40136	//       "description": "User profile ID associated with this request.",
40137	//       "format": "int64",
40138	//       "location": "path",
40139	//       "required": true,
40140	//       "type": "string"
40141	//     }
40142	//   },
40143	//   "path": "userprofiles/{profileId}/placements",
40144	//   "request": {
40145	//     "$ref": "Placement"
40146	//   },
40147	//   "response": {
40148	//     "$ref": "Placement"
40149	//   },
40150	//   "scopes": [
40151	//     "https://www.googleapis.com/auth/dfatrafficking"
40152	//   ]
40153	// }
40154
40155}
40156
40157// method id "dfareporting.placements.list":
40158
40159type PlacementsListCall struct {
40160	s            *Service
40161	profileId    int64
40162	urlParams_   gensupport.URLParams
40163	ifNoneMatch_ string
40164	ctx_         context.Context
40165	header_      http.Header
40166}
40167
40168// List: Retrieves a list of placements, possibly filtered. This method
40169// supports paging.
40170func (r *PlacementsService) List(profileId int64) *PlacementsListCall {
40171	c := &PlacementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40172	c.profileId = profileId
40173	return c
40174}
40175
40176// AdvertiserIds sets the optional parameter "advertiserIds": Select
40177// only placements that belong to these advertisers.
40178func (c *PlacementsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementsListCall {
40179	var advertiserIds_ []string
40180	for _, v := range advertiserIds {
40181		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
40182	}
40183	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
40184	return c
40185}
40186
40187// Archived sets the optional parameter "archived": Select only archived
40188// placements. Don't set this field to select both archived and
40189// non-archived placements.
40190func (c *PlacementsListCall) Archived(archived bool) *PlacementsListCall {
40191	c.urlParams_.Set("archived", fmt.Sprint(archived))
40192	return c
40193}
40194
40195// CampaignIds sets the optional parameter "campaignIds": Select only
40196// placements that belong to these campaigns.
40197func (c *PlacementsListCall) CampaignIds(campaignIds ...int64) *PlacementsListCall {
40198	var campaignIds_ []string
40199	for _, v := range campaignIds {
40200		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
40201	}
40202	c.urlParams_.SetMulti("campaignIds", campaignIds_)
40203	return c
40204}
40205
40206// Compatibilities sets the optional parameter "compatibilities": Select
40207// only placements that are associated with these compatibilities.
40208// DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop
40209// or on mobile devices for regular or interstitial ads respectively.
40210// APP and APP_INTERSTITIAL are for rendering in mobile apps.
40211// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
40212// with the VAST standard.
40213//
40214// Possible values:
40215//   "APP"
40216//   "APP_INTERSTITIAL"
40217//   "DISPLAY"
40218//   "DISPLAY_INTERSTITIAL"
40219//   "IN_STREAM_AUDIO"
40220//   "IN_STREAM_VIDEO"
40221func (c *PlacementsListCall) Compatibilities(compatibilities ...string) *PlacementsListCall {
40222	c.urlParams_.SetMulti("compatibilities", append([]string{}, compatibilities...))
40223	return c
40224}
40225
40226// ContentCategoryIds sets the optional parameter "contentCategoryIds":
40227// Select only placements that are associated with these content
40228// categories.
40229func (c *PlacementsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementsListCall {
40230	var contentCategoryIds_ []string
40231	for _, v := range contentCategoryIds {
40232		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
40233	}
40234	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
40235	return c
40236}
40237
40238// DirectorySiteIds sets the optional parameter "directorySiteIds":
40239// Select only placements that are associated with these directory
40240// sites.
40241func (c *PlacementsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementsListCall {
40242	var directorySiteIds_ []string
40243	for _, v := range directorySiteIds {
40244		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
40245	}
40246	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
40247	return c
40248}
40249
40250// GroupIds sets the optional parameter "groupIds": Select only
40251// placements that belong to these placement groups.
40252func (c *PlacementsListCall) GroupIds(groupIds ...int64) *PlacementsListCall {
40253	var groupIds_ []string
40254	for _, v := range groupIds {
40255		groupIds_ = append(groupIds_, fmt.Sprint(v))
40256	}
40257	c.urlParams_.SetMulti("groupIds", groupIds_)
40258	return c
40259}
40260
40261// Ids sets the optional parameter "ids": Select only placements with
40262// these IDs.
40263func (c *PlacementsListCall) Ids(ids ...int64) *PlacementsListCall {
40264	var ids_ []string
40265	for _, v := range ids {
40266		ids_ = append(ids_, fmt.Sprint(v))
40267	}
40268	c.urlParams_.SetMulti("ids", ids_)
40269	return c
40270}
40271
40272// MaxEndDate sets the optional parameter "maxEndDate": Select only
40273// placements or placement groups whose end date is on or before the
40274// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
40275func (c *PlacementsListCall) MaxEndDate(maxEndDate string) *PlacementsListCall {
40276	c.urlParams_.Set("maxEndDate", maxEndDate)
40277	return c
40278}
40279
40280// MaxResults sets the optional parameter "maxResults": Maximum number
40281// of results to return.
40282func (c *PlacementsListCall) MaxResults(maxResults int64) *PlacementsListCall {
40283	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
40284	return c
40285}
40286
40287// MaxStartDate sets the optional parameter "maxStartDate": Select only
40288// placements or placement groups whose start date is on or before the
40289// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
40290func (c *PlacementsListCall) MaxStartDate(maxStartDate string) *PlacementsListCall {
40291	c.urlParams_.Set("maxStartDate", maxStartDate)
40292	return c
40293}
40294
40295// MinEndDate sets the optional parameter "minEndDate": Select only
40296// placements or placement groups whose end date is on or after the
40297// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
40298func (c *PlacementsListCall) MinEndDate(minEndDate string) *PlacementsListCall {
40299	c.urlParams_.Set("minEndDate", minEndDate)
40300	return c
40301}
40302
40303// MinStartDate sets the optional parameter "minStartDate": Select only
40304// placements or placement groups whose start date is on or after the
40305// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
40306func (c *PlacementsListCall) MinStartDate(minStartDate string) *PlacementsListCall {
40307	c.urlParams_.Set("minStartDate", minStartDate)
40308	return c
40309}
40310
40311// PageToken sets the optional parameter "pageToken": Value of the
40312// nextPageToken from the previous result page.
40313func (c *PlacementsListCall) PageToken(pageToken string) *PlacementsListCall {
40314	c.urlParams_.Set("pageToken", pageToken)
40315	return c
40316}
40317
40318// PaymentSource sets the optional parameter "paymentSource": Select
40319// only placements with this payment source.
40320//
40321// Possible values:
40322//   "PLACEMENT_AGENCY_PAID"
40323//   "PLACEMENT_PUBLISHER_PAID"
40324func (c *PlacementsListCall) PaymentSource(paymentSource string) *PlacementsListCall {
40325	c.urlParams_.Set("paymentSource", paymentSource)
40326	return c
40327}
40328
40329// PlacementStrategyIds sets the optional parameter
40330// "placementStrategyIds": Select only placements that are associated
40331// with these placement strategies.
40332func (c *PlacementsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementsListCall {
40333	var placementStrategyIds_ []string
40334	for _, v := range placementStrategyIds {
40335		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
40336	}
40337	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
40338	return c
40339}
40340
40341// PricingTypes sets the optional parameter "pricingTypes": Select only
40342// placements with these pricing types.
40343//
40344// Possible values:
40345//   "PRICING_TYPE_CPA"
40346//   "PRICING_TYPE_CPC"
40347//   "PRICING_TYPE_CPM"
40348//   "PRICING_TYPE_CPM_ACTIVEVIEW"
40349//   "PRICING_TYPE_FLAT_RATE_CLICKS"
40350//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
40351func (c *PlacementsListCall) PricingTypes(pricingTypes ...string) *PlacementsListCall {
40352	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
40353	return c
40354}
40355
40356// SearchString sets the optional parameter "searchString": Allows
40357// searching for placements by name or ID. Wildcards (*) are allowed.
40358// For example, "placement*2015" will return placements with names like
40359// "placement June 2015", "placement May 2015", or simply "placements
40360// 2015". Most of the searches also add wildcards implicitly at the
40361// start and the end of the search string. For example, a search string
40362// of "placement" will match placements with name "my placement",
40363// "placement 2015", or simply "placement".
40364func (c *PlacementsListCall) SearchString(searchString string) *PlacementsListCall {
40365	c.urlParams_.Set("searchString", searchString)
40366	return c
40367}
40368
40369// SiteIds sets the optional parameter "siteIds": Select only placements
40370// that are associated with these sites.
40371func (c *PlacementsListCall) SiteIds(siteIds ...int64) *PlacementsListCall {
40372	var siteIds_ []string
40373	for _, v := range siteIds {
40374		siteIds_ = append(siteIds_, fmt.Sprint(v))
40375	}
40376	c.urlParams_.SetMulti("siteIds", siteIds_)
40377	return c
40378}
40379
40380// SizeIds sets the optional parameter "sizeIds": Select only placements
40381// that are associated with these sizes.
40382func (c *PlacementsListCall) SizeIds(sizeIds ...int64) *PlacementsListCall {
40383	var sizeIds_ []string
40384	for _, v := range sizeIds {
40385		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
40386	}
40387	c.urlParams_.SetMulti("sizeIds", sizeIds_)
40388	return c
40389}
40390
40391// SortField sets the optional parameter "sortField": Field by which to
40392// sort the list.
40393//
40394// Possible values:
40395//   "ID" (default)
40396//   "NAME"
40397func (c *PlacementsListCall) SortField(sortField string) *PlacementsListCall {
40398	c.urlParams_.Set("sortField", sortField)
40399	return c
40400}
40401
40402// SortOrder sets the optional parameter "sortOrder": Order of sorted
40403// results.
40404//
40405// Possible values:
40406//   "ASCENDING" (default)
40407//   "DESCENDING"
40408func (c *PlacementsListCall) SortOrder(sortOrder string) *PlacementsListCall {
40409	c.urlParams_.Set("sortOrder", sortOrder)
40410	return c
40411}
40412
40413// Fields allows partial responses to be retrieved. See
40414// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40415// for more information.
40416func (c *PlacementsListCall) Fields(s ...googleapi.Field) *PlacementsListCall {
40417	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40418	return c
40419}
40420
40421// IfNoneMatch sets the optional parameter which makes the operation
40422// fail if the object's ETag matches the given value. This is useful for
40423// getting updates only after the object has changed since the last
40424// request. Use googleapi.IsNotModified to check whether the response
40425// error from Do is the result of In-None-Match.
40426func (c *PlacementsListCall) IfNoneMatch(entityTag string) *PlacementsListCall {
40427	c.ifNoneMatch_ = entityTag
40428	return c
40429}
40430
40431// Context sets the context to be used in this call's Do method. Any
40432// pending HTTP request will be aborted if the provided context is
40433// canceled.
40434func (c *PlacementsListCall) Context(ctx context.Context) *PlacementsListCall {
40435	c.ctx_ = ctx
40436	return c
40437}
40438
40439// Header returns an http.Header that can be modified by the caller to
40440// add HTTP headers to the request.
40441func (c *PlacementsListCall) Header() http.Header {
40442	if c.header_ == nil {
40443		c.header_ = make(http.Header)
40444	}
40445	return c.header_
40446}
40447
40448func (c *PlacementsListCall) doRequest(alt string) (*http.Response, error) {
40449	reqHeaders := make(http.Header)
40450	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
40451	for k, v := range c.header_ {
40452		reqHeaders[k] = v
40453	}
40454	reqHeaders.Set("User-Agent", c.s.userAgent())
40455	if c.ifNoneMatch_ != "" {
40456		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40457	}
40458	var body io.Reader = nil
40459	c.urlParams_.Set("alt", alt)
40460	c.urlParams_.Set("prettyPrint", "false")
40461	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40462	urls += "?" + c.urlParams_.Encode()
40463	req, err := http.NewRequest("GET", urls, body)
40464	if err != nil {
40465		return nil, err
40466	}
40467	req.Header = reqHeaders
40468	googleapi.Expand(req.URL, map[string]string{
40469		"profileId": strconv.FormatInt(c.profileId, 10),
40470	})
40471	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40472}
40473
40474// Do executes the "dfareporting.placements.list" call.
40475// Exactly one of *PlacementsListResponse or error will be non-nil. Any
40476// non-2xx status code is an error. Response headers are in either
40477// *PlacementsListResponse.ServerResponse.Header or (if a response was
40478// returned at all) in error.(*googleapi.Error).Header. Use
40479// googleapi.IsNotModified to check whether the returned error was
40480// because http.StatusNotModified was returned.
40481func (c *PlacementsListCall) Do(opts ...googleapi.CallOption) (*PlacementsListResponse, error) {
40482	gensupport.SetOptions(c.urlParams_, opts...)
40483	res, err := c.doRequest("json")
40484	if res != nil && res.StatusCode == http.StatusNotModified {
40485		if res.Body != nil {
40486			res.Body.Close()
40487		}
40488		return nil, &googleapi.Error{
40489			Code:   res.StatusCode,
40490			Header: res.Header,
40491		}
40492	}
40493	if err != nil {
40494		return nil, err
40495	}
40496	defer googleapi.CloseBody(res)
40497	if err := googleapi.CheckResponse(res); err != nil {
40498		return nil, err
40499	}
40500	ret := &PlacementsListResponse{
40501		ServerResponse: googleapi.ServerResponse{
40502			Header:         res.Header,
40503			HTTPStatusCode: res.StatusCode,
40504		},
40505	}
40506	target := &ret
40507	if err := gensupport.DecodeResponse(target, res); err != nil {
40508		return nil, err
40509	}
40510	return ret, nil
40511	// {
40512	//   "description": "Retrieves a list of placements, possibly filtered. This method supports paging.",
40513	//   "httpMethod": "GET",
40514	//   "id": "dfareporting.placements.list",
40515	//   "parameterOrder": [
40516	//     "profileId"
40517	//   ],
40518	//   "parameters": {
40519	//     "advertiserIds": {
40520	//       "description": "Select only placements that belong to these advertisers.",
40521	//       "format": "int64",
40522	//       "location": "query",
40523	//       "repeated": true,
40524	//       "type": "string"
40525	//     },
40526	//     "archived": {
40527	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
40528	//       "location": "query",
40529	//       "type": "boolean"
40530	//     },
40531	//     "campaignIds": {
40532	//       "description": "Select only placements that belong to these campaigns.",
40533	//       "format": "int64",
40534	//       "location": "query",
40535	//       "repeated": true,
40536	//       "type": "string"
40537	//     },
40538	//     "compatibilities": {
40539	//       "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.",
40540	//       "enum": [
40541	//         "APP",
40542	//         "APP_INTERSTITIAL",
40543	//         "DISPLAY",
40544	//         "DISPLAY_INTERSTITIAL",
40545	//         "IN_STREAM_AUDIO",
40546	//         "IN_STREAM_VIDEO"
40547	//       ],
40548	//       "enumDescriptions": [
40549	//         "",
40550	//         "",
40551	//         "",
40552	//         "",
40553	//         "",
40554	//         ""
40555	//       ],
40556	//       "location": "query",
40557	//       "repeated": true,
40558	//       "type": "string"
40559	//     },
40560	//     "contentCategoryIds": {
40561	//       "description": "Select only placements that are associated with these content categories.",
40562	//       "format": "int64",
40563	//       "location": "query",
40564	//       "repeated": true,
40565	//       "type": "string"
40566	//     },
40567	//     "directorySiteIds": {
40568	//       "description": "Select only placements that are associated with these directory sites.",
40569	//       "format": "int64",
40570	//       "location": "query",
40571	//       "repeated": true,
40572	//       "type": "string"
40573	//     },
40574	//     "groupIds": {
40575	//       "description": "Select only placements that belong to these placement groups.",
40576	//       "format": "int64",
40577	//       "location": "query",
40578	//       "repeated": true,
40579	//       "type": "string"
40580	//     },
40581	//     "ids": {
40582	//       "description": "Select only placements with these IDs.",
40583	//       "format": "int64",
40584	//       "location": "query",
40585	//       "repeated": true,
40586	//       "type": "string"
40587	//     },
40588	//     "maxEndDate": {
40589	//       "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\".",
40590	//       "location": "query",
40591	//       "type": "string"
40592	//     },
40593	//     "maxResults": {
40594	//       "default": "1000",
40595	//       "description": "Maximum number of results to return.",
40596	//       "format": "int32",
40597	//       "location": "query",
40598	//       "maximum": "1000",
40599	//       "minimum": "0",
40600	//       "type": "integer"
40601	//     },
40602	//     "maxStartDate": {
40603	//       "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\".",
40604	//       "location": "query",
40605	//       "type": "string"
40606	//     },
40607	//     "minEndDate": {
40608	//       "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\".",
40609	//       "location": "query",
40610	//       "type": "string"
40611	//     },
40612	//     "minStartDate": {
40613	//       "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\".",
40614	//       "location": "query",
40615	//       "type": "string"
40616	//     },
40617	//     "pageToken": {
40618	//       "description": "Value of the nextPageToken from the previous result page.",
40619	//       "location": "query",
40620	//       "type": "string"
40621	//     },
40622	//     "paymentSource": {
40623	//       "description": "Select only placements with this payment source.",
40624	//       "enum": [
40625	//         "PLACEMENT_AGENCY_PAID",
40626	//         "PLACEMENT_PUBLISHER_PAID"
40627	//       ],
40628	//       "enumDescriptions": [
40629	//         "",
40630	//         ""
40631	//       ],
40632	//       "location": "query",
40633	//       "type": "string"
40634	//     },
40635	//     "placementStrategyIds": {
40636	//       "description": "Select only placements that are associated with these placement strategies.",
40637	//       "format": "int64",
40638	//       "location": "query",
40639	//       "repeated": true,
40640	//       "type": "string"
40641	//     },
40642	//     "pricingTypes": {
40643	//       "description": "Select only placements with these pricing types.",
40644	//       "enum": [
40645	//         "PRICING_TYPE_CPA",
40646	//         "PRICING_TYPE_CPC",
40647	//         "PRICING_TYPE_CPM",
40648	//         "PRICING_TYPE_CPM_ACTIVEVIEW",
40649	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
40650	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
40651	//       ],
40652	//       "enumDescriptions": [
40653	//         "",
40654	//         "",
40655	//         "",
40656	//         "",
40657	//         "",
40658	//         ""
40659	//       ],
40660	//       "location": "query",
40661	//       "repeated": true,
40662	//       "type": "string"
40663	//     },
40664	//     "profileId": {
40665	//       "description": "User profile ID associated with this request.",
40666	//       "format": "int64",
40667	//       "location": "path",
40668	//       "required": true,
40669	//       "type": "string"
40670	//     },
40671	//     "searchString": {
40672	//       "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\".",
40673	//       "location": "query",
40674	//       "type": "string"
40675	//     },
40676	//     "siteIds": {
40677	//       "description": "Select only placements that are associated with these sites.",
40678	//       "format": "int64",
40679	//       "location": "query",
40680	//       "repeated": true,
40681	//       "type": "string"
40682	//     },
40683	//     "sizeIds": {
40684	//       "description": "Select only placements that are associated with these sizes.",
40685	//       "format": "int64",
40686	//       "location": "query",
40687	//       "repeated": true,
40688	//       "type": "string"
40689	//     },
40690	//     "sortField": {
40691	//       "default": "ID",
40692	//       "description": "Field by which to sort the list.",
40693	//       "enum": [
40694	//         "ID",
40695	//         "NAME"
40696	//       ],
40697	//       "enumDescriptions": [
40698	//         "",
40699	//         ""
40700	//       ],
40701	//       "location": "query",
40702	//       "type": "string"
40703	//     },
40704	//     "sortOrder": {
40705	//       "default": "ASCENDING",
40706	//       "description": "Order of sorted results.",
40707	//       "enum": [
40708	//         "ASCENDING",
40709	//         "DESCENDING"
40710	//       ],
40711	//       "enumDescriptions": [
40712	//         "",
40713	//         ""
40714	//       ],
40715	//       "location": "query",
40716	//       "type": "string"
40717	//     }
40718	//   },
40719	//   "path": "userprofiles/{profileId}/placements",
40720	//   "response": {
40721	//     "$ref": "PlacementsListResponse"
40722	//   },
40723	//   "scopes": [
40724	//     "https://www.googleapis.com/auth/dfatrafficking"
40725	//   ]
40726	// }
40727
40728}
40729
40730// Pages invokes f for each page of results.
40731// A non-nil error returned from f will halt the iteration.
40732// The provided context supersedes any context provided to the Context method.
40733func (c *PlacementsListCall) Pages(ctx context.Context, f func(*PlacementsListResponse) error) error {
40734	c.ctx_ = ctx
40735	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
40736	for {
40737		x, err := c.Do()
40738		if err != nil {
40739			return err
40740		}
40741		if err := f(x); err != nil {
40742			return err
40743		}
40744		if x.NextPageToken == "" {
40745			return nil
40746		}
40747		c.PageToken(x.NextPageToken)
40748	}
40749}
40750
40751// method id "dfareporting.placements.patch":
40752
40753type PlacementsPatchCall struct {
40754	s          *Service
40755	profileId  int64
40756	placement  *Placement
40757	urlParams_ gensupport.URLParams
40758	ctx_       context.Context
40759	header_    http.Header
40760}
40761
40762// Patch: Updates an existing placement. This method supports patch
40763// semantics.
40764func (r *PlacementsService) Patch(profileId int64, id int64, placement *Placement) *PlacementsPatchCall {
40765	c := &PlacementsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40766	c.profileId = profileId
40767	c.urlParams_.Set("id", fmt.Sprint(id))
40768	c.placement = placement
40769	return c
40770}
40771
40772// Fields allows partial responses to be retrieved. See
40773// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40774// for more information.
40775func (c *PlacementsPatchCall) Fields(s ...googleapi.Field) *PlacementsPatchCall {
40776	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40777	return c
40778}
40779
40780// Context sets the context to be used in this call's Do method. Any
40781// pending HTTP request will be aborted if the provided context is
40782// canceled.
40783func (c *PlacementsPatchCall) Context(ctx context.Context) *PlacementsPatchCall {
40784	c.ctx_ = ctx
40785	return c
40786}
40787
40788// Header returns an http.Header that can be modified by the caller to
40789// add HTTP headers to the request.
40790func (c *PlacementsPatchCall) Header() http.Header {
40791	if c.header_ == nil {
40792		c.header_ = make(http.Header)
40793	}
40794	return c.header_
40795}
40796
40797func (c *PlacementsPatchCall) doRequest(alt string) (*http.Response, error) {
40798	reqHeaders := make(http.Header)
40799	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
40800	for k, v := range c.header_ {
40801		reqHeaders[k] = v
40802	}
40803	reqHeaders.Set("User-Agent", c.s.userAgent())
40804	var body io.Reader = nil
40805	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40806	if err != nil {
40807		return nil, err
40808	}
40809	reqHeaders.Set("Content-Type", "application/json")
40810	c.urlParams_.Set("alt", alt)
40811	c.urlParams_.Set("prettyPrint", "false")
40812	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40813	urls += "?" + c.urlParams_.Encode()
40814	req, err := http.NewRequest("PATCH", urls, body)
40815	if err != nil {
40816		return nil, err
40817	}
40818	req.Header = reqHeaders
40819	googleapi.Expand(req.URL, map[string]string{
40820		"profileId": strconv.FormatInt(c.profileId, 10),
40821	})
40822	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40823}
40824
40825// Do executes the "dfareporting.placements.patch" call.
40826// Exactly one of *Placement or error will be non-nil. Any non-2xx
40827// status code is an error. Response headers are in either
40828// *Placement.ServerResponse.Header or (if a response was returned at
40829// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40830// to check whether the returned error was because
40831// http.StatusNotModified was returned.
40832func (c *PlacementsPatchCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40833	gensupport.SetOptions(c.urlParams_, opts...)
40834	res, err := c.doRequest("json")
40835	if res != nil && res.StatusCode == http.StatusNotModified {
40836		if res.Body != nil {
40837			res.Body.Close()
40838		}
40839		return nil, &googleapi.Error{
40840			Code:   res.StatusCode,
40841			Header: res.Header,
40842		}
40843	}
40844	if err != nil {
40845		return nil, err
40846	}
40847	defer googleapi.CloseBody(res)
40848	if err := googleapi.CheckResponse(res); err != nil {
40849		return nil, err
40850	}
40851	ret := &Placement{
40852		ServerResponse: googleapi.ServerResponse{
40853			Header:         res.Header,
40854			HTTPStatusCode: res.StatusCode,
40855		},
40856	}
40857	target := &ret
40858	if err := gensupport.DecodeResponse(target, res); err != nil {
40859		return nil, err
40860	}
40861	return ret, nil
40862	// {
40863	//   "description": "Updates an existing placement. This method supports patch semantics.",
40864	//   "httpMethod": "PATCH",
40865	//   "id": "dfareporting.placements.patch",
40866	//   "parameterOrder": [
40867	//     "profileId",
40868	//     "id"
40869	//   ],
40870	//   "parameters": {
40871	//     "id": {
40872	//       "description": "Placement ID.",
40873	//       "format": "int64",
40874	//       "location": "query",
40875	//       "required": true,
40876	//       "type": "string"
40877	//     },
40878	//     "profileId": {
40879	//       "description": "User profile ID associated with this request.",
40880	//       "format": "int64",
40881	//       "location": "path",
40882	//       "required": true,
40883	//       "type": "string"
40884	//     }
40885	//   },
40886	//   "path": "userprofiles/{profileId}/placements",
40887	//   "request": {
40888	//     "$ref": "Placement"
40889	//   },
40890	//   "response": {
40891	//     "$ref": "Placement"
40892	//   },
40893	//   "scopes": [
40894	//     "https://www.googleapis.com/auth/dfatrafficking"
40895	//   ]
40896	// }
40897
40898}
40899
40900// method id "dfareporting.placements.update":
40901
40902type PlacementsUpdateCall struct {
40903	s          *Service
40904	profileId  int64
40905	placement  *Placement
40906	urlParams_ gensupport.URLParams
40907	ctx_       context.Context
40908	header_    http.Header
40909}
40910
40911// Update: Updates an existing placement.
40912func (r *PlacementsService) Update(profileId int64, placement *Placement) *PlacementsUpdateCall {
40913	c := &PlacementsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40914	c.profileId = profileId
40915	c.placement = placement
40916	return c
40917}
40918
40919// Fields allows partial responses to be retrieved. See
40920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40921// for more information.
40922func (c *PlacementsUpdateCall) Fields(s ...googleapi.Field) *PlacementsUpdateCall {
40923	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40924	return c
40925}
40926
40927// Context sets the context to be used in this call's Do method. Any
40928// pending HTTP request will be aborted if the provided context is
40929// canceled.
40930func (c *PlacementsUpdateCall) Context(ctx context.Context) *PlacementsUpdateCall {
40931	c.ctx_ = ctx
40932	return c
40933}
40934
40935// Header returns an http.Header that can be modified by the caller to
40936// add HTTP headers to the request.
40937func (c *PlacementsUpdateCall) Header() http.Header {
40938	if c.header_ == nil {
40939		c.header_ = make(http.Header)
40940	}
40941	return c.header_
40942}
40943
40944func (c *PlacementsUpdateCall) doRequest(alt string) (*http.Response, error) {
40945	reqHeaders := make(http.Header)
40946	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
40947	for k, v := range c.header_ {
40948		reqHeaders[k] = v
40949	}
40950	reqHeaders.Set("User-Agent", c.s.userAgent())
40951	var body io.Reader = nil
40952	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40953	if err != nil {
40954		return nil, err
40955	}
40956	reqHeaders.Set("Content-Type", "application/json")
40957	c.urlParams_.Set("alt", alt)
40958	c.urlParams_.Set("prettyPrint", "false")
40959	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40960	urls += "?" + c.urlParams_.Encode()
40961	req, err := http.NewRequest("PUT", urls, body)
40962	if err != nil {
40963		return nil, err
40964	}
40965	req.Header = reqHeaders
40966	googleapi.Expand(req.URL, map[string]string{
40967		"profileId": strconv.FormatInt(c.profileId, 10),
40968	})
40969	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40970}
40971
40972// Do executes the "dfareporting.placements.update" call.
40973// Exactly one of *Placement or error will be non-nil. Any non-2xx
40974// status code is an error. Response headers are in either
40975// *Placement.ServerResponse.Header or (if a response was returned at
40976// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40977// to check whether the returned error was because
40978// http.StatusNotModified was returned.
40979func (c *PlacementsUpdateCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40980	gensupport.SetOptions(c.urlParams_, opts...)
40981	res, err := c.doRequest("json")
40982	if res != nil && res.StatusCode == http.StatusNotModified {
40983		if res.Body != nil {
40984			res.Body.Close()
40985		}
40986		return nil, &googleapi.Error{
40987			Code:   res.StatusCode,
40988			Header: res.Header,
40989		}
40990	}
40991	if err != nil {
40992		return nil, err
40993	}
40994	defer googleapi.CloseBody(res)
40995	if err := googleapi.CheckResponse(res); err != nil {
40996		return nil, err
40997	}
40998	ret := &Placement{
40999		ServerResponse: googleapi.ServerResponse{
41000			Header:         res.Header,
41001			HTTPStatusCode: res.StatusCode,
41002		},
41003	}
41004	target := &ret
41005	if err := gensupport.DecodeResponse(target, res); err != nil {
41006		return nil, err
41007	}
41008	return ret, nil
41009	// {
41010	//   "description": "Updates an existing placement.",
41011	//   "httpMethod": "PUT",
41012	//   "id": "dfareporting.placements.update",
41013	//   "parameterOrder": [
41014	//     "profileId"
41015	//   ],
41016	//   "parameters": {
41017	//     "profileId": {
41018	//       "description": "User profile ID associated with this request.",
41019	//       "format": "int64",
41020	//       "location": "path",
41021	//       "required": true,
41022	//       "type": "string"
41023	//     }
41024	//   },
41025	//   "path": "userprofiles/{profileId}/placements",
41026	//   "request": {
41027	//     "$ref": "Placement"
41028	//   },
41029	//   "response": {
41030	//     "$ref": "Placement"
41031	//   },
41032	//   "scopes": [
41033	//     "https://www.googleapis.com/auth/dfatrafficking"
41034	//   ]
41035	// }
41036
41037}
41038
41039// method id "dfareporting.platformTypes.get":
41040
41041type PlatformTypesGetCall struct {
41042	s            *Service
41043	profileId    int64
41044	id           int64
41045	urlParams_   gensupport.URLParams
41046	ifNoneMatch_ string
41047	ctx_         context.Context
41048	header_      http.Header
41049}
41050
41051// Get: Gets one platform type by ID.
41052func (r *PlatformTypesService) Get(profileId int64, id int64) *PlatformTypesGetCall {
41053	c := &PlatformTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41054	c.profileId = profileId
41055	c.id = id
41056	return c
41057}
41058
41059// Fields allows partial responses to be retrieved. See
41060// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41061// for more information.
41062func (c *PlatformTypesGetCall) Fields(s ...googleapi.Field) *PlatformTypesGetCall {
41063	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41064	return c
41065}
41066
41067// IfNoneMatch sets the optional parameter which makes the operation
41068// fail if the object's ETag matches the given value. This is useful for
41069// getting updates only after the object has changed since the last
41070// request. Use googleapi.IsNotModified to check whether the response
41071// error from Do is the result of In-None-Match.
41072func (c *PlatformTypesGetCall) IfNoneMatch(entityTag string) *PlatformTypesGetCall {
41073	c.ifNoneMatch_ = entityTag
41074	return c
41075}
41076
41077// Context sets the context to be used in this call's Do method. Any
41078// pending HTTP request will be aborted if the provided context is
41079// canceled.
41080func (c *PlatformTypesGetCall) Context(ctx context.Context) *PlatformTypesGetCall {
41081	c.ctx_ = ctx
41082	return c
41083}
41084
41085// Header returns an http.Header that can be modified by the caller to
41086// add HTTP headers to the request.
41087func (c *PlatformTypesGetCall) Header() http.Header {
41088	if c.header_ == nil {
41089		c.header_ = make(http.Header)
41090	}
41091	return c.header_
41092}
41093
41094func (c *PlatformTypesGetCall) doRequest(alt string) (*http.Response, error) {
41095	reqHeaders := make(http.Header)
41096	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
41097	for k, v := range c.header_ {
41098		reqHeaders[k] = v
41099	}
41100	reqHeaders.Set("User-Agent", c.s.userAgent())
41101	if c.ifNoneMatch_ != "" {
41102		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41103	}
41104	var body io.Reader = nil
41105	c.urlParams_.Set("alt", alt)
41106	c.urlParams_.Set("prettyPrint", "false")
41107	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes/{id}")
41108	urls += "?" + c.urlParams_.Encode()
41109	req, err := http.NewRequest("GET", urls, body)
41110	if err != nil {
41111		return nil, err
41112	}
41113	req.Header = reqHeaders
41114	googleapi.Expand(req.URL, map[string]string{
41115		"profileId": strconv.FormatInt(c.profileId, 10),
41116		"id":        strconv.FormatInt(c.id, 10),
41117	})
41118	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41119}
41120
41121// Do executes the "dfareporting.platformTypes.get" call.
41122// Exactly one of *PlatformType or error will be non-nil. Any non-2xx
41123// status code is an error. Response headers are in either
41124// *PlatformType.ServerResponse.Header or (if a response was returned at
41125// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41126// to check whether the returned error was because
41127// http.StatusNotModified was returned.
41128func (c *PlatformTypesGetCall) Do(opts ...googleapi.CallOption) (*PlatformType, error) {
41129	gensupport.SetOptions(c.urlParams_, opts...)
41130	res, err := c.doRequest("json")
41131	if res != nil && res.StatusCode == http.StatusNotModified {
41132		if res.Body != nil {
41133			res.Body.Close()
41134		}
41135		return nil, &googleapi.Error{
41136			Code:   res.StatusCode,
41137			Header: res.Header,
41138		}
41139	}
41140	if err != nil {
41141		return nil, err
41142	}
41143	defer googleapi.CloseBody(res)
41144	if err := googleapi.CheckResponse(res); err != nil {
41145		return nil, err
41146	}
41147	ret := &PlatformType{
41148		ServerResponse: googleapi.ServerResponse{
41149			Header:         res.Header,
41150			HTTPStatusCode: res.StatusCode,
41151		},
41152	}
41153	target := &ret
41154	if err := gensupport.DecodeResponse(target, res); err != nil {
41155		return nil, err
41156	}
41157	return ret, nil
41158	// {
41159	//   "description": "Gets one platform type by ID.",
41160	//   "httpMethod": "GET",
41161	//   "id": "dfareporting.platformTypes.get",
41162	//   "parameterOrder": [
41163	//     "profileId",
41164	//     "id"
41165	//   ],
41166	//   "parameters": {
41167	//     "id": {
41168	//       "description": "Platform type ID.",
41169	//       "format": "int64",
41170	//       "location": "path",
41171	//       "required": true,
41172	//       "type": "string"
41173	//     },
41174	//     "profileId": {
41175	//       "description": "User profile ID associated with this request.",
41176	//       "format": "int64",
41177	//       "location": "path",
41178	//       "required": true,
41179	//       "type": "string"
41180	//     }
41181	//   },
41182	//   "path": "userprofiles/{profileId}/platformTypes/{id}",
41183	//   "response": {
41184	//     "$ref": "PlatformType"
41185	//   },
41186	//   "scopes": [
41187	//     "https://www.googleapis.com/auth/dfatrafficking"
41188	//   ]
41189	// }
41190
41191}
41192
41193// method id "dfareporting.platformTypes.list":
41194
41195type PlatformTypesListCall struct {
41196	s            *Service
41197	profileId    int64
41198	urlParams_   gensupport.URLParams
41199	ifNoneMatch_ string
41200	ctx_         context.Context
41201	header_      http.Header
41202}
41203
41204// List: Retrieves a list of platform types.
41205func (r *PlatformTypesService) List(profileId int64) *PlatformTypesListCall {
41206	c := &PlatformTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41207	c.profileId = profileId
41208	return c
41209}
41210
41211// Fields allows partial responses to be retrieved. See
41212// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41213// for more information.
41214func (c *PlatformTypesListCall) Fields(s ...googleapi.Field) *PlatformTypesListCall {
41215	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41216	return c
41217}
41218
41219// IfNoneMatch sets the optional parameter which makes the operation
41220// fail if the object's ETag matches the given value. This is useful for
41221// getting updates only after the object has changed since the last
41222// request. Use googleapi.IsNotModified to check whether the response
41223// error from Do is the result of In-None-Match.
41224func (c *PlatformTypesListCall) IfNoneMatch(entityTag string) *PlatformTypesListCall {
41225	c.ifNoneMatch_ = entityTag
41226	return c
41227}
41228
41229// Context sets the context to be used in this call's Do method. Any
41230// pending HTTP request will be aborted if the provided context is
41231// canceled.
41232func (c *PlatformTypesListCall) Context(ctx context.Context) *PlatformTypesListCall {
41233	c.ctx_ = ctx
41234	return c
41235}
41236
41237// Header returns an http.Header that can be modified by the caller to
41238// add HTTP headers to the request.
41239func (c *PlatformTypesListCall) Header() http.Header {
41240	if c.header_ == nil {
41241		c.header_ = make(http.Header)
41242	}
41243	return c.header_
41244}
41245
41246func (c *PlatformTypesListCall) doRequest(alt string) (*http.Response, error) {
41247	reqHeaders := make(http.Header)
41248	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
41249	for k, v := range c.header_ {
41250		reqHeaders[k] = v
41251	}
41252	reqHeaders.Set("User-Agent", c.s.userAgent())
41253	if c.ifNoneMatch_ != "" {
41254		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41255	}
41256	var body io.Reader = nil
41257	c.urlParams_.Set("alt", alt)
41258	c.urlParams_.Set("prettyPrint", "false")
41259	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes")
41260	urls += "?" + c.urlParams_.Encode()
41261	req, err := http.NewRequest("GET", urls, body)
41262	if err != nil {
41263		return nil, err
41264	}
41265	req.Header = reqHeaders
41266	googleapi.Expand(req.URL, map[string]string{
41267		"profileId": strconv.FormatInt(c.profileId, 10),
41268	})
41269	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41270}
41271
41272// Do executes the "dfareporting.platformTypes.list" call.
41273// Exactly one of *PlatformTypesListResponse or error will be non-nil.
41274// Any non-2xx status code is an error. Response headers are in either
41275// *PlatformTypesListResponse.ServerResponse.Header or (if a response
41276// was returned at all) in error.(*googleapi.Error).Header. Use
41277// googleapi.IsNotModified to check whether the returned error was
41278// because http.StatusNotModified was returned.
41279func (c *PlatformTypesListCall) Do(opts ...googleapi.CallOption) (*PlatformTypesListResponse, error) {
41280	gensupport.SetOptions(c.urlParams_, opts...)
41281	res, err := c.doRequest("json")
41282	if res != nil && res.StatusCode == http.StatusNotModified {
41283		if res.Body != nil {
41284			res.Body.Close()
41285		}
41286		return nil, &googleapi.Error{
41287			Code:   res.StatusCode,
41288			Header: res.Header,
41289		}
41290	}
41291	if err != nil {
41292		return nil, err
41293	}
41294	defer googleapi.CloseBody(res)
41295	if err := googleapi.CheckResponse(res); err != nil {
41296		return nil, err
41297	}
41298	ret := &PlatformTypesListResponse{
41299		ServerResponse: googleapi.ServerResponse{
41300			Header:         res.Header,
41301			HTTPStatusCode: res.StatusCode,
41302		},
41303	}
41304	target := &ret
41305	if err := gensupport.DecodeResponse(target, res); err != nil {
41306		return nil, err
41307	}
41308	return ret, nil
41309	// {
41310	//   "description": "Retrieves a list of platform types.",
41311	//   "httpMethod": "GET",
41312	//   "id": "dfareporting.platformTypes.list",
41313	//   "parameterOrder": [
41314	//     "profileId"
41315	//   ],
41316	//   "parameters": {
41317	//     "profileId": {
41318	//       "description": "User profile ID associated with this request.",
41319	//       "format": "int64",
41320	//       "location": "path",
41321	//       "required": true,
41322	//       "type": "string"
41323	//     }
41324	//   },
41325	//   "path": "userprofiles/{profileId}/platformTypes",
41326	//   "response": {
41327	//     "$ref": "PlatformTypesListResponse"
41328	//   },
41329	//   "scopes": [
41330	//     "https://www.googleapis.com/auth/dfatrafficking"
41331	//   ]
41332	// }
41333
41334}
41335
41336// method id "dfareporting.postalCodes.get":
41337
41338type PostalCodesGetCall struct {
41339	s            *Service
41340	profileId    int64
41341	code         string
41342	urlParams_   gensupport.URLParams
41343	ifNoneMatch_ string
41344	ctx_         context.Context
41345	header_      http.Header
41346}
41347
41348// Get: Gets one postal code by ID.
41349func (r *PostalCodesService) Get(profileId int64, code string) *PostalCodesGetCall {
41350	c := &PostalCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41351	c.profileId = profileId
41352	c.code = code
41353	return c
41354}
41355
41356// Fields allows partial responses to be retrieved. See
41357// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41358// for more information.
41359func (c *PostalCodesGetCall) Fields(s ...googleapi.Field) *PostalCodesGetCall {
41360	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41361	return c
41362}
41363
41364// IfNoneMatch sets the optional parameter which makes the operation
41365// fail if the object's ETag matches the given value. This is useful for
41366// getting updates only after the object has changed since the last
41367// request. Use googleapi.IsNotModified to check whether the response
41368// error from Do is the result of In-None-Match.
41369func (c *PostalCodesGetCall) IfNoneMatch(entityTag string) *PostalCodesGetCall {
41370	c.ifNoneMatch_ = entityTag
41371	return c
41372}
41373
41374// Context sets the context to be used in this call's Do method. Any
41375// pending HTTP request will be aborted if the provided context is
41376// canceled.
41377func (c *PostalCodesGetCall) Context(ctx context.Context) *PostalCodesGetCall {
41378	c.ctx_ = ctx
41379	return c
41380}
41381
41382// Header returns an http.Header that can be modified by the caller to
41383// add HTTP headers to the request.
41384func (c *PostalCodesGetCall) Header() http.Header {
41385	if c.header_ == nil {
41386		c.header_ = make(http.Header)
41387	}
41388	return c.header_
41389}
41390
41391func (c *PostalCodesGetCall) doRequest(alt string) (*http.Response, error) {
41392	reqHeaders := make(http.Header)
41393	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
41394	for k, v := range c.header_ {
41395		reqHeaders[k] = v
41396	}
41397	reqHeaders.Set("User-Agent", c.s.userAgent())
41398	if c.ifNoneMatch_ != "" {
41399		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41400	}
41401	var body io.Reader = nil
41402	c.urlParams_.Set("alt", alt)
41403	c.urlParams_.Set("prettyPrint", "false")
41404	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes/{code}")
41405	urls += "?" + c.urlParams_.Encode()
41406	req, err := http.NewRequest("GET", urls, body)
41407	if err != nil {
41408		return nil, err
41409	}
41410	req.Header = reqHeaders
41411	googleapi.Expand(req.URL, map[string]string{
41412		"profileId": strconv.FormatInt(c.profileId, 10),
41413		"code":      c.code,
41414	})
41415	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41416}
41417
41418// Do executes the "dfareporting.postalCodes.get" call.
41419// Exactly one of *PostalCode or error will be non-nil. Any non-2xx
41420// status code is an error. Response headers are in either
41421// *PostalCode.ServerResponse.Header or (if a response was returned at
41422// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41423// to check whether the returned error was because
41424// http.StatusNotModified was returned.
41425func (c *PostalCodesGetCall) Do(opts ...googleapi.CallOption) (*PostalCode, error) {
41426	gensupport.SetOptions(c.urlParams_, opts...)
41427	res, err := c.doRequest("json")
41428	if res != nil && res.StatusCode == http.StatusNotModified {
41429		if res.Body != nil {
41430			res.Body.Close()
41431		}
41432		return nil, &googleapi.Error{
41433			Code:   res.StatusCode,
41434			Header: res.Header,
41435		}
41436	}
41437	if err != nil {
41438		return nil, err
41439	}
41440	defer googleapi.CloseBody(res)
41441	if err := googleapi.CheckResponse(res); err != nil {
41442		return nil, err
41443	}
41444	ret := &PostalCode{
41445		ServerResponse: googleapi.ServerResponse{
41446			Header:         res.Header,
41447			HTTPStatusCode: res.StatusCode,
41448		},
41449	}
41450	target := &ret
41451	if err := gensupport.DecodeResponse(target, res); err != nil {
41452		return nil, err
41453	}
41454	return ret, nil
41455	// {
41456	//   "description": "Gets one postal code by ID.",
41457	//   "httpMethod": "GET",
41458	//   "id": "dfareporting.postalCodes.get",
41459	//   "parameterOrder": [
41460	//     "profileId",
41461	//     "code"
41462	//   ],
41463	//   "parameters": {
41464	//     "code": {
41465	//       "description": "Postal code ID.",
41466	//       "location": "path",
41467	//       "required": true,
41468	//       "type": "string"
41469	//     },
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}/postalCodes/{code}",
41479	//   "response": {
41480	//     "$ref": "PostalCode"
41481	//   },
41482	//   "scopes": [
41483	//     "https://www.googleapis.com/auth/dfatrafficking"
41484	//   ]
41485	// }
41486
41487}
41488
41489// method id "dfareporting.postalCodes.list":
41490
41491type PostalCodesListCall struct {
41492	s            *Service
41493	profileId    int64
41494	urlParams_   gensupport.URLParams
41495	ifNoneMatch_ string
41496	ctx_         context.Context
41497	header_      http.Header
41498}
41499
41500// List: Retrieves a list of postal codes.
41501func (r *PostalCodesService) List(profileId int64) *PostalCodesListCall {
41502	c := &PostalCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41503	c.profileId = profileId
41504	return c
41505}
41506
41507// Fields allows partial responses to be retrieved. See
41508// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41509// for more information.
41510func (c *PostalCodesListCall) Fields(s ...googleapi.Field) *PostalCodesListCall {
41511	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41512	return c
41513}
41514
41515// IfNoneMatch sets the optional parameter which makes the operation
41516// fail if the object's ETag matches the given value. This is useful for
41517// getting updates only after the object has changed since the last
41518// request. Use googleapi.IsNotModified to check whether the response
41519// error from Do is the result of In-None-Match.
41520func (c *PostalCodesListCall) IfNoneMatch(entityTag string) *PostalCodesListCall {
41521	c.ifNoneMatch_ = entityTag
41522	return c
41523}
41524
41525// Context sets the context to be used in this call's Do method. Any
41526// pending HTTP request will be aborted if the provided context is
41527// canceled.
41528func (c *PostalCodesListCall) Context(ctx context.Context) *PostalCodesListCall {
41529	c.ctx_ = ctx
41530	return c
41531}
41532
41533// Header returns an http.Header that can be modified by the caller to
41534// add HTTP headers to the request.
41535func (c *PostalCodesListCall) Header() http.Header {
41536	if c.header_ == nil {
41537		c.header_ = make(http.Header)
41538	}
41539	return c.header_
41540}
41541
41542func (c *PostalCodesListCall) doRequest(alt string) (*http.Response, error) {
41543	reqHeaders := make(http.Header)
41544	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
41545	for k, v := range c.header_ {
41546		reqHeaders[k] = v
41547	}
41548	reqHeaders.Set("User-Agent", c.s.userAgent())
41549	if c.ifNoneMatch_ != "" {
41550		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41551	}
41552	var body io.Reader = nil
41553	c.urlParams_.Set("alt", alt)
41554	c.urlParams_.Set("prettyPrint", "false")
41555	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes")
41556	urls += "?" + c.urlParams_.Encode()
41557	req, err := http.NewRequest("GET", urls, body)
41558	if err != nil {
41559		return nil, err
41560	}
41561	req.Header = reqHeaders
41562	googleapi.Expand(req.URL, map[string]string{
41563		"profileId": strconv.FormatInt(c.profileId, 10),
41564	})
41565	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41566}
41567
41568// Do executes the "dfareporting.postalCodes.list" call.
41569// Exactly one of *PostalCodesListResponse or error will be non-nil. Any
41570// non-2xx status code is an error. Response headers are in either
41571// *PostalCodesListResponse.ServerResponse.Header or (if a response was
41572// returned at all) in error.(*googleapi.Error).Header. Use
41573// googleapi.IsNotModified to check whether the returned error was
41574// because http.StatusNotModified was returned.
41575func (c *PostalCodesListCall) Do(opts ...googleapi.CallOption) (*PostalCodesListResponse, error) {
41576	gensupport.SetOptions(c.urlParams_, opts...)
41577	res, err := c.doRequest("json")
41578	if res != nil && res.StatusCode == http.StatusNotModified {
41579		if res.Body != nil {
41580			res.Body.Close()
41581		}
41582		return nil, &googleapi.Error{
41583			Code:   res.StatusCode,
41584			Header: res.Header,
41585		}
41586	}
41587	if err != nil {
41588		return nil, err
41589	}
41590	defer googleapi.CloseBody(res)
41591	if err := googleapi.CheckResponse(res); err != nil {
41592		return nil, err
41593	}
41594	ret := &PostalCodesListResponse{
41595		ServerResponse: googleapi.ServerResponse{
41596			Header:         res.Header,
41597			HTTPStatusCode: res.StatusCode,
41598		},
41599	}
41600	target := &ret
41601	if err := gensupport.DecodeResponse(target, res); err != nil {
41602		return nil, err
41603	}
41604	return ret, nil
41605	// {
41606	//   "description": "Retrieves a list of postal codes.",
41607	//   "httpMethod": "GET",
41608	//   "id": "dfareporting.postalCodes.list",
41609	//   "parameterOrder": [
41610	//     "profileId"
41611	//   ],
41612	//   "parameters": {
41613	//     "profileId": {
41614	//       "description": "User profile ID associated with this request.",
41615	//       "format": "int64",
41616	//       "location": "path",
41617	//       "required": true,
41618	//       "type": "string"
41619	//     }
41620	//   },
41621	//   "path": "userprofiles/{profileId}/postalCodes",
41622	//   "response": {
41623	//     "$ref": "PostalCodesListResponse"
41624	//   },
41625	//   "scopes": [
41626	//     "https://www.googleapis.com/auth/dfatrafficking"
41627	//   ]
41628	// }
41629
41630}
41631
41632// method id "dfareporting.projects.get":
41633
41634type ProjectsGetCall struct {
41635	s            *Service
41636	profileId    int64
41637	id           int64
41638	urlParams_   gensupport.URLParams
41639	ifNoneMatch_ string
41640	ctx_         context.Context
41641	header_      http.Header
41642}
41643
41644// Get: Gets one project by ID.
41645func (r *ProjectsService) Get(profileId int64, id int64) *ProjectsGetCall {
41646	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41647	c.profileId = profileId
41648	c.id = id
41649	return c
41650}
41651
41652// Fields allows partial responses to be retrieved. See
41653// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41654// for more information.
41655func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
41656	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41657	return c
41658}
41659
41660// IfNoneMatch sets the optional parameter which makes the operation
41661// fail if the object's ETag matches the given value. This is useful for
41662// getting updates only after the object has changed since the last
41663// request. Use googleapi.IsNotModified to check whether the response
41664// error from Do is the result of In-None-Match.
41665func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
41666	c.ifNoneMatch_ = entityTag
41667	return c
41668}
41669
41670// Context sets the context to be used in this call's Do method. Any
41671// pending HTTP request will be aborted if the provided context is
41672// canceled.
41673func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
41674	c.ctx_ = ctx
41675	return c
41676}
41677
41678// Header returns an http.Header that can be modified by the caller to
41679// add HTTP headers to the request.
41680func (c *ProjectsGetCall) Header() http.Header {
41681	if c.header_ == nil {
41682		c.header_ = make(http.Header)
41683	}
41684	return c.header_
41685}
41686
41687func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
41688	reqHeaders := make(http.Header)
41689	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
41690	for k, v := range c.header_ {
41691		reqHeaders[k] = v
41692	}
41693	reqHeaders.Set("User-Agent", c.s.userAgent())
41694	if c.ifNoneMatch_ != "" {
41695		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41696	}
41697	var body io.Reader = nil
41698	c.urlParams_.Set("alt", alt)
41699	c.urlParams_.Set("prettyPrint", "false")
41700	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{id}")
41701	urls += "?" + c.urlParams_.Encode()
41702	req, err := http.NewRequest("GET", urls, body)
41703	if err != nil {
41704		return nil, err
41705	}
41706	req.Header = reqHeaders
41707	googleapi.Expand(req.URL, map[string]string{
41708		"profileId": strconv.FormatInt(c.profileId, 10),
41709		"id":        strconv.FormatInt(c.id, 10),
41710	})
41711	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41712}
41713
41714// Do executes the "dfareporting.projects.get" call.
41715// Exactly one of *Project or error will be non-nil. Any non-2xx status
41716// code is an error. Response headers are in either
41717// *Project.ServerResponse.Header or (if a response was returned at all)
41718// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
41719// check whether the returned error was because http.StatusNotModified
41720// was returned.
41721func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
41722	gensupport.SetOptions(c.urlParams_, opts...)
41723	res, err := c.doRequest("json")
41724	if res != nil && res.StatusCode == http.StatusNotModified {
41725		if res.Body != nil {
41726			res.Body.Close()
41727		}
41728		return nil, &googleapi.Error{
41729			Code:   res.StatusCode,
41730			Header: res.Header,
41731		}
41732	}
41733	if err != nil {
41734		return nil, err
41735	}
41736	defer googleapi.CloseBody(res)
41737	if err := googleapi.CheckResponse(res); err != nil {
41738		return nil, err
41739	}
41740	ret := &Project{
41741		ServerResponse: googleapi.ServerResponse{
41742			Header:         res.Header,
41743			HTTPStatusCode: res.StatusCode,
41744		},
41745	}
41746	target := &ret
41747	if err := gensupport.DecodeResponse(target, res); err != nil {
41748		return nil, err
41749	}
41750	return ret, nil
41751	// {
41752	//   "description": "Gets one project by ID.",
41753	//   "httpMethod": "GET",
41754	//   "id": "dfareporting.projects.get",
41755	//   "parameterOrder": [
41756	//     "profileId",
41757	//     "id"
41758	//   ],
41759	//   "parameters": {
41760	//     "id": {
41761	//       "description": "Project ID.",
41762	//       "format": "int64",
41763	//       "location": "path",
41764	//       "required": true,
41765	//       "type": "string"
41766	//     },
41767	//     "profileId": {
41768	//       "description": "User profile ID associated with this request.",
41769	//       "format": "int64",
41770	//       "location": "path",
41771	//       "required": true,
41772	//       "type": "string"
41773	//     }
41774	//   },
41775	//   "path": "userprofiles/{profileId}/projects/{id}",
41776	//   "response": {
41777	//     "$ref": "Project"
41778	//   },
41779	//   "scopes": [
41780	//     "https://www.googleapis.com/auth/dfatrafficking"
41781	//   ]
41782	// }
41783
41784}
41785
41786// method id "dfareporting.projects.list":
41787
41788type ProjectsListCall struct {
41789	s            *Service
41790	profileId    int64
41791	urlParams_   gensupport.URLParams
41792	ifNoneMatch_ string
41793	ctx_         context.Context
41794	header_      http.Header
41795}
41796
41797// List: Retrieves a list of projects, possibly filtered. This method
41798// supports paging.
41799func (r *ProjectsService) List(profileId int64) *ProjectsListCall {
41800	c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41801	c.profileId = profileId
41802	return c
41803}
41804
41805// AdvertiserIds sets the optional parameter "advertiserIds": Select
41806// only projects with these advertiser IDs.
41807func (c *ProjectsListCall) AdvertiserIds(advertiserIds ...int64) *ProjectsListCall {
41808	var advertiserIds_ []string
41809	for _, v := range advertiserIds {
41810		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
41811	}
41812	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
41813	return c
41814}
41815
41816// Ids sets the optional parameter "ids": Select only projects with
41817// these IDs.
41818func (c *ProjectsListCall) Ids(ids ...int64) *ProjectsListCall {
41819	var ids_ []string
41820	for _, v := range ids {
41821		ids_ = append(ids_, fmt.Sprint(v))
41822	}
41823	c.urlParams_.SetMulti("ids", ids_)
41824	return c
41825}
41826
41827// MaxResults sets the optional parameter "maxResults": Maximum number
41828// of results to return.
41829func (c *ProjectsListCall) MaxResults(maxResults int64) *ProjectsListCall {
41830	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
41831	return c
41832}
41833
41834// PageToken sets the optional parameter "pageToken": Value of the
41835// nextPageToken from the previous result page.
41836func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall {
41837	c.urlParams_.Set("pageToken", pageToken)
41838	return c
41839}
41840
41841// SearchString sets the optional parameter "searchString": Allows
41842// searching for projects by name or ID. Wildcards (*) are allowed. For
41843// example, "project*2015" will return projects with names like "project
41844// June 2015", "project April 2015", or simply "project 2015". Most of
41845// the searches also add wildcards implicitly at the start and the end
41846// of the search string. For example, a search string of "project" will
41847// match projects with name "my project", "project 2015", or simply
41848// "project".
41849func (c *ProjectsListCall) SearchString(searchString string) *ProjectsListCall {
41850	c.urlParams_.Set("searchString", searchString)
41851	return c
41852}
41853
41854// SortField sets the optional parameter "sortField": Field by which to
41855// sort the list.
41856//
41857// Possible values:
41858//   "ID" (default)
41859//   "NAME"
41860func (c *ProjectsListCall) SortField(sortField string) *ProjectsListCall {
41861	c.urlParams_.Set("sortField", sortField)
41862	return c
41863}
41864
41865// SortOrder sets the optional parameter "sortOrder": Order of sorted
41866// results.
41867//
41868// Possible values:
41869//   "ASCENDING" (default)
41870//   "DESCENDING"
41871func (c *ProjectsListCall) SortOrder(sortOrder string) *ProjectsListCall {
41872	c.urlParams_.Set("sortOrder", sortOrder)
41873	return c
41874}
41875
41876// Fields allows partial responses to be retrieved. See
41877// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41878// for more information.
41879func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall {
41880	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41881	return c
41882}
41883
41884// IfNoneMatch sets the optional parameter which makes the operation
41885// fail if the object's ETag matches the given value. This is useful for
41886// getting updates only after the object has changed since the last
41887// request. Use googleapi.IsNotModified to check whether the response
41888// error from Do is the result of In-None-Match.
41889func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall {
41890	c.ifNoneMatch_ = entityTag
41891	return c
41892}
41893
41894// Context sets the context to be used in this call's Do method. Any
41895// pending HTTP request will be aborted if the provided context is
41896// canceled.
41897func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
41898	c.ctx_ = ctx
41899	return c
41900}
41901
41902// Header returns an http.Header that can be modified by the caller to
41903// add HTTP headers to the request.
41904func (c *ProjectsListCall) Header() http.Header {
41905	if c.header_ == nil {
41906		c.header_ = make(http.Header)
41907	}
41908	return c.header_
41909}
41910
41911func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
41912	reqHeaders := make(http.Header)
41913	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
41914	for k, v := range c.header_ {
41915		reqHeaders[k] = v
41916	}
41917	reqHeaders.Set("User-Agent", c.s.userAgent())
41918	if c.ifNoneMatch_ != "" {
41919		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41920	}
41921	var body io.Reader = nil
41922	c.urlParams_.Set("alt", alt)
41923	c.urlParams_.Set("prettyPrint", "false")
41924	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects")
41925	urls += "?" + c.urlParams_.Encode()
41926	req, err := http.NewRequest("GET", urls, body)
41927	if err != nil {
41928		return nil, err
41929	}
41930	req.Header = reqHeaders
41931	googleapi.Expand(req.URL, map[string]string{
41932		"profileId": strconv.FormatInt(c.profileId, 10),
41933	})
41934	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41935}
41936
41937// Do executes the "dfareporting.projects.list" call.
41938// Exactly one of *ProjectsListResponse or error will be non-nil. Any
41939// non-2xx status code is an error. Response headers are in either
41940// *ProjectsListResponse.ServerResponse.Header or (if a response was
41941// returned at all) in error.(*googleapi.Error).Header. Use
41942// googleapi.IsNotModified to check whether the returned error was
41943// because http.StatusNotModified was returned.
41944func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ProjectsListResponse, error) {
41945	gensupport.SetOptions(c.urlParams_, opts...)
41946	res, err := c.doRequest("json")
41947	if res != nil && res.StatusCode == http.StatusNotModified {
41948		if res.Body != nil {
41949			res.Body.Close()
41950		}
41951		return nil, &googleapi.Error{
41952			Code:   res.StatusCode,
41953			Header: res.Header,
41954		}
41955	}
41956	if err != nil {
41957		return nil, err
41958	}
41959	defer googleapi.CloseBody(res)
41960	if err := googleapi.CheckResponse(res); err != nil {
41961		return nil, err
41962	}
41963	ret := &ProjectsListResponse{
41964		ServerResponse: googleapi.ServerResponse{
41965			Header:         res.Header,
41966			HTTPStatusCode: res.StatusCode,
41967		},
41968	}
41969	target := &ret
41970	if err := gensupport.DecodeResponse(target, res); err != nil {
41971		return nil, err
41972	}
41973	return ret, nil
41974	// {
41975	//   "description": "Retrieves a list of projects, possibly filtered. This method supports paging.",
41976	//   "httpMethod": "GET",
41977	//   "id": "dfareporting.projects.list",
41978	//   "parameterOrder": [
41979	//     "profileId"
41980	//   ],
41981	//   "parameters": {
41982	//     "advertiserIds": {
41983	//       "description": "Select only projects with these advertiser IDs.",
41984	//       "format": "int64",
41985	//       "location": "query",
41986	//       "repeated": true,
41987	//       "type": "string"
41988	//     },
41989	//     "ids": {
41990	//       "description": "Select only projects with these IDs.",
41991	//       "format": "int64",
41992	//       "location": "query",
41993	//       "repeated": true,
41994	//       "type": "string"
41995	//     },
41996	//     "maxResults": {
41997	//       "default": "1000",
41998	//       "description": "Maximum number of results to return.",
41999	//       "format": "int32",
42000	//       "location": "query",
42001	//       "maximum": "1000",
42002	//       "minimum": "0",
42003	//       "type": "integer"
42004	//     },
42005	//     "pageToken": {
42006	//       "description": "Value of the nextPageToken from the previous result page.",
42007	//       "location": "query",
42008	//       "type": "string"
42009	//     },
42010	//     "profileId": {
42011	//       "description": "User profile ID associated with this request.",
42012	//       "format": "int64",
42013	//       "location": "path",
42014	//       "required": true,
42015	//       "type": "string"
42016	//     },
42017	//     "searchString": {
42018	//       "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\".",
42019	//       "location": "query",
42020	//       "type": "string"
42021	//     },
42022	//     "sortField": {
42023	//       "default": "ID",
42024	//       "description": "Field by which to sort the list.",
42025	//       "enum": [
42026	//         "ID",
42027	//         "NAME"
42028	//       ],
42029	//       "enumDescriptions": [
42030	//         "",
42031	//         ""
42032	//       ],
42033	//       "location": "query",
42034	//       "type": "string"
42035	//     },
42036	//     "sortOrder": {
42037	//       "default": "ASCENDING",
42038	//       "description": "Order of sorted results.",
42039	//       "enum": [
42040	//         "ASCENDING",
42041	//         "DESCENDING"
42042	//       ],
42043	//       "enumDescriptions": [
42044	//         "",
42045	//         ""
42046	//       ],
42047	//       "location": "query",
42048	//       "type": "string"
42049	//     }
42050	//   },
42051	//   "path": "userprofiles/{profileId}/projects",
42052	//   "response": {
42053	//     "$ref": "ProjectsListResponse"
42054	//   },
42055	//   "scopes": [
42056	//     "https://www.googleapis.com/auth/dfatrafficking"
42057	//   ]
42058	// }
42059
42060}
42061
42062// Pages invokes f for each page of results.
42063// A non-nil error returned from f will halt the iteration.
42064// The provided context supersedes any context provided to the Context method.
42065func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ProjectsListResponse) error) error {
42066	c.ctx_ = ctx
42067	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
42068	for {
42069		x, err := c.Do()
42070		if err != nil {
42071			return err
42072		}
42073		if err := f(x); err != nil {
42074			return err
42075		}
42076		if x.NextPageToken == "" {
42077			return nil
42078		}
42079		c.PageToken(x.NextPageToken)
42080	}
42081}
42082
42083// method id "dfareporting.regions.list":
42084
42085type RegionsListCall struct {
42086	s            *Service
42087	profileId    int64
42088	urlParams_   gensupport.URLParams
42089	ifNoneMatch_ string
42090	ctx_         context.Context
42091	header_      http.Header
42092}
42093
42094// List: Retrieves a list of regions.
42095func (r *RegionsService) List(profileId int64) *RegionsListCall {
42096	c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42097	c.profileId = profileId
42098	return c
42099}
42100
42101// Fields allows partial responses to be retrieved. See
42102// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42103// for more information.
42104func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall {
42105	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42106	return c
42107}
42108
42109// IfNoneMatch sets the optional parameter which makes the operation
42110// fail if the object's ETag matches the given value. This is useful for
42111// getting updates only after the object has changed since the last
42112// request. Use googleapi.IsNotModified to check whether the response
42113// error from Do is the result of In-None-Match.
42114func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall {
42115	c.ifNoneMatch_ = entityTag
42116	return c
42117}
42118
42119// Context sets the context to be used in this call's Do method. Any
42120// pending HTTP request will be aborted if the provided context is
42121// canceled.
42122func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
42123	c.ctx_ = ctx
42124	return c
42125}
42126
42127// Header returns an http.Header that can be modified by the caller to
42128// add HTTP headers to the request.
42129func (c *RegionsListCall) Header() http.Header {
42130	if c.header_ == nil {
42131		c.header_ = make(http.Header)
42132	}
42133	return c.header_
42134}
42135
42136func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
42137	reqHeaders := make(http.Header)
42138	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
42139	for k, v := range c.header_ {
42140		reqHeaders[k] = v
42141	}
42142	reqHeaders.Set("User-Agent", c.s.userAgent())
42143	if c.ifNoneMatch_ != "" {
42144		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42145	}
42146	var body io.Reader = nil
42147	c.urlParams_.Set("alt", alt)
42148	c.urlParams_.Set("prettyPrint", "false")
42149	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/regions")
42150	urls += "?" + c.urlParams_.Encode()
42151	req, err := http.NewRequest("GET", urls, body)
42152	if err != nil {
42153		return nil, err
42154	}
42155	req.Header = reqHeaders
42156	googleapi.Expand(req.URL, map[string]string{
42157		"profileId": strconv.FormatInt(c.profileId, 10),
42158	})
42159	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42160}
42161
42162// Do executes the "dfareporting.regions.list" call.
42163// Exactly one of *RegionsListResponse or error will be non-nil. Any
42164// non-2xx status code is an error. Response headers are in either
42165// *RegionsListResponse.ServerResponse.Header or (if a response was
42166// returned at all) in error.(*googleapi.Error).Header. Use
42167// googleapi.IsNotModified to check whether the returned error was
42168// because http.StatusNotModified was returned.
42169func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionsListResponse, error) {
42170	gensupport.SetOptions(c.urlParams_, opts...)
42171	res, err := c.doRequest("json")
42172	if res != nil && res.StatusCode == http.StatusNotModified {
42173		if res.Body != nil {
42174			res.Body.Close()
42175		}
42176		return nil, &googleapi.Error{
42177			Code:   res.StatusCode,
42178			Header: res.Header,
42179		}
42180	}
42181	if err != nil {
42182		return nil, err
42183	}
42184	defer googleapi.CloseBody(res)
42185	if err := googleapi.CheckResponse(res); err != nil {
42186		return nil, err
42187	}
42188	ret := &RegionsListResponse{
42189		ServerResponse: googleapi.ServerResponse{
42190			Header:         res.Header,
42191			HTTPStatusCode: res.StatusCode,
42192		},
42193	}
42194	target := &ret
42195	if err := gensupport.DecodeResponse(target, res); err != nil {
42196		return nil, err
42197	}
42198	return ret, nil
42199	// {
42200	//   "description": "Retrieves a list of regions.",
42201	//   "httpMethod": "GET",
42202	//   "id": "dfareporting.regions.list",
42203	//   "parameterOrder": [
42204	//     "profileId"
42205	//   ],
42206	//   "parameters": {
42207	//     "profileId": {
42208	//       "description": "User profile ID associated with this request.",
42209	//       "format": "int64",
42210	//       "location": "path",
42211	//       "required": true,
42212	//       "type": "string"
42213	//     }
42214	//   },
42215	//   "path": "userprofiles/{profileId}/regions",
42216	//   "response": {
42217	//     "$ref": "RegionsListResponse"
42218	//   },
42219	//   "scopes": [
42220	//     "https://www.googleapis.com/auth/dfatrafficking"
42221	//   ]
42222	// }
42223
42224}
42225
42226// method id "dfareporting.remarketingListShares.get":
42227
42228type RemarketingListSharesGetCall struct {
42229	s                 *Service
42230	profileId         int64
42231	remarketingListId int64
42232	urlParams_        gensupport.URLParams
42233	ifNoneMatch_      string
42234	ctx_              context.Context
42235	header_           http.Header
42236}
42237
42238// Get: Gets one remarketing list share by remarketing list ID.
42239func (r *RemarketingListSharesService) Get(profileId int64, remarketingListId int64) *RemarketingListSharesGetCall {
42240	c := &RemarketingListSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42241	c.profileId = profileId
42242	c.remarketingListId = remarketingListId
42243	return c
42244}
42245
42246// Fields allows partial responses to be retrieved. See
42247// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42248// for more information.
42249func (c *RemarketingListSharesGetCall) Fields(s ...googleapi.Field) *RemarketingListSharesGetCall {
42250	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42251	return c
42252}
42253
42254// IfNoneMatch sets the optional parameter which makes the operation
42255// fail if the object's ETag matches the given value. This is useful for
42256// getting updates only after the object has changed since the last
42257// request. Use googleapi.IsNotModified to check whether the response
42258// error from Do is the result of In-None-Match.
42259func (c *RemarketingListSharesGetCall) IfNoneMatch(entityTag string) *RemarketingListSharesGetCall {
42260	c.ifNoneMatch_ = entityTag
42261	return c
42262}
42263
42264// Context sets the context to be used in this call's Do method. Any
42265// pending HTTP request will be aborted if the provided context is
42266// canceled.
42267func (c *RemarketingListSharesGetCall) Context(ctx context.Context) *RemarketingListSharesGetCall {
42268	c.ctx_ = ctx
42269	return c
42270}
42271
42272// Header returns an http.Header that can be modified by the caller to
42273// add HTTP headers to the request.
42274func (c *RemarketingListSharesGetCall) Header() http.Header {
42275	if c.header_ == nil {
42276		c.header_ = make(http.Header)
42277	}
42278	return c.header_
42279}
42280
42281func (c *RemarketingListSharesGetCall) doRequest(alt string) (*http.Response, error) {
42282	reqHeaders := make(http.Header)
42283	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
42284	for k, v := range c.header_ {
42285		reqHeaders[k] = v
42286	}
42287	reqHeaders.Set("User-Agent", c.s.userAgent())
42288	if c.ifNoneMatch_ != "" {
42289		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42290	}
42291	var body io.Reader = nil
42292	c.urlParams_.Set("alt", alt)
42293	c.urlParams_.Set("prettyPrint", "false")
42294	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares/{remarketingListId}")
42295	urls += "?" + c.urlParams_.Encode()
42296	req, err := http.NewRequest("GET", urls, body)
42297	if err != nil {
42298		return nil, err
42299	}
42300	req.Header = reqHeaders
42301	googleapi.Expand(req.URL, map[string]string{
42302		"profileId":         strconv.FormatInt(c.profileId, 10),
42303		"remarketingListId": strconv.FormatInt(c.remarketingListId, 10),
42304	})
42305	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42306}
42307
42308// Do executes the "dfareporting.remarketingListShares.get" call.
42309// Exactly one of *RemarketingListShare or error will be non-nil. Any
42310// non-2xx status code is an error. Response headers are in either
42311// *RemarketingListShare.ServerResponse.Header or (if a response was
42312// returned at all) in error.(*googleapi.Error).Header. Use
42313// googleapi.IsNotModified to check whether the returned error was
42314// because http.StatusNotModified was returned.
42315func (c *RemarketingListSharesGetCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42316	gensupport.SetOptions(c.urlParams_, opts...)
42317	res, err := c.doRequest("json")
42318	if res != nil && res.StatusCode == http.StatusNotModified {
42319		if res.Body != nil {
42320			res.Body.Close()
42321		}
42322		return nil, &googleapi.Error{
42323			Code:   res.StatusCode,
42324			Header: res.Header,
42325		}
42326	}
42327	if err != nil {
42328		return nil, err
42329	}
42330	defer googleapi.CloseBody(res)
42331	if err := googleapi.CheckResponse(res); err != nil {
42332		return nil, err
42333	}
42334	ret := &RemarketingListShare{
42335		ServerResponse: googleapi.ServerResponse{
42336			Header:         res.Header,
42337			HTTPStatusCode: res.StatusCode,
42338		},
42339	}
42340	target := &ret
42341	if err := gensupport.DecodeResponse(target, res); err != nil {
42342		return nil, err
42343	}
42344	return ret, nil
42345	// {
42346	//   "description": "Gets one remarketing list share by remarketing list ID.",
42347	//   "httpMethod": "GET",
42348	//   "id": "dfareporting.remarketingListShares.get",
42349	//   "parameterOrder": [
42350	//     "profileId",
42351	//     "remarketingListId"
42352	//   ],
42353	//   "parameters": {
42354	//     "profileId": {
42355	//       "description": "User profile ID associated with this request.",
42356	//       "format": "int64",
42357	//       "location": "path",
42358	//       "required": true,
42359	//       "type": "string"
42360	//     },
42361	//     "remarketingListId": {
42362	//       "description": "Remarketing list ID.",
42363	//       "format": "int64",
42364	//       "location": "path",
42365	//       "required": true,
42366	//       "type": "string"
42367	//     }
42368	//   },
42369	//   "path": "userprofiles/{profileId}/remarketingListShares/{remarketingListId}",
42370	//   "response": {
42371	//     "$ref": "RemarketingListShare"
42372	//   },
42373	//   "scopes": [
42374	//     "https://www.googleapis.com/auth/dfatrafficking"
42375	//   ]
42376	// }
42377
42378}
42379
42380// method id "dfareporting.remarketingListShares.patch":
42381
42382type RemarketingListSharesPatchCall struct {
42383	s                    *Service
42384	profileId            int64
42385	remarketinglistshare *RemarketingListShare
42386	urlParams_           gensupport.URLParams
42387	ctx_                 context.Context
42388	header_              http.Header
42389}
42390
42391// Patch: Updates an existing remarketing list share. This method
42392// supports patch semantics.
42393func (r *RemarketingListSharesService) Patch(profileId int64, remarketingListId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesPatchCall {
42394	c := &RemarketingListSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42395	c.profileId = profileId
42396	c.urlParams_.Set("remarketingListId", fmt.Sprint(remarketingListId))
42397	c.remarketinglistshare = remarketinglistshare
42398	return c
42399}
42400
42401// Fields allows partial responses to be retrieved. See
42402// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42403// for more information.
42404func (c *RemarketingListSharesPatchCall) Fields(s ...googleapi.Field) *RemarketingListSharesPatchCall {
42405	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42406	return c
42407}
42408
42409// Context sets the context to be used in this call's Do method. Any
42410// pending HTTP request will be aborted if the provided context is
42411// canceled.
42412func (c *RemarketingListSharesPatchCall) Context(ctx context.Context) *RemarketingListSharesPatchCall {
42413	c.ctx_ = ctx
42414	return c
42415}
42416
42417// Header returns an http.Header that can be modified by the caller to
42418// add HTTP headers to the request.
42419func (c *RemarketingListSharesPatchCall) Header() http.Header {
42420	if c.header_ == nil {
42421		c.header_ = make(http.Header)
42422	}
42423	return c.header_
42424}
42425
42426func (c *RemarketingListSharesPatchCall) doRequest(alt string) (*http.Response, error) {
42427	reqHeaders := make(http.Header)
42428	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
42429	for k, v := range c.header_ {
42430		reqHeaders[k] = v
42431	}
42432	reqHeaders.Set("User-Agent", c.s.userAgent())
42433	var body io.Reader = nil
42434	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
42435	if err != nil {
42436		return nil, err
42437	}
42438	reqHeaders.Set("Content-Type", "application/json")
42439	c.urlParams_.Set("alt", alt)
42440	c.urlParams_.Set("prettyPrint", "false")
42441	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
42442	urls += "?" + c.urlParams_.Encode()
42443	req, err := http.NewRequest("PATCH", urls, body)
42444	if err != nil {
42445		return nil, err
42446	}
42447	req.Header = reqHeaders
42448	googleapi.Expand(req.URL, map[string]string{
42449		"profileId": strconv.FormatInt(c.profileId, 10),
42450	})
42451	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42452}
42453
42454// Do executes the "dfareporting.remarketingListShares.patch" call.
42455// Exactly one of *RemarketingListShare or error will be non-nil. Any
42456// non-2xx status code is an error. Response headers are in either
42457// *RemarketingListShare.ServerResponse.Header or (if a response was
42458// returned at all) in error.(*googleapi.Error).Header. Use
42459// googleapi.IsNotModified to check whether the returned error was
42460// because http.StatusNotModified was returned.
42461func (c *RemarketingListSharesPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42462	gensupport.SetOptions(c.urlParams_, opts...)
42463	res, err := c.doRequest("json")
42464	if res != nil && res.StatusCode == http.StatusNotModified {
42465		if res.Body != nil {
42466			res.Body.Close()
42467		}
42468		return nil, &googleapi.Error{
42469			Code:   res.StatusCode,
42470			Header: res.Header,
42471		}
42472	}
42473	if err != nil {
42474		return nil, err
42475	}
42476	defer googleapi.CloseBody(res)
42477	if err := googleapi.CheckResponse(res); err != nil {
42478		return nil, err
42479	}
42480	ret := &RemarketingListShare{
42481		ServerResponse: googleapi.ServerResponse{
42482			Header:         res.Header,
42483			HTTPStatusCode: res.StatusCode,
42484		},
42485	}
42486	target := &ret
42487	if err := gensupport.DecodeResponse(target, res); err != nil {
42488		return nil, err
42489	}
42490	return ret, nil
42491	// {
42492	//   "description": "Updates an existing remarketing list share. This method supports patch semantics.",
42493	//   "httpMethod": "PATCH",
42494	//   "id": "dfareporting.remarketingListShares.patch",
42495	//   "parameterOrder": [
42496	//     "profileId",
42497	//     "remarketingListId"
42498	//   ],
42499	//   "parameters": {
42500	//     "profileId": {
42501	//       "description": "User profile ID associated with this request.",
42502	//       "format": "int64",
42503	//       "location": "path",
42504	//       "required": true,
42505	//       "type": "string"
42506	//     },
42507	//     "remarketingListId": {
42508	//       "description": "Remarketing list ID.",
42509	//       "format": "int64",
42510	//       "location": "query",
42511	//       "required": true,
42512	//       "type": "string"
42513	//     }
42514	//   },
42515	//   "path": "userprofiles/{profileId}/remarketingListShares",
42516	//   "request": {
42517	//     "$ref": "RemarketingListShare"
42518	//   },
42519	//   "response": {
42520	//     "$ref": "RemarketingListShare"
42521	//   },
42522	//   "scopes": [
42523	//     "https://www.googleapis.com/auth/dfatrafficking"
42524	//   ]
42525	// }
42526
42527}
42528
42529// method id "dfareporting.remarketingListShares.update":
42530
42531type RemarketingListSharesUpdateCall struct {
42532	s                    *Service
42533	profileId            int64
42534	remarketinglistshare *RemarketingListShare
42535	urlParams_           gensupport.URLParams
42536	ctx_                 context.Context
42537	header_              http.Header
42538}
42539
42540// Update: Updates an existing remarketing list share.
42541func (r *RemarketingListSharesService) Update(profileId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesUpdateCall {
42542	c := &RemarketingListSharesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42543	c.profileId = profileId
42544	c.remarketinglistshare = remarketinglistshare
42545	return c
42546}
42547
42548// Fields allows partial responses to be retrieved. See
42549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42550// for more information.
42551func (c *RemarketingListSharesUpdateCall) Fields(s ...googleapi.Field) *RemarketingListSharesUpdateCall {
42552	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42553	return c
42554}
42555
42556// Context sets the context to be used in this call's Do method. Any
42557// pending HTTP request will be aborted if the provided context is
42558// canceled.
42559func (c *RemarketingListSharesUpdateCall) Context(ctx context.Context) *RemarketingListSharesUpdateCall {
42560	c.ctx_ = ctx
42561	return c
42562}
42563
42564// Header returns an http.Header that can be modified by the caller to
42565// add HTTP headers to the request.
42566func (c *RemarketingListSharesUpdateCall) Header() http.Header {
42567	if c.header_ == nil {
42568		c.header_ = make(http.Header)
42569	}
42570	return c.header_
42571}
42572
42573func (c *RemarketingListSharesUpdateCall) doRequest(alt string) (*http.Response, error) {
42574	reqHeaders := make(http.Header)
42575	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
42576	for k, v := range c.header_ {
42577		reqHeaders[k] = v
42578	}
42579	reqHeaders.Set("User-Agent", c.s.userAgent())
42580	var body io.Reader = nil
42581	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
42582	if err != nil {
42583		return nil, err
42584	}
42585	reqHeaders.Set("Content-Type", "application/json")
42586	c.urlParams_.Set("alt", alt)
42587	c.urlParams_.Set("prettyPrint", "false")
42588	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
42589	urls += "?" + c.urlParams_.Encode()
42590	req, err := http.NewRequest("PUT", urls, body)
42591	if err != nil {
42592		return nil, err
42593	}
42594	req.Header = reqHeaders
42595	googleapi.Expand(req.URL, map[string]string{
42596		"profileId": strconv.FormatInt(c.profileId, 10),
42597	})
42598	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42599}
42600
42601// Do executes the "dfareporting.remarketingListShares.update" call.
42602// Exactly one of *RemarketingListShare or error will be non-nil. Any
42603// non-2xx status code is an error. Response headers are in either
42604// *RemarketingListShare.ServerResponse.Header or (if a response was
42605// returned at all) in error.(*googleapi.Error).Header. Use
42606// googleapi.IsNotModified to check whether the returned error was
42607// because http.StatusNotModified was returned.
42608func (c *RemarketingListSharesUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42609	gensupport.SetOptions(c.urlParams_, opts...)
42610	res, err := c.doRequest("json")
42611	if res != nil && res.StatusCode == http.StatusNotModified {
42612		if res.Body != nil {
42613			res.Body.Close()
42614		}
42615		return nil, &googleapi.Error{
42616			Code:   res.StatusCode,
42617			Header: res.Header,
42618		}
42619	}
42620	if err != nil {
42621		return nil, err
42622	}
42623	defer googleapi.CloseBody(res)
42624	if err := googleapi.CheckResponse(res); err != nil {
42625		return nil, err
42626	}
42627	ret := &RemarketingListShare{
42628		ServerResponse: googleapi.ServerResponse{
42629			Header:         res.Header,
42630			HTTPStatusCode: res.StatusCode,
42631		},
42632	}
42633	target := &ret
42634	if err := gensupport.DecodeResponse(target, res); err != nil {
42635		return nil, err
42636	}
42637	return ret, nil
42638	// {
42639	//   "description": "Updates an existing remarketing list share.",
42640	//   "httpMethod": "PUT",
42641	//   "id": "dfareporting.remarketingListShares.update",
42642	//   "parameterOrder": [
42643	//     "profileId"
42644	//   ],
42645	//   "parameters": {
42646	//     "profileId": {
42647	//       "description": "User profile ID associated with this request.",
42648	//       "format": "int64",
42649	//       "location": "path",
42650	//       "required": true,
42651	//       "type": "string"
42652	//     }
42653	//   },
42654	//   "path": "userprofiles/{profileId}/remarketingListShares",
42655	//   "request": {
42656	//     "$ref": "RemarketingListShare"
42657	//   },
42658	//   "response": {
42659	//     "$ref": "RemarketingListShare"
42660	//   },
42661	//   "scopes": [
42662	//     "https://www.googleapis.com/auth/dfatrafficking"
42663	//   ]
42664	// }
42665
42666}
42667
42668// method id "dfareporting.remarketingLists.get":
42669
42670type RemarketingListsGetCall struct {
42671	s            *Service
42672	profileId    int64
42673	id           int64
42674	urlParams_   gensupport.URLParams
42675	ifNoneMatch_ string
42676	ctx_         context.Context
42677	header_      http.Header
42678}
42679
42680// Get: Gets one remarketing list by ID.
42681func (r *RemarketingListsService) Get(profileId int64, id int64) *RemarketingListsGetCall {
42682	c := &RemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42683	c.profileId = profileId
42684	c.id = id
42685	return c
42686}
42687
42688// Fields allows partial responses to be retrieved. See
42689// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42690// for more information.
42691func (c *RemarketingListsGetCall) Fields(s ...googleapi.Field) *RemarketingListsGetCall {
42692	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42693	return c
42694}
42695
42696// IfNoneMatch sets the optional parameter which makes the operation
42697// fail if the object's ETag matches the given value. This is useful for
42698// getting updates only after the object has changed since the last
42699// request. Use googleapi.IsNotModified to check whether the response
42700// error from Do is the result of In-None-Match.
42701func (c *RemarketingListsGetCall) IfNoneMatch(entityTag string) *RemarketingListsGetCall {
42702	c.ifNoneMatch_ = entityTag
42703	return c
42704}
42705
42706// Context sets the context to be used in this call's Do method. Any
42707// pending HTTP request will be aborted if the provided context is
42708// canceled.
42709func (c *RemarketingListsGetCall) Context(ctx context.Context) *RemarketingListsGetCall {
42710	c.ctx_ = ctx
42711	return c
42712}
42713
42714// Header returns an http.Header that can be modified by the caller to
42715// add HTTP headers to the request.
42716func (c *RemarketingListsGetCall) Header() http.Header {
42717	if c.header_ == nil {
42718		c.header_ = make(http.Header)
42719	}
42720	return c.header_
42721}
42722
42723func (c *RemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
42724	reqHeaders := make(http.Header)
42725	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
42726	for k, v := range c.header_ {
42727		reqHeaders[k] = v
42728	}
42729	reqHeaders.Set("User-Agent", c.s.userAgent())
42730	if c.ifNoneMatch_ != "" {
42731		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42732	}
42733	var body io.Reader = nil
42734	c.urlParams_.Set("alt", alt)
42735	c.urlParams_.Set("prettyPrint", "false")
42736	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists/{id}")
42737	urls += "?" + c.urlParams_.Encode()
42738	req, err := http.NewRequest("GET", urls, body)
42739	if err != nil {
42740		return nil, err
42741	}
42742	req.Header = reqHeaders
42743	googleapi.Expand(req.URL, map[string]string{
42744		"profileId": strconv.FormatInt(c.profileId, 10),
42745		"id":        strconv.FormatInt(c.id, 10),
42746	})
42747	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42748}
42749
42750// Do executes the "dfareporting.remarketingLists.get" call.
42751// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
42752// status code is an error. Response headers are in either
42753// *RemarketingList.ServerResponse.Header or (if a response was returned
42754// at all) in error.(*googleapi.Error).Header. Use
42755// googleapi.IsNotModified to check whether the returned error was
42756// because http.StatusNotModified was returned.
42757func (c *RemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
42758	gensupport.SetOptions(c.urlParams_, opts...)
42759	res, err := c.doRequest("json")
42760	if res != nil && res.StatusCode == http.StatusNotModified {
42761		if res.Body != nil {
42762			res.Body.Close()
42763		}
42764		return nil, &googleapi.Error{
42765			Code:   res.StatusCode,
42766			Header: res.Header,
42767		}
42768	}
42769	if err != nil {
42770		return nil, err
42771	}
42772	defer googleapi.CloseBody(res)
42773	if err := googleapi.CheckResponse(res); err != nil {
42774		return nil, err
42775	}
42776	ret := &RemarketingList{
42777		ServerResponse: googleapi.ServerResponse{
42778			Header:         res.Header,
42779			HTTPStatusCode: res.StatusCode,
42780		},
42781	}
42782	target := &ret
42783	if err := gensupport.DecodeResponse(target, res); err != nil {
42784		return nil, err
42785	}
42786	return ret, nil
42787	// {
42788	//   "description": "Gets one remarketing list by ID.",
42789	//   "httpMethod": "GET",
42790	//   "id": "dfareporting.remarketingLists.get",
42791	//   "parameterOrder": [
42792	//     "profileId",
42793	//     "id"
42794	//   ],
42795	//   "parameters": {
42796	//     "id": {
42797	//       "description": "Remarketing list ID.",
42798	//       "format": "int64",
42799	//       "location": "path",
42800	//       "required": true,
42801	//       "type": "string"
42802	//     },
42803	//     "profileId": {
42804	//       "description": "User profile ID associated with this request.",
42805	//       "format": "int64",
42806	//       "location": "path",
42807	//       "required": true,
42808	//       "type": "string"
42809	//     }
42810	//   },
42811	//   "path": "userprofiles/{profileId}/remarketingLists/{id}",
42812	//   "response": {
42813	//     "$ref": "RemarketingList"
42814	//   },
42815	//   "scopes": [
42816	//     "https://www.googleapis.com/auth/dfatrafficking"
42817	//   ]
42818	// }
42819
42820}
42821
42822// method id "dfareporting.remarketingLists.insert":
42823
42824type RemarketingListsInsertCall struct {
42825	s               *Service
42826	profileId       int64
42827	remarketinglist *RemarketingList
42828	urlParams_      gensupport.URLParams
42829	ctx_            context.Context
42830	header_         http.Header
42831}
42832
42833// Insert: Inserts a new remarketing list.
42834func (r *RemarketingListsService) Insert(profileId int64, remarketinglist *RemarketingList) *RemarketingListsInsertCall {
42835	c := &RemarketingListsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42836	c.profileId = profileId
42837	c.remarketinglist = remarketinglist
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 *RemarketingListsInsertCall) Fields(s ...googleapi.Field) *RemarketingListsInsertCall {
42845	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42846	return c
42847}
42848
42849// Context sets the context to be used in this call's Do method. Any
42850// pending HTTP request will be aborted if the provided context is
42851// canceled.
42852func (c *RemarketingListsInsertCall) Context(ctx context.Context) *RemarketingListsInsertCall {
42853	c.ctx_ = ctx
42854	return c
42855}
42856
42857// Header returns an http.Header that can be modified by the caller to
42858// add HTTP headers to the request.
42859func (c *RemarketingListsInsertCall) Header() http.Header {
42860	if c.header_ == nil {
42861		c.header_ = make(http.Header)
42862	}
42863	return c.header_
42864}
42865
42866func (c *RemarketingListsInsertCall) doRequest(alt string) (*http.Response, error) {
42867	reqHeaders := make(http.Header)
42868	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
42869	for k, v := range c.header_ {
42870		reqHeaders[k] = v
42871	}
42872	reqHeaders.Set("User-Agent", c.s.userAgent())
42873	var body io.Reader = nil
42874	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
42875	if err != nil {
42876		return nil, err
42877	}
42878	reqHeaders.Set("Content-Type", "application/json")
42879	c.urlParams_.Set("alt", alt)
42880	c.urlParams_.Set("prettyPrint", "false")
42881	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
42882	urls += "?" + c.urlParams_.Encode()
42883	req, err := http.NewRequest("POST", urls, body)
42884	if err != nil {
42885		return nil, err
42886	}
42887	req.Header = reqHeaders
42888	googleapi.Expand(req.URL, map[string]string{
42889		"profileId": strconv.FormatInt(c.profileId, 10),
42890	})
42891	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42892}
42893
42894// Do executes the "dfareporting.remarketingLists.insert" call.
42895// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
42896// status code is an error. Response headers are in either
42897// *RemarketingList.ServerResponse.Header or (if a response was returned
42898// at all) in error.(*googleapi.Error).Header. Use
42899// googleapi.IsNotModified to check whether the returned error was
42900// because http.StatusNotModified was returned.
42901func (c *RemarketingListsInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
42902	gensupport.SetOptions(c.urlParams_, opts...)
42903	res, err := c.doRequest("json")
42904	if res != nil && res.StatusCode == http.StatusNotModified {
42905		if res.Body != nil {
42906			res.Body.Close()
42907		}
42908		return nil, &googleapi.Error{
42909			Code:   res.StatusCode,
42910			Header: res.Header,
42911		}
42912	}
42913	if err != nil {
42914		return nil, err
42915	}
42916	defer googleapi.CloseBody(res)
42917	if err := googleapi.CheckResponse(res); err != nil {
42918		return nil, err
42919	}
42920	ret := &RemarketingList{
42921		ServerResponse: googleapi.ServerResponse{
42922			Header:         res.Header,
42923			HTTPStatusCode: res.StatusCode,
42924		},
42925	}
42926	target := &ret
42927	if err := gensupport.DecodeResponse(target, res); err != nil {
42928		return nil, err
42929	}
42930	return ret, nil
42931	// {
42932	//   "description": "Inserts a new remarketing list.",
42933	//   "httpMethod": "POST",
42934	//   "id": "dfareporting.remarketingLists.insert",
42935	//   "parameterOrder": [
42936	//     "profileId"
42937	//   ],
42938	//   "parameters": {
42939	//     "profileId": {
42940	//       "description": "User profile ID associated with this request.",
42941	//       "format": "int64",
42942	//       "location": "path",
42943	//       "required": true,
42944	//       "type": "string"
42945	//     }
42946	//   },
42947	//   "path": "userprofiles/{profileId}/remarketingLists",
42948	//   "request": {
42949	//     "$ref": "RemarketingList"
42950	//   },
42951	//   "response": {
42952	//     "$ref": "RemarketingList"
42953	//   },
42954	//   "scopes": [
42955	//     "https://www.googleapis.com/auth/dfatrafficking"
42956	//   ]
42957	// }
42958
42959}
42960
42961// method id "dfareporting.remarketingLists.list":
42962
42963type RemarketingListsListCall struct {
42964	s            *Service
42965	profileId    int64
42966	urlParams_   gensupport.URLParams
42967	ifNoneMatch_ string
42968	ctx_         context.Context
42969	header_      http.Header
42970}
42971
42972// List: Retrieves a list of remarketing lists, possibly filtered. This
42973// method supports paging.
42974func (r *RemarketingListsService) List(profileId int64, advertiserId int64) *RemarketingListsListCall {
42975	c := &RemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42976	c.profileId = profileId
42977	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
42978	return c
42979}
42980
42981// Active sets the optional parameter "active": Select only active or
42982// only inactive remarketing lists.
42983func (c *RemarketingListsListCall) Active(active bool) *RemarketingListsListCall {
42984	c.urlParams_.Set("active", fmt.Sprint(active))
42985	return c
42986}
42987
42988// FloodlightActivityId sets the optional parameter
42989// "floodlightActivityId": Select only remarketing lists that have this
42990// floodlight activity ID.
42991func (c *RemarketingListsListCall) FloodlightActivityId(floodlightActivityId int64) *RemarketingListsListCall {
42992	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
42993	return c
42994}
42995
42996// MaxResults sets the optional parameter "maxResults": Maximum number
42997// of results to return.
42998func (c *RemarketingListsListCall) MaxResults(maxResults int64) *RemarketingListsListCall {
42999	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
43000	return c
43001}
43002
43003// Name sets the optional parameter "name": Allows searching for objects
43004// by name or ID. Wildcards (*) are allowed. For example, "remarketing
43005// list*2015" will return objects with names like "remarketing list June
43006// 2015", "remarketing list April 2015", or simply "remarketing list
43007// 2015". Most of the searches also add wildcards implicitly at the
43008// start and the end of the search string. For example, a search string
43009// of "remarketing list" will match objects with name "my remarketing
43010// list", "remarketing list 2015", or simply "remarketing list".
43011func (c *RemarketingListsListCall) Name(name string) *RemarketingListsListCall {
43012	c.urlParams_.Set("name", name)
43013	return c
43014}
43015
43016// PageToken sets the optional parameter "pageToken": Value of the
43017// nextPageToken from the previous result page.
43018func (c *RemarketingListsListCall) PageToken(pageToken string) *RemarketingListsListCall {
43019	c.urlParams_.Set("pageToken", pageToken)
43020	return c
43021}
43022
43023// SortField sets the optional parameter "sortField": Field by which to
43024// sort the list.
43025//
43026// Possible values:
43027//   "ID" (default)
43028//   "NAME"
43029func (c *RemarketingListsListCall) SortField(sortField string) *RemarketingListsListCall {
43030	c.urlParams_.Set("sortField", sortField)
43031	return c
43032}
43033
43034// SortOrder sets the optional parameter "sortOrder": Order of sorted
43035// results.
43036//
43037// Possible values:
43038//   "ASCENDING" (default)
43039//   "DESCENDING"
43040func (c *RemarketingListsListCall) SortOrder(sortOrder string) *RemarketingListsListCall {
43041	c.urlParams_.Set("sortOrder", sortOrder)
43042	return c
43043}
43044
43045// Fields allows partial responses to be retrieved. See
43046// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43047// for more information.
43048func (c *RemarketingListsListCall) Fields(s ...googleapi.Field) *RemarketingListsListCall {
43049	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43050	return c
43051}
43052
43053// IfNoneMatch sets the optional parameter which makes the operation
43054// fail if the object's ETag matches the given value. This is useful for
43055// getting updates only after the object has changed since the last
43056// request. Use googleapi.IsNotModified to check whether the response
43057// error from Do is the result of In-None-Match.
43058func (c *RemarketingListsListCall) IfNoneMatch(entityTag string) *RemarketingListsListCall {
43059	c.ifNoneMatch_ = entityTag
43060	return c
43061}
43062
43063// Context sets the context to be used in this call's Do method. Any
43064// pending HTTP request will be aborted if the provided context is
43065// canceled.
43066func (c *RemarketingListsListCall) Context(ctx context.Context) *RemarketingListsListCall {
43067	c.ctx_ = ctx
43068	return c
43069}
43070
43071// Header returns an http.Header that can be modified by the caller to
43072// add HTTP headers to the request.
43073func (c *RemarketingListsListCall) Header() http.Header {
43074	if c.header_ == nil {
43075		c.header_ = make(http.Header)
43076	}
43077	return c.header_
43078}
43079
43080func (c *RemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
43081	reqHeaders := make(http.Header)
43082	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
43083	for k, v := range c.header_ {
43084		reqHeaders[k] = v
43085	}
43086	reqHeaders.Set("User-Agent", c.s.userAgent())
43087	if c.ifNoneMatch_ != "" {
43088		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43089	}
43090	var body io.Reader = nil
43091	c.urlParams_.Set("alt", alt)
43092	c.urlParams_.Set("prettyPrint", "false")
43093	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43094	urls += "?" + c.urlParams_.Encode()
43095	req, err := http.NewRequest("GET", urls, body)
43096	if err != nil {
43097		return nil, err
43098	}
43099	req.Header = reqHeaders
43100	googleapi.Expand(req.URL, map[string]string{
43101		"profileId": strconv.FormatInt(c.profileId, 10),
43102	})
43103	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43104}
43105
43106// Do executes the "dfareporting.remarketingLists.list" call.
43107// Exactly one of *RemarketingListsListResponse or error will be
43108// non-nil. Any non-2xx status code is an error. Response headers are in
43109// either *RemarketingListsListResponse.ServerResponse.Header or (if a
43110// response was returned at all) in error.(*googleapi.Error).Header. Use
43111// googleapi.IsNotModified to check whether the returned error was
43112// because http.StatusNotModified was returned.
43113func (c *RemarketingListsListCall) Do(opts ...googleapi.CallOption) (*RemarketingListsListResponse, error) {
43114	gensupport.SetOptions(c.urlParams_, opts...)
43115	res, err := c.doRequest("json")
43116	if res != nil && res.StatusCode == http.StatusNotModified {
43117		if res.Body != nil {
43118			res.Body.Close()
43119		}
43120		return nil, &googleapi.Error{
43121			Code:   res.StatusCode,
43122			Header: res.Header,
43123		}
43124	}
43125	if err != nil {
43126		return nil, err
43127	}
43128	defer googleapi.CloseBody(res)
43129	if err := googleapi.CheckResponse(res); err != nil {
43130		return nil, err
43131	}
43132	ret := &RemarketingListsListResponse{
43133		ServerResponse: googleapi.ServerResponse{
43134			Header:         res.Header,
43135			HTTPStatusCode: res.StatusCode,
43136		},
43137	}
43138	target := &ret
43139	if err := gensupport.DecodeResponse(target, res); err != nil {
43140		return nil, err
43141	}
43142	return ret, nil
43143	// {
43144	//   "description": "Retrieves a list of remarketing lists, possibly filtered. This method supports paging.",
43145	//   "httpMethod": "GET",
43146	//   "id": "dfareporting.remarketingLists.list",
43147	//   "parameterOrder": [
43148	//     "profileId",
43149	//     "advertiserId"
43150	//   ],
43151	//   "parameters": {
43152	//     "active": {
43153	//       "description": "Select only active or only inactive remarketing lists.",
43154	//       "location": "query",
43155	//       "type": "boolean"
43156	//     },
43157	//     "advertiserId": {
43158	//       "description": "Select only remarketing lists owned by this advertiser.",
43159	//       "format": "int64",
43160	//       "location": "query",
43161	//       "required": true,
43162	//       "type": "string"
43163	//     },
43164	//     "floodlightActivityId": {
43165	//       "description": "Select only remarketing lists that have this floodlight activity ID.",
43166	//       "format": "int64",
43167	//       "location": "query",
43168	//       "type": "string"
43169	//     },
43170	//     "maxResults": {
43171	//       "default": "1000",
43172	//       "description": "Maximum number of results to return.",
43173	//       "format": "int32",
43174	//       "location": "query",
43175	//       "maximum": "1000",
43176	//       "minimum": "0",
43177	//       "type": "integer"
43178	//     },
43179	//     "name": {
43180	//       "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\".",
43181	//       "location": "query",
43182	//       "type": "string"
43183	//     },
43184	//     "pageToken": {
43185	//       "description": "Value of the nextPageToken from the previous result page.",
43186	//       "location": "query",
43187	//       "type": "string"
43188	//     },
43189	//     "profileId": {
43190	//       "description": "User profile ID associated with this request.",
43191	//       "format": "int64",
43192	//       "location": "path",
43193	//       "required": true,
43194	//       "type": "string"
43195	//     },
43196	//     "sortField": {
43197	//       "default": "ID",
43198	//       "description": "Field by which to sort the list.",
43199	//       "enum": [
43200	//         "ID",
43201	//         "NAME"
43202	//       ],
43203	//       "enumDescriptions": [
43204	//         "",
43205	//         ""
43206	//       ],
43207	//       "location": "query",
43208	//       "type": "string"
43209	//     },
43210	//     "sortOrder": {
43211	//       "default": "ASCENDING",
43212	//       "description": "Order of sorted results.",
43213	//       "enum": [
43214	//         "ASCENDING",
43215	//         "DESCENDING"
43216	//       ],
43217	//       "enumDescriptions": [
43218	//         "",
43219	//         ""
43220	//       ],
43221	//       "location": "query",
43222	//       "type": "string"
43223	//     }
43224	//   },
43225	//   "path": "userprofiles/{profileId}/remarketingLists",
43226	//   "response": {
43227	//     "$ref": "RemarketingListsListResponse"
43228	//   },
43229	//   "scopes": [
43230	//     "https://www.googleapis.com/auth/dfatrafficking"
43231	//   ]
43232	// }
43233
43234}
43235
43236// Pages invokes f for each page of results.
43237// A non-nil error returned from f will halt the iteration.
43238// The provided context supersedes any context provided to the Context method.
43239func (c *RemarketingListsListCall) Pages(ctx context.Context, f func(*RemarketingListsListResponse) error) error {
43240	c.ctx_ = ctx
43241	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
43242	for {
43243		x, err := c.Do()
43244		if err != nil {
43245			return err
43246		}
43247		if err := f(x); err != nil {
43248			return err
43249		}
43250		if x.NextPageToken == "" {
43251			return nil
43252		}
43253		c.PageToken(x.NextPageToken)
43254	}
43255}
43256
43257// method id "dfareporting.remarketingLists.patch":
43258
43259type RemarketingListsPatchCall struct {
43260	s               *Service
43261	profileId       int64
43262	remarketinglist *RemarketingList
43263	urlParams_      gensupport.URLParams
43264	ctx_            context.Context
43265	header_         http.Header
43266}
43267
43268// Patch: Updates an existing remarketing list. This method supports
43269// patch semantics.
43270func (r *RemarketingListsService) Patch(profileId int64, id int64, remarketinglist *RemarketingList) *RemarketingListsPatchCall {
43271	c := &RemarketingListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43272	c.profileId = profileId
43273	c.urlParams_.Set("id", fmt.Sprint(id))
43274	c.remarketinglist = remarketinglist
43275	return c
43276}
43277
43278// Fields allows partial responses to be retrieved. See
43279// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43280// for more information.
43281func (c *RemarketingListsPatchCall) Fields(s ...googleapi.Field) *RemarketingListsPatchCall {
43282	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43283	return c
43284}
43285
43286// Context sets the context to be used in this call's Do method. Any
43287// pending HTTP request will be aborted if the provided context is
43288// canceled.
43289func (c *RemarketingListsPatchCall) Context(ctx context.Context) *RemarketingListsPatchCall {
43290	c.ctx_ = ctx
43291	return c
43292}
43293
43294// Header returns an http.Header that can be modified by the caller to
43295// add HTTP headers to the request.
43296func (c *RemarketingListsPatchCall) Header() http.Header {
43297	if c.header_ == nil {
43298		c.header_ = make(http.Header)
43299	}
43300	return c.header_
43301}
43302
43303func (c *RemarketingListsPatchCall) doRequest(alt string) (*http.Response, error) {
43304	reqHeaders := make(http.Header)
43305	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
43306	for k, v := range c.header_ {
43307		reqHeaders[k] = v
43308	}
43309	reqHeaders.Set("User-Agent", c.s.userAgent())
43310	var body io.Reader = nil
43311	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43312	if err != nil {
43313		return nil, err
43314	}
43315	reqHeaders.Set("Content-Type", "application/json")
43316	c.urlParams_.Set("alt", alt)
43317	c.urlParams_.Set("prettyPrint", "false")
43318	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43319	urls += "?" + c.urlParams_.Encode()
43320	req, err := http.NewRequest("PATCH", urls, body)
43321	if err != nil {
43322		return nil, err
43323	}
43324	req.Header = reqHeaders
43325	googleapi.Expand(req.URL, map[string]string{
43326		"profileId": strconv.FormatInt(c.profileId, 10),
43327	})
43328	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43329}
43330
43331// Do executes the "dfareporting.remarketingLists.patch" call.
43332// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
43333// status code is an error. Response headers are in either
43334// *RemarketingList.ServerResponse.Header or (if a response was returned
43335// at all) in error.(*googleapi.Error).Header. Use
43336// googleapi.IsNotModified to check whether the returned error was
43337// because http.StatusNotModified was returned.
43338func (c *RemarketingListsPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43339	gensupport.SetOptions(c.urlParams_, opts...)
43340	res, err := c.doRequest("json")
43341	if res != nil && res.StatusCode == http.StatusNotModified {
43342		if res.Body != nil {
43343			res.Body.Close()
43344		}
43345		return nil, &googleapi.Error{
43346			Code:   res.StatusCode,
43347			Header: res.Header,
43348		}
43349	}
43350	if err != nil {
43351		return nil, err
43352	}
43353	defer googleapi.CloseBody(res)
43354	if err := googleapi.CheckResponse(res); err != nil {
43355		return nil, err
43356	}
43357	ret := &RemarketingList{
43358		ServerResponse: googleapi.ServerResponse{
43359			Header:         res.Header,
43360			HTTPStatusCode: res.StatusCode,
43361		},
43362	}
43363	target := &ret
43364	if err := gensupport.DecodeResponse(target, res); err != nil {
43365		return nil, err
43366	}
43367	return ret, nil
43368	// {
43369	//   "description": "Updates an existing remarketing list. This method supports patch semantics.",
43370	//   "httpMethod": "PATCH",
43371	//   "id": "dfareporting.remarketingLists.patch",
43372	//   "parameterOrder": [
43373	//     "profileId",
43374	//     "id"
43375	//   ],
43376	//   "parameters": {
43377	//     "id": {
43378	//       "description": "Remarketing list ID.",
43379	//       "format": "int64",
43380	//       "location": "query",
43381	//       "required": true,
43382	//       "type": "string"
43383	//     },
43384	//     "profileId": {
43385	//       "description": "User profile ID associated with this request.",
43386	//       "format": "int64",
43387	//       "location": "path",
43388	//       "required": true,
43389	//       "type": "string"
43390	//     }
43391	//   },
43392	//   "path": "userprofiles/{profileId}/remarketingLists",
43393	//   "request": {
43394	//     "$ref": "RemarketingList"
43395	//   },
43396	//   "response": {
43397	//     "$ref": "RemarketingList"
43398	//   },
43399	//   "scopes": [
43400	//     "https://www.googleapis.com/auth/dfatrafficking"
43401	//   ]
43402	// }
43403
43404}
43405
43406// method id "dfareporting.remarketingLists.update":
43407
43408type RemarketingListsUpdateCall struct {
43409	s               *Service
43410	profileId       int64
43411	remarketinglist *RemarketingList
43412	urlParams_      gensupport.URLParams
43413	ctx_            context.Context
43414	header_         http.Header
43415}
43416
43417// Update: Updates an existing remarketing list.
43418func (r *RemarketingListsService) Update(profileId int64, remarketinglist *RemarketingList) *RemarketingListsUpdateCall {
43419	c := &RemarketingListsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43420	c.profileId = profileId
43421	c.remarketinglist = remarketinglist
43422	return c
43423}
43424
43425// Fields allows partial responses to be retrieved. See
43426// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43427// for more information.
43428func (c *RemarketingListsUpdateCall) Fields(s ...googleapi.Field) *RemarketingListsUpdateCall {
43429	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43430	return c
43431}
43432
43433// Context sets the context to be used in this call's Do method. Any
43434// pending HTTP request will be aborted if the provided context is
43435// canceled.
43436func (c *RemarketingListsUpdateCall) Context(ctx context.Context) *RemarketingListsUpdateCall {
43437	c.ctx_ = ctx
43438	return c
43439}
43440
43441// Header returns an http.Header that can be modified by the caller to
43442// add HTTP headers to the request.
43443func (c *RemarketingListsUpdateCall) Header() http.Header {
43444	if c.header_ == nil {
43445		c.header_ = make(http.Header)
43446	}
43447	return c.header_
43448}
43449
43450func (c *RemarketingListsUpdateCall) doRequest(alt string) (*http.Response, error) {
43451	reqHeaders := make(http.Header)
43452	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
43453	for k, v := range c.header_ {
43454		reqHeaders[k] = v
43455	}
43456	reqHeaders.Set("User-Agent", c.s.userAgent())
43457	var body io.Reader = nil
43458	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43459	if err != nil {
43460		return nil, err
43461	}
43462	reqHeaders.Set("Content-Type", "application/json")
43463	c.urlParams_.Set("alt", alt)
43464	c.urlParams_.Set("prettyPrint", "false")
43465	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43466	urls += "?" + c.urlParams_.Encode()
43467	req, err := http.NewRequest("PUT", urls, body)
43468	if err != nil {
43469		return nil, err
43470	}
43471	req.Header = reqHeaders
43472	googleapi.Expand(req.URL, map[string]string{
43473		"profileId": strconv.FormatInt(c.profileId, 10),
43474	})
43475	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43476}
43477
43478// Do executes the "dfareporting.remarketingLists.update" call.
43479// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
43480// status code is an error. Response headers are in either
43481// *RemarketingList.ServerResponse.Header or (if a response was returned
43482// at all) in error.(*googleapi.Error).Header. Use
43483// googleapi.IsNotModified to check whether the returned error was
43484// because http.StatusNotModified was returned.
43485func (c *RemarketingListsUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43486	gensupport.SetOptions(c.urlParams_, opts...)
43487	res, err := c.doRequest("json")
43488	if res != nil && res.StatusCode == http.StatusNotModified {
43489		if res.Body != nil {
43490			res.Body.Close()
43491		}
43492		return nil, &googleapi.Error{
43493			Code:   res.StatusCode,
43494			Header: res.Header,
43495		}
43496	}
43497	if err != nil {
43498		return nil, err
43499	}
43500	defer googleapi.CloseBody(res)
43501	if err := googleapi.CheckResponse(res); err != nil {
43502		return nil, err
43503	}
43504	ret := &RemarketingList{
43505		ServerResponse: googleapi.ServerResponse{
43506			Header:         res.Header,
43507			HTTPStatusCode: res.StatusCode,
43508		},
43509	}
43510	target := &ret
43511	if err := gensupport.DecodeResponse(target, res); err != nil {
43512		return nil, err
43513	}
43514	return ret, nil
43515	// {
43516	//   "description": "Updates an existing remarketing list.",
43517	//   "httpMethod": "PUT",
43518	//   "id": "dfareporting.remarketingLists.update",
43519	//   "parameterOrder": [
43520	//     "profileId"
43521	//   ],
43522	//   "parameters": {
43523	//     "profileId": {
43524	//       "description": "User profile ID associated with this request.",
43525	//       "format": "int64",
43526	//       "location": "path",
43527	//       "required": true,
43528	//       "type": "string"
43529	//     }
43530	//   },
43531	//   "path": "userprofiles/{profileId}/remarketingLists",
43532	//   "request": {
43533	//     "$ref": "RemarketingList"
43534	//   },
43535	//   "response": {
43536	//     "$ref": "RemarketingList"
43537	//   },
43538	//   "scopes": [
43539	//     "https://www.googleapis.com/auth/dfatrafficking"
43540	//   ]
43541	// }
43542
43543}
43544
43545// method id "dfareporting.reports.delete":
43546
43547type ReportsDeleteCall struct {
43548	s          *Service
43549	profileId  int64
43550	reportId   int64
43551	urlParams_ gensupport.URLParams
43552	ctx_       context.Context
43553	header_    http.Header
43554}
43555
43556// Delete: Deletes a report by its ID.
43557func (r *ReportsService) Delete(profileId int64, reportId int64) *ReportsDeleteCall {
43558	c := &ReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43559	c.profileId = profileId
43560	c.reportId = reportId
43561	return c
43562}
43563
43564// Fields allows partial responses to be retrieved. See
43565// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43566// for more information.
43567func (c *ReportsDeleteCall) Fields(s ...googleapi.Field) *ReportsDeleteCall {
43568	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43569	return c
43570}
43571
43572// Context sets the context to be used in this call's Do method. Any
43573// pending HTTP request will be aborted if the provided context is
43574// canceled.
43575func (c *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
43576	c.ctx_ = ctx
43577	return c
43578}
43579
43580// Header returns an http.Header that can be modified by the caller to
43581// add HTTP headers to the request.
43582func (c *ReportsDeleteCall) Header() http.Header {
43583	if c.header_ == nil {
43584		c.header_ = make(http.Header)
43585	}
43586	return c.header_
43587}
43588
43589func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
43590	reqHeaders := make(http.Header)
43591	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
43592	for k, v := range c.header_ {
43593		reqHeaders[k] = v
43594	}
43595	reqHeaders.Set("User-Agent", c.s.userAgent())
43596	var body io.Reader = nil
43597	c.urlParams_.Set("alt", alt)
43598	c.urlParams_.Set("prettyPrint", "false")
43599	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43600	urls += "?" + c.urlParams_.Encode()
43601	req, err := http.NewRequest("DELETE", urls, body)
43602	if err != nil {
43603		return nil, err
43604	}
43605	req.Header = reqHeaders
43606	googleapi.Expand(req.URL, map[string]string{
43607		"profileId": strconv.FormatInt(c.profileId, 10),
43608		"reportId":  strconv.FormatInt(c.reportId, 10),
43609	})
43610	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43611}
43612
43613// Do executes the "dfareporting.reports.delete" call.
43614func (c *ReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
43615	gensupport.SetOptions(c.urlParams_, opts...)
43616	res, err := c.doRequest("json")
43617	if err != nil {
43618		return err
43619	}
43620	defer googleapi.CloseBody(res)
43621	if err := googleapi.CheckResponse(res); err != nil {
43622		return err
43623	}
43624	return nil
43625	// {
43626	//   "description": "Deletes a report by its ID.",
43627	//   "httpMethod": "DELETE",
43628	//   "id": "dfareporting.reports.delete",
43629	//   "parameterOrder": [
43630	//     "profileId",
43631	//     "reportId"
43632	//   ],
43633	//   "parameters": {
43634	//     "profileId": {
43635	//       "description": "The DFA user profile ID.",
43636	//       "format": "int64",
43637	//       "location": "path",
43638	//       "required": true,
43639	//       "type": "string"
43640	//     },
43641	//     "reportId": {
43642	//       "description": "The ID of the report.",
43643	//       "format": "int64",
43644	//       "location": "path",
43645	//       "required": true,
43646	//       "type": "string"
43647	//     }
43648	//   },
43649	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43650	//   "scopes": [
43651	//     "https://www.googleapis.com/auth/dfareporting"
43652	//   ]
43653	// }
43654
43655}
43656
43657// method id "dfareporting.reports.get":
43658
43659type ReportsGetCall struct {
43660	s            *Service
43661	profileId    int64
43662	reportId     int64
43663	urlParams_   gensupport.URLParams
43664	ifNoneMatch_ string
43665	ctx_         context.Context
43666	header_      http.Header
43667}
43668
43669// Get: Retrieves a report by its ID.
43670func (r *ReportsService) Get(profileId int64, reportId int64) *ReportsGetCall {
43671	c := &ReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43672	c.profileId = profileId
43673	c.reportId = reportId
43674	return c
43675}
43676
43677// Fields allows partial responses to be retrieved. See
43678// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43679// for more information.
43680func (c *ReportsGetCall) Fields(s ...googleapi.Field) *ReportsGetCall {
43681	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43682	return c
43683}
43684
43685// IfNoneMatch sets the optional parameter which makes the operation
43686// fail if the object's ETag matches the given value. This is useful for
43687// getting updates only after the object has changed since the last
43688// request. Use googleapi.IsNotModified to check whether the response
43689// error from Do is the result of In-None-Match.
43690func (c *ReportsGetCall) IfNoneMatch(entityTag string) *ReportsGetCall {
43691	c.ifNoneMatch_ = entityTag
43692	return c
43693}
43694
43695// Context sets the context to be used in this call's Do method. Any
43696// pending HTTP request will be aborted if the provided context is
43697// canceled.
43698func (c *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
43699	c.ctx_ = ctx
43700	return c
43701}
43702
43703// Header returns an http.Header that can be modified by the caller to
43704// add HTTP headers to the request.
43705func (c *ReportsGetCall) Header() http.Header {
43706	if c.header_ == nil {
43707		c.header_ = make(http.Header)
43708	}
43709	return c.header_
43710}
43711
43712func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
43713	reqHeaders := make(http.Header)
43714	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
43715	for k, v := range c.header_ {
43716		reqHeaders[k] = v
43717	}
43718	reqHeaders.Set("User-Agent", c.s.userAgent())
43719	if c.ifNoneMatch_ != "" {
43720		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43721	}
43722	var body io.Reader = nil
43723	c.urlParams_.Set("alt", alt)
43724	c.urlParams_.Set("prettyPrint", "false")
43725	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43726	urls += "?" + c.urlParams_.Encode()
43727	req, err := http.NewRequest("GET", urls, body)
43728	if err != nil {
43729		return nil, err
43730	}
43731	req.Header = reqHeaders
43732	googleapi.Expand(req.URL, map[string]string{
43733		"profileId": strconv.FormatInt(c.profileId, 10),
43734		"reportId":  strconv.FormatInt(c.reportId, 10),
43735	})
43736	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43737}
43738
43739// Do executes the "dfareporting.reports.get" call.
43740// Exactly one of *Report or error will be non-nil. Any non-2xx status
43741// code is an error. Response headers are in either
43742// *Report.ServerResponse.Header or (if a response was returned at all)
43743// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
43744// check whether the returned error was because http.StatusNotModified
43745// was returned.
43746func (c *ReportsGetCall) Do(opts ...googleapi.CallOption) (*Report, error) {
43747	gensupport.SetOptions(c.urlParams_, opts...)
43748	res, err := c.doRequest("json")
43749	if res != nil && res.StatusCode == http.StatusNotModified {
43750		if res.Body != nil {
43751			res.Body.Close()
43752		}
43753		return nil, &googleapi.Error{
43754			Code:   res.StatusCode,
43755			Header: res.Header,
43756		}
43757	}
43758	if err != nil {
43759		return nil, err
43760	}
43761	defer googleapi.CloseBody(res)
43762	if err := googleapi.CheckResponse(res); err != nil {
43763		return nil, err
43764	}
43765	ret := &Report{
43766		ServerResponse: googleapi.ServerResponse{
43767			Header:         res.Header,
43768			HTTPStatusCode: res.StatusCode,
43769		},
43770	}
43771	target := &ret
43772	if err := gensupport.DecodeResponse(target, res); err != nil {
43773		return nil, err
43774	}
43775	return ret, nil
43776	// {
43777	//   "description": "Retrieves a report by its ID.",
43778	//   "httpMethod": "GET",
43779	//   "id": "dfareporting.reports.get",
43780	//   "parameterOrder": [
43781	//     "profileId",
43782	//     "reportId"
43783	//   ],
43784	//   "parameters": {
43785	//     "profileId": {
43786	//       "description": "The DFA user profile ID.",
43787	//       "format": "int64",
43788	//       "location": "path",
43789	//       "required": true,
43790	//       "type": "string"
43791	//     },
43792	//     "reportId": {
43793	//       "description": "The ID of the report.",
43794	//       "format": "int64",
43795	//       "location": "path",
43796	//       "required": true,
43797	//       "type": "string"
43798	//     }
43799	//   },
43800	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43801	//   "response": {
43802	//     "$ref": "Report"
43803	//   },
43804	//   "scopes": [
43805	//     "https://www.googleapis.com/auth/dfareporting"
43806	//   ]
43807	// }
43808
43809}
43810
43811// method id "dfareporting.reports.insert":
43812
43813type ReportsInsertCall struct {
43814	s          *Service
43815	profileId  int64
43816	report     *Report
43817	urlParams_ gensupport.URLParams
43818	ctx_       context.Context
43819	header_    http.Header
43820}
43821
43822// Insert: Creates a report.
43823func (r *ReportsService) Insert(profileId int64, report *Report) *ReportsInsertCall {
43824	c := &ReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43825	c.profileId = profileId
43826	c.report = report
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 *ReportsInsertCall) Fields(s ...googleapi.Field) *ReportsInsertCall {
43834	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43835	return c
43836}
43837
43838// Context sets the context to be used in this call's Do method. Any
43839// pending HTTP request will be aborted if the provided context is
43840// canceled.
43841func (c *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
43842	c.ctx_ = ctx
43843	return c
43844}
43845
43846// Header returns an http.Header that can be modified by the caller to
43847// add HTTP headers to the request.
43848func (c *ReportsInsertCall) Header() http.Header {
43849	if c.header_ == nil {
43850		c.header_ = make(http.Header)
43851	}
43852	return c.header_
43853}
43854
43855func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
43856	reqHeaders := make(http.Header)
43857	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
43858	for k, v := range c.header_ {
43859		reqHeaders[k] = v
43860	}
43861	reqHeaders.Set("User-Agent", c.s.userAgent())
43862	var body io.Reader = nil
43863	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
43864	if err != nil {
43865		return nil, err
43866	}
43867	reqHeaders.Set("Content-Type", "application/json")
43868	c.urlParams_.Set("alt", alt)
43869	c.urlParams_.Set("prettyPrint", "false")
43870	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
43871	urls += "?" + c.urlParams_.Encode()
43872	req, err := http.NewRequest("POST", urls, body)
43873	if err != nil {
43874		return nil, err
43875	}
43876	req.Header = reqHeaders
43877	googleapi.Expand(req.URL, map[string]string{
43878		"profileId": strconv.FormatInt(c.profileId, 10),
43879	})
43880	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43881}
43882
43883// Do executes the "dfareporting.reports.insert" call.
43884// Exactly one of *Report or error will be non-nil. Any non-2xx status
43885// code is an error. Response headers are in either
43886// *Report.ServerResponse.Header or (if a response was returned at all)
43887// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
43888// check whether the returned error was because http.StatusNotModified
43889// was returned.
43890func (c *ReportsInsertCall) Do(opts ...googleapi.CallOption) (*Report, error) {
43891	gensupport.SetOptions(c.urlParams_, opts...)
43892	res, err := c.doRequest("json")
43893	if res != nil && res.StatusCode == http.StatusNotModified {
43894		if res.Body != nil {
43895			res.Body.Close()
43896		}
43897		return nil, &googleapi.Error{
43898			Code:   res.StatusCode,
43899			Header: res.Header,
43900		}
43901	}
43902	if err != nil {
43903		return nil, err
43904	}
43905	defer googleapi.CloseBody(res)
43906	if err := googleapi.CheckResponse(res); err != nil {
43907		return nil, err
43908	}
43909	ret := &Report{
43910		ServerResponse: googleapi.ServerResponse{
43911			Header:         res.Header,
43912			HTTPStatusCode: res.StatusCode,
43913		},
43914	}
43915	target := &ret
43916	if err := gensupport.DecodeResponse(target, res); err != nil {
43917		return nil, err
43918	}
43919	return ret, nil
43920	// {
43921	//   "description": "Creates a report.",
43922	//   "httpMethod": "POST",
43923	//   "id": "dfareporting.reports.insert",
43924	//   "parameterOrder": [
43925	//     "profileId"
43926	//   ],
43927	//   "parameters": {
43928	//     "profileId": {
43929	//       "description": "The DFA user profile ID.",
43930	//       "format": "int64",
43931	//       "location": "path",
43932	//       "required": true,
43933	//       "type": "string"
43934	//     }
43935	//   },
43936	//   "path": "userprofiles/{profileId}/reports",
43937	//   "request": {
43938	//     "$ref": "Report"
43939	//   },
43940	//   "response": {
43941	//     "$ref": "Report"
43942	//   },
43943	//   "scopes": [
43944	//     "https://www.googleapis.com/auth/dfareporting"
43945	//   ]
43946	// }
43947
43948}
43949
43950// method id "dfareporting.reports.list":
43951
43952type ReportsListCall struct {
43953	s            *Service
43954	profileId    int64
43955	urlParams_   gensupport.URLParams
43956	ifNoneMatch_ string
43957	ctx_         context.Context
43958	header_      http.Header
43959}
43960
43961// List: Retrieves list of reports.
43962func (r *ReportsService) List(profileId int64) *ReportsListCall {
43963	c := &ReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43964	c.profileId = profileId
43965	return c
43966}
43967
43968// MaxResults sets the optional parameter "maxResults": Maximum number
43969// of results to return.
43970func (c *ReportsListCall) MaxResults(maxResults int64) *ReportsListCall {
43971	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
43972	return c
43973}
43974
43975// PageToken sets the optional parameter "pageToken": The value of the
43976// nextToken from the previous result page.
43977func (c *ReportsListCall) PageToken(pageToken string) *ReportsListCall {
43978	c.urlParams_.Set("pageToken", pageToken)
43979	return c
43980}
43981
43982// Scope sets the optional parameter "scope": The scope that defines
43983// which results are returned.
43984//
43985// Possible values:
43986//   "ALL" - All reports in account.
43987//   "MINE" (default) - My reports.
43988func (c *ReportsListCall) Scope(scope string) *ReportsListCall {
43989	c.urlParams_.Set("scope", scope)
43990	return c
43991}
43992
43993// SortField sets the optional parameter "sortField": The field by which
43994// to sort the list.
43995//
43996// Possible values:
43997//   "ID" - Sort by report ID.
43998//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastModifiedTime' field.
43999//   "NAME" - Sort by name of reports.
44000func (c *ReportsListCall) SortField(sortField string) *ReportsListCall {
44001	c.urlParams_.Set("sortField", sortField)
44002	return c
44003}
44004
44005// SortOrder sets the optional parameter "sortOrder": Order of sorted
44006// results.
44007//
44008// Possible values:
44009//   "ASCENDING" - Ascending order.
44010//   "DESCENDING" (default) - Descending order.
44011func (c *ReportsListCall) SortOrder(sortOrder string) *ReportsListCall {
44012	c.urlParams_.Set("sortOrder", sortOrder)
44013	return c
44014}
44015
44016// Fields allows partial responses to be retrieved. See
44017// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44018// for more information.
44019func (c *ReportsListCall) Fields(s ...googleapi.Field) *ReportsListCall {
44020	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44021	return c
44022}
44023
44024// IfNoneMatch sets the optional parameter which makes the operation
44025// fail if the object's ETag matches the given value. This is useful for
44026// getting updates only after the object has changed since the last
44027// request. Use googleapi.IsNotModified to check whether the response
44028// error from Do is the result of In-None-Match.
44029func (c *ReportsListCall) IfNoneMatch(entityTag string) *ReportsListCall {
44030	c.ifNoneMatch_ = entityTag
44031	return c
44032}
44033
44034// Context sets the context to be used in this call's Do method. Any
44035// pending HTTP request will be aborted if the provided context is
44036// canceled.
44037func (c *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
44038	c.ctx_ = ctx
44039	return c
44040}
44041
44042// Header returns an http.Header that can be modified by the caller to
44043// add HTTP headers to the request.
44044func (c *ReportsListCall) Header() http.Header {
44045	if c.header_ == nil {
44046		c.header_ = make(http.Header)
44047	}
44048	return c.header_
44049}
44050
44051func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
44052	reqHeaders := make(http.Header)
44053	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
44054	for k, v := range c.header_ {
44055		reqHeaders[k] = v
44056	}
44057	reqHeaders.Set("User-Agent", c.s.userAgent())
44058	if c.ifNoneMatch_ != "" {
44059		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44060	}
44061	var body io.Reader = nil
44062	c.urlParams_.Set("alt", alt)
44063	c.urlParams_.Set("prettyPrint", "false")
44064	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
44065	urls += "?" + c.urlParams_.Encode()
44066	req, err := http.NewRequest("GET", urls, body)
44067	if err != nil {
44068		return nil, err
44069	}
44070	req.Header = reqHeaders
44071	googleapi.Expand(req.URL, map[string]string{
44072		"profileId": strconv.FormatInt(c.profileId, 10),
44073	})
44074	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44075}
44076
44077// Do executes the "dfareporting.reports.list" call.
44078// Exactly one of *ReportList or error will be non-nil. Any non-2xx
44079// status code is an error. Response headers are in either
44080// *ReportList.ServerResponse.Header or (if a response was returned at
44081// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44082// to check whether the returned error was because
44083// http.StatusNotModified was returned.
44084func (c *ReportsListCall) Do(opts ...googleapi.CallOption) (*ReportList, error) {
44085	gensupport.SetOptions(c.urlParams_, opts...)
44086	res, err := c.doRequest("json")
44087	if res != nil && res.StatusCode == http.StatusNotModified {
44088		if res.Body != nil {
44089			res.Body.Close()
44090		}
44091		return nil, &googleapi.Error{
44092			Code:   res.StatusCode,
44093			Header: res.Header,
44094		}
44095	}
44096	if err != nil {
44097		return nil, err
44098	}
44099	defer googleapi.CloseBody(res)
44100	if err := googleapi.CheckResponse(res); err != nil {
44101		return nil, err
44102	}
44103	ret := &ReportList{
44104		ServerResponse: googleapi.ServerResponse{
44105			Header:         res.Header,
44106			HTTPStatusCode: res.StatusCode,
44107		},
44108	}
44109	target := &ret
44110	if err := gensupport.DecodeResponse(target, res); err != nil {
44111		return nil, err
44112	}
44113	return ret, nil
44114	// {
44115	//   "description": "Retrieves list of reports.",
44116	//   "httpMethod": "GET",
44117	//   "id": "dfareporting.reports.list",
44118	//   "parameterOrder": [
44119	//     "profileId"
44120	//   ],
44121	//   "parameters": {
44122	//     "maxResults": {
44123	//       "default": "10",
44124	//       "description": "Maximum number of results to return.",
44125	//       "format": "int32",
44126	//       "location": "query",
44127	//       "maximum": "10",
44128	//       "minimum": "0",
44129	//       "type": "integer"
44130	//     },
44131	//     "pageToken": {
44132	//       "description": "The value of the nextToken from the previous result page.",
44133	//       "location": "query",
44134	//       "type": "string"
44135	//     },
44136	//     "profileId": {
44137	//       "description": "The DFA user profile ID.",
44138	//       "format": "int64",
44139	//       "location": "path",
44140	//       "required": true,
44141	//       "type": "string"
44142	//     },
44143	//     "scope": {
44144	//       "default": "MINE",
44145	//       "description": "The scope that defines which results are returned.",
44146	//       "enum": [
44147	//         "ALL",
44148	//         "MINE"
44149	//       ],
44150	//       "enumDescriptions": [
44151	//         "All reports in account.",
44152	//         "My reports."
44153	//       ],
44154	//       "location": "query",
44155	//       "type": "string"
44156	//     },
44157	//     "sortField": {
44158	//       "default": "LAST_MODIFIED_TIME",
44159	//       "description": "The field by which to sort the list.",
44160	//       "enum": [
44161	//         "ID",
44162	//         "LAST_MODIFIED_TIME",
44163	//         "NAME"
44164	//       ],
44165	//       "enumDescriptions": [
44166	//         "Sort by report ID.",
44167	//         "Sort by 'lastModifiedTime' field.",
44168	//         "Sort by name of reports."
44169	//       ],
44170	//       "location": "query",
44171	//       "type": "string"
44172	//     },
44173	//     "sortOrder": {
44174	//       "default": "DESCENDING",
44175	//       "description": "Order of sorted results.",
44176	//       "enum": [
44177	//         "ASCENDING",
44178	//         "DESCENDING"
44179	//       ],
44180	//       "enumDescriptions": [
44181	//         "Ascending order.",
44182	//         "Descending order."
44183	//       ],
44184	//       "location": "query",
44185	//       "type": "string"
44186	//     }
44187	//   },
44188	//   "path": "userprofiles/{profileId}/reports",
44189	//   "response": {
44190	//     "$ref": "ReportList"
44191	//   },
44192	//   "scopes": [
44193	//     "https://www.googleapis.com/auth/dfareporting"
44194	//   ]
44195	// }
44196
44197}
44198
44199// Pages invokes f for each page of results.
44200// A non-nil error returned from f will halt the iteration.
44201// The provided context supersedes any context provided to the Context method.
44202func (c *ReportsListCall) Pages(ctx context.Context, f func(*ReportList) error) error {
44203	c.ctx_ = ctx
44204	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
44205	for {
44206		x, err := c.Do()
44207		if err != nil {
44208			return err
44209		}
44210		if err := f(x); err != nil {
44211			return err
44212		}
44213		if x.NextPageToken == "" {
44214			return nil
44215		}
44216		c.PageToken(x.NextPageToken)
44217	}
44218}
44219
44220// method id "dfareporting.reports.patch":
44221
44222type ReportsPatchCall struct {
44223	s          *Service
44224	profileId  int64
44225	reportId   int64
44226	report     *Report
44227	urlParams_ gensupport.URLParams
44228	ctx_       context.Context
44229	header_    http.Header
44230}
44231
44232// Patch: Updates a report. This method supports patch semantics.
44233func (r *ReportsService) Patch(profileId int64, reportId int64, report *Report) *ReportsPatchCall {
44234	c := &ReportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44235	c.profileId = profileId
44236	c.reportId = reportId
44237	c.report = report
44238	return c
44239}
44240
44241// Fields allows partial responses to be retrieved. See
44242// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44243// for more information.
44244func (c *ReportsPatchCall) Fields(s ...googleapi.Field) *ReportsPatchCall {
44245	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44246	return c
44247}
44248
44249// Context sets the context to be used in this call's Do method. Any
44250// pending HTTP request will be aborted if the provided context is
44251// canceled.
44252func (c *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
44253	c.ctx_ = ctx
44254	return c
44255}
44256
44257// Header returns an http.Header that can be modified by the caller to
44258// add HTTP headers to the request.
44259func (c *ReportsPatchCall) Header() http.Header {
44260	if c.header_ == nil {
44261		c.header_ = make(http.Header)
44262	}
44263	return c.header_
44264}
44265
44266func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
44267	reqHeaders := make(http.Header)
44268	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
44269	for k, v := range c.header_ {
44270		reqHeaders[k] = v
44271	}
44272	reqHeaders.Set("User-Agent", c.s.userAgent())
44273	var body io.Reader = nil
44274	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44275	if err != nil {
44276		return nil, err
44277	}
44278	reqHeaders.Set("Content-Type", "application/json")
44279	c.urlParams_.Set("alt", alt)
44280	c.urlParams_.Set("prettyPrint", "false")
44281	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44282	urls += "?" + c.urlParams_.Encode()
44283	req, err := http.NewRequest("PATCH", urls, body)
44284	if err != nil {
44285		return nil, err
44286	}
44287	req.Header = reqHeaders
44288	googleapi.Expand(req.URL, map[string]string{
44289		"profileId": strconv.FormatInt(c.profileId, 10),
44290		"reportId":  strconv.FormatInt(c.reportId, 10),
44291	})
44292	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44293}
44294
44295// Do executes the "dfareporting.reports.patch" call.
44296// Exactly one of *Report or error will be non-nil. Any non-2xx status
44297// code is an error. Response headers are in either
44298// *Report.ServerResponse.Header or (if a response was returned at all)
44299// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44300// check whether the returned error was because http.StatusNotModified
44301// was returned.
44302func (c *ReportsPatchCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44303	gensupport.SetOptions(c.urlParams_, opts...)
44304	res, err := c.doRequest("json")
44305	if res != nil && res.StatusCode == http.StatusNotModified {
44306		if res.Body != nil {
44307			res.Body.Close()
44308		}
44309		return nil, &googleapi.Error{
44310			Code:   res.StatusCode,
44311			Header: res.Header,
44312		}
44313	}
44314	if err != nil {
44315		return nil, err
44316	}
44317	defer googleapi.CloseBody(res)
44318	if err := googleapi.CheckResponse(res); err != nil {
44319		return nil, err
44320	}
44321	ret := &Report{
44322		ServerResponse: googleapi.ServerResponse{
44323			Header:         res.Header,
44324			HTTPStatusCode: res.StatusCode,
44325		},
44326	}
44327	target := &ret
44328	if err := gensupport.DecodeResponse(target, res); err != nil {
44329		return nil, err
44330	}
44331	return ret, nil
44332	// {
44333	//   "description": "Updates a report. This method supports patch semantics.",
44334	//   "httpMethod": "PATCH",
44335	//   "id": "dfareporting.reports.patch",
44336	//   "parameterOrder": [
44337	//     "profileId",
44338	//     "reportId"
44339	//   ],
44340	//   "parameters": {
44341	//     "profileId": {
44342	//       "description": "The DFA user profile ID.",
44343	//       "format": "int64",
44344	//       "location": "path",
44345	//       "required": true,
44346	//       "type": "string"
44347	//     },
44348	//     "reportId": {
44349	//       "description": "The ID of the report.",
44350	//       "format": "int64",
44351	//       "location": "path",
44352	//       "required": true,
44353	//       "type": "string"
44354	//     }
44355	//   },
44356	//   "path": "userprofiles/{profileId}/reports/{reportId}",
44357	//   "request": {
44358	//     "$ref": "Report"
44359	//   },
44360	//   "response": {
44361	//     "$ref": "Report"
44362	//   },
44363	//   "scopes": [
44364	//     "https://www.googleapis.com/auth/dfareporting"
44365	//   ]
44366	// }
44367
44368}
44369
44370// method id "dfareporting.reports.run":
44371
44372type ReportsRunCall struct {
44373	s          *Service
44374	profileId  int64
44375	reportId   int64
44376	urlParams_ gensupport.URLParams
44377	ctx_       context.Context
44378	header_    http.Header
44379}
44380
44381// Run: Runs a report.
44382func (r *ReportsService) Run(profileId int64, reportId int64) *ReportsRunCall {
44383	c := &ReportsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44384	c.profileId = profileId
44385	c.reportId = reportId
44386	return c
44387}
44388
44389// Synchronous sets the optional parameter "synchronous": If set and
44390// true, tries to run the report synchronously.
44391func (c *ReportsRunCall) Synchronous(synchronous bool) *ReportsRunCall {
44392	c.urlParams_.Set("synchronous", fmt.Sprint(synchronous))
44393	return c
44394}
44395
44396// Fields allows partial responses to be retrieved. See
44397// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44398// for more information.
44399func (c *ReportsRunCall) Fields(s ...googleapi.Field) *ReportsRunCall {
44400	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44401	return c
44402}
44403
44404// Context sets the context to be used in this call's Do method. Any
44405// pending HTTP request will be aborted if the provided context is
44406// canceled.
44407func (c *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
44408	c.ctx_ = ctx
44409	return c
44410}
44411
44412// Header returns an http.Header that can be modified by the caller to
44413// add HTTP headers to the request.
44414func (c *ReportsRunCall) Header() http.Header {
44415	if c.header_ == nil {
44416		c.header_ = make(http.Header)
44417	}
44418	return c.header_
44419}
44420
44421func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
44422	reqHeaders := make(http.Header)
44423	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
44424	for k, v := range c.header_ {
44425		reqHeaders[k] = v
44426	}
44427	reqHeaders.Set("User-Agent", c.s.userAgent())
44428	var body io.Reader = nil
44429	c.urlParams_.Set("alt", alt)
44430	c.urlParams_.Set("prettyPrint", "false")
44431	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/run")
44432	urls += "?" + c.urlParams_.Encode()
44433	req, err := http.NewRequest("POST", urls, body)
44434	if err != nil {
44435		return nil, err
44436	}
44437	req.Header = reqHeaders
44438	googleapi.Expand(req.URL, map[string]string{
44439		"profileId": strconv.FormatInt(c.profileId, 10),
44440		"reportId":  strconv.FormatInt(c.reportId, 10),
44441	})
44442	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44443}
44444
44445// Do executes the "dfareporting.reports.run" call.
44446// Exactly one of *File or error will be non-nil. Any non-2xx status
44447// code is an error. Response headers are in either
44448// *File.ServerResponse.Header or (if a response was returned at all) in
44449// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44450// whether the returned error was because http.StatusNotModified was
44451// returned.
44452func (c *ReportsRunCall) Do(opts ...googleapi.CallOption) (*File, error) {
44453	gensupport.SetOptions(c.urlParams_, opts...)
44454	res, err := c.doRequest("json")
44455	if res != nil && res.StatusCode == http.StatusNotModified {
44456		if res.Body != nil {
44457			res.Body.Close()
44458		}
44459		return nil, &googleapi.Error{
44460			Code:   res.StatusCode,
44461			Header: res.Header,
44462		}
44463	}
44464	if err != nil {
44465		return nil, err
44466	}
44467	defer googleapi.CloseBody(res)
44468	if err := googleapi.CheckResponse(res); err != nil {
44469		return nil, err
44470	}
44471	ret := &File{
44472		ServerResponse: googleapi.ServerResponse{
44473			Header:         res.Header,
44474			HTTPStatusCode: res.StatusCode,
44475		},
44476	}
44477	target := &ret
44478	if err := gensupport.DecodeResponse(target, res); err != nil {
44479		return nil, err
44480	}
44481	return ret, nil
44482	// {
44483	//   "description": "Runs a report.",
44484	//   "httpMethod": "POST",
44485	//   "id": "dfareporting.reports.run",
44486	//   "parameterOrder": [
44487	//     "profileId",
44488	//     "reportId"
44489	//   ],
44490	//   "parameters": {
44491	//     "profileId": {
44492	//       "description": "The DFA profile ID.",
44493	//       "format": "int64",
44494	//       "location": "path",
44495	//       "required": true,
44496	//       "type": "string"
44497	//     },
44498	//     "reportId": {
44499	//       "description": "The ID of the report.",
44500	//       "format": "int64",
44501	//       "location": "path",
44502	//       "required": true,
44503	//       "type": "string"
44504	//     },
44505	//     "synchronous": {
44506	//       "default": "false",
44507	//       "description": "If set and true, tries to run the report synchronously.",
44508	//       "location": "query",
44509	//       "type": "boolean"
44510	//     }
44511	//   },
44512	//   "path": "userprofiles/{profileId}/reports/{reportId}/run",
44513	//   "response": {
44514	//     "$ref": "File"
44515	//   },
44516	//   "scopes": [
44517	//     "https://www.googleapis.com/auth/dfareporting"
44518	//   ]
44519	// }
44520
44521}
44522
44523// method id "dfareporting.reports.update":
44524
44525type ReportsUpdateCall struct {
44526	s          *Service
44527	profileId  int64
44528	reportId   int64
44529	report     *Report
44530	urlParams_ gensupport.URLParams
44531	ctx_       context.Context
44532	header_    http.Header
44533}
44534
44535// Update: Updates a report.
44536func (r *ReportsService) Update(profileId int64, reportId int64, report *Report) *ReportsUpdateCall {
44537	c := &ReportsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44538	c.profileId = profileId
44539	c.reportId = reportId
44540	c.report = report
44541	return c
44542}
44543
44544// Fields allows partial responses to be retrieved. See
44545// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44546// for more information.
44547func (c *ReportsUpdateCall) Fields(s ...googleapi.Field) *ReportsUpdateCall {
44548	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44549	return c
44550}
44551
44552// Context sets the context to be used in this call's Do method. Any
44553// pending HTTP request will be aborted if the provided context is
44554// canceled.
44555func (c *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
44556	c.ctx_ = ctx
44557	return c
44558}
44559
44560// Header returns an http.Header that can be modified by the caller to
44561// add HTTP headers to the request.
44562func (c *ReportsUpdateCall) Header() http.Header {
44563	if c.header_ == nil {
44564		c.header_ = make(http.Header)
44565	}
44566	return c.header_
44567}
44568
44569func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
44570	reqHeaders := make(http.Header)
44571	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
44572	for k, v := range c.header_ {
44573		reqHeaders[k] = v
44574	}
44575	reqHeaders.Set("User-Agent", c.s.userAgent())
44576	var body io.Reader = nil
44577	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44578	if err != nil {
44579		return nil, err
44580	}
44581	reqHeaders.Set("Content-Type", "application/json")
44582	c.urlParams_.Set("alt", alt)
44583	c.urlParams_.Set("prettyPrint", "false")
44584	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44585	urls += "?" + c.urlParams_.Encode()
44586	req, err := http.NewRequest("PUT", 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.update" call.
44599// Exactly one of *Report or error will be non-nil. Any non-2xx status
44600// code is an error. Response headers are in either
44601// *Report.ServerResponse.Header or (if a response was returned at all)
44602// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44603// check whether the returned error was because http.StatusNotModified
44604// was returned.
44605func (c *ReportsUpdateCall) Do(opts ...googleapi.CallOption) (*Report, 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 := &Report{
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": "Updates a report.",
44637	//   "httpMethod": "PUT",
44638	//   "id": "dfareporting.reports.update",
44639	//   "parameterOrder": [
44640	//     "profileId",
44641	//     "reportId"
44642	//   ],
44643	//   "parameters": {
44644	//     "profileId": {
44645	//       "description": "The DFA user 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	//   },
44659	//   "path": "userprofiles/{profileId}/reports/{reportId}",
44660	//   "request": {
44661	//     "$ref": "Report"
44662	//   },
44663	//   "response": {
44664	//     "$ref": "Report"
44665	//   },
44666	//   "scopes": [
44667	//     "https://www.googleapis.com/auth/dfareporting"
44668	//   ]
44669	// }
44670
44671}
44672
44673// method id "dfareporting.reports.compatibleFields.query":
44674
44675type ReportsCompatibleFieldsQueryCall struct {
44676	s          *Service
44677	profileId  int64
44678	report     *Report
44679	urlParams_ gensupport.URLParams
44680	ctx_       context.Context
44681	header_    http.Header
44682}
44683
44684// Query: Returns the fields that are compatible to be selected in the
44685// respective sections of a report criteria, given the fields already
44686// selected in the input report and user permissions.
44687func (r *ReportsCompatibleFieldsService) Query(profileId int64, report *Report) *ReportsCompatibleFieldsQueryCall {
44688	c := &ReportsCompatibleFieldsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44689	c.profileId = profileId
44690	c.report = report
44691	return c
44692}
44693
44694// Fields allows partial responses to be retrieved. See
44695// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44696// for more information.
44697func (c *ReportsCompatibleFieldsQueryCall) Fields(s ...googleapi.Field) *ReportsCompatibleFieldsQueryCall {
44698	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44699	return c
44700}
44701
44702// Context sets the context to be used in this call's Do method. Any
44703// pending HTTP request will be aborted if the provided context is
44704// canceled.
44705func (c *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
44706	c.ctx_ = ctx
44707	return c
44708}
44709
44710// Header returns an http.Header that can be modified by the caller to
44711// add HTTP headers to the request.
44712func (c *ReportsCompatibleFieldsQueryCall) Header() http.Header {
44713	if c.header_ == nil {
44714		c.header_ = make(http.Header)
44715	}
44716	return c.header_
44717}
44718
44719func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
44720	reqHeaders := make(http.Header)
44721	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
44722	for k, v := range c.header_ {
44723		reqHeaders[k] = v
44724	}
44725	reqHeaders.Set("User-Agent", c.s.userAgent())
44726	var body io.Reader = nil
44727	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44728	if err != nil {
44729		return nil, err
44730	}
44731	reqHeaders.Set("Content-Type", "application/json")
44732	c.urlParams_.Set("alt", alt)
44733	c.urlParams_.Set("prettyPrint", "false")
44734	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/compatiblefields/query")
44735	urls += "?" + c.urlParams_.Encode()
44736	req, err := http.NewRequest("POST", urls, body)
44737	if err != nil {
44738		return nil, err
44739	}
44740	req.Header = reqHeaders
44741	googleapi.Expand(req.URL, map[string]string{
44742		"profileId": strconv.FormatInt(c.profileId, 10),
44743	})
44744	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44745}
44746
44747// Do executes the "dfareporting.reports.compatibleFields.query" call.
44748// Exactly one of *CompatibleFields or error will be non-nil. Any
44749// non-2xx status code is an error. Response headers are in either
44750// *CompatibleFields.ServerResponse.Header or (if a response was
44751// returned at all) in error.(*googleapi.Error).Header. Use
44752// googleapi.IsNotModified to check whether the returned error was
44753// because http.StatusNotModified was returned.
44754func (c *ReportsCompatibleFieldsQueryCall) Do(opts ...googleapi.CallOption) (*CompatibleFields, error) {
44755	gensupport.SetOptions(c.urlParams_, opts...)
44756	res, err := c.doRequest("json")
44757	if res != nil && res.StatusCode == http.StatusNotModified {
44758		if res.Body != nil {
44759			res.Body.Close()
44760		}
44761		return nil, &googleapi.Error{
44762			Code:   res.StatusCode,
44763			Header: res.Header,
44764		}
44765	}
44766	if err != nil {
44767		return nil, err
44768	}
44769	defer googleapi.CloseBody(res)
44770	if err := googleapi.CheckResponse(res); err != nil {
44771		return nil, err
44772	}
44773	ret := &CompatibleFields{
44774		ServerResponse: googleapi.ServerResponse{
44775			Header:         res.Header,
44776			HTTPStatusCode: res.StatusCode,
44777		},
44778	}
44779	target := &ret
44780	if err := gensupport.DecodeResponse(target, res); err != nil {
44781		return nil, err
44782	}
44783	return ret, nil
44784	// {
44785	//   "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.",
44786	//   "httpMethod": "POST",
44787	//   "id": "dfareporting.reports.compatibleFields.query",
44788	//   "parameterOrder": [
44789	//     "profileId"
44790	//   ],
44791	//   "parameters": {
44792	//     "profileId": {
44793	//       "description": "The DFA user profile ID.",
44794	//       "format": "int64",
44795	//       "location": "path",
44796	//       "required": true,
44797	//       "type": "string"
44798	//     }
44799	//   },
44800	//   "path": "userprofiles/{profileId}/reports/compatiblefields/query",
44801	//   "request": {
44802	//     "$ref": "Report"
44803	//   },
44804	//   "response": {
44805	//     "$ref": "CompatibleFields"
44806	//   },
44807	//   "scopes": [
44808	//     "https://www.googleapis.com/auth/dfareporting"
44809	//   ]
44810	// }
44811
44812}
44813
44814// method id "dfareporting.reports.files.get":
44815
44816type ReportsFilesGetCall struct {
44817	s            *Service
44818	profileId    int64
44819	reportId     int64
44820	fileId       int64
44821	urlParams_   gensupport.URLParams
44822	ifNoneMatch_ string
44823	ctx_         context.Context
44824	header_      http.Header
44825}
44826
44827// Get: Retrieves a report file. This method supports media download.
44828func (r *ReportsFilesService) Get(profileId int64, reportId int64, fileId int64) *ReportsFilesGetCall {
44829	c := &ReportsFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44830	c.profileId = profileId
44831	c.reportId = reportId
44832	c.fileId = fileId
44833	return c
44834}
44835
44836// Fields allows partial responses to be retrieved. See
44837// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44838// for more information.
44839func (c *ReportsFilesGetCall) Fields(s ...googleapi.Field) *ReportsFilesGetCall {
44840	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44841	return c
44842}
44843
44844// IfNoneMatch sets the optional parameter which makes the operation
44845// fail if the object's ETag matches the given value. This is useful for
44846// getting updates only after the object has changed since the last
44847// request. Use googleapi.IsNotModified to check whether the response
44848// error from Do is the result of In-None-Match.
44849func (c *ReportsFilesGetCall) IfNoneMatch(entityTag string) *ReportsFilesGetCall {
44850	c.ifNoneMatch_ = entityTag
44851	return c
44852}
44853
44854// Context sets the context to be used in this call's Do and Download
44855// methods. Any pending HTTP request will be aborted if the provided
44856// context is canceled.
44857func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
44858	c.ctx_ = ctx
44859	return c
44860}
44861
44862// Header returns an http.Header that can be modified by the caller to
44863// add HTTP headers to the request.
44864func (c *ReportsFilesGetCall) Header() http.Header {
44865	if c.header_ == nil {
44866		c.header_ = make(http.Header)
44867	}
44868	return c.header_
44869}
44870
44871func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
44872	reqHeaders := make(http.Header)
44873	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
44874	for k, v := range c.header_ {
44875		reqHeaders[k] = v
44876	}
44877	reqHeaders.Set("User-Agent", c.s.userAgent())
44878	if c.ifNoneMatch_ != "" {
44879		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44880	}
44881	var body io.Reader = nil
44882	c.urlParams_.Set("alt", alt)
44883	c.urlParams_.Set("prettyPrint", "false")
44884	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files/{fileId}")
44885	urls += "?" + c.urlParams_.Encode()
44886	req, err := http.NewRequest("GET", urls, body)
44887	if err != nil {
44888		return nil, err
44889	}
44890	req.Header = reqHeaders
44891	googleapi.Expand(req.URL, map[string]string{
44892		"profileId": strconv.FormatInt(c.profileId, 10),
44893		"reportId":  strconv.FormatInt(c.reportId, 10),
44894		"fileId":    strconv.FormatInt(c.fileId, 10),
44895	})
44896	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44897}
44898
44899// Download fetches the API endpoint's "media" value, instead of the normal
44900// API response value. If the returned error is nil, the Response is guaranteed to
44901// have a 2xx status code. Callers must close the Response.Body as usual.
44902func (c *ReportsFilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
44903	gensupport.SetOptions(c.urlParams_, opts...)
44904	res, err := c.doRequest("media")
44905	if err != nil {
44906		return nil, err
44907	}
44908	if err := googleapi.CheckMediaResponse(res); err != nil {
44909		res.Body.Close()
44910		return nil, err
44911	}
44912	return res, nil
44913}
44914
44915// Do executes the "dfareporting.reports.files.get" call.
44916// Exactly one of *File or error will be non-nil. Any non-2xx status
44917// code is an error. Response headers are in either
44918// *File.ServerResponse.Header or (if a response was returned at all) in
44919// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44920// whether the returned error was because http.StatusNotModified was
44921// returned.
44922func (c *ReportsFilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
44923	gensupport.SetOptions(c.urlParams_, opts...)
44924	res, err := c.doRequest("json")
44925	if res != nil && res.StatusCode == http.StatusNotModified {
44926		if res.Body != nil {
44927			res.Body.Close()
44928		}
44929		return nil, &googleapi.Error{
44930			Code:   res.StatusCode,
44931			Header: res.Header,
44932		}
44933	}
44934	if err != nil {
44935		return nil, err
44936	}
44937	defer googleapi.CloseBody(res)
44938	if err := googleapi.CheckResponse(res); err != nil {
44939		return nil, err
44940	}
44941	ret := &File{
44942		ServerResponse: googleapi.ServerResponse{
44943			Header:         res.Header,
44944			HTTPStatusCode: res.StatusCode,
44945		},
44946	}
44947	target := &ret
44948	if err := gensupport.DecodeResponse(target, res); err != nil {
44949		return nil, err
44950	}
44951	return ret, nil
44952	// {
44953	//   "description": "Retrieves a report file. This method supports media download.",
44954	//   "httpMethod": "GET",
44955	//   "id": "dfareporting.reports.files.get",
44956	//   "parameterOrder": [
44957	//     "profileId",
44958	//     "reportId",
44959	//     "fileId"
44960	//   ],
44961	//   "parameters": {
44962	//     "fileId": {
44963	//       "description": "The ID of the report file.",
44964	//       "format": "int64",
44965	//       "location": "path",
44966	//       "required": true,
44967	//       "type": "string"
44968	//     },
44969	//     "profileId": {
44970	//       "description": "The DFA profile ID.",
44971	//       "format": "int64",
44972	//       "location": "path",
44973	//       "required": true,
44974	//       "type": "string"
44975	//     },
44976	//     "reportId": {
44977	//       "description": "The ID of the report.",
44978	//       "format": "int64",
44979	//       "location": "path",
44980	//       "required": true,
44981	//       "type": "string"
44982	//     }
44983	//   },
44984	//   "path": "userprofiles/{profileId}/reports/{reportId}/files/{fileId}",
44985	//   "response": {
44986	//     "$ref": "File"
44987	//   },
44988	//   "scopes": [
44989	//     "https://www.googleapis.com/auth/dfareporting"
44990	//   ],
44991	//   "supportsMediaDownload": true
44992	// }
44993
44994}
44995
44996// method id "dfareporting.reports.files.list":
44997
44998type ReportsFilesListCall struct {
44999	s            *Service
45000	profileId    int64
45001	reportId     int64
45002	urlParams_   gensupport.URLParams
45003	ifNoneMatch_ string
45004	ctx_         context.Context
45005	header_      http.Header
45006}
45007
45008// List: Lists files for a report.
45009func (r *ReportsFilesService) List(profileId int64, reportId int64) *ReportsFilesListCall {
45010	c := &ReportsFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45011	c.profileId = profileId
45012	c.reportId = reportId
45013	return c
45014}
45015
45016// MaxResults sets the optional parameter "maxResults": Maximum number
45017// of results to return.
45018func (c *ReportsFilesListCall) MaxResults(maxResults int64) *ReportsFilesListCall {
45019	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45020	return c
45021}
45022
45023// PageToken sets the optional parameter "pageToken": The value of the
45024// nextToken from the previous result page.
45025func (c *ReportsFilesListCall) PageToken(pageToken string) *ReportsFilesListCall {
45026	c.urlParams_.Set("pageToken", pageToken)
45027	return c
45028}
45029
45030// SortField sets the optional parameter "sortField": The field by which
45031// to sort the list.
45032//
45033// Possible values:
45034//   "ID" - Sort by file ID.
45035//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
45036func (c *ReportsFilesListCall) SortField(sortField string) *ReportsFilesListCall {
45037	c.urlParams_.Set("sortField", sortField)
45038	return c
45039}
45040
45041// SortOrder sets the optional parameter "sortOrder": Order of sorted
45042// results.
45043//
45044// Possible values:
45045//   "ASCENDING" - Ascending order.
45046//   "DESCENDING" (default) - Descending order.
45047func (c *ReportsFilesListCall) SortOrder(sortOrder string) *ReportsFilesListCall {
45048	c.urlParams_.Set("sortOrder", sortOrder)
45049	return c
45050}
45051
45052// Fields allows partial responses to be retrieved. See
45053// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45054// for more information.
45055func (c *ReportsFilesListCall) Fields(s ...googleapi.Field) *ReportsFilesListCall {
45056	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45057	return c
45058}
45059
45060// IfNoneMatch sets the optional parameter which makes the operation
45061// fail if the object's ETag matches the given value. This is useful for
45062// getting updates only after the object has changed since the last
45063// request. Use googleapi.IsNotModified to check whether the response
45064// error from Do is the result of In-None-Match.
45065func (c *ReportsFilesListCall) IfNoneMatch(entityTag string) *ReportsFilesListCall {
45066	c.ifNoneMatch_ = entityTag
45067	return c
45068}
45069
45070// Context sets the context to be used in this call's Do method. Any
45071// pending HTTP request will be aborted if the provided context is
45072// canceled.
45073func (c *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
45074	c.ctx_ = ctx
45075	return c
45076}
45077
45078// Header returns an http.Header that can be modified by the caller to
45079// add HTTP headers to the request.
45080func (c *ReportsFilesListCall) Header() http.Header {
45081	if c.header_ == nil {
45082		c.header_ = make(http.Header)
45083	}
45084	return c.header_
45085}
45086
45087func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
45088	reqHeaders := make(http.Header)
45089	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
45090	for k, v := range c.header_ {
45091		reqHeaders[k] = v
45092	}
45093	reqHeaders.Set("User-Agent", c.s.userAgent())
45094	if c.ifNoneMatch_ != "" {
45095		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45096	}
45097	var body io.Reader = nil
45098	c.urlParams_.Set("alt", alt)
45099	c.urlParams_.Set("prettyPrint", "false")
45100	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files")
45101	urls += "?" + c.urlParams_.Encode()
45102	req, err := http.NewRequest("GET", urls, body)
45103	if err != nil {
45104		return nil, err
45105	}
45106	req.Header = reqHeaders
45107	googleapi.Expand(req.URL, map[string]string{
45108		"profileId": strconv.FormatInt(c.profileId, 10),
45109		"reportId":  strconv.FormatInt(c.reportId, 10),
45110	})
45111	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45112}
45113
45114// Do executes the "dfareporting.reports.files.list" call.
45115// Exactly one of *FileList or error will be non-nil. Any non-2xx status
45116// code is an error. Response headers are in either
45117// *FileList.ServerResponse.Header or (if a response was returned at
45118// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
45119// to check whether the returned error was because
45120// http.StatusNotModified was returned.
45121func (c *ReportsFilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
45122	gensupport.SetOptions(c.urlParams_, opts...)
45123	res, err := c.doRequest("json")
45124	if res != nil && res.StatusCode == http.StatusNotModified {
45125		if res.Body != nil {
45126			res.Body.Close()
45127		}
45128		return nil, &googleapi.Error{
45129			Code:   res.StatusCode,
45130			Header: res.Header,
45131		}
45132	}
45133	if err != nil {
45134		return nil, err
45135	}
45136	defer googleapi.CloseBody(res)
45137	if err := googleapi.CheckResponse(res); err != nil {
45138		return nil, err
45139	}
45140	ret := &FileList{
45141		ServerResponse: googleapi.ServerResponse{
45142			Header:         res.Header,
45143			HTTPStatusCode: res.StatusCode,
45144		},
45145	}
45146	target := &ret
45147	if err := gensupport.DecodeResponse(target, res); err != nil {
45148		return nil, err
45149	}
45150	return ret, nil
45151	// {
45152	//   "description": "Lists files for a report.",
45153	//   "httpMethod": "GET",
45154	//   "id": "dfareporting.reports.files.list",
45155	//   "parameterOrder": [
45156	//     "profileId",
45157	//     "reportId"
45158	//   ],
45159	//   "parameters": {
45160	//     "maxResults": {
45161	//       "default": "10",
45162	//       "description": "Maximum number of results to return.",
45163	//       "format": "int32",
45164	//       "location": "query",
45165	//       "maximum": "10",
45166	//       "minimum": "0",
45167	//       "type": "integer"
45168	//     },
45169	//     "pageToken": {
45170	//       "description": "The value of the nextToken from the previous result page.",
45171	//       "location": "query",
45172	//       "type": "string"
45173	//     },
45174	//     "profileId": {
45175	//       "description": "The DFA profile ID.",
45176	//       "format": "int64",
45177	//       "location": "path",
45178	//       "required": true,
45179	//       "type": "string"
45180	//     },
45181	//     "reportId": {
45182	//       "description": "The ID of the parent report.",
45183	//       "format": "int64",
45184	//       "location": "path",
45185	//       "required": true,
45186	//       "type": "string"
45187	//     },
45188	//     "sortField": {
45189	//       "default": "LAST_MODIFIED_TIME",
45190	//       "description": "The field by which to sort the list.",
45191	//       "enum": [
45192	//         "ID",
45193	//         "LAST_MODIFIED_TIME"
45194	//       ],
45195	//       "enumDescriptions": [
45196	//         "Sort by file ID.",
45197	//         "Sort by 'lastmodifiedAt' field."
45198	//       ],
45199	//       "location": "query",
45200	//       "type": "string"
45201	//     },
45202	//     "sortOrder": {
45203	//       "default": "DESCENDING",
45204	//       "description": "Order of sorted results.",
45205	//       "enum": [
45206	//         "ASCENDING",
45207	//         "DESCENDING"
45208	//       ],
45209	//       "enumDescriptions": [
45210	//         "Ascending order.",
45211	//         "Descending order."
45212	//       ],
45213	//       "location": "query",
45214	//       "type": "string"
45215	//     }
45216	//   },
45217	//   "path": "userprofiles/{profileId}/reports/{reportId}/files",
45218	//   "response": {
45219	//     "$ref": "FileList"
45220	//   },
45221	//   "scopes": [
45222	//     "https://www.googleapis.com/auth/dfareporting"
45223	//   ]
45224	// }
45225
45226}
45227
45228// Pages invokes f for each page of results.
45229// A non-nil error returned from f will halt the iteration.
45230// The provided context supersedes any context provided to the Context method.
45231func (c *ReportsFilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
45232	c.ctx_ = ctx
45233	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45234	for {
45235		x, err := c.Do()
45236		if err != nil {
45237			return err
45238		}
45239		if err := f(x); err != nil {
45240			return err
45241		}
45242		if x.NextPageToken == "" {
45243			return nil
45244		}
45245		c.PageToken(x.NextPageToken)
45246	}
45247}
45248
45249// method id "dfareporting.sites.get":
45250
45251type SitesGetCall struct {
45252	s            *Service
45253	profileId    int64
45254	id           int64
45255	urlParams_   gensupport.URLParams
45256	ifNoneMatch_ string
45257	ctx_         context.Context
45258	header_      http.Header
45259}
45260
45261// Get: Gets one site by ID.
45262func (r *SitesService) Get(profileId int64, id int64) *SitesGetCall {
45263	c := &SitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45264	c.profileId = profileId
45265	c.id = id
45266	return c
45267}
45268
45269// Fields allows partial responses to be retrieved. See
45270// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45271// for more information.
45272func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall {
45273	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45274	return c
45275}
45276
45277// IfNoneMatch sets the optional parameter which makes the operation
45278// fail if the object's ETag matches the given value. This is useful for
45279// getting updates only after the object has changed since the last
45280// request. Use googleapi.IsNotModified to check whether the response
45281// error from Do is the result of In-None-Match.
45282func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall {
45283	c.ifNoneMatch_ = entityTag
45284	return c
45285}
45286
45287// Context sets the context to be used in this call's Do method. Any
45288// pending HTTP request will be aborted if the provided context is
45289// canceled.
45290func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
45291	c.ctx_ = ctx
45292	return c
45293}
45294
45295// Header returns an http.Header that can be modified by the caller to
45296// add HTTP headers to the request.
45297func (c *SitesGetCall) Header() http.Header {
45298	if c.header_ == nil {
45299		c.header_ = make(http.Header)
45300	}
45301	return c.header_
45302}
45303
45304func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
45305	reqHeaders := make(http.Header)
45306	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
45307	for k, v := range c.header_ {
45308		reqHeaders[k] = v
45309	}
45310	reqHeaders.Set("User-Agent", c.s.userAgent())
45311	if c.ifNoneMatch_ != "" {
45312		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45313	}
45314	var body io.Reader = nil
45315	c.urlParams_.Set("alt", alt)
45316	c.urlParams_.Set("prettyPrint", "false")
45317	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites/{id}")
45318	urls += "?" + c.urlParams_.Encode()
45319	req, err := http.NewRequest("GET", urls, body)
45320	if err != nil {
45321		return nil, err
45322	}
45323	req.Header = reqHeaders
45324	googleapi.Expand(req.URL, map[string]string{
45325		"profileId": strconv.FormatInt(c.profileId, 10),
45326		"id":        strconv.FormatInt(c.id, 10),
45327	})
45328	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45329}
45330
45331// Do executes the "dfareporting.sites.get" call.
45332// Exactly one of *Site or error will be non-nil. Any non-2xx status
45333// code is an error. Response headers are in either
45334// *Site.ServerResponse.Header or (if a response was returned at all) in
45335// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45336// whether the returned error was because http.StatusNotModified was
45337// returned.
45338func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45339	gensupport.SetOptions(c.urlParams_, opts...)
45340	res, err := c.doRequest("json")
45341	if res != nil && res.StatusCode == http.StatusNotModified {
45342		if res.Body != nil {
45343			res.Body.Close()
45344		}
45345		return nil, &googleapi.Error{
45346			Code:   res.StatusCode,
45347			Header: res.Header,
45348		}
45349	}
45350	if err != nil {
45351		return nil, err
45352	}
45353	defer googleapi.CloseBody(res)
45354	if err := googleapi.CheckResponse(res); err != nil {
45355		return nil, err
45356	}
45357	ret := &Site{
45358		ServerResponse: googleapi.ServerResponse{
45359			Header:         res.Header,
45360			HTTPStatusCode: res.StatusCode,
45361		},
45362	}
45363	target := &ret
45364	if err := gensupport.DecodeResponse(target, res); err != nil {
45365		return nil, err
45366	}
45367	return ret, nil
45368	// {
45369	//   "description": "Gets one site by ID.",
45370	//   "httpMethod": "GET",
45371	//   "id": "dfareporting.sites.get",
45372	//   "parameterOrder": [
45373	//     "profileId",
45374	//     "id"
45375	//   ],
45376	//   "parameters": {
45377	//     "id": {
45378	//       "description": "Site ID.",
45379	//       "format": "int64",
45380	//       "location": "path",
45381	//       "required": true,
45382	//       "type": "string"
45383	//     },
45384	//     "profileId": {
45385	//       "description": "User profile ID associated with this request.",
45386	//       "format": "int64",
45387	//       "location": "path",
45388	//       "required": true,
45389	//       "type": "string"
45390	//     }
45391	//   },
45392	//   "path": "userprofiles/{profileId}/sites/{id}",
45393	//   "response": {
45394	//     "$ref": "Site"
45395	//   },
45396	//   "scopes": [
45397	//     "https://www.googleapis.com/auth/dfatrafficking"
45398	//   ]
45399	// }
45400
45401}
45402
45403// method id "dfareporting.sites.insert":
45404
45405type SitesInsertCall struct {
45406	s          *Service
45407	profileId  int64
45408	site       *Site
45409	urlParams_ gensupport.URLParams
45410	ctx_       context.Context
45411	header_    http.Header
45412}
45413
45414// Insert: Inserts a new site.
45415func (r *SitesService) Insert(profileId int64, site *Site) *SitesInsertCall {
45416	c := &SitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45417	c.profileId = profileId
45418	c.site = site
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 *SitesInsertCall) Fields(s ...googleapi.Field) *SitesInsertCall {
45426	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45427	return c
45428}
45429
45430// Context sets the context to be used in this call's Do method. Any
45431// pending HTTP request will be aborted if the provided context is
45432// canceled.
45433func (c *SitesInsertCall) Context(ctx context.Context) *SitesInsertCall {
45434	c.ctx_ = ctx
45435	return c
45436}
45437
45438// Header returns an http.Header that can be modified by the caller to
45439// add HTTP headers to the request.
45440func (c *SitesInsertCall) Header() http.Header {
45441	if c.header_ == nil {
45442		c.header_ = make(http.Header)
45443	}
45444	return c.header_
45445}
45446
45447func (c *SitesInsertCall) doRequest(alt string) (*http.Response, error) {
45448	reqHeaders := make(http.Header)
45449	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
45450	for k, v := range c.header_ {
45451		reqHeaders[k] = v
45452	}
45453	reqHeaders.Set("User-Agent", c.s.userAgent())
45454	var body io.Reader = nil
45455	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
45456	if err != nil {
45457		return nil, err
45458	}
45459	reqHeaders.Set("Content-Type", "application/json")
45460	c.urlParams_.Set("alt", alt)
45461	c.urlParams_.Set("prettyPrint", "false")
45462	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45463	urls += "?" + c.urlParams_.Encode()
45464	req, err := http.NewRequest("POST", urls, body)
45465	if err != nil {
45466		return nil, err
45467	}
45468	req.Header = reqHeaders
45469	googleapi.Expand(req.URL, map[string]string{
45470		"profileId": strconv.FormatInt(c.profileId, 10),
45471	})
45472	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45473}
45474
45475// Do executes the "dfareporting.sites.insert" call.
45476// Exactly one of *Site or error will be non-nil. Any non-2xx status
45477// code is an error. Response headers are in either
45478// *Site.ServerResponse.Header or (if a response was returned at all) in
45479// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45480// whether the returned error was because http.StatusNotModified was
45481// returned.
45482func (c *SitesInsertCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45483	gensupport.SetOptions(c.urlParams_, opts...)
45484	res, err := c.doRequest("json")
45485	if res != nil && res.StatusCode == http.StatusNotModified {
45486		if res.Body != nil {
45487			res.Body.Close()
45488		}
45489		return nil, &googleapi.Error{
45490			Code:   res.StatusCode,
45491			Header: res.Header,
45492		}
45493	}
45494	if err != nil {
45495		return nil, err
45496	}
45497	defer googleapi.CloseBody(res)
45498	if err := googleapi.CheckResponse(res); err != nil {
45499		return nil, err
45500	}
45501	ret := &Site{
45502		ServerResponse: googleapi.ServerResponse{
45503			Header:         res.Header,
45504			HTTPStatusCode: res.StatusCode,
45505		},
45506	}
45507	target := &ret
45508	if err := gensupport.DecodeResponse(target, res); err != nil {
45509		return nil, err
45510	}
45511	return ret, nil
45512	// {
45513	//   "description": "Inserts a new site.",
45514	//   "httpMethod": "POST",
45515	//   "id": "dfareporting.sites.insert",
45516	//   "parameterOrder": [
45517	//     "profileId"
45518	//   ],
45519	//   "parameters": {
45520	//     "profileId": {
45521	//       "description": "User profile ID associated with this request.",
45522	//       "format": "int64",
45523	//       "location": "path",
45524	//       "required": true,
45525	//       "type": "string"
45526	//     }
45527	//   },
45528	//   "path": "userprofiles/{profileId}/sites",
45529	//   "request": {
45530	//     "$ref": "Site"
45531	//   },
45532	//   "response": {
45533	//     "$ref": "Site"
45534	//   },
45535	//   "scopes": [
45536	//     "https://www.googleapis.com/auth/dfatrafficking"
45537	//   ]
45538	// }
45539
45540}
45541
45542// method id "dfareporting.sites.list":
45543
45544type SitesListCall struct {
45545	s            *Service
45546	profileId    int64
45547	urlParams_   gensupport.URLParams
45548	ifNoneMatch_ string
45549	ctx_         context.Context
45550	header_      http.Header
45551}
45552
45553// List: Retrieves a list of sites, possibly filtered. This method
45554// supports paging.
45555func (r *SitesService) List(profileId int64) *SitesListCall {
45556	c := &SitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45557	c.profileId = profileId
45558	return c
45559}
45560
45561// AcceptsInStreamVideoPlacements sets the optional parameter
45562// "acceptsInStreamVideoPlacements": This search filter is no longer
45563// supported and will have no effect on the results returned.
45564func (c *SitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *SitesListCall {
45565	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
45566	return c
45567}
45568
45569// AcceptsInterstitialPlacements sets the optional parameter
45570// "acceptsInterstitialPlacements": This search filter is no longer
45571// supported and will have no effect on the results returned.
45572func (c *SitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *SitesListCall {
45573	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
45574	return c
45575}
45576
45577// AcceptsPublisherPaidPlacements sets the optional parameter
45578// "acceptsPublisherPaidPlacements": Select only sites that accept
45579// publisher paid placements.
45580func (c *SitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *SitesListCall {
45581	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
45582	return c
45583}
45584
45585// AdWordsSite sets the optional parameter "adWordsSite": Select only
45586// AdWords sites.
45587func (c *SitesListCall) AdWordsSite(adWordsSite bool) *SitesListCall {
45588	c.urlParams_.Set("adWordsSite", fmt.Sprint(adWordsSite))
45589	return c
45590}
45591
45592// Approved sets the optional parameter "approved": Select only approved
45593// sites.
45594func (c *SitesListCall) Approved(approved bool) *SitesListCall {
45595	c.urlParams_.Set("approved", fmt.Sprint(approved))
45596	return c
45597}
45598
45599// CampaignIds sets the optional parameter "campaignIds": Select only
45600// sites with these campaign IDs.
45601func (c *SitesListCall) CampaignIds(campaignIds ...int64) *SitesListCall {
45602	var campaignIds_ []string
45603	for _, v := range campaignIds {
45604		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
45605	}
45606	c.urlParams_.SetMulti("campaignIds", campaignIds_)
45607	return c
45608}
45609
45610// DirectorySiteIds sets the optional parameter "directorySiteIds":
45611// Select only sites with these directory site IDs.
45612func (c *SitesListCall) DirectorySiteIds(directorySiteIds ...int64) *SitesListCall {
45613	var directorySiteIds_ []string
45614	for _, v := range directorySiteIds {
45615		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
45616	}
45617	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
45618	return c
45619}
45620
45621// Ids sets the optional parameter "ids": Select only sites with these
45622// IDs.
45623func (c *SitesListCall) Ids(ids ...int64) *SitesListCall {
45624	var ids_ []string
45625	for _, v := range ids {
45626		ids_ = append(ids_, fmt.Sprint(v))
45627	}
45628	c.urlParams_.SetMulti("ids", ids_)
45629	return c
45630}
45631
45632// MaxResults sets the optional parameter "maxResults": Maximum number
45633// of results to return.
45634func (c *SitesListCall) MaxResults(maxResults int64) *SitesListCall {
45635	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45636	return c
45637}
45638
45639// PageToken sets the optional parameter "pageToken": Value of the
45640// nextPageToken from the previous result page.
45641func (c *SitesListCall) PageToken(pageToken string) *SitesListCall {
45642	c.urlParams_.Set("pageToken", pageToken)
45643	return c
45644}
45645
45646// SearchString sets the optional parameter "searchString": Allows
45647// searching for objects by name, ID or keyName. Wildcards (*) are
45648// allowed. For example, "site*2015" will return objects with names like
45649// "site June 2015", "site April 2015", or simply "site 2015". Most of
45650// the searches also add wildcards implicitly at the start and the end
45651// of the search string. For example, a search string of "site" will
45652// match objects with name "my site", "site 2015", or simply "site".
45653func (c *SitesListCall) SearchString(searchString string) *SitesListCall {
45654	c.urlParams_.Set("searchString", searchString)
45655	return c
45656}
45657
45658// SortField sets the optional parameter "sortField": Field by which to
45659// sort the list.
45660//
45661// Possible values:
45662//   "ID" (default)
45663//   "NAME"
45664func (c *SitesListCall) SortField(sortField string) *SitesListCall {
45665	c.urlParams_.Set("sortField", sortField)
45666	return c
45667}
45668
45669// SortOrder sets the optional parameter "sortOrder": Order of sorted
45670// results.
45671//
45672// Possible values:
45673//   "ASCENDING" (default)
45674//   "DESCENDING"
45675func (c *SitesListCall) SortOrder(sortOrder string) *SitesListCall {
45676	c.urlParams_.Set("sortOrder", sortOrder)
45677	return c
45678}
45679
45680// SubaccountId sets the optional parameter "subaccountId": Select only
45681// sites with this subaccount ID.
45682func (c *SitesListCall) SubaccountId(subaccountId int64) *SitesListCall {
45683	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
45684	return c
45685}
45686
45687// UnmappedSite sets the optional parameter "unmappedSite": Select only
45688// sites that have not been mapped to a directory site.
45689func (c *SitesListCall) UnmappedSite(unmappedSite bool) *SitesListCall {
45690	c.urlParams_.Set("unmappedSite", fmt.Sprint(unmappedSite))
45691	return c
45692}
45693
45694// Fields allows partial responses to be retrieved. See
45695// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45696// for more information.
45697func (c *SitesListCall) Fields(s ...googleapi.Field) *SitesListCall {
45698	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45699	return c
45700}
45701
45702// IfNoneMatch sets the optional parameter which makes the operation
45703// fail if the object's ETag matches the given value. This is useful for
45704// getting updates only after the object has changed since the last
45705// request. Use googleapi.IsNotModified to check whether the response
45706// error from Do is the result of In-None-Match.
45707func (c *SitesListCall) IfNoneMatch(entityTag string) *SitesListCall {
45708	c.ifNoneMatch_ = entityTag
45709	return c
45710}
45711
45712// Context sets the context to be used in this call's Do method. Any
45713// pending HTTP request will be aborted if the provided context is
45714// canceled.
45715func (c *SitesListCall) Context(ctx context.Context) *SitesListCall {
45716	c.ctx_ = ctx
45717	return c
45718}
45719
45720// Header returns an http.Header that can be modified by the caller to
45721// add HTTP headers to the request.
45722func (c *SitesListCall) Header() http.Header {
45723	if c.header_ == nil {
45724		c.header_ = make(http.Header)
45725	}
45726	return c.header_
45727}
45728
45729func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
45730	reqHeaders := make(http.Header)
45731	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
45732	for k, v := range c.header_ {
45733		reqHeaders[k] = v
45734	}
45735	reqHeaders.Set("User-Agent", c.s.userAgent())
45736	if c.ifNoneMatch_ != "" {
45737		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45738	}
45739	var body io.Reader = nil
45740	c.urlParams_.Set("alt", alt)
45741	c.urlParams_.Set("prettyPrint", "false")
45742	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45743	urls += "?" + c.urlParams_.Encode()
45744	req, err := http.NewRequest("GET", urls, body)
45745	if err != nil {
45746		return nil, err
45747	}
45748	req.Header = reqHeaders
45749	googleapi.Expand(req.URL, map[string]string{
45750		"profileId": strconv.FormatInt(c.profileId, 10),
45751	})
45752	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45753}
45754
45755// Do executes the "dfareporting.sites.list" call.
45756// Exactly one of *SitesListResponse or error will be non-nil. Any
45757// non-2xx status code is an error. Response headers are in either
45758// *SitesListResponse.ServerResponse.Header or (if a response was
45759// returned at all) in error.(*googleapi.Error).Header. Use
45760// googleapi.IsNotModified to check whether the returned error was
45761// because http.StatusNotModified was returned.
45762func (c *SitesListCall) Do(opts ...googleapi.CallOption) (*SitesListResponse, error) {
45763	gensupport.SetOptions(c.urlParams_, opts...)
45764	res, err := c.doRequest("json")
45765	if res != nil && res.StatusCode == http.StatusNotModified {
45766		if res.Body != nil {
45767			res.Body.Close()
45768		}
45769		return nil, &googleapi.Error{
45770			Code:   res.StatusCode,
45771			Header: res.Header,
45772		}
45773	}
45774	if err != nil {
45775		return nil, err
45776	}
45777	defer googleapi.CloseBody(res)
45778	if err := googleapi.CheckResponse(res); err != nil {
45779		return nil, err
45780	}
45781	ret := &SitesListResponse{
45782		ServerResponse: googleapi.ServerResponse{
45783			Header:         res.Header,
45784			HTTPStatusCode: res.StatusCode,
45785		},
45786	}
45787	target := &ret
45788	if err := gensupport.DecodeResponse(target, res); err != nil {
45789		return nil, err
45790	}
45791	return ret, nil
45792	// {
45793	//   "description": "Retrieves a list of sites, possibly filtered. This method supports paging.",
45794	//   "httpMethod": "GET",
45795	//   "id": "dfareporting.sites.list",
45796	//   "parameterOrder": [
45797	//     "profileId"
45798	//   ],
45799	//   "parameters": {
45800	//     "acceptsInStreamVideoPlacements": {
45801	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
45802	//       "location": "query",
45803	//       "type": "boolean"
45804	//     },
45805	//     "acceptsInterstitialPlacements": {
45806	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
45807	//       "location": "query",
45808	//       "type": "boolean"
45809	//     },
45810	//     "acceptsPublisherPaidPlacements": {
45811	//       "description": "Select only sites that accept publisher paid placements.",
45812	//       "location": "query",
45813	//       "type": "boolean"
45814	//     },
45815	//     "adWordsSite": {
45816	//       "description": "Select only AdWords sites.",
45817	//       "location": "query",
45818	//       "type": "boolean"
45819	//     },
45820	//     "approved": {
45821	//       "description": "Select only approved sites.",
45822	//       "location": "query",
45823	//       "type": "boolean"
45824	//     },
45825	//     "campaignIds": {
45826	//       "description": "Select only sites with these campaign IDs.",
45827	//       "format": "int64",
45828	//       "location": "query",
45829	//       "repeated": true,
45830	//       "type": "string"
45831	//     },
45832	//     "directorySiteIds": {
45833	//       "description": "Select only sites with these directory site IDs.",
45834	//       "format": "int64",
45835	//       "location": "query",
45836	//       "repeated": true,
45837	//       "type": "string"
45838	//     },
45839	//     "ids": {
45840	//       "description": "Select only sites with these IDs.",
45841	//       "format": "int64",
45842	//       "location": "query",
45843	//       "repeated": true,
45844	//       "type": "string"
45845	//     },
45846	//     "maxResults": {
45847	//       "default": "1000",
45848	//       "description": "Maximum number of results to return.",
45849	//       "format": "int32",
45850	//       "location": "query",
45851	//       "maximum": "1000",
45852	//       "minimum": "0",
45853	//       "type": "integer"
45854	//     },
45855	//     "pageToken": {
45856	//       "description": "Value of the nextPageToken from the previous result page.",
45857	//       "location": "query",
45858	//       "type": "string"
45859	//     },
45860	//     "profileId": {
45861	//       "description": "User profile ID associated with this request.",
45862	//       "format": "int64",
45863	//       "location": "path",
45864	//       "required": true,
45865	//       "type": "string"
45866	//     },
45867	//     "searchString": {
45868	//       "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\".",
45869	//       "location": "query",
45870	//       "type": "string"
45871	//     },
45872	//     "sortField": {
45873	//       "default": "ID",
45874	//       "description": "Field by which to sort the list.",
45875	//       "enum": [
45876	//         "ID",
45877	//         "NAME"
45878	//       ],
45879	//       "enumDescriptions": [
45880	//         "",
45881	//         ""
45882	//       ],
45883	//       "location": "query",
45884	//       "type": "string"
45885	//     },
45886	//     "sortOrder": {
45887	//       "default": "ASCENDING",
45888	//       "description": "Order of sorted results.",
45889	//       "enum": [
45890	//         "ASCENDING",
45891	//         "DESCENDING"
45892	//       ],
45893	//       "enumDescriptions": [
45894	//         "",
45895	//         ""
45896	//       ],
45897	//       "location": "query",
45898	//       "type": "string"
45899	//     },
45900	//     "subaccountId": {
45901	//       "description": "Select only sites with this subaccount ID.",
45902	//       "format": "int64",
45903	//       "location": "query",
45904	//       "type": "string"
45905	//     },
45906	//     "unmappedSite": {
45907	//       "description": "Select only sites that have not been mapped to a directory site.",
45908	//       "location": "query",
45909	//       "type": "boolean"
45910	//     }
45911	//   },
45912	//   "path": "userprofiles/{profileId}/sites",
45913	//   "response": {
45914	//     "$ref": "SitesListResponse"
45915	//   },
45916	//   "scopes": [
45917	//     "https://www.googleapis.com/auth/dfatrafficking"
45918	//   ]
45919	// }
45920
45921}
45922
45923// Pages invokes f for each page of results.
45924// A non-nil error returned from f will halt the iteration.
45925// The provided context supersedes any context provided to the Context method.
45926func (c *SitesListCall) Pages(ctx context.Context, f func(*SitesListResponse) error) error {
45927	c.ctx_ = ctx
45928	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45929	for {
45930		x, err := c.Do()
45931		if err != nil {
45932			return err
45933		}
45934		if err := f(x); err != nil {
45935			return err
45936		}
45937		if x.NextPageToken == "" {
45938			return nil
45939		}
45940		c.PageToken(x.NextPageToken)
45941	}
45942}
45943
45944// method id "dfareporting.sites.patch":
45945
45946type SitesPatchCall struct {
45947	s          *Service
45948	profileId  int64
45949	site       *Site
45950	urlParams_ gensupport.URLParams
45951	ctx_       context.Context
45952	header_    http.Header
45953}
45954
45955// Patch: Updates an existing site. This method supports patch
45956// semantics.
45957func (r *SitesService) Patch(profileId int64, id int64, site *Site) *SitesPatchCall {
45958	c := &SitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45959	c.profileId = profileId
45960	c.urlParams_.Set("id", fmt.Sprint(id))
45961	c.site = site
45962	return c
45963}
45964
45965// Fields allows partial responses to be retrieved. See
45966// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45967// for more information.
45968func (c *SitesPatchCall) Fields(s ...googleapi.Field) *SitesPatchCall {
45969	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45970	return c
45971}
45972
45973// Context sets the context to be used in this call's Do method. Any
45974// pending HTTP request will be aborted if the provided context is
45975// canceled.
45976func (c *SitesPatchCall) Context(ctx context.Context) *SitesPatchCall {
45977	c.ctx_ = ctx
45978	return c
45979}
45980
45981// Header returns an http.Header that can be modified by the caller to
45982// add HTTP headers to the request.
45983func (c *SitesPatchCall) Header() http.Header {
45984	if c.header_ == nil {
45985		c.header_ = make(http.Header)
45986	}
45987	return c.header_
45988}
45989
45990func (c *SitesPatchCall) doRequest(alt string) (*http.Response, error) {
45991	reqHeaders := make(http.Header)
45992	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
45993	for k, v := range c.header_ {
45994		reqHeaders[k] = v
45995	}
45996	reqHeaders.Set("User-Agent", c.s.userAgent())
45997	var body io.Reader = nil
45998	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
45999	if err != nil {
46000		return nil, err
46001	}
46002	reqHeaders.Set("Content-Type", "application/json")
46003	c.urlParams_.Set("alt", alt)
46004	c.urlParams_.Set("prettyPrint", "false")
46005	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
46006	urls += "?" + c.urlParams_.Encode()
46007	req, err := http.NewRequest("PATCH", urls, body)
46008	if err != nil {
46009		return nil, err
46010	}
46011	req.Header = reqHeaders
46012	googleapi.Expand(req.URL, map[string]string{
46013		"profileId": strconv.FormatInt(c.profileId, 10),
46014	})
46015	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46016}
46017
46018// Do executes the "dfareporting.sites.patch" call.
46019// Exactly one of *Site or error will be non-nil. Any non-2xx status
46020// code is an error. Response headers are in either
46021// *Site.ServerResponse.Header or (if a response was returned at all) in
46022// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46023// whether the returned error was because http.StatusNotModified was
46024// returned.
46025func (c *SitesPatchCall) Do(opts ...googleapi.CallOption) (*Site, error) {
46026	gensupport.SetOptions(c.urlParams_, opts...)
46027	res, err := c.doRequest("json")
46028	if res != nil && res.StatusCode == http.StatusNotModified {
46029		if res.Body != nil {
46030			res.Body.Close()
46031		}
46032		return nil, &googleapi.Error{
46033			Code:   res.StatusCode,
46034			Header: res.Header,
46035		}
46036	}
46037	if err != nil {
46038		return nil, err
46039	}
46040	defer googleapi.CloseBody(res)
46041	if err := googleapi.CheckResponse(res); err != nil {
46042		return nil, err
46043	}
46044	ret := &Site{
46045		ServerResponse: googleapi.ServerResponse{
46046			Header:         res.Header,
46047			HTTPStatusCode: res.StatusCode,
46048		},
46049	}
46050	target := &ret
46051	if err := gensupport.DecodeResponse(target, res); err != nil {
46052		return nil, err
46053	}
46054	return ret, nil
46055	// {
46056	//   "description": "Updates an existing site. This method supports patch semantics.",
46057	//   "httpMethod": "PATCH",
46058	//   "id": "dfareporting.sites.patch",
46059	//   "parameterOrder": [
46060	//     "profileId",
46061	//     "id"
46062	//   ],
46063	//   "parameters": {
46064	//     "id": {
46065	//       "description": "Site ID.",
46066	//       "format": "int64",
46067	//       "location": "query",
46068	//       "required": true,
46069	//       "type": "string"
46070	//     },
46071	//     "profileId": {
46072	//       "description": "User profile ID associated with this request.",
46073	//       "format": "int64",
46074	//       "location": "path",
46075	//       "required": true,
46076	//       "type": "string"
46077	//     }
46078	//   },
46079	//   "path": "userprofiles/{profileId}/sites",
46080	//   "request": {
46081	//     "$ref": "Site"
46082	//   },
46083	//   "response": {
46084	//     "$ref": "Site"
46085	//   },
46086	//   "scopes": [
46087	//     "https://www.googleapis.com/auth/dfatrafficking"
46088	//   ]
46089	// }
46090
46091}
46092
46093// method id "dfareporting.sites.update":
46094
46095type SitesUpdateCall struct {
46096	s          *Service
46097	profileId  int64
46098	site       *Site
46099	urlParams_ gensupport.URLParams
46100	ctx_       context.Context
46101	header_    http.Header
46102}
46103
46104// Update: Updates an existing site.
46105func (r *SitesService) Update(profileId int64, site *Site) *SitesUpdateCall {
46106	c := &SitesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46107	c.profileId = profileId
46108	c.site = site
46109	return c
46110}
46111
46112// Fields allows partial responses to be retrieved. See
46113// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46114// for more information.
46115func (c *SitesUpdateCall) Fields(s ...googleapi.Field) *SitesUpdateCall {
46116	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46117	return c
46118}
46119
46120// Context sets the context to be used in this call's Do method. Any
46121// pending HTTP request will be aborted if the provided context is
46122// canceled.
46123func (c *SitesUpdateCall) Context(ctx context.Context) *SitesUpdateCall {
46124	c.ctx_ = ctx
46125	return c
46126}
46127
46128// Header returns an http.Header that can be modified by the caller to
46129// add HTTP headers to the request.
46130func (c *SitesUpdateCall) Header() http.Header {
46131	if c.header_ == nil {
46132		c.header_ = make(http.Header)
46133	}
46134	return c.header_
46135}
46136
46137func (c *SitesUpdateCall) doRequest(alt string) (*http.Response, error) {
46138	reqHeaders := make(http.Header)
46139	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
46140	for k, v := range c.header_ {
46141		reqHeaders[k] = v
46142	}
46143	reqHeaders.Set("User-Agent", c.s.userAgent())
46144	var body io.Reader = nil
46145	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
46146	if err != nil {
46147		return nil, err
46148	}
46149	reqHeaders.Set("Content-Type", "application/json")
46150	c.urlParams_.Set("alt", alt)
46151	c.urlParams_.Set("prettyPrint", "false")
46152	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
46153	urls += "?" + c.urlParams_.Encode()
46154	req, err := http.NewRequest("PUT", urls, body)
46155	if err != nil {
46156		return nil, err
46157	}
46158	req.Header = reqHeaders
46159	googleapi.Expand(req.URL, map[string]string{
46160		"profileId": strconv.FormatInt(c.profileId, 10),
46161	})
46162	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46163}
46164
46165// Do executes the "dfareporting.sites.update" call.
46166// Exactly one of *Site or error will be non-nil. Any non-2xx status
46167// code is an error. Response headers are in either
46168// *Site.ServerResponse.Header or (if a response was returned at all) in
46169// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46170// whether the returned error was because http.StatusNotModified was
46171// returned.
46172func (c *SitesUpdateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
46173	gensupport.SetOptions(c.urlParams_, opts...)
46174	res, err := c.doRequest("json")
46175	if res != nil && res.StatusCode == http.StatusNotModified {
46176		if res.Body != nil {
46177			res.Body.Close()
46178		}
46179		return nil, &googleapi.Error{
46180			Code:   res.StatusCode,
46181			Header: res.Header,
46182		}
46183	}
46184	if err != nil {
46185		return nil, err
46186	}
46187	defer googleapi.CloseBody(res)
46188	if err := googleapi.CheckResponse(res); err != nil {
46189		return nil, err
46190	}
46191	ret := &Site{
46192		ServerResponse: googleapi.ServerResponse{
46193			Header:         res.Header,
46194			HTTPStatusCode: res.StatusCode,
46195		},
46196	}
46197	target := &ret
46198	if err := gensupport.DecodeResponse(target, res); err != nil {
46199		return nil, err
46200	}
46201	return ret, nil
46202	// {
46203	//   "description": "Updates an existing site.",
46204	//   "httpMethod": "PUT",
46205	//   "id": "dfareporting.sites.update",
46206	//   "parameterOrder": [
46207	//     "profileId"
46208	//   ],
46209	//   "parameters": {
46210	//     "profileId": {
46211	//       "description": "User profile ID associated with this request.",
46212	//       "format": "int64",
46213	//       "location": "path",
46214	//       "required": true,
46215	//       "type": "string"
46216	//     }
46217	//   },
46218	//   "path": "userprofiles/{profileId}/sites",
46219	//   "request": {
46220	//     "$ref": "Site"
46221	//   },
46222	//   "response": {
46223	//     "$ref": "Site"
46224	//   },
46225	//   "scopes": [
46226	//     "https://www.googleapis.com/auth/dfatrafficking"
46227	//   ]
46228	// }
46229
46230}
46231
46232// method id "dfareporting.sizes.get":
46233
46234type SizesGetCall struct {
46235	s            *Service
46236	profileId    int64
46237	id           int64
46238	urlParams_   gensupport.URLParams
46239	ifNoneMatch_ string
46240	ctx_         context.Context
46241	header_      http.Header
46242}
46243
46244// Get: Gets one size by ID.
46245func (r *SizesService) Get(profileId int64, id int64) *SizesGetCall {
46246	c := &SizesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46247	c.profileId = profileId
46248	c.id = id
46249	return c
46250}
46251
46252// Fields allows partial responses to be retrieved. See
46253// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46254// for more information.
46255func (c *SizesGetCall) Fields(s ...googleapi.Field) *SizesGetCall {
46256	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46257	return c
46258}
46259
46260// IfNoneMatch sets the optional parameter which makes the operation
46261// fail if the object's ETag matches the given value. This is useful for
46262// getting updates only after the object has changed since the last
46263// request. Use googleapi.IsNotModified to check whether the response
46264// error from Do is the result of In-None-Match.
46265func (c *SizesGetCall) IfNoneMatch(entityTag string) *SizesGetCall {
46266	c.ifNoneMatch_ = entityTag
46267	return c
46268}
46269
46270// Context sets the context to be used in this call's Do method. Any
46271// pending HTTP request will be aborted if the provided context is
46272// canceled.
46273func (c *SizesGetCall) Context(ctx context.Context) *SizesGetCall {
46274	c.ctx_ = ctx
46275	return c
46276}
46277
46278// Header returns an http.Header that can be modified by the caller to
46279// add HTTP headers to the request.
46280func (c *SizesGetCall) Header() http.Header {
46281	if c.header_ == nil {
46282		c.header_ = make(http.Header)
46283	}
46284	return c.header_
46285}
46286
46287func (c *SizesGetCall) doRequest(alt string) (*http.Response, error) {
46288	reqHeaders := make(http.Header)
46289	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
46290	for k, v := range c.header_ {
46291		reqHeaders[k] = v
46292	}
46293	reqHeaders.Set("User-Agent", c.s.userAgent())
46294	if c.ifNoneMatch_ != "" {
46295		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46296	}
46297	var body io.Reader = nil
46298	c.urlParams_.Set("alt", alt)
46299	c.urlParams_.Set("prettyPrint", "false")
46300	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes/{id}")
46301	urls += "?" + c.urlParams_.Encode()
46302	req, err := http.NewRequest("GET", urls, body)
46303	if err != nil {
46304		return nil, err
46305	}
46306	req.Header = reqHeaders
46307	googleapi.Expand(req.URL, map[string]string{
46308		"profileId": strconv.FormatInt(c.profileId, 10),
46309		"id":        strconv.FormatInt(c.id, 10),
46310	})
46311	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46312}
46313
46314// Do executes the "dfareporting.sizes.get" call.
46315// Exactly one of *Size or error will be non-nil. Any non-2xx status
46316// code is an error. Response headers are in either
46317// *Size.ServerResponse.Header or (if a response was returned at all) in
46318// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46319// whether the returned error was because http.StatusNotModified was
46320// returned.
46321func (c *SizesGetCall) Do(opts ...googleapi.CallOption) (*Size, error) {
46322	gensupport.SetOptions(c.urlParams_, opts...)
46323	res, err := c.doRequest("json")
46324	if res != nil && res.StatusCode == http.StatusNotModified {
46325		if res.Body != nil {
46326			res.Body.Close()
46327		}
46328		return nil, &googleapi.Error{
46329			Code:   res.StatusCode,
46330			Header: res.Header,
46331		}
46332	}
46333	if err != nil {
46334		return nil, err
46335	}
46336	defer googleapi.CloseBody(res)
46337	if err := googleapi.CheckResponse(res); err != nil {
46338		return nil, err
46339	}
46340	ret := &Size{
46341		ServerResponse: googleapi.ServerResponse{
46342			Header:         res.Header,
46343			HTTPStatusCode: res.StatusCode,
46344		},
46345	}
46346	target := &ret
46347	if err := gensupport.DecodeResponse(target, res); err != nil {
46348		return nil, err
46349	}
46350	return ret, nil
46351	// {
46352	//   "description": "Gets one size by ID.",
46353	//   "httpMethod": "GET",
46354	//   "id": "dfareporting.sizes.get",
46355	//   "parameterOrder": [
46356	//     "profileId",
46357	//     "id"
46358	//   ],
46359	//   "parameters": {
46360	//     "id": {
46361	//       "description": "Size ID.",
46362	//       "format": "int64",
46363	//       "location": "path",
46364	//       "required": true,
46365	//       "type": "string"
46366	//     },
46367	//     "profileId": {
46368	//       "description": "User profile ID associated with this request.",
46369	//       "format": "int64",
46370	//       "location": "path",
46371	//       "required": true,
46372	//       "type": "string"
46373	//     }
46374	//   },
46375	//   "path": "userprofiles/{profileId}/sizes/{id}",
46376	//   "response": {
46377	//     "$ref": "Size"
46378	//   },
46379	//   "scopes": [
46380	//     "https://www.googleapis.com/auth/dfatrafficking"
46381	//   ]
46382	// }
46383
46384}
46385
46386// method id "dfareporting.sizes.insert":
46387
46388type SizesInsertCall struct {
46389	s          *Service
46390	profileId  int64
46391	size       *Size
46392	urlParams_ gensupport.URLParams
46393	ctx_       context.Context
46394	header_    http.Header
46395}
46396
46397// Insert: Inserts a new size.
46398func (r *SizesService) Insert(profileId int64, size *Size) *SizesInsertCall {
46399	c := &SizesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46400	c.profileId = profileId
46401	c.size = size
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 *SizesInsertCall) Fields(s ...googleapi.Field) *SizesInsertCall {
46409	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46410	return c
46411}
46412
46413// Context sets the context to be used in this call's Do method. Any
46414// pending HTTP request will be aborted if the provided context is
46415// canceled.
46416func (c *SizesInsertCall) Context(ctx context.Context) *SizesInsertCall {
46417	c.ctx_ = ctx
46418	return c
46419}
46420
46421// Header returns an http.Header that can be modified by the caller to
46422// add HTTP headers to the request.
46423func (c *SizesInsertCall) Header() http.Header {
46424	if c.header_ == nil {
46425		c.header_ = make(http.Header)
46426	}
46427	return c.header_
46428}
46429
46430func (c *SizesInsertCall) doRequest(alt string) (*http.Response, error) {
46431	reqHeaders := make(http.Header)
46432	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
46433	for k, v := range c.header_ {
46434		reqHeaders[k] = v
46435	}
46436	reqHeaders.Set("User-Agent", c.s.userAgent())
46437	var body io.Reader = nil
46438	body, err := googleapi.WithoutDataWrapper.JSONReader(c.size)
46439	if err != nil {
46440		return nil, err
46441	}
46442	reqHeaders.Set("Content-Type", "application/json")
46443	c.urlParams_.Set("alt", alt)
46444	c.urlParams_.Set("prettyPrint", "false")
46445	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
46446	urls += "?" + c.urlParams_.Encode()
46447	req, err := http.NewRequest("POST", urls, body)
46448	if err != nil {
46449		return nil, err
46450	}
46451	req.Header = reqHeaders
46452	googleapi.Expand(req.URL, map[string]string{
46453		"profileId": strconv.FormatInt(c.profileId, 10),
46454	})
46455	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46456}
46457
46458// Do executes the "dfareporting.sizes.insert" call.
46459// Exactly one of *Size or error will be non-nil. Any non-2xx status
46460// code is an error. Response headers are in either
46461// *Size.ServerResponse.Header or (if a response was returned at all) in
46462// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46463// whether the returned error was because http.StatusNotModified was
46464// returned.
46465func (c *SizesInsertCall) Do(opts ...googleapi.CallOption) (*Size, error) {
46466	gensupport.SetOptions(c.urlParams_, opts...)
46467	res, err := c.doRequest("json")
46468	if res != nil && res.StatusCode == http.StatusNotModified {
46469		if res.Body != nil {
46470			res.Body.Close()
46471		}
46472		return nil, &googleapi.Error{
46473			Code:   res.StatusCode,
46474			Header: res.Header,
46475		}
46476	}
46477	if err != nil {
46478		return nil, err
46479	}
46480	defer googleapi.CloseBody(res)
46481	if err := googleapi.CheckResponse(res); err != nil {
46482		return nil, err
46483	}
46484	ret := &Size{
46485		ServerResponse: googleapi.ServerResponse{
46486			Header:         res.Header,
46487			HTTPStatusCode: res.StatusCode,
46488		},
46489	}
46490	target := &ret
46491	if err := gensupport.DecodeResponse(target, res); err != nil {
46492		return nil, err
46493	}
46494	return ret, nil
46495	// {
46496	//   "description": "Inserts a new size.",
46497	//   "httpMethod": "POST",
46498	//   "id": "dfareporting.sizes.insert",
46499	//   "parameterOrder": [
46500	//     "profileId"
46501	//   ],
46502	//   "parameters": {
46503	//     "profileId": {
46504	//       "description": "User profile ID associated with this request.",
46505	//       "format": "int64",
46506	//       "location": "path",
46507	//       "required": true,
46508	//       "type": "string"
46509	//     }
46510	//   },
46511	//   "path": "userprofiles/{profileId}/sizes",
46512	//   "request": {
46513	//     "$ref": "Size"
46514	//   },
46515	//   "response": {
46516	//     "$ref": "Size"
46517	//   },
46518	//   "scopes": [
46519	//     "https://www.googleapis.com/auth/dfatrafficking"
46520	//   ]
46521	// }
46522
46523}
46524
46525// method id "dfareporting.sizes.list":
46526
46527type SizesListCall struct {
46528	s            *Service
46529	profileId    int64
46530	urlParams_   gensupport.URLParams
46531	ifNoneMatch_ string
46532	ctx_         context.Context
46533	header_      http.Header
46534}
46535
46536// List: Retrieves a list of sizes, possibly filtered. Retrieved sizes
46537// are globally unique and may include values not currently in use by
46538// your account. Due to this, the list of sizes returned by this method
46539// may differ from the list seen in the Trafficking UI.
46540func (r *SizesService) List(profileId int64) *SizesListCall {
46541	c := &SizesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46542	c.profileId = profileId
46543	return c
46544}
46545
46546// Height sets the optional parameter "height": Select only sizes with
46547// this height.
46548func (c *SizesListCall) Height(height int64) *SizesListCall {
46549	c.urlParams_.Set("height", fmt.Sprint(height))
46550	return c
46551}
46552
46553// IabStandard sets the optional parameter "iabStandard": Select only
46554// IAB standard sizes.
46555func (c *SizesListCall) IabStandard(iabStandard bool) *SizesListCall {
46556	c.urlParams_.Set("iabStandard", fmt.Sprint(iabStandard))
46557	return c
46558}
46559
46560// Ids sets the optional parameter "ids": Select only sizes with these
46561// IDs.
46562func (c *SizesListCall) Ids(ids ...int64) *SizesListCall {
46563	var ids_ []string
46564	for _, v := range ids {
46565		ids_ = append(ids_, fmt.Sprint(v))
46566	}
46567	c.urlParams_.SetMulti("ids", ids_)
46568	return c
46569}
46570
46571// Width sets the optional parameter "width": Select only sizes with
46572// this width.
46573func (c *SizesListCall) Width(width int64) *SizesListCall {
46574	c.urlParams_.Set("width", fmt.Sprint(width))
46575	return c
46576}
46577
46578// Fields allows partial responses to be retrieved. See
46579// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46580// for more information.
46581func (c *SizesListCall) Fields(s ...googleapi.Field) *SizesListCall {
46582	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46583	return c
46584}
46585
46586// IfNoneMatch sets the optional parameter which makes the operation
46587// fail if the object's ETag matches the given value. This is useful for
46588// getting updates only after the object has changed since the last
46589// request. Use googleapi.IsNotModified to check whether the response
46590// error from Do is the result of In-None-Match.
46591func (c *SizesListCall) IfNoneMatch(entityTag string) *SizesListCall {
46592	c.ifNoneMatch_ = entityTag
46593	return c
46594}
46595
46596// Context sets the context to be used in this call's Do method. Any
46597// pending HTTP request will be aborted if the provided context is
46598// canceled.
46599func (c *SizesListCall) Context(ctx context.Context) *SizesListCall {
46600	c.ctx_ = ctx
46601	return c
46602}
46603
46604// Header returns an http.Header that can be modified by the caller to
46605// add HTTP headers to the request.
46606func (c *SizesListCall) Header() http.Header {
46607	if c.header_ == nil {
46608		c.header_ = make(http.Header)
46609	}
46610	return c.header_
46611}
46612
46613func (c *SizesListCall) doRequest(alt string) (*http.Response, error) {
46614	reqHeaders := make(http.Header)
46615	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
46616	for k, v := range c.header_ {
46617		reqHeaders[k] = v
46618	}
46619	reqHeaders.Set("User-Agent", c.s.userAgent())
46620	if c.ifNoneMatch_ != "" {
46621		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46622	}
46623	var body io.Reader = nil
46624	c.urlParams_.Set("alt", alt)
46625	c.urlParams_.Set("prettyPrint", "false")
46626	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
46627	urls += "?" + c.urlParams_.Encode()
46628	req, err := http.NewRequest("GET", urls, body)
46629	if err != nil {
46630		return nil, err
46631	}
46632	req.Header = reqHeaders
46633	googleapi.Expand(req.URL, map[string]string{
46634		"profileId": strconv.FormatInt(c.profileId, 10),
46635	})
46636	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46637}
46638
46639// Do executes the "dfareporting.sizes.list" call.
46640// Exactly one of *SizesListResponse or error will be non-nil. Any
46641// non-2xx status code is an error. Response headers are in either
46642// *SizesListResponse.ServerResponse.Header or (if a response was
46643// returned at all) in error.(*googleapi.Error).Header. Use
46644// googleapi.IsNotModified to check whether the returned error was
46645// because http.StatusNotModified was returned.
46646func (c *SizesListCall) Do(opts ...googleapi.CallOption) (*SizesListResponse, error) {
46647	gensupport.SetOptions(c.urlParams_, opts...)
46648	res, err := c.doRequest("json")
46649	if res != nil && res.StatusCode == http.StatusNotModified {
46650		if res.Body != nil {
46651			res.Body.Close()
46652		}
46653		return nil, &googleapi.Error{
46654			Code:   res.StatusCode,
46655			Header: res.Header,
46656		}
46657	}
46658	if err != nil {
46659		return nil, err
46660	}
46661	defer googleapi.CloseBody(res)
46662	if err := googleapi.CheckResponse(res); err != nil {
46663		return nil, err
46664	}
46665	ret := &SizesListResponse{
46666		ServerResponse: googleapi.ServerResponse{
46667			Header:         res.Header,
46668			HTTPStatusCode: res.StatusCode,
46669		},
46670	}
46671	target := &ret
46672	if err := gensupport.DecodeResponse(target, res); err != nil {
46673		return nil, err
46674	}
46675	return ret, nil
46676	// {
46677	//   "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.",
46678	//   "httpMethod": "GET",
46679	//   "id": "dfareporting.sizes.list",
46680	//   "parameterOrder": [
46681	//     "profileId"
46682	//   ],
46683	//   "parameters": {
46684	//     "height": {
46685	//       "description": "Select only sizes with this height.",
46686	//       "format": "int32",
46687	//       "location": "query",
46688	//       "maximum": "32767",
46689	//       "minimum": "0",
46690	//       "type": "integer"
46691	//     },
46692	//     "iabStandard": {
46693	//       "description": "Select only IAB standard sizes.",
46694	//       "location": "query",
46695	//       "type": "boolean"
46696	//     },
46697	//     "ids": {
46698	//       "description": "Select only sizes with these IDs.",
46699	//       "format": "int64",
46700	//       "location": "query",
46701	//       "repeated": true,
46702	//       "type": "string"
46703	//     },
46704	//     "profileId": {
46705	//       "description": "User profile ID associated with this request.",
46706	//       "format": "int64",
46707	//       "location": "path",
46708	//       "required": true,
46709	//       "type": "string"
46710	//     },
46711	//     "width": {
46712	//       "description": "Select only sizes with this width.",
46713	//       "format": "int32",
46714	//       "location": "query",
46715	//       "maximum": "32767",
46716	//       "minimum": "0",
46717	//       "type": "integer"
46718	//     }
46719	//   },
46720	//   "path": "userprofiles/{profileId}/sizes",
46721	//   "response": {
46722	//     "$ref": "SizesListResponse"
46723	//   },
46724	//   "scopes": [
46725	//     "https://www.googleapis.com/auth/dfatrafficking"
46726	//   ]
46727	// }
46728
46729}
46730
46731// method id "dfareporting.subaccounts.get":
46732
46733type SubaccountsGetCall struct {
46734	s            *Service
46735	profileId    int64
46736	id           int64
46737	urlParams_   gensupport.URLParams
46738	ifNoneMatch_ string
46739	ctx_         context.Context
46740	header_      http.Header
46741}
46742
46743// Get: Gets one subaccount by ID.
46744func (r *SubaccountsService) Get(profileId int64, id int64) *SubaccountsGetCall {
46745	c := &SubaccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46746	c.profileId = profileId
46747	c.id = id
46748	return c
46749}
46750
46751// Fields allows partial responses to be retrieved. See
46752// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46753// for more information.
46754func (c *SubaccountsGetCall) Fields(s ...googleapi.Field) *SubaccountsGetCall {
46755	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46756	return c
46757}
46758
46759// IfNoneMatch sets the optional parameter which makes the operation
46760// fail if the object's ETag matches the given value. This is useful for
46761// getting updates only after the object has changed since the last
46762// request. Use googleapi.IsNotModified to check whether the response
46763// error from Do is the result of In-None-Match.
46764func (c *SubaccountsGetCall) IfNoneMatch(entityTag string) *SubaccountsGetCall {
46765	c.ifNoneMatch_ = entityTag
46766	return c
46767}
46768
46769// Context sets the context to be used in this call's Do method. Any
46770// pending HTTP request will be aborted if the provided context is
46771// canceled.
46772func (c *SubaccountsGetCall) Context(ctx context.Context) *SubaccountsGetCall {
46773	c.ctx_ = ctx
46774	return c
46775}
46776
46777// Header returns an http.Header that can be modified by the caller to
46778// add HTTP headers to the request.
46779func (c *SubaccountsGetCall) Header() http.Header {
46780	if c.header_ == nil {
46781		c.header_ = make(http.Header)
46782	}
46783	return c.header_
46784}
46785
46786func (c *SubaccountsGetCall) doRequest(alt string) (*http.Response, error) {
46787	reqHeaders := make(http.Header)
46788	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
46789	for k, v := range c.header_ {
46790		reqHeaders[k] = v
46791	}
46792	reqHeaders.Set("User-Agent", c.s.userAgent())
46793	if c.ifNoneMatch_ != "" {
46794		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46795	}
46796	var body io.Reader = nil
46797	c.urlParams_.Set("alt", alt)
46798	c.urlParams_.Set("prettyPrint", "false")
46799	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts/{id}")
46800	urls += "?" + c.urlParams_.Encode()
46801	req, err := http.NewRequest("GET", urls, body)
46802	if err != nil {
46803		return nil, err
46804	}
46805	req.Header = reqHeaders
46806	googleapi.Expand(req.URL, map[string]string{
46807		"profileId": strconv.FormatInt(c.profileId, 10),
46808		"id":        strconv.FormatInt(c.id, 10),
46809	})
46810	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46811}
46812
46813// Do executes the "dfareporting.subaccounts.get" call.
46814// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
46815// status code is an error. Response headers are in either
46816// *Subaccount.ServerResponse.Header or (if a response was returned at
46817// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46818// to check whether the returned error was because
46819// http.StatusNotModified was returned.
46820func (c *SubaccountsGetCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
46821	gensupport.SetOptions(c.urlParams_, opts...)
46822	res, err := c.doRequest("json")
46823	if res != nil && res.StatusCode == http.StatusNotModified {
46824		if res.Body != nil {
46825			res.Body.Close()
46826		}
46827		return nil, &googleapi.Error{
46828			Code:   res.StatusCode,
46829			Header: res.Header,
46830		}
46831	}
46832	if err != nil {
46833		return nil, err
46834	}
46835	defer googleapi.CloseBody(res)
46836	if err := googleapi.CheckResponse(res); err != nil {
46837		return nil, err
46838	}
46839	ret := &Subaccount{
46840		ServerResponse: googleapi.ServerResponse{
46841			Header:         res.Header,
46842			HTTPStatusCode: res.StatusCode,
46843		},
46844	}
46845	target := &ret
46846	if err := gensupport.DecodeResponse(target, res); err != nil {
46847		return nil, err
46848	}
46849	return ret, nil
46850	// {
46851	//   "description": "Gets one subaccount by ID.",
46852	//   "httpMethod": "GET",
46853	//   "id": "dfareporting.subaccounts.get",
46854	//   "parameterOrder": [
46855	//     "profileId",
46856	//     "id"
46857	//   ],
46858	//   "parameters": {
46859	//     "id": {
46860	//       "description": "Subaccount ID.",
46861	//       "format": "int64",
46862	//       "location": "path",
46863	//       "required": true,
46864	//       "type": "string"
46865	//     },
46866	//     "profileId": {
46867	//       "description": "User profile ID associated with this request.",
46868	//       "format": "int64",
46869	//       "location": "path",
46870	//       "required": true,
46871	//       "type": "string"
46872	//     }
46873	//   },
46874	//   "path": "userprofiles/{profileId}/subaccounts/{id}",
46875	//   "response": {
46876	//     "$ref": "Subaccount"
46877	//   },
46878	//   "scopes": [
46879	//     "https://www.googleapis.com/auth/dfatrafficking"
46880	//   ]
46881	// }
46882
46883}
46884
46885// method id "dfareporting.subaccounts.insert":
46886
46887type SubaccountsInsertCall struct {
46888	s          *Service
46889	profileId  int64
46890	subaccount *Subaccount
46891	urlParams_ gensupport.URLParams
46892	ctx_       context.Context
46893	header_    http.Header
46894}
46895
46896// Insert: Inserts a new subaccount.
46897func (r *SubaccountsService) Insert(profileId int64, subaccount *Subaccount) *SubaccountsInsertCall {
46898	c := &SubaccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46899	c.profileId = profileId
46900	c.subaccount = subaccount
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 *SubaccountsInsertCall) Fields(s ...googleapi.Field) *SubaccountsInsertCall {
46908	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46909	return c
46910}
46911
46912// Context sets the context to be used in this call's Do method. Any
46913// pending HTTP request will be aborted if the provided context is
46914// canceled.
46915func (c *SubaccountsInsertCall) Context(ctx context.Context) *SubaccountsInsertCall {
46916	c.ctx_ = ctx
46917	return c
46918}
46919
46920// Header returns an http.Header that can be modified by the caller to
46921// add HTTP headers to the request.
46922func (c *SubaccountsInsertCall) Header() http.Header {
46923	if c.header_ == nil {
46924		c.header_ = make(http.Header)
46925	}
46926	return c.header_
46927}
46928
46929func (c *SubaccountsInsertCall) doRequest(alt string) (*http.Response, error) {
46930	reqHeaders := make(http.Header)
46931	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
46932	for k, v := range c.header_ {
46933		reqHeaders[k] = v
46934	}
46935	reqHeaders.Set("User-Agent", c.s.userAgent())
46936	var body io.Reader = nil
46937	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
46938	if err != nil {
46939		return nil, err
46940	}
46941	reqHeaders.Set("Content-Type", "application/json")
46942	c.urlParams_.Set("alt", alt)
46943	c.urlParams_.Set("prettyPrint", "false")
46944	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
46945	urls += "?" + c.urlParams_.Encode()
46946	req, err := http.NewRequest("POST", urls, body)
46947	if err != nil {
46948		return nil, err
46949	}
46950	req.Header = reqHeaders
46951	googleapi.Expand(req.URL, map[string]string{
46952		"profileId": strconv.FormatInt(c.profileId, 10),
46953	})
46954	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46955}
46956
46957// Do executes the "dfareporting.subaccounts.insert" call.
46958// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
46959// status code is an error. Response headers are in either
46960// *Subaccount.ServerResponse.Header or (if a response was returned at
46961// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46962// to check whether the returned error was because
46963// http.StatusNotModified was returned.
46964func (c *SubaccountsInsertCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
46965	gensupport.SetOptions(c.urlParams_, opts...)
46966	res, err := c.doRequest("json")
46967	if res != nil && res.StatusCode == http.StatusNotModified {
46968		if res.Body != nil {
46969			res.Body.Close()
46970		}
46971		return nil, &googleapi.Error{
46972			Code:   res.StatusCode,
46973			Header: res.Header,
46974		}
46975	}
46976	if err != nil {
46977		return nil, err
46978	}
46979	defer googleapi.CloseBody(res)
46980	if err := googleapi.CheckResponse(res); err != nil {
46981		return nil, err
46982	}
46983	ret := &Subaccount{
46984		ServerResponse: googleapi.ServerResponse{
46985			Header:         res.Header,
46986			HTTPStatusCode: res.StatusCode,
46987		},
46988	}
46989	target := &ret
46990	if err := gensupport.DecodeResponse(target, res); err != nil {
46991		return nil, err
46992	}
46993	return ret, nil
46994	// {
46995	//   "description": "Inserts a new subaccount.",
46996	//   "httpMethod": "POST",
46997	//   "id": "dfareporting.subaccounts.insert",
46998	//   "parameterOrder": [
46999	//     "profileId"
47000	//   ],
47001	//   "parameters": {
47002	//     "profileId": {
47003	//       "description": "User profile ID associated with this request.",
47004	//       "format": "int64",
47005	//       "location": "path",
47006	//       "required": true,
47007	//       "type": "string"
47008	//     }
47009	//   },
47010	//   "path": "userprofiles/{profileId}/subaccounts",
47011	//   "request": {
47012	//     "$ref": "Subaccount"
47013	//   },
47014	//   "response": {
47015	//     "$ref": "Subaccount"
47016	//   },
47017	//   "scopes": [
47018	//     "https://www.googleapis.com/auth/dfatrafficking"
47019	//   ]
47020	// }
47021
47022}
47023
47024// method id "dfareporting.subaccounts.list":
47025
47026type SubaccountsListCall struct {
47027	s            *Service
47028	profileId    int64
47029	urlParams_   gensupport.URLParams
47030	ifNoneMatch_ string
47031	ctx_         context.Context
47032	header_      http.Header
47033}
47034
47035// List: Gets a list of subaccounts, possibly filtered. This method
47036// supports paging.
47037func (r *SubaccountsService) List(profileId int64) *SubaccountsListCall {
47038	c := &SubaccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47039	c.profileId = profileId
47040	return c
47041}
47042
47043// Ids sets the optional parameter "ids": Select only subaccounts with
47044// these IDs.
47045func (c *SubaccountsListCall) Ids(ids ...int64) *SubaccountsListCall {
47046	var ids_ []string
47047	for _, v := range ids {
47048		ids_ = append(ids_, fmt.Sprint(v))
47049	}
47050	c.urlParams_.SetMulti("ids", ids_)
47051	return c
47052}
47053
47054// MaxResults sets the optional parameter "maxResults": Maximum number
47055// of results to return.
47056func (c *SubaccountsListCall) MaxResults(maxResults int64) *SubaccountsListCall {
47057	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47058	return c
47059}
47060
47061// PageToken sets the optional parameter "pageToken": Value of the
47062// nextPageToken from the previous result page.
47063func (c *SubaccountsListCall) PageToken(pageToken string) *SubaccountsListCall {
47064	c.urlParams_.Set("pageToken", pageToken)
47065	return c
47066}
47067
47068// SearchString sets the optional parameter "searchString": Allows
47069// searching for objects by name or ID. Wildcards (*) are allowed. For
47070// example, "subaccount*2015" will return objects with names like
47071// "subaccount June 2015", "subaccount April 2015", or simply
47072// "subaccount 2015". Most of the searches also add wildcards implicitly
47073// at the start and the end of the search string. For example, a search
47074// string of "subaccount" will match objects with name "my subaccount",
47075// "subaccount 2015", or simply "subaccount".
47076func (c *SubaccountsListCall) SearchString(searchString string) *SubaccountsListCall {
47077	c.urlParams_.Set("searchString", searchString)
47078	return c
47079}
47080
47081// SortField sets the optional parameter "sortField": Field by which to
47082// sort the list.
47083//
47084// Possible values:
47085//   "ID" (default)
47086//   "NAME"
47087func (c *SubaccountsListCall) SortField(sortField string) *SubaccountsListCall {
47088	c.urlParams_.Set("sortField", sortField)
47089	return c
47090}
47091
47092// SortOrder sets the optional parameter "sortOrder": Order of sorted
47093// results.
47094//
47095// Possible values:
47096//   "ASCENDING" (default)
47097//   "DESCENDING"
47098func (c *SubaccountsListCall) SortOrder(sortOrder string) *SubaccountsListCall {
47099	c.urlParams_.Set("sortOrder", sortOrder)
47100	return c
47101}
47102
47103// Fields allows partial responses to be retrieved. See
47104// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47105// for more information.
47106func (c *SubaccountsListCall) Fields(s ...googleapi.Field) *SubaccountsListCall {
47107	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47108	return c
47109}
47110
47111// IfNoneMatch sets the optional parameter which makes the operation
47112// fail if the object's ETag matches the given value. This is useful for
47113// getting updates only after the object has changed since the last
47114// request. Use googleapi.IsNotModified to check whether the response
47115// error from Do is the result of In-None-Match.
47116func (c *SubaccountsListCall) IfNoneMatch(entityTag string) *SubaccountsListCall {
47117	c.ifNoneMatch_ = entityTag
47118	return c
47119}
47120
47121// Context sets the context to be used in this call's Do method. Any
47122// pending HTTP request will be aborted if the provided context is
47123// canceled.
47124func (c *SubaccountsListCall) Context(ctx context.Context) *SubaccountsListCall {
47125	c.ctx_ = ctx
47126	return c
47127}
47128
47129// Header returns an http.Header that can be modified by the caller to
47130// add HTTP headers to the request.
47131func (c *SubaccountsListCall) Header() http.Header {
47132	if c.header_ == nil {
47133		c.header_ = make(http.Header)
47134	}
47135	return c.header_
47136}
47137
47138func (c *SubaccountsListCall) doRequest(alt string) (*http.Response, error) {
47139	reqHeaders := make(http.Header)
47140	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
47141	for k, v := range c.header_ {
47142		reqHeaders[k] = v
47143	}
47144	reqHeaders.Set("User-Agent", c.s.userAgent())
47145	if c.ifNoneMatch_ != "" {
47146		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47147	}
47148	var body io.Reader = nil
47149	c.urlParams_.Set("alt", alt)
47150	c.urlParams_.Set("prettyPrint", "false")
47151	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47152	urls += "?" + c.urlParams_.Encode()
47153	req, err := http.NewRequest("GET", urls, body)
47154	if err != nil {
47155		return nil, err
47156	}
47157	req.Header = reqHeaders
47158	googleapi.Expand(req.URL, map[string]string{
47159		"profileId": strconv.FormatInt(c.profileId, 10),
47160	})
47161	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47162}
47163
47164// Do executes the "dfareporting.subaccounts.list" call.
47165// Exactly one of *SubaccountsListResponse or error will be non-nil. Any
47166// non-2xx status code is an error. Response headers are in either
47167// *SubaccountsListResponse.ServerResponse.Header or (if a response was
47168// returned at all) in error.(*googleapi.Error).Header. Use
47169// googleapi.IsNotModified to check whether the returned error was
47170// because http.StatusNotModified was returned.
47171func (c *SubaccountsListCall) Do(opts ...googleapi.CallOption) (*SubaccountsListResponse, error) {
47172	gensupport.SetOptions(c.urlParams_, opts...)
47173	res, err := c.doRequest("json")
47174	if res != nil && res.StatusCode == http.StatusNotModified {
47175		if res.Body != nil {
47176			res.Body.Close()
47177		}
47178		return nil, &googleapi.Error{
47179			Code:   res.StatusCode,
47180			Header: res.Header,
47181		}
47182	}
47183	if err != nil {
47184		return nil, err
47185	}
47186	defer googleapi.CloseBody(res)
47187	if err := googleapi.CheckResponse(res); err != nil {
47188		return nil, err
47189	}
47190	ret := &SubaccountsListResponse{
47191		ServerResponse: googleapi.ServerResponse{
47192			Header:         res.Header,
47193			HTTPStatusCode: res.StatusCode,
47194		},
47195	}
47196	target := &ret
47197	if err := gensupport.DecodeResponse(target, res); err != nil {
47198		return nil, err
47199	}
47200	return ret, nil
47201	// {
47202	//   "description": "Gets a list of subaccounts, possibly filtered. This method supports paging.",
47203	//   "httpMethod": "GET",
47204	//   "id": "dfareporting.subaccounts.list",
47205	//   "parameterOrder": [
47206	//     "profileId"
47207	//   ],
47208	//   "parameters": {
47209	//     "ids": {
47210	//       "description": "Select only subaccounts with these IDs.",
47211	//       "format": "int64",
47212	//       "location": "query",
47213	//       "repeated": true,
47214	//       "type": "string"
47215	//     },
47216	//     "maxResults": {
47217	//       "default": "1000",
47218	//       "description": "Maximum number of results to return.",
47219	//       "format": "int32",
47220	//       "location": "query",
47221	//       "maximum": "1000",
47222	//       "minimum": "0",
47223	//       "type": "integer"
47224	//     },
47225	//     "pageToken": {
47226	//       "description": "Value of the nextPageToken from the previous result page.",
47227	//       "location": "query",
47228	//       "type": "string"
47229	//     },
47230	//     "profileId": {
47231	//       "description": "User profile ID associated with this request.",
47232	//       "format": "int64",
47233	//       "location": "path",
47234	//       "required": true,
47235	//       "type": "string"
47236	//     },
47237	//     "searchString": {
47238	//       "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\".",
47239	//       "location": "query",
47240	//       "type": "string"
47241	//     },
47242	//     "sortField": {
47243	//       "default": "ID",
47244	//       "description": "Field by which to sort the list.",
47245	//       "enum": [
47246	//         "ID",
47247	//         "NAME"
47248	//       ],
47249	//       "enumDescriptions": [
47250	//         "",
47251	//         ""
47252	//       ],
47253	//       "location": "query",
47254	//       "type": "string"
47255	//     },
47256	//     "sortOrder": {
47257	//       "default": "ASCENDING",
47258	//       "description": "Order of sorted results.",
47259	//       "enum": [
47260	//         "ASCENDING",
47261	//         "DESCENDING"
47262	//       ],
47263	//       "enumDescriptions": [
47264	//         "",
47265	//         ""
47266	//       ],
47267	//       "location": "query",
47268	//       "type": "string"
47269	//     }
47270	//   },
47271	//   "path": "userprofiles/{profileId}/subaccounts",
47272	//   "response": {
47273	//     "$ref": "SubaccountsListResponse"
47274	//   },
47275	//   "scopes": [
47276	//     "https://www.googleapis.com/auth/dfatrafficking"
47277	//   ]
47278	// }
47279
47280}
47281
47282// Pages invokes f for each page of results.
47283// A non-nil error returned from f will halt the iteration.
47284// The provided context supersedes any context provided to the Context method.
47285func (c *SubaccountsListCall) Pages(ctx context.Context, f func(*SubaccountsListResponse) error) error {
47286	c.ctx_ = ctx
47287	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47288	for {
47289		x, err := c.Do()
47290		if err != nil {
47291			return err
47292		}
47293		if err := f(x); err != nil {
47294			return err
47295		}
47296		if x.NextPageToken == "" {
47297			return nil
47298		}
47299		c.PageToken(x.NextPageToken)
47300	}
47301}
47302
47303// method id "dfareporting.subaccounts.patch":
47304
47305type SubaccountsPatchCall struct {
47306	s          *Service
47307	profileId  int64
47308	subaccount *Subaccount
47309	urlParams_ gensupport.URLParams
47310	ctx_       context.Context
47311	header_    http.Header
47312}
47313
47314// Patch: Updates an existing subaccount. This method supports patch
47315// semantics.
47316func (r *SubaccountsService) Patch(profileId int64, id int64, subaccount *Subaccount) *SubaccountsPatchCall {
47317	c := &SubaccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47318	c.profileId = profileId
47319	c.urlParams_.Set("id", fmt.Sprint(id))
47320	c.subaccount = subaccount
47321	return c
47322}
47323
47324// Fields allows partial responses to be retrieved. See
47325// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47326// for more information.
47327func (c *SubaccountsPatchCall) Fields(s ...googleapi.Field) *SubaccountsPatchCall {
47328	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47329	return c
47330}
47331
47332// Context sets the context to be used in this call's Do method. Any
47333// pending HTTP request will be aborted if the provided context is
47334// canceled.
47335func (c *SubaccountsPatchCall) Context(ctx context.Context) *SubaccountsPatchCall {
47336	c.ctx_ = ctx
47337	return c
47338}
47339
47340// Header returns an http.Header that can be modified by the caller to
47341// add HTTP headers to the request.
47342func (c *SubaccountsPatchCall) Header() http.Header {
47343	if c.header_ == nil {
47344		c.header_ = make(http.Header)
47345	}
47346	return c.header_
47347}
47348
47349func (c *SubaccountsPatchCall) doRequest(alt string) (*http.Response, error) {
47350	reqHeaders := make(http.Header)
47351	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
47352	for k, v := range c.header_ {
47353		reqHeaders[k] = v
47354	}
47355	reqHeaders.Set("User-Agent", c.s.userAgent())
47356	var body io.Reader = nil
47357	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47358	if err != nil {
47359		return nil, err
47360	}
47361	reqHeaders.Set("Content-Type", "application/json")
47362	c.urlParams_.Set("alt", alt)
47363	c.urlParams_.Set("prettyPrint", "false")
47364	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47365	urls += "?" + c.urlParams_.Encode()
47366	req, err := http.NewRequest("PATCH", urls, body)
47367	if err != nil {
47368		return nil, err
47369	}
47370	req.Header = reqHeaders
47371	googleapi.Expand(req.URL, map[string]string{
47372		"profileId": strconv.FormatInt(c.profileId, 10),
47373	})
47374	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47375}
47376
47377// Do executes the "dfareporting.subaccounts.patch" call.
47378// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
47379// status code is an error. Response headers are in either
47380// *Subaccount.ServerResponse.Header or (if a response was returned at
47381// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47382// to check whether the returned error was because
47383// http.StatusNotModified was returned.
47384func (c *SubaccountsPatchCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47385	gensupport.SetOptions(c.urlParams_, opts...)
47386	res, err := c.doRequest("json")
47387	if res != nil && res.StatusCode == http.StatusNotModified {
47388		if res.Body != nil {
47389			res.Body.Close()
47390		}
47391		return nil, &googleapi.Error{
47392			Code:   res.StatusCode,
47393			Header: res.Header,
47394		}
47395	}
47396	if err != nil {
47397		return nil, err
47398	}
47399	defer googleapi.CloseBody(res)
47400	if err := googleapi.CheckResponse(res); err != nil {
47401		return nil, err
47402	}
47403	ret := &Subaccount{
47404		ServerResponse: googleapi.ServerResponse{
47405			Header:         res.Header,
47406			HTTPStatusCode: res.StatusCode,
47407		},
47408	}
47409	target := &ret
47410	if err := gensupport.DecodeResponse(target, res); err != nil {
47411		return nil, err
47412	}
47413	return ret, nil
47414	// {
47415	//   "description": "Updates an existing subaccount. This method supports patch semantics.",
47416	//   "httpMethod": "PATCH",
47417	//   "id": "dfareporting.subaccounts.patch",
47418	//   "parameterOrder": [
47419	//     "profileId",
47420	//     "id"
47421	//   ],
47422	//   "parameters": {
47423	//     "id": {
47424	//       "description": "Subaccount ID.",
47425	//       "format": "int64",
47426	//       "location": "query",
47427	//       "required": true,
47428	//       "type": "string"
47429	//     },
47430	//     "profileId": {
47431	//       "description": "User profile ID associated with this request.",
47432	//       "format": "int64",
47433	//       "location": "path",
47434	//       "required": true,
47435	//       "type": "string"
47436	//     }
47437	//   },
47438	//   "path": "userprofiles/{profileId}/subaccounts",
47439	//   "request": {
47440	//     "$ref": "Subaccount"
47441	//   },
47442	//   "response": {
47443	//     "$ref": "Subaccount"
47444	//   },
47445	//   "scopes": [
47446	//     "https://www.googleapis.com/auth/dfatrafficking"
47447	//   ]
47448	// }
47449
47450}
47451
47452// method id "dfareporting.subaccounts.update":
47453
47454type SubaccountsUpdateCall struct {
47455	s          *Service
47456	profileId  int64
47457	subaccount *Subaccount
47458	urlParams_ gensupport.URLParams
47459	ctx_       context.Context
47460	header_    http.Header
47461}
47462
47463// Update: Updates an existing subaccount.
47464func (r *SubaccountsService) Update(profileId int64, subaccount *Subaccount) *SubaccountsUpdateCall {
47465	c := &SubaccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47466	c.profileId = profileId
47467	c.subaccount = subaccount
47468	return c
47469}
47470
47471// Fields allows partial responses to be retrieved. See
47472// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47473// for more information.
47474func (c *SubaccountsUpdateCall) Fields(s ...googleapi.Field) *SubaccountsUpdateCall {
47475	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47476	return c
47477}
47478
47479// Context sets the context to be used in this call's Do method. Any
47480// pending HTTP request will be aborted if the provided context is
47481// canceled.
47482func (c *SubaccountsUpdateCall) Context(ctx context.Context) *SubaccountsUpdateCall {
47483	c.ctx_ = ctx
47484	return c
47485}
47486
47487// Header returns an http.Header that can be modified by the caller to
47488// add HTTP headers to the request.
47489func (c *SubaccountsUpdateCall) Header() http.Header {
47490	if c.header_ == nil {
47491		c.header_ = make(http.Header)
47492	}
47493	return c.header_
47494}
47495
47496func (c *SubaccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
47497	reqHeaders := make(http.Header)
47498	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
47499	for k, v := range c.header_ {
47500		reqHeaders[k] = v
47501	}
47502	reqHeaders.Set("User-Agent", c.s.userAgent())
47503	var body io.Reader = nil
47504	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47505	if err != nil {
47506		return nil, err
47507	}
47508	reqHeaders.Set("Content-Type", "application/json")
47509	c.urlParams_.Set("alt", alt)
47510	c.urlParams_.Set("prettyPrint", "false")
47511	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47512	urls += "?" + c.urlParams_.Encode()
47513	req, err := http.NewRequest("PUT", urls, body)
47514	if err != nil {
47515		return nil, err
47516	}
47517	req.Header = reqHeaders
47518	googleapi.Expand(req.URL, map[string]string{
47519		"profileId": strconv.FormatInt(c.profileId, 10),
47520	})
47521	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47522}
47523
47524// Do executes the "dfareporting.subaccounts.update" call.
47525// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
47526// status code is an error. Response headers are in either
47527// *Subaccount.ServerResponse.Header or (if a response was returned at
47528// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47529// to check whether the returned error was because
47530// http.StatusNotModified was returned.
47531func (c *SubaccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47532	gensupport.SetOptions(c.urlParams_, opts...)
47533	res, err := c.doRequest("json")
47534	if res != nil && res.StatusCode == http.StatusNotModified {
47535		if res.Body != nil {
47536			res.Body.Close()
47537		}
47538		return nil, &googleapi.Error{
47539			Code:   res.StatusCode,
47540			Header: res.Header,
47541		}
47542	}
47543	if err != nil {
47544		return nil, err
47545	}
47546	defer googleapi.CloseBody(res)
47547	if err := googleapi.CheckResponse(res); err != nil {
47548		return nil, err
47549	}
47550	ret := &Subaccount{
47551		ServerResponse: googleapi.ServerResponse{
47552			Header:         res.Header,
47553			HTTPStatusCode: res.StatusCode,
47554		},
47555	}
47556	target := &ret
47557	if err := gensupport.DecodeResponse(target, res); err != nil {
47558		return nil, err
47559	}
47560	return ret, nil
47561	// {
47562	//   "description": "Updates an existing subaccount.",
47563	//   "httpMethod": "PUT",
47564	//   "id": "dfareporting.subaccounts.update",
47565	//   "parameterOrder": [
47566	//     "profileId"
47567	//   ],
47568	//   "parameters": {
47569	//     "profileId": {
47570	//       "description": "User profile ID associated with this request.",
47571	//       "format": "int64",
47572	//       "location": "path",
47573	//       "required": true,
47574	//       "type": "string"
47575	//     }
47576	//   },
47577	//   "path": "userprofiles/{profileId}/subaccounts",
47578	//   "request": {
47579	//     "$ref": "Subaccount"
47580	//   },
47581	//   "response": {
47582	//     "$ref": "Subaccount"
47583	//   },
47584	//   "scopes": [
47585	//     "https://www.googleapis.com/auth/dfatrafficking"
47586	//   ]
47587	// }
47588
47589}
47590
47591// method id "dfareporting.targetableRemarketingLists.get":
47592
47593type TargetableRemarketingListsGetCall struct {
47594	s            *Service
47595	profileId    int64
47596	id           int64
47597	urlParams_   gensupport.URLParams
47598	ifNoneMatch_ string
47599	ctx_         context.Context
47600	header_      http.Header
47601}
47602
47603// Get: Gets one remarketing list by ID.
47604func (r *TargetableRemarketingListsService) Get(profileId int64, id int64) *TargetableRemarketingListsGetCall {
47605	c := &TargetableRemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47606	c.profileId = profileId
47607	c.id = id
47608	return c
47609}
47610
47611// Fields allows partial responses to be retrieved. See
47612// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47613// for more information.
47614func (c *TargetableRemarketingListsGetCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsGetCall {
47615	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47616	return c
47617}
47618
47619// IfNoneMatch sets the optional parameter which makes the operation
47620// fail if the object's ETag matches the given value. This is useful for
47621// getting updates only after the object has changed since the last
47622// request. Use googleapi.IsNotModified to check whether the response
47623// error from Do is the result of In-None-Match.
47624func (c *TargetableRemarketingListsGetCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsGetCall {
47625	c.ifNoneMatch_ = entityTag
47626	return c
47627}
47628
47629// Context sets the context to be used in this call's Do method. Any
47630// pending HTTP request will be aborted if the provided context is
47631// canceled.
47632func (c *TargetableRemarketingListsGetCall) Context(ctx context.Context) *TargetableRemarketingListsGetCall {
47633	c.ctx_ = ctx
47634	return c
47635}
47636
47637// Header returns an http.Header that can be modified by the caller to
47638// add HTTP headers to the request.
47639func (c *TargetableRemarketingListsGetCall) Header() http.Header {
47640	if c.header_ == nil {
47641		c.header_ = make(http.Header)
47642	}
47643	return c.header_
47644}
47645
47646func (c *TargetableRemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
47647	reqHeaders := make(http.Header)
47648	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
47649	for k, v := range c.header_ {
47650		reqHeaders[k] = v
47651	}
47652	reqHeaders.Set("User-Agent", c.s.userAgent())
47653	if c.ifNoneMatch_ != "" {
47654		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47655	}
47656	var body io.Reader = nil
47657	c.urlParams_.Set("alt", alt)
47658	c.urlParams_.Set("prettyPrint", "false")
47659	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists/{id}")
47660	urls += "?" + c.urlParams_.Encode()
47661	req, err := http.NewRequest("GET", urls, body)
47662	if err != nil {
47663		return nil, err
47664	}
47665	req.Header = reqHeaders
47666	googleapi.Expand(req.URL, map[string]string{
47667		"profileId": strconv.FormatInt(c.profileId, 10),
47668		"id":        strconv.FormatInt(c.id, 10),
47669	})
47670	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47671}
47672
47673// Do executes the "dfareporting.targetableRemarketingLists.get" call.
47674// Exactly one of *TargetableRemarketingList or error will be non-nil.
47675// Any non-2xx status code is an error. Response headers are in either
47676// *TargetableRemarketingList.ServerResponse.Header or (if a response
47677// was returned at all) in error.(*googleapi.Error).Header. Use
47678// googleapi.IsNotModified to check whether the returned error was
47679// because http.StatusNotModified was returned.
47680func (c *TargetableRemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingList, error) {
47681	gensupport.SetOptions(c.urlParams_, opts...)
47682	res, err := c.doRequest("json")
47683	if res != nil && res.StatusCode == http.StatusNotModified {
47684		if res.Body != nil {
47685			res.Body.Close()
47686		}
47687		return nil, &googleapi.Error{
47688			Code:   res.StatusCode,
47689			Header: res.Header,
47690		}
47691	}
47692	if err != nil {
47693		return nil, err
47694	}
47695	defer googleapi.CloseBody(res)
47696	if err := googleapi.CheckResponse(res); err != nil {
47697		return nil, err
47698	}
47699	ret := &TargetableRemarketingList{
47700		ServerResponse: googleapi.ServerResponse{
47701			Header:         res.Header,
47702			HTTPStatusCode: res.StatusCode,
47703		},
47704	}
47705	target := &ret
47706	if err := gensupport.DecodeResponse(target, res); err != nil {
47707		return nil, err
47708	}
47709	return ret, nil
47710	// {
47711	//   "description": "Gets one remarketing list by ID.",
47712	//   "httpMethod": "GET",
47713	//   "id": "dfareporting.targetableRemarketingLists.get",
47714	//   "parameterOrder": [
47715	//     "profileId",
47716	//     "id"
47717	//   ],
47718	//   "parameters": {
47719	//     "id": {
47720	//       "description": "Remarketing list ID.",
47721	//       "format": "int64",
47722	//       "location": "path",
47723	//       "required": true,
47724	//       "type": "string"
47725	//     },
47726	//     "profileId": {
47727	//       "description": "User profile ID associated with this request.",
47728	//       "format": "int64",
47729	//       "location": "path",
47730	//       "required": true,
47731	//       "type": "string"
47732	//     }
47733	//   },
47734	//   "path": "userprofiles/{profileId}/targetableRemarketingLists/{id}",
47735	//   "response": {
47736	//     "$ref": "TargetableRemarketingList"
47737	//   },
47738	//   "scopes": [
47739	//     "https://www.googleapis.com/auth/dfatrafficking"
47740	//   ]
47741	// }
47742
47743}
47744
47745// method id "dfareporting.targetableRemarketingLists.list":
47746
47747type TargetableRemarketingListsListCall struct {
47748	s            *Service
47749	profileId    int64
47750	urlParams_   gensupport.URLParams
47751	ifNoneMatch_ string
47752	ctx_         context.Context
47753	header_      http.Header
47754}
47755
47756// List: Retrieves a list of targetable remarketing lists, possibly
47757// filtered. This method supports paging.
47758func (r *TargetableRemarketingListsService) List(profileId int64, advertiserId int64) *TargetableRemarketingListsListCall {
47759	c := &TargetableRemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47760	c.profileId = profileId
47761	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
47762	return c
47763}
47764
47765// Active sets the optional parameter "active": Select only active or
47766// only inactive targetable remarketing lists.
47767func (c *TargetableRemarketingListsListCall) Active(active bool) *TargetableRemarketingListsListCall {
47768	c.urlParams_.Set("active", fmt.Sprint(active))
47769	return c
47770}
47771
47772// MaxResults sets the optional parameter "maxResults": Maximum number
47773// of results to return.
47774func (c *TargetableRemarketingListsListCall) MaxResults(maxResults int64) *TargetableRemarketingListsListCall {
47775	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47776	return c
47777}
47778
47779// Name sets the optional parameter "name": Allows searching for objects
47780// by name or ID. Wildcards (*) are allowed. For example, "remarketing
47781// list*2015" will return objects with names like "remarketing list June
47782// 2015", "remarketing list April 2015", or simply "remarketing list
47783// 2015". Most of the searches also add wildcards implicitly at the
47784// start and the end of the search string. For example, a search string
47785// of "remarketing list" will match objects with name "my remarketing
47786// list", "remarketing list 2015", or simply "remarketing list".
47787func (c *TargetableRemarketingListsListCall) Name(name string) *TargetableRemarketingListsListCall {
47788	c.urlParams_.Set("name", name)
47789	return c
47790}
47791
47792// PageToken sets the optional parameter "pageToken": Value of the
47793// nextPageToken from the previous result page.
47794func (c *TargetableRemarketingListsListCall) PageToken(pageToken string) *TargetableRemarketingListsListCall {
47795	c.urlParams_.Set("pageToken", pageToken)
47796	return c
47797}
47798
47799// SortField sets the optional parameter "sortField": Field by which to
47800// sort the list.
47801//
47802// Possible values:
47803//   "ID" (default)
47804//   "NAME"
47805func (c *TargetableRemarketingListsListCall) SortField(sortField string) *TargetableRemarketingListsListCall {
47806	c.urlParams_.Set("sortField", sortField)
47807	return c
47808}
47809
47810// SortOrder sets the optional parameter "sortOrder": Order of sorted
47811// results.
47812//
47813// Possible values:
47814//   "ASCENDING" (default)
47815//   "DESCENDING"
47816func (c *TargetableRemarketingListsListCall) SortOrder(sortOrder string) *TargetableRemarketingListsListCall {
47817	c.urlParams_.Set("sortOrder", sortOrder)
47818	return c
47819}
47820
47821// Fields allows partial responses to be retrieved. See
47822// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47823// for more information.
47824func (c *TargetableRemarketingListsListCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsListCall {
47825	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47826	return c
47827}
47828
47829// IfNoneMatch sets the optional parameter which makes the operation
47830// fail if the object's ETag matches the given value. This is useful for
47831// getting updates only after the object has changed since the last
47832// request. Use googleapi.IsNotModified to check whether the response
47833// error from Do is the result of In-None-Match.
47834func (c *TargetableRemarketingListsListCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsListCall {
47835	c.ifNoneMatch_ = entityTag
47836	return c
47837}
47838
47839// Context sets the context to be used in this call's Do method. Any
47840// pending HTTP request will be aborted if the provided context is
47841// canceled.
47842func (c *TargetableRemarketingListsListCall) Context(ctx context.Context) *TargetableRemarketingListsListCall {
47843	c.ctx_ = ctx
47844	return c
47845}
47846
47847// Header returns an http.Header that can be modified by the caller to
47848// add HTTP headers to the request.
47849func (c *TargetableRemarketingListsListCall) Header() http.Header {
47850	if c.header_ == nil {
47851		c.header_ = make(http.Header)
47852	}
47853	return c.header_
47854}
47855
47856func (c *TargetableRemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
47857	reqHeaders := make(http.Header)
47858	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
47859	for k, v := range c.header_ {
47860		reqHeaders[k] = v
47861	}
47862	reqHeaders.Set("User-Agent", c.s.userAgent())
47863	if c.ifNoneMatch_ != "" {
47864		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47865	}
47866	var body io.Reader = nil
47867	c.urlParams_.Set("alt", alt)
47868	c.urlParams_.Set("prettyPrint", "false")
47869	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists")
47870	urls += "?" + c.urlParams_.Encode()
47871	req, err := http.NewRequest("GET", urls, body)
47872	if err != nil {
47873		return nil, err
47874	}
47875	req.Header = reqHeaders
47876	googleapi.Expand(req.URL, map[string]string{
47877		"profileId": strconv.FormatInt(c.profileId, 10),
47878	})
47879	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47880}
47881
47882// Do executes the "dfareporting.targetableRemarketingLists.list" call.
47883// Exactly one of *TargetableRemarketingListsListResponse or error will
47884// be non-nil. Any non-2xx status code is an error. Response headers are
47885// in either
47886// *TargetableRemarketingListsListResponse.ServerResponse.Header or (if
47887// a response was returned at all) in error.(*googleapi.Error).Header.
47888// Use googleapi.IsNotModified to check whether the returned error was
47889// because http.StatusNotModified was returned.
47890func (c *TargetableRemarketingListsListCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingListsListResponse, error) {
47891	gensupport.SetOptions(c.urlParams_, opts...)
47892	res, err := c.doRequest("json")
47893	if res != nil && res.StatusCode == http.StatusNotModified {
47894		if res.Body != nil {
47895			res.Body.Close()
47896		}
47897		return nil, &googleapi.Error{
47898			Code:   res.StatusCode,
47899			Header: res.Header,
47900		}
47901	}
47902	if err != nil {
47903		return nil, err
47904	}
47905	defer googleapi.CloseBody(res)
47906	if err := googleapi.CheckResponse(res); err != nil {
47907		return nil, err
47908	}
47909	ret := &TargetableRemarketingListsListResponse{
47910		ServerResponse: googleapi.ServerResponse{
47911			Header:         res.Header,
47912			HTTPStatusCode: res.StatusCode,
47913		},
47914	}
47915	target := &ret
47916	if err := gensupport.DecodeResponse(target, res); err != nil {
47917		return nil, err
47918	}
47919	return ret, nil
47920	// {
47921	//   "description": "Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging.",
47922	//   "httpMethod": "GET",
47923	//   "id": "dfareporting.targetableRemarketingLists.list",
47924	//   "parameterOrder": [
47925	//     "profileId",
47926	//     "advertiserId"
47927	//   ],
47928	//   "parameters": {
47929	//     "active": {
47930	//       "description": "Select only active or only inactive targetable remarketing lists.",
47931	//       "location": "query",
47932	//       "type": "boolean"
47933	//     },
47934	//     "advertiserId": {
47935	//       "description": "Select only targetable remarketing lists targetable by these advertisers.",
47936	//       "format": "int64",
47937	//       "location": "query",
47938	//       "required": true,
47939	//       "type": "string"
47940	//     },
47941	//     "maxResults": {
47942	//       "default": "1000",
47943	//       "description": "Maximum number of results to return.",
47944	//       "format": "int32",
47945	//       "location": "query",
47946	//       "maximum": "1000",
47947	//       "minimum": "0",
47948	//       "type": "integer"
47949	//     },
47950	//     "name": {
47951	//       "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\".",
47952	//       "location": "query",
47953	//       "type": "string"
47954	//     },
47955	//     "pageToken": {
47956	//       "description": "Value of the nextPageToken from the previous result page.",
47957	//       "location": "query",
47958	//       "type": "string"
47959	//     },
47960	//     "profileId": {
47961	//       "description": "User profile ID associated with this request.",
47962	//       "format": "int64",
47963	//       "location": "path",
47964	//       "required": true,
47965	//       "type": "string"
47966	//     },
47967	//     "sortField": {
47968	//       "default": "ID",
47969	//       "description": "Field by which to sort the list.",
47970	//       "enum": [
47971	//         "ID",
47972	//         "NAME"
47973	//       ],
47974	//       "enumDescriptions": [
47975	//         "",
47976	//         ""
47977	//       ],
47978	//       "location": "query",
47979	//       "type": "string"
47980	//     },
47981	//     "sortOrder": {
47982	//       "default": "ASCENDING",
47983	//       "description": "Order of sorted results.",
47984	//       "enum": [
47985	//         "ASCENDING",
47986	//         "DESCENDING"
47987	//       ],
47988	//       "enumDescriptions": [
47989	//         "",
47990	//         ""
47991	//       ],
47992	//       "location": "query",
47993	//       "type": "string"
47994	//     }
47995	//   },
47996	//   "path": "userprofiles/{profileId}/targetableRemarketingLists",
47997	//   "response": {
47998	//     "$ref": "TargetableRemarketingListsListResponse"
47999	//   },
48000	//   "scopes": [
48001	//     "https://www.googleapis.com/auth/dfatrafficking"
48002	//   ]
48003	// }
48004
48005}
48006
48007// Pages invokes f for each page of results.
48008// A non-nil error returned from f will halt the iteration.
48009// The provided context supersedes any context provided to the Context method.
48010func (c *TargetableRemarketingListsListCall) Pages(ctx context.Context, f func(*TargetableRemarketingListsListResponse) error) error {
48011	c.ctx_ = ctx
48012	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
48013	for {
48014		x, err := c.Do()
48015		if err != nil {
48016			return err
48017		}
48018		if err := f(x); err != nil {
48019			return err
48020		}
48021		if x.NextPageToken == "" {
48022			return nil
48023		}
48024		c.PageToken(x.NextPageToken)
48025	}
48026}
48027
48028// method id "dfareporting.targetingTemplates.get":
48029
48030type TargetingTemplatesGetCall struct {
48031	s            *Service
48032	profileId    int64
48033	id           int64
48034	urlParams_   gensupport.URLParams
48035	ifNoneMatch_ string
48036	ctx_         context.Context
48037	header_      http.Header
48038}
48039
48040// Get: Gets one targeting template by ID.
48041func (r *TargetingTemplatesService) Get(profileId int64, id int64) *TargetingTemplatesGetCall {
48042	c := &TargetingTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48043	c.profileId = profileId
48044	c.id = id
48045	return c
48046}
48047
48048// Fields allows partial responses to be retrieved. See
48049// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48050// for more information.
48051func (c *TargetingTemplatesGetCall) Fields(s ...googleapi.Field) *TargetingTemplatesGetCall {
48052	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48053	return c
48054}
48055
48056// IfNoneMatch sets the optional parameter which makes the operation
48057// fail if the object's ETag matches the given value. This is useful for
48058// getting updates only after the object has changed since the last
48059// request. Use googleapi.IsNotModified to check whether the response
48060// error from Do is the result of In-None-Match.
48061func (c *TargetingTemplatesGetCall) IfNoneMatch(entityTag string) *TargetingTemplatesGetCall {
48062	c.ifNoneMatch_ = entityTag
48063	return c
48064}
48065
48066// Context sets the context to be used in this call's Do method. Any
48067// pending HTTP request will be aborted if the provided context is
48068// canceled.
48069func (c *TargetingTemplatesGetCall) Context(ctx context.Context) *TargetingTemplatesGetCall {
48070	c.ctx_ = ctx
48071	return c
48072}
48073
48074// Header returns an http.Header that can be modified by the caller to
48075// add HTTP headers to the request.
48076func (c *TargetingTemplatesGetCall) Header() http.Header {
48077	if c.header_ == nil {
48078		c.header_ = make(http.Header)
48079	}
48080	return c.header_
48081}
48082
48083func (c *TargetingTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
48084	reqHeaders := make(http.Header)
48085	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
48086	for k, v := range c.header_ {
48087		reqHeaders[k] = v
48088	}
48089	reqHeaders.Set("User-Agent", c.s.userAgent())
48090	if c.ifNoneMatch_ != "" {
48091		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48092	}
48093	var body io.Reader = nil
48094	c.urlParams_.Set("alt", alt)
48095	c.urlParams_.Set("prettyPrint", "false")
48096	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates/{id}")
48097	urls += "?" + c.urlParams_.Encode()
48098	req, err := http.NewRequest("GET", urls, body)
48099	if err != nil {
48100		return nil, err
48101	}
48102	req.Header = reqHeaders
48103	googleapi.Expand(req.URL, map[string]string{
48104		"profileId": strconv.FormatInt(c.profileId, 10),
48105		"id":        strconv.FormatInt(c.id, 10),
48106	})
48107	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48108}
48109
48110// Do executes the "dfareporting.targetingTemplates.get" call.
48111// Exactly one of *TargetingTemplate or error will be non-nil. Any
48112// non-2xx status code is an error. Response headers are in either
48113// *TargetingTemplate.ServerResponse.Header or (if a response was
48114// returned at all) in error.(*googleapi.Error).Header. Use
48115// googleapi.IsNotModified to check whether the returned error was
48116// because http.StatusNotModified was returned.
48117func (c *TargetingTemplatesGetCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48118	gensupport.SetOptions(c.urlParams_, opts...)
48119	res, err := c.doRequest("json")
48120	if res != nil && res.StatusCode == http.StatusNotModified {
48121		if res.Body != nil {
48122			res.Body.Close()
48123		}
48124		return nil, &googleapi.Error{
48125			Code:   res.StatusCode,
48126			Header: res.Header,
48127		}
48128	}
48129	if err != nil {
48130		return nil, err
48131	}
48132	defer googleapi.CloseBody(res)
48133	if err := googleapi.CheckResponse(res); err != nil {
48134		return nil, err
48135	}
48136	ret := &TargetingTemplate{
48137		ServerResponse: googleapi.ServerResponse{
48138			Header:         res.Header,
48139			HTTPStatusCode: res.StatusCode,
48140		},
48141	}
48142	target := &ret
48143	if err := gensupport.DecodeResponse(target, res); err != nil {
48144		return nil, err
48145	}
48146	return ret, nil
48147	// {
48148	//   "description": "Gets one targeting template by ID.",
48149	//   "httpMethod": "GET",
48150	//   "id": "dfareporting.targetingTemplates.get",
48151	//   "parameterOrder": [
48152	//     "profileId",
48153	//     "id"
48154	//   ],
48155	//   "parameters": {
48156	//     "id": {
48157	//       "description": "Targeting template ID.",
48158	//       "format": "int64",
48159	//       "location": "path",
48160	//       "required": true,
48161	//       "type": "string"
48162	//     },
48163	//     "profileId": {
48164	//       "description": "User profile ID associated with this request.",
48165	//       "format": "int64",
48166	//       "location": "path",
48167	//       "required": true,
48168	//       "type": "string"
48169	//     }
48170	//   },
48171	//   "path": "userprofiles/{profileId}/targetingTemplates/{id}",
48172	//   "response": {
48173	//     "$ref": "TargetingTemplate"
48174	//   },
48175	//   "scopes": [
48176	//     "https://www.googleapis.com/auth/dfatrafficking"
48177	//   ]
48178	// }
48179
48180}
48181
48182// method id "dfareporting.targetingTemplates.insert":
48183
48184type TargetingTemplatesInsertCall struct {
48185	s                 *Service
48186	profileId         int64
48187	targetingtemplate *TargetingTemplate
48188	urlParams_        gensupport.URLParams
48189	ctx_              context.Context
48190	header_           http.Header
48191}
48192
48193// Insert: Inserts a new targeting template.
48194func (r *TargetingTemplatesService) Insert(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesInsertCall {
48195	c := &TargetingTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48196	c.profileId = profileId
48197	c.targetingtemplate = targetingtemplate
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 *TargetingTemplatesInsertCall) Fields(s ...googleapi.Field) *TargetingTemplatesInsertCall {
48205	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48206	return c
48207}
48208
48209// Context sets the context to be used in this call's Do method. Any
48210// pending HTTP request will be aborted if the provided context is
48211// canceled.
48212func (c *TargetingTemplatesInsertCall) Context(ctx context.Context) *TargetingTemplatesInsertCall {
48213	c.ctx_ = ctx
48214	return c
48215}
48216
48217// Header returns an http.Header that can be modified by the caller to
48218// add HTTP headers to the request.
48219func (c *TargetingTemplatesInsertCall) Header() http.Header {
48220	if c.header_ == nil {
48221		c.header_ = make(http.Header)
48222	}
48223	return c.header_
48224}
48225
48226func (c *TargetingTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
48227	reqHeaders := make(http.Header)
48228	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
48229	for k, v := range c.header_ {
48230		reqHeaders[k] = v
48231	}
48232	reqHeaders.Set("User-Agent", c.s.userAgent())
48233	var body io.Reader = nil
48234	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48235	if err != nil {
48236		return nil, err
48237	}
48238	reqHeaders.Set("Content-Type", "application/json")
48239	c.urlParams_.Set("alt", alt)
48240	c.urlParams_.Set("prettyPrint", "false")
48241	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48242	urls += "?" + c.urlParams_.Encode()
48243	req, err := http.NewRequest("POST", urls, body)
48244	if err != nil {
48245		return nil, err
48246	}
48247	req.Header = reqHeaders
48248	googleapi.Expand(req.URL, map[string]string{
48249		"profileId": strconv.FormatInt(c.profileId, 10),
48250	})
48251	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48252}
48253
48254// Do executes the "dfareporting.targetingTemplates.insert" call.
48255// Exactly one of *TargetingTemplate or error will be non-nil. Any
48256// non-2xx status code is an error. Response headers are in either
48257// *TargetingTemplate.ServerResponse.Header or (if a response was
48258// returned at all) in error.(*googleapi.Error).Header. Use
48259// googleapi.IsNotModified to check whether the returned error was
48260// because http.StatusNotModified was returned.
48261func (c *TargetingTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48262	gensupport.SetOptions(c.urlParams_, opts...)
48263	res, err := c.doRequest("json")
48264	if res != nil && res.StatusCode == http.StatusNotModified {
48265		if res.Body != nil {
48266			res.Body.Close()
48267		}
48268		return nil, &googleapi.Error{
48269			Code:   res.StatusCode,
48270			Header: res.Header,
48271		}
48272	}
48273	if err != nil {
48274		return nil, err
48275	}
48276	defer googleapi.CloseBody(res)
48277	if err := googleapi.CheckResponse(res); err != nil {
48278		return nil, err
48279	}
48280	ret := &TargetingTemplate{
48281		ServerResponse: googleapi.ServerResponse{
48282			Header:         res.Header,
48283			HTTPStatusCode: res.StatusCode,
48284		},
48285	}
48286	target := &ret
48287	if err := gensupport.DecodeResponse(target, res); err != nil {
48288		return nil, err
48289	}
48290	return ret, nil
48291	// {
48292	//   "description": "Inserts a new targeting template.",
48293	//   "httpMethod": "POST",
48294	//   "id": "dfareporting.targetingTemplates.insert",
48295	//   "parameterOrder": [
48296	//     "profileId"
48297	//   ],
48298	//   "parameters": {
48299	//     "profileId": {
48300	//       "description": "User profile ID associated with this request.",
48301	//       "format": "int64",
48302	//       "location": "path",
48303	//       "required": true,
48304	//       "type": "string"
48305	//     }
48306	//   },
48307	//   "path": "userprofiles/{profileId}/targetingTemplates",
48308	//   "request": {
48309	//     "$ref": "TargetingTemplate"
48310	//   },
48311	//   "response": {
48312	//     "$ref": "TargetingTemplate"
48313	//   },
48314	//   "scopes": [
48315	//     "https://www.googleapis.com/auth/dfatrafficking"
48316	//   ]
48317	// }
48318
48319}
48320
48321// method id "dfareporting.targetingTemplates.list":
48322
48323type TargetingTemplatesListCall struct {
48324	s            *Service
48325	profileId    int64
48326	urlParams_   gensupport.URLParams
48327	ifNoneMatch_ string
48328	ctx_         context.Context
48329	header_      http.Header
48330}
48331
48332// List: Retrieves a list of targeting templates, optionally filtered.
48333// This method supports paging.
48334func (r *TargetingTemplatesService) List(profileId int64) *TargetingTemplatesListCall {
48335	c := &TargetingTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48336	c.profileId = profileId
48337	return c
48338}
48339
48340// AdvertiserId sets the optional parameter "advertiserId": Select only
48341// targeting templates with this advertiser ID.
48342func (c *TargetingTemplatesListCall) AdvertiserId(advertiserId int64) *TargetingTemplatesListCall {
48343	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
48344	return c
48345}
48346
48347// Ids sets the optional parameter "ids": Select only targeting
48348// templates with these IDs.
48349func (c *TargetingTemplatesListCall) Ids(ids ...int64) *TargetingTemplatesListCall {
48350	var ids_ []string
48351	for _, v := range ids {
48352		ids_ = append(ids_, fmt.Sprint(v))
48353	}
48354	c.urlParams_.SetMulti("ids", ids_)
48355	return c
48356}
48357
48358// MaxResults sets the optional parameter "maxResults": Maximum number
48359// of results to return.
48360func (c *TargetingTemplatesListCall) MaxResults(maxResults int64) *TargetingTemplatesListCall {
48361	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
48362	return c
48363}
48364
48365// PageToken sets the optional parameter "pageToken": Value of the
48366// nextPageToken from the previous result page.
48367func (c *TargetingTemplatesListCall) PageToken(pageToken string) *TargetingTemplatesListCall {
48368	c.urlParams_.Set("pageToken", pageToken)
48369	return c
48370}
48371
48372// SearchString sets the optional parameter "searchString": Allows
48373// searching for objects by name or ID. Wildcards (*) are allowed. For
48374// example, "template*2015" will return objects with names like
48375// "template June 2015", "template April 2015", or simply "template
48376// 2015". Most of the searches also add wildcards implicitly at the
48377// start and the end of the search string. For example, a search string
48378// of "template" will match objects with name "my template", "template
48379// 2015", or simply "template".
48380func (c *TargetingTemplatesListCall) SearchString(searchString string) *TargetingTemplatesListCall {
48381	c.urlParams_.Set("searchString", searchString)
48382	return c
48383}
48384
48385// SortField sets the optional parameter "sortField": Field by which to
48386// sort the list.
48387//
48388// Possible values:
48389//   "ID" (default)
48390//   "NAME"
48391func (c *TargetingTemplatesListCall) SortField(sortField string) *TargetingTemplatesListCall {
48392	c.urlParams_.Set("sortField", sortField)
48393	return c
48394}
48395
48396// SortOrder sets the optional parameter "sortOrder": Order of sorted
48397// results.
48398//
48399// Possible values:
48400//   "ASCENDING" (default)
48401//   "DESCENDING"
48402func (c *TargetingTemplatesListCall) SortOrder(sortOrder string) *TargetingTemplatesListCall {
48403	c.urlParams_.Set("sortOrder", sortOrder)
48404	return c
48405}
48406
48407// Fields allows partial responses to be retrieved. See
48408// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48409// for more information.
48410func (c *TargetingTemplatesListCall) Fields(s ...googleapi.Field) *TargetingTemplatesListCall {
48411	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48412	return c
48413}
48414
48415// IfNoneMatch sets the optional parameter which makes the operation
48416// fail if the object's ETag matches the given value. This is useful for
48417// getting updates only after the object has changed since the last
48418// request. Use googleapi.IsNotModified to check whether the response
48419// error from Do is the result of In-None-Match.
48420func (c *TargetingTemplatesListCall) IfNoneMatch(entityTag string) *TargetingTemplatesListCall {
48421	c.ifNoneMatch_ = entityTag
48422	return c
48423}
48424
48425// Context sets the context to be used in this call's Do method. Any
48426// pending HTTP request will be aborted if the provided context is
48427// canceled.
48428func (c *TargetingTemplatesListCall) Context(ctx context.Context) *TargetingTemplatesListCall {
48429	c.ctx_ = ctx
48430	return c
48431}
48432
48433// Header returns an http.Header that can be modified by the caller to
48434// add HTTP headers to the request.
48435func (c *TargetingTemplatesListCall) Header() http.Header {
48436	if c.header_ == nil {
48437		c.header_ = make(http.Header)
48438	}
48439	return c.header_
48440}
48441
48442func (c *TargetingTemplatesListCall) doRequest(alt string) (*http.Response, error) {
48443	reqHeaders := make(http.Header)
48444	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
48445	for k, v := range c.header_ {
48446		reqHeaders[k] = v
48447	}
48448	reqHeaders.Set("User-Agent", c.s.userAgent())
48449	if c.ifNoneMatch_ != "" {
48450		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48451	}
48452	var body io.Reader = nil
48453	c.urlParams_.Set("alt", alt)
48454	c.urlParams_.Set("prettyPrint", "false")
48455	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48456	urls += "?" + c.urlParams_.Encode()
48457	req, err := http.NewRequest("GET", urls, body)
48458	if err != nil {
48459		return nil, err
48460	}
48461	req.Header = reqHeaders
48462	googleapi.Expand(req.URL, map[string]string{
48463		"profileId": strconv.FormatInt(c.profileId, 10),
48464	})
48465	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48466}
48467
48468// Do executes the "dfareporting.targetingTemplates.list" call.
48469// Exactly one of *TargetingTemplatesListResponse or error will be
48470// non-nil. Any non-2xx status code is an error. Response headers are in
48471// either *TargetingTemplatesListResponse.ServerResponse.Header or (if a
48472// response was returned at all) in error.(*googleapi.Error).Header. Use
48473// googleapi.IsNotModified to check whether the returned error was
48474// because http.StatusNotModified was returned.
48475func (c *TargetingTemplatesListCall) Do(opts ...googleapi.CallOption) (*TargetingTemplatesListResponse, error) {
48476	gensupport.SetOptions(c.urlParams_, opts...)
48477	res, err := c.doRequest("json")
48478	if res != nil && res.StatusCode == http.StatusNotModified {
48479		if res.Body != nil {
48480			res.Body.Close()
48481		}
48482		return nil, &googleapi.Error{
48483			Code:   res.StatusCode,
48484			Header: res.Header,
48485		}
48486	}
48487	if err != nil {
48488		return nil, err
48489	}
48490	defer googleapi.CloseBody(res)
48491	if err := googleapi.CheckResponse(res); err != nil {
48492		return nil, err
48493	}
48494	ret := &TargetingTemplatesListResponse{
48495		ServerResponse: googleapi.ServerResponse{
48496			Header:         res.Header,
48497			HTTPStatusCode: res.StatusCode,
48498		},
48499	}
48500	target := &ret
48501	if err := gensupport.DecodeResponse(target, res); err != nil {
48502		return nil, err
48503	}
48504	return ret, nil
48505	// {
48506	//   "description": "Retrieves a list of targeting templates, optionally filtered. This method supports paging.",
48507	//   "httpMethod": "GET",
48508	//   "id": "dfareporting.targetingTemplates.list",
48509	//   "parameterOrder": [
48510	//     "profileId"
48511	//   ],
48512	//   "parameters": {
48513	//     "advertiserId": {
48514	//       "description": "Select only targeting templates with this advertiser ID.",
48515	//       "format": "int64",
48516	//       "location": "query",
48517	//       "type": "string"
48518	//     },
48519	//     "ids": {
48520	//       "description": "Select only targeting templates with these IDs.",
48521	//       "format": "int64",
48522	//       "location": "query",
48523	//       "repeated": true,
48524	//       "type": "string"
48525	//     },
48526	//     "maxResults": {
48527	//       "default": "1000",
48528	//       "description": "Maximum number of results to return.",
48529	//       "format": "int32",
48530	//       "location": "query",
48531	//       "maximum": "1000",
48532	//       "minimum": "0",
48533	//       "type": "integer"
48534	//     },
48535	//     "pageToken": {
48536	//       "description": "Value of the nextPageToken from the previous result page.",
48537	//       "location": "query",
48538	//       "type": "string"
48539	//     },
48540	//     "profileId": {
48541	//       "description": "User profile ID associated with this request.",
48542	//       "format": "int64",
48543	//       "location": "path",
48544	//       "required": true,
48545	//       "type": "string"
48546	//     },
48547	//     "searchString": {
48548	//       "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\".",
48549	//       "location": "query",
48550	//       "type": "string"
48551	//     },
48552	//     "sortField": {
48553	//       "default": "ID",
48554	//       "description": "Field by which to sort the list.",
48555	//       "enum": [
48556	//         "ID",
48557	//         "NAME"
48558	//       ],
48559	//       "enumDescriptions": [
48560	//         "",
48561	//         ""
48562	//       ],
48563	//       "location": "query",
48564	//       "type": "string"
48565	//     },
48566	//     "sortOrder": {
48567	//       "default": "ASCENDING",
48568	//       "description": "Order of sorted results.",
48569	//       "enum": [
48570	//         "ASCENDING",
48571	//         "DESCENDING"
48572	//       ],
48573	//       "enumDescriptions": [
48574	//         "",
48575	//         ""
48576	//       ],
48577	//       "location": "query",
48578	//       "type": "string"
48579	//     }
48580	//   },
48581	//   "path": "userprofiles/{profileId}/targetingTemplates",
48582	//   "response": {
48583	//     "$ref": "TargetingTemplatesListResponse"
48584	//   },
48585	//   "scopes": [
48586	//     "https://www.googleapis.com/auth/dfatrafficking"
48587	//   ]
48588	// }
48589
48590}
48591
48592// Pages invokes f for each page of results.
48593// A non-nil error returned from f will halt the iteration.
48594// The provided context supersedes any context provided to the Context method.
48595func (c *TargetingTemplatesListCall) Pages(ctx context.Context, f func(*TargetingTemplatesListResponse) error) error {
48596	c.ctx_ = ctx
48597	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
48598	for {
48599		x, err := c.Do()
48600		if err != nil {
48601			return err
48602		}
48603		if err := f(x); err != nil {
48604			return err
48605		}
48606		if x.NextPageToken == "" {
48607			return nil
48608		}
48609		c.PageToken(x.NextPageToken)
48610	}
48611}
48612
48613// method id "dfareporting.targetingTemplates.patch":
48614
48615type TargetingTemplatesPatchCall struct {
48616	s                 *Service
48617	profileId         int64
48618	targetingtemplate *TargetingTemplate
48619	urlParams_        gensupport.URLParams
48620	ctx_              context.Context
48621	header_           http.Header
48622}
48623
48624// Patch: Updates an existing targeting template. This method supports
48625// patch semantics.
48626func (r *TargetingTemplatesService) Patch(profileId int64, id int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesPatchCall {
48627	c := &TargetingTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48628	c.profileId = profileId
48629	c.urlParams_.Set("id", fmt.Sprint(id))
48630	c.targetingtemplate = targetingtemplate
48631	return c
48632}
48633
48634// Fields allows partial responses to be retrieved. See
48635// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48636// for more information.
48637func (c *TargetingTemplatesPatchCall) Fields(s ...googleapi.Field) *TargetingTemplatesPatchCall {
48638	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48639	return c
48640}
48641
48642// Context sets the context to be used in this call's Do method. Any
48643// pending HTTP request will be aborted if the provided context is
48644// canceled.
48645func (c *TargetingTemplatesPatchCall) Context(ctx context.Context) *TargetingTemplatesPatchCall {
48646	c.ctx_ = ctx
48647	return c
48648}
48649
48650// Header returns an http.Header that can be modified by the caller to
48651// add HTTP headers to the request.
48652func (c *TargetingTemplatesPatchCall) Header() http.Header {
48653	if c.header_ == nil {
48654		c.header_ = make(http.Header)
48655	}
48656	return c.header_
48657}
48658
48659func (c *TargetingTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
48660	reqHeaders := make(http.Header)
48661	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
48662	for k, v := range c.header_ {
48663		reqHeaders[k] = v
48664	}
48665	reqHeaders.Set("User-Agent", c.s.userAgent())
48666	var body io.Reader = nil
48667	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48668	if err != nil {
48669		return nil, err
48670	}
48671	reqHeaders.Set("Content-Type", "application/json")
48672	c.urlParams_.Set("alt", alt)
48673	c.urlParams_.Set("prettyPrint", "false")
48674	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48675	urls += "?" + c.urlParams_.Encode()
48676	req, err := http.NewRequest("PATCH", urls, body)
48677	if err != nil {
48678		return nil, err
48679	}
48680	req.Header = reqHeaders
48681	googleapi.Expand(req.URL, map[string]string{
48682		"profileId": strconv.FormatInt(c.profileId, 10),
48683	})
48684	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48685}
48686
48687// Do executes the "dfareporting.targetingTemplates.patch" call.
48688// Exactly one of *TargetingTemplate or error will be non-nil. Any
48689// non-2xx status code is an error. Response headers are in either
48690// *TargetingTemplate.ServerResponse.Header or (if a response was
48691// returned at all) in error.(*googleapi.Error).Header. Use
48692// googleapi.IsNotModified to check whether the returned error was
48693// because http.StatusNotModified was returned.
48694func (c *TargetingTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48695	gensupport.SetOptions(c.urlParams_, opts...)
48696	res, err := c.doRequest("json")
48697	if res != nil && res.StatusCode == http.StatusNotModified {
48698		if res.Body != nil {
48699			res.Body.Close()
48700		}
48701		return nil, &googleapi.Error{
48702			Code:   res.StatusCode,
48703			Header: res.Header,
48704		}
48705	}
48706	if err != nil {
48707		return nil, err
48708	}
48709	defer googleapi.CloseBody(res)
48710	if err := googleapi.CheckResponse(res); err != nil {
48711		return nil, err
48712	}
48713	ret := &TargetingTemplate{
48714		ServerResponse: googleapi.ServerResponse{
48715			Header:         res.Header,
48716			HTTPStatusCode: res.StatusCode,
48717		},
48718	}
48719	target := &ret
48720	if err := gensupport.DecodeResponse(target, res); err != nil {
48721		return nil, err
48722	}
48723	return ret, nil
48724	// {
48725	//   "description": "Updates an existing targeting template. This method supports patch semantics.",
48726	//   "httpMethod": "PATCH",
48727	//   "id": "dfareporting.targetingTemplates.patch",
48728	//   "parameterOrder": [
48729	//     "profileId",
48730	//     "id"
48731	//   ],
48732	//   "parameters": {
48733	//     "id": {
48734	//       "description": "Targeting template ID.",
48735	//       "format": "int64",
48736	//       "location": "query",
48737	//       "required": true,
48738	//       "type": "string"
48739	//     },
48740	//     "profileId": {
48741	//       "description": "User profile ID associated with this request.",
48742	//       "format": "int64",
48743	//       "location": "path",
48744	//       "required": true,
48745	//       "type": "string"
48746	//     }
48747	//   },
48748	//   "path": "userprofiles/{profileId}/targetingTemplates",
48749	//   "request": {
48750	//     "$ref": "TargetingTemplate"
48751	//   },
48752	//   "response": {
48753	//     "$ref": "TargetingTemplate"
48754	//   },
48755	//   "scopes": [
48756	//     "https://www.googleapis.com/auth/dfatrafficking"
48757	//   ]
48758	// }
48759
48760}
48761
48762// method id "dfareporting.targetingTemplates.update":
48763
48764type TargetingTemplatesUpdateCall struct {
48765	s                 *Service
48766	profileId         int64
48767	targetingtemplate *TargetingTemplate
48768	urlParams_        gensupport.URLParams
48769	ctx_              context.Context
48770	header_           http.Header
48771}
48772
48773// Update: Updates an existing targeting template.
48774func (r *TargetingTemplatesService) Update(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesUpdateCall {
48775	c := &TargetingTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48776	c.profileId = profileId
48777	c.targetingtemplate = targetingtemplate
48778	return c
48779}
48780
48781// Fields allows partial responses to be retrieved. See
48782// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48783// for more information.
48784func (c *TargetingTemplatesUpdateCall) Fields(s ...googleapi.Field) *TargetingTemplatesUpdateCall {
48785	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48786	return c
48787}
48788
48789// Context sets the context to be used in this call's Do method. Any
48790// pending HTTP request will be aborted if the provided context is
48791// canceled.
48792func (c *TargetingTemplatesUpdateCall) Context(ctx context.Context) *TargetingTemplatesUpdateCall {
48793	c.ctx_ = ctx
48794	return c
48795}
48796
48797// Header returns an http.Header that can be modified by the caller to
48798// add HTTP headers to the request.
48799func (c *TargetingTemplatesUpdateCall) Header() http.Header {
48800	if c.header_ == nil {
48801		c.header_ = make(http.Header)
48802	}
48803	return c.header_
48804}
48805
48806func (c *TargetingTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
48807	reqHeaders := make(http.Header)
48808	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
48809	for k, v := range c.header_ {
48810		reqHeaders[k] = v
48811	}
48812	reqHeaders.Set("User-Agent", c.s.userAgent())
48813	var body io.Reader = nil
48814	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48815	if err != nil {
48816		return nil, err
48817	}
48818	reqHeaders.Set("Content-Type", "application/json")
48819	c.urlParams_.Set("alt", alt)
48820	c.urlParams_.Set("prettyPrint", "false")
48821	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48822	urls += "?" + c.urlParams_.Encode()
48823	req, err := http.NewRequest("PUT", urls, body)
48824	if err != nil {
48825		return nil, err
48826	}
48827	req.Header = reqHeaders
48828	googleapi.Expand(req.URL, map[string]string{
48829		"profileId": strconv.FormatInt(c.profileId, 10),
48830	})
48831	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48832}
48833
48834// Do executes the "dfareporting.targetingTemplates.update" call.
48835// Exactly one of *TargetingTemplate or error will be non-nil. Any
48836// non-2xx status code is an error. Response headers are in either
48837// *TargetingTemplate.ServerResponse.Header or (if a response was
48838// returned at all) in error.(*googleapi.Error).Header. Use
48839// googleapi.IsNotModified to check whether the returned error was
48840// because http.StatusNotModified was returned.
48841func (c *TargetingTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48842	gensupport.SetOptions(c.urlParams_, opts...)
48843	res, err := c.doRequest("json")
48844	if res != nil && res.StatusCode == http.StatusNotModified {
48845		if res.Body != nil {
48846			res.Body.Close()
48847		}
48848		return nil, &googleapi.Error{
48849			Code:   res.StatusCode,
48850			Header: res.Header,
48851		}
48852	}
48853	if err != nil {
48854		return nil, err
48855	}
48856	defer googleapi.CloseBody(res)
48857	if err := googleapi.CheckResponse(res); err != nil {
48858		return nil, err
48859	}
48860	ret := &TargetingTemplate{
48861		ServerResponse: googleapi.ServerResponse{
48862			Header:         res.Header,
48863			HTTPStatusCode: res.StatusCode,
48864		},
48865	}
48866	target := &ret
48867	if err := gensupport.DecodeResponse(target, res); err != nil {
48868		return nil, err
48869	}
48870	return ret, nil
48871	// {
48872	//   "description": "Updates an existing targeting template.",
48873	//   "httpMethod": "PUT",
48874	//   "id": "dfareporting.targetingTemplates.update",
48875	//   "parameterOrder": [
48876	//     "profileId"
48877	//   ],
48878	//   "parameters": {
48879	//     "profileId": {
48880	//       "description": "User profile ID associated with this request.",
48881	//       "format": "int64",
48882	//       "location": "path",
48883	//       "required": true,
48884	//       "type": "string"
48885	//     }
48886	//   },
48887	//   "path": "userprofiles/{profileId}/targetingTemplates",
48888	//   "request": {
48889	//     "$ref": "TargetingTemplate"
48890	//   },
48891	//   "response": {
48892	//     "$ref": "TargetingTemplate"
48893	//   },
48894	//   "scopes": [
48895	//     "https://www.googleapis.com/auth/dfatrafficking"
48896	//   ]
48897	// }
48898
48899}
48900
48901// method id "dfareporting.userProfiles.get":
48902
48903type UserProfilesGetCall struct {
48904	s            *Service
48905	profileId    int64
48906	urlParams_   gensupport.URLParams
48907	ifNoneMatch_ string
48908	ctx_         context.Context
48909	header_      http.Header
48910}
48911
48912// Get: Gets one user profile by ID.
48913func (r *UserProfilesService) Get(profileId int64) *UserProfilesGetCall {
48914	c := &UserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48915	c.profileId = profileId
48916	return c
48917}
48918
48919// Fields allows partial responses to be retrieved. See
48920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48921// for more information.
48922func (c *UserProfilesGetCall) Fields(s ...googleapi.Field) *UserProfilesGetCall {
48923	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48924	return c
48925}
48926
48927// IfNoneMatch sets the optional parameter which makes the operation
48928// fail if the object's ETag matches the given value. This is useful for
48929// getting updates only after the object has changed since the last
48930// request. Use googleapi.IsNotModified to check whether the response
48931// error from Do is the result of In-None-Match.
48932func (c *UserProfilesGetCall) IfNoneMatch(entityTag string) *UserProfilesGetCall {
48933	c.ifNoneMatch_ = entityTag
48934	return c
48935}
48936
48937// Context sets the context to be used in this call's Do method. Any
48938// pending HTTP request will be aborted if the provided context is
48939// canceled.
48940func (c *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
48941	c.ctx_ = ctx
48942	return c
48943}
48944
48945// Header returns an http.Header that can be modified by the caller to
48946// add HTTP headers to the request.
48947func (c *UserProfilesGetCall) Header() http.Header {
48948	if c.header_ == nil {
48949		c.header_ = make(http.Header)
48950	}
48951	return c.header_
48952}
48953
48954func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
48955	reqHeaders := make(http.Header)
48956	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
48957	for k, v := range c.header_ {
48958		reqHeaders[k] = v
48959	}
48960	reqHeaders.Set("User-Agent", c.s.userAgent())
48961	if c.ifNoneMatch_ != "" {
48962		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48963	}
48964	var body io.Reader = nil
48965	c.urlParams_.Set("alt", alt)
48966	c.urlParams_.Set("prettyPrint", "false")
48967	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}")
48968	urls += "?" + c.urlParams_.Encode()
48969	req, err := http.NewRequest("GET", urls, body)
48970	if err != nil {
48971		return nil, err
48972	}
48973	req.Header = reqHeaders
48974	googleapi.Expand(req.URL, map[string]string{
48975		"profileId": strconv.FormatInt(c.profileId, 10),
48976	})
48977	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48978}
48979
48980// Do executes the "dfareporting.userProfiles.get" call.
48981// Exactly one of *UserProfile or error will be non-nil. Any non-2xx
48982// status code is an error. Response headers are in either
48983// *UserProfile.ServerResponse.Header or (if a response was returned at
48984// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
48985// to check whether the returned error was because
48986// http.StatusNotModified was returned.
48987func (c *UserProfilesGetCall) Do(opts ...googleapi.CallOption) (*UserProfile, error) {
48988	gensupport.SetOptions(c.urlParams_, opts...)
48989	res, err := c.doRequest("json")
48990	if res != nil && res.StatusCode == http.StatusNotModified {
48991		if res.Body != nil {
48992			res.Body.Close()
48993		}
48994		return nil, &googleapi.Error{
48995			Code:   res.StatusCode,
48996			Header: res.Header,
48997		}
48998	}
48999	if err != nil {
49000		return nil, err
49001	}
49002	defer googleapi.CloseBody(res)
49003	if err := googleapi.CheckResponse(res); err != nil {
49004		return nil, err
49005	}
49006	ret := &UserProfile{
49007		ServerResponse: googleapi.ServerResponse{
49008			Header:         res.Header,
49009			HTTPStatusCode: res.StatusCode,
49010		},
49011	}
49012	target := &ret
49013	if err := gensupport.DecodeResponse(target, res); err != nil {
49014		return nil, err
49015	}
49016	return ret, nil
49017	// {
49018	//   "description": "Gets one user profile by ID.",
49019	//   "httpMethod": "GET",
49020	//   "id": "dfareporting.userProfiles.get",
49021	//   "parameterOrder": [
49022	//     "profileId"
49023	//   ],
49024	//   "parameters": {
49025	//     "profileId": {
49026	//       "description": "The user profile ID.",
49027	//       "format": "int64",
49028	//       "location": "path",
49029	//       "required": true,
49030	//       "type": "string"
49031	//     }
49032	//   },
49033	//   "path": "userprofiles/{profileId}",
49034	//   "response": {
49035	//     "$ref": "UserProfile"
49036	//   },
49037	//   "scopes": [
49038	//     "https://www.googleapis.com/auth/dfareporting",
49039	//     "https://www.googleapis.com/auth/dfatrafficking"
49040	//   ]
49041	// }
49042
49043}
49044
49045// method id "dfareporting.userProfiles.list":
49046
49047type UserProfilesListCall struct {
49048	s            *Service
49049	urlParams_   gensupport.URLParams
49050	ifNoneMatch_ string
49051	ctx_         context.Context
49052	header_      http.Header
49053}
49054
49055// List: Retrieves list of user profiles for a user.
49056func (r *UserProfilesService) List() *UserProfilesListCall {
49057	c := &UserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49058	return c
49059}
49060
49061// Fields allows partial responses to be retrieved. See
49062// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49063// for more information.
49064func (c *UserProfilesListCall) Fields(s ...googleapi.Field) *UserProfilesListCall {
49065	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49066	return c
49067}
49068
49069// IfNoneMatch sets the optional parameter which makes the operation
49070// fail if the object's ETag matches the given value. This is useful for
49071// getting updates only after the object has changed since the last
49072// request. Use googleapi.IsNotModified to check whether the response
49073// error from Do is the result of In-None-Match.
49074func (c *UserProfilesListCall) IfNoneMatch(entityTag string) *UserProfilesListCall {
49075	c.ifNoneMatch_ = entityTag
49076	return c
49077}
49078
49079// Context sets the context to be used in this call's Do method. Any
49080// pending HTTP request will be aborted if the provided context is
49081// canceled.
49082func (c *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
49083	c.ctx_ = ctx
49084	return c
49085}
49086
49087// Header returns an http.Header that can be modified by the caller to
49088// add HTTP headers to the request.
49089func (c *UserProfilesListCall) Header() http.Header {
49090	if c.header_ == nil {
49091		c.header_ = make(http.Header)
49092	}
49093	return c.header_
49094}
49095
49096func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
49097	reqHeaders := make(http.Header)
49098	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49099	for k, v := range c.header_ {
49100		reqHeaders[k] = v
49101	}
49102	reqHeaders.Set("User-Agent", c.s.userAgent())
49103	if c.ifNoneMatch_ != "" {
49104		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49105	}
49106	var body io.Reader = nil
49107	c.urlParams_.Set("alt", alt)
49108	c.urlParams_.Set("prettyPrint", "false")
49109	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles")
49110	urls += "?" + c.urlParams_.Encode()
49111	req, err := http.NewRequest("GET", urls, body)
49112	if err != nil {
49113		return nil, err
49114	}
49115	req.Header = reqHeaders
49116	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49117}
49118
49119// Do executes the "dfareporting.userProfiles.list" call.
49120// Exactly one of *UserProfileList or error will be non-nil. Any non-2xx
49121// status code is an error. Response headers are in either
49122// *UserProfileList.ServerResponse.Header or (if a response was returned
49123// at all) in error.(*googleapi.Error).Header. Use
49124// googleapi.IsNotModified to check whether the returned error was
49125// because http.StatusNotModified was returned.
49126func (c *UserProfilesListCall) Do(opts ...googleapi.CallOption) (*UserProfileList, error) {
49127	gensupport.SetOptions(c.urlParams_, opts...)
49128	res, err := c.doRequest("json")
49129	if res != nil && res.StatusCode == http.StatusNotModified {
49130		if res.Body != nil {
49131			res.Body.Close()
49132		}
49133		return nil, &googleapi.Error{
49134			Code:   res.StatusCode,
49135			Header: res.Header,
49136		}
49137	}
49138	if err != nil {
49139		return nil, err
49140	}
49141	defer googleapi.CloseBody(res)
49142	if err := googleapi.CheckResponse(res); err != nil {
49143		return nil, err
49144	}
49145	ret := &UserProfileList{
49146		ServerResponse: googleapi.ServerResponse{
49147			Header:         res.Header,
49148			HTTPStatusCode: res.StatusCode,
49149		},
49150	}
49151	target := &ret
49152	if err := gensupport.DecodeResponse(target, res); err != nil {
49153		return nil, err
49154	}
49155	return ret, nil
49156	// {
49157	//   "description": "Retrieves list of user profiles for a user.",
49158	//   "httpMethod": "GET",
49159	//   "id": "dfareporting.userProfiles.list",
49160	//   "path": "userprofiles",
49161	//   "response": {
49162	//     "$ref": "UserProfileList"
49163	//   },
49164	//   "scopes": [
49165	//     "https://www.googleapis.com/auth/dfareporting",
49166	//     "https://www.googleapis.com/auth/dfatrafficking"
49167	//   ]
49168	// }
49169
49170}
49171
49172// method id "dfareporting.userRolePermissionGroups.get":
49173
49174type UserRolePermissionGroupsGetCall struct {
49175	s            *Service
49176	profileId    int64
49177	id           int64
49178	urlParams_   gensupport.URLParams
49179	ifNoneMatch_ string
49180	ctx_         context.Context
49181	header_      http.Header
49182}
49183
49184// Get: Gets one user role permission group by ID.
49185func (r *UserRolePermissionGroupsService) Get(profileId int64, id int64) *UserRolePermissionGroupsGetCall {
49186	c := &UserRolePermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49187	c.profileId = profileId
49188	c.id = id
49189	return c
49190}
49191
49192// Fields allows partial responses to be retrieved. See
49193// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49194// for more information.
49195func (c *UserRolePermissionGroupsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsGetCall {
49196	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49197	return c
49198}
49199
49200// IfNoneMatch sets the optional parameter which makes the operation
49201// fail if the object's ETag matches the given value. This is useful for
49202// getting updates only after the object has changed since the last
49203// request. Use googleapi.IsNotModified to check whether the response
49204// error from Do is the result of In-None-Match.
49205func (c *UserRolePermissionGroupsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsGetCall {
49206	c.ifNoneMatch_ = entityTag
49207	return c
49208}
49209
49210// Context sets the context to be used in this call's Do method. Any
49211// pending HTTP request will be aborted if the provided context is
49212// canceled.
49213func (c *UserRolePermissionGroupsGetCall) Context(ctx context.Context) *UserRolePermissionGroupsGetCall {
49214	c.ctx_ = ctx
49215	return c
49216}
49217
49218// Header returns an http.Header that can be modified by the caller to
49219// add HTTP headers to the request.
49220func (c *UserRolePermissionGroupsGetCall) Header() http.Header {
49221	if c.header_ == nil {
49222		c.header_ = make(http.Header)
49223	}
49224	return c.header_
49225}
49226
49227func (c *UserRolePermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
49228	reqHeaders := make(http.Header)
49229	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49230	for k, v := range c.header_ {
49231		reqHeaders[k] = v
49232	}
49233	reqHeaders.Set("User-Agent", c.s.userAgent())
49234	if c.ifNoneMatch_ != "" {
49235		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49236	}
49237	var body io.Reader = nil
49238	c.urlParams_.Set("alt", alt)
49239	c.urlParams_.Set("prettyPrint", "false")
49240	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups/{id}")
49241	urls += "?" + c.urlParams_.Encode()
49242	req, err := http.NewRequest("GET", urls, body)
49243	if err != nil {
49244		return nil, err
49245	}
49246	req.Header = reqHeaders
49247	googleapi.Expand(req.URL, map[string]string{
49248		"profileId": strconv.FormatInt(c.profileId, 10),
49249		"id":        strconv.FormatInt(c.id, 10),
49250	})
49251	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49252}
49253
49254// Do executes the "dfareporting.userRolePermissionGroups.get" call.
49255// Exactly one of *UserRolePermissionGroup or error will be non-nil. Any
49256// non-2xx status code is an error. Response headers are in either
49257// *UserRolePermissionGroup.ServerResponse.Header or (if a response was
49258// returned at all) in error.(*googleapi.Error).Header. Use
49259// googleapi.IsNotModified to check whether the returned error was
49260// because http.StatusNotModified was returned.
49261func (c *UserRolePermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroup, error) {
49262	gensupport.SetOptions(c.urlParams_, opts...)
49263	res, err := c.doRequest("json")
49264	if res != nil && res.StatusCode == http.StatusNotModified {
49265		if res.Body != nil {
49266			res.Body.Close()
49267		}
49268		return nil, &googleapi.Error{
49269			Code:   res.StatusCode,
49270			Header: res.Header,
49271		}
49272	}
49273	if err != nil {
49274		return nil, err
49275	}
49276	defer googleapi.CloseBody(res)
49277	if err := googleapi.CheckResponse(res); err != nil {
49278		return nil, err
49279	}
49280	ret := &UserRolePermissionGroup{
49281		ServerResponse: googleapi.ServerResponse{
49282			Header:         res.Header,
49283			HTTPStatusCode: res.StatusCode,
49284		},
49285	}
49286	target := &ret
49287	if err := gensupport.DecodeResponse(target, res); err != nil {
49288		return nil, err
49289	}
49290	return ret, nil
49291	// {
49292	//   "description": "Gets one user role permission group by ID.",
49293	//   "httpMethod": "GET",
49294	//   "id": "dfareporting.userRolePermissionGroups.get",
49295	//   "parameterOrder": [
49296	//     "profileId",
49297	//     "id"
49298	//   ],
49299	//   "parameters": {
49300	//     "id": {
49301	//       "description": "User role permission group ID.",
49302	//       "format": "int64",
49303	//       "location": "path",
49304	//       "required": true,
49305	//       "type": "string"
49306	//     },
49307	//     "profileId": {
49308	//       "description": "User profile ID associated with this request.",
49309	//       "format": "int64",
49310	//       "location": "path",
49311	//       "required": true,
49312	//       "type": "string"
49313	//     }
49314	//   },
49315	//   "path": "userprofiles/{profileId}/userRolePermissionGroups/{id}",
49316	//   "response": {
49317	//     "$ref": "UserRolePermissionGroup"
49318	//   },
49319	//   "scopes": [
49320	//     "https://www.googleapis.com/auth/dfatrafficking"
49321	//   ]
49322	// }
49323
49324}
49325
49326// method id "dfareporting.userRolePermissionGroups.list":
49327
49328type UserRolePermissionGroupsListCall struct {
49329	s            *Service
49330	profileId    int64
49331	urlParams_   gensupport.URLParams
49332	ifNoneMatch_ string
49333	ctx_         context.Context
49334	header_      http.Header
49335}
49336
49337// List: Gets a list of all supported user role permission groups.
49338func (r *UserRolePermissionGroupsService) List(profileId int64) *UserRolePermissionGroupsListCall {
49339	c := &UserRolePermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49340	c.profileId = profileId
49341	return c
49342}
49343
49344// Fields allows partial responses to be retrieved. See
49345// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49346// for more information.
49347func (c *UserRolePermissionGroupsListCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsListCall {
49348	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49349	return c
49350}
49351
49352// IfNoneMatch sets the optional parameter which makes the operation
49353// fail if the object's ETag matches the given value. This is useful for
49354// getting updates only after the object has changed since the last
49355// request. Use googleapi.IsNotModified to check whether the response
49356// error from Do is the result of In-None-Match.
49357func (c *UserRolePermissionGroupsListCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsListCall {
49358	c.ifNoneMatch_ = entityTag
49359	return c
49360}
49361
49362// Context sets the context to be used in this call's Do method. Any
49363// pending HTTP request will be aborted if the provided context is
49364// canceled.
49365func (c *UserRolePermissionGroupsListCall) Context(ctx context.Context) *UserRolePermissionGroupsListCall {
49366	c.ctx_ = ctx
49367	return c
49368}
49369
49370// Header returns an http.Header that can be modified by the caller to
49371// add HTTP headers to the request.
49372func (c *UserRolePermissionGroupsListCall) Header() http.Header {
49373	if c.header_ == nil {
49374		c.header_ = make(http.Header)
49375	}
49376	return c.header_
49377}
49378
49379func (c *UserRolePermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
49380	reqHeaders := make(http.Header)
49381	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49382	for k, v := range c.header_ {
49383		reqHeaders[k] = v
49384	}
49385	reqHeaders.Set("User-Agent", c.s.userAgent())
49386	if c.ifNoneMatch_ != "" {
49387		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49388	}
49389	var body io.Reader = nil
49390	c.urlParams_.Set("alt", alt)
49391	c.urlParams_.Set("prettyPrint", "false")
49392	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups")
49393	urls += "?" + c.urlParams_.Encode()
49394	req, err := http.NewRequest("GET", urls, body)
49395	if err != nil {
49396		return nil, err
49397	}
49398	req.Header = reqHeaders
49399	googleapi.Expand(req.URL, map[string]string{
49400		"profileId": strconv.FormatInt(c.profileId, 10),
49401	})
49402	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49403}
49404
49405// Do executes the "dfareporting.userRolePermissionGroups.list" call.
49406// Exactly one of *UserRolePermissionGroupsListResponse or error will be
49407// non-nil. Any non-2xx status code is an error. Response headers are in
49408// either *UserRolePermissionGroupsListResponse.ServerResponse.Header or
49409// (if a response was returned at all) in
49410// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
49411// whether the returned error was because http.StatusNotModified was
49412// returned.
49413func (c *UserRolePermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroupsListResponse, error) {
49414	gensupport.SetOptions(c.urlParams_, opts...)
49415	res, err := c.doRequest("json")
49416	if res != nil && res.StatusCode == http.StatusNotModified {
49417		if res.Body != nil {
49418			res.Body.Close()
49419		}
49420		return nil, &googleapi.Error{
49421			Code:   res.StatusCode,
49422			Header: res.Header,
49423		}
49424	}
49425	if err != nil {
49426		return nil, err
49427	}
49428	defer googleapi.CloseBody(res)
49429	if err := googleapi.CheckResponse(res); err != nil {
49430		return nil, err
49431	}
49432	ret := &UserRolePermissionGroupsListResponse{
49433		ServerResponse: googleapi.ServerResponse{
49434			Header:         res.Header,
49435			HTTPStatusCode: res.StatusCode,
49436		},
49437	}
49438	target := &ret
49439	if err := gensupport.DecodeResponse(target, res); err != nil {
49440		return nil, err
49441	}
49442	return ret, nil
49443	// {
49444	//   "description": "Gets a list of all supported user role permission groups.",
49445	//   "httpMethod": "GET",
49446	//   "id": "dfareporting.userRolePermissionGroups.list",
49447	//   "parameterOrder": [
49448	//     "profileId"
49449	//   ],
49450	//   "parameters": {
49451	//     "profileId": {
49452	//       "description": "User profile ID associated with this request.",
49453	//       "format": "int64",
49454	//       "location": "path",
49455	//       "required": true,
49456	//       "type": "string"
49457	//     }
49458	//   },
49459	//   "path": "userprofiles/{profileId}/userRolePermissionGroups",
49460	//   "response": {
49461	//     "$ref": "UserRolePermissionGroupsListResponse"
49462	//   },
49463	//   "scopes": [
49464	//     "https://www.googleapis.com/auth/dfatrafficking"
49465	//   ]
49466	// }
49467
49468}
49469
49470// method id "dfareporting.userRolePermissions.get":
49471
49472type UserRolePermissionsGetCall struct {
49473	s            *Service
49474	profileId    int64
49475	id           int64
49476	urlParams_   gensupport.URLParams
49477	ifNoneMatch_ string
49478	ctx_         context.Context
49479	header_      http.Header
49480}
49481
49482// Get: Gets one user role permission by ID.
49483func (r *UserRolePermissionsService) Get(profileId int64, id int64) *UserRolePermissionsGetCall {
49484	c := &UserRolePermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49485	c.profileId = profileId
49486	c.id = id
49487	return c
49488}
49489
49490// Fields allows partial responses to be retrieved. See
49491// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49492// for more information.
49493func (c *UserRolePermissionsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionsGetCall {
49494	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49495	return c
49496}
49497
49498// IfNoneMatch sets the optional parameter which makes the operation
49499// fail if the object's ETag matches the given value. This is useful for
49500// getting updates only after the object has changed since the last
49501// request. Use googleapi.IsNotModified to check whether the response
49502// error from Do is the result of In-None-Match.
49503func (c *UserRolePermissionsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionsGetCall {
49504	c.ifNoneMatch_ = entityTag
49505	return c
49506}
49507
49508// Context sets the context to be used in this call's Do method. Any
49509// pending HTTP request will be aborted if the provided context is
49510// canceled.
49511func (c *UserRolePermissionsGetCall) Context(ctx context.Context) *UserRolePermissionsGetCall {
49512	c.ctx_ = ctx
49513	return c
49514}
49515
49516// Header returns an http.Header that can be modified by the caller to
49517// add HTTP headers to the request.
49518func (c *UserRolePermissionsGetCall) Header() http.Header {
49519	if c.header_ == nil {
49520		c.header_ = make(http.Header)
49521	}
49522	return c.header_
49523}
49524
49525func (c *UserRolePermissionsGetCall) doRequest(alt string) (*http.Response, error) {
49526	reqHeaders := make(http.Header)
49527	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49528	for k, v := range c.header_ {
49529		reqHeaders[k] = v
49530	}
49531	reqHeaders.Set("User-Agent", c.s.userAgent())
49532	if c.ifNoneMatch_ != "" {
49533		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49534	}
49535	var body io.Reader = nil
49536	c.urlParams_.Set("alt", alt)
49537	c.urlParams_.Set("prettyPrint", "false")
49538	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions/{id}")
49539	urls += "?" + c.urlParams_.Encode()
49540	req, err := http.NewRequest("GET", urls, body)
49541	if err != nil {
49542		return nil, err
49543	}
49544	req.Header = reqHeaders
49545	googleapi.Expand(req.URL, map[string]string{
49546		"profileId": strconv.FormatInt(c.profileId, 10),
49547		"id":        strconv.FormatInt(c.id, 10),
49548	})
49549	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49550}
49551
49552// Do executes the "dfareporting.userRolePermissions.get" call.
49553// Exactly one of *UserRolePermission or error will be non-nil. Any
49554// non-2xx status code is an error. Response headers are in either
49555// *UserRolePermission.ServerResponse.Header or (if a response was
49556// returned at all) in error.(*googleapi.Error).Header. Use
49557// googleapi.IsNotModified to check whether the returned error was
49558// because http.StatusNotModified was returned.
49559func (c *UserRolePermissionsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermission, error) {
49560	gensupport.SetOptions(c.urlParams_, opts...)
49561	res, err := c.doRequest("json")
49562	if res != nil && res.StatusCode == http.StatusNotModified {
49563		if res.Body != nil {
49564			res.Body.Close()
49565		}
49566		return nil, &googleapi.Error{
49567			Code:   res.StatusCode,
49568			Header: res.Header,
49569		}
49570	}
49571	if err != nil {
49572		return nil, err
49573	}
49574	defer googleapi.CloseBody(res)
49575	if err := googleapi.CheckResponse(res); err != nil {
49576		return nil, err
49577	}
49578	ret := &UserRolePermission{
49579		ServerResponse: googleapi.ServerResponse{
49580			Header:         res.Header,
49581			HTTPStatusCode: res.StatusCode,
49582		},
49583	}
49584	target := &ret
49585	if err := gensupport.DecodeResponse(target, res); err != nil {
49586		return nil, err
49587	}
49588	return ret, nil
49589	// {
49590	//   "description": "Gets one user role permission by ID.",
49591	//   "httpMethod": "GET",
49592	//   "id": "dfareporting.userRolePermissions.get",
49593	//   "parameterOrder": [
49594	//     "profileId",
49595	//     "id"
49596	//   ],
49597	//   "parameters": {
49598	//     "id": {
49599	//       "description": "User role permission ID.",
49600	//       "format": "int64",
49601	//       "location": "path",
49602	//       "required": true,
49603	//       "type": "string"
49604	//     },
49605	//     "profileId": {
49606	//       "description": "User profile ID associated with this request.",
49607	//       "format": "int64",
49608	//       "location": "path",
49609	//       "required": true,
49610	//       "type": "string"
49611	//     }
49612	//   },
49613	//   "path": "userprofiles/{profileId}/userRolePermissions/{id}",
49614	//   "response": {
49615	//     "$ref": "UserRolePermission"
49616	//   },
49617	//   "scopes": [
49618	//     "https://www.googleapis.com/auth/dfatrafficking"
49619	//   ]
49620	// }
49621
49622}
49623
49624// method id "dfareporting.userRolePermissions.list":
49625
49626type UserRolePermissionsListCall struct {
49627	s            *Service
49628	profileId    int64
49629	urlParams_   gensupport.URLParams
49630	ifNoneMatch_ string
49631	ctx_         context.Context
49632	header_      http.Header
49633}
49634
49635// List: Gets a list of user role permissions, possibly filtered.
49636func (r *UserRolePermissionsService) List(profileId int64) *UserRolePermissionsListCall {
49637	c := &UserRolePermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49638	c.profileId = profileId
49639	return c
49640}
49641
49642// Ids sets the optional parameter "ids": Select only user role
49643// permissions with these IDs.
49644func (c *UserRolePermissionsListCall) Ids(ids ...int64) *UserRolePermissionsListCall {
49645	var ids_ []string
49646	for _, v := range ids {
49647		ids_ = append(ids_, fmt.Sprint(v))
49648	}
49649	c.urlParams_.SetMulti("ids", ids_)
49650	return c
49651}
49652
49653// Fields allows partial responses to be retrieved. See
49654// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49655// for more information.
49656func (c *UserRolePermissionsListCall) Fields(s ...googleapi.Field) *UserRolePermissionsListCall {
49657	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49658	return c
49659}
49660
49661// IfNoneMatch sets the optional parameter which makes the operation
49662// fail if the object's ETag matches the given value. This is useful for
49663// getting updates only after the object has changed since the last
49664// request. Use googleapi.IsNotModified to check whether the response
49665// error from Do is the result of In-None-Match.
49666func (c *UserRolePermissionsListCall) IfNoneMatch(entityTag string) *UserRolePermissionsListCall {
49667	c.ifNoneMatch_ = entityTag
49668	return c
49669}
49670
49671// Context sets the context to be used in this call's Do method. Any
49672// pending HTTP request will be aborted if the provided context is
49673// canceled.
49674func (c *UserRolePermissionsListCall) Context(ctx context.Context) *UserRolePermissionsListCall {
49675	c.ctx_ = ctx
49676	return c
49677}
49678
49679// Header returns an http.Header that can be modified by the caller to
49680// add HTTP headers to the request.
49681func (c *UserRolePermissionsListCall) Header() http.Header {
49682	if c.header_ == nil {
49683		c.header_ = make(http.Header)
49684	}
49685	return c.header_
49686}
49687
49688func (c *UserRolePermissionsListCall) doRequest(alt string) (*http.Response, error) {
49689	reqHeaders := make(http.Header)
49690	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49691	for k, v := range c.header_ {
49692		reqHeaders[k] = v
49693	}
49694	reqHeaders.Set("User-Agent", c.s.userAgent())
49695	if c.ifNoneMatch_ != "" {
49696		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49697	}
49698	var body io.Reader = nil
49699	c.urlParams_.Set("alt", alt)
49700	c.urlParams_.Set("prettyPrint", "false")
49701	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions")
49702	urls += "?" + c.urlParams_.Encode()
49703	req, err := http.NewRequest("GET", urls, body)
49704	if err != nil {
49705		return nil, err
49706	}
49707	req.Header = reqHeaders
49708	googleapi.Expand(req.URL, map[string]string{
49709		"profileId": strconv.FormatInt(c.profileId, 10),
49710	})
49711	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49712}
49713
49714// Do executes the "dfareporting.userRolePermissions.list" call.
49715// Exactly one of *UserRolePermissionsListResponse or error will be
49716// non-nil. Any non-2xx status code is an error. Response headers are in
49717// either *UserRolePermissionsListResponse.ServerResponse.Header or (if
49718// a response was returned at all) in error.(*googleapi.Error).Header.
49719// Use googleapi.IsNotModified to check whether the returned error was
49720// because http.StatusNotModified was returned.
49721func (c *UserRolePermissionsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionsListResponse, error) {
49722	gensupport.SetOptions(c.urlParams_, opts...)
49723	res, err := c.doRequest("json")
49724	if res != nil && res.StatusCode == http.StatusNotModified {
49725		if res.Body != nil {
49726			res.Body.Close()
49727		}
49728		return nil, &googleapi.Error{
49729			Code:   res.StatusCode,
49730			Header: res.Header,
49731		}
49732	}
49733	if err != nil {
49734		return nil, err
49735	}
49736	defer googleapi.CloseBody(res)
49737	if err := googleapi.CheckResponse(res); err != nil {
49738		return nil, err
49739	}
49740	ret := &UserRolePermissionsListResponse{
49741		ServerResponse: googleapi.ServerResponse{
49742			Header:         res.Header,
49743			HTTPStatusCode: res.StatusCode,
49744		},
49745	}
49746	target := &ret
49747	if err := gensupport.DecodeResponse(target, res); err != nil {
49748		return nil, err
49749	}
49750	return ret, nil
49751	// {
49752	//   "description": "Gets a list of user role permissions, possibly filtered.",
49753	//   "httpMethod": "GET",
49754	//   "id": "dfareporting.userRolePermissions.list",
49755	//   "parameterOrder": [
49756	//     "profileId"
49757	//   ],
49758	//   "parameters": {
49759	//     "ids": {
49760	//       "description": "Select only user role permissions with these IDs.",
49761	//       "format": "int64",
49762	//       "location": "query",
49763	//       "repeated": true,
49764	//       "type": "string"
49765	//     },
49766	//     "profileId": {
49767	//       "description": "User profile ID associated with this request.",
49768	//       "format": "int64",
49769	//       "location": "path",
49770	//       "required": true,
49771	//       "type": "string"
49772	//     }
49773	//   },
49774	//   "path": "userprofiles/{profileId}/userRolePermissions",
49775	//   "response": {
49776	//     "$ref": "UserRolePermissionsListResponse"
49777	//   },
49778	//   "scopes": [
49779	//     "https://www.googleapis.com/auth/dfatrafficking"
49780	//   ]
49781	// }
49782
49783}
49784
49785// method id "dfareporting.userRoles.delete":
49786
49787type UserRolesDeleteCall struct {
49788	s          *Service
49789	profileId  int64
49790	id         int64
49791	urlParams_ gensupport.URLParams
49792	ctx_       context.Context
49793	header_    http.Header
49794}
49795
49796// Delete: Deletes an existing user role.
49797func (r *UserRolesService) Delete(profileId int64, id int64) *UserRolesDeleteCall {
49798	c := &UserRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49799	c.profileId = profileId
49800	c.id = id
49801	return c
49802}
49803
49804// Fields allows partial responses to be retrieved. See
49805// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49806// for more information.
49807func (c *UserRolesDeleteCall) Fields(s ...googleapi.Field) *UserRolesDeleteCall {
49808	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49809	return c
49810}
49811
49812// Context sets the context to be used in this call's Do method. Any
49813// pending HTTP request will be aborted if the provided context is
49814// canceled.
49815func (c *UserRolesDeleteCall) Context(ctx context.Context) *UserRolesDeleteCall {
49816	c.ctx_ = ctx
49817	return c
49818}
49819
49820// Header returns an http.Header that can be modified by the caller to
49821// add HTTP headers to the request.
49822func (c *UserRolesDeleteCall) Header() http.Header {
49823	if c.header_ == nil {
49824		c.header_ = make(http.Header)
49825	}
49826	return c.header_
49827}
49828
49829func (c *UserRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
49830	reqHeaders := make(http.Header)
49831	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49832	for k, v := range c.header_ {
49833		reqHeaders[k] = v
49834	}
49835	reqHeaders.Set("User-Agent", c.s.userAgent())
49836	var body io.Reader = nil
49837	c.urlParams_.Set("alt", alt)
49838	c.urlParams_.Set("prettyPrint", "false")
49839	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
49840	urls += "?" + c.urlParams_.Encode()
49841	req, err := http.NewRequest("DELETE", urls, body)
49842	if err != nil {
49843		return nil, err
49844	}
49845	req.Header = reqHeaders
49846	googleapi.Expand(req.URL, map[string]string{
49847		"profileId": strconv.FormatInt(c.profileId, 10),
49848		"id":        strconv.FormatInt(c.id, 10),
49849	})
49850	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49851}
49852
49853// Do executes the "dfareporting.userRoles.delete" call.
49854func (c *UserRolesDeleteCall) Do(opts ...googleapi.CallOption) error {
49855	gensupport.SetOptions(c.urlParams_, opts...)
49856	res, err := c.doRequest("json")
49857	if err != nil {
49858		return err
49859	}
49860	defer googleapi.CloseBody(res)
49861	if err := googleapi.CheckResponse(res); err != nil {
49862		return err
49863	}
49864	return nil
49865	// {
49866	//   "description": "Deletes an existing user role.",
49867	//   "httpMethod": "DELETE",
49868	//   "id": "dfareporting.userRoles.delete",
49869	//   "parameterOrder": [
49870	//     "profileId",
49871	//     "id"
49872	//   ],
49873	//   "parameters": {
49874	//     "id": {
49875	//       "description": "User role ID.",
49876	//       "format": "int64",
49877	//       "location": "path",
49878	//       "required": true,
49879	//       "type": "string"
49880	//     },
49881	//     "profileId": {
49882	//       "description": "User profile ID associated with this request.",
49883	//       "format": "int64",
49884	//       "location": "path",
49885	//       "required": true,
49886	//       "type": "string"
49887	//     }
49888	//   },
49889	//   "path": "userprofiles/{profileId}/userRoles/{id}",
49890	//   "scopes": [
49891	//     "https://www.googleapis.com/auth/dfatrafficking"
49892	//   ]
49893	// }
49894
49895}
49896
49897// method id "dfareporting.userRoles.get":
49898
49899type UserRolesGetCall struct {
49900	s            *Service
49901	profileId    int64
49902	id           int64
49903	urlParams_   gensupport.URLParams
49904	ifNoneMatch_ string
49905	ctx_         context.Context
49906	header_      http.Header
49907}
49908
49909// Get: Gets one user role by ID.
49910func (r *UserRolesService) Get(profileId int64, id int64) *UserRolesGetCall {
49911	c := &UserRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49912	c.profileId = profileId
49913	c.id = id
49914	return c
49915}
49916
49917// Fields allows partial responses to be retrieved. See
49918// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49919// for more information.
49920func (c *UserRolesGetCall) Fields(s ...googleapi.Field) *UserRolesGetCall {
49921	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49922	return c
49923}
49924
49925// IfNoneMatch sets the optional parameter which makes the operation
49926// fail if the object's ETag matches the given value. This is useful for
49927// getting updates only after the object has changed since the last
49928// request. Use googleapi.IsNotModified to check whether the response
49929// error from Do is the result of In-None-Match.
49930func (c *UserRolesGetCall) IfNoneMatch(entityTag string) *UserRolesGetCall {
49931	c.ifNoneMatch_ = entityTag
49932	return c
49933}
49934
49935// Context sets the context to be used in this call's Do method. Any
49936// pending HTTP request will be aborted if the provided context is
49937// canceled.
49938func (c *UserRolesGetCall) Context(ctx context.Context) *UserRolesGetCall {
49939	c.ctx_ = ctx
49940	return c
49941}
49942
49943// Header returns an http.Header that can be modified by the caller to
49944// add HTTP headers to the request.
49945func (c *UserRolesGetCall) Header() http.Header {
49946	if c.header_ == nil {
49947		c.header_ = make(http.Header)
49948	}
49949	return c.header_
49950}
49951
49952func (c *UserRolesGetCall) doRequest(alt string) (*http.Response, error) {
49953	reqHeaders := make(http.Header)
49954	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49955	for k, v := range c.header_ {
49956		reqHeaders[k] = v
49957	}
49958	reqHeaders.Set("User-Agent", c.s.userAgent())
49959	if c.ifNoneMatch_ != "" {
49960		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49961	}
49962	var body io.Reader = nil
49963	c.urlParams_.Set("alt", alt)
49964	c.urlParams_.Set("prettyPrint", "false")
49965	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
49966	urls += "?" + c.urlParams_.Encode()
49967	req, err := http.NewRequest("GET", urls, body)
49968	if err != nil {
49969		return nil, err
49970	}
49971	req.Header = reqHeaders
49972	googleapi.Expand(req.URL, map[string]string{
49973		"profileId": strconv.FormatInt(c.profileId, 10),
49974		"id":        strconv.FormatInt(c.id, 10),
49975	})
49976	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49977}
49978
49979// Do executes the "dfareporting.userRoles.get" call.
49980// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
49981// code is an error. Response headers are in either
49982// *UserRole.ServerResponse.Header or (if a response was returned at
49983// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49984// to check whether the returned error was because
49985// http.StatusNotModified was returned.
49986func (c *UserRolesGetCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
49987	gensupport.SetOptions(c.urlParams_, opts...)
49988	res, err := c.doRequest("json")
49989	if res != nil && res.StatusCode == http.StatusNotModified {
49990		if res.Body != nil {
49991			res.Body.Close()
49992		}
49993		return nil, &googleapi.Error{
49994			Code:   res.StatusCode,
49995			Header: res.Header,
49996		}
49997	}
49998	if err != nil {
49999		return nil, err
50000	}
50001	defer googleapi.CloseBody(res)
50002	if err := googleapi.CheckResponse(res); err != nil {
50003		return nil, err
50004	}
50005	ret := &UserRole{
50006		ServerResponse: googleapi.ServerResponse{
50007			Header:         res.Header,
50008			HTTPStatusCode: res.StatusCode,
50009		},
50010	}
50011	target := &ret
50012	if err := gensupport.DecodeResponse(target, res); err != nil {
50013		return nil, err
50014	}
50015	return ret, nil
50016	// {
50017	//   "description": "Gets one user role by ID.",
50018	//   "httpMethod": "GET",
50019	//   "id": "dfareporting.userRoles.get",
50020	//   "parameterOrder": [
50021	//     "profileId",
50022	//     "id"
50023	//   ],
50024	//   "parameters": {
50025	//     "id": {
50026	//       "description": "User role ID.",
50027	//       "format": "int64",
50028	//       "location": "path",
50029	//       "required": true,
50030	//       "type": "string"
50031	//     },
50032	//     "profileId": {
50033	//       "description": "User profile ID associated with this request.",
50034	//       "format": "int64",
50035	//       "location": "path",
50036	//       "required": true,
50037	//       "type": "string"
50038	//     }
50039	//   },
50040	//   "path": "userprofiles/{profileId}/userRoles/{id}",
50041	//   "response": {
50042	//     "$ref": "UserRole"
50043	//   },
50044	//   "scopes": [
50045	//     "https://www.googleapis.com/auth/dfatrafficking"
50046	//   ]
50047	// }
50048
50049}
50050
50051// method id "dfareporting.userRoles.insert":
50052
50053type UserRolesInsertCall struct {
50054	s          *Service
50055	profileId  int64
50056	userrole   *UserRole
50057	urlParams_ gensupport.URLParams
50058	ctx_       context.Context
50059	header_    http.Header
50060}
50061
50062// Insert: Inserts a new user role.
50063func (r *UserRolesService) Insert(profileId int64, userrole *UserRole) *UserRolesInsertCall {
50064	c := &UserRolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50065	c.profileId = profileId
50066	c.userrole = userrole
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 *UserRolesInsertCall) Fields(s ...googleapi.Field) *UserRolesInsertCall {
50074	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50075	return c
50076}
50077
50078// Context sets the context to be used in this call's Do method. Any
50079// pending HTTP request will be aborted if the provided context is
50080// canceled.
50081func (c *UserRolesInsertCall) Context(ctx context.Context) *UserRolesInsertCall {
50082	c.ctx_ = ctx
50083	return c
50084}
50085
50086// Header returns an http.Header that can be modified by the caller to
50087// add HTTP headers to the request.
50088func (c *UserRolesInsertCall) Header() http.Header {
50089	if c.header_ == nil {
50090		c.header_ = make(http.Header)
50091	}
50092	return c.header_
50093}
50094
50095func (c *UserRolesInsertCall) doRequest(alt string) (*http.Response, error) {
50096	reqHeaders := make(http.Header)
50097	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
50098	for k, v := range c.header_ {
50099		reqHeaders[k] = v
50100	}
50101	reqHeaders.Set("User-Agent", c.s.userAgent())
50102	var body io.Reader = nil
50103	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50104	if err != nil {
50105		return nil, err
50106	}
50107	reqHeaders.Set("Content-Type", "application/json")
50108	c.urlParams_.Set("alt", alt)
50109	c.urlParams_.Set("prettyPrint", "false")
50110	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50111	urls += "?" + c.urlParams_.Encode()
50112	req, err := http.NewRequest("POST", urls, body)
50113	if err != nil {
50114		return nil, err
50115	}
50116	req.Header = reqHeaders
50117	googleapi.Expand(req.URL, map[string]string{
50118		"profileId": strconv.FormatInt(c.profileId, 10),
50119	})
50120	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50121}
50122
50123// Do executes the "dfareporting.userRoles.insert" call.
50124// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50125// code is an error. Response headers are in either
50126// *UserRole.ServerResponse.Header or (if a response was returned at
50127// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50128// to check whether the returned error was because
50129// http.StatusNotModified was returned.
50130func (c *UserRolesInsertCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50131	gensupport.SetOptions(c.urlParams_, opts...)
50132	res, err := c.doRequest("json")
50133	if res != nil && res.StatusCode == http.StatusNotModified {
50134		if res.Body != nil {
50135			res.Body.Close()
50136		}
50137		return nil, &googleapi.Error{
50138			Code:   res.StatusCode,
50139			Header: res.Header,
50140		}
50141	}
50142	if err != nil {
50143		return nil, err
50144	}
50145	defer googleapi.CloseBody(res)
50146	if err := googleapi.CheckResponse(res); err != nil {
50147		return nil, err
50148	}
50149	ret := &UserRole{
50150		ServerResponse: googleapi.ServerResponse{
50151			Header:         res.Header,
50152			HTTPStatusCode: res.StatusCode,
50153		},
50154	}
50155	target := &ret
50156	if err := gensupport.DecodeResponse(target, res); err != nil {
50157		return nil, err
50158	}
50159	return ret, nil
50160	// {
50161	//   "description": "Inserts a new user role.",
50162	//   "httpMethod": "POST",
50163	//   "id": "dfareporting.userRoles.insert",
50164	//   "parameterOrder": [
50165	//     "profileId"
50166	//   ],
50167	//   "parameters": {
50168	//     "profileId": {
50169	//       "description": "User profile ID associated with this request.",
50170	//       "format": "int64",
50171	//       "location": "path",
50172	//       "required": true,
50173	//       "type": "string"
50174	//     }
50175	//   },
50176	//   "path": "userprofiles/{profileId}/userRoles",
50177	//   "request": {
50178	//     "$ref": "UserRole"
50179	//   },
50180	//   "response": {
50181	//     "$ref": "UserRole"
50182	//   },
50183	//   "scopes": [
50184	//     "https://www.googleapis.com/auth/dfatrafficking"
50185	//   ]
50186	// }
50187
50188}
50189
50190// method id "dfareporting.userRoles.list":
50191
50192type UserRolesListCall struct {
50193	s            *Service
50194	profileId    int64
50195	urlParams_   gensupport.URLParams
50196	ifNoneMatch_ string
50197	ctx_         context.Context
50198	header_      http.Header
50199}
50200
50201// List: Retrieves a list of user roles, possibly filtered. This method
50202// supports paging.
50203func (r *UserRolesService) List(profileId int64) *UserRolesListCall {
50204	c := &UserRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50205	c.profileId = profileId
50206	return c
50207}
50208
50209// AccountUserRoleOnly sets the optional parameter
50210// "accountUserRoleOnly": Select only account level user roles not
50211// associated with any specific subaccount.
50212func (c *UserRolesListCall) AccountUserRoleOnly(accountUserRoleOnly bool) *UserRolesListCall {
50213	c.urlParams_.Set("accountUserRoleOnly", fmt.Sprint(accountUserRoleOnly))
50214	return c
50215}
50216
50217// Ids sets the optional parameter "ids": Select only user roles with
50218// the specified IDs.
50219func (c *UserRolesListCall) Ids(ids ...int64) *UserRolesListCall {
50220	var ids_ []string
50221	for _, v := range ids {
50222		ids_ = append(ids_, fmt.Sprint(v))
50223	}
50224	c.urlParams_.SetMulti("ids", ids_)
50225	return c
50226}
50227
50228// MaxResults sets the optional parameter "maxResults": Maximum number
50229// of results to return.
50230func (c *UserRolesListCall) MaxResults(maxResults int64) *UserRolesListCall {
50231	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
50232	return c
50233}
50234
50235// PageToken sets the optional parameter "pageToken": Value of the
50236// nextPageToken from the previous result page.
50237func (c *UserRolesListCall) PageToken(pageToken string) *UserRolesListCall {
50238	c.urlParams_.Set("pageToken", pageToken)
50239	return c
50240}
50241
50242// SearchString sets the optional parameter "searchString": Allows
50243// searching for objects by name or ID. Wildcards (*) are allowed. For
50244// example, "userrole*2015" will return objects with names like
50245// "userrole June 2015", "userrole April 2015", or simply "userrole
50246// 2015". Most of the searches also add wildcards implicitly at the
50247// start and the end of the search string. For example, a search string
50248// of "userrole" will match objects with name "my userrole", "userrole
50249// 2015", or simply "userrole".
50250func (c *UserRolesListCall) SearchString(searchString string) *UserRolesListCall {
50251	c.urlParams_.Set("searchString", searchString)
50252	return c
50253}
50254
50255// SortField sets the optional parameter "sortField": Field by which to
50256// sort the list.
50257//
50258// Possible values:
50259//   "ID" (default)
50260//   "NAME"
50261func (c *UserRolesListCall) SortField(sortField string) *UserRolesListCall {
50262	c.urlParams_.Set("sortField", sortField)
50263	return c
50264}
50265
50266// SortOrder sets the optional parameter "sortOrder": Order of sorted
50267// results.
50268//
50269// Possible values:
50270//   "ASCENDING" (default)
50271//   "DESCENDING"
50272func (c *UserRolesListCall) SortOrder(sortOrder string) *UserRolesListCall {
50273	c.urlParams_.Set("sortOrder", sortOrder)
50274	return c
50275}
50276
50277// SubaccountId sets the optional parameter "subaccountId": Select only
50278// user roles that belong to this subaccount.
50279func (c *UserRolesListCall) SubaccountId(subaccountId int64) *UserRolesListCall {
50280	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
50281	return c
50282}
50283
50284// Fields allows partial responses to be retrieved. See
50285// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50286// for more information.
50287func (c *UserRolesListCall) Fields(s ...googleapi.Field) *UserRolesListCall {
50288	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50289	return c
50290}
50291
50292// IfNoneMatch sets the optional parameter which makes the operation
50293// fail if the object's ETag matches the given value. This is useful for
50294// getting updates only after the object has changed since the last
50295// request. Use googleapi.IsNotModified to check whether the response
50296// error from Do is the result of In-None-Match.
50297func (c *UserRolesListCall) IfNoneMatch(entityTag string) *UserRolesListCall {
50298	c.ifNoneMatch_ = entityTag
50299	return c
50300}
50301
50302// Context sets the context to be used in this call's Do method. Any
50303// pending HTTP request will be aborted if the provided context is
50304// canceled.
50305func (c *UserRolesListCall) Context(ctx context.Context) *UserRolesListCall {
50306	c.ctx_ = ctx
50307	return c
50308}
50309
50310// Header returns an http.Header that can be modified by the caller to
50311// add HTTP headers to the request.
50312func (c *UserRolesListCall) Header() http.Header {
50313	if c.header_ == nil {
50314		c.header_ = make(http.Header)
50315	}
50316	return c.header_
50317}
50318
50319func (c *UserRolesListCall) doRequest(alt string) (*http.Response, error) {
50320	reqHeaders := make(http.Header)
50321	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
50322	for k, v := range c.header_ {
50323		reqHeaders[k] = v
50324	}
50325	reqHeaders.Set("User-Agent", c.s.userAgent())
50326	if c.ifNoneMatch_ != "" {
50327		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50328	}
50329	var body io.Reader = nil
50330	c.urlParams_.Set("alt", alt)
50331	c.urlParams_.Set("prettyPrint", "false")
50332	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50333	urls += "?" + c.urlParams_.Encode()
50334	req, err := http.NewRequest("GET", urls, body)
50335	if err != nil {
50336		return nil, err
50337	}
50338	req.Header = reqHeaders
50339	googleapi.Expand(req.URL, map[string]string{
50340		"profileId": strconv.FormatInt(c.profileId, 10),
50341	})
50342	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50343}
50344
50345// Do executes the "dfareporting.userRoles.list" call.
50346// Exactly one of *UserRolesListResponse or error will be non-nil. Any
50347// non-2xx status code is an error. Response headers are in either
50348// *UserRolesListResponse.ServerResponse.Header or (if a response was
50349// returned at all) in error.(*googleapi.Error).Header. Use
50350// googleapi.IsNotModified to check whether the returned error was
50351// because http.StatusNotModified was returned.
50352func (c *UserRolesListCall) Do(opts ...googleapi.CallOption) (*UserRolesListResponse, error) {
50353	gensupport.SetOptions(c.urlParams_, opts...)
50354	res, err := c.doRequest("json")
50355	if res != nil && res.StatusCode == http.StatusNotModified {
50356		if res.Body != nil {
50357			res.Body.Close()
50358		}
50359		return nil, &googleapi.Error{
50360			Code:   res.StatusCode,
50361			Header: res.Header,
50362		}
50363	}
50364	if err != nil {
50365		return nil, err
50366	}
50367	defer googleapi.CloseBody(res)
50368	if err := googleapi.CheckResponse(res); err != nil {
50369		return nil, err
50370	}
50371	ret := &UserRolesListResponse{
50372		ServerResponse: googleapi.ServerResponse{
50373			Header:         res.Header,
50374			HTTPStatusCode: res.StatusCode,
50375		},
50376	}
50377	target := &ret
50378	if err := gensupport.DecodeResponse(target, res); err != nil {
50379		return nil, err
50380	}
50381	return ret, nil
50382	// {
50383	//   "description": "Retrieves a list of user roles, possibly filtered. This method supports paging.",
50384	//   "httpMethod": "GET",
50385	//   "id": "dfareporting.userRoles.list",
50386	//   "parameterOrder": [
50387	//     "profileId"
50388	//   ],
50389	//   "parameters": {
50390	//     "accountUserRoleOnly": {
50391	//       "description": "Select only account level user roles not associated with any specific subaccount.",
50392	//       "location": "query",
50393	//       "type": "boolean"
50394	//     },
50395	//     "ids": {
50396	//       "description": "Select only user roles with the specified IDs.",
50397	//       "format": "int64",
50398	//       "location": "query",
50399	//       "repeated": true,
50400	//       "type": "string"
50401	//     },
50402	//     "maxResults": {
50403	//       "default": "1000",
50404	//       "description": "Maximum number of results to return.",
50405	//       "format": "int32",
50406	//       "location": "query",
50407	//       "maximum": "1000",
50408	//       "minimum": "0",
50409	//       "type": "integer"
50410	//     },
50411	//     "pageToken": {
50412	//       "description": "Value of the nextPageToken from the previous result page.",
50413	//       "location": "query",
50414	//       "type": "string"
50415	//     },
50416	//     "profileId": {
50417	//       "description": "User profile ID associated with this request.",
50418	//       "format": "int64",
50419	//       "location": "path",
50420	//       "required": true,
50421	//       "type": "string"
50422	//     },
50423	//     "searchString": {
50424	//       "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\".",
50425	//       "location": "query",
50426	//       "type": "string"
50427	//     },
50428	//     "sortField": {
50429	//       "default": "ID",
50430	//       "description": "Field by which to sort the list.",
50431	//       "enum": [
50432	//         "ID",
50433	//         "NAME"
50434	//       ],
50435	//       "enumDescriptions": [
50436	//         "",
50437	//         ""
50438	//       ],
50439	//       "location": "query",
50440	//       "type": "string"
50441	//     },
50442	//     "sortOrder": {
50443	//       "default": "ASCENDING",
50444	//       "description": "Order of sorted results.",
50445	//       "enum": [
50446	//         "ASCENDING",
50447	//         "DESCENDING"
50448	//       ],
50449	//       "enumDescriptions": [
50450	//         "",
50451	//         ""
50452	//       ],
50453	//       "location": "query",
50454	//       "type": "string"
50455	//     },
50456	//     "subaccountId": {
50457	//       "description": "Select only user roles that belong to this subaccount.",
50458	//       "format": "int64",
50459	//       "location": "query",
50460	//       "type": "string"
50461	//     }
50462	//   },
50463	//   "path": "userprofiles/{profileId}/userRoles",
50464	//   "response": {
50465	//     "$ref": "UserRolesListResponse"
50466	//   },
50467	//   "scopes": [
50468	//     "https://www.googleapis.com/auth/dfatrafficking"
50469	//   ]
50470	// }
50471
50472}
50473
50474// Pages invokes f for each page of results.
50475// A non-nil error returned from f will halt the iteration.
50476// The provided context supersedes any context provided to the Context method.
50477func (c *UserRolesListCall) Pages(ctx context.Context, f func(*UserRolesListResponse) error) error {
50478	c.ctx_ = ctx
50479	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
50480	for {
50481		x, err := c.Do()
50482		if err != nil {
50483			return err
50484		}
50485		if err := f(x); err != nil {
50486			return err
50487		}
50488		if x.NextPageToken == "" {
50489			return nil
50490		}
50491		c.PageToken(x.NextPageToken)
50492	}
50493}
50494
50495// method id "dfareporting.userRoles.patch":
50496
50497type UserRolesPatchCall struct {
50498	s          *Service
50499	profileId  int64
50500	userrole   *UserRole
50501	urlParams_ gensupport.URLParams
50502	ctx_       context.Context
50503	header_    http.Header
50504}
50505
50506// Patch: Updates an existing user role. This method supports patch
50507// semantics.
50508func (r *UserRolesService) Patch(profileId int64, id int64, userrole *UserRole) *UserRolesPatchCall {
50509	c := &UserRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50510	c.profileId = profileId
50511	c.urlParams_.Set("id", fmt.Sprint(id))
50512	c.userrole = userrole
50513	return c
50514}
50515
50516// Fields allows partial responses to be retrieved. See
50517// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50518// for more information.
50519func (c *UserRolesPatchCall) Fields(s ...googleapi.Field) *UserRolesPatchCall {
50520	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50521	return c
50522}
50523
50524// Context sets the context to be used in this call's Do method. Any
50525// pending HTTP request will be aborted if the provided context is
50526// canceled.
50527func (c *UserRolesPatchCall) Context(ctx context.Context) *UserRolesPatchCall {
50528	c.ctx_ = ctx
50529	return c
50530}
50531
50532// Header returns an http.Header that can be modified by the caller to
50533// add HTTP headers to the request.
50534func (c *UserRolesPatchCall) Header() http.Header {
50535	if c.header_ == nil {
50536		c.header_ = make(http.Header)
50537	}
50538	return c.header_
50539}
50540
50541func (c *UserRolesPatchCall) doRequest(alt string) (*http.Response, error) {
50542	reqHeaders := make(http.Header)
50543	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
50544	for k, v := range c.header_ {
50545		reqHeaders[k] = v
50546	}
50547	reqHeaders.Set("User-Agent", c.s.userAgent())
50548	var body io.Reader = nil
50549	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50550	if err != nil {
50551		return nil, err
50552	}
50553	reqHeaders.Set("Content-Type", "application/json")
50554	c.urlParams_.Set("alt", alt)
50555	c.urlParams_.Set("prettyPrint", "false")
50556	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50557	urls += "?" + c.urlParams_.Encode()
50558	req, err := http.NewRequest("PATCH", urls, body)
50559	if err != nil {
50560		return nil, err
50561	}
50562	req.Header = reqHeaders
50563	googleapi.Expand(req.URL, map[string]string{
50564		"profileId": strconv.FormatInt(c.profileId, 10),
50565	})
50566	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50567}
50568
50569// Do executes the "dfareporting.userRoles.patch" call.
50570// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50571// code is an error. Response headers are in either
50572// *UserRole.ServerResponse.Header or (if a response was returned at
50573// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50574// to check whether the returned error was because
50575// http.StatusNotModified was returned.
50576func (c *UserRolesPatchCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50577	gensupport.SetOptions(c.urlParams_, opts...)
50578	res, err := c.doRequest("json")
50579	if res != nil && res.StatusCode == http.StatusNotModified {
50580		if res.Body != nil {
50581			res.Body.Close()
50582		}
50583		return nil, &googleapi.Error{
50584			Code:   res.StatusCode,
50585			Header: res.Header,
50586		}
50587	}
50588	if err != nil {
50589		return nil, err
50590	}
50591	defer googleapi.CloseBody(res)
50592	if err := googleapi.CheckResponse(res); err != nil {
50593		return nil, err
50594	}
50595	ret := &UserRole{
50596		ServerResponse: googleapi.ServerResponse{
50597			Header:         res.Header,
50598			HTTPStatusCode: res.StatusCode,
50599		},
50600	}
50601	target := &ret
50602	if err := gensupport.DecodeResponse(target, res); err != nil {
50603		return nil, err
50604	}
50605	return ret, nil
50606	// {
50607	//   "description": "Updates an existing user role. This method supports patch semantics.",
50608	//   "httpMethod": "PATCH",
50609	//   "id": "dfareporting.userRoles.patch",
50610	//   "parameterOrder": [
50611	//     "profileId",
50612	//     "id"
50613	//   ],
50614	//   "parameters": {
50615	//     "id": {
50616	//       "description": "User role ID.",
50617	//       "format": "int64",
50618	//       "location": "query",
50619	//       "required": true,
50620	//       "type": "string"
50621	//     },
50622	//     "profileId": {
50623	//       "description": "User profile ID associated with this request.",
50624	//       "format": "int64",
50625	//       "location": "path",
50626	//       "required": true,
50627	//       "type": "string"
50628	//     }
50629	//   },
50630	//   "path": "userprofiles/{profileId}/userRoles",
50631	//   "request": {
50632	//     "$ref": "UserRole"
50633	//   },
50634	//   "response": {
50635	//     "$ref": "UserRole"
50636	//   },
50637	//   "scopes": [
50638	//     "https://www.googleapis.com/auth/dfatrafficking"
50639	//   ]
50640	// }
50641
50642}
50643
50644// method id "dfareporting.userRoles.update":
50645
50646type UserRolesUpdateCall struct {
50647	s          *Service
50648	profileId  int64
50649	userrole   *UserRole
50650	urlParams_ gensupport.URLParams
50651	ctx_       context.Context
50652	header_    http.Header
50653}
50654
50655// Update: Updates an existing user role.
50656func (r *UserRolesService) Update(profileId int64, userrole *UserRole) *UserRolesUpdateCall {
50657	c := &UserRolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50658	c.profileId = profileId
50659	c.userrole = userrole
50660	return c
50661}
50662
50663// Fields allows partial responses to be retrieved. See
50664// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50665// for more information.
50666func (c *UserRolesUpdateCall) Fields(s ...googleapi.Field) *UserRolesUpdateCall {
50667	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50668	return c
50669}
50670
50671// Context sets the context to be used in this call's Do method. Any
50672// pending HTTP request will be aborted if the provided context is
50673// canceled.
50674func (c *UserRolesUpdateCall) Context(ctx context.Context) *UserRolesUpdateCall {
50675	c.ctx_ = ctx
50676	return c
50677}
50678
50679// Header returns an http.Header that can be modified by the caller to
50680// add HTTP headers to the request.
50681func (c *UserRolesUpdateCall) Header() http.Header {
50682	if c.header_ == nil {
50683		c.header_ = make(http.Header)
50684	}
50685	return c.header_
50686}
50687
50688func (c *UserRolesUpdateCall) doRequest(alt string) (*http.Response, error) {
50689	reqHeaders := make(http.Header)
50690	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
50691	for k, v := range c.header_ {
50692		reqHeaders[k] = v
50693	}
50694	reqHeaders.Set("User-Agent", c.s.userAgent())
50695	var body io.Reader = nil
50696	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50697	if err != nil {
50698		return nil, err
50699	}
50700	reqHeaders.Set("Content-Type", "application/json")
50701	c.urlParams_.Set("alt", alt)
50702	c.urlParams_.Set("prettyPrint", "false")
50703	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50704	urls += "?" + c.urlParams_.Encode()
50705	req, err := http.NewRequest("PUT", urls, body)
50706	if err != nil {
50707		return nil, err
50708	}
50709	req.Header = reqHeaders
50710	googleapi.Expand(req.URL, map[string]string{
50711		"profileId": strconv.FormatInt(c.profileId, 10),
50712	})
50713	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50714}
50715
50716// Do executes the "dfareporting.userRoles.update" call.
50717// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50718// code is an error. Response headers are in either
50719// *UserRole.ServerResponse.Header or (if a response was returned at
50720// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50721// to check whether the returned error was because
50722// http.StatusNotModified was returned.
50723func (c *UserRolesUpdateCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50724	gensupport.SetOptions(c.urlParams_, opts...)
50725	res, err := c.doRequest("json")
50726	if res != nil && res.StatusCode == http.StatusNotModified {
50727		if res.Body != nil {
50728			res.Body.Close()
50729		}
50730		return nil, &googleapi.Error{
50731			Code:   res.StatusCode,
50732			Header: res.Header,
50733		}
50734	}
50735	if err != nil {
50736		return nil, err
50737	}
50738	defer googleapi.CloseBody(res)
50739	if err := googleapi.CheckResponse(res); err != nil {
50740		return nil, err
50741	}
50742	ret := &UserRole{
50743		ServerResponse: googleapi.ServerResponse{
50744			Header:         res.Header,
50745			HTTPStatusCode: res.StatusCode,
50746		},
50747	}
50748	target := &ret
50749	if err := gensupport.DecodeResponse(target, res); err != nil {
50750		return nil, err
50751	}
50752	return ret, nil
50753	// {
50754	//   "description": "Updates an existing user role.",
50755	//   "httpMethod": "PUT",
50756	//   "id": "dfareporting.userRoles.update",
50757	//   "parameterOrder": [
50758	//     "profileId"
50759	//   ],
50760	//   "parameters": {
50761	//     "profileId": {
50762	//       "description": "User profile ID associated with this request.",
50763	//       "format": "int64",
50764	//       "location": "path",
50765	//       "required": true,
50766	//       "type": "string"
50767	//     }
50768	//   },
50769	//   "path": "userprofiles/{profileId}/userRoles",
50770	//   "request": {
50771	//     "$ref": "UserRole"
50772	//   },
50773	//   "response": {
50774	//     "$ref": "UserRole"
50775	//   },
50776	//   "scopes": [
50777	//     "https://www.googleapis.com/auth/dfatrafficking"
50778	//   ]
50779	// }
50780
50781}
50782
50783// method id "dfareporting.videoFormats.get":
50784
50785type VideoFormatsGetCall struct {
50786	s            *Service
50787	profileId    int64
50788	id           int64
50789	urlParams_   gensupport.URLParams
50790	ifNoneMatch_ string
50791	ctx_         context.Context
50792	header_      http.Header
50793}
50794
50795// Get: Gets one video format by ID.
50796func (r *VideoFormatsService) Get(profileId int64, id int64) *VideoFormatsGetCall {
50797	c := &VideoFormatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50798	c.profileId = profileId
50799	c.id = id
50800	return c
50801}
50802
50803// Fields allows partial responses to be retrieved. See
50804// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50805// for more information.
50806func (c *VideoFormatsGetCall) Fields(s ...googleapi.Field) *VideoFormatsGetCall {
50807	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50808	return c
50809}
50810
50811// IfNoneMatch sets the optional parameter which makes the operation
50812// fail if the object's ETag matches the given value. This is useful for
50813// getting updates only after the object has changed since the last
50814// request. Use googleapi.IsNotModified to check whether the response
50815// error from Do is the result of In-None-Match.
50816func (c *VideoFormatsGetCall) IfNoneMatch(entityTag string) *VideoFormatsGetCall {
50817	c.ifNoneMatch_ = entityTag
50818	return c
50819}
50820
50821// Context sets the context to be used in this call's Do method. Any
50822// pending HTTP request will be aborted if the provided context is
50823// canceled.
50824func (c *VideoFormatsGetCall) Context(ctx context.Context) *VideoFormatsGetCall {
50825	c.ctx_ = ctx
50826	return c
50827}
50828
50829// Header returns an http.Header that can be modified by the caller to
50830// add HTTP headers to the request.
50831func (c *VideoFormatsGetCall) Header() http.Header {
50832	if c.header_ == nil {
50833		c.header_ = make(http.Header)
50834	}
50835	return c.header_
50836}
50837
50838func (c *VideoFormatsGetCall) doRequest(alt string) (*http.Response, error) {
50839	reqHeaders := make(http.Header)
50840	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
50841	for k, v := range c.header_ {
50842		reqHeaders[k] = v
50843	}
50844	reqHeaders.Set("User-Agent", c.s.userAgent())
50845	if c.ifNoneMatch_ != "" {
50846		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50847	}
50848	var body io.Reader = nil
50849	c.urlParams_.Set("alt", alt)
50850	c.urlParams_.Set("prettyPrint", "false")
50851	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats/{id}")
50852	urls += "?" + c.urlParams_.Encode()
50853	req, err := http.NewRequest("GET", urls, body)
50854	if err != nil {
50855		return nil, err
50856	}
50857	req.Header = reqHeaders
50858	googleapi.Expand(req.URL, map[string]string{
50859		"profileId": strconv.FormatInt(c.profileId, 10),
50860		"id":        strconv.FormatInt(c.id, 10),
50861	})
50862	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50863}
50864
50865// Do executes the "dfareporting.videoFormats.get" call.
50866// Exactly one of *VideoFormat or error will be non-nil. Any non-2xx
50867// status code is an error. Response headers are in either
50868// *VideoFormat.ServerResponse.Header or (if a response was returned at
50869// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50870// to check whether the returned error was because
50871// http.StatusNotModified was returned.
50872func (c *VideoFormatsGetCall) Do(opts ...googleapi.CallOption) (*VideoFormat, error) {
50873	gensupport.SetOptions(c.urlParams_, opts...)
50874	res, err := c.doRequest("json")
50875	if res != nil && res.StatusCode == http.StatusNotModified {
50876		if res.Body != nil {
50877			res.Body.Close()
50878		}
50879		return nil, &googleapi.Error{
50880			Code:   res.StatusCode,
50881			Header: res.Header,
50882		}
50883	}
50884	if err != nil {
50885		return nil, err
50886	}
50887	defer googleapi.CloseBody(res)
50888	if err := googleapi.CheckResponse(res); err != nil {
50889		return nil, err
50890	}
50891	ret := &VideoFormat{
50892		ServerResponse: googleapi.ServerResponse{
50893			Header:         res.Header,
50894			HTTPStatusCode: res.StatusCode,
50895		},
50896	}
50897	target := &ret
50898	if err := gensupport.DecodeResponse(target, res); err != nil {
50899		return nil, err
50900	}
50901	return ret, nil
50902	// {
50903	//   "description": "Gets one video format by ID.",
50904	//   "httpMethod": "GET",
50905	//   "id": "dfareporting.videoFormats.get",
50906	//   "parameterOrder": [
50907	//     "profileId",
50908	//     "id"
50909	//   ],
50910	//   "parameters": {
50911	//     "id": {
50912	//       "description": "Video format ID.",
50913	//       "format": "int32",
50914	//       "location": "path",
50915	//       "required": true,
50916	//       "type": "integer"
50917	//     },
50918	//     "profileId": {
50919	//       "description": "User profile ID associated with this request.",
50920	//       "format": "int64",
50921	//       "location": "path",
50922	//       "required": true,
50923	//       "type": "string"
50924	//     }
50925	//   },
50926	//   "path": "userprofiles/{profileId}/videoFormats/{id}",
50927	//   "response": {
50928	//     "$ref": "VideoFormat"
50929	//   },
50930	//   "scopes": [
50931	//     "https://www.googleapis.com/auth/dfatrafficking"
50932	//   ]
50933	// }
50934
50935}
50936
50937// method id "dfareporting.videoFormats.list":
50938
50939type VideoFormatsListCall struct {
50940	s            *Service
50941	profileId    int64
50942	urlParams_   gensupport.URLParams
50943	ifNoneMatch_ string
50944	ctx_         context.Context
50945	header_      http.Header
50946}
50947
50948// List: Lists available video formats.
50949func (r *VideoFormatsService) List(profileId int64) *VideoFormatsListCall {
50950	c := &VideoFormatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50951	c.profileId = profileId
50952	return c
50953}
50954
50955// Fields allows partial responses to be retrieved. See
50956// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50957// for more information.
50958func (c *VideoFormatsListCall) Fields(s ...googleapi.Field) *VideoFormatsListCall {
50959	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50960	return c
50961}
50962
50963// IfNoneMatch sets the optional parameter which makes the operation
50964// fail if the object's ETag matches the given value. This is useful for
50965// getting updates only after the object has changed since the last
50966// request. Use googleapi.IsNotModified to check whether the response
50967// error from Do is the result of In-None-Match.
50968func (c *VideoFormatsListCall) IfNoneMatch(entityTag string) *VideoFormatsListCall {
50969	c.ifNoneMatch_ = entityTag
50970	return c
50971}
50972
50973// Context sets the context to be used in this call's Do method. Any
50974// pending HTTP request will be aborted if the provided context is
50975// canceled.
50976func (c *VideoFormatsListCall) Context(ctx context.Context) *VideoFormatsListCall {
50977	c.ctx_ = ctx
50978	return c
50979}
50980
50981// Header returns an http.Header that can be modified by the caller to
50982// add HTTP headers to the request.
50983func (c *VideoFormatsListCall) Header() http.Header {
50984	if c.header_ == nil {
50985		c.header_ = make(http.Header)
50986	}
50987	return c.header_
50988}
50989
50990func (c *VideoFormatsListCall) doRequest(alt string) (*http.Response, error) {
50991	reqHeaders := make(http.Header)
50992	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
50993	for k, v := range c.header_ {
50994		reqHeaders[k] = v
50995	}
50996	reqHeaders.Set("User-Agent", c.s.userAgent())
50997	if c.ifNoneMatch_ != "" {
50998		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50999	}
51000	var body io.Reader = nil
51001	c.urlParams_.Set("alt", alt)
51002	c.urlParams_.Set("prettyPrint", "false")
51003	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats")
51004	urls += "?" + c.urlParams_.Encode()
51005	req, err := http.NewRequest("GET", urls, body)
51006	if err != nil {
51007		return nil, err
51008	}
51009	req.Header = reqHeaders
51010	googleapi.Expand(req.URL, map[string]string{
51011		"profileId": strconv.FormatInt(c.profileId, 10),
51012	})
51013	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51014}
51015
51016// Do executes the "dfareporting.videoFormats.list" call.
51017// Exactly one of *VideoFormatsListResponse or error will be non-nil.
51018// Any non-2xx status code is an error. Response headers are in either
51019// *VideoFormatsListResponse.ServerResponse.Header or (if a response was
51020// returned at all) in error.(*googleapi.Error).Header. Use
51021// googleapi.IsNotModified to check whether the returned error was
51022// because http.StatusNotModified was returned.
51023func (c *VideoFormatsListCall) Do(opts ...googleapi.CallOption) (*VideoFormatsListResponse, error) {
51024	gensupport.SetOptions(c.urlParams_, opts...)
51025	res, err := c.doRequest("json")
51026	if res != nil && res.StatusCode == http.StatusNotModified {
51027		if res.Body != nil {
51028			res.Body.Close()
51029		}
51030		return nil, &googleapi.Error{
51031			Code:   res.StatusCode,
51032			Header: res.Header,
51033		}
51034	}
51035	if err != nil {
51036		return nil, err
51037	}
51038	defer googleapi.CloseBody(res)
51039	if err := googleapi.CheckResponse(res); err != nil {
51040		return nil, err
51041	}
51042	ret := &VideoFormatsListResponse{
51043		ServerResponse: googleapi.ServerResponse{
51044			Header:         res.Header,
51045			HTTPStatusCode: res.StatusCode,
51046		},
51047	}
51048	target := &ret
51049	if err := gensupport.DecodeResponse(target, res); err != nil {
51050		return nil, err
51051	}
51052	return ret, nil
51053	// {
51054	//   "description": "Lists available video formats.",
51055	//   "httpMethod": "GET",
51056	//   "id": "dfareporting.videoFormats.list",
51057	//   "parameterOrder": [
51058	//     "profileId"
51059	//   ],
51060	//   "parameters": {
51061	//     "profileId": {
51062	//       "description": "User profile ID associated with this request.",
51063	//       "format": "int64",
51064	//       "location": "path",
51065	//       "required": true,
51066	//       "type": "string"
51067	//     }
51068	//   },
51069	//   "path": "userprofiles/{profileId}/videoFormats",
51070	//   "response": {
51071	//     "$ref": "VideoFormatsListResponse"
51072	//   },
51073	//   "scopes": [
51074	//     "https://www.googleapis.com/auth/dfatrafficking"
51075	//   ]
51076	// }
51077
51078}
51079